text
stringlengths
454
608k
url
stringlengths
17
896
dump
stringclasses
91 values
source
stringclasses
1 value
word_count
int64
101
114k
flesch_reading_ease
float64
50
104
How to Use Many2one Field as selection for details? I code part as below : class Selection(models.Model): _name = 'selection.model' _rec_name = 'select' select = fields.Char(string='selections', required=True) class Checks(models.Model): _name = 'buy.goods' strs = fields.Char() results = fields.Many2one('selection.model', string='Selections') @api.onchange('strs') def _get_results(self): goods = self.strs.split(',') ... I want to show all items of 'goods' as selections of 'results' field; and when 'strs' field is changed, the selections of 'results' field should be updated at once. so how shall I code for this? thanks for your reply; but i think the effect of your code is select some items but what i means is that the select items of 'result' are from 'strs'; for example, 'strs' = 'this is good'; then the select items list of 'result' should be ['this','is','good']
https://www.odoo.com/nl_NL/forum/help-1/question/how-to-use-many2one-field-as-selection-for-details-153318
CC-MAIN-2019-43
refinedweb
141
70.6
Poor Man's Theremin If you're interested in gaining some experience playing the theremin but don't want to spend a lot of money or build the kit, try the “Poor Man's Theremin” (PMT), written by Seth David Schoen. The PMT turns a laptop computer with an 802.11b card into a theremin-like instrument, using the signal strength reported by the card to control the pitch of a note. To try it, first compile this C program, called ttone, using the command cc -o ttone -lm ttone.c. #include <math.h> #include <linux/kd.h> const int A = 440; const float r = 1.05946; int pitch(int base, int observed){ return (int) A * pow(r, (observed-base)); } int main(int argc, char *argv[]){ int base, observed; if (strcmp("off", argv[1])){ base = atoi(argv[1]); observed = atoi(argv[2]); ioctl(0, KIOCSOUND, 1190000 / pitch(base, observed) ); } else { ioctl(0, KIOCSOUND, 0); }; } Put the ttone executable in a directory that's in your PATH. Now run the following shell script, called pmt.sh, and move into range of an 802.11b access point. You can change the pitch by moving closer to or further away from the access point or by moving your hand over the 802.11b antenna in a theremin-player-like manner. #!/bin/sh # Poor Man's Theremin m=100 oldQ=foo [ $1 ] && m=$1 while : do Q=$(iwconfig 2</dev/null | grep Link.Quality | cut -d: -f2 | cut -d/ -f1) if [ $oldQ != $Q ] then ./ttone $m $Q fi oldQ=$Q done The Poor Man's Theremin does not have the volume control of a proper theremin, and the pitch changes in discrete steps instead of continuously. Implementing these features is left as an exercise for the reader. Don Marti is editor in chief of Linux Journal.
http://www.linuxjournal.com/article/6597?quicktabs_1=2
CC-MAIN-2018-05
refinedweb
302
72.76
Increase AddIn Performance with MAF and WPF using LoaderOptimization each of these AppDomains. If you are not careful, your application could begin to consume large amounts of memory without you even noticing. To solve this, you can place an attribute on the Main method of any .NET executable, explicitly stating that you want the CLR to share any assemblies that it can. There are certain rules for an assembly to be shareable, one of which is that it must have a strong name and be placed in the GAC – obviously this is not a problem for the .NET framework assemblies, WPF in our case. When you create a new WPF Project the project template will create an App.xaml for you. Since WPF does a little magic behind the scenes, there is no way to access the Main method of your application. In this case, you simply delete the App.xaml and create a new Application.cs class with the following code: public class Application : System.Windows.Application { public Application() { StartupUri = new Uri("Window1.xaml", UriKind.Relative); } public static Application App; [System.STAThreadAttribute()] [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.LoaderOptimization(LoaderOptimization.MultiDomainHost)] public static void Main() { // Add attribute above this method Application app = new Application(); App = app; app.Run(); } }
http://matthidinger.com/archive/2008/10/12/increase-addin-performance-with-maf-and-wpf-using-loaderoptimization/
CC-MAIN-2017-30
refinedweb
207
50.02
How to: Generate a Unit Test You can create unit tests in several ways. You can generate unit tests from your production code, as described in the following procedure, and then edit them to work the way you want. Or, you can author unit tests by hand, as described in How to: Author a Unit Test. Implementing Unit Tests When you generate unit tests, one unit test method is created for each method of production code that you have selected in the Create Unit Tests dialog box; this. For more information, see How to: Author a Unit Test. To generate a unit test In Solution Explorer, right-click a test project, point to Add, and then click Unit Test. - or - In Solution Explorer, right-click a test project, point to Add, and then click New Test. In the Add New Test dialog box, click Unit Test Wizard and then click OK. - or - In the Test Manager window or the Test View window, right-click the surface of the window and click New Test. In the Add New Test dialog box, click Unit Test Wizard and then click OK. - or - In the Visual Studio code editor, right-click a namespace, class, or method that you want to test, and select Create Unit Tests. This displays the Create Unit Tests dialog box. A tree structure displays the class and member hierarchy of the assembly that houses your code. You can use this page to generate unit tests for any selection of those members or classes, and to choose a project into which you want the generated unit tests to be placed. The code elements initially selected in the tree structure are the element that you right-clicked plus any child elements.
http://msdn.microsoft.com/en-US/library/ms182524(v=vs.80).aspx
CC-MAIN-2014-42
refinedweb
289
77.67
Hi all, I get swamped with ImportErrors when using the latest module importer with mod_python 3.3 / apache 2.2 / python 2.5. The site structure is quite flat - all the python source files in: /var/www/sitename/src/ And all the psps in: /var/www/sitename/src/psps/ The apache configuration is nothing special, and is thus: <Directory "/var/www/sitename/src"> SetHandler mod_python PythonHandler mainhandler PythonDebug On PythonInterpreter sitename </Directory> Import statements from .psp files in the psps directory are what are failing. So for example, /var/www/sitename/src/psps/page.psp might have a line, "import model", hoping to get it's sweaty hands on /var/www/sitename/src/model.py. But an ImportError will occur, of the form: ====== "/var/www/sitename/src/mainhandler.py", line 290, in handler return genpages.page(req) File "/var/www/sitename/src/genpages.py", line 20, in page template.run(vars=vars) File "/usr/lib/python2.5/site-packages/mod_python/psp.py", line 243, in run exec code in global_scope File "/var/www/sitename/src/psps/page.psp", line 2, in <module> import model ImportError: No module named model ====== The frustrating thing is, in the module cache dump, you can see model.py has been loaded successfully already so it's in scope. I've tried apache directives to add the src folder to the importer path, but haven't had any success with that. Any suggestions anyone? Is there a better way of structuring modules / psps to be mod_python 3.3 compatible? Any advice really appreciated, thanks. - luke
http://modpython.org/pipermail/mod_python/2008-March/024917.html
CC-MAIN-2017-51
refinedweb
259
52.36
Discovering AuthorizeAttribute role names In this post, Senior Consultant, Marius Rochon showcases how to discover ‘AuthorizeAttribute’ role names. The AuthorizeAttribute is used in ASP.NET code to decorate controller classes and methods which require authorization, e.g. [Authorize(Roles =“admin”)] public class HomeController : Controller { Meaning that to call any method in this class, the user needs to have a role claim with the value ‘admin’. With many controllers and methods the number of roles used and their assignment to methods may become an administrative issue. It may not be easily discoverable what is the complete list of roles the application uses or what is the complete set of methods enabled by a role. Continue reading on Marius’s blog…
https://devblogs.microsoft.com/premier-developer/discovering-authorizeattribute-role-names/
CC-MAIN-2020-29
refinedweb
119
54.83
Not logged in Log in now Recent Features LWN.net Weekly Edition for December 5, 2013 Deadline scheduling: coming soon? LWN.net Weekly Edition for November 27, 2013 ACPI for ARM? LWN.net Weekly Edition for November 21, 2013 * Andrew Morton <akpm@linux-foundation.org> wrote: > Now, we've gone in blind before - most notably on the > containers/cgroups/namespaces stuff. That hail mary pass worked out > acceptably, I think. Maybe we got lucky. I thought that > net-namespaces in particular would never get there, but it did. > > That was a very large and quite long-term-important user-visible > feature. > > checkpoint/restart/migration is also a long-term-...-feature. But if > at all possible I do think that we should go into it with our eyes a > little less shut. IMO, s/.../important/ More important than containers in fact. Being able to detach all software state from the hw state and being able to reattach it: 1) at a later point in time, or 2) in a different piece of hardware, or 3) [future] in a different kernel ... is powerful stuff on a very conceptual level IMO. The only reason we dont have it in every OS is not because it's not desired and not wanted, but because it's very, very hard to do it on a wide scale. But people would love it even if it adds (some) overhead. This kind of featureset is actually the main motivator for virtualization. If the native kernel was able to do checkpointing we'd have not only near-zero-cost virtualization done at the right abstraction level (when combined with containers/control-groups), but we'd also have a few future feature items like: 1) Kernel upgrades done intelligently: transparent reboot into an upgraded kernel. 2) Downgrade-on-regressions done sanely: transparent downgrade+reboot to a known-working kernel. (as long as the regression is app misbehavior or a performance problem - not a kernel crash. Most regressions on kernel upgrades are not actual crashes or data corruption but functional and performance regressions - i.e. it's safely checkpointable and downgradeable.) 3) Hibernation done intelligently: checkpoint everything, turn off system. Turn on system, restore everything from the checkpoint. 4) Backups done intelligently: full "backups" of long-running computational jobs, maybe even of complex things like databases or desktop sessions. 5) Remote debugging done intelligently: got a crashed session? Checkpoint the whole app in its anomalous state and upload the image (as long as you can trust the developer with that image and with the filesystem state that goes with it). I dont see many long-term dragons here. The kernel is obviously always able to do near-zero-overhead checkpointing: it knows about all its own data structures, can enumerate them and knows how they map to user-space objects. The rest is performance considerations: do we want to embedd checkpointing helpers in certain runtime codepaths, to make checkpointing faster? But if that is undesirable (serialization, etc.), we can always fall back to the dumbest, zero-overhead methods. There is _one_ interim runtime cost: the "can we checkpoint or not" decision that the kernel has to make while the feature is not complete. That, if this feature takes off, is just a short-term worry - as basically everything will be checkpointable in the long run. In any case, by designing checkpointing to reuse the existing LSM callbacks, we'd hit multiple birds with the same stone. (One of which is the constant complaints about the runtime costs of the LSM callbacks - with checkpointing we get an independent, non-security user of the facility which is a nice touch.) So all things considered it does not look like a bad deal to me - but i might be missing something nasty. Ingo --
http://lwn.net/Articles/320655/
CC-MAIN-2013-48
refinedweb
630
63.8
Python-Printr 0.0.3 Python module to allow a print line to be updated after printing# Printr Printr is a simple PyPi module that allows for print statements to be replaces with a new line. Particularly useful for displaying progress messages. ## Installation Installation can be done using pip in the standard way: ``` pip install python-printr ``` If you have python 3 installed, then install using `pip3`. There are no dependancies for this package, so installation should go ahead fine. Alternatively, you can download directly from Pypi [here]() ## Usage ``` import printr printr.get_version() >>> 0.0.3 ``` The printr module contains various different printrs to assist you. You can find more information about these printrs on the wiki. The main reason I wrote this project was to simplify status output for my projects, and because I'd never written a PyPi package before. - Author: Jake Howard - License: MIT - Platform: any - Package Index Owner: TheOrangeOne - DOAP record: Python-Printr-0.0.3.xml
https://pypi.python.org/pypi/Python-Printr
CC-MAIN-2016-22
refinedweb
161
54.83
CodeMachine 100 Report post Posted November 8, 2006 Hi again I have some thread problem. I have a class "NetworkServer" that should listen for incoming messages and also be able to send messages over ObjectInputStream/ObjectOutputStream. Right know I only have the listening part threaded. Now I want the sender part to be threaded as well in the same class. Now I extend the "Thread" class. But now I need to implement "Runnable" instead when having TWO threads, I think? Is this the way to do it (kind of)?? public class NetworkServer implements Runnable { Thread m_threadSend = null; Thread m_threadReceive = null; public NetworkServer() { } public void start() { m_threadSend = new Thread(this); m_threadReceive = new Thread(this); m_threadSend.start(); m_threadReceive.start(); } public void stop() { m_threadSend.stop(); m_threadSend.stop(); } public void run() { while(true) { if(Thread.currentThread()==m_threadSend) { // Send messages from queue. } else { // Listen for incoming messages. } } } } Kind regards [Edited by - CodeMachine on November 8, 2006 10:14:21 AM] 0 Share this post Link to post Share on other sites
https://www.gamedev.net/forums/topic/423075-multiple-threads-issue/
CC-MAIN-2017-34
refinedweb
166
67.96
Generally, for any classification problem, we predict the class value that has the highest probability of being the true class label. However, sometimes, we want to predict the probabilities of a data instance belonging to each class label. This type of problems can easily be handled by calibration curve. It support models with 0 and 1 value only. So this recipe is a short example on what does caliberation mean. Let's get started. from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.datasets import load_breast_cancer from sklearn.tree import DecisionTreeClassifier from sklearn.calibration import calibration_curve import matplotlib.pyplot as plt Let's pause and look at these imports. We have exported train_test_split which helps in randomly breaking the datset in two parts. Here sklearn.dataset is used to import one classification based model dataset. Also, we have exported calibration_curve to calibrate =DecisionTreeClassifier(criterion ='entropy', max_features = 2) We have simply built a classification model with =DecisionTreeClassifier with criterion as entropy and max_feature to be 2. model.fit(X_train, y_train) y_pred= model.predict(X_test) Here we have simply fit used fit function to fit our model on X_train and y_train. Now, we are predicting the values of X_test using our built model. x, y = calibration_curve(y_test, y_pred, n_bins = 10, normalize = True) Now we are calibrating our predicted value to the actual value. n_bins refers for number of bins to discretize the [0, 1] interval. Also, we are normalizing y_pred in the [0,1] interval. plt.plot([0, 1], [0, 1], linestyle = '--', label = 'Ideally Calibrated') plt.plot(y, x, marker = '.', label = 'Decision Tree Classifier') plt.xlabel('Average Predicted Probability in each bin') plt.ylabel('Ratio of positives') plt.legend() plt.show() Here, first we have plotted the Ideally calibrated curve which will a straight line between 0 and 1. Now, we plot our calibrated curve of this particular model. he x-axis represents the average predicted probability in each bin. The y-axis is the ratio of positives (the proportion of positive predictions). Once we run the above code snippet, we will see: Scroll down to the ipython file to visualize the results. Clearly, the model built is highly efficient on any unknown set.
https://www.projectpro.io/recipes/what-does-model-calibration-mean
CC-MAIN-2021-43
refinedweb
364
52.36
Technical Support On-Line Manuals RL-ARM User's Guide (MDK v4) #include <rtl.h> BOOL slip_is_up (void); The slip_is_up function determines the state of SLIP link between the two modems. It returns __TRUE if IP frames can be exchanged over the SLIP link. The slip_is_up function is in the RL-TCPnet library. The prototype is defined in rtl.h. note The slip_is_up function returns __TRUE if the SLIP link between the modems is up and functional. The function returns __FALSE if the SLIP link is down. slip_close, slip_connect, slip_listen #include <rtl.h> void connect_soc (void) { /* Connect TCP socket when SLIP is up. */ if(slip.
https://www.keil.com/support/man/docs/rlarm/rlarm_slip_is_up.htm
CC-MAIN-2020-34
refinedweb
105
77.43
Feature #12623closed rescue in blocks without begin/end Description Hi there! There's pretty nice feature that we can use "short rescue" in method definitions: def my_method raise '1234' rescue puts 'rescued' end What about using this in blocks? loop do n = enumerator.next # do something rescue StopIteration end P.S. actually I am not sure if this FR was not created earlier but I couldn't google it. P.P.S sorry for my english Updated by Nondv (Dmitry Non) almost 6 years ago Updated by rosenfeld (Rodrigo Rosenfeld Rosas) almost 6 years ago +1, I often want this and never understood why it only worked with methods. Updated by nobu (Nobuyoshi Nakada) almost 6 years ago AFAIK, it has been proposed a few times. An objection is that rescue in {} block feels weird. Updated by Nondv (Dmitry Non) almost 6 years ago An objection is that rescue in {} block feels weird. Do you mean in one-line or multi-line form? Multiline: list.each { |x| # do something rescue # do something } In single-line there's ambiguous case: # not implemented list.each { |x| action_1; action_2; rescue; 'error!' } # this is valid list.each { |x| action_1; action_2 rescue 'error!' } But 2nd line looks bad anyway :( So, what's problem of "feels weird"? IMHO there're not many people that will use it like that (my first example in single-line). Updated by shyouhei (Shyouhei Urabe) almost 6 years ago Dmitriy Non wrote: list.each { |x| # do something rescue # do something } -1. This is odd. I cannot remember any other language syntax that goes likes this. Java, C++, C# and all other language that use {} as block notations share this syntax to write exception handlings: static void Main() { try { // something } catch (Exception e) { // something } finally { // something } } Updated by Nondv (Dmitry Non) almost 6 years ago I cannot remember any other language syntax So, case statement in Ruby is different too. + it is not necessary to use this. BTW AFAIK ruby-style-guide banned multiline {} Updated by duerst (Martin Dürst) almost 6 years ago Nobuyoshi Nakada wrote: An objection is that rescuein {}block feels weird. I feel the same way. I think it feels weird because in Ruby, program structures starting with a keyword ( if/ while/ do/ def/...) can contain keywords ( else, rescue,...) and end with keywords ( end), but symbols ( {}, [],...) and keywords are not mixed. This, combined with the fact that {} is mostly used single-line, may suggest that adding rescue to do blocks might work, but not for {} blocks. Updated by shyouhei (Shyouhei Urabe) almost 6 years ago - Is duplicate of Feature #7882: Allow rescue/else/ensure in do..end added Updated by shyouhei (Shyouhei Urabe) almost 6 years ago - Status changed from Open to Closed Updated by shyouhei (Shyouhei Urabe) over 5 years ago - Has duplicate Feature #12906: do/end blocks work with ensure/rescue/else added Updated by hsbt (Hiroshi SHIBATA) 6 months ago - Project changed from 14 to Ruby master Also available in: Atom PDF
https://bugs.ruby-lang.org/issues/12623
CC-MAIN-2022-27
refinedweb
496
64.61
Hibernate Validator 4: Model Validation Made Easy Join the DZone community and get the full member experience.Join For Free Version 4.0 of Hibernate Validator has been released recently, which is now the reference implementation for JSR 303: Bean Validation. The real benefit to this release is that you can now annotate your domain model with various constraints, rather than needing to write your model validation yourself. For people who want to take a model driven development approach, this is a big time saver. The Hibernate Validator documentation has the perfect image to illustrate this. Rather than having custom validation at each step along the way, the domain model contains all the constraints, and therefore validation rules exist in one single place. Constraints There are a number of build in constraint annotations available such as those you'd expect - @notNull, @notEmpty, @min, and @max. public class Driver extends Person { @Min(value = 18, message = "You have to be 18 to drive a car", groups = DriverChecks.class) public int age There are also some others like @email, which checks if the string is an email format and @future, which validates a date to ensure that it is in the future. A useful list of the built-in constraints is provided here. Naturally, your domain model may have constraints that don't exist in this list - there's instructions on how to create your own constraint annotations here. New In Hibernate Validator Hibernate Validator 4 is based on a new codebase, with tons of useful features. Any of the constraints that you use can be put together to compose new constraints. Violation messages can be attached to your constraints, and you can return more than one of these messages if you wish. Because the framework complies to the Bean Validation JSR, it integrates with Java Persistence API 2 and Java Server Faces 2. As you use other Java libraries that take advantage of JSR 303, that code can also be aware of the constraints that you specify. This framework looks great, and the importance of a common approach to bean validation cannot be understated. A single approach cuts down on the amount of duplicate code - the more frameworks that use this JSR for their validation, the better. Opinions expressed by DZone contributors are their own.
https://dzone.com/articles/hibernate-validator-4-model
CC-MAIN-2021-21
refinedweb
383
60.85
Pick using ABB IRB 4600 I am working on ABB IRB 4600 to pick objects using pick () function in RViz (demo.launch).I am not able to perfrom the pick operation successfully. Please have a look on the code and the error screen shot. Let me know where is the fault (Indeed there will be many ). One more thing, i am confused about pick function. How will i be able to grasp in real robot environment (for example: which will be the signal to the robot controller for actuating the real gripper ?) ..Thanks ! -I am using ROS indigo distribution on Virtual Machine. Terminal window: (more)(more) All is well! Everyone is happy! You can start planning now! [ INFO] [1493193263.978286651]: Loading robot model 'abb_irb4600'... [ INFO] [1493193264.266839015]: Loading robot model 'abb_irb4600'... [ INFO] [1493193264.628610520]: Starting scene monitor [ INFO] [1493193264.635085798]: Listening to '/move_group/monitored_planning_scene' [ INFO] [1493193265.022800136]: Constructing new MoveGroup connection for group 'manipulator' in namespace '' [ INFO] [1493193266.120994565]: TrajectoryExecution will use new action capability. [ INFO] [1493193266.121268847]: Ready to take MoveGroup commands for group manipulator. [ INFO] [1493193266.121472053]: Looking around: no [ INFO] [1493193266.121669253]: Replanning: no [ INFO] [1493193275.811410908]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline. [ INFO] [1493193275.811901432]: Goal constraints are already satisfied. No need to plan or execute any motions [ WARN] [1493193275.814024619]: MessageFilter [target=/base_link ]: Discarding message from [/moveit_py_demo_34759_1493193272475] due to empty frame_id. This message will only print once. [ INFO] [1493193279.035543565]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline. [ INFO] [1493193279.037003666]: Planning attempt 1 of at most 1 [ INFO] [1493193279.042092835]: No optimization objective specified, defaulting to PathLengthOptimizationObjective [ INFO] [1493193279.043057525]: No planner specified. Using default. [ INFO] [1493193279.043481971]: LBKPIECE1: Attempting to use default projection. [ INFO] [1493193279.047161619]: LBKPIECE1: Starting planning with 1 states already in datastructure [ INFO] [1493193279.115706032]: LBKPIECE1: Created 195 (52 start + 143 goal) states in 181 cells (51 start (51 on boundary) + 130 goal (130 on boundary)) [ INFO] [1493193279.116753885]: Solution found in 0.072920 seconds [ INFO] [1493193279.117554352]: SimpleSetup: Path simplification took 0.000535 seconds and changed from 63 to 2 states [ INFO] [1493193279.120179443]: Fake execution of trajectory [ INFO] [1493193286.209656592]: Planning attempt 1 of at most 1 [ INFO] [1493193286.228656373]: Added plan for pipeline 'pick'. Queue is now of size 1 [ INFO] [1493193286.259867489]: Attaching world object 'part' to link 'link_6' [ INFO] [1493193286.260001140]: Attached object 'part' to link 'link_6' [ INFO] [1493193286.263661524]: No optimization objective specified, defaulting to PathLengthOptimizationObjective [ INFO] [1493193286.263960101]: No planner specified. Using default. [ INFO] [1493193286.264152229]: LBKPIECE1: Attempting to use default projection. [ INFO] [1493193286.264411434]: LBKPIECE1: Starting planning with 1 states already in datastructure [ INFO] [1493193286.311554536]: LBKPIECE1: Created 187 (146 start + 41 goal) states in 169 cells (138 start (138 on boundary) + 31 goal (31 on boundary)) [ INFO] [1493193286.314109066]: Solution found in 0.049780 seconds [ INFO] [1493193286.314484815]: SimpleSetup: Path simplification took 0.000222 seconds and changed from 72 to 2 states [ INFO] [1493193286.318493844]: Found successful manipulation plan! [ INFO] [1493193286.319358039 ... Please do not use screenshots to show us part of your terminal window. The terminal window contains only text, which you can copy-paste into your question. Screenshots are not searchable (the text anyway) by search engines, reducing visibility of your question. ok i edit the question Hi, could you share your urdf file or moveit_config file of abb_irb4600 with me? It will really help me and save me a lot of time without building the urdf file, thank you~ There is already a support pkg for the IRB 4600 available here. It only includes a model for the 60/2.05variant at the moment though. Edit: I've removed your email address, as we like to keep discussions and solutions here on ROS Answers. I knew there was already a support pkg for the IRB 4600 in , but the .xacro file cannot be open in moveit setup assistant. And now I need the abb_irb4600_moveit_config pkg, at least the 4600_60_205.urdf file I can use to create a moveit_config pkg by moveit setup I'm not saying you're wrong, but last time I checked, it worked for me. If you can tell us something about the error msg you're seeing, we could potentially help. Please post a new question for this issue btw, don't hijack this thread. OK, I have opened a new issue just now, could you give some suggestions? Andy! Yes I could provide my URDF file for IRB4600 (60 2.05) if you could give your email ID.
https://answers.ros.org/question/260241/pick-using-abb-irb-4600/
CC-MAIN-2021-10
refinedweb
761
69.68
Gatsby just announced the stable release of themes, and along with it released a bevy of themes-related content. This post will go over what a theme is, why they might be useful to you, and how to use your first theme. In later posts I'll dive into topics like component shadowing, and maybe even authoring your own theme. If you'd like to dive right into the deep end Jason Lengstorf released a free egghead course on Gatsby themes that is superb. What are themes? The name theme might invoke the assumption that they only relate to visual content, however Gatsby themes are way more than that. They can include some default configuration, setting up transformers, plugins, and even other child themes. Themes can also include visual styles and components. Themes are configurable, overridable, and best of all, composable. Why are themes useful? If you've used Gatsby in the past, you might have used a starter to bootstrap your website. Starters were a great stepping stone before themes. They allowed you to kick off a Gatsby site that was configured with some additional functionality out of the box, like say supporting Mdx, or maybe using an external service like Shopify. However, if you ran into the case of wanting to quickly start a website that supported both Mdx AND Shopify you had to find a starter with both configured, use one of the starters and figure out how to get the other functionality set up, or configure everything from scratch. Themes change this. Instead of starting with a this or that, we can easily make a this AND that. Remember, themes are configurable, overridable, and composable. Let's get started We're going to start off simple. Let's set up a Gatsby website from scratch, and then use gatsby-theme-blog to quickly bootstrap the basic functionality of a blog. If you want to see the full code check out the Github repo. Set up the directory First we need to make a directory for our Gatsby website, and then we need to initialize it. mkdir first-gatsby-theme cd first-gatsby-theme yarn init -y I'm using yarn, but feel free to use npmif you'd like. Installing Our Dependencies We could use a starter by using the gatsby new <STARTER> command, but let's set one up manually. It's surprisingly easy to do. We only need react, react-dom, and gatsby to get started. So let's install those. After that, let's open up the package.json file in the root directory and add some scripts for convenience. yarn add react react-dom gatsby // package.json { "name": "first-gatsby-theme", "version": "1.0.0", "license": "MIT", "dependencies": { "react": "...", "react-dom": "...", "gatsby": "...", }, "scripts": { "build": "gatsby build", "start": "gatsby develop", "clean": "gatsby clean" } } The ...are just placeholders. Your package.jsonfile will have the specific versions you have installed. Check that Gatsby is working To see all of our hard work paid off, let's make some content and let Gatsby work its magic. We need to make a directory at src/pages. By convention this is where Gatsby will look for content to transform into pages on the website, and handles the routing for us. mkdir -p src/pages touch src/pages/index.js mkdir -p creates all missing directories in the path provided src/pages/index.js will be mapped to the root path "/" of our website. // src/pages/index.js import React from 'react' export default function HomePage() { return ( <> <h1>Welcome</h1> <p>Hello, from Gatsby <span role="img" aria-👋</span></p> </> ) } Now to start up the Gatsby website all you need to do is run. yarn start You should see something that looks like this. Very exciting, I know. Installing the theme Now that we know we have Gatsby working, let's install a theme. Everyone says that they want to have a blog, but getting started is hard. The good news is that themes makes it so easy to get started that you won't have any excuses. yarn add gatsby-theme-blog In the root of your project make a gatsby-config.js file. touch gatsby-config.js And add the following module.exports = { plugins: [ 'gatsby-theme-blog' ] } Before the stable release of themes, your themes used to live under an additional property called __experimentalThemes, but now that they're stable, they're just like plugins! If you tried to start your Gatsby website up at the moment you'd get some errors :(. Let's figure out why in the next two sections. Exploring the theme options Right now there isn't a Github repo for gatsby-theme-blog, but if you look at the npm page you can see a section called Usage. Most Gatsby plugins and themes will have options that you can set. For gatsby-theme-blog there are four options and defaults for each of them, meaning we can not pass any options in and the theme will still work. That being said, it has some expectations. Right now gatsby-theme-blog expects some blog posts in the form of either Markdown or MDX in the content/posts directory, and an image with the title of avatar in the content/assets directory. The errors you get from not having either of these are kind of cryptic which is a bit of a bummer. For now we are going to leave the options set to the defaults. If you wanted to override any you would change your gatsby-config.js. // gatsby-config.js module.exports = { plugins: [ { resolve: 'gatsby-theme-blog', options: { contentPath: 'content/posts', // the file path to your blog posts basePath: '/', // the url for the root of your blog assetPath: 'content/assets', // the file path to your assets folder mdx: true, // whether or not to configure mdx for you } } ] } These are the default values, but to change any of them, set the value you would like in the options object. Add Content So now that we know why our Gatsby website is failing after adding this theme, let's use the default options as a guide for what we need to do to get our website working again. First we need to make the necessary folders. In the root of the project we're going to create content, content/posts, and content/assets directories. mkdir -p content/{posts,assets} the {} here is called brace expansion and is equivalent to running mkdir -p content/postsand mkdir -p content/assets, just in a shorter way. Now that we have our folders in place we need to make a blog post, and add an avatar. Make a file called hello-world.md, inside of your content/posts directory and add whatever content you'd like. --- title: "Hello, World" --- The worlds greatest blog post! Next, save a picture of yourself named avatar in content/assets. The third thing we need to do is temporarily remove our src/pages/index.js page, because gatsby-theme-blog defaults to making the root of the blog the "/" root path. mv src/pages/index.js src/pages/_index.js If you run yarn start now, everything should work and you'll see something like this: Site/Author Info The other thing that gatsby-theme-blog does is look in our gatsby-config.js for some site metadata. Pop open your gatsby-config.js one last time and add your information in. module.exports = { siteMetadata: { title: "Awesome Blog", // Enter the title of your blog here author: "Matt Hagner", // Change this to your name description: "A really cool blog", social: [ { name: 'twitter', url: 'twitter.com/_hagnerd', }, { name: 'github', url: 'github.com/hagnerd', }, ] }, plugins: [ 'gatsby-theme-blog', ] } Hopefully that wasn't too painful and helped highlight just how quick it is to install and set up a Gatsby theme. The best part is that you can install more themes, as needed and it won't require you to fundamentally change how your website is structured. Next Up The quick set up for our blog was great, but what if we want to change the styles? Or how some of the default components are rendered? To do that we'll use a feature called shadowing. I'll update with a link to the post when it's finished. Posted on by: Discussion i'm using windows 7, got an error. resolved after changing from: to: Thanks! Updating the post. The leading "/" was added in error. Thanks for writing! I've had Gatsby themes on my radar for quite some time but hadn't had the time to read what they were exactly. Thanks to you now I know. 😁👍 That's great! I've been long searching a nice intro to Gatsby themes. Thank you 😁 Great article, would love to see a follow up about the composition feature
https://dev.to/hagnerd/using-your-first-gatsby-theme-hep
CC-MAIN-2020-40
refinedweb
1,471
73.58
# XXX RULES FOR PATCHING THIS FILE XXX # Patches that fix typos or formatting are acceptable. Patches # that change semantics are not acceptable without prior approval # by David Golden or Ricardo Signes. use 5.006; use strict; use warnings; package CPAN::Meta::Spec; our $VERSION = '2.150010'; 1; # ABSTRACT: specification for CPAN distribution metadata # vi:tw=72 __END__ =pod =encoding UTF-8 =head1 NAME CPAN::Meta::Spec - specification for CPAN distribution metadata =head1 VERSION version 2.150010 =head1 SYNOPSIS', }; =head1 DESCRIPTION This document describes version 2 of the CPAN distribution metadata specification, also known as the "CPAN Meta Spec". Revisions of this specification for typo corrections and prose clarifications may be issued as CPAN::Meta::Spec 2.I. =head1 TERMINOLOGY =over 4 =item distribution This is the primary object described by the metadata. In the context of this document it usually refers to a collection of modules, scripts, and/or documents that are distributed together for other developers to use. Examples of distributions are C<Class-Container>, C<libwww-perl>, or C<DBI>. =item module This refers to a reusable library of code contained in a single file. Modules usually contain one or more packages and are often referred to by the name of a primary package that can be mapped to the file name. For example, one might refer to C<File::Spec> instead of F<File/Spec.pm> =item package This refers to a namespace declared with the Perl C<package> statement. In Perl, packages often have a version number property given by the C<$VERSION> variable in the namespace. =item consumer This refers to code that reads a metadata file, deserializes it into a data structure in memory, or interprets a data structure of metadata elements. =item producer This refers to code that constructs a metadata data structure, serializes into a bytestream and/or writes it to disk. =item must, should, may, etc. These terms are interpreted as described in IETF RFC 2119. =back =head1 DATA TYPES Fields in the L</STRUCTURE> section describe data elements, each of which has an associated data type as described herein. There are four primitive types: Boolean, String, List and Map. Other types are subtypes of primitives and define compound data structures or define constraints on the values of a data element. =head2 Boolean A I<Boolean> is used to provide a true or false value. It B<must> be represented as a defined value that is either "1" or "0" or stringifies to those values. =head2 String A I<String> is data element containing a non-zero length sequence of Unicode characters, such as an ordinary Perl scalar that is not a reference. =head2 List A I<List> is an ordered collection of zero or more data elements. Elements of a List may be of mixed types. Producers B<must> represent List elements using a data structure which unambiguously indicates that multiple values are possible, such as a reference to a Perl array (an "arrayref"). Consumers expecting a List B<must> consider a String as equivalent to a List of length 1. =head2 Map A I<Map> is an unordered collection of zero or more data elements ("values"), indexed by associated String elements ("keys"). The Map's value elements may be of mixed types. =head2 License String A I<License String> is a subtype of String with a restricted set of values. Valid values are described in detail in the description of the L</license> field. =head2 URL I<URL> is a subtype of String containing a Uniform Resource Locator or Identifier. [ This type is called URL and not URI for historical reasons. ] =head2 Version A I<Version> is a subtype of String containing a value that describes the version number of packages or distributions. Restrictions on format are described in detail in the L</Version Formats> section. =head2 Version Range The I<Version Range> type is a subtype of String. It describes a range of Versions that may be present or installed to fulfill prerequisites. It is specified in detail in the L</Version Ranges> section. =head1 STRUCTURE The metadata structure is a data element of type Map. This section describes valid keys within the Map. Any keys not described in this specification document (whether top-level or within compound data structures described herein) are considered I<custom keys> and B<must> begin with an "x" or "X" and be followed by an underscore; i.e. they must match the pattern: C<< I<required> or I<optional> and the data type of the corresponding data element. These items are in parentheses, brackets and braces, respectively. If a data type is a Map or Map subtype, valid subkeys will be described as well. Some fields are marked I<Deprecated>. These are shown for historical context and must not be produced in or consumed from any metadata structure of version 2 or higher. =head2 REQUIRED FIELDS =head3 abstract Example: abstract => 'Build and install Perl modules' (Spec 1.2) [required] {String} This is a short description of the purpose of the distribution. =head3 author L</resources> field, such as. =head3 dynamic_config Example: dynamic_config => 1 (Spec 2) [required] {Boolean} A boolean flag indicating whether a F<Build.PL> or. Note: when this field is true, post-configuration prerequisites are not guaranteed to bear any relation whatsoever to those stated in the metadata, and relying on them doing so is an error. See also L</Prerequisites for dynamically configured distributions> in the implementors' notes. This field explicitly B or not prerequisites are exactly as given in the metadata. =head3 generated_by. =head3 license Example: license => [ 'perl_5' ] license => [ 'apache_2_0', . =head3 meta-spec C<version> is required. =over =item version This subkey gives the integer I<Version> of the CPAN Meta Spec against which the document was generated. =item url This is a I<URL> of the metadata specification document corresponding to the given version. This is strictly for human-consumption and should not impact the interpretation of the document. For the version 2 spec, either of these are recommended: =over 4 =item * C<> =item * C<> =back =back =head3 name Example: name => 'Module-Build' (Spec 1.0) [required] {String} This field is the name of the distribution. This is often created by taking the "main package" in the distribution and changing C<::> to C<->, but the name may be completely unrelated to the packages within the distribution. For example, L<LWP::UserAgent> is distributed as part of the distribution name "libwww-perl". =head3 release_status Example: release_status => 'stable' (Spec 2) [required] {String} This field provides the release status of this distribution. If the C<version> field contains an underscore character, then C<release_status> B<must not> be "stable." The C<release_status> field B<must> have one of the following values: =over =item stable This indicates an ordinary, "final" release that should be indexed by PAUSE or other indexers. =item testing. =item unstable This indicates an "alpha" release that is under active development, but has been released for early feedback or testing and may be missing features or may have serious bugs. The distribution should not be installed over a stable release without an explicit request or other confirmation from a user. =back Consumers B<may> use this field to determine how to index the distribution for CPAN or other repositories in addition to or in replacement of heuristics based on version number or file name. =head3 version Example: version => '0.36' (Spec 1.0) [required] {Version} This field gives the version of the distribution to which the metadata structure refers. =head2 OPTIONAL FIELDS =head3 description Example: description => "Module::Build is a system for " . "building, testing, and installing Perl modules. " . "It is meant to ... blah blah blah ...", (Spec 2) [optional] {String} A longer, more complete description of the purpose or intended use of the distribution than the one provided by the C<abstract> key. =head3 keywords Example: keywords => [ qw/ toolchain cpan dual-life / ] (Spec 1.1) [optional] {List of zero or more Strings} A List of keywords that describe this distribution. Keywords B<must not> include whitespace. =head3 no_index. Note that this is a list of exclusions, and the spec does not define what to I<include> - see L</Indexing distributions a la PAUSE> in the implementors notes for more information. Valid subkeys are as follows: =over =item file A I<List> of relative paths to files. Paths B<must be> specified with unix conventions. =item directory A I<List> of relative paths to directories. Paths B<must be> specified with unix conventions. [ Note: previous editions of the spec had C<dir> instead of C<directory> ] =item package A I<List> of package names. =item namespace A I<List> of package namespaces, where anything below the namespace must be ignored, but I<not> the namespace itself. In the example above for C<no_index>, C<My::Module::Sample::Foo> would be ignored, but C<My::Module::Sample> would not. =back =head3 optional_features Example: optional_features => { sqlite => { description => 'Provides SQLite support', prereqs => { runtime => { requires => { 'DBD::SQLite' => '1.25' } } } } } (Spec 2) [optional] {Map} This Map describes optional features with incremental prerequisites. Each key of the C<optional_features> Map is a String used to identify the feature and each value is a Map with additional information about the feature. Valid subkeys include: =over =item description This is a String describing the feature. Every optional feature should provide a description =item prereqs This entry is required and has the same structure as that of the C<L</prereqs>> key. It provides a list of package requirements that must be satisfied for the feature to be supported or enabled. There is one crucial restriction: the prereqs of an optional feature B<must not> include C<configure> phase prereqs. =back Consumers B C<prereqs> key using the same semantics. See L</Merging and Resolving Prerequisites> for details on merging prerequisites. I<Suggestion for disuse:> Because there is currently no way for a distribution to specify a dependency on an optional feature of another dependency, the use of C<optional_feature> is discouraged. Instead, create a separate, installable distribution that ensures the desired feature is available. For example, if C<Foo::Bar> has a C<Baz> feature, release a separate C<Foo-Bar-Baz> distribution that satisfies requirements for the feature. =head3 prereqs C<configure>, C<build>, C<test> or C<runtime>. Values are Maps in which the keys name the type of prerequisite relationship such as C<requires>, C<recommends>, or C<suggests> and the value provides a set of prerequisite relations. The set of relations B<must> be specified as a Map of package names to version ranges. The full definition for this field is given in the L</Prereq Spec> section. =head3 provides, metacpan.org and search.cpan.org to build indexes saying in which distribution various packages can be found. The keys of C<provides> are package names that can be found within the distribution. If a package name key is provided, it must have a Map with the following valid subkeys: =over =item file This field is required. It must contain a Unix-style relative file path from the root of the distribution directory to a file that contains or generates the package. It may be given as C<META.yml> or C<META.json> to claim a package for indexing without needing a C<*.pm>. =item version If it exists, this field must contains a I<Version> String for the package. If the package does not have a C<$VERSION>, this field must be omitted. =back =head3 resources Example: resources => { license => [ '' ], homepage => '', bugtracker => { web => '', mailto => 'meta-bugs@example.com', }, repository => { url => 'git://github.com/dagolden/cpan-meta.git', web => '', type => 'git', }, x_twitter => '', } (Spec 2) [optional] {Map} This field describes resources related to this distribution. Valid subkeys include: =over =item homepage The official home of this project on the web. =item license A List of I<URL>'s that relate to this distribution's license. As with the top-level C<license> field, distribution documentation should be consulted to clarify the interpretation of multiple licenses provided here. =item bugtracker This entry describes the bug tracking system for this distribution. It is a Map with the following valid keys: web - a URL pointing to a web front-end for the bug tracker mailto - an email address to which bugs can be sent =item repository C<> is ambiguous as to type, producers should provide a C<type> whenever a C<url> key is given. The C<type> field should be the name of the most common program used to work with the repository, e.g. C<git>, C<svn>, C<cvs>, C<darcs>, C<bzr> or C<hg>. =back =head2 DEPRECATED FIELDS =head3 build_requires I<(Deprecated in Spec 2)> [optional] {String} Replaced by C<prereqs> =head3 configure_requires I<(Deprecated in Spec 2)> [optional] {String} Replaced by C<prereqs> =head3 conflicts I<(Deprecated in Spec 2)> [optional] {String} Replaced by C<prereqs> =head3 distribution_type I<(Deprecated in Spec 2)> [optional] {String} This field indicated 'module' or 'script' but was considered meaningless, since many distributions are hybrids of several kinds of things. =head3 license_uri I<(Deprecated in Spec 1.2)> [optional] {URL} Replaced by C<license> in C<resources> =head3 private I<(Deprecated in Spec 1.2)> [optional] {Map} This field has been renamed to L</"no_index">. =head3 recommends I<(Deprecated in Spec 2)> [optional] {String} Replaced by C<prereqs> =head3 requires I<(Deprecated in Spec 2)> [optional] {String} Replaced by C<prereqs> =head1 VERSION NUMBERS =head2 Version Formats This section defines the Version type, used by several fields in the CPAN Meta Spec. Version numbers must be treated as strings, not numbers. For example, C<1.200> B<must not> be serialized as C<1.2>. Version comparison should be delegated to the Perl L<version> module, version 0.80 or newer. Unless otherwise specified, version numbers B<must> appear in one of two formats: =over =item Decimal versions Decimal versions are regular "decimal numbers", with some limitations. They B<must> be non-negative and B<must> begin and end with a digit. A single underscore B<may> be included, but B<must> be between two digits. They B<must not> use exponential notation ("1.23e-2"). version => '1.234' # OK version => '1.23_04' # OK version => '1.23_04_05' # Illegal version => '1.' # Illegal version => '.1' # Illegal =item Dotted-integer versions B<should> be restricted to the range 0 to 999. The final component B =back =head2 Version Ranges Some fields (prereq, optional_features) indicate the particular version(s) of some other module that may be required as a prerequisite. This section details the Version Range type used to provide this information. The simplest format for a Version Range is just the version number itself, e.g. C<2.4>. This means that B<at least> version 2.4 must be present. To indicate that B<any> version of a prerequisite is okay, even if the prerequisite doesn't define a version at all, use the version C<0>. Alternatively, a version range B<may> use the operators E<lt> (less than), E<lt>= (less than or equal), E<gt> (greater than), E<gt>= (greater than or equal), == (equal), and != (not equal). For example, the specification C<E<lt> 2.0> means that any version of the prerequisite less than 2.0 is suitable. For more complicated situations, version specifications B<may> be AND-ed together using commas. The specification C<E<gt>= 1.2, != 1.5, E<lt> 2.0> indicates a version that must be B<at least> 1.2, B<less than> 2.0, and B<not equal to> 1.5. =head1 PREREQUISITES =head2 Prereq Spec The C<prereqs> key in the top-level metadata and within C<optional_features> define the relationship between a distribution and other packages. The prereq spec structure is a hierarchical data structure which divides prerequisites into I<Phases> of activity in the installation process and I<Relationships> that indicate how prerequisites should be resolved. For example, to specify that C<Data::Dumper> is C<required> during the C<test> phase, this entry would appear in the distribution metadata: prereqs => { test => { requires => { 'Data::Dumper' => '2.00' } } } =head3 Phases Requirements for regular use must be listed in the C<runtime> phase. Other requirements should be listed in the earliest stage in which they are required and consumers must accumulate and satisfy requirements across phases before executing the activity. For example, C<build> requirements must also be available during the C<test> phase. before action requirements that must be met ---------------- -------------------------------- perl Build.PL configure perl Makefile.PL make configure, runtime, build Build make test configure, runtime, build, test Build test Consumers that install the distribution must ensure that I<runtime> requirements are also installed and may install dependencies from other phases. after action requirements that must be met ---------------- -------------------------------- make install runtime Build install =over =item configure The configure phase occurs before any dynamic configuration has been attempted. Libraries required by the configure phase B<must> be available for use before the distribution building tool has been executed. =item build The build phase is when the distribution's source code is compiled (if necessary) and otherwise made ready for installation. =item test The test phase is when the distribution's automated test suite is run. Any library that is needed only for testing and not for subsequent use should be listed here. =item runtime The runtime phase refers not only to when the distribution's contents are installed, but also to its continued use. Any library that is a prerequisite for regular use of this distribution should be indicated here. =item develop. =back =head3 Relationships =over =item requires These dependencies B<must> be installed for proper completion of the phase. =item recommends Recommended dependencies are I<strongly> encouraged and should be satisfied except in resource constrained environments. =item suggests These dependencies are optional, but are suggested for enhanced operation of the described distribution. =item conflicts These libraries cannot be installed when the phase is in operation. This is a very rare situation, and the C<conflicts> relationship should be used with great caution, or not at all. =back =head2 Merging and Resolving Prerequisites Whenever metadata consumers merge prerequisites, either from different phases or from C<optional_features>, they should merged in a way which preserves the intended semantics of the prerequisite structure. Generally, this means concatenating the version specifications using commas, as described in the be B<should> test whether prerequisites would result in installed module files being "downgraded" to an older version and B<may> warn users or ignore the prerequisite that would cause such a result. =head1 SERIALIZATION Distribution metadata should be serialized (as a hashref) as JSON-encoded data and packaged with distributions as the file F<META.json>. In the past, the distribution metadata structure had been packed with distributions as F<META.yml>, a file in the YAML Tiny format (for which, see L<YAML::Tiny>). Tools that consume distribution metadata from disk should be capable of loading F<META.yml>, but should prefer F<META.json> if both are found. =head1 NOTES FOR IMPLEMENTORS =head2 Extracting Version Numbers from Perl Modules To get the version number from a Perl module, consumers should use the C<< MM->parse_version($file) >> method provided by L<ExtUtils::MakeMaker> or L<Module::Metadata>. For example, for the module given by C<$mod>, the version may be retrieved in one of the following ways: # via ExtUtils::MakeMaker my $file = MM->_installed_file_for_module($mod); my $version = MM->parse_version($file) The private C<_installed_file_for_module> method may be replaced with other methods for locating a module in C<@INC>. # via Module::Metadata my $info = Module::Metadata->new_from_module($mod); my $version = $info->version; If only a filename is available, the following approach may be used: # via Module::Build my $info = Module::Metadata->new_from_file($file); my $version = $info->version; =head2 Comparing Version Numbers The L<version> module provides the most reliable way to compare version numbers in all the various ways they might be provided or might exist within modules. Given two strings containing version numbers, C<$v1> and C<$v2>, they should be converted to C<eval> and the C<use> function. For example, for module C<$mod> and version prerequisite C<$prereq>: if ( eval "use $mod $prereq (); 1" ) { print "Module $mod version is OK.\n"; } If the values of C<$mod> and C<$prereq> have not been scrubbed, however, this presents security implications. =head2 Prerequisites for dynamically configured distributions When C<dynamic_config> is true, it is an error to presume that the prerequisites given in distribution metadata will have any relationship whatsoever to the actual prerequisites of the distribution. In practice, however, one can generally expect such prerequisites to be one of two things: =over 4 =item * The minimum prerequisites for the distribution, to which dynamic configuration will only add items =item * Whatever the distribution configured with on the releaser's machine at release time =back The second case often turns out to have identical results to the first case, albeit only by accident. As such, consumers may use this data for informational analysis, but presenting it to the user as canonical or relying on it as such is invariably the height of folly. =head2 Indexing distributions a la PAUSE C<inc>, C<xt>, or C<t> directories, or common 'mistake' directories such as C<perl5>. Or: If you're trying to be PAUSE-like, make sure you skip C<inc>, C<xt> and C<t> as well as anything marked as no_index. Also remember: If the META file contains a provides field, you shouldn't be indexing anything in the first place - just use that. =head1 SEE ALSO =over 4 =item * CPAN, L<> =item * JSON, L<> =item * YAML, L<> =item * L<CPAN> =item * L<CPANPLUS> =item * L<ExtUtils::MakeMaker> =item * L<Module::Build> =item * L<Module::Install> =item * L<CPAN::Meta::History::Meta_1_4> =back =head1 HISTORY. =head1 AUTHORS =over 4 =item * David Golden <dagolden@cpan.org> =item * Ricardo Signes <rjbs@cpan.org> =item * Adam Kennedy <adamk@cpan.org> =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by David Golden, Ricardo Signes, Adam Kennedy and Contributors. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut
https://metacpan.org/release/CPAN-Meta/source/lib/CPAN/Meta/Spec.pm
CC-MAIN-2019-43
refinedweb
3,702
54.93
PROBLEM LINK: Author: Vikas Yadav Tester: Keshav Kumar Editorialist: Vikas Yadav DIFFICULTY: EASY PREREQUISITES: PROBLEM: Find the number of ways of arranging the letters of given string such that all the vowels always come together. QUICK EXPLANATION: Count the number of Vowels and Consonants in the given string. If there is no vowel in the string then only calculate the factorial of number of consonants. Otherwise multiply the factorial of number of vowels and factorial of (number of consonants + 1). EXPLANATION: Let say length of the string is N. and there are C consonants & V vowels in the string. When the vowels are always together, they can be supposed to form 1 letter. Then, we have to arrange the consonants letters. Now because we have supposed that all vowels form 1 letter and there are C consonants totally they form (C+1)! different strings now vowels can be arrange among themselves in V! ways. So there will be (C+1)!*V! ways. Example: Let’s assume string is LEADING. It has 7 different letters. When the vowels E A I are always together, they can be supposed as one letter. Then, we have to arrange the letters L N D G (EAI). Now, (4 + 1) = 5 letters can be arranged in 5! = 120 ways. The vowels (EAI) can be arranged among themselves in 3! = 6 ways. Required number of ways: (120 * 6) = 720 For more details check Setter’s Solution. SOLUTIONS: Setter's Solution #include <stdio.h> //Custom function which counts number of vowels in a given string int isVowel(char ch) { char vowels[5] = "AEIOU"; for(int i = 0; i < 5; i++) { if(ch == vowels[i]) return 1; } return 0; } //Factorial function unsigned long long factorial(int n) { if(n == 0 || n == 1) return 1; else return n * factorial(n-1); } int main(void) { int test; scanf("%d", &test); while(test--) { int size, vowel_count = 0, consonant_count, i; scanf("%d", &size); char str[size+1]; scanf("%s", str); for(i = 0; i < size; i++) if(isVowel(str[i])) vowel_count++; consonant_count = size - vowel_count; unsigned long long total_ways; if(vowel_count) total_ways = factorial(vowel_count) * factorial(consonant_count + 1); else total_ways = factorial(consonant_count); printf("%llu\n", total_ways); } return 0; }
https://discuss.codechef.com/t/cmeet-editorial/74206
CC-MAIN-2020-40
refinedweb
364
54.63
#include <trace.h> int posix_trace_eventset_add(trace_event_id_t event_id, trace_event_set_t *set); int posix_trace_eventset_del(trace_event_id_t event_id, trace_event_set_t *set); int posix_trace_eventset_empty(trace_event_set_t *set); int posix_trace_eventset_fill(trace_event_set_t *set, int what); int posix_trace_eventset_ismember(trace_event_id_t event_id, const trace_event_set_t *restrict set, int *restrict ismember); These primitives manipulate sets of trace event types. They operate on data objects addressable by the application, not on the current trace event filter of any trace stream. The posix_trace_eventset_add() and posix_trace_eventset_del() functions, respectively, shall add or delete the individual trace event type specified by the value of the argument event_id to or from the trace event type set pointed to by the argument set. Adding a trace event type already in the set or deleting a trace event type not in the set shall not be considered an error. The posix_trace_eventset_empty() function shall initialize the trace event type set pointed to by the set argument such that all trace event types defined, both system and user, shall be excluded from the set. The posix_trace_eventset_fill() function shall initialize the trace event type set pointed to by the argument set, such that the set of trace event types defined by the argument what shall be included in the set. The value of the argument what shall consist of one of the following values, as defined in the <trace.h> header: All the process-independent implementation-defined system trace event types are included in the set. All the implementation-defined system trace event types are included in the set, as are those defined in IEEE Std 1003.1-2001. member of the set pointed to by the argument set. The value returned in the object pointed to by ismember argument is zero if the trace event type identifier is not a member of the set and a value different from zero if it is a member of the set. Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding error number. These functions may fail if: The following sections are informative. None. None. None. None. posix_trace_set_filter() , posix_trace_trid_eventid_open() , the Base Definitions volume of IEEE Std 1003.1-2001, <trace.h>
http://www.makelinux.net/man/3posix/P/posix_trace_eventset_del
CC-MAIN-2014-35
refinedweb
350
57.3
If you need to run more than one pipeline in the same process, Logstash provides a way to do this through a configuration file called pipelines.yml. This file must be placed in the path.settings folder and follows this structure: - pipeline.id: my-pipeline_1 path.config: "/etc/path/to/p1.config" pipeline.workers: 3 - pipeline.id: my-other-pipeline path.config: "/etc/different/path/p2.cfg" queue.type: persisted This file is formatted in YAML and contains a list of dictionaries, where each dictionary describes a pipeline, and each key/value pair specifies a setting for that pipeline. The example shows two different pipelines described by their IDs and configuration paths. For the first pipeline, the value of pipeline.workers is set to 3, while in the other, the persistent queue feature is enabled. The value of a setting that is not explicitly set in the pipelines.yml file will fall back to the default specified in the logstash.yml settings file. When you start Logstash without arguments, it will read the pipelines.yml file and instantiate all pipelines specified in the file. On the other hand, when you use -e or -f, Logstash ignores the pipelines.yml file and logs a warning about it. Using multiple pipelines is especially useful if your current configuration has event flows that don’t share the same inputs/filters and outputs and are being separated from each other using tags and conditionals. Having multiple pipelines in a single instance also allows these event flows to have different performance and durability parameters (for example, different settings for pipeline workers and persistent queues). This separation means that a blocked output in one pipeline won’t exert backpressure in the other. That said, it’s important to take into account resource competition between the pipelines, given that the default values are tuned for a single pipeline. So, for example, consider reducing the number of pipeline workers used by each pipeline, because each pipeline will use 1 worker per CPU core by default. Persistent queues and dead letter queues are isolated per pipeline, with their locations namespaced by the pipeline.id value.
https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html
CC-MAIN-2021-43
refinedweb
356
57.06
in reply to Can I please have *simple* modules? That's not really the issue here though. In this case, the issue is that the module which does what you want (Class::Accessor) requires you to inherit from it, and you don't want to. I have a lot of sympathy for not wanting your namespace polluted. I hate it when people put things in UNIVERSAL:: and I try to be very careful about namespace stuff. However, if I avoided every module I didn't like the interface of, I would be rewriting a ton of code. Just to name a few, Regexp::Common, CGI, Getopt::Long, Apache::Session and Data::FormValidator all have pretty annoying APIs. (I don't like the much-replicated HTML::Template interface either. Sorry Sam.) I hold my nose and use these modules because they work, get my job done, and save me tons of time. In your case, writing something to make accessors is so trivial that I suppose you aren't saving that much time, so it could go either way. I don't personally see the interface problems as very serious though. Regarding your troubles with Bricolage installation, I still think the smartest way to distribute an application that relies on CPAN modules is to bundle them with it, along with a build script that installs them into a local directory. This has worked really well for Krang, and the company I work for has adopted this approach for all of our software. It avoids module versioning issues and allows you to patch a broken module locally if you have to. There is no need to run the test scripts for every single module when you build them -- just run the tests for Bricolage. If they are not good enough to tell whether you have a working Bricolage system by themselves, improve them.. :) FYI: Class::Accessor also assumes I'm using blessed hashes. I just discovered that. So we have yet another module which doesn't do what I need (I wonder how many folks want accessor generation only to find out they must use a blessed hash with canned modules?) Cheers, Ovid New address of my CGI Course. Yes, I watch meteor showers No, I do not watch meteor showers My meteors prefer to bathe Results (151 votes). Check out past polls.
http://www.perlmonks.org/?node_id=511142
CC-MAIN-2017-04
refinedweb
391
71.14
Step 1: Prepare product images. Step 2: Give the correct names to the product images. Step 3: Put the images to the Web server in the correct directory. Step 4: Link the images to the products by running the Product image import task. Step 5: Check that the product images are shown in the webstore. To prepare product images and link them to your products catalog: Step 1: Prepare product images which will be used in your products catalog. You should create one image for each product and product variant. All images should have a size not less than: width - 1024 px and height - 1024 px. Step 2: Give the correct names to the images. The image name format should be exactly as described below: [Item No] [Separator] [Variant Code] [Separator] [Order number].[Extension] Step 3: When the images (not less than 1024 x 1024) Product image import task to resize the images and link them to the products. In Sana Admin click: Tools > Scheduled tasks and run the Product image import task. When the Product image import task is finished you should see the product images in your webstore. For more information, see 'Product Image Import'. Step 5: Open the webstore and check that the product images are shown. The product images should be also shown on the product pages in Sana Admin. Now the product images are linked to the products catalog and should be available in your webshop. Product images can be also added directly, in the Sana Commerce frontend directory (/content/files/images/ProductImages/), where you put the product images, three more folders are automatically created: 'Small', 'Medium' and 'Large'. The Product image import task automatically resizes all your product images from the 'PruductImages' folder and put them according to the size to the 'Small', 'Medium' and 'Large' folders. This is done because product images of three different sizes are used in the Sana Commerce webstore: The product images are automatically resized to the sizes which do not exceed: Therefore, when you prepare the product images you should create only one image of a large size (can be any size not less than 1024 x 1024) for every single product and product variant and Product image import webstore/ large or any new), width and height of the images: <size name="name" width="" height="">
https://help.sana-commerce.com/sana-commerce-90/user_guide/setup/product-images
CC-MAIN-2020-40
refinedweb
387
60.55
Writing XML documents with XmlWriter, by Atsushi Enomoto XmlTextWriter API is used to write XML document to TextWriter, Stream or text file. There is an abstract XmlWriter class, but possibly you won't ave to make any difference between XmlTextWriter and XmlWriter. There is no other XmlWriter class in System.Xml namespace. If you are interested in another implementation, we have XmlNodeWriter in monodoc module. XmlWriter is used widely in several XML classes. Writer Methods Unlike XmlReader, you will use only writer methods. Writing Elements WriteStartElement() writes element start tag. After calling it, write contents subsequently. Finally WriteEndElement() call is required; it writes element end tag. If you simply want to write only start tag, single content string and end tag, you can use WriteElementString(). When the element is empty, WriteEndElement() writes self-closing empty tag such like <empty />. If you want to write full end tag, you can use WriteFullEndElement() and it writes <empty></empty>. Writing Attributes If you want to write attributes inside the start tag, you can use WriteAttributeString() or WriteStartAttribute() after WriteStartElement(). When you called WriteStartAttribute(), write contents, and call WriteEndAttribute() to close attribute. Otherwise, you cannot write any content string anymore. The writer regards those method arguments as attribute value. Writing Content Strings WriteString() writes content string. If you want to write CDATA section, you can use WriteCData() instead. But note that WriteCData() throws an error when the argument string contains "\]\]\>", while WriteString() always escapes it. If you want to write an entity reference inside string, you can use WriteEntityRef(). There are some useful methods: - WriteName() writes name string. It raises an error if the argument is not a valid name. WriteNmToken() is similar (checks if the argument is a valid NMTOKEN). - WriteChars() writes character array to the output. Usually you can do it by creating new string instance, but if you don't lose any performance for creating extraneous objects, it is convenient. - WriteQualifiedName() receives an XmlQualifiedName object and writes prefixed name to the output, where the prefix is mapped to the namespace which the argument indicates. (How are namespaces mapped to prefixes? It is done when you called WriteStartElement() or WriteStartAttribute() with certain prefix and namespace URI, or when used WriteStartAttribute() to write xmlns attributes.) Writing Nodes Directly If you want to save node to XmlWriter, there are some ways to do: - As for XmlNode instances, you can use WriteTo() method of the target node object, which takes an XmlWriter attribute. - As for XmlReader instances, you can use WriteNode() method of the XmlWriter. You can also take this way for XmlNodes, by creating XmlNodeReader. (As for XPathNavigator, there is no standard way, but you can try my XPathDocumentNavigator . Note that it is an experimental implementation and not ready to stable use. Don't Forget to Close When you finished all writing jobs, maybe you have to call Close() to close the text writer. XmlWriter Tips Firstly, is should be warned that since there is no other public implementation than XmlTextWriter, we cannot distinguish if the behavior is XmlTextWriter specific, or common to XmlWriter interface (for example, what if we call WriteStartAttribute() with the same names? XmlTextWriter simply emits not well-formed XML). Indentation To specify indentation, you can set three properties: - Formatting property is an enumeration that specifies if the writer should indent or not. By default it never does indentation, so set Formatting = Formatting.Indented if you want to do. - IndentChar property is used to get or set the character which is used to indent. - Indentation property is used to get or set the amount of the indentation characters per one level depth. Namespace Handling Since some WriteStartElement() and WriteStartAttribute() overrides accept namespace URI, it stores in-scope namespaces internally (you can use LookupPrefix() to check if a namespace is bound to any prefixes). When WriteStartElement() is called with namespace URI, this XmlTextWriter stores the URI as in-effect namespace URI. However, when you call WriteStartAttribute() (or WriteAttributeString() as well) with the same prefix and different namespace, it causes inconsistent result. The writer emits the attribute's namespace URI, while it internally treats the element's namespace as in-effect (so it will result in inconsistent namespace output for the element's contents, and inconsistent return value for LookupPrefix() ). It should be strongly avoided. To make it worse, when you use these WriteStartElement() method with null namespace (or omitting namespace URI argument), it does not mean that the element belongs to the default namespace. When you use WriteStartElement() with String.Empty namespace, it does mean that the element belongs to the default namespace. This fact brings the result that WriteStartElement() with String.Empty also emits xmlns="" (default namespace removal), white WriteStartElement() with null never emits that. Finally, you can write the element's namespace attribute at your favorite timing. When the same name attribute is already written, xmlns will be never written. When the writer is going to write the element's content or the end of the element, it writes the missing xmlns attribute (if any). Specifying Arbitrary Encoding Declaration Since WriteStartDocument() only takes boolean "standalone" argument, there is no way to specify the nominal encoding. Encoding declaration is automatically set by the actual Encoding of the input TextReader, or never specified when you use Stream to create the XmlTextWriter instance. For example, you cannot specify arbitrary encoding when you use StringWriter (it returns UnicodeEncoding as its Encoding property) and call WriteStartDocument(). In that case, you can use WriteProcessingInstruction() like this: writer.WriteProcessingInstruction ("xml", "version='1.0' encoding='shift_jis'"); Since the name "xml" is prohibited for XML processing instruction, such method invokation should raise an error, but in fact XmlTextWriter actually passes this. And in fact, such way is used in some places such as WriteNode() (to copy the corresponding XmlDeclaration node) and XSLT outputter (to apply "encoding" attribute in "xsl:output" element). (So this behavior should be documented clearly, otherwise another XmlWriter implementors might implement WriteProcessingInstruction() to reject PI nodes conformantly . Allowing multiple top-level element content XML document entity must have exactly one element. However, sometimes we need to write more than one elements as output. In fact this "document element" check only works when you call WriteStartDocument(). So if you don't want to reject such XML, simply do not call that method. But also wanted to write XML declaration (for example, write exteernal entity)? Then WriteProcessingInstruction() solution also applies here. WriteString() and WriteCData() For text content of an element, I would recommend to use WriteString() rather than WriteCData(), because WriteCData() throws an exception if the argument string contains "]]>", while WriteString() has no "taboo".
http://www.mono-project.com/XML_Writer
CC-MAIN-2014-15
refinedweb
1,096
55.74
I was going to suggest using the the datetime module, but wasn't sure how datetime.datetime() objects could be used without having the date specified. I hadn't thought of using datetime.timedelta() objects all by themselves. Very nice. Thanks, Magnus. Don -----Original Message----- From: Magnus Lycka [mailto:magnus at thinkware.se] Sent: Tuesday, June 22, 2004 6:04 PM To: Don Arnold; 'kevin parks'; tutor at python.org Subject: Re: RE: [Tutor] time calc Don Arnold wrote: > Anyone know if there is a module that does time math Certainly. Just read the standard library reference! The module is called datetime. *Don't* reinvent this wheel, regardless of what people might suggest! ;) >>> import datetime >>> TD = datetime.timedelta >>> td1 = TD(hours=5,minutes=23) >>> td2 = TD(hours=3,minutes=2) >>> sum = td1+td2 >>> print sum 8:25:00 >>> td3 = TD(hours=23,minutes=2,seconds=13) >>> sum += td3 >>> print sum 1 day, 7:27:13 >>> sum.days 1 >>> sum.seconds 26833 >>> now = datetime.datetime.now() >>> then = now + sum >>> print then 2004-06-24 06:47:42.732000 >>> then.date() datetime.date(2004, 6, 24) >>> then.time() datetime.time(6, 47, 42, 732000) >>> then.year 2004 >>> then.second 42 >>> then.strftime('%Y.%m.%d') '2004.06.24' Note that the time module has a strptime function: >>> import time >>> time.strptime('23:12','%M:%S') (1900, 1, 1, 0, 23, 12, 0, 1, -1) but in general, datetime is much more useful. I guess it would be nice with a datetime.timedelta.strptime function, but I'm afraid we don't have that in the standard library yet. You can use the components you have to turn your "MM:SS" strings into timedeltas though. >>> def minsec(s): return (datetime.datetime(*time.strptime(s,'%M:%S')[:7]) - datetime.datetime(1900,1,1,0)) >>> sum = TD(0) >>> for s in "23:12 5:56 6:34 7:34".split(): sum += minsec(s) >>> print sum 0:43:16 >>> print sum.seconds 2596 (Or was that hours:minutes? Just change '%M:%S' to '%H:%M' and (of course) rename the function as appropriate.) -- Magnus Lycka, Thinkware AB Alvans vag 99, SE-907 50 UMEA, SWEDEN phone: int+46 70 582 80 65, fax: int+46 70 612 80 65 mailto:magnus at thinkware.se
https://mail.python.org/pipermail/tutor/2004-June/030079.html
CC-MAIN-2017-04
refinedweb
378
70.29
So You Want To Be a Hacker? Part IV: Compression Formats Game data archives almost always employ some type of compression for their contents, and sometimes will even mix and match different algorithms for different types of files. Understanding the typical compression formats is therefore crucial to the success of a game hacker. Moreover, you need to be able to recognize the common algorithms just from their compressed data alone, so when you’re staring at hex dumps, you will know how to proceed. In today’s installment, we’ll go through some of the most popular formats, how they work, and how you can recognize them “in the wild”. First of all, note that this task is in theory quite hard. The ideal compression algorithm produces data that is essentially indistinguishable from random noise (which counterintuitively contains the highest density of information). Fortunately, games have two additional requirements: to be able to access data quickly, and to be programmed by normal coders as opposed to Ph.D. computer scientists. Both of these requirements means games typically use either industry-standard formats or relatively simple, quick algorithms that anyone can code from a book. The former often include extra identifying information we can spot, and the latter compress data poorly enough that it looks like “compressed data” instead of looking like random noise. zlib Let’s start with the industry standard, zlib. This is an open-source compression library which implements the classic ‘deflate’ algorithm used in .zip and .gz files. It’s pretty fast and pretty decent, and since it’s already written and completely free, it gets used all over the place, including in game archives. How can you recognize it? 0×78 0×9C. The first two bytes of a standard zlib-compressed chunk of data will be those two bytes, which specify the default settings of the algorithm (’deflate’ with 32KB buffer, default compression level). Alternately, you will often see 0×78 0xDA, which is the same except using the maximum compression level. If you see those two bytes at the start of where you expect a file to be, rejoice, since you’ve just solved a big mystery with next to zero effort. Decoding this format is also pretty easy, since virtually every modern language will have a zlib library for it. In C, you want to just link against libz and call: #include <zlib.h> uncompress(new_buffer, &new_size, comp_buffer, comp_size); Be sure to allocate enough memory for your expanded data: hopefully the archive index will have already provided you with the original file size. The function will return a status code and additionally update new_size with the amount of data that was uncompressed. In Python, dealing with zlib is just embarrassingly easy: new_data = comp_data.decode('zlib') One of the built-in string-encoding methods (like ASCII, UTF8, Shift-JIS, etc.) is just zlib encoding, so if you have your data as a string you can just expand it like that. Alternately you can import zlib and use more direct function calls for extra control. Compressing data is just as easy, with the compress() function in C — or compress2() if you want to specify the compression level — and the encode(’zlib’) string method in Python (or zlib library calls). I don’t want to say much about the inner workings of the deflate algorithm, since that really doesn’t come up very often: you can safely treat it like a black box. However, there is one extra facet I’ve run across: the Adler32 checksum. This is a very simple 32-bit checksum algorithm (like CRC32) which is included in the zlib library, and therefore gets also used by games a bit. Additionally, the zlib format specifies that an Adler checksum is appended to the end of a compressed file for error-checking purposes. However, some games twist their zlib implementation slightly by either leaving off the checksum (in favor of using their own elsewhere in the archive) or moving it into the archive index instead. This will cause the zlib uncompress call to return an error, even though it actually uncompressed the data successfully. So, a word to the wise: if you’re sure that the game is using zlib but you keep getting errors when you try to expand the data, look for this case. You may have to do a little twiddling of the compressed data to add the expected checksum at the end, or just ignore the zlib error codes and continue as normal. Run-length compression This is the simplest kind of home-grown compression you’re likely to run across. It shows up in image compression a lot, sometimes as part of a larger sequence of processing. Basically the idea is to start with a sequence of bytes and chunk them up whenever you run across a repeated value: 31 92 24 24 24 24 24 C5 00 00 = 31 92 5*24 C5 2*00 Exactly how you represent the chunked-up data varies a bit from algorithm to algorithm, depending on what you expect the sequences to look like. Escape byte. You might designate a byte, say 0xFF as a flag for designating a run of repeated bytes, and follow it by a count and a value. So the above data would be: 31 92 FF 05 24 C5 FF 02 00 = 31 92 5*24 C5 2*00 If the flag byte actually appears in your data, you have to unescape it by, say, having a length of 0 in the next byte. Repeated bytes. Here you just start running through your data normally, and whenever you have two bytes in a row that are the same, you replace all the rest of them (the third and thereafter) with a count byte: 31 92 24 24 03 C5 00 00 00 = 31 92 24 24 3*24 C5 00 00 0*00 If you don’t have a third repeated value, you’ll need to waste a byte to give a count of 0. Alternating types. Here you assume that your data alternates between runs of raw values and runs of repeated bytes, and prepend length counts to each type: 02 31 92 05 24 01 C5 02 00 = 2 (31 92), 5*24, 1 (C5), 2*00 Naturally, if you have two repeated runs in a row, you’ll have to waste a byte to insert a 0-length raw sequence between them. A special case of this I’ve run across is when you expect to have long runs of zero in particular instead of any random byte, so you just alternate between runs of zeroes (with just a bare count value) and runs of raw data. Note, of course, that there is some subtlety which can be involved depending on the variant you run across. For instance, it’s often the case that pairs of bytes aren’t efficient to encode, so they’re just treated as raw data. Also, rather than giving lengths themselves, sometimes you encode, say, length-3, if length values of 0, 1, and 2 aren’t ever needed. In some cases you might also run across multi-byte length values (controlled, say, by the high bit in the first length byte). For images, you may have pixels instead of bytes which are the fundamental unit of repetition. In that case, even two RGB pixels in a row which are the same can be successfully compressed. In any event, how do you recognize this format? The general principle is that all of these variations have to fall back on including raw bytes in the file a lot, so you want to try to look for those identifiable sequences (RGB triplets in image formats are good to key off of) interspersed with control codes. It’s often helpful to have an uncompressed version of an image to compare against, which you can recover from a screenshot or from snooping the game’s memory in a debugger (a topic for later articles). LZSS One step up from run-length encoding is to be able to do something useful with whole sequences of data that are repeated instead of single bytes. Here, the algorithm keeps track of the data it’s already seen, and if some chunk is repeated, it just encodes a back-reference to that section of the file instead: I love compression. This is compressed! = I love compression. This [is ][compress]ed! = I love compression. This [3,-3][8,-22]ed! The bracketed sections indicate runs of characters that have been seen before, so you just give a length and a backwards offset for where to copy them from. A lot of compression algorithms, zlib included, are based on this general principle, but one version that seems to crop up a lot is LZSS. The special feature of this format is how it controls switching between raw bytes and back-references. It uses one bit in a control byte to determine this, often a 1 for a raw byte and a 0 for a back-reference sequence. So one control byte will determine the interpretation of the next 8 pieces: I love compression. This [3,-3][8,-22]ed! = FF "I love c" FF "ompressi" FF "on. Thi" 73 "s " 03 03 08 16 "ed!" The 0xFF control bytes just say “8 raw bytes follow”, and the 0×73 byte is binary 01110011: reading from least-significant bit, that’s 2 raw bytes, 2 back-references, and then 3 raw bytes. Recognizing this format in the wild rests on the control bytes, and you can spot it most easily in script files. If you see text which looks liFFke this,FF with reFFadable tFFext plus some junk characters in every 9th byte, you’re dealing with LZSS. You can also spot this in image formats, since the natural rhythm of RGB triplets will get interrupted by the control bytes. Note that the farther in the file you go, the harder this gets to recognize, since the proportion of back-references tends to climb once the algorithm has a larger dictionary of previously-seen data to draw upon. The major hassle with this format is the nature of the back-references. There are a lot of subtle variants of this. One of the most popular ones uses a 4096-byte sliding window, and encodes back-references as a 12-bit offset in the window and a 4-bit length. However, is the length the real length or length-3? Is the offset relative to the current position, or is it an array offset in a separate 4096-byte ring buffer? Is the control byte read most- or least-significant bit first? I’ve even run across an example where there were several different back-reference formats: a 1-byte one for short runs in a small window, a 2-byte one for medium-length runs in a decent window, and a 3-byte one for large runs over a huge window. You will just need to experiment a little bit to see exactly what the particular game is doing, unfortunately. One subtle point is that you may be allowed to specify a back-reference which overlaps with data you haven’t seen yet. By that I mean a length larger than the negative offset involved: This is freeeeeeeaky! = This [is ]fre[eeeeee]aky! = This [3,-3]fre[6,-1]aky! The [6,-1] back-reference works because you are copying the bytes one at a time: first you copy the second ‘e’ from the first, and now you can copy the third ‘e’ from the second, etc. Be aware of this subtlety when you implement your own algorithms, since (a) this can preclude you from doing certain types of memory copying or string slicing, (b) not all games will be able to understand this type of reference, so don’t encode that way unless you know yours can. Huffman encoding From one point of view, this is easier than other algorithms since it only works on single bytes (or symbols, in general) at a time, but it’s also more tricky since the compressed data is a bitstream rather than being easy-to-digest bytes and control codes. It works by figuring out the frequencies of all the bytes in a file, and encoding the more common ones with fewer than 8 bits, and the less common ones with more than 8, so you end up with a smaller file on average. This is very closely related to concepts of entropy, since each symbol generally gets encoded with a number of bits equal to its own entropy (as determined by its frequency). Let’s be specific. Consider the string “abracadabra”. The letter breakdown is: a : 5/11 ~ 1.14 bits b : 2/11 ~ 2.46 bits c : 1/11 ~ 3.46 bits d : 1/11 ~ 3.46 bits r : 2/11 ~ 2.46 bits Where I’ve given the number of bits of entropy each frequency corresponds to (i.e. if you have a 25% chance of having a certain letter, it has a 2-bit entropy since you need to give one of 4 values, say 00, to specify it out of the other 75% of possibilities: 01, 10, 11). Unfortunately we can’t use fractional bits, so we may have to round up or down from these theoretical values. How do we choose the right codes? Well, the best way is to build up a tree, starting from the least-likely values. That is, we treat, say, “c or d” as a single symbol with a frequency of 2/11, and say that if we get that far we know we can just spend one extra bit to figure out whether we mean c or d: a : 5 0=c + 1=d : 2 b : 2 r : 2 Then we continue doing the same thing. At each step we combine the two least-weight items together, adding one bit to the front of their codes as we go. In the case of ties, we pick the ones with shorter already-assigned codes, or alphabetically first values: a : 5 0=b + 1=r : 4 0=c + 1=d : 2 00=b + 01=r + 10=c + 11=d : 6 a : 5 000=b + 001=r + 010=c + 011=d + 1=a : 11 So the codes we end up with are: a : 1 b : 000 c : 010 d : 011 r : 001 You will notice an excellent property of these codes: they are not ambiguous. That is, you don’t have 1 for ‘a’ and 100 for ‘b’… as soon as you hit that first 1, you know you can stop and go on to the next symbol without needing to read any more. Therefore, “abracadabra” just gets encoded as: a b r a c a d a b r a 1 000 001 1 010 1 011 1 000 001 1 = 10000011 01010111 00000110 = 83 57 06 We’ve compressed 88 bits (11 bytes) down to 23 bits (just under 3 bytes). Almost always the bits are packed most- to least-significant in a byte. One subtlety is the exact method of tree creation, which assigns the codes. The method described above is “canonical”, but sometimes games will use their own idiosynchratic methods which you will have to match exactly to avoid getting garbage. How do you recognize this in a data file? Well, the decompressor needs to know the codes, and the easiest way to specify this is to give it the frequencies (or more easily, the bit weights) of the values so it can construct its own tree. Therefore, the compressed data will usually start with, say, a 256-element table of bit weights. So if you see 256 bytes of 05 06 08 07 0C 0B 06 — values that are around 8 plus or minus a few — followed by horrendous random junk, you’re probably looking at Huffman encoding. Sometimes instead of bit weights you’ll have the actual frequency counts instead, which might need to have a multi-byte encoding scheme if they’re above 256. In that case, you’re mainly looking for a few hundred bytes of “stuff” followed by a sharp transition to much more random data. Other algorithms Needless to say, the algorithms covered here are not the full range of compression formats out there. I’ll just briefly mention some others in case you run across them, though I haven’t really seen them in the wild. Arithmetic encoding. This is vaguely related to Huffman encoding, in that you are working strictly with single bytes (or symbols) and trying to stuff the most frequent ones into fewer bits. However, instead of being restricted to an integral number of bits for each one, here you are allowed to be fractional on average. This works by breaking up the numerical interval [0,1) into subranges corresponding to each symbol: the more common symbols correspond to larger ranges, in proportion to their frequency. You start with [0,1), and the first byte resticts you to the subrange for that symbol. Then the second byte restricts you to a sub-subrange, the third byte a sub-sub-range, etc. Your final encoded data is any single numerical value inside the tiny range you end up in: just pick the number in that range you can represent in the least number of bits as a binary fractional value. Needless to say there are some good tricks for implementing this without using ludicrously-high-precision math, but I won’t go into that. LZ77 (Lempel-Ziv ’77) This is the core of the zlib deflate algorithm, but you’ll sometimes see variants outside of that standard, so it’s useful to know a little about. It’s basically a combination of standard back-references as in LZSS, plus Huffman encoding. You just treat the back-reference command “copy 8 bytes” as a special symbol, like a byte value of 256+8=264. Then, with this mix of raw data bytes and back-reference symbols, you run it through a Huffman encoding to get the final compressed output. Typically you will do something different with the back-reference offsets: either leave them as raw data, or encode them in their own separate Huffman table. LZW (Lempel-Ziv-Welch) When taught correctly, this is an algorithm with a mind-blowing twist at the end. As it runs through the file, it builds up an incremental dictionary of previously-seen strings and outputs codes corresponding to the dictionary entries. And then, at the end, when you start to wonder how to encode this big dictionary so the decompressor can use it to make sense of the codes, you just throw the dictionary away. Cute. Of course it turns out that things are cleverly designed so that the decompressor can build up an identical dictionary as it goes along, so there’s no problem. This algorithm was patent-encumbered for a while, so it didn’t get as widely adopted as it might otherwise have been, but you might start seeing more of it these days. Conclusion I’ve focused here on lossless general-purpose compression: the sorts of things that are done to data at the archive level. There is also a stage below this, where data can be compressed before even being put into the archive: making raw images into JPEGs, PNGs, or other compressed image formats, and converting sounds to MP3s, OGGs, and so forth. In many cases those compression steps are just a lossy approximation to the original data, which is okay for graphics and sounds but bad for other files. In a later installment, I’ll be tackling image formats in particular in more detail, since you will tend to run across custom ones a lot, some of which include image-specific processing steps (like, say, subtracting pixels from their neighbors) which wouldn’t make a lot of sense in a more general-purpose compression algorithm. Encryption is another later topic, since sometimes that will keep you from being able to recognize compressed data for what it is. And naturally, if you’ve run across other general compression algorithms used in games you’ve looked at, please mention them in the comments, since I don’t pretend to have investigated all the games out there… I’m still being surprised all the time. Pretty comprehensive, though you forgot to mention at the start that this is where most people’s brains explode. ^^ The only other common form of compression I’ve encountered in my own hacking is dictionary compression (trivial substitution of certain codes for a fixed set of particularly common strings, stored separately). And I’ve never seen that in a computer game, only in antiquated console titles, so it’s not really worth covering in any depth. Thanks for the guide, it’s been really helpful. However, I’m at the aforementioned “brain explosion” stage trying to deal with (I think) an LZSS compressed file. Some things came up that weren’t mentioned in your guide… First of all, the control bytes don’t always occur every 9th place, it seems to be taking 2 bytes for every back reference. I noticed the control bit is followed by 9 bytes instead of 8 if 7 of them are designated raw by the control bit. Also, there’s a 0×157F long section at the beginning of the file with lots of rather long and nearly identical repeating patterns. “BB AE B6 AB BO B7 AC” honestly appears in this section like a hundred times. Any further clarification on this compression format would help alot, or perhaps some direction to where I could get more info. Yeah, the “every 9th byte” is only in the case where all 8 data bytes are raw instead of back-references, which is what you usually see at the very beginning of a file with a lot of unpredictable structure, like a script file. In the general case you can have a control byte after anywhere from 8 to 16 data bytes (or more, if the back references can span 3 bytes, though 2 is much more typical). The value of the control byte will tell you how many data bytes to expect. I’m not sure what to tell you about the repeating sequences. If it is LZSS, chances are the repeating sequences are a sign that the underlying file is also very repetitive, so you’re getting the same back references over and over again. But my best advice there, if you have the option, is to look at some other files in the archive as well, rather than being solely focused on one: a lot of the time you’ll find examples of files that compressed more or less well, giving you some extra examples to generalize from. If you’re handy enough with a debugger to try to get access to the uncompressed data in the game’s memory, that’s also an awesome way to understand what’s going on. As for LZSS references, there’s the Wikipedia entry of course, and you can search for tons of more info and code samples floating around the web, but the main trouble is that there isn’t a single “LZSS format” like there is with zlib… I’ve almost never seen exactly the same variant twice, as everybody has a different way to do the back references (the most common is 12-bit offset and 4-bit length, though that gets arranged in a few ways). So it’s going to be difficult to find a reference that matches your particular variant exactly. I think I’m beginning to see how this file is working, or at least how an LZSS file is supposed to work. One weird thing though is every other reference has really high values. Like a reference of 0xF5F0 at offset 0×47 in the file. Have you ever seen anything like this before? Maybe I’m supposed to flip it or something :-/ sorry, I know this isn’t a help thread. thanks for being helpful to a newbie. Well, one thing you may need to work out is how the reference is encoding its values. Is 0xF5F0 a length of 0xF and an offset of 0×5F0, or a length of 0×0 and an offset of 0xF5F, or maybe if there’s an endian swap going on (as you noted) it could really be 0xF0F5, with a similar breakdown of length and offset. Plus a length of 0xF may really mean, say, 17 or 18 bytes since lengths of 0, 1, or 2 might not ever be used, etc. All the different possibilities get troublesome fast, so it’s best to work with file examples where you can make decent guesses about the uncompressed data if possible. And of course if you’re handy with a debugger you can grab the uncompressed data directly or just examine the uncompression assembly itself. thanks for the info. I tried a couple debug programs and I’m honestly not even familiar enough with the terminology to understand what was going on. but just in case you or anyone else was curious or has a similar experience in the future, what was happening to me is that the real offset was offset + 0×14 . So if the real offset is less than 0×14 this gets wrapped back around. The control byte I was talking about, for example, [F5,F0] had an offset of 0xFF5 and a real offset of 0×9. Also, the offset is calculated from the start of the buffer, not spaces back. And the real length was length + 3. man, that gave me headaches for days. but it really feels great to have figured it out. now I just need to learn how to code… :-P Congrats! […] There’s three compression types. 0×00 is raw storage, which was obvious. 0×01 is an LZSS flavor, which took me some 20 hours straight to decipher — it always starts with a control byte, stores references as AABC where BAA is the reference to a 0×1000 ring buffer (with a 0×12 offset for some silly reason) and C is the run length-3. Thankfully I had a set of files which were repackaged by a translator of the game who neglected to write a compression procedure, so I knew what to compare with and soon after I started writing actual code, it all came together, so I have extracted the majority of the content, including even a few forgotten PSD files. […] I’ve seen a few of these formats before, especially the LZSS variants. Perhaps the strangest one I’ve come across (not counting SPB, used by NScripter) is the ZBM image format from the original X-Change; strange not because it’s propietary or complicated, but because you can decompress them with the Windows “expand” utility - it’s the exact same format! ZBM is nothing but BMP with the first 100 bytes XORed with $FF (compression is standard LWA or SZDD by Microsoft. They have used it for DOS and Windows 3.1 releases. It’s really rare and even too old). Currently i’m working on the real “universal” tool for the japanese visual novels fan-translators - Anime Editing Tools (available for downloading). I want to decode Ever17 GCPS graphical data. It’s some kind of zlib compression, but… my head is already blown to bits - help me if you can, guys! I’ve forgot to say this lately, but my tool is Open Source Delphi project. So, i will appreciate any help (the author of IrfanView, Irfan Skiljan, is already helped me with RLE compression documentation). More info on my site (the one english page there). I know, i’m a newbie (maybe even too much of spoiled newbie, forgive me. And forgive for ugly english too, ok?). Well, i’ve worked lately on decoding GCPS (or just CPS) graphical data format that is used in Ever17 - the out of infinity (© KID\HIRAMEKI Int.) (and, that’s my guess, in Memories Off 2nd too, coz they’re both built on the same engine. I even found PARTS OF FORGOTTEN Memories Off 2nd’s code right in the EXE! :) ). The format is really strange. The game IS USING alpha channels. But, when i’ve looked at the header… Come on, ask me “What’s so strange here and what you’re unsure of?”. I’ll tell you: I’m using WinHex 10.4, so i was able to dump the loaded game data to hard drive. Then i’ve coded “GrapS” (now it’s a part of AnimED), the simple RAW scanner that is able to extract bitmap data from dump (with preview, sizing and jumping controls of course :) )… But, the thing i’ve never expected to see is that the size of resulting alpha-channelled 32-bit bitmap DOESN’T MATCH WITH CPS header record (resampled 24-bit images is nearly matches, lacks of few (10-36) bytes). I was (and still i am) confused and frustrated. Does that means that the game stores alphas in the separate files? The old games (such as Tokimeki Check-In! and X-Change 1-2) have used this trick, when the picture is divided into “the image” and “alpha” sections. But, not there! I’ve estimated the size & other possible stuff… If alpha is stored in the same file, then the size MUST be the same as in the 32-bit bitmaps, because: the size i’ve calculated was 800*600*(24 div 8) = 1440000 (raw, w\o header), but the “visible” part of bitmap is 800×600x24 itself without the alpha, so there’s definitely no space to store extra data. Downsampled colors? No, i’m an PC artist and would notice this trick very fast (believe me, i do). Header lies. It only tells about the 24-bit image size, but excludes alpha channel? Or… what about those “extra” 36 bytes? Alpha is stored elsewhere or combined from RGB channels on the fly? Hehe, not the second one, that’s too complicated for sure. Or, maybe the source is the 16-bit image with 8-bit alpha? I.e. A8R5G5B5. Non-standard, yes. And some “extra” byte here… but, poof! I’ve checked several dumps - the count of used colors is more than 65535 (checked with IrfanView 4.00), so it’s not possible… So, where’s the alpha is stored? Until i figure it out, i won’t be able to write CPS (de)compressor, coz i’m not a skilled programmer, only a designer-translator and can do nothing good with the bruteforcing and huffman-things. :( Well, i’m not exactly useless. Something is coming up to my mind. Every CPS file is ended with 0×53 0×07 or 0×54 0×07, and sometimes there a descending byte-sequences between the blocks. I think that the stream here should be readed reversible… P.S. Thank you, Edward, for the very good and simple-to-understand articles (i will create the russian translation of it when i’ll get your permission). STILL WAITING FOR THE PART V - “Graphical Data”. ^_^ Maybe you’ll show how to crack this tricky format… at least, i hope so… Dmitri Poguliayev aka WinKiller Studio. Greetings from Russia, Kemerovo. A lot of Russian people loves anime. :) P.P.S. About the game archives. There’s something that bothers me. Did you’ve seen the “Peach Princess” ARC files? I understand that the data optimization is something important, but… the filenames and their extensions is stored *separately*. I think it’s stupid, because it only saves a 262 kilobytes (12*65535 (filename with extension * maximum of possible file records) - 8*65535). P.P.P.S. There is one really intriguing theme - Scripts, texts and Russian language. Come to think of it, fans usually hacks japanese games to support latin, but where’s the cyrillic characters support?! Ahh, it’s not needed, right? NO, IT’S NEEDED. We are the normal humanoid creatures ;) , not aliens, and want to translate \ play visual novels in our native language as well. I know the English, it’s not the personally a problem of myself, but the others… I feel sad for them. :( You’re probably don’t even know how it’s hard to find a good japanese game outside of the Moscow. The most of buyable stuff is a pirated ripped releases (translated with Socrat, by the way) of the really old (1996-2004) h-games. I didn’t even seen new titles such as X-Change 3 & X-Change Alternative. It’s a surprise that the licensed US version of Ever17 was available not so long time ago ($5 cost, that’s really cheap, even for Kemerovo)…
http://web.archive.org/web/20080708183914/http:/sekai.insani.org/archives/24
CC-MAIN-2014-52
refinedweb
5,503
66.67
(solved) Initialize Business variable using process variable value can i initialize a property of a business varible using the value of a process valiable? The above code in the groovy script throws the exception "No contract data found named: aProcessVar" def myvar = new myBusinessObj() ... myvar.aBusinessVar = apiAccessor.getProcessAPI() .getProcessInputValueAfterInitialization(processInstanceId, "aProcessVar"); return myvar Also on a connector (input or output) i cannot update the value of a variable: myBusinessObjectName.setaBusinessVar("test"); No answers yet. According to your code example your are not only updating the business object attribute but you are actually creating a new instance of this business object by calling the newoperator. Can you clarify when and how the process variable is initialized and also when is the business variable initialize and when do you want to update it? (by when I mean in the default value of the variable, in an operation, in connector output...). Note that sharing your process (exported as a .bos file) can help to identify a solution. @antoine.mottier i am editing the default value in the Edit Business Variable window. That is why i am uning new. Any suggestions? Can you share your process file? I need to understand a little bit what you are trying to achieve in order to provide appropriate help. While I understand that more info might make diagnosis easier giving us some, any, examples would help get over the hurdles. I'm getting frustrated failing to do really simple things. I want to put the results of a script into a field in a business variable - but the GUI will only let me have a "whole" business object. I just can't see how to get it to set a single field. To update a business variable attribute using the output of a script, in the operation definition, click on the "Takes value of" link and in the drop down list select "Use a Java method" and select the appropriate "set" method to update the attribute you want. I create an example with a simple BDM that you can download and run:... @antoine.mottier i cannot import your bos file. It says: this BOS archive is not valid. I am also sending a simple bos file. The idea is to initialize the business variable empBusinessVariable.cnwith the user's name, and the empBusinessVariable.givenNamewith the aprocessVar, before Step1. And those values to be shown/ kept also at step2. Thank you for your interest. My example was build with Bonita Studio 7.6.2, so updating your installation might allow you to import the example. @antoine.mottier problem solved. I am not using InstatiationForm. Instead, after start event i have created a service task (st1) and then a user task (ut1). In st1 i have created a groovy connector where i create a new object (obj1) of my BusinessVariable type. Then using the setters, I set the obj's property with my processVariable value (in this script it should have been instatiated). Finaly i return the obj1. The output of the connector is used to initialize (initialize with) the BusinessVariable. Thank you for your time.
https://community.bonitasoft.com/questions-and-answers/initialize-business-variable-using-process-variable-value
CC-MAIN-2019-51
refinedweb
517
57.77
I have a large project consisting of sufficiently large number of modules, each printing something to the standard output. Now as the project has grown in size, there are large no. of # I want to do something like this. sys.stdout = None # this obviously will give an error as Nonetype object does not have any write method. class DontPrint(object): def write(*args): pass dp = DontPrint() sys.stdout = dp Cross-platform: import os import sys f = open(os.devnull, 'w') sys.stdout = f On Windows: f = open('nul', 'w') sys.stdout = f On Linux: f = open('/dev/null', 'w') sys.stdout = f
https://codedump.io/share/2gNzjXWKgIXI/1/redirecting-stdout-to-quotnothingquot-in-python
CC-MAIN-2018-26
refinedweb
102
78.35
Beijing is aiming at Religious Victory About 20 days ago, I wrote a blog post about the hidden knowledge in Sid Meier’s Civilization VI, and I foreshadowed another post about its game mechanism. In this post, I will talk about the various winning conditions in Civilization VI (henceforth Civ6). In particular, I will try to argue that Beijing is aiming at Religious Victory. Table of Contents - Game mechanism - Beijing is aiming at Religious Victory - Religious Victory: turn 1–100 - Great Prophet: Karl Marx - Beliefs of socialism with Chinese characteristics - Religious pressure - Theological combat - The US’s defense - Religious Victory: the ending - Aftermath Game mechanism One of the features distinguishing Civ6 from other similar games, such as Koei’s Three Kingdoms franchise, is the multiple ways to win a game in Civ6. Apart from eliminating all other civilizations by force, namely Domination Victory, you can also win by Science Victory, Culture Victory, and Religious Victory. Whenever a player achieves one of these winning conditions, be it domination, science, culture, or religion, he wins the game. - Domination Victory: conquer the capital of every other civilization. - Science Victory: establish a Martian colony. - Culture Victory: attract enough foreign tourists. - Religious Victory: make your religion predominant in every civilization. This game mechanism keeps the game in suspense from the beginning all the way to the end. If that was not the case and the game permitted only a single winning condition, the civilization having accumulated advantage in that dimension at the beginning of the game, either by skill or by luck, would snowball this advantage and eventually win the game. The strong will stay strong, and there would be no suspense. The existence of multiple winning conditions gives the game a multidimensional shape. It is nearly impossible to excel in every dimension. A player putting equal weights on all dimensions will only be outpaced and achieve none of the winning conditions. Therefore, each player should focus on one, at most two, dimensions. Different players excel in different dimensions, and they are all likely to win the game. It may happen that when you are one turn away from conquering the capital of the last civilization and achieving the Domination Victory, that civilization successfully establishes a Martian colony and thus achieves the Science Victory. The fierce competition stays all the way from the beginning to the end of the game. Civ6 is, of course, not the first one coming with this brilliant idea. You can find, for example, similar ideas in Yugioh, one of the most popular trading card games. In Yugioh, there exist three distinct, independent winning conditions: - Beat & Burn: Reduce your opponent’s life point to zero, either by attack or by effect damage. - Deckout: Empty your opponent’s main deck pile so that he has no card to draw during the Draw Phase. - Special: Exodia, Death Board, Final Countdown, etc. Besides bringing suspense to the game, this multidimensional shape of the game mechanism sometimes also creates the Rock-paper-scissors effect. A player excelling at one dimension A can pull off decent defense against another player excelling at another dimension B but is weak against a third player excelling at another dimension C. I am not sure whether this is the case for Civ6, but, in general, the rock-paper-scissors effect is possible in a multidimensional game. Beijing is aiming at Religious Victory In Civ6, the Chinese civilization features two leaders. One is Qin Shi Huang, who excels at Culture Victory, and the other is Kublai Khan, who excels at Science Victory. (Ironically, Qin Shi Huang is an enemy of culture: He burned books and buried scholars.) Now, Civ6 can add a third leader, Xi Jinping, who excels at Religious Victory. My description of Xi Jinping as a religious leader may seem counter-intuitive. One can raise numerous counterarguments: - Communism is atheist. - The Chinese government demolished churches and expelled Christian missionaries. - The biggest religious threat nowadays comes from ISIS and other terrorist groups. Let me reply to these arguments. First, ISIS is not aiming at Religious Victory; instead, they are aiming at Domination Victory. Religion is just a quick and dirty tool to recruit young men as soldiers and young women as sexual slaves for their soldiers. ISIS does not care about evangelizing their religion; they care only about enhancing their military power and conquering more territories and women. Second, terrorists are not much of a threat. They may be troublesome, annoying, but they can never win a game. They are like the barbarians in Civ6, harassing your people and pillaging your cities. What makes them less of a threat is their lack of motive and ambition. They are like a crying baby, throwing a tantrum now and then, but do not have any long-term goal, let alone the roadmap to achieve that goal. Third, the Chinese government’s adversarial attitude towards the other religions is self-evident proof of their religious ambition. Although the name of their adopted religion is difficult to identify, we can sense its existence by its resistance to the other religions. It is neither Communism, nor Confucianism, nor Taoism, nor any extant religion with a name. It is something cunningly designed. The above analysis indicates the existence of a predominant religion currently controlling China. Now I will try to argue: Not only does this religion exist, but also Beijing is indeed aiming at Religious Victory. Let us start from this axiom: Beijing wants to win. Some people explain this axiom by referring to the ultimate goal of communism. I believe, however, that the Chinese leaders’ frenzy for victory is in their DNA. This axiom is the only plausible explanation for all their incomprehensible conduct these recent years. The most straightforward victory is, of course, the Domination Victory. Beijing made notable progress in this domain by building its first nuclear weapon in 1964, its first aircraft carrier in 2011, and its hypersonic missiles recently. Nonetheless, their military force is still weak compared to the US, and Beijing is aware of this weakness. Domination Victory can, therefore, only be a secondary or complementary plan. As for Science Victory and Culture Victory, it is the US that is currently leading. The United States has no interest in Domination Victory (cf. the Atlantic Charter). Instead, they aim at Science Victory (with their scholars and entrepreneurs) and Culture Victory (with their artists). It is thus nearly impossible for Beijing to out-compete the US in these two dimensions. Then, the only remaining victory is the religious one. Insofar as Beijing wants to win, they should aim at Religious Victory. Don’t get me wrong: I didn’t say that Beijing forwent the science and culture dimension. Instead, the science and culture dimension also contribute to Religious Victory, just like how tech (e.g., Astrology) and civic (e.g., theocracy) help Religious Victory in Civ6. So far, I have given the reason why Beijing is aiming at Religious Victory. In the remainder of this post, I will try to define this religion and explain how Beijing works towards Religious Victory. Since this post is also about Civ6, I will use Civ6 as an analogy to structure my discussion. Religious Victory: turn 1–100 Great Prophet: Karl Marx In Civ6, it requires a Great Prophet to found a religion. For Beijing, the Great Prophet they recruited was Karl Marx. I used the term “recruit,” as I doubt that the Chinese leaders have faith in communism. After all, Karl Marx is just a tool for them to found a religion. This religion does not necessarily have anything to do with communism. Just like in Civ6, you can customize its name and symbol. Beijing adopted a long name, probably the longest name ever: socialism with Chinese characteristics. Beliefs of socialism with Chinese characteristics A rose by any other name would smell as sweet. — William Shakespeare Many scholars, western or eastern, tried to understand the so-called socialism with Chinese characteristics, but their research is useless, for they were trapped in the maze of words. In fact, socialism with Chinese characteristics has nothing to do with socialism, capitalism, communism, or even China. The name of religion is merely a name. It is the underlying beliefs, or doctrines, that characterize the religion and lead to substantial consequences. In the following, I will try to describe some of these beliefs along with their associated benefits. Mistrust: Don’t trust your fellow citizens because hell is other people. Beijing has been actively spreading mistrust among the people. On the one hand, Beijing encourages people to report their fellow citizens’ regulatory offenses, but the government ignores certain felonies, such as human trafficking and phone scams. On the other hand, Beijing punishes the behavior demonstrating humanity, such as helping a falling elder get up. The more people doubt each other, the more they’ll need a powerful government to protect them. Hatred: Your poverty is due to western capitalists. Beijing has been describing western capitalists as the original sin. According to Beijing’s version of history, Chinese people’s suffering was due to the exploitation by western capitalists and the invasion by foreign countries in the last few centuries. The Chinese Communist Party came from nowhere and saved the Chinese people from their miserable lives. Nowadays, the Chinese people are still being abused under international inequality and racism, which is the reason for their ongoing poverty. This belief pushes people to work hard for the so-called Rise of China. Amusement: Amuse yourself to death. Beijing exports cheap products made by slaves (e.g., cotton produced by the Uyghurs) to western countries and makes them indulge in material affluence. Western people and profit-seeking companies became accomplices of China’s low human rights advantage and forgot their social responsibilities. Came with the material satisfaction is moral corruption. They may think that they are righteous, but actually, it is just an illusion or hypocrisy by turning their eyes away from injustice happening far away. With this Amusement follower belief, western countries indulge in the illusion of abundant Culture output, totally unaware of their dependence on China. Once Beijing stops exporting cheap goods to them, the lower class previously living a decent life will suddenly fall into poverty. Meanwhile, the upper class, for instance, the owners of multinational companies or capitalists, accumulated huge fortunes during the trade. The polarization of society between rich and poor generates the Hatred belief, making the poor blame the capitalists for their misfortune. Beijing can then take this opportunity to play the savior role. Once Beijing successfully puts its finger into a target country, it will spread the Mistrust belief among the citizens. The solidarity among people will break, and people will be reduced to slaves, fully dependent on a powerful, draconian government. Hence, socialism with Chinese characteristics is fully adopted in a target country. The target country’s people will then join the boat and work their ass off for the Rise of Beijing by providing material affluence to the next victim. It becomes a self-amplified cycle, just like how the snowballing Pilgrimage belief works in Civ6. It is worth noting that dictatorship or autocracy is not a core belief of socialism with Chinese characteristics. Beijing never acknowledges the western description of China as an authoritarian country. They don’t even deny the value of democracy. All they need is the legitimacy of their ruling. They justify their legitimacy by stating that China has never caused any trouble to the world, though this trick may not work anymore after the explosion of the COVID–19 pandemic. Religious pressure To convert the other civilizations, Beijing needs to apply religious pressure. Beijing’s pressure takes the following modalities. Trade Route. On the one hand, Beijing provides cheap labor to multinational corporations. On the other hand, China is a big market thanks to its large population. Besides the multinational corporations, Wall Street also wants to take advantage of this emerging market. Beijing has been nourishing a bunch of super-rich capitalists, which resulted in the polarization of western societies. Donald Trump and his Deep State theory are the best footnotes of Beijing’s achievement. Forty years ago, Nixon started to engage China economically, expecting that a growing middle class would establish democracy in China. Ironically, the US failed to change China; instead, Beijing changed the rest of the world. One Belt, One Road (OBOR). OBOR is not a trade project; it is an investment initiative. Beijing exports its productivity surplus and builds infrastructure for under-developed countries. These countries are then indebted to Beijing and will have to repay it with the fiscal income in the coming years. It is not bad by itself. The tricky part is that most of these projects are of high investment but low return (just like China’s 5G over-investment). These projects are unlikely to generate enough fiscal income for the local governments to repay Beijing. Regardless of Beijing’s ultimate motive, the debt itself will ensure its influence on these countries. Olympic Games. The Olympic Games are an excellent stage for Beijing to exert its religious pressure. Contrary to the other countries, where sportsmen are all amateurs, sportsmen in China are all professionals. They are financed by the taxpayers and trained for winning the gold medals only (even the silver medals are impermissible). They are more like soldiers than sportsmen. That was why Liu Xiang, the once 110-meter hurdles champion and record-breaker, had to apologize to Beijing and Chinese people for his withdrawal caused by injuries. Beijing needs these “soldiers” to demonstrate, in front of the audience all over the world, the superiority of socialism with Chinese characteristics. There are many more activities with the same motive, such as the Confucius Institutes funded by Beijing. I’ll leave them to the imagination of the readers. Theological combat The above ways of exerting religious pressure are slow. For instance, the Olympic Games are held once every four years. Beijing needs more direct ways to convert the other civilizations. That is how religious units and theological combat come into play. In Civ6, there are mainly three types of religious units: Missionary, Apostle, and Inquisitor. Gurus are underused, so I will not talk about them. For all these three units, we can find their counterparts in Beijing’s conduct. - Missionary. Missionaries are cheap units and are cost-benefit efficient to convert civilizations with little or no religious defense. This role is played by the numerous Chinese immigrants abroad. They may be students, professors, software engineers, or home restaurant owners. They may not like Beijing personally, but their beliefs mirror Beijing’s religion and inadvertently influence western civilizations. Meanwhile, they also experience culture shock, which is actually a consequence of theological combat. …That is not to say that missionaries don’t also do good works of a more practical sort: schools to teach, clinics to heal…and all the other benefits of civilization. — Civilopedia entry - Apostle. Apostles are more powerful and also more expensive than missionaries. They can create new beliefs for your civilization and initiate theological combat. This role is played by the Publicity Department of the Communist Party of China, wolf-warrior diplomats, and celebrities such as Hu Xijin. They skillfully use various logical fallacies, such as strawman and red herring, to mislead the enemy and win theological combat. I guess that they all received the Debater promotion. …is a messenger and ambassador for the chosen deity of a given religion in an attempt to convert the faithless. — Civilopedia entry - Inquisitor. Inquisitors are defense units: they eliminate religious pressure from other civilizations. This role is played by the police and the Cyberspace Administration of China. Beijing has built the Great Firewall to filter religious pressure from western countries and uses censorship to kill any domestic voices longing for democracy. Many human rights lawyers and activists are detained, and many citizens declaring nonconforming opinions are invited to “take tea” with the police. Every faith has its inquisitors… find the non-believers, back-sliders, and evil influences among the flock…banned and burned books, and disposed of heretics, all in the name of Lord. — Civilopedia entry The US’s defense Beijing’s ferocious religious invasion met little or no resistance except in the US. Like Beijing, Washington also aims at winning the game (Science and Culture Victory), and they can by no means let Beijing snatch a Religious Victory. Ex-President Trump identified TikTok as an ideal platform for Beijing’s Apostles to exert religious pressure, so he and Pompeo tried to cut TikTok off from Beijing. Furthermore, they wanted to ban WeChat and the like. However, they failed. Religious units such as missionaries and apostle can ignore national borders. The only way to prevent them from entering the country is through engaging China in a war, which is not an option for the US. Ironically, Beijing successfully keeps the foreign religious units at bay by building the Great Firewall. Probably, Civ6 should add this option into its next DLC. Trump also worried about the Chinese students studying in the US. He did have a point since they all serve as missionaries, even though they are mostly unconscious of this role themselves. However, Chinese students, especially those PhD candidates, also play a crucial role in scientific progression. Expelling them will significantly hurt the US’s agenda towards Science Victory. In addition, preventing Beijing from achieving Religious Victory is not the only task. The US should prepare for military confrontation in case Beijing falls back on Domination Victory after their plan for Religious Victory is shattered. Religious Victory: the ending We have a basic need to believe in something greater than ourselves. We crave solace in the darkness, a light unto our path. Thanks to you, we’ve found the meaning amid the Cosmos. — Sid Meier’s Civilization VI Xi staring at the Religious Victory ending, a faint smile floats on his face. Finally, the effort of a whole long night pays off. He sacrificed the economy and people’s lives and focused all resources on the religious invasion. That was a gamble, but he knew that he had only one chance. Just before the collapse of China’s economy and society, he finally finished the conversion of the US. Xi turns his head, admiring the rising sun outside the window. He has achieved a feat greater than Qin Shi Huang, Genghis Khan, Mao Zedong, Attila the Hun, Jeanne d’Arc, and George Washington, a feat that no one in history has ever accomplished. His life value is fully realized, and he has no regret. Xi knows that he can rest in peace this time… Aftermath After Xi climbed onto his crystal bed and rested in peace, I clicked the “one more turn” button. What I see is an apocalypse-like scene with a collapsed economy and polarized society. The world is filled with hatred and mistrust. Crimes, racism, moral corruption can be seen everywhere. It is experiencing a Late Information Age collapse, which is on par with the Late Bronze Age collapse following the Trojan War. The world has entered the Dark Ages.
http://www.zhengwenjie.net/religion/
CC-MAIN-2021-49
refinedweb
3,191
55.64
). Merge rules specified in the Field Map of Join Features parameter only apply to attributes from the join features and when more than one feature is matched to a target feature (when Join_Count > 1). For example, if three features with DEPTH attribute values of 15.5, 2.5, and 3.3 are joined, and a merge rule of Mean is applied, the output field will have a value of 6.1. Null values in join fields are ignored for statistic calculation. For example, 15.5, <null>, and 2.5 will result in 9.0 for Mean and 2 for Count. When the Match Option) The following script demonstrates how to use the SpatialJoin function in a Python window. import arcpy target_features = "C:/data/usa.gdb/states" join_features = "C:/data/usa.gdb/cities" out_feature_class = "C:/data/usa.gdb/states_cities" arcpy.SpatialJoin_analysis(target_features, join_features, out_feature_class) SpatialJoin example 2 (stand-alone script) The following stand-alone script demonstrates how to use SpatialJoin to join attributes of cities to states. # Name: SpatialJoin_Example2.py # Description: Join attributes of cities to states based on spatial relationships. # Requirements: os module # Import system modules import arcpy import os # Set local variables workspace = r"C:\gpqa\mytools\spatialjoin\usa.gdb" outWorkspace = r"C:\gpqa\mytools\spatialjoin\output.gdb" # Want to join USA cities to states and calculate the mean city population # for each state targetFeatures = os.path.join(workspace, "states") joinFeatures = os.path.join(workspace, "cities") # Output will be the target features, states, with a mean city population field (mcp) outfc = os.path.join(outWorkspace, "states_mcp2") # Create a new fieldmappings and add the two input feature classes. fieldmappings = arcpy.FieldMappings() fieldmappings.addTable(targetFeatures) fieldmappings.addTable(joinFeatures) # First get the POP1990 fieldmap. POP1990 is a field in the cities feature class. # The output will have the states with the attributes of the cities. Setting the # field's merge rule to mean will aggregate the values for all of the cities for # each state into an average value. The field is also renamed to be more appropriate # for the output. pop1990FieldIndex = fieldmappings.findFieldMapIndex("POP1990") fieldmap = fieldmappings.getFieldMap(pop1990FieldIndex) # Get the output field's properties as a field object field = fieldmap.outputField # Rename the field and pass the updated field object back into the field map field.name = "mean_city_pop" field.aliasName = "mean_city_pop" fieldmap.outputField = field # Set the merge rule to mean and then replace the old fieldmap in the mappings object # with the updated one fieldmap.mergeRule = "mean" fieldmappings.replaceFieldMap(pop1990FieldIndex, fieldmap) # Delete fields that are no longer applicable, such as city CITY_NAME and CITY_FIPS # as only the first value will be used by default x = fieldmappings.findFieldMapIndex("CITY_NAME") fieldmappings.removeFieldMap(x) y = fieldmappings.findFieldMapIndex("CITY_FIPS") fieldmappings.removeFieldMap(y) #Run the Spatial Join tool, using the defaults for the join operation and join type arcpy.SpatialJoin_analysis(targetFeatures, joinFeatures, outfc, "#", "#", fieldmappings) Environments Licensing information - ArcGIS Desktop Basic: Yes - ArcGIS Desktop Standard: Yes - ArcGIS Desktop Advanced: Yes
https://desktop.arcgis.com/en/arcmap/10.5/tools/analysis-toolbox/spatial-join.htm
CC-MAIN-2020-50
refinedweb
483
51.75
Welcome to the Ars OpenForum. Account named "Bryce Williams" had been created one week prior to shooting.Read the whole story Sickening.The pre-meditation, the act, the actions afterward. Ditto, his apparent attitude toward his actions.Just sickening. from flamewar import guncontrol Nutter sent a fax manifesto and had a twitter feed. Really covered all his bases. This reminds me of a Hollywood movie...Someone fill in today's toll (Number of Mass shootings in US): I honestly think that part of our culture that's diseased is the obsession with fame. Fame in and of itself as a means to an end, with no regard for the context. Being widely seen, acknowledged and talked about, even if it's for something just absolutely disgusting.There's a conversation about mental health, guns, all kinds of other things, that we're shying away from. But there's a broader cultural context. It's obvious that this guy planned from the beginning to broadcast himself, and then remove himself from the scene, confident that his last moments planted him firmly into the national consciousness.I'm not saying Twitter and Facebook are to blame here, they're just mediums that we use to reflect our own cultural values. Maybe Twitter and Facebook will stop their auto-playing shit for videos. I don't want to watch a murder happen as I am scrolling, maybe this will be the only good that comes out of this? I always wish they could catch these sort of perpetrators alive. Better they waste the rest of their life forgotten in prison. STOP. TALKING. ABOUT. THE. SHOOTER.We've been over this before. I was really impressed by Twitter's quick response. Hopefully this is a new sign! Judging by those twitter screenies, the guy seemed like a paranoid narcissist, dangerous combination. CNN replayed the raw footage from the film crew who were murdered, though they did make the point it would be played only once (with a request that children leave the room!). Ahhh the old 'they made racist comments' so I'm justified in my actions, defense. That comment really comes across as, let me throw that in there quick, perhaps it will garner some sympathy for a murderer. If you make Twitter illegal, only criminals will tweet! Not only was the act evil, but so is using it to further your own political and social aims, like this: Race Murder? good grief. Roll on the usual NRA nonsense, something along the lines of "all journalists and cameramen should be armed"...
https://arstechnica.com/civis/viewtopic.php?p=29635385
CC-MAIN-2020-10
refinedweb
428
74.19
A Text File Logging system for use in VC++ projects Environment: This code was compiled and tested with Visual C++ 6.0 In many applications it is necessary to have a logging system which logs text into a file.The following class provides such a logging system which is very easy to use. 1. Logging of text directly / using string table ids 2. Tracking of log file size (displays warning messages without affecting further logging) 3. automatically provides date and time with the log message 4. ablility to clear the log file etc.. How does the output text file look like ? format is Date Time Logged text For Example: 01/17/99 17:02:46 Here goes ur text How do I integrate it with my existing code or how do I use it? Just add the two files into ur project and in the appclass or ur project create an object like this In the header (.h) file #include "log.h" class CSomeApp : public CWinApp { public: CSomeApp(); CLog m_Log; ... }; In the implementation (.cpp) file CSomeApp::CSomeApp():m_Log("log file name") // see log constructor for more details { // TODO: add construction code here } and where ever you want to log u can use code like this... extern CSomeApp theApp; theApp.m_Log.LogMessage("this is what is logged"); // seeLogMessage for more details or you can use these macros // macro to log a string directly #ifndef LOGS #define LOGS(sz) ((CSomeApp*)AfxGetApp())->m_Log.LogMessage(sz) #endif // macro to log a string using a string table id #ifndef LOGN #define LOGN(a) ((CSomeApp*)AfxGetApp())->m_Log.LogMessage(a) #endif This code will fail if Program crashes in middle.Posted by Legacy on 02/03/1999 12:00am Originally posted by: Shashik This object will fail to close the log file, and thus all the details that were entered in the log file will be lost, if the application crashes in between. I think it would work if you open file in append mode and log the message, and as it is close the file. Just let me know whether I'm right.Reply Thank you.
http://www.codeguru.com/cpp/misc/misc/logandtracefiles/article.php/c245/A-Text-File-Logging-system-for-use-in-VC-projects.htm
CC-MAIN-2015-48
refinedweb
350
73.58
Watchpoints for OpenERP: a proof of concept In a previous post, I was describing what I thought would be an interesting development tool : a watch point system. Since then, I've come to a rough implementation, which I'll describe in a simplifed form for the present note. As expected, it is indeed a basic exercise in metaclasses. If that matters, the code on this page is copyright 2011 Anybox and released under the GNU Affero GPL License v3. The metaclass Metaclasses allow to customize the creation of the class object themselves. The interesting feature here is that they are transversal to inheritance, whereas overriding or monkey-patching the "write" method of "orm.orm" to add a conditional breakpoint would not resist subclassing. It seems that PEP8 does not say much about metaclasses, but I'll try and use the save conventions as in the examples from the reference documentation. from inspect import isfunction class metawatch(type): def __new__(cls, name, bases, dct): for name, attr in dct.items(): if isfunction(attr): dct[name] = watch_wrap(attr) return type.__new__(cls, name, bases, dct) All it does is to intercept the method definitions (which are just functions at this point) and have a decorator wrap them before the class object creation. The decorator We don't use the @ notation, but it's still a function that takes a function as a single argument and returns a function. Information about active watchpoints is expected to be available as a dict on the object, whose keys are method names. def watch_wrap(fun): def w(self, *a, **kw): # avoid using getattr wps = self.__dict__.get('_watchpoints', dict()) if not fun.__name__ in wps: return fun(self, *a, **kw) # support ids only for now interesting = wps[fun.__name__]['ids'] # a set try: ids = a[2] # there's room for improvement, yes except IndexError: ids = () if not interesting.isdisjoint(ids): import pdb; pdb.set_trace() return fun(self, *a, **kw) return w I'm not really used in writing decorators, my first and naive attempt used a def statement right inside the metaclass main loop, and that really doesn't work, because the locals are shared between all occurrences of that statement : while python has some functional capabilities, it is not a functional language. Putting things together We use the same method as in explained there : class WatchedMixin(object): __metaclass__ = metawatch def _watch_set(self, meth_name, ids): if not hasattr(self, '_watchpoints'): self._watchpoints = {} self._watchpoints[meth_name] = dict(ids=ids) def _watch_clear(self, meth_name): if not hasattr(self, '_watchpoints'): return del self._watchpoints[meth_name] from osv import osv class WatchedOsv(osv.osv, WatchedMixin): pass osv.osv = WatchedOsv Maybe a few explanations : the __metaclass__ attribute marks the class as to be created by the given metaclass, and further is itself inherited by subclasses (before the class creation, obviously). Therefore all subclasses (OpenERP models) imported after our code has run will be created with our metaclass. The final monkey patching is necessary because the metaclass has to act before the class creation, which happens at import time. Simply changing the __metaclass__ attribute of osv would not work (probably only for methods defined in subclasses or overrides, actually). Finally, the two methods of the mixin are self-explanatory, they will be inherited by all models. As a side note, we could set __metaclass after the class creation to so that they don't get wrapped. Bootstrap and usage Put all the above code in a module, import it before the osv in your openerp-server.py, et voilà. Now one can introduce, e.g., account_invoice._watch_set('write', [some_ids]) To set the watchpoint on the write method, and that can also be done on the fly from within a pdb session if one wishes so. Final remarks - The bootstrap described above is disappointing, because it duplicates the whole startup script. It would be much better to make those statements and then import openerp-server. For a reason I haven't had time to investigate, the server hangs indefinitely on login requests if one does so. - Obviously, the same can be done for about any frameworks, unless it makes extensive use of metaclasses itself (hello, Zope2). - The code presented here is a proof of concept. My own version is a bit more advanced, and I've already succesfully used it for real-life business code. - This can be extended much beyond watch points. For instance, the first tests I did of openobject metaclassing listed the models that override the write method. - Since each call to a model method is intercepted, there are twice as many corresponding frames. It's a bit of a pain while climbing up them or reading tracebacks. - Time will tell how useful this really is, but I can already say that it brings the confidence in the debugging success up. - This is tested with OpenERP 5 & 6.
https://anybox.fr/blog/watchpoints-for-openerp-a-proof-of-concept
CC-MAIN-2018-34
refinedweb
808
63.09
> Can we discuss different names for "pickle_support_base" please? > I'm in favor of "pickler". Thus, world_pickle_support is-a > boost::python::pickler. I realize it's also an unpickler, so if you don't > like that I'd like to at least find a way to drop "_base" from any public > names. pickle_support_base -> pickle_group .pickle_support() -> .def_pickle() > 1. I don't see how your error message thing is going to cause a message to > appear under any circumstance (?) After renaming setstate to xxsetstate: tru64cxx65-C++-action /net/redbelly/scratch1/rwgk/bjam/libs/python/test/bin/pickle3_ext.so/tru64cxx65/debug/pickle3.o cxx: Error: /tmp_mnt/net/boa/home1/rwgk/boost_mpl_ublas/boost/python/object/pickle_support.hpp, line 98: #135 class "boost::python::error_messages::missing_pickle_group_function_or_inco rrect_signature<boost::python::class_<<unnamed>::world, boost::python::detail::not_specified, ... BTW: I think it would be nice if all compile-time error messages were in namespace boost::python::error_messages . > 2. Are users expected to call this "register_" function? > It would be nice to avoid that. The register_ function is now hidden in namespace detail. I could not simply make it private because some compilers do not support template friends. > 3. How about a "curiously recursive template" formulation, > ... > struct pickle_world : pickle_support<pickle_world> Cool trick! However, the user interface is more complicated than it is in my current implementation: struct world_pickle_group : pickle_group > Question: Why not just have this function accept a tuple argument instead > of doing your own error checking? > > static > void > setstate(world& w, boost::python::object state) > { > using namespace boost::python; > extract<tuple> state_proxy(state); > if (!state_proxy.check() || len(state_proxy()) != 1) { > PyErr_SetString(PyExc_ValueError, > "Unexpected argument in call to __setstate__."); > throw_error_already_set(); > } I chose object over tuple because I want my error message to appear under as many circumstances as possible. > > Locally I am currently working with > > #include <boost/python/detail/api_placeholder.hpp> > > This file implements len() and getattr(). I don't think you want this in > cvs. > > I guess not in the long run, but as a temporary measure it's fine. OK, I am working towards checking in the complete set of patches. (Then you can convince yourself that the compile-time error messages really work.) > I hope so. I'm going to try making class_<> into a class derived from > object, to see how that goes. Then it would be: > > .attr("foo") = ... ; > > Hmm, you can't just dump setattr, because the above won't chain. We could > adopt a Phoenix-like construct: > > ... > > But I'm still nervous about that; I think it would put a huge burden on > many compilers. I am /very/ nervous about these ideas. It is highly important to us that V2 will be stable enough for routine use as soon as possible. Collaborators keep asking about V2 and is getting more and more difficult to keep them interested. Maybe it is time to start a list of potential V3 projects. BTW: what is the status of the mpl1 -> mpl2 transition, and how much instability will this generate for how long? > Well, here's another one, which I'm sure you'll really love <wink>: used a > named parameter interface like that used in Boost.Graph > Cool trick again! However, the prime motivations behind the pickle_group design are 1. to establish a formal grouping of the pickle/unpickle functions and 2. to fully relieve the user from thinking about the individual functions at the point of binding them via .def_pickle(). In addition we have the compile-time consistency checks (which is the only reason for the requirement that the user pickle group must inherit from boost::python::pickle_group). > > void class_base::enable_pickle_support(bool getstate_manages_dict) > > { > > setattr("__reduce__", make_instance_reduce_function()); > > handle<> one(PyInt_FromLong(1)); > > setattr("__safe_for_unpickling__", one); > > if (getstate_manages_dict) { > > setattr("__getstate_manages_dict__", one); > > } BTW: I will change this to work with object as soon as setattr() is modified accordingly. Ralf __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better
http://mail.python.org/pipermail/cplusplus-sig/2002-July/001485.html
CC-MAIN-2013-20
refinedweb
639
50.53
(For more resources related to this topic, see here.) Building a thermometer A thermometer is a device used for recording temperatures and changes in temperatures. The origins of the thermometer go back several centuries, and the device has evolved over the years. Traditional thermometers are usually glass devices that measure these changes via a substance such as mercury, which rises in the glass tube and indicates a number in Fahrenheit or Celsius. The introduction of microelectronics has allowed us to build our own digital thermometers. This can be useful for checking the temperature in parts of your house such as the garage or monitoring the temperature in rooms where it can affect the contents, for example, a wine cellar. Our thermometer will return its readings to the Raspberry Pi and display them in the terminal window. Lets start by setting up the hardware for our thermometer. Setting up our hardware There are several components that you will need to use in this article. You can solder the items to your shield if you wish or use the breadboard if you plan to use the same components for the projects in the articles that follow. Alternatively, you may have decided to purchase an all-in-one unit that combines some of the following components into a single electronic unit. We will make the assumption that you have purchased separate electronic components and will discuss the process of setting these up. We recommend that you switch Raspberry Pi off while connecting the components, especially if you plan on soldering any of the items. If your device is switched on and you accidently spill hot solder onto an unintended area of the circuit board, this can short your device, damaging it. Soldering while switched off allows you to clean up any mistakes using the de-soldering tool. An introduction to resistors Let's quickly take a look at resistors and what exactly these are. A resistor is an electronic component with two connection points (known as terminals) that can be used to reduce the amount of electrical energy passing through a point in a circuit. This reduction in energy is known as resistance. Resistance is measured in Ohms (O). You can read more about how this is calculated at the Wikipedia link's_law. You will find resistors are usually classified into two groups, fixed resistors and variable resistors. The typical types of fixed resistor you will encounter are made of carbon film with the resistance property marked in colored bands, giving you the value in Ohms. Components falling into the variable resistance group are those with resistance properties that change when some other ambient property in their environment changes. Let's now examine the two types of resistors we will be using in our circuit — a thermistor and a 10K Ohm resistor. Thermistor A thermistor is an electronic component which, when included in a circuit, can be used to measure temperature. The device is a type of resistor that has the property whereby its resistance varies as the temperature changes. It can be found in a variety of devices, including thermostats and electronic thermometers. There are two categories of thermistors available, these being Negative Thermistor Coefficient(NTC)and Positive Thermistor Coefficient(PTC). The difference between them is that as the temperature increases the resistance decreases in the case of a NTC, or increases in the case of a PTC. There are two numerical properties that we are interested in with regards to using this device in our project. These are the resistance of the thermistor at room temperature (25 degrees Celsius) and the beta coefficient of the thermistor. The coefficient can be thought of as the amount the resistance changes by as the ambient temperature around the thermistor changes. When you purchase a thermistor, you should have been provided with a datasheet that lists these two values. If you are unsure of the resistance of your thermistor, you can always check it by hooking it up to a voltage detector and taking a reading at room temperature. For example, if you bought a 10K thermistor, you should expect a reading of around 10K Ohms. For this project, we recommend purchasing a 10K thermistor. 10K Ohm resistor A 10K Ohm resistor, unlike a thermistor, is designed to have a constant resistance regardless of temperature change. This type of device falls into the fixed resistor category. You can tell the value of a resistor by the colored bands located on its body. When you purchase resistors, you may find they come with a color-coding guide, otherwise you can check the chart on Wikipedia () in order to ascertain what the value is. As part of the circuit we are building, you will need the 10K resistor in order to convert the changing resistance into a voltage that the analog pin on your Raspberry Pi to Arduino can understand. Wires For this project, you will require three wires. One will attach to the 5V pin on your shield, one to the ground, and finally, one to the analog 0 pin. In the wiring guide, we will be using red, black, and yellow wires. The red will connect to 5V pin, the black to ground, and the yellow to the analog 0 pin. Breadboard Finally, in order to connect our component, we will use the breadboard as we did when connecting up the LED. Connecting our components Setting up our components for the thermometer is a fairly easy task. Once again, at this point, there is no need to attempt any soldering if you plan on re-using the components. Follow these steps in order to connect up everything in the correct layout. Take the red wire and connect it from the 5V pin on the shield to the connect point on the bus strip corresponding to the supply voltage. There are often two bus strips on a breadboard. These can be found on either of the long sides of the board and often have a blue or red strip indicating supply voltage and ground. Next take the black wire and connect it from the ground pin to the ground on the breadboard. We are now going to hook up the resistor. Connect one pin of your 10K resistor to the supply voltage strip that your red wire is connected to and take the other end and connect it to a terminal strip. Terminal strips are the name given to the area located in the middle of the breadboard where you connect your electronic components. Now that the resistor is in place, our next task will be to connect the thermistor. Insert one leg/wire of the thermistor into the ground on the bus strip, and place the second leg into the same row as you placed the resistor. The thermistor and resistor are daisy-chained together with the supply voltage. This leaves us now with the final task, which is connecting up the analog pin to our daisy chain. Finally connect one end of your yellow wire from the analog 0 (A0) on your shield to the terminal strip you selected for the preceding components. Sanity check The setup of your circuit is now complete. However, before switching on your Raspberry Pi check that you have connected up everything correctly. You can compare your setup to the following diagram: Our thermometer circuit is now complete, and you can now boot up your Raspberry Pi. Of course, without any software to return readings to the screen, the circuit is little more than a combination of electronic components! So let's get started on the software portion of our project. Software for our thermometer Now to compile arduPi-based projects. By combining the Makefile and Geany, we have an IDE that mimics the functionality we would use in the Arduino IDE, but with the added benefit we can save files without renaming them and compile our applications with one click. Installing the IDE We are going to use the apt-get tool to install Geany on to your Raspberry Pi. Start off with loading up your Terminal window. From the prompt, run the following command: sudo apt-get install geany You'll get the prompt alerting you to the fact that Geany will take up a certain amount of disk space. You can accept the prompt by selecting Y. Once complete, you will now see Geany located under the Programming menu option. Select the Geany icon from the previous menu to load the application. Once loaded, you will be presented with a code-editing interface. Along the top of the screen, you can find a standard toolbar. This includes the File menu where you can open and save files you are working on, and menus for Edit, Search, View, Document, Project, Build, Tools, and Help. The left-hand side of the screen contains a window that has a number of features including allowing you to jump to a function when you are editing your code. The bottom panel on the screen contains information about your application when you compile it. This is useful when debugging your code, as error messages will be displayed here. Geany has an extensive number of features. You can find a comprehensive guide to the IDE at the Geany website. For our application development at this stage, we are only interested in creating a new file, opening a file, saving a file, and compiling a file. The options we need are located under the File menu item and the Build menu item. Feel free though to explore the IDE and get comfortable with it. In order to use the make option for compiling our application under the Build menu, we need to create a Makefile — we will now take a look at how to achieve this. An introduction to Makefiles The next tool we are going to use is the Makefile. A Makefile is executed by the Linux command make. Make is a command-line utility that allows you to compile executable files by storing the parameters into a Makefile and then calling it as needed. This method allows us to store common compilation directives and re-use them without having to type out the command each time. As you are familiar with, we have used the following command in order to compile our LED example: g++ -lrt -lpthread blink_test.cpp arduPi.o -o blink_test Using a Makefile, we could store this and then execute it when located in the same directory as the files using a simpler command. make We can try out creating a Makefile using the code. Load up Geany from the programming menu if you don't currently have it open. If you don't have a new document open, create a new one from the File menu. Now add the following lines to Blink_test/Makefile, making sure to tab the second line once: Blink: arduPi.o g++ -lrt -lpthread blink_test.cpp arduPi.o -o blink_test If you don't tab the second line containing the compilation instructions, then the Makefile won't run. Now that you have created the Makefile, we can save and run it with the following steps: From the File menu, select Save. From the Save dialog, navigate to the directory where you saved your blink_test.cpp and save the file with the title Makefile. Now open the blink_test.cpp file from the directory where you saved your Makefile. We can test our Makefile by selecting the Build option from the menu and selecting Make. In the panel at the bottom of the IDE, you will see a message indicating that the Makefile was executed successfully. Now from the Terminal window, navigate to the directory containing your blink_test project. Located in this directory, you will find your freshly compiled blink_test file. If you still have your LED example at hand, hook it up to the shield and from the command line, you can run the application by typing the following command: ./blink_test The LED should start blinking. Hopefully, you can see from this example that integrating the Makefile into the IDE allows us to write code and compile it as we go in order to debug it. This will be very useful when you start to work on projects with greater complexity. Once we have written the code to record our temperature readings, we will re-visit the Makefile and create a custom one to build our thermometer application via Geany. Now that you have set up Geany and briefly looked at Makefiles, lets get started with writing our application. Thermometer code We will be using the arduPi library for writing our code as we did for the LED test. As well as using standard Arduino and C++ syntax, we are going to explore some calculations that are used to return the results we need. In order to convert the values we are collecting from our circuit and convert them into a readable temperature, we are going to need to use an equation that converts resistance into temperature. This equation is known as the Steinhart-Hart equation. The Steinhart-Hart equation models the resistance of our thermistor at different temperatures and can be coded into an application in order to display the temperature in Kelvin, Fahrenheit, and Celsius. We will use a simpler version of this in our program (called the B parameter equation) and can use the values from the datasheet provided with our thermistor in order to populate the constants that are needed to perform the calculations. For a simpler version of the equation, we only need to know the following values: The room temperature in Kelvin The co-efficient of our thermistor (should be on the data sheet) The thermistor resistance at room temperature We will use Geany to write our application, so if you don't have it open, start it up. Writing our application From the File menu in Geany, create a new blank file; this is where we are going to add our Arduino code. If you save the file now, then Geany's syntax highlighting will be triggered making the code easier to read. Open the File menu in Geany and select Save. In the Save dialog box, navigate to the arduPi directory and save your file with the name thermometer.cpp. We will use the arduPi_template.cpp as the base for our project and add our code into it. To start, we will add in the include statements for the libraries and headers we need, as well as define some constants that will be used in our application for storing key values. Add the following block of code to your empty file, thermometer.cpp, in Geany: //Include ArduPi library #include "arduPi.h" //Include the Math library #include <math.h> //Needed for Serial communication SerialPi Serial; //Needed for accessing GPIO (pinMode, digitalWrite, digitalRead, //I2C functions) WirePi Wire; //Needed for SPI SPIPi SPI; // Values need for Steinhart-Hart equation // and calculating resistance. #define TENKRESISTOR 10000 //our 10K resistor #define BETA 4000 // This is the Beta Coefficient of your thermistor #define THERMISTOR 10000 // The resistance of your thermistor at room //temperature #define ROOMTEMPK 298.15 //standard room temperature in Kelvin //(25 Celsius). // Number of readings to take // these will be averaged out to // get a more accurate reading // You can increase/decrease this as needed #define READINGS 7 You will recognize some of the preceding code from the arduPi template, as well as some custom code we have added. This custom code includes a reference to the Math library. The Math library in C++ contains a number of reusable complex mathematical functions that can be called and which would help us avoid writing these from scratch. As you will see later in the program, we have used the logarithm function log() when calculating the temperature in Kelvin. Following are a number of constants; we use the #define statement here to initialize them: TENKRESISTOR: This is the 10K Ohm resistor you added to the circuit board. As you can see, we have assigned the value of 10,000 to it. BETA: This is the beta-coefficient of your thermistor. THERMISTOR: The resistance of your thermometer at room temperature. ROOMTEMPK: The room temperature in Kelvin, this translates to 25 degrees Celsius. READINGS: We will take seven readings from the analog pin and average these out to try and get a more accurate reading. The values we have used previously are for a 10K thermistor with a co-efficient of 4000. These should be updated as necessary to reflect the thermistor you are using in your project. Now that we have defined our constants and included some libraries, we need to add the body of the program. From the arduPi_template.cpp file, we now include the main function that kicks our application off. /********************************************************* * IF YOUR ARDUINO CODE HAS OTHER FUNCTIONS APART FROM * * setup() AND loop() YOU MUST DECLARE THEM HERE * * *******************************************************/ /************************** * YOUR ARDUINO CODE HERE * * ************************/ int main (){ setup(); while(1){ loop(); } return (0); } Remember that you can use both // and /* */ for commenting your code. We have our reference to the setup() function and to the loop() function, so we can now declare these and include the necessary code. Below the main() function, add the following: void setup(void) { printf("Starting up thermometer \n"); Wire.begin(); } The setup() function prints out a message to the screen indicating that the program is starting and then calls Wire.begin(). This will allow us to interact with the analog pins. Next we are going to declare the loop function and define some variables that will be used within it. void loop(void) { float avResistance; float resistance; int combinedReadings[READINGS]; byte val0; byte val1; // Our temperature variables float kelvin; float fahrenheit; float celsius; int channelReading; float analogReadingArduino; As you can see in the preceding code snippet, we have declared a number of variables. These can be broken down into: Resistance readings: These are float avResistance, float resistance, and byte val0 and byte val1. The variables avResistance and resistance will be used during the program's execution for recording resistance calculations. The other two variables val0 and val1 are used to store the readings from analog 0 on the shield. Temperature calculations: The variables float kelvin, float fahrenheit, and float celsius as their names suggest are used for recording temperature in three common formats. After declaring these variables, we need to access our analog pin and start to read data from it. Copy the following code into your loop function: /******************* ADC mappings Pin Address 0 0xDC 1 0x9C 2 0xCC 3 0x8C 4 0xAC 5 0xEC 6 0xBC 7 0xFC *******************/ // 0xDC is our analog 0 pin Wire.beginTransmission(8); Wire.write(byte(0xDC)); Wire.endTransmission(); Here we have code that initializes the analog pin 0. The code comment contains the mappings between the pins and addresses so if you wish, you can run the thermistor off a different analog pin. We are using pin 0, so we can now start to take readings from it. To get the correct data, we need to take two readings of a byte each from the pin. We will do this using a for loop. The Raspberry Pi to Arduino shield does not support the analogRead() and analogWrite() functions from the Arduino programming language. Instead we need to use the Wire commands and addresses from the table provided in the comments for this code. Add the following for loop below your previous block of code: /* Grab the two bytes returned from the analog 0 pin, combine them and write the value to the combinedReadings array */ for(int r=0; r<READINGS; r++){ Wire.requestFrom(8,2); val0 = Wire.read(); val1 = Wire.read(); channelReading = int(val0)*16 + int(val1>>4); analogReadingArduino = channelReading * 1023 /4095; combinedReadings[r] = analogReadingArduino; delay(100); } Here we have a loop that grabs the data from the analog pin so we can process it. In the requestFrom() function, we pass in the declaration for the number of bytes we wish to have returned from the pin. Here we can see we have two — this is the second value in the function call. We will combine these values and then write them to an array; in total, we will do this seven times and then average out the value. You will notice we are applying a calculation on the two combined bytes. This calculation converts the values into a 10-bit Arduino resolution. The value you will see returned after this equation is the same as you would expect to get from the analogRead() function on an Arduino Uno if you had hooked up your circuit to it. After we have done this calculation, we assign the value to our array that stores each of the seven readings. Now that we have this value, we can calculate the average resistance. For this, we will use another for loop that iterates through our array of readings, combines them, and then divides them by the value we set in our READINGS constant. Here is the next for loop you will need to accomplish this: // Grab the average of our 7 readings // in order to get a more accurate value avResistance = 0; for (int r=0; r<READINGS; r++) { avResistance += combinedReadings[r]; } avResistance /= READINGS; So far, we have grabbed our readings and can now use a calculation to work out the resistance. For this, we will need our avResistance reading, the resistance value of our 10K resistor, and our thermistor's resistance at room temperature. Add the following code that performs this calculation: /* We can now calculate the resistance of the readings that have come back from analog 0 */ avResistance = (1023 / avResistance) - 1; avResistance = TENKRESISTOR / avResistance; resistance = avResistance / THERMISTOR; The next part of the program uses the resistance to calculate the temperature. This is the portion of code utilizing the simpler version of the Steinhart-hart equation. The result of this equation will be the ambient temperature in degrees Kelvin. Next add the following block of code: // Calculate the temperature in Kelvin kelvin = log(resistance); kelvin /= BETA; kelvin += 1.0 / ROOMTEMPK; kelvin = 1.0 / kelvin; printf("Temperature in K "); printf("%f \n",kelvin); So we have our temperature in degrees K and also have a printf statement that outputs this value to the screen. It would be nice to also have the temperature in two more common temperature formats, those being Celsius and Fahrenheit. These are simple calculations to perform. Let's start by adding the Celsius code. // Convert from Kelvin to Celsius celsius = kelvin -= 273.15; printf("Temperature in C "); printf("%f \n",celsius); Now that we have the temperature in degrees Celsius, we can print this to the screen. Using this value we can convert Celsius into Fahrenheit. // Convert from Celsius to Fahrenheit fahrenheit = (celsius * 1.8) + 32; printf("Temperature in F "); printf("%f \n",fahrenheit); Great! So now we have the temperature being returned in three formats. Let's finish up the application by adding a delay of 3 seconds before the application takes another temperature reading and close off our loop() function. // Three second delay before taking our next // reading delay(3000); } So there we have it. This small application will use our circuit and return the temperature. We now need to compile the code so we can give it a test. Remember to save your code now so that the changes you have added are included in the thermometer.cpp file. Our next step is to create a Makefile for our thermometer application. If you saved the blink_test Makefile into the arduPi directory, you can re-use this or you can create a new file using the previous steps. Place the following code into your Makefile: Thermo: arduPi.o g++ -lrt -lpthread thermometer.cpp arduPi.o -o thermometer Save the file with the name Makefile. We can now compile and test our application. Compiling and testing When discussing Geany earlier, we demonstrated how to run the make command from inside the IDE. Now that we have our Makefile in place, we can test this out. From the Build menu, select Make. You should see the compilation pane at the bottom of the screen spring to life and providing there are no typos or errors in your code, a file called thermometer will be successful output. The thermometer file is our executable that we will run to view the temperature. From the terminal window, navigate to the arduPi directory and locate your thermometer file. This can be launched using the following command: sudo ./thermometer The application will now be executed and text similar to the following in the screenshot should be visible: Try changing the temperature by blowing on the thermometer, placing it in some cold water if safe to do so, or applying a hair dryer to it. You should see the temperature on the screen change. If you have a thermostat or similar in the room that logs the temperature, try comparing its value to that of your thermometer to see how accurate it is. You can run an application in the background by adding an & after the command, for example, sudo ./thermometer &. In the case of our application, it outputs to the screen, so if you attempt to use the same terminal window your typing will be interrupted! To kill an application running in the background, you can type fg to bring it to the foreground and then press Ctrl + C to cancel it. What if it doesn't work Providing you had no errors when compiling your code, then the chances are that one of your components is not connected properly, is connected to the wrong pin, or may be defective. Try double-checking your circuit to make sure everything is attached and hasn't become accidently dislodged. Also ensure that the components are wired up as suggested at the beginning of this article. If everything seems to be correct, you may have a faulty component. Try substituting each item one at a time in the circuit to see if it is a bad wire or faulty resistor. Up and running If you see your temperature being output successfully, then you are up and running! Congratulations, you now have a basic thermometer. This will form the basis for our next project, which is a thermostat. As you can see, this application is useful. However, returning the output to the screen isn't the best method, it would be better for example, if we could see the results via our web browser or an LCD screen. Now that we have a circuit and an application recording temperature, this opens up a wide variety of things we can do with the data, including logging it or using it to change the heat settings in our homes. This article should have whetted your appetite for bigger projects. Summary In this article, we learned how to wire up two new components — a thermistor and resistor. Our application taught us how to use these components to log a temperature reading, and we also became familiar with Makefiles and the Geany IDE. Resources for Article : Further resources on this subject: - Folding @ Home on Ubuntu: Cancer Research Made Easy [Article] - Using PVR with Raspbmc [Article] - Using ChronoForms to add More Features to your Joomla! Form [Article]
https://www.packtpub.com/books/content/our-first-project-%E2%80%93-basic-thermometer
CC-MAIN-2015-48
refinedweb
4,540
60.95
Difference Between Scala vs Java Performance Scala vs Java Performance – Welcome to the Ultimate battle of the Century. Scala versus The Almighty Java. Some people may even ask why? Some may even say that Scala is infact a part of Java itself, then why this scala vs java comparison? The reason is because Scala is not exactly Java. Heck! It’s not even near Java. Although it uses the JVM (Java Virtual Machine) Compiler, it is only partly similar to Java. You can say like Java is the Grand Father of Scala. Reason being, it has a few characteristics of Java like compiling simple codes in byte codes, having less integration and many more. That being one reason, though Scala has Java it ‘is’ not Java. Confused? Yeah, well I was too. And that is the reason for me writing this blog targeting beginners as to not to get confused. Enough talks already, lets get started and see what are the differences, similarities and reasons for programming in Scala to evolve so quickly when we already have Java. You can check out the infographic for the diagrammatic comparison of Scala vs Java. Reading time: 90 seconds Scala vs Java Infographics Following are the top differences: The Scala vs Java Approach Java is an Object Oriented Programming language. It aim is mainly focused on gathering and manipulation of the given data. It tries to make applications available to daily users with the help of graphic UIs and object-oriented patterns, whereas on the other hand Scala Programming purely follows the traditional functional approach. Scala unlike Java, is a machine compiled language. That means, it is designed to run on a specific environment somewhat like the JVM and offers the combination of the functional and object-oriented approach with the help of a compiler(similar to that of dos) and a type system statistically scanned at the time of compilation which is again the same as Java, except the thing that it has expressive syntax of high-level languages such as Ruby. But not to ignore the same features that make Scala version so productive, can also hamper the scala vs java performance and make it much more catastrophic than it needs to be. The Need for the Birth of Scala What is Scala? Scala was developed specifically with the aim of being a better language that Java. The developers wanted to leave those parts of Java behind which hinders productive programming, is overly time consuming along with the fact that it frustrates the developer. The point being, though there is differentiation of code and changes in approach (when compared to Java) can make Scala language a bit more difficult, still the result is much clean and well-structured that is ultimately easier to use and read similar to that of the likes of Python. you can even go through with Scala vs Python in my next blog. Lets look at a simple printing of a text in both the languages: Java: public class IamJava { public static void main(String[] args) { System.out.println("I am Java!"); } } Scala: object IamScala { def main(args: Array[String]): Unit = { println("I am Scala!") } } Hmnn… There’s hardly any difference. Don’t worry. I am yet to show off here. Now let’s take a look at a more accurate example. Following is an example as to how a long piece of code written in Java; can simply be a one liner in Scala: Java: public class People { private String start; private String stop; String getstart() { return start; } void setstart(String start) { this.start = start; } String getstop() { return stop; } void setstop(String stop) { this.stop = stop; } int hashCode() .... boolean equals(Object o) { .... } } Scala: case class People(start:String, stop:String) Thus, one line in Scala is equal to eleven lines of Java. To be more specific, Java lacks the compactness of Scala program, and thus writing lengthy codes have become a habit of the Java developers. Actually, we can even write it this manner: public class People extends DTOBase { public String start; public String stop; } The compactness of scala programming language is really worth noting. I can write a field even without the help of getters and setters and that too without even bottlenecking it.Meaning, that development of the Java language runs towards compactness as well. Needless to say that Java has a few tricks up its sleeve as well. There is a reason why it has dominated the world of programming. Java can however shorten the code a bit, but obviously not in the standard usage. Now lets take a look at the Plain Old Java Object here. Lets assume, you are an awesome programmer (which obviously I am not…err..just kidding) So to say, you somehow managed to reduce the code, but at what length? 5 to 6 lines?….Let me get this straight…what if you intend to write a piece of code as big as this: public class Group { private String value; private record<tokens> tokens; public Group() { tokens = new Arrayrecord<tokens>(); } public String getvalue() { return value; } public void setvalue(String value) { this.value = value; } public record<tokens> gettokens() { return tokens; } public void settokens(record<tokens> tokens) { this.tokens = tokens; } } public class tokens { private int id; private record<item> items; public tokens() { items = new Arrayrecord<item>(); } public int getId() { return id; } public void setId(int id) { this.id = id; } public record<item> getitems() { return items; } public void setitems(record<item> items) { this.items = items; } } public class item { private int id; private String characteristic; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getcharacteristic() { return characteristic; } public void setcharacteristic(String characteristic) { this.characteristic = characteristic; } Zzzz….I feel sleepy already. Now, lets take a look at Scalas. Here just to be sure, let me tell you that I am not trying to reduce any piece of code here. I am just writing the same piece of code that I wrote above in the most basic format(as a beginner developer would write) in Scala for(I have used records as lists or arraylists): class Group { var value: String = _ var tokens: record[tokens] = Nil } class tokens { var id: Int = _ var items: record[item] = Nil } class item { var id: Int = _ var category: String = _ } You may have heard people saying that Java is much more simpler than Scala. Let me ask you that now; which language do you feel more complicated now, huh? So, next time you argue with a Java Developer, keep this simple program with you. Don’t be afraid. Though Java codes appear large, they are not actually that complicated. It is actually far easier to understand Java than understand Scala. Scala is far too compact. The best I would say is, this is suitable for experienced developers who have years of experience in developing apps in Java. Beginners would find it hard to write and understand Scala without knowing Java. Experience coders may even argue that Java is more readable than Scala, reason being the deeply nested codes of Scala. In Scala, you can define functions inside functions, into another function, inside of another object which is inside of a class and so on. So you see, so much to say about compactness. Though there is a need for compactness in Java, sometimes it brings devastating effects if written poorly. So devastating, that you won’t even understand your own code. Even though Scala is undefeated here, this is however with the sacrifice of performance. We never talked about the performance benchmarks of Scala, did we? I recently tested the benchmarks of Scala and Java on my AMD-A8 CPU. The result I got was actually unexpected. Though you can write compact codes in Scala, the performance i.e. the speed is actually twice times as slow when compared to Java. Conclusion Scala Java; in the end are two different sides of the same coin. Both have their own set of pros and cons. This is the reason why you can never replace Java for Scala and the other way round as well. At one hand where Java is simple, super-fast and efficient in handling tasks; on the other hand Scala is extremely compact and easier to write (though hard to understand and debug) with the compromise on efficiency at the same time. The advantages and disadvantages of Scala are often either influenced because they didnt find any issue writing a piece of application or they were unsuccessful. To properly evaluate this, it is actually important to understand the reason and the facts behind such opinions. The main difference between Java and Scala is their philosophy and their nature towards writing the piece of code. Java is purely object oriented and focuses towards classes, encapsulation and stuff, whereas Scala is based on functional approach. Once you know this difference, learning them will just be a matter of time. Recommended Articles Here are some articles that will help you to get more detail about the scala vs java so just go through the link.
https://www.educba.com/scala-vs-java-performance/?source=leftnav
CC-MAIN-2021-04
refinedweb
1,513
62.98
Opened 2 years ago Closed 2 years ago Last modified 6 months ago #2279 closed task (fixed) harden pillow image parsing Description (last modified by ) Apart from the obvious server-to-client transfer of window pixel data, we can receive compressed pixel data from a number of places: webcam, window icons, xdg menus, etc Some of those can flow back to the server. We should ensure that we only allow the encodings we support so that a vulnerability in another codec cannot be triggered from those code paths. We only really care about: webp, png and jpeg for now. Those all have detectable headers. Let's move the code to a utility function that can do the checking. Example Image.open code that could be abused: from PIL import Image from io import BytesIO buf = BytesIO(icondata) img = Image.open(buf) has_alpha = img.mode=="RGBA" width, height = img.size rowstride = width * (3+int(has_alpha)) pixbuf = get_pixbuf_from_data(img.tobytes(), has_alpha, width, height, rowstride) Change History (5) comment:1 Changed 2 years ago by comment:2 Changed 2 years ago by comment:3 Changed 2 years ago by Work completed in: - r22513 the client will validate the compressed pixel data before calling into python-pillow - r22514 webcam mixin will also validate compressed data from the client To test, we have to build --without-webp and --without-jpeg_decoder otherwise those faster cython decoders have precedence (and they don't need validating since they only decode the one format they are designed for). Then just attach with --encodings=jpeg (or --encodings=png. comment:4 Changed 19 months ago by comment:5 Changed 6 months ago by this ticket has been moved to: Here's a list of the formats supported by python-pillow: Image File Formats (long!). Work started in r22493: we filter tray icons and window icons (server to client), dbus and win32 notifiers only accept png (now actually enforced), webcam validates the encodings used. r22494 also removes support for jpeg2000 (#618) - that encoding was pretty useless anyway. Still TODO:
https://www.xpra.org/trac/ticket/2279
CC-MAIN-2021-31
refinedweb
337
57.5
Getting Started with Active Directory Lightweight Directory Services Join the DZone community and get the full member experience.Join For Free introduction in preparation for some upcoming posts related to linq (what else?), windows powershell and rx, i had to set up a local ldap-capable directory service. (hint: it will pay off to read till the very end of the post if you’re wondering what i’m up to...) in this post i’ll walk the reader through the installation, configuration and use of active directory lightweight directory services (lds) , formerly known as active directory application mode (adam). having used the technology several years ago, in relation to the linq to active directory project (which as an extension to this blog series will receive an update), it was a warm and welcome reencounter. what’s lightweight directory services anyway? use of hierarchical storage and auxiliary services provided by technologies like active directory often has advantages over alternative designs, e.g. using a relational database. for example, user accounts may be stored in a directory service for an application to make use of. while active directory seems the natural habitat to store (and replicate, secure, etc.) additional user information, it admins will likely point you – the poor developer – at the door when asking to extend the schema. that’s one of the places where lds comes in, offering the ability to take advantage of the programming model of directory services while keeping your hands off “the one and only ad schema”. the lds website quotes other use cases, which i’ll just copy here verbatim: active directory lightweight directory service (ad lds), formerly known as active directory application mode, can be used to provide directory services for directory-enabled applications. instead of using your organization’s ad ds database to store the directory-enabled application data, ad lds can be used to store the data. ad lds can be used in conjunction with ad ds so that you can have a central location for security accounts (ad ds) and another location to support the application configuration and directory data (ad lds). using ad lds, you can reduce the overhead associated with active directory replication, you do not have to extend the active directory schema to support the application, and you can partition the directory structure so that the ad lds service is only deployed to the servers that need to support the directory-enabled application. - install from media generation. the ability to create installation media for ad lds by using ntdsutil.exe or dsdbutil.exe. - auditing. auditing of changed values within the directory service. - database mounting tool. gives you the ability to view data within snapshots of the database files. - active directory sites and services support. gives you the ability to use active directory sites and services to manage the replication of the ad lds data changes. - dynamic list of ldif files. with this feature, you can associate custom ldif files with the existing default ldif files used for setup of ad lds on a server. - recursive linked-attribute queries. ldap queries can follow nested attribute links to determine additional attribute properties, such as group memberships. obviously that last bullet point grabs my attention through i will retain myself from digressing here. getting started if you’re running windows 7, the following explanation is the right one for you. for older versions of the operating system, things are pretty similar though different downloads will have to be used. for windows server 2008, a server role exists for lds. so, assuming you’re on windows 7, start by downloading the installation media over here . after installing this, you should find an entry “active directory lightweight directory services setup wizard” under the “administrative tools” section in “control panel”: lds allows you to install multiple instances of directory services on the same machine, just like sql server allows multiple server instances to co-exist. each instance has a name and listens on certain ports using the ldp protocol. starting this wizard – which lives under %systemroot%\adam\adaminstall.exe, revealing the former product name – brings us here: after clicking next, we need to decide whether we create a new unique instance that hasn’t any ties with existing instances, or whether we want to create a replicate of an existing instance. for our purposes, the first option is what we need: next, we’re asked for an instance name. the instance name will be used for the creation of a windows service, as well as to store some settings. each instance will get its own windows service. in our sample, we’ll create a directory for the northwind employees tables, which we’ll use to create accounts further on. we’re almost there with the baseline configuration. the next question is to specify a port number, both for plain tcp and for ssl-encrypted traffic. the default ports, 389 and 636, are fine for us. later we’ll be able to connect to the instance by connecting to ldp over port 389, e.g. using the system.directoryservices namespace functionality in .net. notice every instance of lds should have its own port number, so only one can be using the default port numbers. now that we have completed the “physical administration”, the wizard moves on to a bit of “logical administration”. more specifically, we’re given the option to create a directory partition for the application. here we choose to create such a partition, though in many concrete deployment scenarios you’ll want the application’s setup to create this at runtime. our partition’s distinguished name will mimic a “northwind.local” domain containing a partition called “employees”: after this bit of logical administration, some more physical configuration has to be carried out, specifying the data files location and the account to run the services under. for both, the default settings are fine. also the administrative account assigned to manage the lds instance can be kept as the currently logged in user, unless you feel the need to change this in your scenario: finally, we’ve arrived at an interesting step where we’re given the option to import ldif files. and ldif file, with extension .ldf, contains the definition of a class that can be added to a directory service’s schema. basically those contain things like attributes and their types. under the %systemroot%\adam folder, a set of out-of-the-box .ldf files can be found: instead of having to run the ldifde.exe tool, the wizard gives us the option to import ldif files directly. those classes are documented in various places, such as rfc2798 for inetorgperson . on technet, information is presented in a more structured manner, e.g revealing that inetorgperson is a subclass of user . custom classes can be defined and imported after setup has completed. in this post, we won’t extend the schema ourselves but we will simply be using the built-in user class so let’s tick that one: after clicking next, we get a last chance to revisit our settings or can confirm the installation. at this point, the wizard will create the instance – setting up the service – and import the ldif files. congratulations! your first lds instance has materialized. if everything went alright, the northwindemployees service should show up: inspecting the directory to inspect the newly created directory instance, a bunch of tools exist. one is adsi edit which you could already see in the administrative tools. to set it up, open the mmc-based tool and go to action, connect to… in the dialog that appears, specify the server name and choose schema as the naming context. for example, if you want to inspect the user class, simply navigate to the schema node in the tree and show the properties of the user entry. to visualize the objects in the application partition, connect using the distinguished name specified during the installation: now it’s possible to create a new object in the directory using the context menu in the content pane: after specifying the class, we get to specify the “cn” name (for common name) of the object. in this case, i’ll use my full name: we can also set additional attributes, as shown below (using the “physicaldeliveryofficename” to specify the office number of the user): after clicking set, closing the attributes dialog and clicking finish to create the object, we see it pop up in the items view of the adsi editor snap-in: programmatic population of the directory obviously we’re much more interested in a programmatic way to program directory services. .net supports the use of directory services and related protocols (ldap in particular) through the system.directoryservices namespace. in a plain new console application, add a reference to the assembly with the same name (don’t both about other assemblies that deal with account management and protocol stuff): for this sample, i’ll also assume the reader got a northwind sql database sitting somewhere and knows how to get data out of its employees table as rich objects. below is how things look when using the linq to sql designer: we’ll just import a few details about the users; it’s left to the reader to map other properties onto attributes using the documentation about the user directory services class . just a few lines of code suffice to accomplish the task (assuming the system.directoryservices namespace is imported): static void main() { var path = "ldap://bartde-hp07/cn=employees,dc=northwind,dc=local"; var root = new directoryentry(path); var ctx = new northwinddatacontext(); foreach (var e in ctx.employees) { var cn = "cn=" + e.firstname + e.lastname; var u = root.children.add(cn, "user"); u.properties["employeeid"].value = e.employeeid; u.properties["sn"].value = e.lastname; u.properties["givenname"].value = e.firstname; u.properties["comment"].value = e.notes; u.properties["homephone"].value = e.homephone; u.properties["photo"].value = e.photo.toarray(); u.commitchanges(); } } after running this code – obviously changing the ldap path to reflect your setup – you should see the following in adsi edit (after hitting refresh): now it’s just plain easy to write an application that visualizes the employees with their data. we’ll leave that to the ui-savvy reader (just to tease that segment of my audience, i’ve also imported the employee’s photo as a byte-array). a small preview of what’s coming up to whet the reader’s appetite about next episodes on this blog, below is a single screenshot illustrating something – imho – rather cool (use of linq to active directory is just an implementation detail below): note: what’s shown here is the result of a very early experiment done as part of my current job on “linq to anything” here in the “cloud data programmability team”. please don’t fantasize about it as being a vnext feature of any product involved whatsoever. the core intent of those experiments is to emphasize the omnipresence of linq (and more widely, monads) in today’s (and tomorrow’s) world. while we’re not ready to reveal the “linq to anything” mission in all its glory (rather think of it as “linq to the unimaginable”), we can drop some hints. stay tuned for more! Published at DZone with permission of Bart De Smet, DZone MVB. See the original article here. Opinions expressed by DZone contributors are their own.
https://dzone.com/articles/getting-started-active
CC-MAIN-2022-33
refinedweb
1,897
51.99
Strings are defined as a one-dimensional array of characters. They are terminated by a null character ‘\0’. Thie above is the difference between arrays and strings. It is also referred to as a character array. Declaration of strings: It is similar to declaring 1-D arrays. Syntax: char str_name[size]; Initializing a String: It can be done in several ways, similar to arrays, 1. char str[] = "HelloWorld"; 2. char str[50] = "HelloWorld"; 3. char str[] = {'H','e','l','l','o','W','o','r','l','d','\0'}; 4. char str[11] = {'H','e','l','l','o','W','o','r','l','d','\0'}; Memory Representation of a string: Example Program: #include <stdio.h> int main () { char greeting[6] = {'H', 'e', 'l', 'l', 'o', '\0'}; printf("Greeting message: %s\n", greeting ); return 0; } Output: Greeting message: Hello The null character is not printed at the end of a string constant. When it initializes the array, the C compiler automatically places the ‘\0’ at the end of the string. Manipulating Strings: Example Program: Using the above functions #include <stdio.h> #include <string.h> int main () { char string_1[12] = "Hello"; char string_2[12] = "World"; char string_3[12]; int len ; strcpy(string_3, string_1); /* copy str1 into str3 */ printf("The copied string is : %s\n", string_3 ); strcat( string_1, string_2); /* concatenates str1 and str2 */ printf("The concatenated string is : %s\n", string_1 ); len = strlen(string_1); /* total lenghth of str1 after concatenation */ printf("Length of concatenated string is : %d\n", len ); return 0; } Output: The copied string is : Hello The concatenated string is : HelloWorld Length of concatenated string is : 10
https://edusera.org/strings-in-c-c-programming/
CC-MAIN-2022-40
refinedweb
262
56.55
Dear guys,I figure out that some functions in PyTorch like torch.max() or torch.sum() don't have keepdim argument thought it is available in the document. keepdim For example, if I run the following code: import numpy as np import torch a = torch.Tensor(np.arange(6).reshape(2, 3)) print torch.max(a, keepdim=True) I will get the error: print torch.max(a, keepdim=True) TypeError: torch.max received an invalid combination of arguments - got (torch.FloatTensor, keepdim=bool), but expected one of: * (torch.FloatTensor source) * (torch.FloatTensor source, torch.FloatTensor other) didn't match because some of the keywords were incorrect: keepdim * (torch.FloatTensor source, int dim) Do you have any solution for this problem ? Moreover, when I run torch.max(a) I get a float number but I expect it to be a 2-tuple. The first is a Tensor with max value, the second is the index. I think the code should be checked. it is available on master, and will be in the next release (0.2)
https://discuss.pytorch.org/t/no-keepdim-in-pytorch/2999
CC-MAIN-2017-47
refinedweb
175
71.61
/* ** (c) COPYRIGHT MIT 1995. ** Please first read the full copyright statement in the file COPYRIGH. */ The User profile class manages what we know about a user on this host. This can for example be the FQDN of the host, the user's email address, the time zone, the news server etc. Note that this information does not correspond to the actual information for the host but instead represents "the information that the user wants to show the world". The user may use an arbitrary email address to be used in a HTTP request, for example. The application may assign a context to each use which gives the application to extend the use of this class. This module is implemented by HTUser.c, and it is a part of the W3C Sample Code Library. #ifndef HTUSER_H #define HTUSER_H typedef struct _HTUserProfile HTUserProfile; The application may create any number of user profile objects. By default the Library creates a generic user which is the default value used to initialize a Request object. This can be replaced by other user profiles at any point in time. extern HTUserProfile * HTUserProfile_new (const char * name, void * context); Localize a user profile by filling in all the information that we can figure out automatically, for example the email address, news server etc. extern BOOL HTUserProfile_localize (HTUserProfile * up); extern BOOL HTUserProfile_delete (HTUserProfile * up); The FQDN is a fully qualified domain name in that it contains both a local host name and the domain name. It turns out that this is in fact very difficult to obtain a FQDN on a variety of platforms. extern char * HTUserProfile_fqdn (HTUserProfile * up); extern BOOL HTUserProfile_setFqdn (HTUserProfile * up, const char * fqdn); This is the email address that the user wants to send out for example as a "password" when using anonymous FTP access and as a "From" field in a HTTP request. extern char * HTUserProfile_email (HTUserProfile * up); extern BOOL HTUserProfile_setEmail (HTUserProfile * up, const char * email); Control the news server that this user wishes to use extern char * HTUserProfile_news (HTUserProfile * host); extern BOOL HTUserProfile_setNews (HTUserProfile * host, const char * news); Control the location for temporary files for this profile. The format must be in URL format which is different from local file syntax as URL syntaz always uses '/' as delimiters and also encoding of special characters. See the documentation on URLs for more information about URL syntax. extern char * HTUserProfile_tmp (HTUserProfile * host); extern BOOL HTUserProfile_setTmp (HTUserProfile * host, const char * tmp); Another widely used piece information that is very hard toobtain is the local time zone. As we often must convert to and from GMT (Universal Time) we must have the correct time zone. If we for some reason guesses wrong then the user must change it manually. extern time_t HTUserProfile_timezone (HTUserProfile * up); extern BOOL HTUserProfile_setTimezone (HTUserProfile * up, time_t timezone); The applicatoin may have additional information that it wishes to assign to a user profile. It can do this using the user context which is handled as follows: extern void * HTUserProfile_context (HTUserProfile * up); extern BOOL HTUserProfile_setContext (HTUserProfile * up, void * context); #endif /* HTUser_H */
http://www.w3.org/Library/src/HTUser.html
CC-MAIN-2015-35
refinedweb
506
50.16
Automating Your Feature Testing With Selenium WebDriver This article is for web developers who wish to spend less time testing the front end of their web applications but still want to be confident that every feature works fine. It will save you time by automating repetitive online tasks with Selenium WebDriver. You will find a step-by-step example for automating and testing the login function of WordPress, but you can also adapt the example for any other login form. What Is Selenium And How Can It Help You? Selenium is a framework for the automated testing of web applications. Using Selenium, you can basically automate every task in your browser as if a real person were to execute the task. The interface used to send commands to the different browsers is called Selenium WebDriver. Implementations of this interface are available for every major browser, including Mozilla Firefox, Google Chrome and Internet Explorer. Automating Your Feature Testing With Selenium WebDriver Which type of web developer are you? Are you the disciplined type who tests all key features of your web application after each deployment. If so, you are probably annoyed by how much time this repetitive testing consumes. Or are you the type who just doesn’t bother with testing key features and always thinks, “I should test more, but I’d rather develop new stuff.” If so, you probably only find bugs by chance or when your client or boss complains about them. I have been working for a well-known online retailer in Germany for quite a while, and I always belonged to the second category: It was so exciting to think of new features for the online shop, and I didn’t like at all going over all of the previous features again after each new software deployment. So, the strategy was more or less to hope that all key features would work. One day, we had a serious drop in our conversion rate and started digging in our web analytics tools to find the source of this drop. It took quite a while before we found out that our checkout did not work properly since the previous software deployment. This was the day when I started to do some research about automating our testing process of web applications, and I stumbled upon Selenium and its WebDriver. Selenium is basically a framework that allows you to automate web browsers. WebDriver is the name of the key interface that allows you to send commands to all major browsers (mobile and desktop) and work with them as a real user would. Preparing The First Test With Selenium WebDriver First, I was a little skeptical of whether Selenium would suit my needs because the framework is most commonly used in Java, and I am certainly not a Java expert. Later, I learned that being a Java expert is not necessary to take advantage of the power of the Selenium framework. As a simple first test, I tested the login of one of my WordPress projects. Why WordPress? Just because using the WordPress login form is an example that everybody can follow more easily than if I were to refer to some custom web application. What do you need to start using Selenium WebDriver? Because I decided to use the most common implementation of Selenium in Java, I needed to set up my little Java environment. If you want to follow my example, you can use the Java environment of your choice. If you haven’t set one up yet, I suggest installing Eclipse and making sure you are able to run a simple “Hello world” script in Java. Because I wanted to test the login in Chrome, I made sure that the Chrome browser was already installed on my machine. That’s all I did in preparation. Downloading The ChromeDriver All major browsers provide their own implementation of the WebDriver interface. Because I wanted to test the WordPress login in Chrome, I needed to get the WebDriver implementation of Chrome: ChromeDriver. I extracted the ZIP archive and stored the executable file chromedriver.exe in a location that I could remember for later. Setting Up Our Selenium Project In Eclipse The steps I took in Eclipse are probably pretty basic to someone who works a lot with Java and Eclipse. But for those like me, who are not so familiar with this, I will go over the individual steps: - Open Eclipse. - Click the "New" icon. Creating a new project in Eclipse - Choose the wizard to create a new "Java Project," and click “Next.” Choose the java-project wizard. - Give your project a name, and click "Finish." The eclipse project wizard - Now you should see your new Java project on the left side of the screen. We successfully created a project to run the Selenium WebDriver. Adding The Selenium Library To Our Project Now we have our Java project, but Selenium is still missing. So, next, we need to bring the Selenium framework into our Java project. Here are the steps I took: - Download the latest version of the Java Selenium library. Download the Selenium library. - Extract the archive, and store the folder in a place you can remember easily. - Go back to Eclipse, and go to "Project" → “Properties.” Go to properties to integrate the Selenium WebDriver in you project. - In the dialog, go to "Java Build Path" and then to register “Libraries.” - Click on "Add External JARs." Add the Selenium lib to your Java build path. - Navigate to the just downloaded folder with the Selenium library. Highlight all .jarfiles and click "Open." Select all files of the lib to add to your project. - Repeat this for all .jarfiles in the subfolder libsas well. - Eventually, you should see all .jarfiles in the libraries of your project: The Selenium WebDriver framework has now been successfully integrated into your project! That’s it! Everything we’ve done until now is a one-time task. You could use this project now for all of your different tests, and you wouldn’t need to do the whole setup process for every test case again. Kind of neat, isn’t it? Creating Our Testing Class And Letting It Open the Chrome Browser Now we have our Selenium project, but what next? To see whether it works at all, I wanted to try something really simple, like just opening my Chrome browser. To do this, I needed to create a new Java class from which I could execute my first test case. Into this executable class, I copied a few Java code lines, and believe it or not, it worked! Magically, the Chrome browser opened and, after a few seconds, closed all by itself. Try it yourself: - Click on the "New" button again (while you are in your new project’s folder). Create a new class to run the Selenium WebDriver. - Choose the "Class" wizard, and click “Next.” Choose the Java class wizard to create a new class. - Name your class (for example, "RunTest"), and click “Finish.” The eclipse Java Class wizard. - Replace all code in your new class with the following code. The only thing you need to change is the path to chromedriver.exeon your computer:(); // Waiting a bit before closing Thread.sleep(7000); // Closing the browser and WebDriver webDriver.close(); webDriver.quit(); } } - Save your file, and click on the play button to run your code. Running your first Selenium WebDriver project. - If you have done everything correctly, the code should open a new instance of the Chrome browser and close it shortly thereafter. The Chrome Browser opens itself magically. (Large preview) Testing The WordPress Admin Login Now I was optimistic that I could automate my first little feature test. I wanted the browser to navigate to one of my WordPress projects, login to the admin area and verify that the login was successful. So, what commands did I need to look up? - Navigate to the login form, - Locate the input fields, - Type the username and password into the input fields, - Hit the login button, - Compare the current page’s headline to see if the login was successful. Again, after I had done all the necessary updates to my code and clicked on the run button in Eclipse, my browser started to magically work itself through the WordPress login. I successfully ran my first automated website test! If you want to try this yourself, replace all of the code of your Java class with the following. I will go through the code in detail afterwards. Before executing the code, you must replace four values with your own: The location of your chromedriver.exefile (as above), The URL of the WordPress admin account that you want to test, The WordPress username, The WordPress password. Then, save and let it run again. It will open Chrome, navigate to the login of your WordPress website, login and check whether the h1 headline of the current page is “Dashboard.” import org.openqa.selenium.By;(); // Maximize the browser window webDriver.manage().window().maximize(); if (testWordpresslogin()) { System.out.println("Test Wordpress Login: Passed"); } else { System.out.println("Test Wordpress Login: Failed"); } // Close the browser and WebDriver webDriver.close(); webDriver.quit(); } private static boolean testWordpresslogin() { try { // Open google.com webDriver.navigate().to(""); // Type in the username webDriver.findElement(By.id("user_login")).sendKeys("YOUR_USERNAME"); // Type in the password webDriver.findElement(By.id("user_pass")).sendKeys("YOUR_PASSWORD"); // Click the Submit button webDriver.findElement(By.id("wp-submit")).click(); // Wait a little bit (7000 milliseconds) Thread.sleep(7000); // Check whether the h1 equals “Dashboard” if (webDriver.findElement(By.tagName("h1")).getText() .equals("Dashboard")) { return true; } else { return false; } // If anything goes wrong, return false. } catch (final Exception e) { System.out.println(e.getClass().toString()); return false; } } } If you have done everything correctly, your output in the Eclipse console should look something like this: Understanding The Code Because you are probably a web developer and have at least a basic understanding of other programming languages, I am sure you already grasp the basic idea of the code: We have created a separate method, testWordpressLogin, for the specific test case that is called from our main method. Depending on whether the method returns true or false, you will get an output in your console telling you whether this specific test passed or failed. This is not necessary, but this way you can easily add many more test cases to this class and still have readable code. Now, step by step, here is what happens in our little program: - First, we tell our program where it can find the specific WebDriver for Chrome. System.setProperty("webdriver.chrome.driver","C:/PATH/TO/chromedriver.exe"); - We open the Chrome browser and maximize the browser window. webDriver = new ChromeDriver(); webDriver.manage().window().maximize(); - This is where we jump into our submethod and check whether it returns true or false. if (testWordpresslogin()) … - The following part in our submethod might not be intuitive to understand: The try{…}catch{…}blocks. If everything goes as expected, only the code in try{…}will be executed, but if anything goes wrong while executing try{…}, then the execution continuous in catch{}. Whenever you try to locate an element with findElementand the browser is not able to locate this element, it will throw an exception and execute the code in catch{…}. In my example, the test will be marked as "failed" whenever something goes wrong and the catch{}is executed. - In the submethod, we start by navigating to our WordPress admin area and locating the fields for the username and the password by looking for their IDs. Also, we type the given values in these fields. webDriver.navigate().to(""); webDriver.findElement(By.id("user_login")).sendKeys("YOUR_USERNAME"); webDriver.findElement(By.id("user_pass")).sendKeys("YOUR_PASSWORD"); Selenium fills out our login form - After filling in the login form, we locate the submit button by its ID and click it. webDriver.findElement(By.id("wp-submit")).click(); - In order to follow the test visually, I include a 7-second pause here (7000 milliseconds = 7 seconds). Thread.sleep(7000); - If the login is successful, the h1headline of the current page should now be "Dashboard," referring to the WordPress admin area. Because the h1headline should exist only once on every page, I have used the tag name here to locate the element. In most other cases, the tag name is not a good locator because an HTML tag name is rarely unique on a web page. After locating the h1, we extract the text of the element with getText()and check whether it is equal to the string “Dashboard.” If the login is not successful, we would not find “Dashboard” as the current h1. Therefore, I’ve decided to use the h1to check whether the login is successful. if (webDriver.findElement(By.tagName("h1")).getText().equals("Dashboard")) { return true; } else { return false; } Letting the WebDriver check, whether we have arrived on the Dashboard: Test passed! (Large preview) - If anything has gone wrong in the previous part of the submethod, the program would have jumped directly to the following part. The catchblock will print the type of exception that happened to the console and afterwards return falseto the main method. catch (final Exception e) { System.out.println(e.getClass().toString()); return false; } Adapting The Test Case This is where it gets interesting if you want to adapt and add test cases of your own. You can see that we always call methods of the webDriver object to do something with the Chrome browser. First, we maximize the window: webDriver.manage().window().maximize(); Then, in a separate method, we navigate to our WordPress admin area: webDriver.navigate().to(""); There are other methods of the webDriver object we can use. Besides the two above, you will probably use this one a lot: webDriver.findElement(By. …) The findElement method helps us find different elements in the DOM. There are different options to find elements: By.id By.cssSelector By.className By.linkText By.name By.xpath If possible, I recommend using By.id because the ID of an element should always be unique (unlike, for example, the className), and it is usually not affected if the structure of your DOM changes (unlike, say, the xPath). Note: You can read more about the different options for locating elements with WebDriver over here. As soon as you get ahold of an element using the findElement method, you can call the different available methods of the element. The most common ones are sendKeys, click and getText. We’re using sendKeys to fill in the login form: webDriver.findElement(By.id("user_login")).sendKeys("YOUR_USERNAME"); We have used click to submit the login form by clicking on the submit button: webDriver.findElement(By.id("wp-submit")).click(); And getText has been used to check what text is in the h1 after the submit button is clicked: webDriver.findElement(By.tagName("h1")).getText() Note: Be sure to check out all the available methods that you can use with an element. Conclusion Ever since I discovered the power of Selenium WebDriver, my life as a web developer has changed. I simply love it. The deeper I dive into the framework, the more possibilities I discover — running one test simultaneously in Chrome, Internet Explorer and Firefox or even on my smartphone, or taking screenshots automatically of different pages and comparing them. Today, I use Selenium WebDriver not only for testing purposes, but also to automate repetitive tasks on the web. Whenever I see an opportunity to automate my work on the web, I simply copy my initial WebDriver project and adapt it to the next task. If you think that Selenium WebDriver is for you, I recommend looking at Selenium’s documentation to find out about all of the possibilities of Selenium (such as running tasks simultaneously on several (mobile) devices with Selenium Grid). I look forward to hearing whether you find WebDriver as useful as I do!
https://www.smashingmagazine.com/2018/04/feature-testing-selenium-webdriver/
CC-MAIN-2020-10
refinedweb
2,649
63.49
. Widgets and Scala I've come up against the issue where @ClientWidget does not seem to work for the server-side widget class in Scala. Following some previous but unsolved forum posts led me to checking out .class files and so on. Interestingly all the .class files get generated and on inspection the server-side .class file seems to reference the annotation. But...it still fails at runtime. Of course as you'd expect reverting back to Java makes everything work. There is a work-around though. For example, say you're creating a widget called 'MyComponent'. Create the following files: MyComponent.scala MyComponentStub.java VMyComponent.java The 'MyComponentStub.java' is a dummy class used to get the widget builder to notice the annotation for the client-side class. @ClientWidget(VMyComponent.class) public class MyComponentStub extends AbstractComponent { } 'MyComponent.scala' then simply extends from it and implements the required overrides and custom widget code: class MyComponent extends MyComponentStub { // Custom widget overrides and code here } I'm mentioning this solution in case anyone has a better workaround that doesn't include generating a dummy class just the get the annotations recognised. The ideal would be ditching the dummy stub class and even having the client-side as Scala but I don't think that's going to happen any time soon. :-)
https://vaadin.com/forum/thread/1304072/widgets-and-scala
CC-MAIN-2022-40
refinedweb
219
58.89
CSS-in-JS Theming on a Component Level When I wrote Styled System on React Hooks I explored what it might look like in the near future to consume a theme context provided by the conventional <ThemeProvider/> through the pane of styled-system and React Hooks. In reality, we don’t need ThemeProvider as part of our CSS-in-JS package either. Which means we can split it out, chop it up, and note: This post was inspired by a pull request and some conversation with mitchellhamilton. ThemeProvider So let’s start at the beginning. For those who aren’t already aware the typical theme process uses something like this: const theme = {color: 'red',padding: [],...etc}<ThemeProvider theme={theme}>{children}</ThemeProvider> Then styled components can access the theme through interpolation: const Headline = styled.h1`color: ${props => props.theme.color};font-family: sans-serif;`; and css prop can access through a function <p css={theme => ({ color: theme.color })}>I'm also red!</p> This has a couple of different issues such as needing to wrap components in a ThemeProvider when testing, over-reliance on direct use of token values instead of building component-level APIs, etc No more ThemeProvider? So if we’re not locked in to using a single ThemeProvider package, what if we still want to use that approach, either because we like it and don’t need much different or because we want to migrate to a more modular approach where themes come from multiple contexts. Well, that uses React’s context support directly and hooks. import { createContext, useContext } from "react";const defaultTheme = {colors: {primary: "hotpink",secondary: "green"}};let ThemeContext = createContext(defaultTheme);export const ThemeProvider = ThemeContext.Provider;export const useTheme = () => useContext(ThemeContext); We take a set of default values and create a new theme context. Then we export a provider and a hook that uses the context. This allows us to statically type the values our theme accepts (something that could be more troublesome in the old ThemeProvider) so when the defaults are replaced by a user, we keep our types. Splitting it up One interesting facet of themes is that the theme object typically becomes a merging of component-level token API translations and generic design tokens. Sometimes this even goes so far as to create “JSON Specs” for the colors and sizing. An OutlineButton, for example, might expose knobs to change the color of the border and text at the same time. We could call this color and it could be associated with a variant like primary, secondary, etc. Our OutlineButton can now expose this via its own context and we can translate our theme tokens into buttons. import { ThemeProvider } from "button";import theme from "our-tokens";const buttons = {variants: {primary: {color: theme.brand},secondary: {color: "black"}}};export default ({ children }) => (<ThemeProvider value={buttons}>{children}</ThemeProvider>); We’ve now allowed the OutlineButton to expose an API for changing values that we can map our generic tokens onto in an explicit way. If we need another OutlineButton, we can construct another using our design tokens and now we also have a list of all the OutlineButtons in wide use. We could also grab our-theme from context as well to do the translation in a slightly different place and allow any overrides that have been made to the core tokens to be used (such as a new products brand color). import { ThemeProvider } from "button";import { useTheme } from "our-tokens";export default ({ children }) => {const theme = useTheme();return (<ThemeProvidervalue={{variants: {primary: { color: theme.brand },secondary: { color: "black" }}}}>{children}</ThemeProvider>);}; NPM Components By using native context APIs (through hooks) we can avoid property conflicts between different NPM packages. We can ship themes using the names that make the most sense, not prefixed with the component name because the context is our namespace. The point here isn’t that we should immediately go off and split all of our themes up into a million little contexts. It is more that we’ve opened up some additional design space relating to how we build and distribute components. We can explore how to compose multiple disparate components into a usable, distributable collection that leverages our brand and our types.
https://www.christopherbiscardi.com/post/css-in-js-theming-on-a-component-level/
CC-MAIN-2019-47
refinedweb
695
50.67
Search found 1 match Search found 1 match • Page 1 of 1 - Sun Apr 05, 2015 2:59 am - Forum: Volume 102 (10200-10299) - Topic: 10279 - Mine Sweeper - Replies: 102 - Views: 29016 Re: 10279 - Mine Sweeper Hi, could any one help why i only got WR every time? I've tested a lot of inputs in my program and in the uDebug and they are both give me the same output. I don't know what i'm doing wrong. This simple problem is blowing my mind :o #include <stdio.h> #include <iostream> using namespace std; int mai... Search found 1 match • Page 1 of 1
https://onlinejudge.org/board/search.php?author_id=141483&sr=posts
CC-MAIN-2020-34
refinedweb
106
88.36
Automation support in MFC is a great example of why some people don't like MFC: it works great as long as you follow the pre-made examples and use MFC exactly like it was designed, but as soon as you get even a little bit off the beaten path, you're on your own. There are some tutorials in MSDN and articles online that will teach you how to use the 'New project' wizard to generate an automation-enabled application, and some of those even explain some of the working of the code the wizard generates - but unfortunately, that's not always how things go in the Big Bad Real World. Sometimes, you inherit an application that is so old that the initial skeleton was probably generated with the wizard of Visual Studio 4; that has been expanded and hacked on by dozens of people, each with their own understanding (or lack thereof) of the MFC doc/view architecture; that has mutated from an afternoon-hack-proof-of-concept to a piece of software that is critical for the survival of the company; that has had so much surgery that its innards have started to resemble (metaphorically speaking) the leftovers of the struggle that a 3-year old had with a big bowl of spaghetti bolognese. Believe me - not pretty. So, what can you do when you are asked to add automation support to such an application? Starting over with a fresh application and moving the functionality of the old code back in is not an option. And even if it was, you would find out that the wizard-generated code is built for the idea that the central element of your application's object model is the Document. In some MFC applications, that is simply not the case any more. The only recourse is to figure out exactly what it is that makes automation tick in an MFC application - and add those pieces into the old application. The obvious way to start is to take an application that is wizard-generated with automation support, and compare it to an application that doesn't have automation support. Add those differences to the old application and you're all set, right? Well, that's partially true - as long as the object model that you want to implement is centered around a Document, as I said before. If you have an object model that doesn't work this way, and you wonder how to get automation to work, read on. "But wait", you say, "what is this 'automation' thing you've been talking about?". Ah yes, esteemed reader, excuse me for not elaborating on this earlier. Automation is, simply put, a way for your application to interact with Visual Basic, VBScript, JavaScript and, indeed, any other language that can work with COM objects. Which reveals how automation is implemented: as a COM interface. Which also reveals that in order for your application to support automation, it will have to support COM. It would be outside the scope of this article to give a complete primer on COM (and indeed for a complete primer on automation as well); I refer to the section 'References' for further reading for those who do not have at least some notion of what COM is and how it works. I will suppose from now on that you know what COM and automation are; that you know what an 'object model' is, and that you have one (or at least have an idea of what it will look like) for the application you wish to automate; and that you know about MFC's Doc/View architecture. You don't have to know a whole lot about that last one though, since the biggest part of this article is about how to *not* use it. Although I said that you can use automation from any language, there is a little nuance to to be made to that statement. For scripting languages to access a COM object, they would need to have a description of the interface of the object. That description can be read from a type library (.tlb file) but not all scripting languages have access to that. Therefore, there is a way to query an object for the methods it provides: implementing the IDispatch interface. But for languages who *can* read a tlb, there should be a way to do that, too. The solution is simple: a dual interface. Again, for details on the theory on dual interfaces, see the section 'References'; I'm bringing it up here because I will assume that you want your objects to have a dual interface. By now, being the interested reader you are, you've looked up 'automation' in MSDN, and you've seen a wealth of articles that explain the concept of automation in MFC and how to use the class wizard to add automation-enabled classes. So, you're probably wondering "Why am I reading this - I can get this same information from MSDN?". You see, the problem is that these articles are based on the following (implicit) assumptions: No documentation gives a step-by-step overview of what you have to do to automate an existing application, detailing what everything does, and the considerations to take into account. That is what this article tries to remedy. This article, of course! Below, I will present the steps to take to make your application scriptable from every COM-enabled language. It turns out that the changes you have to make can be divided in these groups: CCmdTarget-derived classes. I've also included a small section on how to start your automated application from C++ and VBScript for writing small test clients. I will present all steps in a tutorial-style way, and explain in the process what those steps do and what they are for. The included sample project contains a vanilla MFC multiple-document application, except for the minimal changes necessary to get automation to work. Those changes are clearly marked in the code. To keep the code in this article to a minimum, I will only add one COM object. The name of the application that I'll automate is 'MyCoolApp', and the COM object that will be accessible from the outside will be a generic object named 'Application' with one method: Show(), which will, unsurprisingly, show the window. I find this to be a good first method to implement since automated applications will not be shown by default when they are instantiated from an automation client. When you are developing your application, you can call the Show() method, and when your application shows up, you know that the automation works. The first step is to add a file that has the description of the COM objects. In the Solution Explorer, right-click on your application and select 'Add' -> 'Add New Item'. Choose 'MIDL file' and type in a file name, like 'mycoolapp.idl'. This will add the file to your project and open it. As mentioned before, we'll make an object named 'application' with one method: Show(). The IDL is mostly boilerplate code. The only thing you must remember if you choose to copy this sample is to change the GUIDs. A GUID is a globally unique identifier for your interfaces; if you copy the GUIDs below, they may conflict with another application that also uses them! This may or may not pose a problem in the future, but to be sure, change them! It's easy to generate a GUID: in Visual Studio, click 'Tools', 'Create GUID', and there you go. Click the 'Copy' button to copy the newly generated GUID to the clipboard. That being said, here is the code: #include "olectl.h" [ uuid(526E36B7-F346-4790-B741-75D9E5B96F4B), version(1.0) ] // This is usually the name of your application. library mycoolapp { importlib("stdole32.tlb"); importlib("stdole2.tlb"); [ uuid(6263C698-9393-4377-A6CC-4CB63A6A567A), oleautomation, dual ] interface IApplication : IDispatch { [id(1), helpstring("method Show")] HRESULT Show (void); }; [ uuid(9ACC7108-9C10-4A49-A506-0720E0AACE32) ] coclass Application { [default] interface IApplication; }; }; Some points of attention: Now, we'll add a class that represents the object that will be automated (that is, that can be accessed by automation clients). This is, your client's entry point into your application (or one of the entry points if you implement multiple interfaces). Adding it is fairly straightforward, I'll walk you through it: Add a class and name it after your interface, 'Application' in this case. I'll stick with the MFC naming and call it CApplication for now (although I hate the C prefix personally - see References). You can do this with the wizard or add a class by hand. Derive it from CCmdTarget. Add in #include statement (I'll explain later where this comes from): #include "mycoolapp_h.h" Add the following functions: virtual void OnFinalRelease() { CCmdTarget::OnFinalRelease(); } HRESULT Show() { AfxGetApp()->m_pMainWnd->ShowWindow(TRUE); return TRUE; } This is the place where you would place any cleanup code for your object. We have a simple example, there is no cleanup needed; we just call the parent. Add the following macros in the header: DECLARE_DYNCREATE(CApplication) DECLARE_MESSAGE_MAP() DECLARE_OLECREATE(CApplication) DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() These macros set up some members and functions that are needed to register the class with the system and to route calls to the COM object to your (C++) object. Add an enum: enum { dispidShow = 1L }; In this enum, you need to have an entry for every function you add to your interface. In this example, there is only one, Show(), so there is only one entry in the enum. You can make up your own names here - later, we'll see where those names are referenced. Next, declare an interface map and put in entries for every function you want your automation object to have. This sounds complicated but it's just a simple macro and some cut and paste: BEGIN_INTERFACE_PART(LocalClass, IApplication) STDMETHOD(GetTypeInfoCount)(UINT FAR* pctinfo); STDMETHOD(GetTypeInfo)( UINT itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo); STDMETHOD(GetIDsOfNames)( REFIID riid, OLECHAR FAR* FAR* rgszNames, UINT cNames, LCID lcid, DISPID FAR* rgdispid); STDMETHOD); STDMETHOD(Show)(THIS); END_INTERFACE_PART(LocalClass) "But Roel", you'll ask, "what the hell is all of that?", and I'll tell you: GetTypeInfoCount(), GetTypeInfo(), GetIDsOfNames() and Invoke() form the implementation of IDispatch, and Show() is the implementation of the method in our interface. If you want to know exactly what the first four do, I'll refer you to MSDN, but believe me, you're better off copying and pasting - that's what I did. For those wondering if all that standard stuff cannot be wrapped in a macro: see at the end of this article. The MFC ACDual example provides such macros. Now, it's time for the implementation of the class that we just wrote a header for. Start with the MFC macro to implement dyncreate: IMPLEMENT_DYNCREATE(CApplication, CCmdTarget) Next, implement the constructor and the destructor, and add the following statements to them besides your own code: EnableAutomation()and ::AfxOleLockApp()in the constructor ::AfxOleUnlockApp()in the destructor Then implement the message map: BEGIN_MESSAGE_MAP(CApplication, CCmdTarget) END_MESSAGE_MAP() Now comes the interesting part: the dispatch map. A dispatch map looks a lot like a message map, in that it has a BEGIN_DISPATCH_MAP part, entries for every function that your interface has, and ends with a END_DISPATCH_MAP macro. This example will show the dispatch map for our simple interface with only one method: BEGIN_DISPATCH_MAP(CApplication, CCmdTarget) DISP_FUNCTION_ID(CApplication, "Show", dispidShow, Show, VT_EMPTY, VTS_NONE) END_DISPATCH_MAP() The arguments to the BEGIN_DISPATCH_MAP macro are the same as those to the message map: the name of the class and the name of the class it is derived from. The arguments to DISP_FUNCTION_ID are more interesting. The first one is (again) the name of the class you're implementing. The second one is a short string description of your method. It will generally be the same as the name you use in your class. The third one is a unique number that we've set up in an enum in the class declaration. This number has to be unique, that's why an enum is convenient here (and of course, also because it allows you to work with descriptive names instead of numbers). The next argument is the name of the method of the class in which the interface method is implemented. As I mentioned, this is usually the same as the second argument (except for the quotes, that is). The fifth argument then is the return type of the method. This is not as you would expect VT_HRESULT but rather VT_NONE for all methods. It would take us too far to explain here why that is exactly, but in a few words: all methods of a dispinterface return HRESULTs, as reflected by the return type of the Show() method. That HRESULT, however, is used for error reporting, not to actually return a value. As such, when you call Show() from, for example, Visual Basic, you don't get to see that HRESULT at all - if an error would occur, VB's standard error handling mechanism would kick in. Therefore, you should declare all functions in your dispatch map as returning VT_NONE. The last argument to the DISP_FUNCTION_ID macro then is a space-separated list of the arguments that the function takes. Since ours doesn't take any arguments at all, we put in VTS_NONE. If it would have taken a string and an integer, we would have used " VTS_BSTR VTS_I2", for example. See MSDN for a full list of constants that are allowed here. So far, for the dispatch map. On to the next map: the interface map. This is where the actual 'connection' between the COM object (your automated application) and your C++ object is made. Again, let's start with an example: BEGIN_INTERFACE_MAP(CApplication, CCmdTarget) INTERFACE_PART(CApplication, IID_IApplication, LocalClass) END_INTERFACE_MAP() The first argument of the INTERFACE_PART macro is once again the name of the class we're implementing; the second argument is the interface name (most likely ' IID_' + the name of your interface), and the third argument is the first argument to the BEGIN_INTERFACE_PART macro (which we put in the declaration). Easy as that. One more 'standard' implementation has to be done, using the IMPLEMENT_OLECREATE macro. Sample: IMPLEMENT_OLECREATE(CApplication, "mycoolapp.Application", 0x9acc7108, 0x9c10, 0x4a49, 0xa5, 0x6, 0x7, 0x20, 0xe0, 0xaa, 0xce, 0x32) The first argument is the name of the coclass as you specified it in the IDL file. The second name is the textual description by which your object will be known to, for example, Visual Basic; if you're not sure what to choose, make it '<library name>' + '.' + '<interface name>'. Look back at the IDL example and you'll see what I mean. The third parameter is very important: it's the GUID of the coclass you declared in the IDL file. We're almost done here: add the implementation of the IDispatch members to the class: STDMETHODIMP_(ULONG) CApplication::XLocalClass::AddRef() { METHOD_PROLOGUE(CApplication, LocalClass) return pThis->ExternalAddRef(); } STDMETHODIMP_(ULONG) CApplication::XLocalClass::Release() { METHOD_PROLOGUE(CApplication, LocalClass) return pThis->ExternalRelease(); } STDMETHODIMP CApplication::XLocalClass::QueryInterface( REFIID iid, LPVOID* ppvObj) { METHOD_PROLOGUE(CApplication, LocalClass) return pThis->ExternalQueryInterface(&iid, ppvObj); } STDMETHODIMP CApplication::XLocalClass::GetTypeInfoCount( UINT FAR* pctinfo) { METHOD_PROLOGUE(CApplication, LocalClass) LPDISPATCH lpDispatch = pThis->GetIDispatch(FALSE); ASSERT(lpDispatch != NULL); return lpDispatch->GetTypeInfoCount(pctinfo); } STDMETHODIMP CApplication::XLocalClass::GetTypeInfo( UINT itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo) { METHOD_PROLOGUE(CApplication, LocalClass) LPDISPATCH lpDispatch = pThis->GetIDispatch(FALSE); ASSERT(lpDispatch != NULL); return lpDispatch->GetTypeInfo(itinfo, lcid, pptinfo); } STDMETHODIMP CApplication::XLocalClass::GetIDsOfNames( REFIID riid, OLECHAR FAR* FAR* rgszNames, UINT cNames, LCID lcid, DISPID FAR* rgdispid) { METHOD_PROLOGUE(CApplication, LocalClass) LPDISPATCH lpDispatch = pThis->GetIDispatch(FALSE); ASSERT(lpDispatch != NULL); return lpDispatch->GetIDsOfNames(riid, rgszNames, cNames, lcid, rgdispid); } STDMETHODIMP CApplication::XLocalClass:) { METHOD_PROLOGUE(CApplication, LocalClass) LPDISPATCH lpDispatch = pThis->GetIDispatch(FALSE); ASSERT(lpDispatch != NULL); return lpDispatch->Invoke(dispidMember, riid, lcid, wFlags, pdispparams, pvarResult, pexcepinfo, puArgErr); } Again, this is boilerplate code that can be simplified a lot using a few macros that are provided with the ACDual MSDN example. See the section near the end about that. And finally, add the implementation of the Show() function. We just call the owner class' Show() method: STDMETHODIMP CApplication::XLocalClass::ShowWindow() { METHOD_PROLOGUE(CApplication, LocalClass) pThis->ShowWindow(); return TRUE; } We also need to make some changes to OnInitInstance() to setup and register the COM objects with the system (in the registry). The first one is to call: COleTemplateServer::RegisterAll(); The project wizard will put this call right after the ini files are loaded with LoadStdProfileSettings(); I suggest putting it there as well. It doesn't really matter, but it will look more familiar if/when you'd compare it to a wizard-generated application. Then, scroll down a few lines until you see a call to ParseCommandLine(). Right after that, add the following code: if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated) { return TRUE; } else if (cmdInfo.m_nShellCommand == CCommandLineInfo::AppUnregister){ AfxOleUnregisterTypeLib(LIBID_mycoolapp); } else { COleObjectFactory::UpdateRegistryAll(); AfxOleRegisterTypeLib(AfxGetInstanceHandle(), LIBID_mycoolapp); } When your application is started from automation, it will be run with the parameters /Embedding or /Automation. In that case, we don't want to show the main window, so we return immediately. This means, of course, if you do want to show the main window, that you should call pMainFrame->ShowWindow(TRUE); before returning. The second ' if' tests whether your application was run with the /Unregserver or /Unregister switches. If it is, we remove all references to our application from the registry (actually, we let MFC do this for us). Finally, if we detect none of these switches, we let MFC put references to our COM objects into the registry. Yes, this means that every time your application is run, it is re-registered; this is to ensure that the registry is always consistent with the latest location of the executable. That's all there is to it as far as the changes to OnInitInstance go. If you would generate an automation-enabled application with the wizard, you'd see more code here, more specifically a few calls to functions of an m_server object of type ColeTemplateServer. They are for the case that you want your Document to be automation-enabled; it is associated with a doctemplate so that a new document can be created when the automation server is started. Since this code is generated automatically with the wizard, I won't describe it here. One final thing to do is to embed the type library in the resources section of your application. Go to the resource view, right-click on the resource file name, and choose 'resource includes'. At the bottom of the lower box, insert: 1 TYPELIB "<appname>.tlb" where <appname> is the name of your application, of course (in our case, it would have been 'MyCoolApp.tlb'). This way, the resource compiler will embed the type library into the executable so that you don't have to distribute it separately. This step isn't strictly necessary but will make your life easier: register your application every time it is build. It is simple: in the Properties of your project, add the following line to your post-build event: "$(TargetPath)" /RegServer To get your project to compile, you need to link in a file that was generated by the MIDL compiler: mycoolapp_i.c. To do this, right-click on 'MyCoolApp' in the Solution Explorer, choose 'Add' -> 'Add Existing Item...', and select mycoolapp_i.c. Of course, you want to test your new automated application. Remember that there are two ways to get to your objects: through 'regular' COM (or 'early binding', only for those environments that support it, like C++) and through IDispatch ('late binding', for scripting languages like VBScript). I'll demonstrate both methods here. Let's start with a very simple C++ application. Make a simple dialog-based application with the class wizard, be it an MFC or an ATL/WTL application. Just make sure that :CoInitialize() and CoUninitialize() are called somewhere (that is done automatically in ATL applications). Put a button on the dialog somewhere, wire it up, and put the following in the message handler for the BN_CLICKED handler: HRESULT hr; hr = ::CoCreateInstance(CLSID_Application, NULL, CLSCTX_LOCAL_SERVER, IID_IApplication, (void**)&m_IApplication); if(SUCCEEDED(hr)) { if (m_IApplication) { m_IApplication->Show (); } } In the header for the dialog, declare a member like this: IApplication* m_IApplication; Now, all you need to do is include the file where IApplication is declared. It is automatically generated from the IDL file by the midl.exe IDL compiler, so you'll have to either copy it to the directory of your test application (which you'll have to do every time you change the IDL file) or construct a #include statement with a relative path in it. The file is named (by default) <coclassname>_h.h, so in our example, it is Application_h.h. When you go looking for this file, you'll notice another file: Application_i.c. This file contains the implementation of the interface and is needed by the linker. So, again, you can copy it, or add it to your project directly. Now, build your application, click the button you've made, and voila - there is your application! Notice that if you take out the m_IApplication->Show(); line, you can still see your application being started by looking for it in the process list in the Windows Task Manager. It's easier to start your application from VBScript. In three lines: Dim obj Set obj = CreateObject("mycoolapp.Application ") obj.Show () Notice that the argument that we pass to CreateObject is the name we passed in the IMPLEMENT_OLECREATE macro. Also, note that if you leave out the last line in one script, create a new script with all three lines, and run first the two-line script and then the three-line one, your application will be started only once! That means that if you call CreateObject() when an instance of your application is already running, a reference to that running instance will be returned. A lot of the code in this article is very standard: it will be exactly the same in every application you will ever automate. To avoid that, you can use the code in a header file that is provided with the ACDual example: mfcdual.h. The example itself can be found on MSDN; apart from some error handling code (which we didn't discuss in this article), it contains these macros: BEGIN_DUAL_INTERFACE_PART: use this instead of BEGIN_INTERFACE_PART; it takes care of declaring the implementation of the IDispatchinterface. DELEGATE_DUAL_INTERFACE: add this one to your .cpp file to implement the functions that were declared with BEGIN_DUAL_INTERFACE_PART. I strongly suggest you look at the way these macros are used in the ACDual example, and that you look at their contents; it will help you understand your application better when something goes wrong (notice that I didn't say 'if' but 'when'). 4 Jul 2005 - updated download by Trevisan Andrea: The download code was reworked a little to include some important parts and ensure the solution file type is compatible with Microsoft Visual Studio.NET 2002 Academic. General News Question Answer Joke Rant Admin
http://www.codeproject.com/KB/COM/mfc_autom.aspx
crawl-002
refinedweb
3,842
50.36
resume builder comparison resume genius vs linkedin labs . linkedin has a new resume feature read about it here . download how to post resume on linkedin haadyaooverbayresort com . convert your linkedin profile to a beautiful resume . stunning design linkedin resumes 8 create resume from linkedin . how to quickly write a resume today with linkedin . download create resume from linkedin haadyaooverbayresort com . en resume linkedinlabs com tenemos la opción oficial de linkedin . resume builder create a resume from your linkedin profile . linkedin resume template trendy resumes . linkedin public profile url resume writing services for . convert your linkedin profile to a pdf resume visualcv . resumes and hackdays official linkedin blog . beautiful linkedin resume creator gallery simple resume office . 18 linkedin apps tools and resources boolean black belt . resume resume from linkedin regularguyrant best resume site for . linkedin resume haadyaooverbayresort com . 2 tools to turn your linkedin profile into a neat looking resume . how to include a linkedin url on your resume examples zipjob . resumes vs linkedin profiles what you should know robert . resume builder from linkedin resume builder comparison resume . how should my linkedin profile differ from my resume quora . how to include your linkedin url on your resume . cv presentation vs the old fashioned cv . linkedin profile examples for you to use . make a resume from linkedin how to quickly write a resume today . adding linkedin profile to resume 9805 . print free resume templates linked in resume linkedin on resumes . bright haircut stylist resume tags hair stylist resume good . resume linkedin job awesome resume on linked in what employers . the ultimate resume template for any 22 year old ifiwere22 . resume examples of simple resumes for jobs alexa resume . how to upload your resume to linkedin job market social networking . how to add your linkedin resume to wordpress 5 plugins wp solver . how to import your resume to your linkedin profile david lu . linkedin cv chrome web store . 10 ways to turn your linkedin profile into a job finding machine . resume success stories letter resumes awesome resume on . should i just copy and paste my project management cv into . a resume vs linkedin what you need to know the resumesmith . hetal lalakia linkedin resume . ozov biz wp content uploads why this is an excelle . import your resume in one click on linkedin by grovo com grovo . 9 simple tips to make a better linkedin profile . how to create an online resume using wordpress elegant themes blog . resume infographic visual resumes awesome resume on linked in . 6 of the most creative resumes in internet history linkedin . linkedin resume examples jim hensons resume built by resume . 10 free online tools to create professional resumes hongkiat . download linkedin resume search haadyaooverbayresort com . how to write a research paper and high school writing tips resume . team leader sample resumes amitdhull co . how to print a linkedin profile as a resume the chrome extension . professional progressions consulting resumes cover letters . sweet resume resource guide uw tags resume guides linked . cv resume design personal and client on behance . resume images about creative cv resume on pinterest resume . 100 how to upload a resume to linkedin how to write an . resume 10 resume words not use awesome resume on linked in 10 . linkedin just made writing your resume in microsoft word a whole . linkedin resume search resume example . engrossing basic assistant teacher resume tags teacher assistant . how to upload a resume to linkedin youtube . cool linked in upload resume 76 with additional resume templates . linkedin checklist for a job seeker post hackbright hackbright . why marissa mayer s resume template isn t right for you rosa e . recreation manager resume linked in . create a linkedin profile and export as pdf resume youtube . stay organized by adding resumes to recruiter profiles . upload resume linkedin resume templates . learn more resume and linked in dream life team . charismatic picture of duwur delight motor noteworthy yoben . executive assistant free resume samples blue sky resumes . Recent Posts Contact | Disclaimer | Privacy | Copyright | Terms | crawler
http://botbuzz.co/linked-resumes/
CC-MAIN-2018-17
refinedweb
657
70.9
Hi all, I’m practising while-loop on this “Over 9000 Challenge” Here’s the coding question: Create a function named over_nine_thousand()that takes a list of numbers named lstas a parameter. The function should sum the elements of the list until the sum is greater than 9000. When this happens, the function should return the sum. If the sum of all of the elements is never greater than 9000, the function should return total sum of all the elements. If the list is empty, the function should return 0. For example, if lstwas [8000, 900, 120, 5000], then the function should return 9020. Here’s my code: def over_nine_thousand(lst): total = 0 index = 0 while total < 9000: total += lst[index] index += 1 if total > 9000: break return total I’m getting an error of: list index out of range I’m not sure why the error?
https://discuss.codecademy.com/t/over-9000-challenge-while-loop/684737
CC-MAIN-2022-33
refinedweb
147
68.4
Displaying rooms This was our original example from step 2.2 showing how a room description might look in the game: The Dining Hall ------------------- A large room with ornate golden decorations on every wall The Kitchen is north The Ballroom is west Let’s add a new method to the Room class to report the room name, description, and the directions of all the rooms connected to it. Go back to the room.py file and, below the link_room method, add a new method which will display all of the rooms linked to the current room object. Don’t forget to make sure the new method is indented, just like all the other methods. def get_details(self): for direction in self.linked_rooms: room = self.linked_rooms[direction] print( "The " + room.get_name() + " is " + direction) This method loops through the dictionary self.linked_rooms and, for every defined direction, prints out that direction and the name of the room in that direction. Go back to the main.py file and, at the bottom of your script, call this method on the dining hall object, then run the code to see the two rooms linked to the dining hall. dining_hall.get_details() Challenge Add some code to the get_details()method so that it also prints out the name and description of the current room, as in our original example. Remember that we can refer to the current room as selfinside the method. Check that your get_details()method works for any room object by calling it on the kitchen and ballroom as well. © CC BY-SA 4.0
https://www.futurelearn.com/courses/object-oriented-principles/1/steps/200246
CC-MAIN-2018-43
refinedweb
261
72.87
Lineage tricks¶ This example shows some niche, but useful functionalities of cellrank.tl.Lineage. cellrank.tl.Lineage is a lightweight wrapper around numpy.ndarray containing names and colors which stores the data in columns and allows for pandas-like indexing. It also provides various methods, such as a method for plotting some aggregate information for each column. We use it primarily to store either the fate probabilities or the macrostates memberships, see Compute absorption probabilities or Compute macrostates, to learn how to compute them. import numpy as np import cellrank as cr np.random.seed(42) The lineage class behaves like a numpy array for the most part. The key differences are that only 2 dimensional arrays are allowed as input and that it always tries to preserve it’s shape, even if scalar is requested. The constructor requires the underlying array and the lineage names, which must be unique. The colors are optional and by default they are automatically generated. lin = cr.tl.Lineage( np.abs(np.random.normal(size=(10, 4))), names=["foo", "bar", "baz", "quux"] ) lin /= lin.sum(1) In some cases, this behavior is not desirable or can have unintended consequences. To access the underlying numpy array, use the cellrank.tl.Lineage.X attribute. lin.X Out: array([[0.17703771, 0.04927984, 0.23084765, 0.54283479], [0.08318243, 0.0831766 , 0.5610116 , 0.27262937], [0.24184977, 0.27949985, 0.23872966, 0.23992072], [0.05446598, 0.43068153, 0.38828094, 0.12657155], [0.27768531, 0.08615638, 0.24895063, 0.38720768], [0.46035999, 0.07091629, 0.0212106 , 0.44751312], [0.24948831, 0.05083536, 0.52749551, 0.17218082], [0.17949245, 0.08716859, 0.17981159, 0.55352737], [0.00433354, 0.33959804, 0.26409355, 0.39197487], [0.05654772, 0.53056103, 0.35959305, 0.0532982 ]]) Lineages can also be transposed. lin.T 4 lineages x 10 cells Indexing into lineage can be done via the names as well. lin[["foo", "bar"]] 10 cells x 2 lineages Two or more lineage can be combined into by joining the names with “,”. This also automatically updates the color based on the combined lineages’ colors. lin[["bar, baz, quux"]] 10 cells x 1 lineage Most of the numpy methods are supported by the cellrank.tl.Lineage. One can also calculate the entropy, which in [Setty19] is defined as the differentiation potential of cells. lin.entropy(axis=1) 10 cells x 1 lineage When subsetting the lineage and not selecting all of them, they will no longer sum to 1 and cannot be interpreted as a probability distribution. We offer a method cellrank.tl.Lineage.reduce which can be used to solve this issue. Below we show only one out of many normalization techniques. lin.reduce("foo, quux", "baz", normalize_weights="softmax") 10 cells x 2 lineages Lastly, we can plot aggregate information about lineages, such as numpy.mean() and others. Total running time of the script: ( 0 minutes 3.165 seconds) Estimated memory usage: 10 MB Gallery generated by Sphinx-Gallery
https://cellrank.readthedocs.io/en/stable/auto_examples/other/compute_lineage_tricks.html
CC-MAIN-2021-21
refinedweb
493
56.66
Imagine writing a Computer Vision library using OpenCV. You want your code to be easily portable to Linux, Mac, Windows, iOS, Android and even embedded devices. So you choose to build your library in C++ using OpenCV. Excellent choice! Along comes a client who wants to license your entire library but they want it delivered as a Python module. You say, “No problem!” and search the internet for a solution. BOOM! you land on this blog post! Awesome! We are going to learn how to build a Python module from your OpenCV C++ code. Python Bindings for C++ code The neat thing about a library written in a system programming language like C++ is that there are standard ways of creating a binding for this library in a higher level language like Python. Before we jump into our solution, I want to briefly explain how to create Python bindings for your C++ code. If you want to understand the technical nitty gritty of how your generic C++ code can be used to build a python module, check out this tutorial. To summarize the steps, you need the following pieces - Write a Python callable wrapper function: This function parses the arguments and calls the actual C/C++ function. It also handles any errors. - Register functions and methods : Next you need use PyMethodDefto register the function in the module’s symbol table. - Create an init function: Finally, we need use Py_InitModuleto create an initialization function for the module. This is all fine and dandy but if you have a large library, doing this by hand is cumbersome and error prone. So we will generate most of this code automatically using a python script. Python bindings for OpenCV based C++ code As you may know, OpenCV is written in C++. The good folks at OpenCV have created bindings for Python which enables us to compile OpenCV into a Python module (cv2). Wouldn’t it be cool if we could piggyback on the work already done by the community? So we took inspiration from this tutorial and created a simplified example. We will use the same scripts used by OpenCV to generate their Python module and minimally change their main wrapper file (cv2.cpp) to create our own module. We will call this module bv after my consulting company Big Vision LLC. There are huge benefits to this approach. - Efficient and consistent mapping: Having efficient Python types mapped to efficient C++ types consistent with OpenCV’s mappings. - Suitable idioms: Having idioms suitable to the library means we are leveraging the hard work done by the community. For instance, in OpenCV using the argument type to be OutputArrayinstead of Matin a function definition automatically makes it an a output returned by the function in the exported Python module. - Easy function and class definition : This allows easy mapping of classes and functions. We have to define them only once in C++. If done by hand you will end up doing work equivalent to defining a class again in Python. To easily follow along this tutorial, please download code by clicking on the button below. It’s FREE! The code is inside the pymodule directory of the code base. The directory structure is shown on the left. It has the following files - bv.cpp, pycompat.hpp : bv.cpp is a slightly modified version of the wrapper file (cv2.cpp) that comes with OpenCV. It uses pycompat.hpp for Python 2 / 3 compatibility checks. - bvtest.py : Python code for testing our module (bv) once we have built it. In our example, we have a function bv.fillHolesand a class bv.bv_Filtersexposed in the Python module. The C++ implementations of fillHolesand Filtersare in src/bvmodule.cpp. import cv2 import sys sys.path.append('build') import bv im = cv2.imread('holes.jpg', cv2.IMREAD_GRAYSCALE) imfilled = im.copy() bv.fillHoles(imfilled) filters = bv.bv_Filters() imedge = filters.edge(im) cv2.imshow("Original image", im) cv2.imshow("Python Module Function Example", imfilled) cv2.imshow("Python Module Class Example", imedge) cv2.waitKey(0) - gen2.py, hdr_parser.py : The Python bindings generator script (gen2.py) calls the header parser script (hdr_parser.py). These files are provided as part of the OpenCV source files. According to the OpenCV tutorial, “this header parser splits the complete header file into small Python lists. So these lists contain all details about a particular function, class etc.” In other words, these scripts automatically parse the header files and register the functions, classes, methods etc. with the module. - headers.txt: A text file containing all the header files to be compiled into the module. In our example, it contains just one line src/bvmodule.hpp. - holes.jpg: Example image used by our Python module test script bvtest.py - src/bvmodule.cpp: This cpp file contains the functions and class definitions. In this example, we implemented a function fillHolesand a class Filterswith just one method called edge. The function fillHoles takes a gray scale image and fills any holes (dark regions surround by white areas). The method edgesimply performs Canny edge detection. #include"bvmodule.hpp" namespace bv { void fillHoles(Mat &im) { Mat im_th; // Binarize the image by thresholding threshold(im, im_th, 128, 255, THRESH_BINARY); // Flood fill Mat im_floodfill = im_th.clone(); floodFill(im_floodfill, cv::Point(0,0), Scalar(255)); // Invert floodfilled image Mat im_floodfill_inv; bitwise_not(im_floodfill, im_floodfill_inv); // Combine the two images to fill holes im = (im_th | im_floodfill_inv); } void Filters::edge(InputArray im, OutputArray imedge) { // Perform canny edge detection Canny(im,imedge,100,200); } Filters::Filters() { } } - src/bvmodule.hpp: Not all functions and methods in your code need to be exposed to the Python module. This header file explictly mentions which ones we want to export. #include <opencv2/opencv.hpp> using namespace std; using namespace cv; namespace bv { CV_EXPORTS_W void fillHoles(Mat &mat); class CV_EXPORTS_W Filters { public: CV_WRAP Filters(); CV_WRAP void edge(InputArray im, OutputArray imedge); }; } Note: We used InputArray and OutputArray instead of Mat in the edge method of the class. Doing so makes imedge the output in the exported Python code and we are able to use this line in the Python example above. imedge = filters.edge(im) Steps for building the Python module We are now ready to go over the steps for building our Python module. - Step 1: Put your c++ source code and header files inside the src directory. - Step 2: Include your header file in headers.txt - Step 3: Make a build directory. mkdir build Step 4: Use gen2.py to generate the Python binding files. You need to specify the prefix (pybv), the location of the temporary files (build) and the location of the header files (headers.txt). python3 gen2.py pybv build headers.txt This should generate a whole bunch of header files with prefix pybv_*.h. If you are curious, feel free to inspect the generated files. - Step 5: Compile the module g++ -shared -rdynamic -g -O3 -Wall -fPIC \ bv.cpp src/bvmodule.cpp \ -DMODULE_STR=bv -DMODULE_PREFIX=pybv \ -DNDEBUG -DPY_MAJOR_VERSION=3 \ `pkg-config --cflags --libs opencv` \ `python3-config --includes --ldflags` \ -I . -I/usr/local/lib/python3.5/dist-packages/numpy/core/include \ -o build/bv.so In Line 2 we specify the source files. In Line 3, we set the module name using MODULE_STR and MODULE_PREFIX (pybv) used in the previous step. In Line 4 we specify the Python version. In Line 5 we include OpenCV library and the header files and in Line 6 we include Python 3 related header files and some standard libraries. In my machine, numpy was not in the included path and so I had to add an extra Line 7 for numpy. Your location for numpy may be different. Finally, in Line 8 we specify the location of the output module (build/bv.so). Testing Python Module The script bvtest.py load the module and uses the function bv.fillHoles and the exported class bv.bv_Filters. If you compile everything correctly and run the python script, you will see the result shown below. Great! we have built module and are ready to.
https://learnopencv.com/how-to-convert-your-opencv-c-code-into-a-python-module/
CC-MAIN-2021-04
refinedweb
1,333
67.04
0 So I am trying to wrap my head around link lists and the theory is there but the magic isn't (at least in my program)... my problem runs with the void traverseRecord() function. For some reason it automatically shows all the nodes. Maybe I haven't totally grasped the concept of traversing, because I am thinking it will only show one at a time and I know my code isn't exactly right. Ideas anyone? // studentGPAquery.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> #include <list> using namespace std; struct student { string first_name; string last_name; double GPA; student(){} ~student(){} struct student *next; }; student *head = NULL; void mainMenu() { cout<<endl; cout<<"++++++++++++++++++++++++++++++++++"<<endl; cout<<" MAIN MENU "<<endl; cout<<" Choose from the following: "<<endl; cout<<"[N]umber of students in the class "<<endl; cout<<"[A]dd a record "<<endl; cout<<"[D]elete a record "<<endl; cout<<"[V]iew all records "<<endl; cout<<"[T]raverse all records "<<endl; cout<<"[Q]uit program "<<endl; cout<<"++++++++++++++++++++++++++++++++++"<<endl; cout<<endl; } void addRecord() { cout<<endl; cout<<"Add record:"<<endl; cout<<endl; struct student *temp, *alt; temp = new student; cout<<"What is the student's last name: "; cin>>temp->last_name; cout<<"What is the student's first name: "; cin>>temp->first_name; cout<<"What is student's GPA: "; cin>>temp->GPA; temp->next = NULL; if(head == NULL) head = temp; else { alt = head; while(alt->next != NULL) { alt = alt->next; } alt->next = temp; } } void deleteRecord() { cout<<endl; cout<<"Delete record:"<<endl; cout<<endl; student *del; del = head; del = del->next; if(del->next == NULL) cout<<"End of the list."<<endl; else del = del->next; if(del == head) cout<<"Beginning of list."<<endl; else { student *prev; prev = head; while(prev->next != del) { prev = prev->next; } del = prev; } cout<<endl; cout<<"Name to delete: "; cin>>del->last_name; if(del->next == NULL) cout<<"Nothing follows."<<endl; else { student *temp; temp = del->next; del->next = temp->next; delete temp; } } void viewRecord() { cout<<endl; cout<<"All records:"; cout<<endl; struct student *temp; temp = head; do { if(temp == NULL) cout<<"Nothing follows."<<endl; else { cout<<"Name: "<<temp->last_name<<", "; cout<<temp->first_name<<endl; cout<<"GPA: "<<temp->GPA<<endl; cout<<endl; temp = temp->next; } } while(temp != NULL); } void traverseRecord() { struct student *temp; temp = head; if(temp != 0) { while(temp != 0) { cout<<"Name: "<<temp->last_name<<", "; cout<<temp->first_name<<endl; cout<<"GPA: "<<temp->GPA<<endl; cout<<endl; temp = temp->next; } } while(temp != NULL) { cout<<"Name: "<<temp->last_name<<", "; cout<<temp->first_name<<endl; cout<<"GPA: "<<temp->GPA<<endl; cout<<endl; temp = temp->next; } } int _tmain(int argc, _TCHAR* argv[]) { char choice; do{ mainMenu(); cout<<"Command?: "; if(cin>>choice) switch(choice) { case 'A': addRecord(); break; case 'D': deleteRecord(); break; case 'V': viewRecord(); break; case 'T': traverseRecord(); break; } } while(choice != 'Q'); cout<<endl; cout<<"Terminating.."<<endl; system("PAUSE"); return 0; } My other issue is sorting by last name, but I haven't reached that point yet in my code (one hurdle at a time)... but concept suggestions are welcome. What I have lined up for sorting is: left.last_name < right.last_name; I'm still trying to figure out how to implement it. ~Climber Ty
https://www.daniweb.com/programming/software-development/threads/352734/c-struct-student-link-list
CC-MAIN-2017-43
refinedweb
519
60.85
This document is for those who “hate” to use the out of box roles and menus that are delivered with any SAP implementation because they usually provide way more access then is needed by differing user types, and are a pain to figure out how to turn items off with all of the back-end PFCG manual role entries. Many times you are left with links or Menu items that are not configured in your system visible for all of your user base, which then usually ends up with a help desk call to fix something when our curious user base starts to search around your new site. My goal was to create Group specific PFCG roles that would be tailored to those groups requirements based on internal and external audit recommendations. After spending a couple of weeks searching through all of the differing posts in regards to creating your own customized Menu items in GRC 10.1 I have complied a hopefully very easy walk-through on how to accomplish this on your own. I would like to give credits to both Colleen Hebbert and @Manik Saldi for these initial SAP blogs/wiki documents that helped explain the concepts but I thought could use some clarification as some things have changed since they were originally written. NWBC Screen Layout Options for GRC (Colleen Hebbert) and How to Create New Launchpad Wiki – Manik Saldi Requirements: SAP GRC access to SE80 and an SAP Developers key for your environment. Step 1. Copy the FPM configuration Create copies of FPM Application configurations in the GRFN_ACESS package: In this step you are going to use SE80 to search for the standard SAP package of GRFN_ACCESS where the web-dynpro application lives. From there I drilled down to the “FPM Application Configurations” folder and created the following two copies of Menus I am going to update. ZGRAC_FPM_AC_LPD_ACCESS_MGMT ZGRAC_FPM_AC_LPD_HOME Step 2. Creating Custom Config Roles Next I created my new Menu Roles that I will be linking to the relevant configurations in the Web-Dynpro configuration screens later in this article. to do this you can either go to SPRO to the “GRC -> General Settings -> Maintain Customer Specific Menu -> Configure Launchpad Menus” OR execute Tcode LPD_CUST Since I am working on the “Menu” and “Access Management” tabs I will make copies of those two Roles using the “copy” function. You will then be requested to enter a new value/name for the role that you want to create. Please be aware that there are length restrictions to the name so you may have to adjust. (exm: GRCACCMGMT had to be renamed to ZGRCACMGMT for me to fit) (you do not have to assign this to a namespace. just click through the “yes” confirmation if you do not) Step 3. Launch Pad Roles Config Once you create your duplicate Roles then you can add or Remove whatever you want to your custom “launch pad” to suit your needs. (there are some very interesting articles on how to add all kinds of non-GRC entries to these if you search) For my Home, I did not want my users performing any of the password management functions as we have a 3rd party application for this or using the SAP Support functions that would redirect them to Marketplace. Please note that for every folder that you create, that is a new “Heading” on that page to add URLs and other Web Dynpro apps to. The Column Break is to separate it to the other side of the page (left to Right) above config makes the following display tab: Step 4. The PFCG Role Now that we have our Menu tabs set up the way that we want, we will need to add them to our ZGRAC_FPM_AC_LPD* custom configuration. (I am working with the “Home” tab) First create a test role with the NWBC Tcode, and a Folder Name for the Tab you want to create. In my example I am working on the “My Home” tab. ***** If you add Tcodes directly to this or any Webynpro role you will need to do so at the root of the role menu and not inside any sub-folders. If you put the Tcode in the sub-folder it will show up as a option for the user on the page. Generate the role and update the S_START authorization as follows: AUTHOBJNAM = GRFN_SERVICE_MAP AUTHOBJTYP = WDYA AUTHPGMID = R3TR This will allow you to at a minimum launch the web-dynpro application to validate you config and menu changes. ******** Links in the menu can be worked on later using ST01 traces to identify link authorization requirements. Now that you have saved and Genereated the role, go back to the “Menu” tab of the role and right click on the Web Dynpro service and select the “Details” screen. Next you will click on “application configuration” button to enter the Web Dynpro configuration screen. ***** Please note that you CANNOT copy any of the SAP standard configs after this via SE80. You MUST use the Application Configuration button below. If you try and copy the FPM_OVP_COMPONENT in SE80 NONE of the SAP provided config will come over in the copy. Step 5: WebDynpro Configuration ID copy You should now be in the Web Dynpro component configuration screen. On this screen you should see the origina SAP configuration ID “GRAC_FPM_AC_LPD_HOME”. Click on the Copy button and then in the next screen change it to a custom name. (I added Z* for my example) NOTE** If you do not see a “copy” button click on the “New Window” button. You will then be prompted to assign it to a package and also to create a Transport for this if one has not already been created. I would suggest creating a Transport package just for this config so you know what you are moving into your QAS and PRD systems. If you do not have a custom package for your system. Work with your basis team to create one. Once created you should now be able to continue on in “change” mode to update your new custom configuration. Click on the configuration ID in Edit/Change mode and that will take you to the Configuration ID Main Page. Step 6. UIBB Configuration ID copy You must now create a copy of the GRAC_FPM_UIBB_LPD* configuration that you are working on. (again I am working on “HOME”) In the “Overview Page Schema” section select the UIBB for the FPM_LAUNCHPAD_UIBB and then click on the “Configure UIBB” button. NOTE***** If you get prompted to provide a Object Registration Key then click CANCEL. you will be making a copy and should not change SAP provided configuration. The configuration screen automatically prompts you before you can choose copy. Next click on the “Copy” Icon: Then create a custom name for your new component configuration ID (I used Z* for my home) You will again be prompted to save it to a custom package and transport. Use the ones you set up for the first configuration ID copy. Once you copy the Confuguration you will then be taken to the “Component Configuration” page. Here you will need to click on the “Edit” button and then select the Search button next to Role. This will allow you to update the SAP provided role with the one that you created in LPD_CUST. (ZGRACHOME in my case) and then click the “Save” icon NOTE**** In this screen you can also see the preview of what the page looks like before you update to the custom role. Take note so you can see the change. (after update) NOTE*** There is not “Close” button so at this point you can just close out the screen. You configuration is completed. Step 7: Test your Page!!! If you have followed all of the above steps then you should be ready to test your page in the role you created. Go back to the PFCG role that you created and right click on the Web Dynpro Application and select “Execute” This will bring up your final page. You can now assign this role to a test user and start to identify what may required authorizations to populate any of the links that need them. In my case I will need to go back and identify the authorizations to populate the “My Profile” links via ST01 and my own ID. I hope this article helps the future GRC admins of the world and I look forward to creating more documents later on other topics I find could use some clarification. -Michael Update**** to clarify some items others have pm’d me about. Please note that if you are having issues getting to the “Copy” screens for the subsequent Web Dynpro Components you can find them and copy via SE80 in the Repository browser under “Web Dynpro Comp. /intf. and looking for: FPM_OVP_COMPONENT – Configuration Name (this is updated in the Config ID) FPM_LAUNCHPAD_UIBB – A configurable Luanchpad UIBB (this is to update the UIBB Configuration) Once there you can find find available components under the “Component Configurations” folder Find the Configuration you want to copy and then right click and display in Same/New window then at the top click on the “Start Configuration” button to launch the HTML configuration screen. Now you are at a screen that will allow you to copy the SAP standard configuration in Step 5 and 6 to a custom configuration without having to deal with the “caching” that happens when jumping through multiple browsers. Hi Michael, thanks for the detailed material. We will try that to expose only specific links in Portal. Would you have a recommendation on how to add those to SAP Portal? Theresa, sorry for the late response, been busy here lately. That should be a pretty straight forward process. In step three where you create new "Launchpad" access you can identify where you want to add the custom URL and then click on "New Application" and then in the "application type" you would want to select "URL". Once you select that then you can enter the Link Text (My Custom URL) and description. Then under application parameter enter your URL specific information and click the like "paper/pencil". save you changes and then go back to your NWBC screen and log on to see the changes. If that doesn't specifically work let me know I can see about playing around with it to see what steps are missing. Hi All, My name is Raju. I am not getting Home, SETUP, Access Managements and Reports and Analysis Screen. After enter Tcode NWBC. Please find the attachment and let me know. Nagaraju, It looks like you have not assigned your account in the backend system with the role that contains the GRC web-dynpro screens. First get used to understanding how that screen is populated by adding the SAP GRC default roles. The Folders are going to be your tabs at the top and the web-dynpro object is the screen that contains your (or SAP's defined links). any Tcode or other role assigned to you will show up in the NWBC screen. I would suggest you create an account in the backend ABAP system and assign the basis SAP GRC provided roles as defined in the Security guide and then log in as that account to ABAP and launch the NWBC screen to see how it works. You can then make changes to the security roles and refresh that screen so see how it changes.
https://blogs.sap.com/2017/12/06/create-custom-nwbc-launch-screens-for-grc-10.1-sp-16/
CC-MAIN-2021-31
refinedweb
1,920
65.96
p for Account Management. Add the lines that contain pam_ldap.so.1 to the client's /etc/pam.conf file. In addition, if any PAM module in the sample pam.conf file specifies the binding flag and the server_policy option, use the same flag and option for the corresponding module in the client's /etc/pam.conf file. Also, add the server_policy option to the line that contains the service module pam_authtok_store.so.1.: The binding control flag Using the binding control flag allows a local password override of a remote (LDAP) password. For example, if a user account is found on both the local files and the LDAP namespace, the password associated with the local account takes precedence over the remote password. Thus, if the local password expires, authentication fails even if the remote LDAP password is still valid. The server_policy option The server_policy option instructs pam_unix_auth, pam_unix_account, and pam_passwd_auth to ignore a user found in the LDAP namespace and to allow pam_ldap to perform authentication or account validation. In the case of pam_authtok_store, a new password is passed to the LDAP server without encryption. The password is thereby stored in the directory according to the password encryption scheme configured on the server. For more information, see pam.conf(4) and pam_ldap(5).
http://docs.oracle.com/cd/E19253-01/816-4556/clientsetup-89/index.html
CC-MAIN-2014-35
refinedweb
214
56.96
#include <socks5bytestreammanager.h> #include <socks5bytestreammanager.h> Inherits IqHandler. Inheritance diagram for SOCKS5BytestreamManager: Definition at line 50 of file socks5bytestreammanager.h. Supported transport layer protocols. Definition at line 60 of file socks5bytestreammanager.h. Constructs a new SOCKS5BytestreamManager. Definition at line 30 of file socks5bytestreammanager.cpp. [virtual] Virtual destructor. Definition at line 37 of file socks5bytestreammanager.cpp. Use this function to accept an incoming bytestream. Definition at line 238 of file socks5bytestreammanager.cpp. Adds one StreamHost to the list of StreamHosts. Definition at line 58 of file socks5bytestreammanager.cpp. To get rid of a bytestream (i.e., close and delete it), call this function. You should not use the bytestream any more. The remote entity will be notified about the closing of the stream. Definition at line 390 of file socks5bytestreammanager.cpp. Reimplement this function if you want to be notified about incoming IQs. Implements IqHandler. Definition at line 154 of file socks5. id Definition at line 303 of file socks5bytestreammanager.cpp. [inline] Use this function to register an object that will receive new incoming bytestream requests from the SOCKS5BytestreamManager. Only one BytestreamHandler can be registered at any one time. Definition at line 135 of file socks5bytestreammanager.h. Tells the SOCKS5BytestreamManager which SOCKS5BytestreamServer handles peer-2-peer SOCKS5 bytestreams. Definition at line 149 of file socks5bytestreammanager.h. Use this function to reject an incoming bytestream. Definition at line 252 of file socks5bytestreammanager.cpp. Removes the registered BytestreamHandler. Definition at line 141 of file socks5bytestreammanager.h. Un-registers any local SOCKS5BytestreamServer. Definition at line 154 of file socks5bytestreammanager.h. EmptyString This function requests a bytestream with the remote entity. Data can only be sent over an open stream. Use isOpen() to find out what the stream's current state is. However, successful opening/initiation will be announced by means of the BytestreamHandler interface. Multiple bytestreams (even per JID) can be initiated without waiting for success. Definition at line 67 of file socks5bytestreammanager.cpp. Sets a list of StreamHosts that will be used for subsequent bytestream requests. Definition at line 84 of file socks5bytestreammanager.h.
http://camaya.net/api/gloox-trunk/classgloox_1_1SOCKS5BytestreamManager.html
crawl-001
refinedweb
341
54.9
Hi Together My company has an enviroment with several windows 2008 R2 fileservers. Because the shares are on different servers we have a lot of shares mapped on the client and the users are getting confused. I'd like to clean the mess with DFS. I have installed the DFS role on one of the 2008 R2 fileservers and created a namespace called "Data". I then added the. shares from the different servers. I can now map the DFS Share "Data" without problem everything works. But at themoment the Folder Icons on the share "Data" have the blue arrow that tells the user that it's a link. I'd like to remove the blue arrow on the folder icon, so that it's the normal icon without the blue link arrow. Is this possible and if can please someone explain it to me? Thanks a lot
https://community.spiceworks.com/topic/412608-remove-link-icon-on-dfs-shared-folder-icon
CC-MAIN-2019-04
refinedweb
147
83.66
Sending messages is the most basic email need of a Java program. While email clients like Eudora and mailing list managers like listproc are the only common programs that receive messages, all sorts of programs send messages. For instance, web browsers can submit HTML forms via email. Security scanning tools like Satan can run in the background and email their results to the administrator when they're done. When the Unix cron program detects a misconfigured crontab file, it emails the error to the owner. Books & Writers runs a popular service that tracks the sales rank of authors' books on Amazon.com and notifies them periodically via email. A massively parallel computation like the SETI@home project can submit individual results via email. Some multiplayer games like chess can be played across the network by emailing the moves back and forth (though this scheme wouldn't work for faster-moving games like Quake or even for speed chess). And these are just a few of the different kinds of programs that send email. In today's wired world, by far the simplest way to notify users of an event when they're not sitting in front of the computer that the program is running on is to send them email. The JavaMail API provides everything programs need to send email. To send a message, a program follows these eight simple steps: Set the mail.host property to point to the local mail server. Start a mail session with the Session.getInstance() method. Create a new Message object, probably by instantiating one of its concrete subclasses. Set the message's From: address. Set the message's To: address. Set the message's Subject:. Set the content of the message. Send the message with the Transport.send( ) method. The order of these steps is not especially rigid. For instance, steps 4 through 7 can be performed in any order. Individually, each of the steps is quite simple. The first step is to set up the properties for the mail session. The only property you have to set in order to send mail is mail.host . This is configured as a java.util.Properties object rather than an environment variable. For example, this code fragment sets the mail.host property to mail.cloud9.net : Properties props = new Properties( ); props.put("mail.host", "mail.cloud9.net"); Your programs will of course have to set this property to the name of your own mail server. These properties are used to retrieve a Session object from the Session.getInstance( ) factory method, like this: Session mailConnection = Session.getInstance(props, null); The Session object represents an ongoing communication between a program and one mail server. The second argument to the getInstance( ) method, null here, is a javax.mail.Authenticator that will ask the user for a password if the server requests one. We'll discuss this more later in the section on password authentication. Most of the time, you do not need to provide a username and password to send email when using the local SMTP server, only to receive it. The Session object is used to construct a new Message object: Message msg = new MimeMessage(mailConnection); I specify the MimeMessage class in particular since I know I'm sending Internet email. However, this is the one place where I do explicitly choose a format for the email message. In some cases, this may not be necessary if I can copy the incoming message format instead. Now that I have a Message object, I need to set up its fields and contents. The From: address and To: address will each be javax.mail.internet.InternetAddress objects. You can provide either an email address alone or an email address and a real name: Address bill = new InternetAddress("god@microsoft.com", "Bill Gates"); Address elliotte = new InternetAddress("elharo@metalab.unc.edu"); The setFrom( ) method allows us to say who's sending the message by setting the From: header. There's no protection against forgery. It's quite easy for me to masquerade as Bill Gates at a (presumably) fictitious email address: msg.setFrom(bill); The setRecipient() method is slightly more complex. You not only have to specify the address that the message will be sent to, but how that address is used; that is, as a To: field, a Cc: field, or a Bcc: field. These are indicated by three mnemonic constants of the Message.RecipientType class: Message.RecipientType.TO Message.RecipientType.CC Message.RecipientType.BCC For example: msg.setRecipient(Message.RecipientType.TO, elliotte); The subject is set as a simple string of text. For example: msg.setSubject("You must comply."); The body is also set as a single string of text. However, along with that text, you need to provide the MIME type of the text. The most common type is text/plain . For example: msg.setContent("Resistance is futile. You will be assimilated!", "text/plain"); Finally, the static Transport.send( ) method connects to the mail server specified by the mail.host property and sends the message on its way: Transport.send(msg); Example 19-1 puts all these steps together into a standalone program that sends the following message: Date: Mon, 29 Nov 1999 15:55:42 -0500 (EST) From: Bill Gates <god@microsoft.com> To: elharo@metalab.unc.edu Subject: You must comply. Resistance is futile. You will be assimilated! I've shown this message in standard RFC 822 format used for Internet email. However, that isn't necessary. The main point is that you need to know the addressee (elharo@metalab.unc.edu), the sender (god@microsoft.com), and the subject and body of the message. import javax.mail.*; import javax.mail.internet.*; import java.util.*; public class Assimilator { public static void main(String[] args) { try { Properties props = new Properties( ); props.put("mail.host", "mail.cloud9.net"); Session mailConnection = Session.getInstance(props, null); Message msg = new MimeMessage(mailConnection); Address bill = new InternetAddress("god@microsoft.com", "Bill Gates"); Address elliotte = new InternetAddress("elharo@metalab.unc.edu"); msg.setContent("Resistance is futile. You will be assimilated!", "text/plain"); msg.setFrom(bill); msg.setRecipient(Message.RecipientType.TO, elliotte); msg.setSubject("You must comply."); Transport.send(msg); } catch (Exception ex) { ex.printStackTrace( ); } } } Example 19-1 is a simple application that sends a fixed message to a known address with a specified subject. Once you see how to do this, it's straightforward to replace the strings that give the message address, subject, and body with data read from the command line, a GUI, a database, or some other source. For instance, Example 19-2 is a very simple GUI for sending email. Figure 19-1 shows the program running. The mail code is all tied up in the actionPerformed( ) method and looks very similar to the main( ) method of Example 19-1. The big difference is that now the host, subject, From: address, To: address, and text of the message are all read from the GUI components at runtime rather than being hardcoded as string literals in the source code. The rest of code is related to setting up the GUI and has little to do with the JavaMail API.( ));) { // I should really bring up a more specific error dialog here. ex.printStackTrace( ); } } } public static void main(String[] args) { SMTPClient client = new SMTPClient( ); // Next line requires Java 1.3 or later. I want to set up the // exit behavior here rather than in the constructor since // other programs that use this class may not want to exit // the application when the SMTPClient window closes. client.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); client.show( ); } } This is far from an ideal program. The GUI could be more cleanly separated from the mailing code. And it would be better to bring up an error dialog if something went wrong rather than just printing a stack trace of the exception on System.err . However, since none of that would teach us anything about the JavaMail API, I leave it all as an exercise for the interested reader. In terms of GUIs and the JavaMail API, there's no difference between sending email from an applet and an application. However, the browser's security manager can get in your way. Like everything else in this book, the JavaMail API can't get around the normal restrictions on network connections from applets and other remotely loaded code. An applet that wants to send email can still talk only to the host the applet itself came from. Fortunately, however, many hosts that run web servers also run SMTP servers. If this is the case, it's quite straightforward for an applet to send email. The JavaMail API and the Java Activation Framework on which it depends aren't included with most browsers, but since they're implemented in pure Java in the javax package, browsers can download the necessary classes from the server. For example, this APPLET element references not only the applet's own code but also the mail.jar and activation.jar files for the JavaMail API and the Java Activation Framework, respectively: <APPLET CODE=SMTPApplet <PARAM NAME="subject" VALUE="Hay Orders"> <PARAM NAME="from" VALUE="noone"> </APPLET> Example 19-3 is a simple applet that sends email. The address to send email to and the subject are read from PARAM tags. The address to send email from is also read from a PARAM tag, but the user has the option to change it. The text to send is typed into a text area by the user. Finally, the server is determined by looking at the applet's codebase . import java.applet.*; import javax.mail.*; import javax.mail.internet.*; import java.util.Properties; import java.awt.event.*; import java.awt.*; public class SMTPApplet extends Applet { private Button sendButton = new Button("Send Message"); private Label fromLabel = new Label("From: "); private Label subjectLabel = new Label("Subject: "); private TextField fromField = new TextField(40); private TextField subjectField = new TextField(40); private TextArea message = new TextArea(30, 60); private String toAddress = ""; public SMTPApplet( ) { this.setLayout(new BorderLayout( )); Panel north = new Panel( ); north.setLayout(new GridLayout(3, 1)); Panel n1 = new Panel( ); n1.add(fromLabel); n1.add(fromField); north.add(n1); Panel n2 = new Panel( ); n2.add(subjectLabel); n2.add(subjectField); north.add(n2); this.add(north, BorderLayout.NORTH); message.setFont(new Font("Monospaced", Font.PLAIN, 12)); this.add(message, BorderLayout.CENTER); Panel south = new Panel( ); south.setLayout(new FlowLayout(FlowLayout.CENTER)); south.add(sendButton); sendButton.addActionListener(new SendAction( )); this.add(south, BorderLayout.SOUTH); } public void init( ) { String subject = this.getParameter("subject"); if (subject == null) subject = ""; subjectField.setText(subject); toAddress = this.getParameter("to"); if (toAddress == null) toAddress = ""; String fromAddress = this.getParameter("from"); if (fromAddress == null) fromAddress = ""; fromField.setText(fromAddress); } class SendAction implements ActionListener { public void actionPerformed(ActionEvent evt) { try { Properties props = new Properties( ); props.put("mail.host", getCodeBase( ).getHost( )); Session mailConnection = Session.getInstance(props, null); final Message msg = new MimeMessage(mailConnection); Address to = new InternetAddress(toAddress);) { // We should really bring up a more specific error dialog here. ex.printStackTrace( ); } } } } Figure 19-2 shows this applet running in Internet Explorer 4.0.1 on the Macintosh. I've been careful to only use methods and classes available in Java 1.1 so this applet runs across the most web browsers possible. I also avoided using Swing so that there'd be one less large JAR file to download. As it is, the mail.jar and activation.jar files that this applet requires take up almost 300K, more than I'm comfortable with, but manageable on a fast connection. Proper behavior of this applet depends on several external factors: The browser must support at least Java 1.1 with a security model no stricter than the default. The mail.jar and activation.jar files must be available in the applet's codebase. The web server that serves the applet must also be an SMTP server willing to relay mail from the client system to the receiver system. These days, most open SMTP relays have been shut down to avoid abuse by spammers, so this can be a sticking point. If it is, you'll get an exception like this: javax.mail.SendFailedException: 550 <hamp@sideview.mtsterling.ky.us>... Relaying denied However, you should at least be able to send email to addresses in the web server's domain. You may be able to set up one of these addresses to automatically forward the messages to their eventual recipient.
https://flylib.com/books/en/1.135.1.127/1/
CC-MAIN-2021-31
refinedweb
2,062
59.09
The Builder Design Pattern provides us with a series of methods that can act as an aid in order to let the consumer of your class better understand what is happening under the hood. But it is considered an Anti-Pattern by some developers. Why use Builder Design Pattern? It’s an alternative to using multiple constructors by overloading them with more and more parameters. What are the pros? - There are tools that allow you to get hints of what the name of the parameter is, which may help if their names are informative, but it is not always the case. Like, for example: reading code on GitHub or another IDE/editor. - You don’t need to have all the data required to pass it to your object right when you initialize it. What are the cons? - You can end up having methods that require others to be ran in a certain order; otherwise, the consumer will run into issues if you implement it wrong. - The chain of methods can get really long depending on the implementation. - The consumer may forget to finish up the statement with the build()method and not get the results they expected. - Uses more memory resources. How can we avoid it? Default Parameters Kotlin supports default parameters (Which is also available in other languages like C# and JavaScript). fun pow(base: Int, power: Int = 2): Int { // ... } This can work as an alternative to method overloading, since the consumer of this method can use it like this: pow(2) // outputs 4 pow(2, 3) // outputs 8 Which can make our life easier by only having to maintain a single method. Named Arguments This allows our consumers to not only type in exactly what argument they want to assign to an exact parameter, but we can also reorder them in whatever way we want. This can be handy when dealing with “legacy code” that can be hard to understand because of how many parameters requires. pow(base = 4, power = 3) // outputs 64 pow(power = 3, base = 4) // also outputs 64 Can we combine them? Of course, my dear Watson! pow(base = 3) // outputs 9 In the example above we are passing the base argument as a named argument and the power is using the default parameter value in our method signature. Now that we know how to do this, we can use them to avoid the Builder Design Pattern in Kotlin. First, let’s check out the code we would have to write in Java by creating a simplified version of a Hamburger class: // Hamburger.java public class HamburgerJava { private final boolean hasKetchup; private final boolean hasTomatoes; private final int meats; private HamburgerJava(Builder builder) { hasKetchup = builder.hasKetchup; hasTomatoes = builder.hasTomatoes; meats = builder.meats; } public static class Builder { private boolean hasKetchup; private boolean hasTomatoes; private int meats; public Builder(int meats) { if (meats > 3) throw new IllegalArgumentException("Cannot order hamburger with more than 3 meats"); if (meats < 1) throw new IllegalArgumentException("A hamburger must have at least 1 meat."); this.meats = meats; } public Builder addKetchup(boolean hasKetchup) { this.hasKetchup = hasKetchup; return this; } public Builder addTomatoes(boolean hasTomatoes) { this.hasTomatoes = hasTomatoes; return this; } public HamburgerJava build() { return new HamburgerJava(this); } } } Now, let’s see how we can use our HamburgerJava class: HamburgerJava doubleMeatWithEverything = new HamburgerJava.Builder(2) .addKetchup(true) .addTomatoes(true) .build(); Cool, maybe some of you guys are used to this. Now let’s take a look at the Kotlin implementation in our Hamburger class: // Hamburger.kt class Hamburger( val meats: Int, val hasKetchup: Boolean = false, val hasTomatoes: Boolean = false ) Let’s see how it looks when we try to use it: val doubleMeatWithEverything = Hamburger( meats = 2, hasKetchup = true, hasTomatoes = true ) By using named arguments and default parameters we can avoid the problem of not knowing what values we are being passed to each parameter and have only a single constructor to maintain. The only cons we have with this approach is that we lose the ability to pass in values to our object after it’s creation. Which is something I don’t think is that common, or is it? Source:
https://learningactors.com/avoiding-the-builder-design-pattern-in-kotlin/
CC-MAIN-2020-10
refinedweb
685
53.21
SF Author Where are my exceptions going? iain coghill Greenhorn Joined: Apr 19, 2009 Posts: 11 posted May 11, 2009 03:48:09 0 I am having trouble dealing with exceptions thrown in my managed bean code. Depending on where the exception occurs JSF seems to handle exceptions in it's own sweet way, and it is not consistent between implementations. For example: <?xml version="1.0" ?> <jsp:root <jsp:directive.page <jsp:output <f:view> <head> <title>Phase Test</title> </head> <body> <h:form> <h:panelGrid <h:panelGrid <h:outputText <h:outputText <h:panelGroup/> <h:outputText <h:inputText <f:convertNumber /> <f:validateLongRange </h:inputText> <h:message </h:panelGrid> <h:commandButton </h:panelGrid> </h:form> </body> </f:view> </jsp:root> Where an exception occurs setting the field on the managed bean: public class SimpleBean { private static Log log = LogFactory.getLog(SimpleBean.class); private Integer field = null; public Integer getField() { return field; } public void setField(Integer field) { this.field = field; throw new RuntimeException("Killed!"); // Throw Exception Here!!! } public void fieldChangeHandler (ValueChangeEvent e){ log.debug("Value change event fired"); } public void submitHandler (ActionEvent e){ log.debug("Action event fired"); } } using the MyFaces implementation results in an error screen which is rather what I had expected. Using the reference implementation however, the exception message is displayed as a message using the <h:message... /> field. I don't think that is very useful Next I tried throwing the exception from a value change handler. Using MyFaces the exception seems to have been swallowed completely. There seems to be no sign of the exception even in the log. To the user everything looks like it worked OK. The reference implementation did at least log the exception stack trace but then proceeded to invoke the action event handler as if nothing untoward happened. Again the user is left to assume everything is working 100%. Neither behaviour seems appropriate to me. Is there any way I can gain control of these situations? Tim Holloway Saloon Keeper Joined: Jun 25, 2001 Posts: 15629 15 I like... posted May 11, 2009 06:19:56 0 That doesn't seem to match my experience. In straight JSF I was seeing non-JSF exceptions get trapped by the JSF servlet and displayed as cryptic stacktrace pages. One of the main reasons I like Facelets is that it can convert those exceptions to something more readable. In the case of a validator throwing an exception - well that's not something I normally have problems with. Since validators work by throwing (Validation)Exceptions, I throw ValidationExceptions. Anything else, I intercept and convert to a validation exception. Listeners aren't something I've normally had issues with. I use listeners to listen, not to do heavyweight operations that might throw exceptions. It may simply be that some frameworks are discarding exceptions, since they shouldn't be throwing exceptions anyway. Exceptions only get logged if something intercepts them and writes them to the log. If something intercepts them and simply eats them, all bets are off. And in a webapp, pretty much every exception gets consumed at some level - otherwise the exception would take down the webapp, or even the webapp container. Customer surveys are for companies who didn't pay proper attention to begin with. I agree. Here's the link: subject: Where are my exceptions going? Similar Threads Exception with <rich:modalPanel how to add a row dynamically in panel grid by clicking on command button using jsf Javascript reset() method and JSF h:form "#{...} is not allowed in template text" error JSF : commandButton in dynamically loaded <ui:include> page doesn't work All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter JForum | Paul Wheaton
http://www.coderanch.com/t/444881/JSF/java/exceptions
CC-MAIN-2014-15
refinedweb
617
55.74
Deploying Machine Learning models with Vertex AI on Google Cloud Platform Exploring Vertex AI Workbench for ML deployment Stane Aurelius, Data Scientist There has been some reports stating that 87% of data science projects never make it into production. When I first read about it, I immediately started pondering about the data flywheel. Data collection, data verification and pre-processing, model creation, deployment and monitoring, has always been the holy grail of Machine Learning — the ideal flow every data scientists want to achieve. To be honest, the report was not that surprising, considering there are lots of learning resources on the internet teaching people how to develop a Machine Learning model, and it was not that clear what would come after that stage. Additionally, model deployment can be done in multiple distinct ways, depending on the available tools and their costs — which part to start from was not that clear. Unified AI Platform in GCP If you try to look for a way to deploy a model, there is a big chance you have came across a tutorial or documentation on deploying a model to Google Cloud Platform (GCP). GCP offers tons of incredible services for development. When it comes to model deployment, the highlighted services are BigQuery — a server-less data warehouse, and Vertex AI — a unified AI platform providing every ML tools you need. Those services can be integrated with each other, and Vertex AI can be used to perform many things — feature engineering, model training, hyperparameters tuning, model deployment, etc. Despite all the features, one might still be confused on where to start. After all, there are multiple ways to train and deploy a model. The most popular ways are: Performing everything in Vertex AI — from creating managed datasets from a bigquery table or view, building the pipelines, performing model training and tuning, up to deploying the model. All of this can be done via the GUI in Vertex AI, and to make a request for prediction to the deployed model, Cloud Functions allows the possibility to invoke the ML model through REST API. There is a slight limitation to this: upon creating a particular dataset in BigQuery, the region of that dataset will not be changeable. In addition, (up to this point of writing) Vertex AI does not support as much region as BigQuery, and the managed dataset created from BigQuery must belong to the same region as the hosted model. Creating the model using BigQuery ML — where you can make an ML model in SQL. This is an incredible service, you basically do not need any experience on developing an ML model using Python or any other programming language. You just need to make a particular table or view, and use it as a trainable dataset for developing a model. The thing that blew my mind was that using SQL, we can even train a Tensorflow model in BigQuery ML. Integrated with Vertex AI, it is also possible to deploy the model trained from BigQuery. However, some of the data wrangling task might be too hard to be done in SQL. So this method is more suitable for dataset that does not require rigorous wrangling process. Vertex AI Workbench — The Simpler Alternative Amidst all the available services, there is a service I found out to be the simplest, yet the most powerful. It is a well-known fact that most data scientists practiced developing an ML model using a notebook. Fortunately, GCP offers Vertex AI Workbench, a Jupyter-based infrastructure where you can host and manage your notebook for development. The notebook can also be integrated with BigQuery and Vertex AI, enabling an easy access from within the notebook — use every service you need in Python. Getting Started with Vertex AI Workbench Before using Vertex AI Workbench, firstly prepare your project ID/number, you will need this later when establishing a connection with BigQuery and Cloud Storage. Your project ID and number can be viewed in the project info section from the home page’s dashboard. The next thing you need to do is create a Google Cloud Storage (GCS) bucket — a container for storing and organizing your data. From the navigation menu, navigate to storage and click on create bucket. Enter the name of your bucket and every other settings — the bucket region, storage class, etc (you can also use the default settings). Click on create button afterwards. This bucket will be used to: - store the output of your notebook, - storing the exported model artifact, before being imported to Vertex AI. You will also need to enable 3 APIs: - Notebooks API to manage notebook resources in Google Cloud, - BigQuery API to use BigQuery services, - Vertex AI API to use Vertex AI services. To do this, navigate to APIs & Services and click on enable APIs and services. In the API library, search for those 3 APIs and enable them. Creating a Managed Notebook At this point, I assume you already have an available dataset from BigQuery and a ready-to-use notebook or Python codes for training the model. If you navigate to Vertex AI Workbench, you will see 4 tabs: - Managed Notebooks: contains a managed notebook. - User-Managed Notebooks: contains a user-managed notebook. - Executions: storing the status of every notebook’s execution. - Schedule: every notebook’s scheduled execution you set up will be shown here. For creating a workflow of data science production, you want to create a managed notebook. This type of notebook is the one you can use to create a scheduled executions, which will prove useful for re-training a particular model and generating predictions on a regular basis. On the other hand, a user-managed notebook is a highly customizeable instance. It is great since user can control a lot of their environment. However, if you tried creating an instance of it, you will notice that there is no submit to executor button; nor there is an option to schedule an execution. I would say that it is more suitable for collaborating and testing the code before migrating them to the production phase. Now navigate to the Managed Notebooks tab and click on New Notebook button. An important thing you need to pay attention to when creating a notebook is to always see the Advanced settings — this is where you can manage your hardware configuration. Do not allocate unnecessary resources to the notebook, or the billing will be very high. GCP will need a couple minutes to create your notebook. Migrating Python Codes/Notebook After GCP has created your notebook instance, you will se an Open JupyterLab button. Click on that button to open a JupyterLab in a new tab. Notice that in the launcher, you can use any environment GCP has created — Pyspark, Pytorch, Tensorfow, etc. It even allows you to work in R! You can create your notebook from scratch, or you can import it from your local machine using the upload files button. A slight changes you need to work on in your code is the function used to fetch the data. When working on a local machine, you probably import the data from a .csv file. Vertex AI Workbench is integrated with BigQuery, so you can fetch your data directly from BigQuery. To do so, create a new markdown cell in your notebook and try typing #@bigquery. You will see that the markdown cell changes its appearance. Open the query editor, write your query to get the data from BigQuery, and click on Submit Query. After the table has been shown, you can click on Copy code for DataFrame and GCP will automatically make the code for fetching the data. The code still needs to be modified, you need to explicitly state your project number as a parameter when initializing the connection to BigQuery. In the code, it is shown by client = Client() you need to add parameter project = ''. The reason why we need to explicitly state our project selection is because Vertex AI might not always connect to the correct Google Cloud project by default. Vertex AI does not run the code directly in our project, instead it runs the code in one of several projects managed by Google. Hence, if we do not explicitly state the project, we might encounter permission error when executing the notebook since it might connect to the wrong project. Now update the code in your notebook up to the point of model fitting. Importing ML Model to Vertex AI Up to this point of writing, Vertex AI only supports models that are trained using one of these 3 frameworks: TensorFlow, XGBoost, and scikit-learn. Unfortunately, once you finished fitting a model to the training data, you cannot directly deploy them on an endpoint. Instead, here is the workflow of deploying a model on GCP: - Create your notebook and fit your model - Export your model artifacts to Google Cloud Storage (GCS) - Import the model artifact from GCS to Vertex AI - Create an endpoint for hosting your model - Deploy the model on the endpoint We are currently in step 2, so we need to export our model artifacts to our GCS bucket. Model artifacts are the output obtained from training a model. It consists of trained parameters, model definitions, and other metadata — basically a saved/exported model. If you are using scikit-learn or XGBoost, I recommend creating a new directory in your GCS bucket (you can do this via GCS or notebook left-side panel) before exporting your model. The location you want to save your model will be gs:///. This is called the GCS URI. You can copy it via the left-side panel in notebook. For example, Use this code for each framework: Tensorflow You need to export your model as TensorFlow SavedModel directory. There are several ways to do this: - If you have used Keras for training, use tf.keras.Model.save - If you use an Estimator for training, use tf.estimator.Estimator.export_saved_model XGBoost & scikit-learn You can use either joblib library or Python’s pickle module to export the model. Take a note that the name of the model artifacts must be either model.joblib or model.pkl. Use this code if you are using joblib to export your model: import os import joblib from google.cloud import storage # Save model artifact to local filesystem (doesn't persist) artifact_filename = 'model.joblib' joblib.dump(my_trained_model, artifact_filename) # Upload model artifact to Cloud Storage # Change the model directory to your GCS bucket URI model_directory = 'gs:///' storage_path = os.path.join(model_directory, artifact_filename) blob = storage.blob.Blob.from_string(storage_path, client = storage.Client(project='')) blob.upload_from_filename(local_path) And use this code if you want to use pickle module to export your model: import os import pickle from google.cloud import storage # Save model artifact to local filesystem (doesn't persist) artifact_filename = 'model.pkl' with open(artifact_filename, 'wb') as model_file: pickle.dump(my_trained_model, model_file) # Upload model artifact to Cloud Storage # Change the model directory to your GCS bucket URI model_directory = 'gs:///' storage_path = os.path.join(model_directory, artifact_filename) blob = storage.blob.Blob.from_string(storage_path, client=storage.Client(project='')) blob.upload_from_filename(local_path) Verify that your model has been exported to your GCS bucket. Now you need to import that model artifacts into Vertex AI. Again, GCP offers multiple ways to do this task. You can do it via GUI, gcloud console, etc. But since we want to automate this task, we will be doing it programatically in Python codes. In a new cell in your notebook, use this code to import the model artifacts to Vertex AI: from google.cloud import aiplatform # Use this line so we do not need to explicitly specify the project number and region whenever we use AI Platform (Vertex AI) services aiplatform.init(project='', location='') # Importing model artifacts model = aiplatform.Model.upload(display_name = '', description = '', artifact_uri = '', serving_container_image_uri = '' ) The parameter serving_container_image_uri is used to specify which pre-built container we want to use for our model. You can see the list of available pre-built container in this link. For example, if I want to use scikit-learn 1.0 pre-built container for Asia region, I will pass the parameter as serving_container_image_uri = 'asia-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-0:latest'. Verify whether the model has been imported by navigating to the Models section in Vertex AI. Deploying the Model on an Endpoint After the model has been imported to Vertex AI, you can deploy it to an endpoint. A model must be deployed to an endpoint before they can serve online predictions. When you deploy a model, GCP associates physical resources to that model to be used when client request a prediction to the endpoint where the model is deployed. You can deploy multiple models in an endpoint, and you can also deploy a model into multiple endpoints. Deploying two models to the same endpoint enables you to gradually replace one model with the other. On the other hand, you might also want to deploy your models with different resources for different application environments, such as testing and production; so you need to deploy a model to multiple endpoints. You can read more considerations for deploying models on this page. I did mention that before deploying the model, we need to create an endpoint. However, that step is actually optional. Even if we do not have any endpoint, GCP will automatically create a new endpoint when we deploy our model — with the default name _endpoint. To create an endpoint, use this code in a new notebook cell: # optional code to create an endpoint endpoint = aiplatform.Endpoint.create(display_name = '', project = '', location = '') Verify that you have successfully created an endpoint by navigating to the Endpoints section in Vertex AI. Now we just need to deploy our model to the endpoint. Notice that when we import the model artifact to Vertex AI, we are actually assigning aiplatform.Model.upload(...) into the model variable. The same goes when we create an endpoint, we assign it into the endpoint variable. So, to deploy the model, we simply need to use this code: # if you do not specify the endpoint parameter, a new endpoint will be created model.deploy(endpoint = '', machine_type = '') The machine_type parameter is basically the physical devices that will be associated with your deployed model — it is very similar to hardware configuration. If you do not know what machine type to use, you can see all the available machine types by navigating to the Models section in Vertex AI, click on the 3 dots for any model, and click on Deploy to endpoint. Go into model settings and you can see all the available machine types. It takes a couple minutes for the model to be deployed. The deployment status of a model can be seen in the Models section in Vertex AI. Congratulations! Now you have deployed a model on GCP. Scheduling a Notebook Execution For the purpose of periodically train our model, we need to set up a scheduled notebook execution. Scheduling a notebook execution in Vertex AI Workbench is quite straightforward. Simply click on the Execute button on top of the notebook to submit it to Executor. Define your execution name, hardware configurations, and environment. Change the execution type to Schedule-based recurring executions and choose your time preferences. In the advanced options, choose the GCS bucket where your notebook’s output will be stored.
https://supertype.ai/notes/deploying-machine-learning-models-with-vertex-ai-on-google-cloud-platform/
CC-MAIN-2022-40
refinedweb
2,559
53.1
Scroll down to the script below, click on any sentence (including terminal blocks!) to jump to that spot in the video! If you liked what you've learned so far, dive in! video, code and script downloads. Repeat after me, “We’re really great.” And our security system is almost as cool as we are. So let’s keep up the pace and load users from the database instead of the little list in security.yml. What we’re about to do is similar to what the awesome open source FOSUserBundle gives you. We’re going to build this all ourselves so that we really understand how things work. Later, if you do use FOSUserBundle, you’ll be a lot more dangerous with it. Ok, forget about security! Seriously! Just think about the fact that we want to store some user information in the database. To do this, we’ll need a User entity class. That sounds like a lot of work, so let’s just use the doctrine:generate:entity app/console command: php app/console doctrine:generate:entity For entity shortcut name, use UserBundle:User. Remember, Doctrine uses this shortcut syntax for entities. Give the class just 2 fields: And of course, choose “yes” to generating the repository class. I’ll explain why these are so fabulous in a second. Once the robots are done writing the code for us, we should have a new User class in the Entity directory of UserBundle. Let’s change the table name to be yoda_user: // src/Yoda/UserBundle/Entity/User.php namespace Yoda\UserBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="yoda_user") * @ORM\Entity(repositoryClass="Yoda\UserBundle\Entity\UserRepository") */ class User { // ... the generated properties and getter/setter functions } Right now, this is just a plain, regular Doctrine entity that has nothing to do with security. But, our goal is to load users from this table on login. The first step is to make your class implement a UserInterface: // src/Yoda/UserBundle/Entity/User.php // ... use Symfony\Component\Security\Core\User\UserInterface; class User implements UserInterface { // ... } This interface requires us to have 5 methods and hey! We already have 2 of them: getUsername() and getPassword(): // src/Yoda/UserBundle/Entity/User.php // ... public function getUsername() { return $this->username; } public function getPassword() { return $this->password; } Cool! So let’s add the other 3. First, getRoles() returns an array of roles that the user should get. For now, we’ll hardcode a single role, ROLE_USER: // src/Yoda/UserBundle/Entity/User.php // ... public function getRoles() { return array('ROLE_USER'); } Second, add eraseCredentials. Keep this method blank for now. We will add some logic to this later: public function eraseCredentials() { // blank for now } Finally, add getSalt() and just make it return null: public function getSalt() { return null; } I’ll talk more about this method in a second. Now that the User class implements UserInterface, Symfony’s authentication system will be able to use it. But before we hook that up, let’s add the yoda_user table to the database by running the doctrine:schema:update command: php app/console doctrine:schema:update --force And for the grand finale, let’s tell the security system to use our entity class! In security.yml, replace the encoder entry with our user class and set its value to bcrypt: # app/config/security.yml security: encoders: Yoda\UserBundle\Entity\User: bcrypt # ... This tells Symfony that the password field on our User will be encoded using the bcrypt algorithm. The one catch is that bcrypt isn’t supported until PHP 5.5. So if you’re using PHP 5.4 or lower, you’ll need to install an extra library via Composer. No problem! Head to your terminal and use the composer require command and pass it ircmaxell/password-compat: php composer.phar require ircmaxell/password-compat When it asks, use the ~1.0.3 version. By the way, this require command is just a shortcut that updates our composer.json for us and then runs the Composer update: "require": { "...": "..." "ircmaxell/password-compat": "~1.0.3" }, Now for the Jedi magic! In security.yml, remove the single providers entry and replace it with a new one: # app/config/security.yml security: # ... providers: our_database_users: entity: { class: UserBundle:User, property: username } I’m just inventing the our_database_users part, that can be anything. But the entity key is a special built-in provider that knows how to load users via a Doctrine entity. Yea, and that’s really it! Ok, let’s try it. When you refresh, you may get an error: There is no user provider for user "Symfony\Component\Security\Core\User\User". Don’t panic, this is just because we’re still logged in as one of the hard-coded users... even though we just deleted them from security.yml. It’s a one-time error - just refresh and it’ll go away. // } }
https://symfonycasts.com/screencast/symfony2-ep2/entity-security
CC-MAIN-2021-31
refinedweb
813
58.58
Events¶ Kivy is mostly event-based, meaning the flow of the program is determined by events. Clock events The Clock object allows you to schedule a function call in the future as a one-time event with schedule_once(), or as a repetitive event with schedule_interval(). You can also create Triggered events with create_trigger(). Triggers have the advantage of being called only once per frame, even if you have scheduled multiple triggers for the same callback. Input events All the mouse click, touch and scroll wheel events are part of the MotionEvent, extended by Input Postprocessing and dispatched through the on_motion event in the Window class. This event then generates the on_touch_down(), on_touch_move() and on_touch_up() events in the Widget. For an in-depth explanation, have a look at Input management. Class events Our base class EventDispatcher, used by Widget, uses the power of our Properties for dispatching changes. This means when a widget changes its position or size, the corresponding event is automatically fired. In addition, you have the ability to create your own events using register_event_type(), as the on_press and on_release events in the Button widget demonstrate. Another thing to note is that if you override an event, you become responsible for implementing all its behaviour previously handled by the base class. The easiest way to do this is to call super(): def on_touch_down(self, touch): if super().on_touch_down(touch): return True if not self.collide_point(touch.x, touch.y): return False print('you touched me!') return True Get more familiar with events by reading the Events and Properties documentation.
https://kivy.org/doc/master/gettingstarted/events.html
CC-MAIN-2021-39
refinedweb
260
54.63
Hi I am doing this class and I have followed the instructions and then watched the first part of the video that comes with the course. The requirement is - Write a function called f_to_cthat takes an input f_temp, a temperature in Fahrenheit, and converts it to c_temp, that temperature in Celsius. It should then return c_temp . Part two requires me to - Let’s test your function with a value of 100 Fahrenheit. Define a variable f100_in_celsiusand set it equal to the value of f_to_cwith 100as an input. This is what I have written def f_to_c(f_temp): return (f_temp - 32) * 5/9 f100_in_celsius = f_to_c(100) print(f100_in_celsius) This has given me the correct result however, I have not been able to It "return c_temp " as required in the first part of the question. I watched the video and it makes no mention of this `c_temp’. Can you please explain how I should correectly return `c_temp’.
https://discuss.codecademy.com/t/learn-python-3-physics-class/389847
CC-MAIN-2019-43
refinedweb
154
77.98
I am doing a programming assignment in my CS class using C++ that is giving me problems. The assignment is to write a program that asks the user to input a Fahrenheit temperature. The program must then output the Celsius equivalent of that temperature and the Celsius equivalents of the next 20 Fahrenheit temperatures. This must all be done using a separate function to complete the conversion calculation as well as a function prototype. I got everything to work except my Celsius outputs all show a value of 0. I cannot seem to find any errors or figure out what is wrong...Please Help! #include <iostream> #include <iomanip> using namespace std; double Celsius(double temp); int main() { double fTemp, cTemp; cout << "Please input a temperature in degrees Fahrenheit: "; cin >> fTemp; cout << "F Temp" << " " << "C Temp"<< endl; cout << "-------------------" << endl; for(int count=1; count<= 20; count++){ cTemp = Celsius(fTemp); cout << setw(6) << fTemp << setw(12) << cTemp<< endl; fTemp++; } return 0; } //*************Celsius Function****************// double Celsius(double temp){ double newC; newC = (temp-32) * (5/9); return newC; } //************************************************ (5/9) is integer-integer division. You might've as well typed 0 there. Replace it with ( 5.0/9.0) and it should be fine.
https://codedump.io/share/bv1PVAGln9IX/1/returning-values-from-a-separate-function-in-c
CC-MAIN-2017-47
refinedweb
200
61.26
How do i fix HD5850 graphics to crrect display setting in linux it gives error as laptop display i need step by step please as my screen is a 22" AOC monitor Might not be enough information here, especially for non-Mint people who might nevertheless have some useful suggestions. I'm aware of some problems with GNOME (at least with debian) and the AMD proprietary driver and they recommend to use the free driver instead. But there might be better Mint specific pages on this and if your goal is to remove the proprietary driver, you should be able to search for something like: how to uninstall radeon proprietary driver linux How did the driver get installed in the first place? If it was installed direct from the AMD download, then it might be possible to do this. sudo sh /usr/share/ati/fglrx-uninstall.sh --force More info here: But if it was installed using the package manager, you should use the package manager to remove it. #include <standard.disclaimer> It's not the driver and it's not Linux. IT did it again. This time I did nothing except unplug the cable and plug in a HDMI one. And it was happy. Weirdly xrandr shows 3 choices, VGA, Displayport and HDMI, all show disconnected. What? Not sure if it's the DVI cable or not yet.....what do you think? Donate via Givealittle
https://www.geekzone.co.nz/forums.asp?forumid=46&topicid=248414
CC-MAIN-2019-18
refinedweb
236
72.16
A library of convenient utility functions and pure Python data structures. Project description ConvUtils provides a small library of convenience functions for dealing with a variety of tasks, such as creating CSV readers and writers, and convenient data structures, such as a two-way dictionary. This package provides two modules: utils and structs. Typically, the user will want to import one or the other, e.g. from convutils import utils utils utils provides the following classes: - SimpleTsvDialect is similar to the csv.excel_tab dialect, but uses the newline character ('\n') as the line separator, and does no special quoting, giving a more Unix-friendly TSV (tab-separated values) format. (New in v2.0: formerly ExcelTabNewlineDialect.) utils also provides the following functions: - make_csv_reader creates a csv.DictReader or csv.Reader instance with the convenience of the user not having to explicitly specify the CSV dialect. - make_simple_tsv_reader is similar to make_csv_reader, but always uses SimpleTsvDialect. (New in v2.0.) - make_csv_dict_writer creates a csv.DictWriter instance with the convenience of not having to manually enter the header row yourself; uses csv.excel as the dialect, by default. - make_simple_tsv_dict_writer is similar to make_csv_dict_writer, but uses the SimpleTsvDialect instead. (New in v2.0.) - append_to_file_base_name will return a modified file name given an original one and a string between the base name and the extension (e.g., append_to_file_base_name('myfile.txt', '-2') returns 'myfile-2.txt'). - count_lines counts the number of lines in a file. - split_file_by_parts takes one large file and splits it into new files, the maximum number of which is given by the user. - split_file_by_num_lines takes one large file and splits it into new file, the maximum number of lines in each being defined by the user. - column_args_to_indices takes a string representing desired columns (e.g., '1-4,6,8') and converts it into actual indices and slices of an indexable Python sequence. - cumsum produces the cumulative sum of any iterable whose elements support the add operator. (New in v1.1.) structs structs provides two convenient data structures, both specialized subclasses of Python’s dict. - SortedTupleKeysDict is a dictionary which expects 2-tuples as keys, and will always sort the tuples, either when setting or retrieving values. - TwoWaySetDict is a dictionary that assumes the values are sets, and will store a reverse lookup dictionary to tell you, for each set in the values that some item belongs to, the keys with which item is associated. structs also provides two functions for sampling Python dictionaries whose values are lists: - sample_list_dict is like random.sample but for dictionaries whose values are lists or other enumerable, iterable container types. (New in v1.1; relocated to structs in v2.0.) - sample_list_dict_low_mem is similar to sample_list_dict but has a lower memory consumption for larger dictionaries. (New in v1.1; relocated to structs in v2.0.) Availability - PyPI page: - GitHub project page: CHANGELOG v2.0 - Refactored code for Python 3 compatibility via 2to3 during installation. - Dropped compatibility for Python 2 versions less than 2.7. - Added dependency on mock for unit tests. This dependency is satisfied by the standard library for Python 3.3 and newer. - Renamed convutils.convutils to convutils.utils; renamed convutils.convstructs to convutils.structs. - Added unit tests for convutils.utils. - Renamed ExcelTabNewlineDialect to SimpleTsvDialect, and changed its quoting style to no quoting. - Refactored make_csv_reader and make_simple_tsv_dict_writer to use the csv.excel dialect by default, to be more in line with the standard library. Added new functions make_simple_tsv_reader and make_simple_tsv_dict_writer for the previous functionality. - Renamed the headers parameter to header for make_csv_reader and make_simple_tsv_reader. - Changed the signatures of split_file_by_num_lines and split_file_by_parts. The functions now accept a file handle instead of a file name. The parameter has_header has been renamed header. Added two new parameters, pad_file_names and num_lines_total. If pad_file_names is True, the numerical portion of the output file names will be zero-padded. If num_lines_total is provided in addition to pad_file_names, split_file_by_num_lines and split_file_by_parts will skip counting the number of lines in the file, itself, which can save time. - SortedTupleKeysDict and TwoWaySetDict now subclass collections.MutableMapping instead of dict directly due to the suggestions on best-practices from Stack Overflow: - Relocated sample_list_dict and sample_list_dict_low_mem to convutils.structs. - Added Sphinx-based documentation. v1.1 2012-03-23 - Changed docstrings to use Sphinx info field lists. - Added cumsum - Added sample_list_dict and sample_list_dict_low_mem. v1.0.1 2011-01-18 - Added imports of modules into package __init__.py. v1.0 2011-01-10 - Initial release. Project details Release history Release notifications Download files Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
https://pypi.org/project/ConvUtils/
CC-MAIN-2019-30
refinedweb
760
52.36
I have this code on react native where I increment a counter by 1 after each button press function App() { const [counter,setCounter]=useState(0); return ( <View> <Button title="hello" onPress={()=> {setCounter(counter+1);console.log("display counter in console" ,counter)}}> </Button> {counter%2==1 ? <Text> display counter in UI</Text> : null } <View> <Text> thank you for clicking the button </Text> </View> </View> ) } After the first click the counter is equal to 0 and the console shows 0 instead of 1 so the JSX component won’t show. I know that useState is asynchronous but how to solve it if showing a JSX is depending on updating the state on real time. UPDATE: It seems that the JSX displays when excpected but I’m wondering why console.log will not update on real time ? I mean why console.log shows 0 when it is supposed to show 1 You just need to add pre-increment operator on setCounter state. and Change const to var in useState declaration. export default function App() { var [counter,setCounter]=useState(0); return ( <View style={{marginTop:25}}> <Button title="hello" onPress={()=> {setCounter(++counter); console.log("display counter in console" ,counter)}}> </Button> {counter%2==1 ? <Text> display counter in UI</Text> : null } <View> <Text> thank you for clicking the button </Text> </View> </View> ) } useState hook is asynchronous, so you can not access it’s new values immediately And there is no callback for it (unlike setState) But if you want to listen to it’s changes, you can use useEffect hook like this useEffect(() => { console.log('display counter in console', counter); }, [counter]);
https://codeutility.org/react-native-make-usestate-update-on-real-time/
CC-MAIN-2021-43
refinedweb
265
61.87
By Albino Aveleda, Published: 01/31/2018, Last Updated: 01/31/2018 library is used to detect something on a video or image that is used as input for some AI application or deep learning framework like MXNet*2, Caffe*3, Caffe2*4, Torch*5, Theano*6, TensorFlow*7, and others. There are several AI applications that use computer vision, for instance: In this work, we will make an overview of video preprocessing techniques that are used to detect some feature that may be present in a video stream, and generate images with the detected features. Our example will focus on face detection, which is used as a preprocessing phase to a face recognition system. The face recognition systems can be an AI application, a deep learning framework, or some cloud service such as Amazon Rekognition*8, Microsoft Azure* Cognitive Services9, Google Cloud Vision10, and others. Figure 1. Video preprocessing. Figure 1 shows the flow diagram of the face detection process from a video stream: The environment used for this work is composed of one surveillance camera and one computer running CentOS* 7 Linux* with the Intel® Distribution for Python 2018. Intel® Distribution for Python complies with the SciPy* Stack specification, and includes the package OpenCV and a deep learning framework such as Caffe, Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN)12, Theano, or TensorFlow. Python packages have been accelerated with Intel® Performance Libraries, including Intel® Math Kernel Library (Intel® MKL), Intel® Threading Building Blocks, and Intel® Data Analytics Acceleration Library. All the aforementioned software packages have been optimized to take advantage of parallelism through the use of threading, multiple nodes, and vectorization. Intel® Distribution for Python 2018 has improved OpenCV performance compared to OpenCV available on CentOS Linux distribution. The performance was measured by comparing the time, in seconds, it takes to compute the full-HD frames captured and processed on OpenCV. The percent gain was around 92 percent. The machine used in our test has two Intel® Xeon® E5-2630 CPU with 8 GBytes of RAM. To capture a video stream it is necessary to create a VideoCapture* object. The input argument to create such an object can be either the device index or the name of a video file. The device index is simply the number that identifies which camera will provide images for the system. When the VideoCapture object is created, the image provided by the specified camera or video file is captured frame by frame. When the built-in laptop webcam or some external camera is used, it is possible to open the video directly in OpenCV, using the sequence of commands shown in figure 2. import cv2 cap = cv2.VideoCapture(0) Figure 2. Capture video from camera. However, OpenCV cannot handle our surveillance camera directly. For this reason, it is necessary to use a backend video stream to convert the input from the camera to a format that OpenCV can understand. We use the FFmpeg multimedia framework to convert the video stream to MPEG format. Figure 3 shows the flow diagram for the backend video stream. The components used for this solution are described below. Figure 3. Backend video stream. The ffmpeg software gets input from a video camera and writes to the file named “cam.ffm”. An IP address is assigned to the video camera and an authentication system is used (“user:password”) to grant the user access to the video stream. ffmpeg uses the Real-Time Streaming Protocol (RTSP) over TCP; see Figure 4. In the present case, the Uniform Resource Identifier (URI) uses channel 1, which corresponds to the original video camera. ffmpeg -rtsp_transport tcp -i rtsp://user:password@192.168.1.100:554/Streaming/Channels/1 Figure 4. ffmpeg tool. Provided that the “cam.ffm” file is created, it is read by the ffserver, which decodes the “cam.ffm” file and encodes it to MPEG format, saving it to the file named “cam.mpeg”. The ffserver needs a configuration file, named “ffserver.config”. Figure 5 shows a basic configuration file. The ffserver has a number of options that can be set up, but in this application, we need only the following basic configuration options: The “ffserver.config” file can be stored in the default directory (/etc); alternatively, a custom location for the configuration file can be provided. If this file is stored in the user’s local directory, ffserver can be called by means of the command line shown in Figure 6. On the other hand, if the “ffserver.config” file is stored in the default directory, use the command shown in Figure 7 to call ffserver. Finally, the OpenCV reads the “cam.mpeg” file frame by frame using the cv2.VideoCapture function, and processes the video frame by frame. HTTPPort 8090 HTTPBindAddress 0.0.0.0 MaxClients 10 MaxBandWidth 50000 CustomLog - #NoDaemon <Feed cam.ffm> File /tmp/cam.ffm FileMaxSize 1G ACL allow 127.0.0.1 ACL allow localhost </Feed> <Stream cam.mjpeg> Feed cam.ffm Format mpjpeg VideoFrameRate 20 VideoBitRate 10240 VideoBufferSize 20480 VideoSize 1920x1080 VideoQMin 3 VideoQMax 31 NoAudio Strict -1 </Stream> <Stream stat.html> Format status # Only allow local people to get the status ACL allow localhost ACL allow 192.168.1.0 192.168.1.255 </Stream> <Redirect index.html> URL </Redirect> Figure 5. ffserver.config file. ffserver -d -f ./ffserver.config Figure 6. ffserver tool—local directory. ffserver -d -f /etc/ffserver.config Figure 7. ffserver tool—default. When OpenCV is correctly configured by means of the procedure described above, it reads and processes all frames from the video stream. OpenCV has several built-in pretrained classifiers for face, eyes, and smile detection, among others. We use the frontal face Haar-Cascade classifier for the detection process. The details of this classifier are given in the file named haarcascade_frontalface_default.xml. Figure 8 shows the Python script to detect faces. Below, we describe how the Python script works. import cv2, platform import numpy as np import urllib import os('/opt/intel/intelpython2/pkgs/opencv-3.1.0-np113py27_intel_6/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml') cam = "" stream = urllib.urlopen(cam) bytes = '' nframe = 0 nfaces = 0 scale = 1.3 neigh = 3 size = 50 margin = 40): filename = strftime("%Y%m%d_%H_%M_%S")+"_frame_cam.jpg" cv2.imwrite(filename, frame) # Press 'q' to quit #if cv2.waitKey(1) & 0xFF == ord('q'): # break cv2.destroyAllWindows() Figure 8. Face detection script—save the frame. Figure 10 shows another Python script to detect faces. Basically the idea is the same, but this script does not save the whole frame, it saves only the detected faces. The script identifies the faces and adds some margin to get more information to help the recognition software. After adding the margin, the script crops the frame and saves into a small image. Figure 9 shows the face detection internal rectangle (green) and face detection with margin in the external rectangle (blue). Figure 9. Face detection and margin. import cv2, platform import numpy as np import urllib( '/usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml') cam = "" stream = urllib.urlopen(cam) bytes = '' nframe = 0 nfaces = 0 scale = 1.3 neigh = 3 size = 50 margin = 40 xfhd = 1920 yfhd = 1080): iface = 0 for x1, y1, x2, y2 in rects: iface = iface+1 nfaces = nfaces+1 sface = "_%02d" % iface filename = strftime("%Y%m%d_%H_%M_%S")+ sface +".jpg" yf1 = y1 – margin if yf1 < 0: yf1 = 0 yf2 = y2 + margin if yf2 >= yfhd: yf1 = yfhd - 1 xf1 = x1 – margin if xf1 < 0: xf1 = 0 xf2 = x2 + margin if xf2 >= xfhd: xf2 = xfhd - 1 crop_img = frame[yf1:yf2, xf1:xf2] cv2.imwrite(filename, crop_img) # Press 'q' to quit #if cv2.waitKey(1) & 0xFF == ord('q'): # break cv2.destroyAllWindows() Figure 10. Face detection script—save only the faces. This work shows how the OpenCV library can be used to provide adequate input to some face recognition software. Intel Distribution for Python 2018 greatly improves OpenCV performance. Any package included in Intel Distribution for Python as the deep learning framework can be used to make recognition software. Depending on the image, some filters of OpenCV can be used to improve image sharpness; for example, the histogram equalization. If the face recognition software is used from a cloud, the second script shown in Figure 10 is more appropriate because it saves only the face, not the entire frame, saving storage space, since the file is smaller and its upload is faster. In the examples discussed above, the frame size was around 400 KB and the face size was around 35 KB. Figure 11 shows a fragment of the code of the script for uploading a file to S3* on Amazon Web Services* (AWS). Once the upload is completed, the file is removed. This code fragment can be included in any of the previously shown scripts. import boto3 import os # ... # Upload frame to AWS and remove the file s3.upload_file(filename, 'YOUR_BUCKET', 'YOUR_FOLDER/'+filename) # remove file after upload os.remove(filename) Figure 11. Stretch for upload to AWS* Cloud.
https://software.intel.com/content/www/us/en/develop/articles/face-detection-with-intel-distribution-for-python.html
CC-MAIN-2020-29
refinedweb
1,498
57.98
Implementing a Generic Object State Dumper Every .NET class inherits the ToString method from the root Object class. This method, ToString, has several uses. One of its main uses is to dump the state of the class objects to facilitate debugging process. For example, in the following class, MyClass overrides ToString to return the state of the MyClass objects. using System; class MyClass { public MyClass(){} public override string ToString() { return "iMyState1 = " + iMyState1.ToString() + "\n" + "strMyState = " + strMyState2 + "\n"; } private int iMyState1; private string strMyState2; } The problem with the above approach is that it is a manual process; whenever MyClass is changed by adding or deleting attributes, it is necessary to update the ToString to dump correct and complete state. For example, if a new state variable strMyState3 is added to the MyClass, ToString must be updated so that it returns the strMyState3 value, also. Similarly, if iMyState1 is deleted from the class, ToString must be updated to remove references to iMyState1 from the function to compile the code. This article includes the source code of the Dbg class that implements the two functions DisplayObject and DisplayClass, which facilitate this process. The Dbg.DisplayObject is used to dump the state of an instance object and Dbg.DisplayClass is used to dump the static attributes of a class. Let's rewrite MyClass using Dbg class. using System; using MyDbg; // Class Dbg is defined in MyDbg namespace class MyClass { public MyClass(){} public override string ToString() { return Dbg.DisplayObject(this); } private int iMyState1; private string strMysState2; } Now, if attributes are added or deleted from MyClass, it is automatically taken care and no changes are needed to the ToString method. Not only this, the resulting code is much more readable. The readability effect can be seen prominently when the class state contains several variables. Mostly, you will need to use Dbg.DisplayObject, which dumps both instance as well as static attributes of a class. However, sometimes you will need to see static attributes of a class without an instantiating object of that class. In such situations, Dbg.DisplayClass is indispensable. Note that the use of Dbg.DisplayObject and Dbg.DisplayClass is not limited to the ToString method. These can be used to dump the state of a object or class at any time and place. These can even be used to dump the state of objects and classes that you have not implemented and do not have access to the source. The download of this article contain two files. The first file is Dbg.cs, which implements the Dbg class. The second file is test.cs, which shows the usage of Dbg.cs. To compile it, use the csc Dbg.cs test.cs command. It will create the test.exe application. The easiest way to use Dbg in an application is to add the Dbg.cs file to the project and import MyDbg namespace, as done in the examples given. There are no comments yet. Be the first to comment!
http://www.codeguru.com/csharp/.net/net_debugging/statemanagement/article.php/c5913/Implementing-a-Generic-Object-State-Dumper.htm
CC-MAIN-2017-34
refinedweb
494
67.15
The CEO Big Cat Rescue Evolving Cat Stories Finances Missing Founder The CEO Big Cat Rescue Evolving Cat Stories Finances Missing Founder Search Big Cat Rescue's Earth Day Message Receives Backlash 4/23/2018 On Earth Day, March 22, 2018, Big Cat Rescue posted an infographic on Facebook that contained unverified claims asserting that the consumption of water, grain, land, and co2 emissions could be greatly reduced if people were to eat a vegan diet for a day. Unsurprisingly, some of their followers took issue with the post. People tend to get peeved when an organization they follow on social media starts posting unrelated content people didn’t follow them for. Many content creators usually try to steer clear from divisive topics that run the risk of alienating a large portion of their audience. Big Cat Rescue seems to have no qualms driving straight into those topics, although to be fair, they probably thought they were posting something uncontroversial. Below is Big Cat Rescue’s social media post that drew ire from some of their Facebook followers. Big Cat Rescue should definitely keep posting such content. Doing so provides an opportunity for people to start questioning if the organization they support has an agenda other than “rescuing” exotic cats. It’s a question many should take into consideration. Their motives seem to stretch far beyond just caring for their animals. Why else would they come to the defense of People for the Ethical Treatment of Animals (PETA), a notorious animal rights organization that seems to always be embroiled in controversy ? Do they have something to lose if PETA were to succumb to the "slanderous campaigns"? At least for now, we can have a laugh at Big Cat Rescue’s expense. Below are some of the funnier replies to their post which you can see for yourself by clicking here . There were commenters that attempted to refute the claims made in the infographic, but many others took to solely mocking vegans. We hold no animosity towards vegans and this article wasn't made to belittle them. We just couldn’t resist bringing attention to another incident where Big Cat Rescue’s plans backfired, resulting in their followers briefly turning against them. We find it odd that Big Cat Rescue is promoting veganism even though they’re trying to import 3 or 4 big cats from Guatemala. They made it abundantly clear that captive bred cats such as tigers will never go free and serve no conservation purpose. With that in mind, wouldn't they actually be increasing the amount greenhouse gas emissions released and the amount of water, grain, and land utilized by importing cats they believe shouldn't be in captivity ? After all, cats are strictly carnivores which means numerous animals will have to be killed to keep them alive.
https://www.bcrwatch.com/blog/big-cat-rescues-earth-day-message-receives-backlash
CC-MAIN-2019-22
refinedweb
471
57.81
Hello People, I am the silly b* who started this thread. I am, sort of, sorry I did :-) To brig it back to the original intent or kill it, rather than start another, I wish to remind what the original problem was: IF one uses 'stat' call, AND one undefines _WIN32, AND one includes unistd.h THEN one may get into stack corruption issues, subtle 'bugs' and such like, totally unexpected and uncalled for, problems in a, otherwise perfectly fine, piece of C code. I experienced this personally and traced it down to the __MS_types__ being defined when _WIN32 is defined and not beng defined otherwise. Here is the extract from the original post: ---- begin extract --- It turned out, after further investigation, that '__MS_types__' is defined in unistd.h and that this is what makes all the difference. Now I code that as: #if defined(__CYGWIN32__) && !defined(_WIN32) # define __MS_types__ /* this breaks stat function if not defined */ # define _MS_types_DEFINED /* at the time unistd.h is included */ #endif #include <unistd.h> #if defined(__CYGWIN32__) && defined(_MS_types_DEFINED) # undef __MS_types__ # undef _MS_types_DEFINED #endif This way I avoid defining _WIN32, can safely (?) undefine _WIN32 and code on the basis of 'if _WIN32 is not defined than it must be Unix or VMS' :-). Since I found that workaround I stopped poking around to see what exactly breaks the 'stat'. If anyone knows or finds out please let me know :-). This message may, perhaps, save somebody a great deal of hassle in the future :-) --- end extract --- It would, in my opinion, be more beneficial to 'fix' the stat-related issue and allow people to use or not use _WIN32 as they see fit rather than discuss the merits of its being or not being there :-) Sorry for unintentionally causing the prolonged discussion :-) ------------------ Cheers ... Michael Czapski - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request@cygnus.com" with one line of text: "help".
https://cygwin.com/pipermail/cygwin/1998-September/012949.html
CC-MAIN-2021-49
refinedweb
322
60.35
Yesterday I posted something of a rant about the poor state of our Sub and NameSpace PMCs. The problems in these two PMCs, and resulting problems caused by them in other places, are really symptoms of a single problem: That the packfile loader blindly inserts Sub PMCs into the corresponding NameSpace PMCs at runtime, and leaves the NameSpace PMC to sort out the details. I would like to show you the three offending pieces of code that really lead us down this rabbit hole. The first snippet is from the heart of IMCC, the code that adds a namespace to a Sub during compilation: ns_pmc = NULL; if (ns) { switch (ns->set) { case 'K': if (ns_const >= 0 && ns_const < ct->pmc.const_count) ns_pmc = ct->pmc.constants[ns_const]; break; case 'S': if (ns_const >= 0 && ns_const < ct->str.const_count) { ns_pmc = Parrot_pmc_new_constant(imcc->interp, enum_class_String); VTABLE_set_string_native(imcc->interp, ns_pmc, ct->str.constants[ns_const]); } break; default: break; } } sub->namespace_name = ns_pmc; In this snippet, ns is a SymReg* pointer. Basically, it’s a pointer to a parse token representing the NameSpace declaration. ns->set is the type of declaration, 'K' for a Key PMC and 'S' for a STRING literal. The two forms are written in PIR as: .namespace "Foo" .namespace ["Foo"] Actually, I don’t know if the first is still valid syntax, so the 'S' part of this block might be dead code. We can dig into that later, it’s not really important now. The last line of the snippet sets the namespace_name attribute on the Sub PMC to be either a Key PMC or a String PMC containing the name of the namespace. Notice that the Sub PMC has attributes namespace_name and namespace_stash, both of which are PMCs. The namespace_name is populated at compile time and is used by the packfile loader to create the NameSpace PMC automatically. A reference to that NameSpace PMC is stored in namespace_stash. Thereafter, namespace_name is rarely used. We can definitely talk about ripping out one of these two attributes, if we can’t make bigger improvements in a reasonable amount of time. In the long run, both will be gone. The second snippet I want to show you is inside the packfile loader: for (i = 0; i < self->pmc.const_count; i++) self->pmc.constants[i] = PackFile_Constant_unpack_pmc(interp, self, &cursor); for (i = 0; i < self->pmc.const_count; i++) { PMC * const pmc = self->pmc.constants[i] = VTABLE_get_pmc_keyed_int(interp, self->pmc.constants[i], 0); if (VTABLE_isa(interp, pmc, sub_str)) Parrot_ns_store_sub(interp, pmc); } I’ve removed comments for clarity (No, that’s not some kind of a joke. There were comments in this snippet, and they are not helpful for understandability). In this snippet we first loop for the number of PMC constants, unpacking and thawing each from the packfile. Then in the second loop we loop over all of them again, to see which, if any, are Subs. For any Subs, we call Parrot_ns_store_sub to read the namespace_name out of the Sub PMC, create the NameSpace if necessary, and then insert that Sub into the namespace. That brings me to my third snippet of code: ns = get_namespace_pmc(interp, sub_pmc); /* attach a namespace to the sub for lookups */ sub->namespace_stash = ns; /* store a :multi sub */ if (!PMC_IS_NULL(sub->multi_signature)) store_sub_in_multi(interp, sub_pmc, ns); /* store other subs (as long as they're not :anon) */ else if (!(PObj_get_FLAGS(sub_pmc) & SUB_FLAG_PF_ANON) || sub->vtable_index != -1) { STRING * const ns_entry_name = sub->ns_entry_name; PMC * const nsname = sub->namespace_name; Parrot_ns_store_global(interp, ns, ns_entry_name, sub_pmc); } This snippet comes to us from the heart of the Parrot_ns_store_sub routine I mentioned above. This is basically a duplication of some logic found in the NameSpace PMC. My first thought was that the duplicated code paths should be merged. My second thought is that they both need to just be deleted. In this snippet, we call get_namespace_pmc to find or create the NameSpace that suits the current Sub. If the Sub is flagged :multi, we add it to a MultiSub instance in that namespace. Otherwise, so long as the Sub isn’t flagged :anon or :vtable, we add it to the NameSpace. So those are the three bits of Parrot that are causing all these problems. These are the three bits that really encapsulate what the problem with Sub is, why it’s so bad, why Subs eat up so much memory, and why load performance on packfiles is so poor. These three, small, innocuous snippets of code are really the root of so many problems. This is all it takes. What is really being done here? IMCC has all the compile-time information, and as it’s going along it’s collecting that information in a parse tree of SymReg structures. A SymReg representing a Sub contains a pointer to a SymReg for the owner namespace, a SymReg for the string of the Sub’s name, a SymReg for each flag, etc. When it comes time to compile the Sub down to bytecode, it creates a Sub PMC and dutifully stores all this information from the .sub SymReg into the Sub PMC. After all, all that information is together when we parse and compile it, so storing it all together in the same place for storage does seem like a reasonable thing to do. We store the Sub PMC in the constants table of the packfile and move on to the next Sub. On startup then, since we have all these Sub PMCs and each contains all the necessary data to set themselves up, we read out all this data and start recreating the necessary details: NameSpaces, MultiSubs, etc. This all makes some good sense as well, in theory. In practice, we end up with lots of bits of data (the Subs) tasked with recreating the containers in which they are to be stored (the NameSpace, Class, and MultiSubs). This means that each Sub needs to contain enough information to possibly recreate all the possible containers where it could be stored (NameSpace, Class, and MultiSub), and that is extremely wasteful. Here’s the big question I have: Why are we creating the NameSpace and the MultiSub PMCs at runtime? Why don’t we create them at compile time, and simply have them available and ready to use already when we load in the packfile? Here’s an alternate chain of events to consider. When IMCC reaches a .namespace directive and creates the associated SymReg, we should also immediately create a NameSpace PMC. Then when we create .subs in PIR, we can add each to the current NameSpace, instead of storing the namespace SymReg reference in the Sub. When we go to create the bytecode, we serialize and store all the NameSpace PMCs, which will recurse and serialize/store all their component Subs. The same thing goes with MultiSubs: When we find a :multi flag, IMCC should create a MultiSub PMC immediately instead of a Sub PMC, and perform the mergers at compile time. When we serialize the NameSpace, it recursively serializes the MultiSubs, which recursively serializes the various component Subs. One other thing we are going to want to do is create Class PMCs, or some kind of compile-time stand-in. This way we are able to handle :method Subs easily, by inserting them into Classes at compile time, not runtime. There are some complications here, so I’ll discuss them in a bit. The real beauty of this change shows up on the loader side: When we load the packfile, we loop over and thaw all the PMCs. Then….We’re done. Maybe when we load a NameSpace we need to fix it up and insert it into the NameSpace tree. Also, when we load a NameSpace with the same name as a NameSpace that already exists in the tree we need to merge them together. That’s a small and inconsequential operation, especially considering how much other code we’re going to delete or streamline. Here are some problems that we are going to fix: - Methods will never need to be stored in the NameSpace, even temporarily - Improve startup performance, by not needing to do a VTABLE_isaon every PMC to see if it’s a Sub. If so, we can avoid logic for inserting the Sub into an auto-created NameSpace, the storing it in weird ways depending on flags, and doing all that other crap. - We can significantly cut down logic from the NameSpace PMC, and probably make them much cheaper in terms of used memory and logic overhead - We can slim down several fields from Sub: namespace_stash, namespace_name, vtable_index, method_name, ns_entry_name, multi_signature, and probably comp_flagstoo. Some of these are going to require deprecations, and some of them are going to require us to provide workarounds in certain areas. - If we can make IMCC less reliant on direct structure access for setting up a Sub, which is a real possibility when there is less “setting up” to be done, we can make it more easy to replace Sub entirely with a custom subclass at compile time. That’s something we’ve always wanted but never been able to do precisely because there were so many direct attribute accesses in IMCC. - We can move more processing to compile-time and do less of it at load time, decreasing startup time for most programs run from bytecode. - We can probably simplify a lot of IMCC logic by actually creating the PMCs we need directly, instead of creating a bunch of structures which contain the information we need to create the things we need later. The issue of Classes and Methods is a little bit tricky because looming overhead are the impending 6model refactors. The :method flag on a Sub really performs two tasks: First, it tells IMCC to automatically add a parameter to the front of the list called “ self”. Second, it tells the NameSpace to store the Sub, but to do so in a super-secret way that only the Class PMC can find. The first use I’ve always felt was nonsensical, especially when you consider requests to add a new :invocant flag for parameters to manually specify the name of the invocant, and the fact that the automatic behavior of it creates a large number of problems especially with respect to VTABLEs. In my new conception of things, NameSpace won’t be storing methods anyway, so the second use of the flag disappears completely. I say we deprecate it soon and remove it entirely at the earliest possible convenience. In the near-term, I think the :method flag is going to be used to create a ProtoClass or an uninitialized Class PMC at compile time. Then, when we call the newclass opcode at runtime it will look to see if we have a Class (or ProtoClass) by that name and if so will return the existing object, marking it as being “found” to prevent calling newclass again on it. That sequence of events is a little bit more messy than I would like (again, I would like to avoid the :method flag entirely and do class creation either entirely at compile time or entirely at runtime, but maintaining compatability with current syntax may lead in a more messy direction). I’ll explore some of these ideas in a later post. I’ve created a branch locally to start exploring some of these ideas, and will push it to the repo when I have something to show. Depending on how this project lends itself to division, I may end up with many small atomic branches or one large overwhelming one. Both paths are equally plausible. I’m going to start playing around with some code, and when I find something that seems like a reasonable stopping point I’ll try to merge it if reasonable.
http://whiteknight.github.io/2011/08/17/sub-first-steps.html
CC-MAIN-2017-22
refinedweb
1,956
59.74
When you work in a small team, it tends to be difficult to write and maintain separate code for Android, iOS, and Windows. That’s where hybrid frameworks like Ionic come into the picture. They not only enable us to write a single piece of code that can be used on all three platforms, but mean we can do so using our existing tech stack. In this tutorial we are going explore how to tackle a common task like data visualisation in Ionic 2, one of the most promising hybrid app frameworks out there. I will use the FusionCharts JavaScript chart library (fusioncharts.com), for this project as it offers a large library of over 90 charts, is compatible with every device and browser, and is very easy to work with. Setting up Ionic 2 To develop apps with Ionic 2, you need Node.js version 4+ and npm running on your OS. You can download the Node.js package from nodejs.org/en/download and npm will be installed along with it. If you already have a different version of Node.js running and want to run version 4+ as well, you can do that through Node Version Manager. Next you need to install Ionic 2 Beta using npm. To do this, run npm install -g ionic@beta in your terminal from a user account with root privileges (we are installing the module globally). To simulate the Ionic app we are creating in multiple platforms, we need one more Node module: Cordova. You can install this globally using npm install -g cordova. We are now ready to create our first Ionic app. However, with this setup, we’ll only be able to see the application in a browser. To simulate the app for an iOS or Android device, we need to build that particular platform module to Cordova. In this tutorial we will be building the iOS module, so you need to run ionic platform add ios. Finally, you need to install Xcode. You’ll find instructions for this here. Creating an Ionic 2 App In this tutorial, we’re going to create an Ionic 2 app named ‘Charts’. We’ll create a ‘charts’ folder in your current working directory and bootstrap the app with a sample application. The sample app will contain a basic page, as described here. To create this app, run ionic start charts --v2 in the current working directory (charts is the name of the app and --v2 tells Ionic we want to create an Ionic 2 app). On execution of this command, a charts folder will be created in the current working directory. To test the app in the browser, navigate to the charts folder and run ionic serve. This will launch the app in your default browser. Adding a new page Now let’s add a page/component to the charts application that will create JavaScript charts. First, we will just add a simple HTML page with 'Hello World' in it.. To create the page we will add donut-chart.js and donut-chart.html files to the charts/app/pages donut-chart directory. In the HTML file, we can add the code for app navigation and a simple ‘Hello World’ heading: <ion-navbar *navbar> <button menuToggle> <ion-icon</ion-icon> </button> <ion-title>Hello Ionic</ion-title> </ion-navbar> <ion-content> <h1>Hello World</div> </ion-content> In the JavaScript file, we reference the HTML file created as the template for this component. Since we are not doing anything fancy just yet, we can just add an empty constructor ChartsPage. import {Page} from 'ionic-angular'; @Page({ templateUrl: 'build/pages/pie-chart/pie-chart.html' }) export class ChartsPage { constructor() { } } We’ve just created a standalone component; now we need to link this into the main app. To do this we need to reference the component we have created in the app.js file in the app folder, and use the component in the pages property of the app component constructor. import {ChartsPage} from './pages/donut-chart/donut-chart' constructor(app, platform, menu) { // default app constructor this.app = app; this.platform = platform; this.menu = menu; this.initializeApp(); // set our app's pages - we are adding donut chart here this.pages = [ { title: 'Welcome', component: HelloIonicPage }, { title: 'Donut Chart', component: ChartsPage} ]; // make HelloIonicPage the root (or first) page - default step this.rootPage = HelloIonicPage; } After making these changes, the Ionic app in the browser should auto-reload (or use ionic serve from the terminal again). Now a new link should be visible in the side menu of the app, and on clicking that you should see ‘Hello World’ written on the screen. Creating a JavaScript chart Now it’s time to modify our ‘Hello World’ page to create a doughnut chart. To be able to use the FusionCharts library, we need to first include the fusioncharts.js and fusioncharts.charts.js files in the www/index.html file. Quick Tip: If both the files are in the same folder, then adding fusioncharts.js will be enough, as this will automatically include fusioncharts.charts.js. <script type="text/javascript" src="path/to/fusioncharts.js"></script> We will now modify the HTML from the previous step to create a chart container: <div id="chart-container"></div> In the constructor in donut-chart.js, which we created above, we need to add the following code to create the chart inside the chart container: FusionCharts.ready(function() { var revenueChart = new FusionCharts({ type: 'doughnut2d', renderAt: 'chart-container', width: '100%', height: '450', dataFormat: 'json', dataSource: { "chart": { "caption": "Split of Revenue by Product Categories", "subCaption": "Last year", "numberPrefix": "$", "paletteColors": "#0075c2,#1aaf5d,#f2c500,#f45b00,#8e0000", // more chart attributes }, "data": [{ "label": "Food", "value": "28504" } // more data ] } }).render(); }); In this code we are creating a new chart through the FusionCharts’ constructor. The properties used are briefly explained below: type defines the type of chart renderAt is the ID of the container where we want to render the chart width and height are used to set the chart dimensions dataFormat is the format in which we are going to feed the chart data (you can use JSON as well as XML) dataSource contains chart cosmetics inside the FusionCharts chart object and the actual data to be plotted inside the data array Although I have shown only four attributes in the chart object, there are more than a hundred others you can use to improve your chart’s design. You can read more about that here. Once this code is added, run ionic serve to relaunch the app. You should see a ‘Donut Chart’ link in your side menu. If you followed all my steps properly, when you click that link you should see a doughnut chart! If not, please refer the code on the GitHub repo for this project to see where you went wrong. Note: After checking it in the browser, use ionic emulate ios to load your app in the iOS simulator. Summing up As you’ve just seen, it is not difficult to get started with data visualisation in Ionic 2. Although I’ve just made a simple doughnut chart to demonstrate the process, it is possible to create complex charts with multiple datasets using the same process. The only thing you need to figure out is the format in which FusionCharts accepts the data for that particular chart type. Once you are able to do that, you will be able to make any chart from the library. If you need any help with this topic or if you have any questions about the content of this tutorial, feel free to catch me on Twitter. I’m always happy to help! This article originally appeared in net magazine issue 283; buy it here.
http://www.creativebloq.com/how-to/create-interactive-charts-in-ionic-2
CC-MAIN-2017-13
refinedweb
1,288
63.7
The list-extras package Common not-so-common functions for lists. Since Data.List.Extras is prime realestate for extensions to Data.List, if you have something you'd like to contribute feel free to contact the maintainer (I'm friendly). I'm amenable to adopting code if you think your functions aren't enough for a package on their own. Or if you would rather maintain a separate package I can share the Data.List.Extras.Foo namespace. Properties Modules Flags Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info Downloads - list-extras-0.4.0.1.tar.gz [browse] (Cabal source package) - Package description (included in the package) Maintainers' corner For package maintainers and hackage trustees
http://hackage.haskell.org/package/list-extras-0.4.0.1
CC-MAIN-2015-32
refinedweb
125
58.18
A faster than Java. After that, I will show you why the question was the wrong question and why my results should be ignored. Then I will explain what question you should have asked. The benchmark Today we are going to choose a very simple algorithm to benchmark, the quick sort algorithm. I will provide implementations both in Scala and Java. Then with each I will sort a list of 100000 elements 100 times, and see how long each implementations takes to sort it. So let’s start off with Java:); } Timing this, sorting a list of 100000 elements 100 times on my 2012 MacBook Pro with Retina Display, it takes 852ms. Now the Scala implementation:) } It looks very similar to the Java implementation, slightly different syntax, but in general, the same. And the time for the same benchmark? 695ms. No benchmark is complete without a graph, so let’s see what that looks like visually: So there you have it. Scala is about 20% faster than Java. QED and all that. The wrong question However this is not the full story. No micro benchmark ever is. So let’s start off with answering the question of why Scala is faster than Java in this case. Now Scala and Java both run on the JVM. Their source code both compiles to bytecode, and from the JVMs perspective, it doesn’t know if one is Scala or one is Java, it’s just all bytecode to the JVM. If we look at the bytecode of the compiled Scala and Java code above, we’ll notice one key thing, in the Java code, there are two recursive invocations of the quickSort routine, while in Scala, there is only one. Why is this? The Scala compiler supports an optimisation called tail call recursion, where if the last statement in a method is a recursive call, it can get rid of that call and replace it with an iterative solution. So that’s why the Scala code is so much quicker than the Java code, it’s this tail call recursion optimisation. You can turn this optimisation off when compiling Scala code, when I do that it now takes 827ms, still a little bit faster but not much. I don’t know why Scala is still faster without tail call recursion. This brings me to my next point, apart from a couple of extra niche optimisations like this, Scala and Java both compile to bytecode, and hence have near identical performance characteristics for comparable code. In fact, when writing Scala code, you tend to use a lot of exactly the same libraries between Java and Scala, because to the JVM it’s all just bytecode. This is why benchmarking Scala against Java is the wrong question. But this still isn’t the full picture. My implementation of quick sort in Scala was not what we’d call idiomatic Scala code. It’s implemented in an imperative fashion, very performance focussed – which it should be, being code that is used for a performance benchmark. But it’s not written in a style that a Scala developer would write day to day. Here is an implementation of quick sort that is in that idiomatic Scala style: def sortList(list: List[Int]): List[Int] = list match { case Nil => Nil case head :: tail => sortList(tail.filter(_ < head)) ::: head :: sortList(tail.filter(_ >= head)) } If you’re not familiar with Scala, this code may seem overwhelming at first, but trust me, after a few weeks of learning the language, you would be completely comfortable reading this, and would find it far clearer and easier to maintain than the previous solution. So how does this code perform? Well the answer is terribly, it takes 13951ms, 20 times longer than the other Scala code. Obligatory chart: So am I saying that when you write Scala in the ‘normal’ way, your codes performance will always be terrible? Well, that’s not quite how Scala developers write code all the time, they aren’t dumb, they know the performance consequences of their code. The key thing to remember is that most problems that developers solve are not quick sort, they are not computation heavy problems. A typical web application for example is concerned with moving data around, not doing complex algorithms. The amount of computation that a piece of Java code that a web developer might write to process a web request might take 1 microsecond out of the entire request to run – that is, one millionth of a second. If the equivalent Scala code takes 20 microseconds, that’s still only one fifty thousandth of a second. The whole request might take 20 milliseconds to process, including going to the database a few times. Using idiomatic Scala code would therefore increase the response time by 0.1%, which is practically nothing. So, Scala developers, when they write code, will write it in the idiomatic way. As you can see above, the idiomatic way is clear and concise. It’s easy to maintain, much easier than Java. However, when they come across a problem that they know is computationally expensive, they will revert to writing in a style that is more like Java. This way, they have the best of both worlds, with the easy to maintain idiomatic Scala code for the most of their code base, and the well performaning Java like code where the performance matters. The right question So what question should you be asking, when comparing Scala to Java in the area of performance? The answer is in Scala’s name. Scala was built to be a ‘Scalable language’. As we’ve already seen, this scalability does not come in micro benchmarks. So where does it come? This is going to be the topic of a future blog post I write, where I will show some closer to real world benchmarks of a Scala web application versus a Java web application, but to give you an idea, the answer comes in how the Scala syntax and libraries provided by the Scala ecosystem is aptly suited for the paradigms of programming that are required to write scalable fault tolerant systems. The exact equivalent bytecode could be implemented in Java, but it would be a monstrous nightmare of impossible to follow anonymous inner classes, with a constant fear of accidentally mutating the wrong shared state, and a good dose of race conditions and memory visibility issues. To put it more concisely, the question you should be asking is ‘How will Scala help me when my servers are falling over from unanticipated load?’ This is a real world question that I’m sure any IT professional with any sort of real world experience would love an answer to. Stay tuned for my next blog post. Reference: Benchmarking Scala against Java from our JCG partner James Roper at the James and Beth Roper’s blogs blog. You’ve told that 20ms not too much. It’s true, but if we are talking about 10k request? In that context addition time not just in CPU waiting process but performing actions. For big resource those ms can be valuable. Also for big project it mean more power consumption, less ‘greener way’ as now fashion say.
http://www.javacodegeeks.com/2012/11/benchmarking-scala-against-java.html/comment-page-1/
CC-MAIN-2014-42
refinedweb
1,211
70.02
John Hunter > Do you mean fd.seek? D'oh! Yeah. > I did manage to read and write a 4GB file on crcdocs using the script I > posted above. Perhaps I don't understand what the "large" in large > file really means. I assumed it was 2**31 approx equal 2GB. Has the > default, non LFS limit, increased? I think the answer is "it depends." By default Python checks for large file support. From 'configure' if test "$have_long_long" = yes -a \ "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LARGEFILE_SUPPORT 1 _ACEOF In other words, the default is to support large files but only when the system supports >32 bit off_t. CVS says that was added in 1999. The fileobject.c code for seek has #if !defined(HAVE_LARGEFILE_SUPPORT) offset = PyInt_AsLong(offobj); #else offset = PyLong_Check(offobj) ? PyLong_AsLongLong(offobj) : PyInt_AsLong(offobj); #endif if (PyErr_Occurred()) return NULL; so my (corrected) statement about seeking to >2**31 should work. Though I'm not sure now that sys.maxint is the proper test since it might return 2**63 under a 64 bit machine. Hardcoding the value should work. > I did do the normal incantation with the CFLAGS when compiling python > for LFS on crcdocs. You're beyond my knowledge there. I thought that Python did the check automatically and didn't need the CLAGS= ... I compile from CVS source without special commands and it Just Works. Andrew dalke at dalkescientific.com
https://mail.python.org/pipermail/python-list/2004-September/253169.html
CC-MAIN-2014-10
refinedweb
240
69.18
This action might not be possible to undo. Are you sure you want to continue? CHAPTER 1: INTRODUCTION TO DERIVATIVES ....................................................... 6 1.1 Types of Derivative Contracts ............................................................................. 6 1.1.1 1.1.2 1.1.3 1.1.4 1.2 1.3 1.4 Forwards Contracts ................................................................................ 6 Futures Contracts .................................................................................. 6 Options Contracts .................................................................................. 6 Swaps .................................................................................................. 7 History of Financial Derivatives Markets ............................................................... 8 Participants in a Derivative Market ..................................................................... 10 Economic Function of The Derivative Market ........................................................ 10 CHAPTER 2: UNDERSTANDING INTEREST RATES AND STOCK INDICES ................ 12 2.1 2.2 2.3 2.4 2.5 Understanding Interest rates ............................................................................. 12 Understanding the Stock Index .......................................................................... 13 Economic Significance of Index Movements ......................................................... 14 Index Construction Issues ................................................................................. 14 Desirable Attributes of an Index ......................................................................... 15 2.5.1 2.6 Impact cost .......................................................................................... 16 Applications of Index ........................................................................................ 17 2.6.1 Index derivatives .................................................................................. 17 CHAPTER 3: FUTURES CONTRACTS, MECHANISM AND PRICING ........................... 18 3.1 3.2 3.3 3.4 3.5 3.6 3.7 Forward Contracts ............................................................................................ 18 Limitations of forward markets .......................................................................... 19 Introduction to Futures ..................................................................................... 19 Distinction between Futures and Forwards Contracts ............................................ 19 Futures Terminology ......................................................................................... 20 Trading Underlying vs. Trading Single Stock Futures ............................................. 21 Futures Payoffs ................................................................................................ 21 3.7.1 3.7.2 3.8 Payoff for buyer of futures: Long futures .................................................. 21 Payoff for seller of futures: Short futures ................................................. 22 Pricing Futures ................................................................................................. 23 3.8.1 Pricing equity index futures .................................................................... 23 1 3.8.2 3.8.3 3.9 Pricing index futures given expected dividend amount ............................... 24 Pricing index futures given expected dividend yield ................................... 24 Pricing Stock Futures ........................................................................................ 26 3.9.1 3.9.2 Pricing stock futures when no dividend expected ....................................... 26 Pricing stock futures when dividends are expected .................................... 26 CHAPTER 4: APPLICATION OF FUTURES CONTRACTS ............................................ 28 4.1 4.2 Understanding Beta (β) ..................................................................................... 28 Numerical illustration of Applications of Stock Futures .......................................... 28 4.2.1. Long security, sell futures ...................................................................... 28 4.2.2 4.2.3 4.2.4 4.2.5 4.3 Speculation: Bullish security, buy futures ................................................. 29 Speculation: Bearish security, sell futures ................................................ 29 Arbitrage: Overpriced futures: buy spot, sell futures ................................. 30 Arbitrage: Underpriced futures: buy futures, sell spot ................................ 30 Hedging using Stock Index futures ..................................................................... 31 4.3.1 4.3.2 By Selling Index Futures ........................................................................ 31 By Selling Stock Futures and Buying in Spot market .................................. 32 CHAPTER 5: OPTIONS CONTRACTS, MECHANISM AND APPLICATIONS ................. 33 5.1 5.2 5.3 Option Terminology .......................................................................................... 33 Comparison between Futures and Options ........................................................... 35 Options Payoffs ................................................................................................ 35 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.4 Payoff profile of buyer of asset: Long asset .............................................. 35 Payoff profile for seller of asset: Short asset ............................................. 36 Payoff profile for buyer of call options: Long call ....................................... 36 Payoff profile for writer of call options: Short call ...................................... 37 Payoff profile for buyer of put options: Long put ....................................... 38 Payoff profile for writer of put options: Short put ...................................... 39 Application of Options ....................................................................................... 40 5.4.1 5.4.2 5.4.3 5.4.4 5.4.5 Hedging: Have underlying buy puts ......................................................... 40 Speculation: Bullish security, buy calls or sell puts ..................................... 40 Speculation: Bearish security, sell calls or buy puts ................................... 42 Bull spreads - Buy a call and sell another ................................................. 46 Bear spreads - sell a call and buy another ................................................ 48 2 CHAPTER 6: PRICING OF OPTIONS CONTRACTS AND GREEK LETTERS ................. 51 6.1 6.2 6.3 Variables affecting Option Pricing ....................................................................... 51 The Black Scholes Merton Model for Option Pricing (BSO) ..................................... 52 The Greeks ..................................................................................................... 54 6.3.1 6.3.2 6.3.3 6.3.4 6.3.5 Delta ( ) ............................................................................................ 54 Gamma (Γ) .......................................................................................... 55 Theta (Θ) ............................................................................................ 55 Vega (ν) .............................................................................................. 55 Rho (ρ) ................................................................................................ 55 CHAPTER 7: TRADING OF DERIVATIVES CONTRACTS ........................................... 56 7.1 Futures and Options Trading System .................................................................. 56 7.1.1 7.1.2 7.1.3 7.1.4 7.1.5 7.2 Entities in the trading system ................................................................. 56 Basis of trading ..................................................................................... 57 Corporate hierarchy .............................................................................. 57 Client Broker Relationship in Derivative Segment ...................................... 59 Order types and conditions .................................................................... 59 The Trader Workstation ..................................................................................... 60 7.2.1 7.2.2 7.2.3 7.2.4 The Market Watch Window ..................................................................... 60 Inquiry window ...................................................................................... 61 Placing orders on the trading system ....................................................... 63 Market spread/combination order entry ................................................... 63 7.3 Futures and Options Market Instruments ............................................................ 64 7.3.1 7.3.2 7.3.3 7.3.4 Contract specifications for index futures ................................................... 64 Contract specification for index options .................................................... 65 Contract specifications for stock futures ................................................... 68 Contract specifications for stock options .................................................. 69 7.4 Criteria for Stocks and Index Eligibility for Trading ............................................... 71 7.4.1 7.4.2 7.4.3 Eligibility criteria of stocks ...................................................................... 71 Eligibility criteria of indices ..................................................................... 71 Eligibility criteria of stocks for derivatives trading on account of corporate ...... restructuring ........................................................................................ 72 7.5 Charges .......................................................................................................... 72 3 CHAPTER 8: CLEARING AND SETTLEMENT ............................................................. 74 8.1 Clearing Entities ............................................................................................... 74 8.1.1 8.1.2 8.2 8.3 Clearing Members ................................................................................. 74 Clearing Banks ..................................................................................... 74 Clearing Mechanism ......................................................................................... 74 Settlement Procedure ....................................................................................... 77 8.3.1 8.3.2 Settlement of Futures Contracts ............................................................. 77 Settlement of options contracts .............................................................. 78 8.4 Risk Management ............................................................................................. 80 8.4.1 8.4.2 NSCCL-SPAN ........................................................................................ 81 Types of margins .................................................................................. 81 8.5 Margining System ............................................................................................ 82 8.5.1 8.5.2 8.5.3 8.5.4 SPAN approach of computing initial margins ............................................. 82 Mechanics of SPAN ................................................................................ 83 Overall portfolio margin requirement ....................................................... 87 Cross Margining .................................................................................... 87 CHAPTER 9: REGULATORY FRAMEWORK .............................................................. 89 9.1 9.2 9.3 Securities Contracts (Regulation) Act, 1956 ......................................................... 89 Securities and Exchange Board of India Act, 1992 ................................................ 90 Regulation for Derivatives Trading ...................................................................... 90 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.4 Forms of collateral's acceptable at NSCCL ................................................ 92 Requirements to become F&O segment member ....................................... 92 Requirements to become authorized / approved user ................................ 93 Position limits ....................................................................................... 94 Reporting of client margin ...................................................................... 97 Adjustments for Corporate Actions ..................................................................... 97 CHAPTER 10: ACCOUNTING FOR DERIVATIVES ..................................................... 99 10.1 Accounting for futures ...................................................................................... 99 10.2 Accounting for options .................................................................................... 101 10.3 Taxation of Derivative Transaction in Securities .................................................. 104 10.3.1 Taxation of Profit/Loss on derivative transaction in securities .................... 104 10.3.2 Securities transaction tax on derivatives transactions .............................. 104 MODEL TEST PAPER……………………………………………………………… ......................................... 107 4 Distribution of weights of the Derivatives Market (Dealers) Module Curriculum Chapter No 1 2 3 4 5 6 7 8 9 10 Title Introduction to Derivatives Understanding Interest Rates and Stock Indices Futures Contracts, Mechanism and Pricing Application of Futures Contracts Options Contracts, Mechanism and Applications Pricing of Options Contracts and Greek Letters Trading of Derivatives Contracts Clearing and Settlement Regulatory Framework Accounting for Derivatives Weights (%) 5 5 5 10 10 10 20 20 10 5 Note:- Candidates are advised to refer to NSE’s website: while preparing for NCFM test (s) for announcements pertaining to revisions/updations in NCFM modules or launch of new modules, if any. Copyright © 2011 by National Stock Exchange of India Ltd. . 5 CHAPTER 1: Introduction to Derivatives The term ‘Derivative’ stands for a contract whose price is derived from or is dependent upon an underlying asset. The underlying asset could be a financial asset such as currency, stock and market index, an interest bearing security or a physical commodity. Today, around the world, derivative contracts are traded on electricity, weather, temperature and even volatility. According to the Securities Contract Regulation Act, (1956) the term “derivative” includes: (i) a security derived from a debt instrument, share, loan, whether secured or unsecured, risk instrument or contract for differences or any other form of security; (ii) a contract which derives its value from the prices, or index of prices, of underlying securities. 1.1 Types of Derivative Contracts Derivatives comprise four basic contracts namely Forwards, Futures, Options and Swaps. Over the past couple of decades several exotic contracts have also emerged but these are largely the variants of these basic contracts. Let us briefly define some of the contracts 1.1.1 Forward Contracts: These are promises to deliver an asset at a pre- determined date in future at a predetermined price. Forwards are highly popular on currencies and interest rates. The contracts are traded over the counter (i.e. outside the stock exchanges, directly between the two parties) and are customized according to the needs of the parties. Since these contracts do not fall under the purview of rules and regulations of an exchange, they generally suffer from counterparty risk i.e. the risk that one of the parties to the contract may not fulfill his or her obligation. 1.1.2 Futures Contracts:. Futures contracts are available on variety of commodities, currencies, interest rates, stocks and other tradable assets. They are highly popular on stock indices, interest rates and foreign exchange. 1.1.3 Options Contracts: Options give the buyer (holder) a right but not an obligation to buy or sell an asset in future. Options are of two types - calls and puts. Calls give the buyer the right but not the obligation to buy a given quantity of the underlying asset, at a given price on 6 or before a given future date. Puts give the buyer the right, but not the obligation to sell a given quantity of the underlying asset at a given price on or before a given date. One can buy and sell each of the contracts. When one buys an option he is said to be having a long position and when one sells he is said to be having a short position. It should be noted that, in the first two types of derivative contracts (forwards and futures) both the parties (buyer and seller) have an obligation; i.e. the buyer needs to pay for the asset to the seller and the seller needs to deliver the asset to the buyer on the settlement date.. Incase the buyer of the option does exercise his right, the seller of the option must fulfill whatever is his obligation (for a call option the seller has to deliver the asset to the buyer of the option and for a put option the seller has to receive the asset from the buyer of the option). An option can be exercised at the expiry of the contract period (which is known as European option contract) or anytime up to the expiry of the contract period (termed as American option contract). We will discuss option contracts in detail in chapters 5 and 6. 1.1.4 flows in one direction being in a different currency than those in the opposite direction. Box 1.1: Over the Counter (OTC) Derivative Contracts Derivatives that trade on an exchange are called exchange traded derivatives, whereas privately negotiated derivative contracts are called OTC contracts. The OTC derivatives markets have the following features compared to exchange-traded derivatives: (i) The management of counter-party (credit) risk is decentralized and located within individual institutions, (ii) There are no formal centralized limits on individual positions, leverage, or margining, (iii) There are no formal rules for risk and burden-sharing, (iv) There are no formal rules or mechanisms for ensuring market stability and integrity, and for safeguarding the collective interests of market participants, and (iv) The OTC contracts are generally not regulated by a regulatory authority and the exchange’s self-regulatory organization. They are however, affected indirectly by national legal systems, banking supervision and market surveillance. 7 1.2 History of Financial Derivatives Markets Financial derivatives have emerged as one of the biggest markets of the world during the past two decades. A rapid change in technology has increased the processing power of computers and has made them a key vehicle for information processing in financial markets. Globalization of financial markets has forced several countries to change laws and introduce innovative financial contracts which have made it easier for the participants to undertake derivatives transactions. Early forward contracts in the US addressed merchants’ concerns about ensuring that there were buyers and sellers for commodities. ‘Credit risk’, however remained a serious problem. To deal with this problem, a group of Chicago businessmen formed the Chicago Board of Trade (CBOT) in 1848. The primary intention of the CBOT was to provide a centralized location (which would be known in advance) for buyers and sellers to negotiate forward contracts. In 1865, the CBOT went one step further and listed the first ‘exchange traded” derivatives contract in the US. These contracts were called ‘futures contracts”. In 1919, Chicago Butter and Egg Board, a spin-off of CBOT, was reorganized to allow futures trading. Its name was changed to Chicago Mercantile Exchange (CME). The CBOT and the CME remain the two largest organized futures exchanges, indeed the two largest “financial” exchanges of any kind in the world today. The first exchange-traded financial derivatives emerged in 1970’s due to the collapse of fixed exchange rate system and adoption of floating exchange rate systems. As the system broke down currency volatility became a crucial problem for most countries. To help participants in foreign exchange markets hedge their risks under the new floating exchange rate system, foreign currency futures were introduced in 1972 at the Chicago Mercantile Exchange. In 1973, the Chicago Board of Trade (CBOT) created the Chicago Board Options Exchange (CBOE) to facilitate the trade of options on selected stocks.Dollar. 8 Box 1.2: History of Derivative Trading at NSE The derivatives trading on the NSE commenced on June 12, 2000 with futures trading on S&P CNX Nifty Index. Subsequent trading in index options and options on individual securities commenced on June 4, 2001 and July 2, 2001. Single stock futures were launched on November 9, 2001. Ever since the product base has increased to include trading in futures and options on CNX IT Index, Bank Nifty Index, Nifty Midcap 50 Indices etc. Today, both in terms of volume and turnover, NSE is the largest derivatives exchange in India. The derivatives contracts have a maximum of 3-month expiration cycles except for a long dated Nifty Options contract which has a maturity of 5 years. Three contracts are available for trading, with 1 month, 2 months and 3 months to expiry. A new contract is introduced on the next trading day following the expiry of the near month contract. Futures contracts on interest-bearing government securities were introduced in mid-1970s. The option contracts on equity indices were introduced in the USA in early 1980’s to help fund managers to hedge their risks in equity markets. Afterwards a large number of innovative products have been introduced in both exchange traded format and the Over the Counter (OTC) format. The OTC derivatives have grown faster than the exchange-traded contracts in the recent years. Table 1.1 gives a bird’s eye view of these contracts as available worldwide on several exchanges. Table 1.1: Spectrum of Derivative Contracts Worldwide Underlying Asset Exchangetraded futures Equity Index future Stock future Interest rate Interest rate futures linked to MIBOR Exchangetraded options Index option Stock option Options on futures Interest rate swaps Equity swap Back to back repo agreement Forward rate agreement Stock options Warrants Interest rate caps, floors & collars. Swaptions Credit Bond future Option on Bond future Credit default Repurchase swap Total return swap Foreign exchange Currency future Option on currency future 9 Currency swap Currency forward Currency option agreement Credit default option Type of Derivative Contract OTC swap OTC forward OTC option The above list is not exhaustive. Several new and innovative contracts have been launched over the past decade around the world including option contracts on volatility indices. 1. • Arbitrageurs: They take positions in financial markets to earn riskless profits. The arbitrageurs take short and long positions in the same or different contracts at the same time to create a position which can generate a riskless profit. 1.4 Economic Function of the Derivative Market The derivatives market performs a number of economic functions. In this section, we discuss some of them. • Prices in an organized derivatives market reflect the perception of the market participants about the future and lead the prices of underlying to the perceived future level. The prices of derivatives converge with the prices of the underlying at the expiration of the derivative contract. Thus derivatives help in discovery of future as well as current prices. • The derivatives market helps to transfer risks from those who have them but do not like them to those who have an appetite for them. • Derivatives, due to their inherent nature, are linked to the underlying cash markets. With the introduction of derivatives, the underlying market witnesses higher trading volumes. This is because of participation by more players who would not otherwise participate for lack of an arrangement to transfer risk. • Speculative trades shift to a more controlled environment in derivatives market. In the absence of an organized derivatives market, speculators trade in the underlying cash markets. Margining, monitoring and surveillance of the activities of various participants become extremely difficult in these kind of mixed markets. 10 • benefit of which are immense. In a nut shell, derivatives markets help increase savings and investment in the long run. Transfer of risk enables market participants to expand their volume of activity. 11 CHAPTER 2: Understanding Interest Rates and Stock Indices In this chapter we will discuss the interest rates and market index related issues, since it will help better understand the functioning of derivatives markets. We will also learn about derivative contracts on indices which have the index as underlying. 2.1 Understanding Interest rates The interest rates can be discrete or continuous. When people invest in financial markets (such as equity shares), returns on assets change continuously and lead to the fact that continuous compounding should be used. On the other hand a fixed deposit is discretely compounded and the frequency could be from annual to quarterly to daily. The interest rates are always quoted on per annum basis. However,. Thus, if Rs 100 is deposited in a fixed deposit it would give a return of Rs 100(1+0.1) = Rs 110. However the final amount will be different if the compounding frequency changes. For instance, if the compounding frequency is changed to semi annual and the rate of interest on Rs.100 is 10% then the amount on maturity would be Rs. 110.250. The table 2.1 below shows the change in amount when the same interest rate is compounded more frequently i.e. from annual to daily and finally continuous compounding. Table 2.1: Interest Rate and Compounding Frequency Principal (Rs) 100 100 100 100 100 100 Interest Rate (%) 10% 10% 10% 10% 10% 10% Compounding Frequency Annual Semi Annual Quarterly Monthly Daily Continuously Calculation 100(1+10%) 100[1+(10%/2)]2 100[1+(10%/4)]4 100[1+(10%/12)]12 100[1+(10%/365)]365 100e [(0.1)(1)] Amount in one year (Rs) 110.000 110.250 110.381 110.471 110.516 110.517 It should be noted that daily compounding is the new norm for calculating savings accounts balances by banks in India (starting from April 1, 2010). The continuous compounding is done 12 by multiplying the principal with ert where r is the rate of interest and t the time period. e is exponential function which is equal to 2.718. Illustration 2.1 What is the equivalent rate for continuous compounding for an interest rate which is quoted: (a) (b) 8% per annum semi annual compounding? 8% per annum annual compounding? 2ln(1+0.08/2)=0.078441=7.844% ln(1+.08) =0.07696=7.696% Solution: (a) (b) Illustration 2.2 A bank quotes you an interest rate of 10% per annum with quarterly compounding. What is the equivalent rate when it is: (a) (b) Continuous compounding Annual compounding. 4ln (1+0.10/4)=0.098770=9.877% [(1+0.10/4)4]-1= 10.38% Solution: (a) (b) Part (b) of Illustration 2.2 is also called effective annual rate calculation. By this method any given interest rate or return can be converted to its effective annual interest rate or effective annual return. 2.2 Understanding the Stock Index An index is a number which measures the change in a set of values over a period of time. A stock index represents the change in value of a set of stocks which constitute the index. More specifically, a stock index number is the current relative value of a weighted average of the prices of a pre-defined group of equities. A stock market index is created by selecting a group of stocks that are representative of the entire market or a specified sector or segment of the market. It is calculated with reference to a base period and a base index value. The beginning value or base of the index is usually set to a number such as 100 or 1000. For example, the base value of the Nifty was set to 1000 on the start date of November 3, 1995. Stock market indices are meant to capture the overall behavior of equity markets. Stock market indices are useful for a variety of reasons. Some uses of them are: 1. 2. 3. 4. As a barometer for market behaviour, As a benchmark for portfolio performance, As an underlying in derivative instruments like Index futures, Index options, and In passive fund management by index funds/ETFs 13 2.3 Economic Significance of Index Movements Index movements reflect the changing expectations of the stock market about future dividends of the corporate sector. The index goes up if the stock market perceives that the prospective dividends in the future will be better than previously thought. When the prospects of dividends in the future become pessimistic, the index drops. The ideal index gives us instant picture about how the stock market perceives the future of corporate sector. Every stock price moves for two possible reasons: 1. News about the company- micro economic factors (e.g. a product launch, or the closure of a factory, other factors specific to a company) 2. News about the economy – macro economic factors (e.g. budget announcements, changes in tax structure and rates, political news such as change of national government, other factors common to all companies in a country) The index captures the second part, the movements of the stock market as a whole (i.e. news about the macroeconomic. The correct method of averaging is that of taking a weighted average, giving each stock a weight proportional to its market capitalization. Example: Suppose an index contains two stocks, A and B. A has a market capitalization of Rs.1000 crore and B has a market capitalization of Rs.3000 crore. Then we attach a weight of 1/4 to movements in A and 3/4 to movements in B. 2.4 Index Construction Issues A good index is a trade-off between diversification and liquidity. A well diversified index is more representative of the market/economy. There are however, which are included into an index when it is broadened. If the stock is illiquid, the observed prices yield contaminated information and actually worsen an index. The computational methodology followed for construction of stock market indices 14 companies as disclosed in the shareholding pattern submitted to the stock exchange by these companies1 . The Free float market capitalization is calculated in the following manner: Free Float Market Capitalisation = Issue Size * Price * Investible Weight Factor The Index in this case is calculated as per the formulae given below: The India Index Services Limited (IISL), a joint venture between the NSE and CRISIL, introduced the free float market capitalization methodology for its main four indices, viz., S&P CNX Nifty, S&P CNX Defty, CNX Nifty Junior and CNX 100. With effect from May 4, 2009 CNX Nifty Junior and with effect from June 26, 2009, S&P CNX Nifty, CNX 100 and S&P CNX Defty are being calculated using free float market capitalisation.. 2.5 Desirable Attributes of an Index A good market index should have three attributes: • • • It should capture the behaviour of a large variety of different portfolios in the market. The stocks included in the index should be highly liquid. It should be professionally maintained. 1 The free float method excludes (i) Government holding in the capacity of strategic investor, (ii) Shares held by promoters through ADRs/GDRs, (iii) Strategic stakes by corporate bodies/Individuals /HUF, (iv) Investments under FDI Category, (V) Equity held by associate /group companies 15 In brief the level of diversification of a stock index should be monitored on a continuous basis. It should ensure that the index is not vulnerable to speculation. Stocks with low trading volume or with very tight bid ask spreads are illiquid and should not be a part of index. The index should be managed smoothly without any dramatic changes in its composition. describes how S&P CNX Nifty addresses these issues. Box 2.1: The S&P CNX Nifty The S&P CNX Nifty is a float-adjusted market capitalization weighted index derived from economic research. It was designed not only as a barometer of market movement but also to be a foundation of the new world of financial products based on the index like index futures, index options and index funds.. The research that led up to S&P CNX Nifty is well-respected internationally as a pioneering effort in better understanding how to make a stock market index. The S&P CNX Nifty covers 21 sectors of the Indian economy and offers investment managers exposure to the Indian market in one efficient portfolio. It is used for a variety of purposes, such as benchmarking fund portfolios, index based derivatives and index funds. The Nifty is uniquely equipped as an index for the index derivatives market owing to its (a) low market impact cost and (b) high hedging effectiveness. The good diversification of Nifty generates low initial margin requirement. 2.5.1 Impact cost Market impact cost is a measure of the liquidity of the market. It reflects the costs faced when actually trading an index.%. For a stock to qualify for possible inclusion into the S&P CNX Nifty, it has to have market impact cost of below 0.50% when doing S&P CNX Nifty trades of two crore rupees. This means that if S&P CNX Nifty is at 2000, a buy order goes through at 2001, i.e. 2000+(2000*0.0005) and a sell order gets 1999, i.e. 2000-(2000*0.0005). Box 2.1 16 2.6 Applications of Index Besides serving as a barometer of the economy/market, the index also has other applications in finance. Various products have been designed based on the indices such as the index derivatives, index funds2 and the exchange traded funds3 . We here restrict our discussion to only index derivatives. 2.6.1 Index derivatives Index derivatives are derivative contracts which have the index as the underlying. The most popular index derivative contracts the world over are index futures and index options. NSE’s market index, the S&P CNX Nifty was scientifically designed to enable the launch of indexbased products like index derivatives and index funds. Following are the reasons of popularity of index derivatives: • Institutional and large equity-holders need portfolio-hedging facility. Index-derivatives are more suited to them and more cost-effective than derivatives based on individual stocks. Pension funds in the US are known to use stock index futures for risk hedging purposes. • Index derivatives offer ease of use for hedging any portfolio irrespective of its composition. • Stock index is difficult to manipulate as compared to individual stock prices, more so in India, and the possibility of cornering is reduced. This is partly because an individual stock has a limited supply, which can be cornered. • Stock index, being an average, is much less volatile than individual stock prices. This implies much lower capital adequacy and margin requirements. • Index derivatives are cash settled, and hence do not suffer from settlement delays and problems related to bad delivery, forged/fake certificates. 2 3 An index fund is a fund that tries to replicate the index returns. It does so by investing in index stocks in the proportions in which these stocks exist in the index. ETFs are just what their name implies: baskets of securities that are traded, like individual stocks, on an exchange. Unlike regular open-end mutual funds, ETFs can be bought and sold throughout the trading day like any stock. 17 CHAPTER 3: Futures Contracts, Mechanism and Pricing In recent years, derivatives have become increasingly important in the field of finance. While futures and options are now actively traded on many exchanges, forward contracts are popular on the OTC market. We shall first discuss about forward contracts along with their advantages and limitations. We then introduce futures contracts and describe how they are different from forward contracts. The terminology of futures contracts along with their trading mechanism has been discussed next. The key idea of this chapter however is the pricing of futures contracts. The concept of cost of carry for calculation of the forward price has been a very powerful concept. One would realize that it essentially works as a parity condition and any violation of this principle can lead to arbitrage opportunities. The chapter explains mechanism and pricing of both Index futures and futures contracts on individual stocks. 3.1 as given below: • • They are bilateral contracts and hence exposed to counter-party risk. Each contract is custom designed, and hence is unique in terms of contract size, expiration date and the asset type and quality. • • • The contract price is generally not available in public domain. On the expiration date, the contract has to be settled by delivery of the asset. If the party wishes to reverse the contract, it has to compulsorily go to the same counter-party, which often results in high prices being charged. 18 3.2 Limitations of forward markets Forward markets world-wide are posed by several problems: • • • Lack of centralization of trading, Illiquidity and Counterparty risk In the first two of these, the basic problem is that of too much flexibility and generality. The forward market is like a real estate market, in which any two consenting adults can form contracts against each other. This often makes them design the terms of the deal which are convenient in that specific situation, but makes the contracts non-tradable. Counterparty risk arises from the possibility of default by any one party to the transaction. When one of the two sides to the transaction declares bankruptcy, the other suffers. When forward markets trade standardized contracts, though it avoids the problem of illiquidity, still the counterparty risk remains a very serious issue. 3.3 Introduction to Futures. 3.4 Distinction between Futures and Forwards Contracts Forward contracts are often confused with futures contracts. The confusion is primarily because both serve essentially the same economic functions of allocating risk in the presence of future price uncertainty. However futures are a significant improvement over the forward contracts as they eliminate counterparty risk and offer more liquidity. Table 3.1 lists the distinction between the forwards and futures contracts. 19 Table 3.1: Distinction between Futures and Forwards Futures Trade on an organized exchange Standardized contract terms More liquid Requires margin payments Follows daily settlement Forwards OTC in nature Customised contract terms Less liquid No margin payment Settlement happens at end of period 3.5 • • Futures Terminology Spot price: The price at which an underlying asset trades in the spot market. Futures price: The price that is agreed upon at the time of the contract for the delivery of an asset at a specific future date. • Contract cycle: It is the period over which a contract trades. The index futures contracts on the NSE have one-month, two-month. • • Expiry date: is the date on which the final settlement of the contract takes place. Contract size: The amount of asset that has to be delivered under one contract. This is also called as the lot size. • Basis: Basis is defined as the futures price minus the spot price. There will be a different basis for each delivery month for each contract. In a normal market, basis will be positive. This reflects that futures prices normally exceed spot prices. • Cost of carry: Measures the storage cost plus the interest that is paid to finance the asset less the income earned on the asset. • Initial margin: The amount that must be deposited in the margin account at the time a futures contract is first entered into is known as initial margin. • Marking-to-market: In the futures market, at the end of each trading day, the margin account is adjusted to reflect the investor’s gain or loss depending upon the futures closing price. This is called marking-to-market. 20 • Maintenance margin: Investors are required to place margins with their trading members before they are allowed to trade. If the balance in the margin account falls below the maintenance margin, the investor receives a margin call and is expected to top up the margin account to the initial margin level before trading commences on the next day. 3.6 Trading Underlying vs. Trading Single Stock Futures The single stock futures market in India has been a great success story. One of the reasons for the success has been the ease of trading and settling these contracts. To trade securities, one must open a security trading account with a securities broker and a demat account with a securities depository. Buying security involves putting up all the money upfront. With the purchase of shares of a company, the holder becomes a part owner of the company. The shareholder typically receives the rights and privileges associated with the security, which may include the receipt of dividends, invitation to the annual shareholders meeting and the power to vote. Selling securities involves buying the security before selling it. Even in cases where short selling is permitted, it is assumed that the securities broker owns the security and then “lends” it to the trader so that he can sell it. To trade in futures, one must open a futures trading account with a derivatives broker. Buying futures simply involves putting in the margin money. They enable. 3.7 Futures Payoffs Futures contracts have linear or symmetrical payoffs. It implies that the losses as well as profits for the buyer and the seller of a futures contract are unlimited. These linear payoffs are fascinating as they can be combined with options and the underlying to generate various complex payoffs. 3.7.1 Payoff for buyer of futures: Long futures The payoff for a person who buys a futures contract is similar to the payoff for a person who holds an asset. He has a potentially unlimited upside as well as a potentially unlimited downside. Take the case of a speculator who buys a two-month Nifty index futures contract when the Nifty stands at 2220. The underlying asset in this case is the Nifty portfolio. When the index moves up, the long futures position starts making profits, and when the index moves down it starts making losses. 21 Figure 3.1: Payoff for a buyer of Nifty futures The figure 3.1 above shows the profits/losses for a long futures position. The investor bought futures when the index was at 2220. If the index goes up, his futures position starts making profit. If the index falls, his futures position starts showing losses. 3.7.2 Payoff for seller of futures: Short futures The payoff for a person who sells a futures contract is similar to the payoff for a person who shorts an asset. He has a potentially unlimited upside as well as a potentially unlimited downside. Take the case of a speculator who sells a two-month Nifty index futures contract when the Nifty stands at 2220. The underlying asset in this case is the Nifty portfolio. When the index moves down, the short futures position starts making profits, and when the index moves up, it starts making losses. Figure 3.2: Payoff for a seller of Nifty futures The figure 3.2 shows the profits/losses for a short futures position. The investor sold futures when the index was at 2220. If the index goes down, his futures position starts making profit. If the index rises, his futures position starts showing losses. 22 3.8 Pricing Futures Pricing of futures contract is very simple. Using the cost-of-carry logic, we calculate the fair value of a futures contract. Every time the observed price deviates from the fair value, arbitragers would enter into trades to capture the arbitrage profit. This in turn would push the futures price back to its fair value. The cost of carry model used for pricing futures is given below: F = SerT where: r T e Cost of financing (using continuously compounded interest rate) Time till expiration in years 2.71828 Example: Security XYZ Ltd trades in the spot market at Rs. 1150. Money can be invested at 11% p.a. The fair value of a one-month futures contract on XYZ is calculated as follows: 3.8.1 Pricing equity index futures A futures contract on the stock market index gives its owner the right and obligation to buy or sell the portfolio of stocks characterized by the index. Stock index futures are cash settled; there is no delivery of the underlying stocks. In their short history of trading, index futures have had a great impact on the world’s securities markets. Its existence has revolutionized the art and science of institutional equity portfolio management. The main differences between commodity and equity index futures are that: • • There are no costs of storage involved in holding equity. Equity comes with a dividend stream, which is a negative cost if you are long the stock and a positive cost if you are short the stock. Therefore, Cost of carry = Financing cost - Dividends. Thus, a crucial aspect of dealing with equity futures as opposed to commodity futures is an accurate forecasting of dividends. The better the forecast of dividend offered by a security, the better is the estimate of the futures price. 23 3.8.2 Pricing index futures given expected dividend amount The pricing of index futures is based on the cost-of-carry model, where the carrying cost is the cost of financing the purchase of the portfolio underlying the index, minus the present value of dividends obtained from the stocks in the index portfolio. This has been illustrated in the example below. Nifty futures trade on NSE as one, two and three-month contracts. Money can be borrowed at a rate of 10% per annum. What will be the price of a new two-month futures contract on Nifty? 1. Let us assume that ABC Ltd. will be declaring a dividend of Rs.20 per share after 15 days of purchasing the contract. 2. 3. 4. Current value of Nifty is 4000 and Nifty trades with a multiplier of 100. Since Nifty is traded in multiples of 100, value of the contract is 100*4000 = Rs.400,000. If ABC Ltd. Has a weight of 7% in Nifty, its value in Nifty is Rs.28,000 i.e.(400,000 * 0.07). 5. If the market price of ABC Ltd. is Rs.140, then a traded unit of Nifty involves 200 shares of ABC Ltd. i.e. (28,000/140). 6. To calculate the futures price, we need to reduce the cost-of-carry to the extent of dividend received. The amount of dividend received is Rs.4000 i.e. (200*20). The dividend is received 15 days later and hence compounded only for the remainder of 45 days. To calculate the futures price we need to compute the amount of dividend received per unit of Nifty. Hence we divide the compounded dividend figure by 100. 7. Thus, the futures price is calculated as; 3.8.3 Pricing index futures given expected dividend yield If the dividend flow throughout the year is generally uniform, i.e. if there are few historical cases of clustering of dividends in any particular month, it is useful to calculate the annual dividend yield. F = Se(r-q)T where: F futures price S spot index value r cost of financing 24 q expected dividend yield T holding period Example A two-month futures contract trades on the NSE. The cost of financing is 10% and the dividend yield on Nifty is 2% annualized. The spot value of Nifty 4000. What is the fair value of the futures contract ? Fair value = 4000e (0.1-0.02) × (60 / 365) = Rs. 4052.95 The cost-of-carry model explicitly defines the relationship between the futures price and the related spot price. As we know, the difference between the spot price and the futures price is called the basis. Nuances: • As the date of expiration comes near, the basis reduces - there is a convergence of the futures price towards the spot price. On the date of expiration, the basis is zero. If it is not, then there is an arbitrage opportunity. Arbitrage opportunities can also arise when the basis (difference between spot and futures price) or the spreads (difference between prices of two futures contracts) during the life of a contract are incorrect. At a later stage we shall look at how these arbitrage opportunities can be exploited. Figure 3.3: Variation of basis over time The figure 3.3 above shows how basis changes over time. As the time to expiration of a contract reduces, the basis reduces. Towards the close of trading on the day of settlement, the futures price and the spot price converge. The closing price for the June 28 futures contract is the closing value of Nifty on that day. 25 3.9 Pricing Stock Futures A futures contract on a stock gives its owner the right and obligation to buy or sell the stocks. Like index futures, stock futures are also cash settled; there is no delivery of the underlying stocks. Just as in the case of index futures, the main differences between commodity and stock futures are that: • • There are no costs of storage involved in holding stock. Stocks come with a dividend stream, which is a negative cost if you are long the stock and a positive cost if you are short the stock. Therefore, Cost of carry = Financing cost - Dividends. Thus, a crucial aspect of dealing with stock futures as opposed to commodity futures is an accurate forecasting of dividends. The better the forecast of dividend offered by a security, the better is the estimate of the futures price. 3.9.1 Pricing stock futures when no dividend expected The pricing of stock futures is also based on the cost-of-carry model, where the carrying cost is the cost of financing the purchase of the stock, minus the present value of dividends obtained from the stock. If no dividends are expected during the life of the contract, pricing futures on that stock involves multiplying the spot price by the cost of carry. It has been illustrated in the example given below: XYZ Ltd.’s futures trade on NSE as one, two and three-month contracts. Money can be borrowed at 10% per annum. What will be the price of a unit of new two-month futures contract on XYZ Ltd. if no dividends are expected during the two-month period? 1. Assume that the spot price of XYZ Ltd. is Rs. 228. Thus, futures price F = 228e = Rs. 231.90 3.9.2 Pricing stock futures when dividends are expected When dividends are expected during the life of the futures contract, pricing involves reducing the cost of carry to the extent of the dividends. The net carrying cost is the cost of financing the purchase of the stock, minus the present value of dividends obtained from the stock. This is explained in the illustration below: XYZ Ltd. futures trade on NSE as one, two and three-month contracts. What will be the price of a unit of new two-month futures contract on XYZ Ltd. if dividends are expected during the two-month period? 0.1*(60/365) 26 1. Let us assume that XYZ Ltd. will be declaring a dividend of Rs. 10 per share after 15 days of purchasing the contract. 2. 3. Assume that the market price of XYZ Ltd. is Rs. 140. To calculate the futures price, we need to reduce the cost-of-carry to the extent of dividend received. The amount of dividend received is Rs.10. The dividend is received 15 days later and hence compounded only for the remainder of 45 days. 4. Thus, futures price F = 140e 0.1× (60/365) – 10e 0.1× (45/365) = Rs.132.20 27 CHAPTER 4: Application of Futures Contracts This chapter begins with a brief introduction of the concept of Beta (β) which indicates the sensitivity of an individual stock or portfolio’s return to the returns on the market index. Thereafter hedging strategies using individual stock futures has been discussed in detail through numerical illustrations and payoff profiles. 4.1 Understanding Beta (β) β Beta measures the sensitivity of stocks responsiveness to market factors. Generally, it is seen that when markets rise, most stock prices rise and vice versa. Beta measures how much a stock would rise or fall if the market rises / falls. The market is indicated by the index, say Nifty 50. The index has a beta of one. A stock with a beta of 1.5% will rise / fall by 1.5% when the Nifty 50 rises / falls by 1%. Which means for every 1% movement in the Nifty, the stock will move by 1.5% (β = 1.5%) in the same direction as the index. A stock with a beta of - 1.5% will rise / fall by 1.5% when the Nifty 50 falls / rises by 1%. Which means for every 1% movement in the Nifty, the stock will move by 1.5% (β = 1.5%) in the opposite direction as the index. Similarly, Beta of a portfolio, measures the portfolios responsiveness to market movements. In practice given individual stock betas, calculating portfolio beta is simple. It is nothing but the weighted average of the stock betas. If the index moves up by 10 percent, the portfolio value will increase by 10 percent. Similarly if the index drops by 5 percent, the portfolio value will drop by 5 percent. A portfolio with a beta of two, responds more sharply to index movements. If the index moves up by 10 percent, the value of a portfolio with a beta of two will move up by 20 percent. If the index drops by 10 percent, the value of a portfolio with a beta of two will fall by 20 percent. Similarly, if a portfolio has a beta of 0.75, a 10 percent movement in the index will cause a 7.5 percent movement in the value of the portfolio. 4.2 Numerical illustration of Applications of Stock Futures 4.2.1. Long security, sell futures Futures can be used as a risk-management tool. For example, an investor who holds the shares of a company sees the value of his security falling from Rs. 450 to Rs.390. In the absence of stock futures, he would either suffer the discomfort of a price fall or sell the security in anticipation of a market upheaval. With security futures he can minimize his price risk. All he needs to do is enter into an offsetting stock futures position, in this case, take on a short futures position. Assume that the spot price of the security which he holds is Rs.390. Two-month futures cost him Rs.402. For this he pays an initial margin. Now if the price of the security falls any further, he will suffer losses on the security he holds. However, the losses he suffers on the security will be offset by the profits he makes on his short futures position. Take 28 for instance that the price of his security falls to Rs.350. The fall in the price of the security will result in a fall in the price of futures. Futures will now trade at a price lower than the price at which he entered into a short futures position. Hence his short futures position will start making profits. The loss of Rs.40 incurred on the security he holds, will be made up by the profits made on his short futures position. 4.2.2 Speculation: Bullish security, buy futures Take the case of a speculator who has a view on the direction of the market. He would like to trade based on this view. He believes that a particular security that trades at Rs.1000 is undervalued and expect its price to go up in the next two-three months. How can he trade based on this belief? In the absence of a deferral product, he would have to buy the security and hold on to it. Assume that he buys 100 shares which cost him one lakh rupees. His hunch proves correct and two months later the security closes at Rs.1010. He makes a profit of Rs.1000 on an investment of Rs. 100,000 for a period of two months. This works out to an annual return of 6 percent. Today a speculator can take exactly the same position on the security by using futures contracts. Let us see how this works. The security trades at Rs.1000 and the two-month futures trades at 1006. Just for the sake of comparison, assume that the minimum contract value is 100,000. He buys 100 security futures for which he pays a margin of Rs. 20,000. Two months later the security closes at 1010. On the day of expiration, the futures price converges to the spot price and he makes a profit of Rs. 400 on an investment of Rs. 20,000. This works out to an annual return of 12 percent. Because of the leverage they provide, security futures form an attractive option for speculators. 4.2.3 Speculation: Bearish security, sell futures Stock futures can be used by a speculator who believes that a particular security is overvalued move 220. On the day of expiration, the spot and the futures price converges. He has made a clean profit of Rs.20 per share. For the one contract that he bought, this works out to be Rs. 2000. 29 4.2.4, you can make riskless profit by entering into the following set of transactions. 1. 2. 3. 4. On day one, borrow funds, buy the security on the cash/spot market at 1000. Simultaneously, sell the futures on the security at 1025. Take delivery of the security purchased and hold the security for a month. On the futures expiration date, the spot and the futures price converge. Now unwind the position. 5. 6. 7. 8. Say the security closes at Rs.1015. Sell the security. Futures position expires with profit of Rs. 10. The result is a riskless profit of Rs.15 on the spot position and Rs.10 on the futures position. Return the borrowed funds. If the cost of borrowing funds to buy the security is less than the arbitrage profit possible, it makes sense for you to arbitrage. In the real world, one has to build in the transactions costs into the arbitrage strategy. 4.2.5 Arbitrage: Underpriced futures: buy futures, sell spot Whenever the futures price deviates substantially from its fair value, arbitrage opportunities arise. It could be the case that you notice the futures on a security you hold seem underpriced. How can you cash in on this opportunity to earn riskless profits? Say for instance, ABC Ltd. trades at Rs.1000. One-month ABC futures trade at Rs. 965 and seem underpriced. As an arbitrageur, you can make riskless profit by entering into the following set of transactions. 1. 2. 3. 4. On day one, sell the security in the cash/spot market at 1000. Make delivery of the security. Simultaneously, buy the futures on the security at 965. On the futures expiration date, the spot and the futures price converge. Now unwind the position. Say the security closes at Rs.975. Buy back the security. 6. 7. The futures position expires with a profit of Rs.10. The result is a riskless profit of Rs.25 on the spot position and Rs.10 on the futures position. 30 If the returns you get by investing in riskless instruments is more than the return from the arbitrage trades, it makes sense for you to arbitrage. This is termed as reverse-cash-andcarry arbitrage. It is this arbitrage activity that ensures that the spot and futures prices stay in line with the cost-of-carry. As we can see, exploiting arbitrage involves trading on the spot market. As more and more players in the market develop the knowledge and skills to do cashand-carry and reverse cash-and-carry, we will see increased volumes and lower spreads in both the cash as well as the derivatives market. 4.3 Hedging Using Stock Index Futures Broadly there are two types of risks (as shown in the figure below) and hedging is used to minimize these risks. Unsystematic risk is also called as Company Specific Risk or Diversifiable Risk. Suppose, an investor holds shares of steel company and has no other investments. Any change in the government policy would affect the price of steel and the companies share price. This is considered as Unsystematic Risk. This risk can be reduced through appropriate diversification. The investor can buy more stocks of different industries to diversify his portfolio so that the price change of any one stock does not affect his portfolio. However, diversification does not reduce risk in the overall portfolio completely. Diversification reduces unsystematic risk. But there is a risk associated with the overall market returns, which is called as the Systematic Risk or Market Risk or Non-diversifiable Risk. It is that risk which cannot be reduced through diversification. Given the overall market movement (falling or rising), stock portfolio prices are affected. Generally, a falling overall market would see most stocks falling (and vice versa). This is the market specific risk. The market is denoted by the index. A fall in the index (say Nifty 50) in a day sees most of the stock prices fall. Therefore, even if the investor has a diversified portfolio of stocks, the portfolio value is likely to fall of the market falls. This is due to the inherent Market Risk or Unsystematic Risk in the portfolio. Hedging using Stock Index Futures or Single Stock Futures is one way to reduce the Unsystematic Risk. Hedging can be done in two ways by an investor who has an exposure to the underlying stock(s): 4.3.1 By Selling Index Futures On March 12 2010, an investor buys 3100 shares of Hindustan Lever Limited (HLL) @ Rs. 290 per share (approximate portfolio value of Rs. 9,00,000). However, the investor fears that the market will fall and thus needs to hedge. He uses Nifty March Futures to hedge. 31 • • • • HLL trades as Rs. 290 Nifty index is at 4100 March Nifty futures is trading at Rs. 4110. The beta of HLL is 1.13. To hedge, the investor needs to sell [Rs. 9,00,000 *1.13] = Rs. 10,17,000 worth of Nifty futures (10,17,000/4100 = 250 Nifty Futures) On March 19 2010, the market falls. • • HLL trades at Rs. 275 March Nifty futures is trading at Rs. 3915 Thus, the investor’s loss in HLL is Rs. 46,500 (Rs. 15 × 3100). The investors portfolio value now drops to Rs. 8,53,500 from Rs. 9,00,000. However, March Nifty futures position gains by Rs. 48,750 (Rs. 195 × 250). Thus increasing the portfolio value to Rs. 9,02,250 (Rs. 8,53,500 + Rs. 48,750). Therefore, the investor does not face any loss in the portfolio. Without an exposure to Nifty Futures, he would have faced a loss of Rs. 46,500. Thus the example above shows that hedging: • • • Prevents losses inspite of a fall in the value of the underlying shares Helps investor to continue to hold the shares while taking care of intermittent losses Can be done by anyone with an exposure to an underlying asset class Warning: Hedging involves costs and the outcome may not always be favourable if prices move in the reverse direction. 4.3.2 By Selling Stock Futures and Buying in Spot market An investor on March 12, 2010 buys 2000 shares of Infosys at the price of Rs. 390 per share. The portfolio value being Rs. 7,80,000 (Rs. 390x2000). The investor feels that the market will fall and thus needs to hedge by using Infosys Futures (stock futures). • • The Infosys futures (near month) trades at Rs. 402. To hedge, the investor will have to sell 2000 Infosys futures. On futures expiry day: • The Infosys spot price is Rs. 300. Thus the investor’s loss is Rs. 90 (Rs. 390-Rs. 300) and the portfolio value would reduce to Rs. 6,00,000 (Rs. 7,80,000–Rs. 1,80,000). On the other hand the investors profit in the futures market would be Rs. 102 (Rs. 402-Rs. 300). The portfolio value would now become Rs. 8,04,000 (Rs. 6,00,000+ Rs. 2,04,000). 32 CHAPTER 5: Options Contracts, Mechanism and Applications Options are the most recent and evolved derivative contracts. They have non linear or asymmetrical profit profiles making them fundamentally very different from futures and forward contracts. Options have allowed both theoreticians as well as practitioner’s to explore wide range of possibilities for engineering different and sometimes exotic pay off profiles. Option contracts help a hedger reduce his risk with a much wider variety of strategies. An option gives the holder of the option the right to do something in future. The holder does not have to exercise this right. In contrast, in a forward or futures contract, the two parties have committed themselves or are obligated to meet their commitments as specified in the contract. Whereas it costs nothing (except margin requirements) to enter into a futures contract, the purchase of an option requires an up-front payment. This chapter first introduces key terms which will enable the reader understand option terminology. Afterwards futures have been compared with options and then payoff profiles of option contracts have been defined diagrammatically. Readers can create these payoff profiles using payoff tables. They can also use basic spreadsheet software such as MS-Excel to create these profiles. 5.1 • Option Terminology Index options: Have the index as the underlying. They can be European or American. They are also cash settled. • Stock options: They are options on individual stocks and give the holder the right to buy or sell shares at the specified price. They can be European or American. • Buyer of an option: The buyer of an option is the one who by paying the option premium buys the right but not the obligation to exercise his option on the seller/ writer. • Writer of an option: The writer of a call/put option is the one who receives the option premium and is thereby obliged to sell/buy the asset if the buyer exercises on him. There are two basic types of options, call options and put options. • Call option: It gives the holder the right but not the obligation to buy an asset by a certain date for a certain price. • Put option: A It gives the holder the right but not the obligation to sell an asset by a certain date for a certain price. • Option price/premium: It is the price which the option buyer pays to the option seller. It is also referred to as the option premium. 33 • Expiration date: The date specified in the options contract is known as the expiration date, the exercise date, the strike date or the maturity. • Strike price: The price specified in the options contract is known as the strike price or the exercise price. • • American options: These can be exercised at any time upto the expiration date. current index equals the strike price (i.e. spot price = strike price). • Out-of-the-money option: An out-of-the-money (OTM) option would lead to a negative cash flow if it were exercised immediately. A call option on the index is out-of-themoney, (St — K)] which means that the intrinsic value of a call is the greater of 0 or (St — K). Similarly, the intrinsic value of a put is Max[0, K —. 34 5.2 Comparison between Futures and Options futures, which is free to enter into, but can generate very large losses. This characteristic makes options attractive to many occasional market participants, who cannot put in the time to closely monitor their futures positions. Table 5.1 presents the comparison between the futures and options. Buying put options is buying insurance. To buy a put option on Nifty is to buy insurance which reimburses the full extent to which Nifty drops below the strike price of the put option. This is attractive to many people, and to mutual funds creating “guaranteed return products”. Table 5.1: Comparison between Futures and Options Futures Exchange traded, with novation Exchange defines the product Price is zero, strike price moves Price is zero Linear payoff Both long and short at risk Options Same as futures. Same as futures. Strike price is fixed, price moves. Price is always positive. Nonlinear payoff. Only short at risk. More generally, options offer “nonlinear payoffs” whereas futures only have “linear payoffs”. By combining futures and options, a wide variety of innovative and useful payoff structures can be created. 5.3 Options Payoffs The optionality characteristic of options results in a non-linear payoff for options. It means that the losses for the buyer of an option are limited; however the profits are potentially unlimited. For a writer, the payoff is exactly the opposite. Profits are limited to the option premium; and losses are potentially unlimited. These non-linear payoffs are fascinating as they lend themselves to be used to generate various payoffs by using combinations of options and the underlying. We look here at the six basic payoffs. 5.3.1 Payoff profile of buyer of asset: Long asset In this basic position, an investor buys the underlying asset, Nifty for instance, for 2220, and sells it at a future date at an unknown price, St. Once it is purchased, the investor is said to be “long” the asset. Figure 5.1 shows the payoff for a long position on the Nifty. 35 Figure 5.1: Payoff for investor who went Long Nifty at 2220 The figure 5.1 shows the profits/losses from a long position on the index. The investor bought the index at 2220. If the index goes up there is a profit else losses. 5.3.2 Payoff profile for seller of asset: Short asset In this basic position, an investor shorts the underlying asset, Nifty for instance, for 2220, and buys it back at a future date at an unknown price, St. Once it is sold, the investor is said to be “short” the asset. Figure 5.2 shows the payoff for a short position on the Nifty. Figure 5.2: Payoff for investor who went Short Nifty at 2220 The figure 5.2 shows the profits/losses from a short position on the index. The investor sold the index at 2220. If the index falls, there are profits, else losses 5.3.3 Payoff profile for buyer of call options: Long call A call option gives the buyer the right to buy the underlying asset at the strike price specified in the option. The profit/loss that the buyer makes on the option depends on the spot price of the underlying. If upon expiration, the spot price exceeds the strike price, he makes a profit. Higher the spot price, more is the profit. If the spot price of the underlying is less than the strike price, the option expires un-exercised. The loss in this case is the premium paid for 36 buying the option. Figure 5.3 gives the payoff for the buyer of a three month call option (often referred to as long call) with a strike of 2250 bought at a premium of 86.60. Figure 5.3: Payoff for buyer of call option The figure 5.3 above shows the profits/losses for the buyer of a three-month Nifty 2250 call option. As can be seen, as the spot Nifty rises, the call option is in-the-money. If upon expiration, Nifty closes above the strike of 2250, the buyer would exercise his option and profit to the extent of the difference between the Nifty-close and the strike price. The profits possible on this option are potentially unlimited. However if Nifty falls below the strike of 2250, he lets the option expire. The losses are limited to the extent of the premium paid for buying the option. 5.3.4 Payoff profile for writer of call options: Short call A call option gives the buyer the right to buy exceeds the strike price, the buyer will exercise the option on the writer. Hence as the spot price increases the writer of the option starts making losses. Higher the spot price, more are the losses.. If upon expiration the spot price of the underlying is less than the strike price, the buyer lets his option expire unexercised and the writer gets to keep the premium. Figure 5.4 gives the payoff for the writer of a three month call option (often referred to as short call) with a strike of 2250 sold at a premium of 86.60. 37 Figure 5.4: Payoff for writer of call option The figure 5.4 shows the profits/losses for the seller of a three-month Nifty 2250 call option. As the spot Nifty rises, the call option is in-the-money and the writer starts making losses. If upon expiration, Nifty closes above the strike of 2250, the buyer would exercise his option on the writer who would suffer a loss to the extent of the difference between the Nifty-close and the strike price. The loss that can be incurred by the writer of the option is potentially unlimited, whereas the maximum profit is limited to the extent of the up-front option premium of Rs.86.60 charged by him. 5.3.5 Payoff profile for buyer of put options: Long put A put option gives the buyer the right to sell the underlying asset at the strike price specified in the option. The profit/loss that the buyer makes on the option depends on the spot price of the underlying. If upon expiration, the spot price is below the strike price, there is a profit. Lower the spot price more is the profit. If the spot price of the underlying is higher than the strike price, the option expires un-exercised. His loss in this case is the premium he paid for buying the option. Figure 5.5 gives the payoff for the buyer of a three month put option (often referred to as long put) with a strike of 2250 bought at a premium of 61.70. Figure 5.5: Payoff for buyer of put option 38 The figure 5.5 shows the profits/losses for the buyer of a three-month Nifty 2250 put option. As can be seen, as the spot Nifty falls, the put option is in-the-money. If upon expiration, Nifty closes below the strike of 2250, the buyer would exercise his option and profit to the extent of the difference between the strike price and Nifty-close. The profits possible on this option can be as high as the strike price. However if Nifty rises above the strike of 2250, the option expires worthless. The losses are limited to the extent of the premium paid for buying the option. 5.3.6 Payoff profile for writer of put options: Short put A put option gives the buyer the right to sell happens to be below the strike price, the buyer will exercise the option on the writer. If upon expiration the spot price of the underlying is more than the strike price, the buyer lets his option go un-exercised and the writer gets to keep the premium. Figure 5.6 gives the payoff for the writer of a three month put option (often referred to as short put) with a strike of 2250 sold at a premium of 61.70. Figure 5.6: Payoff for writer of put option The figure 5.6 shows the profits/losses for the seller of a three-month Nifty 2250 put option. As the spot Nifty falls, the put option is in-the-money and the writer starts making losses. If upon expiration, Nifty closes below the strike of 2250, the buyer would exercise his option on the writer who would suffer a loss to the extent of the difference between the strike price and Nifty-close..61.70 charged by him. 39 5.4 Application of Options We look here at some applications of options contracts. We refer to single stock options here. However since the index is nothing but a security whose price or level is a weighted average of securities constituting the index, all strategies that can be implemented using stock futures can also be implemented using index options. 5.4.1 Hedging: Have underlying buy puts Owners of stocks or equity portfolios often experience discomfort about the overall stock market movement. As an owner of stocks or an equity portfolio, sometimes one may have a view that stock prices will fall in the near future. At other times one may witness massive volatility. The union budget is a common and reliable source of such volatility: market volatility is always enhanced for one week before and two weeks after a budget. Many investors simply do not want the fluctuations of these three weeks. One way to protect your portfolio from potential downside due to a market drop is to buy insurance using put options. Index and stock options are a cheap and can be easily implemented to seek insurance from the market ups and downs. The idea is simple. To protect the value of your portfolio from falling below a particular level, buy the right number of put options with the right strike price. If you are only concerned about the value of a particular stock that you hold, buy put options on that stock. If you are concerned about the overall portfolio, buy put options on the index. When the stock price falls your stock will lose value and the put options bought by you will gain, effectively ensuring that the total value of your stock plus put does not fall below a particular level. This level depends on the strike price of the stock options chosen by you. Similarly when the index falls, your portfolio will lose value and the put options bought by you will gain, effectively ensuring that the value of your portfolio does not fall below a particular level. This level depends on the strike price of the index options chosen by you. Portfolio insurance using put options is of particular interest to mutual funds who already own well-diversified portfolios. By buying puts, the fund can limit its downside in case of a market fall. 5.4.2 Speculation: Bullish security, buy calls or sell puts There are times when investors believe that security prices are going to rise. How does one implement a trading strategy to benefit from an upward movement in the underlying security? Using options there are two ways one can do this: 1. 2. Buy call options; or Sell put options We have already seen the payoff of a call option. The downside to the buyer of the call option is limited to the option premium he pays for buying the option. His upside however is potentially unlimited. Suppose you have a hunch that the price of a particular security is going to 40 rise in a months time. Your hunch proves correct and the price does indeed rise, it is this upside that you cash in on. However, if your hunch proves to be wrong and the security price plunges down, what you lose is only the option premium. Having decided to buy a call, which one should you buy? Illustration 5.1 gives the premia for one month calls and puts with different strikes. Given that there are a number of one-month calls trading, each with a different strike price, the obvious question is: which strike should you choose? Let us take a look at call options with different strike prices. Assume that the current price level is 1250, risk-free rate is 12% per year and volatility of the underlying security is 30%. The following options are available: these options you choose largely depends on how strongly you feel about the likelihood of the upward movement in the price, and how much you are willing to lose should this upward underlying will rise by more than 50 points on the expiration date. Hence buying this call is basically like buying a lottery. There is a small probability that it may be in-the-money by expiration, in which case the buyer will make profits. In the more likely event of the call expiring out-of-the-money, the buyer simply loses the small premium amount of Rs.27.50. As a person who wants to speculate on the hunch that prices may rise, you can also do so by selling or writing puts. As the writer of puts, you face a limited upside and an unlimited downside. If prices do rise, the buyer of the put will let the option expire and you will earn the premium. If however your hunch about an upward movement proves to be wrong and prices actually fall, then your losses directly increase with the falling price level. If for instance the price of the underlying falls to 1230 and you’ve sold a put with an exercise of 1300, the buyer of the put will exercise the option and you’ll end up losing Rs.70. Taking into account the premium earned by you when you sold the put, the net loss on the trade is Rs.5.20. Having decided to write a put, which one should you write? Given that there are a number of one-month puts trading, each with a different strike price, the obvious question is: which strike should you choose? This largely depends on how strongly you feel about the likelihood 41 of the upward movement in the prices of the underlying. If you write an at-the-money put, the option premium earned by you will be higher than if you write an out-of-the-money put. However the chances of an at-the-money put being exercised on you are higher as well. Illustration 5.1: One month calls and puts trading at different strikes The spot price is 1250. price of underlying will rise by more than 50 points on the expiration date. Hence buying this call is basically like buying a lottery. There is a small probability that it may be inthe-money by expiration in which case the buyer will profit. In the more likely event of the call expiring out-of-the-money, the buyer simply loses the small premium amount of Rs. 27.50. Figure 5.7 shows the payoffs from buying underlying falls by 50 points on the expiration date. Figure 5.8 shows the payoffs from writing puts at different strikes. Underlying 1250 1250 1250 1250 1250 Strike price of option 1200 1225 1250 1275 1300 Call Premium (Rs.) 80.10 63.65 49.45 37.50 27.50 Put Premium (Rs.) 18.15 26.50 37.00 49.80 64.80 In the example in Figure 5.8, at a price level of 1250, one option is in-the-money and one is out-of-the-money. As expected, the in-the-money option fetches the highest premium of Rs.64.80 whereas the out-of-the-money option has the lowest premium of Rs. 18.15. 5.4.3 Speculation: Bearish security, sell calls or buy puts Do you sometimes think that the market is going to drop? Could you: 1. 2. Sell call options; or Buy put options 42 We have already seen the payoff of a call option. The upside downside. Figure 5.7: Payoff for buyer of call options at various strikes The figure 5.7 shows the profits/losses for a buyer of calls at various strikes. The in-themoney option with a strike of 1200 has the highest premium of Rs.80.10 whereas the out-ofthe-money option with a strike of 1300 has the lowest premium of Rs. 27.50. Figure 5.8: Payoff for writer of put options at various strikes The figure 5.8 above shows the profits/losses for a writer of puts at various strikes. The in-themoney option with a strike of 1300 fetches the highest premium of Rs.64.80 whereas the outof-the-money option with a strike of 1200 has the lowest premium of Rs. 18.15. Having decided to write a call, which one should you write? Illustration 5.2 gives the premiums for one month calls and puts with different strikes. Given that there are a number of one- 43 month calls trading, each with a different strike price, the obvious question is: which strike should you choose? Let us take a look at call options with different strike prices. Assume that the current stock price is 1250, risk-free rate is 12% per year and stock volatility is 30%. You could write the following options:’ve onemonth puts trading, each with a different strike price, the obvious question is: which strike should you choose? This largely depends on how strongly you feel about the likelihood of the downward movement in the market. If you buy an at-the-money put, the option premium paid by you will by higher than if you buy an out-of-the-money put. However the chances of an atthe-money put expiring in-the-money are higher as well. Illustration 5.2: One month calls and puts trading at different strikes The spot price is 1250. There are five one-month calls and five one-month puts trading in the market. The call with a strike of 1200 is deep in-the-money and hence trades at a higher 44 premium. The call with a strike of 1275 is out-of-the-money and trades at a low premium. The call with a strike of 1300 is deep-out-of-money. Its execution depends on the unlikely event that the price. Figure 5.9 shows the payoffs from writing the price falls by 50 points on the expiration date. The choice of which put to buy depends upon how much the speculator expects the market to fall. Figure 5.9 shows the payoffs from buying puts at different strikes. Price 1250 1250 1250 1250 1250 Strike price of option 1200 1225 1250 1275 1300 Call Premium(Rs.) 80.10 63.65 49.45 37.50 27.50 Put Premium(Rs.) 18.15 26.50 37.00 49.80 64.80 Figure 5.9: Payoff for seller of call option at various strikes The figure 5.9 shows the profits/losses for a seller of calls at various strike prices. The in-themoney option has the highest premium of Rs.80.10 whereas the out-of-the-money option has the lowest premium of Rs. 27.50. 45 Figure 5.10: Payoff for buyer of put option at various strikes The figure 5.10 shows the profits/losses for a buyer of puts at various strike prices. The in-themoney option has the highest premium of Rs.64.80 whereas the out-of-the-money option has the lowest premium of Rs. 18.50. 5.4.4 Bull spreads - Buy a call and sell another There are times when you think the market is going to rise over the next two months, however in the event that the market does not rise, up is called a bull spread. How does one go about doing this? This is basically done utilizing two call options having the same expiration date, but different exercise prices. The buyer of a bull spread buys a call with an exercise price below the current index level and sells a call option with an exercise price above the current index level. The spread is a bull spread because the trader hopes to profit from a rise in the index. The trade is a spread because it involves buying one option and selling a related option. Compared to buying the underlying asset itself, the bull spread with call options limits the trader’s risk, but the bull spread also limits the profit potential. Figure 5.11: Payoff for a bull spread created using call options The figure 5.11 shows the profits/losses for a bull spread. As can be seen, the payoff obtained is the sum of the payoffs of the two calls, one sold at Rs.40 and the other bought at Rs.80. The cost of setting up the spread is Rs.40 which is the difference between the call premium paid and the call premium received. The downside on the position is limited to this amount. As the index moves above 3800, the position starts making profits (cutting losses) until the index reaches 4200. Beyond 4200, the profits made on the long call position get offset by the losses made on the short call position and hence the maximum profit on this spread is made if the index on the expiration day closes at 4200. Hence the payoff on this spread lies between -40 46 to 360. Somebody who thinks the index is going to rise, but not above 4200 would buy this spread. Hence he does not want to buy a call at 3800 and pay a premium of 80 for an upside he believes will not happen. In short, it limits both the upside potential as well as the downside risk. The cost of the bull spread is the cost of the option that is purchased, less the cost of the option that is sold. Illustration 5.2 gives the profit/loss incurred on a spread position as the index changes. Figure 5.11 shows the payoff from the bull spread. Broadly, we can have three types of bull bull spreads are of type 1. They cost very little to set up, but have a very small probability of giving a high payoff. Illustration 5.3: Expiration day cash flows for a Bull spread using two-month calls The table shows possible expiration day profit for a bull spread created by buying calls at a strike of 3800 and selling calls at a strike of 4200. The cost of setting up the spread is the call premium paid (Rs.80) minus the call premium received (Rs.40), which is Rs.40. This is the maximum loss that the position will make. On the other hand, the maximum profit on the spread is limited to Rs.360. Beyond an index level of 4200, any profits made on the long call position will be cancelled by losses made on the short call position, effectively limiting the profit on the combination. 47 Nifty Jan 3800 3700 3750 3800 3850 3900 3950 4000 4050 4100 4150 4200 4250 4300 Buy Call 4200 Call 0 0 0 +50 +100 +150 +200 +250 +300 +350 +400 +450 +500 Sell Jan Cash Flow Profit & Loss (Rs.) 0 0 0 0 0 0 0 0 0 0 0 -50 -100 0 0 0 50 100 150 200 250 300 350 400 400 400 -40 -40 -40 +10 +60 +110 +160 +210 +260 +310 +360 +360 +360 5.4.5 Bear spreads - sell a call and buy another There are times when you think the market is going to fall over the next two months. However in the event that the market does not fall, down is called a bear spread. This is basically done utilizing two call options having the same expiration date, but different exercise prices. In a bear spread, the strike price of the option purchased is greater than the strike price of the option sold. The buyer of a bear spread buys a call with an exercise price above the current index level and sells a call option with an exercise price below the current index level. The spread is a bear spread because the trader hopes to profit from a fall in the index. The trade is a spread because it involves buying one option and selling a related option. Compared to buying the index itself, the bear spread with call options limits the trader’s risk, but it also limits the profit potential. In short, it limits both the upside potential as well as the downside risk. A bear spread created using calls involves initial cash inflow since the price of the call sold is greater than the price of the call purchased. Illustration 5.4 gives the profit/loss incurred on a spread position as the index changes. Figure 5.12 shows the payoff from the bear spread. 48 Broadly we can have three types of bear bear spreads are of type 1. They cost very little to set up, but have a very small probability of giving a high payoff. As we move from type 1 to type 2 and from type 2 to type 3, the spreads become more conservative and cost higher to set up. Bear spreads can also be created by buying a put with a high strike price and selling a put with a low strike price. Figure 5.12: Payoff for a bear spread created using call options The figure 5.12 shows the profits/losses for a bear spread. As can be seen, the payoff obtained is the sum of the payoffs of the two calls, one sold at Rs. 150 and the other bought at Rs.50. The maximum gain from setting up the spread is Rs. 100 which is the difference between the call premium received and the call premium paid. The upside on the position is limited to this amount. As the index moves above 3800, the position starts making losses (cutting profits) until the spot reaches 4200. Beyond 4200, the profits made on the long call position get offset by the losses made on the short call position. The maximum loss on this spread is made if the index on the expiration day closes at 2350. At this point the loss made on the two call position together is Rs.400 i.e. (4200-3800). However the initial inflow on the spread being Rs.100, the net loss on the spread turns out to be 300. The downside on this spread position is limited to this amount. Hence the payoff on this spread lies between +100 to -300. 49 Illustration 5. The maximum profit obtained from setting up the spread is the difference between the premium received for the call sold (Rs. 150) and the premium paid for the call bought (Rs.50) which is Rs. 100. In this case the maximum loss obtained is limited to Rs.300. Beyond an index level of 4200, any profits made on the long call position will be canceled by losses made on the short call position, effectively limiting the profit on the combination. Nifty Buy Jan Call 4200 3700 3750 3800 3850 3900 3950 4000 4050 4100 4150 4200 4250 4300 0 0 0 0 0 0 0 0 0 0 0 +50 +100 Sell Jan 3800 Call 0 0 0 -50 -100 -150 -200 -250 -300 -350 -400 -450 -500 0 0 0 -50 -100 -150 -200 -250 -300 -350 -400 -400 -400 Cash Flow Profit & Loss (Rs.) +100 +100 +100 +50 0 -50 -100 -150 -200 -250 -300 -300 -300 50 CHAPTER 6: Pricing of Options Contracts and Greek Letters An option buyer has the right but not the obligation to exercise on the seller. The worst that can happen to a buyer is the loss of the premium paid by him. His downside is limited to this premium, but his upside is potentially unlimited. This optionality is precious and has a value, which is expressed in terms of the option price. Just like in other free markets, it is the supply and demand in the secondary market that drives the price of an option. There are various models which help us get close to the true price of an option.. All we need to know is the variables that go into the model. This chapter first looks at the key variable affecting an option’s price. Afterwards we describe the limit of pricing of call and put options. Thereafter we discuss the Black-Scholes Option pricing model4 . The chapter ends with an overview of option Greeks used for hedging portfolios with option contracts. 6.1 Variables affecting Option Pricing Option prices are affected by six factors. These are Spot Price (S), Strike Price (X), Volatility (σ) of spot price, Time for expiration of contract (T) risk free rate of return (r) and Dividend on the asset (D). The price of a call option rises with rise in spot price as due to rise in prices the option becomes more likely to exercise. It however falls with the rise in strike price as the payoff (S-X) falls. The opposite is true for the price of put options. The rise in volatility levels of the stock price however leads to increase in price of both call and put options. The option price is higher for an option which has a longer period to expire. Option prices tend to fall as contracts are close to expiry. This is because longer the term of an option higher is the likelihood or probability that it would be exercised. It should be noted that the time factor is applicable only for American options and not European types. The rise in risk free rate tends to increase the value of call options and decrease the value of put options. Similarly price of a call option is negatively related with size of anticipated dividends. Price of put option positively related with size of anticipated dividends. 4 The Black-Scholes Option Pricing Model was developed in 1973 51 All option contracts have price limits. This implies that one would pay a definite maximum or a definite minimum price for acquiring an option. The limits can be defined as follows: (i) The maximum price of a call option can be the price of underlying asset. In case of stocks a call option on it can never be larger than its spot price. This is true for both European and American call options. (ii) The minimum price for a European call option would always be the difference in the spot price (S) and present value of the strike price (x). Symbolically it can be written as equal to S - Xe –rt . Here X has been discounted at the risk free rate. This is true only for European options. (iii) The maximun price for a put option can never be more than the present value of the strike price X (discounted at risk free rate r). This is true for both types of options European and American. (iv) The minimum price of the European put option would always be equal to difference between present value of strike price and the spot price of the asset. This can be symbolically expressed as Xe –rt –S. For the sake of simplicity the above relationships have been written for options on non dividend paying stocks. In practice a minor adjustment is done is the formulae to calculate the price limits for options on dividend paying stocks. 6.2 The Black Scholes Merton Model for Option Pricing (BSO) This model of option pricing was first mentioned in articles “The Pricing of Options and Corporate Liabilities” by F. Black and M. Scholes published in the Journal of Political Economy and “Theory of Rational Option Pricing” by R. C. Merton in Bell Journal of Economics and Management Science. It was later considered a major breakthrough in the area of option pricing and had a tremendous influence on the way traders price and hedge the options. Although F. Black died in 1995,. Such a portfolio is instantaneously riskless and must instantaneously earn the risk-free rate. The result of this analysis was the Black-Scholes differential equation which is given as (without proof). .............................................................................. 6.1 Here S is stock price t is term of the option (time to maturity) r the risk free rate and ó the volatility of stock price. 52 The Black-Scholes formulas for the prices of European calls and puts with strike price X on a non-dividend paying stock are the roots of the differential equation 6.5 (without proof): • • N(x) is the cumulative distribution function for a standardized normal distribution. The expression N(d2) is the probability that the option will be exercised in a risk neutral world, so that N(d2) is the strike price times the probability that the strike price will be paid. • The expression S0N(d1)ert is the expected value of a variable that equals ST if ST>X and is 0 otherwise in a risk neutral world. Here ST is the spot price at time T and X is the strike price. • σ is a measure of volatility, is the annualized standard deviation of continuously compounded returns on the underlying. When daily sigma is given, they need to be converted into annualized sigma. • Sigma annual = sigma daily × vNumber of trading days per year. On an average there are 250 trading days in a year. • • • X is the exercise price, S the spot price and T the time to expiration measured in years. When S becomes very large a call option is almost certain to be exercised. It also becomes similar to a forward contract with a delivery price K. Thus the call option price will be • • • c = S – Xe–r T As S becomes very large both N(d1) and N(d2) are both close to 1.0. Similarly the put option price will be 0 as N(-d1) and N (-d2) will be close to 0. ,0). The Black Scholes model uses continuous compounding as discussed in Chapter 2. One need not remember the formulae or equation as several option price calculators are available freely (in spreadsheet formats also). 53 6.3 The Greeks Each Greek letter measures a different dimension to the risk in an option position. These are used by traders who have sold options in the market. Aim of traders is to manage the Greeks in order to manage their overall portfolio. There are five Greeks used for hedging portfolios of options with underlying assets (index or individual stocks). These are denoted by delta, theta, gamma, vega and rho each represented by Greek letters , ,Γ,ν and ρ. 6.3.1 Delta ( ) In general delta ( ) of a portfolio is change in value of portfolio with respect to change in price of underlying asset. Delta of an option on the other hand is rate of change of the option price with respect to price of the underlying asset. is the rate of change of option price with respect to the price of the underlying asset. For example, the delta of a stock is 1. It is the slope of the curve that relates the option price to the price of the underlying asset. Suppose the of a call option on a stock is 0.5. This means that when the stock price changes by one, the option price changes by about 0.5, or 50% of the change in the stock price. Figure 5.13 shows the delta of a stock option. Expressed differently, is the change in the price of call option per unit change in the spot = ∂C/∂S. The delta of a European call on a stock paying .The delta of a European put is – qT price of the underlying asset. dividends at rate q is N (d1)e e–qT [N (d1) - 1] The of a call is always positive and the of a put is always negative. As the stock price (underlying asset) changes delta of the option also changes. In order to maintain delta at the same level a given number of stocks (underlying asset) need to be bought or sold in the market. Maintaining delta at the same level is known as delta neutrality or delta hedging. Figure 6.1 as slope 54 6.3.2 Gamma (Γ) Γ Γ is the rate of change of the option’s Delta underlying asset. 6.3.3 Theta (Θ) with respect to the price of the underlying asset. In other words, it is the second derivative of the option price with respect to price of the Θ of a portfolio of options, is the rate of change of the value of the portfolio with respect to the passage of time with all else remaining the same. Θ is also referred to as the time decay of the portfolio. Θ is the change in the portfolio value when one day passes with all else remaining the same. We can either measure Θ “per calendar day” or “per trading day”. To obtain the per calendar day, the formula for Theta must be divided by 365; to obtain Theta per trading day, it must be divided by 250. 6.3.4 Vega (ν) The vega of a portfolio of derivatives is the rate of change in the value of the portfolio with respect to volatility of the underlying asset. If ν is high in absolute terms, the portfolio’s value is very sensitive to small changes in volatility. If ν is low in absolute terms, volatility changes have relatively little impact on the value of the portfolio. 6.3.5 Rho (ρ) ρ The ρ of a portfolio of options is the rate of change of the value of the portfolio with respect to the interest rate. It measures the sensitivity of the value of a portfolio to interest rates. 55 Chapter 7: Trading of Derivatives Contracts This chapter provides an overview of the trading system for NSE’s futures and options market. First section describes entities in the trading system; basis of trading, Client-broker relationship in derivative segment and order types and conditions. The second section describes the trader workstation using screenshots from trading screens at NSE. This section also describes how to place orders. The best way to get a feel of the trading system, however, is to actually watch the screen and observe trading. 7.1 Futures and Options Trading System The futures & options trading system of NSE, called NEAT-F&O trading system, provides a fully automated screen-based trading for Index futures & options and Stock futures & options on a nationwide basis as well as an online monitoring and surveillance mechanism. It supports an order driven market and provides complete transparency of trading operations. It is similar to that of trading of equities in the cash market segment. The software for the F&O market has been developed to facilitate efficient and transparent trading in futures and options instruments. Keeping in view the familiarity of trading members with the current capital market trading system, modifications have been performed in the existing capital market trading system so as to make it suitable for trading futures and options. 7.1.1 Entities in the trading system Following are the four entities in the trading system: • IDs. • Clearing members: Clearing members are members of NSCCL. They carry out risk management activities and confirmation/inquiry of trades through the trading system. • Professional clearing members: A professional clearing member is a clearing member who is not a trading member. Typically, banks and custodians become professional clearing members and clear and settle for their trading members. 56 • Participants: A participant is a client of trading members like financial institutions. These clients may trade through multiple trading members but settle through a single clearing member. 7.1.2 Basis of trading The NEAT F&O system supports an order driven market, wherein orders match automatically. Order matching is essentially on the basis of security, its price, time and quantity. All quantity fields are in units and price in rupees. The exchange notifies the regular lot size and tick size for each of the contracts traded on this segment from time to time. When any order enters the trading system, it is an active order. It tries to find a match on the other side of the book. If it finds a match, a trade is generated. If it does not find a match, the order becomes passive and goes and sits in the respective outstanding order book in the system. 7.1.3 Corporate hierarchy In the F&O trading software, a trading member has the facility of defining a hierarchy amongst users of the system. This hierarchy comprises corporate manager, branch manager dealer and admin. • Corporate manager: The term is assigned to a user placed at the highest level in a trading firm. Such a user can perform all the functions such as order and trade related activities of all users, view net position of all dealers and at all clients level, can receive end of day consolidated trade and order reports dealer wise for all branches of the trading member firm and also all dealers of the firm. Only a corporate manager can sign off any user and also define exposure limits for the branches of the firm and its dealers. • Branch manager: This term is assigned to a user who is placed under the corporate manager. Such a user can perform and view order and trade related activities for all dealers under that branch. • Dealer: Dealers are users at the bottom of the hierarchy. A Dealer can perform view order and trade related activities only for oneself and does not have access to information on other dealers under either the same branch or other branches. • Admin: Another user type, ‘Admin’ is provided to every trading member along with the corporate manager user. This user type facilitates the trading members and the clearing members to receive and capture on a real-time basis all the trades, exercise requests and give up requests of all the users under him. The clearing members can receive and capture all the above information on a real time basis for the members and participants linked to him. All this information is written to comma separated files which can be accessed by any other program on a real time basis in a read only mode. This however does not affect the online data capture process. Besides this the admin users can take online backup, view and upload net position, view previous trades, 57 view give-up screens and exercise request for all the users (corporate managers, branch managers and dealers) belonging to or linked to the member. The ‘Admin’ user can also view the relevant messages for trades, exercise and give up requests in the message area. However, ‘Admin’ user cannot put any orders or modify & cancel them. A brief description of the activities of each member is given below: • Clearing member corporate manager: Can view outstanding orders, previous trades and net position of his client trading members by putting the TM ID (Trading member identification) and leaving the branch ID and dealer ID blank. • Clearing member and trading member corporate manager: Can view: (a) Outstanding orders, previous trades and net position of his client trading members by putting the TM ID and leaving the branch ID and the dealer ID blank. (b) Outstanding orders, previous trades and net positions entered for himself by entering his own TM ID, branch ID and user ID. This is his default screen. (c) Outstanding orders, previous trades and net position entered for his branch by entering his TM ID and branch ID fields. (d) Outstanding orders, previous trades, and net positions entered for any of his users/dealers by entering his TM ID, branch ID and user ID fields. • Clearing member and trading member dealer: Can only view requests entered by him. • Trading member corporate manager: Can view: (a) Outstanding requests and activity log for requests entered by him by entering his own branch and user IDs. This is his default screen. (b) Outstanding requests entered by his dealers and/or branch managers by either entering the branch and/or user IDs or leaving them blank. • Trading member branch manager: He can view: (a) Outstanding requests and activity log for requests entered by him by entering his own branch and user IDs. This is his default screen. (b) Outstanding requests entered by his users either by filling the user ID field with a specific user or leaving the user ID field blank. • Trading member dealer: He can only view requests entered by him. 58 7.1.4 Client Broker Relationship in Derivative Segment A trading member must ensure compliance particularly with relation to the following while dealing with clients: • • • Filling of ‘Know Your Client’ form Execution of Client Broker agreement Bring risk factors to the knowledge of client by getting acknowledgement of client on risk disclosure document • • • • • • • • • •.1.5 Order types and conditions The system allows the trading members to enter orders with various conditions attached to them as per their requirements. These conditions are broadly divided into the following categories: • • • Time conditions Price conditions Other conditions. 59. • Other conditions Market price: Market orders are orders for which no price is specified at the time the order is entered (i.e. price is market price). For such orders, the system determines the price. Trigger price: Price at which an order gets triggered from the stop-loss book. Limit price: Price of the orders after triggering from stop-loss book. Pro: Pro means that the orders are entered on the trading member’s own account. Cli: Cli means that the trading member enters the orders on behalf of a client. 7.2 7.2.1 The Trader Workstation 60 As mentioned earlier, the best way to familiarize oneself with the screen and its various segments is to actually spend some time studying a live screen. In this section we shall restrict ourselves to understanding just two segments of the workstation screen, the market watch window and the inquiry window. The market watch window is the third window from the top of the screen which is always visible to the user. The purpose of market watch is to allow continuous monitoring of contracts or securities that are of specific interest to the user. It displays trading information for contracts selected by the user. The user also gets a broadcast of all the cash market securities on the screen. This function also will be available if the user selects the relevant securities for display on the market watch screen. Display of trading information related to cash market securities will be on “Read only” format, i.e. the dealer can only view the information on cash market but, cannot trade in them through the system. This is the main window from the dealer’s perspective. 7.2.2 Inquiry window The inquiry window enables the user to view information such as. Market by price (MBP): The purpose of the MBP is to enable the user to view passive orders in the market aggregated at each price and are displayed in order of best prices. The window can be invoked by pressing the [F6] key. If a particular contract or security is selected, the details of the selected contract or security can be seen on this screen. Figure 7.1 gives the screen shot of the Market by Price window in the NEAT F&O. Market inquiry (MI): The market inquiry screen can be invoked by using the [F11] key. If a particular contract or security is selected, the details of the selected contract or selected security defaults in the selection screen or else the current position in the market watch defaults. The first line of the screen gives the Instrument type, symbol, expiry, contract status, total traded quantity, life time high and life time low. The second line displays the closing price, open price, high price, low price, last traded price and indicator for net change from closing price. The third line displays the last traded quantity, last traded time and the last traded date. The fourth line displays the closing open interest, the opening open interest, day high open interest, day low open interest, current open interest, life time high open interest, life time low open interest and net change from closing open interest. The fifth line display very important information, namely the carrying cost in percentage terms. Figure 7.2 shows the Market Inquiry screen of the NEAT F&O. 61 Figure 7.1: Market by price in NEAT F&O Figure 7.2: Security/contract/portfolio entry screen in NEAT F&O 62 7.2.3 Placing orders on the trading system For both the futures and the options market, while entering orders on the trading system, members are required to identify orders as being proprietary or client orders. Proprietary orders should be identified as ‘Pro’ and those of clients should be identified as ‘Cli’. Apart from this, in the case of ‘Cli’. 7.2.4 Market spread/combination order entry The NEAT F&O trading system also enables to enter spread/combination trades. Figure 7.3 shows the spread/combination screen. This enables the user to input two or three orders simultaneously into the market. These orders will have the condition attached to it that unless and until the whole batch of orders finds a countermatch, they shall not be traded. This facilitates spread and combination trading strategies with minimum price risk. The combinations orders are traded with an IOC attribute whereas spread orders are traded with ‘day’ order attribute. Figure 7.3: Market spread/combination order entry 63 7.3 Futures and Options Market Instruments The F&O segment of NSE provides trading facilities for the following derivative instruments: 1. 2. 3. 4. Index based futures Index based options Individual stock options Individual stock futures 7.3.1 Contract specifications for index futures On NSE’s platform one can trade in Nifty, CNX IT, BANK Nifty, Mini Nifty etc. futures contracts having one-month, two-month and three-month. Thus, as shown in Figure 7.4 at any point in time, three contracts would be available for trading with the first contract expiring on the last Thursday of that month. On the recommendations given by the SEBI, Derivatives Market Review Committee, NSE also introduced the ‘Long Term Options Contracts’ on S&P CNX Nifty for trading in the F&O segment. There would be 3 quarterly expiries, (March, June, September and December) and after these, 5 following semi-annual months of the cycle June/December would be available. Now option contracts with 3 year tenure are also available.. Table 7.1 gives the contract specifications for index futures trading on the NSE. Example: If trading is for a minimum lot size of 50 units and the index level is around 5000, then the appropriate value of a single index futures contract would be Rs.250,000. The minimum tick size for an index future contract is 0.05 units. Thus a single move in the index value would imply a resultant gain or loss of Rs.2.50 (i.e. 0.05*50 units) on an open position of 50 units. 64 Figure 7.4: Contract cycle The figure 7.4 shows the contract cycle for futures contracts on NSE’s derivatives market. As can be seen, at any given point of time, three contracts are available for trading - a nearmonth, a middle-month and a far-month. As the January contract expires on the last Thursday of the month, a new three-month contract starts trading from the following day, once more making available three index futures contracts for trading. 7.3.2 Contract specification for index options On NSE’s index options market, there are one-month, two-month and three-month expiry contracts with minimum nine different strikes available for trading. Hence, if there are three serial month contracts available and the scheme of strikes is 6-1-6, then there are minimum 3 x 13 x 2 (call and put options) i.e. 78 options contracts available on an index. Option contracts are specified as follows: DATE-EXPIRYMONTH-YEAR-CALL/PUT-AMERICAN/ EUROPEAN-STRIKE. For example the European style call option contract on the Nifty index with a strike price of 5000 expiring on the 26th November 2009 is specified as ’26NOV2009 5000 CE’. Just as in the case of futures contracts, each option product (for instance, the 26 NOV 2009 5000 CE) has it’s own order book and it’s own prices. All index options contracts are cash settled and expire on the last Thursday of the month. The clearing corporation does the novation. The minimum tick for an index options contract is 0.05 paise. Table 5.2 gives the contract specifications for index options trading on the NSE. 65 Table 7.1: Contract specification of S&P CNX Nifty Futures Underlying index Exchange of trading Security descriptor Contract size S&P CNX Nifty National Stock Exchange of India Limited FUTIDX Permitted lot size shall be 50 (minimum value Rs.2 lakh) Price steps Price bands Trading cycle Re. 0.05 Operating range of 10% value of the underlying index on the last trading day of such futures contract. 66 Table 7.2: Contract specification of S&P CNX Nifty Options Underlying index Exchange of trading Security descriptor Contract size S&P CNX Nifty National Stock Exchange of India Limited OPTIDX Permitted lot size shall be 50 (minimum value Rs. 2 lakh) Price steps Price bands Re. 0.05 A contract specific price range based on its delta value and is computed and updated on a daily basis. Trading cycle The options contracts will have a maximum of three month trading cycle - the near month (one), the next month (two) and the far month (three). New contract will be introduced on the next trading day following the expiry of near month contract. Also, long term options have 3 quarterly and 5 half yearly expiries Expiry day The last Thursday of the expiry month or the previous trading day if the last Thursday is a trading holiday. Settlement basis Style of option Strike price interval Daily settlement price Final settlement price Generation of strikes The exchange has a policy for introducing strike prices and determining the strike price intervals. Table 7.3 and Table 7.4 summarises the policy for introducing strike prices and determining the strike price interval for stocks and index. Let us look at an example of how the various option strikes are generated by the exchange. • Suppose the Nifty options with strikes 5600, 5500, 5400, 5300, 5200, 5100, 5000, 4900, 4800, 4700, 4600, 4500, 4400 are available. • It is to be noted that when the Nifty index level is between 4001 and 6000, the exchange commits itself to an inter-strike distance of say 100 and the scheme of strikes of 6-1-6. Cash settlement on T+1 basis. European. Depending on the index level Not applicable Closing value of the index on the last trading day. 67 • If the Nifty closes at around 5051 to ensure strike scheme of 6-1-6, one more strike would be required at 5700. • Conversely, if Nifty closes at around 4949 to ensure strike scheme of 6-1-6, one more strike would be required at 4300. Table 7.3: Generation of strikes for stock options Price of underlying Strike Price interval Scheme of strikes to be introduced (ITM-ATM-OTM) Less than or equal to Rs.50 > Rs.50 = Rs.100 > Rs. 100= Rs. 250 > Rs.250 = Rs.500 > Rs.500 = Rs.1000 > Rs.1000 2.5 5 10 20 20 50 5-1-5 5-1-5 5-1-5 5-1-5 10-1-10 10-1-10 Table 7.4: Generation of strikes for Index options Index Level Strike Interval Scheme of strikes to be introduced (ITM-ATM-OTM) Upto 2000 From 2001 to 4000 From 4001 to 6000 > 6000 50 100 100 100 4-1-4 6-1-6 6-1-6 7-1-7 7.3.3 Contract specifications for stock futures Trading in stock futures commenced on the NSE from November 2001. These contracts are cash settled on a T+1 basis. The expiration cycle for stock futures is the same as for index futures, index options and stock options. A new contract is introduced on the trading day following the expiry of the near month contract. Table 7.5 gives the contract specifications for stock futures. 68 Table 7.5: Contract specification of Stock futures Underlying Exchange of trading Security descriptor Contract size Price steps Price bands Trading cycle Individual securities National Stock Exchange of India Limited FUTSTK As specified by the exchange (minimum value of Rs.2 lakh) Re. 0.05 Operating range of 20% price of the underlying security on the last trading day. 7.3.4 Contract specifications for stock options Trading in stock options commenced on the NSE from July 2001. Currently these contracts are European style and are settled in cash. The expiration cycle for stock options is the same as for index futures and index options. A new contract is introduced on the trading day following the expiry of the near month contract. NSE provides a minimum of eleven strike prices for every option type (i.e. call and put) during the trading month. There are at least five in-the-money contracts, five out-of-the-money contracts and one at-the-money contract available for trading. Table 7.6 gives the contract specifications for stock options. 69 Table 7.6: Contract specification of Stock options Underlying Exchange of trading Security descriptor Style of option Strike price interval Contract size Price steps Price bands Trading cycle Individual securities available for trading in cash market National Stock Exchange of India Limited OPTSTK European As specified by the exchange As specified by the exchange (minimum value of Rs.2 lakh) Re. 0.05 Not applicable The options Daily settlement on T+1 basis and final option exercise settlement on T+1 basis Daily settlement price Final settlement price Settlement day Premium value (net) Closing price of underlying on exercise day or expiry day Last trading day Other Products in the F&O Segment The year 2008 witnessed the launch of new products in the F&O Segment of NSE. The Mini derivative (Futures and Options) contracts on S&P CNX Nifty were introduced for trading on January 1, 2008. The mini contracts have smaller contract size than the normal Nifty contract and extend greater affordability to individual investors and helps the individual investor to hedge risks of a smaller portfolio. The Long Term Options Contracts on S&P CNX Nifty were launched on March 3, 2008. The long term options have a life cycle of maximum 5 years duration and offer long term investors to take a view on prolonged price changes over a longer duration, without needing to use a combination of shorter term option contracts. 70 7.4 Criteria for Stocks and Index Eligibility for Trading 7.4.1 Eligibility criteria of stocks • The stock is chosen from amongst the top 500 stocks in terms of average daily market capitalisation and average daily traded value in the previous six months on a rolling basis. • The stock’s median quarter-sigma order size over the last six months should be not less than Rs. 5 lakhs. For this purpose, a stock’s quarter-sigma order size should mean the order size (in value terms) required to cause a change in the stock price equal to one-quarter of a standard deviation. • The market wide position limit in the stock should not be less than Rs.100 crores. The market wide position limit (number of shares) is valued taking the closing prices of stocks in the underlying cash market on the date of expiry of contract in the month. The market wide position limit of open position (in terms of the number of underlying stock) on futures and option contracts on a particular underlying stock shall be 20% of the number of shares held by non-promoters in the relevant underlying security i.e. free-float holding. For an existing F&O stock, the continued eligibility criteria is that market wide position limit in the stock shall not be less than Rs. 60 crores and stock’s median quarter-sigma order size over the last six months shall be not less than Rs. 2 lakh. If an existing security fails to meet the eligibility criteria for three months consecutively, then no fresh month contract will be issued on that security. However, the existing unexpired contracts can be permitted to trade till expiry and new strikes can also be introduced in the existing contract months. Further, once the stock is excluded from the F&O list, it shall not be considered for re-inclusion for a period of one year. Futures & Options contracts may be introduced on (new) securities which meet the above mentioned eligibility criteria, subject to approval by SEBI. 7.4.2 Eligibility criteria of indices The exchange may consider introducing derivative contracts on an index if the stocks contributing to 80% weightage of the index are individually eligible for derivative trading. However, no single ineligible stocks in the index should have a weightage of more than 5% in the index. The above criteria is applied every month, if the index fails to meet the eligibility criteria for three months consecutively, then no fresh month contract would be issued on that index, However, the existing unexpired contacts will be permitted to trade till expiry and new strikes can also be introduced in the existing contracts. 71 7.4.3 Eligibility criteria of stocks for derivatives trading on account of corporate restructuring The eligibility criteria for stocks for derivatives trading on account of corporate restructuring is as under: I., a) the Futures and options contracts on the stock of the original (pre restructure) company were traded on any exchange prior to its restructuring; b) the pre restructured company had a market capitalisation of at least Rs.1000 crores prior to its restructuring; c) the post restructured company would be treated like a new stock and if it is, in the opinion of the exchange, likely to be at least one-third the size of the pre restructuring company in terms of revenues, or assets, or (where appropriate) analyst valuations; and d) in the opinion of the exchange, the scheme of restructuring does not suggest that the post restructured company would have any characteristic (for example extremely low free float) that would render the company ineligible for derivatives trading. II. If the above conditions are satisfied, then the exchange takes the following course of action in dealing with the existing derivative contracts on the pre-restructured company and introduction of fresh contracts on the post restructured company a) In the contract month in which the post restructured company begins to trade, the Exchange introduce near month, middle month and far month derivative contracts on the stock of the restructured company. b) In subsequent contract months, the normal rules for entry and exit of stocks in terms of eligibility requirements would apply. If these tests are not met, the exchange shall not permit further derivative contracts on this stock and future month series shall not be introduced. 7.5 Charges The maximum brokerage chargeable by a trading member in relation to trades effected in the contracts admitted to dealing on the F&O Segment of NSE is fixed at 2.5% of the contract value exclusive of statutory levies. However, NSE has been periodically reviewing and reduc- 72 ing the transaction charges being levied by it on its trading members. With effect from October 1st, 2009, the transaction charges for trades executed on the futures segment is as per the table given below: Total traded value in a month Transaction Charges (Rs. Per lakh of traded value) Up to First Rs. 2500 cores More than Rs. 2500 crores up to Rs. 7500 crores More than Rs. 7500 crores up to Rs. 15000 crores Exceeding Rs.15000 crores Rs. 1.90 each side Rs. 1.85 each side Rs. 1.80 each side Rs. 1.75 each side However for the transactions in the options sub-segment the transaction charges are levied on the premium value at the rate of 0.05% (each side) instead of on the strike price as levied earlier. Further to this, trading members have been advised to charge brokerage from their clients on the Premium price (traded price) rather than Strike price. The trading members contribute to Investor Protection Fund of F&O segment at the rate of Re. 1/- per Rs. 100 crores of the traded value (each side). 73 CHAPTER 8: Clearing and Settlement National Securities Clearing Corporation Limited (NSCCL) undertakes clearing and settlement of all trades executed on the futures and options (F&O) segment of the NSE. It also acts as legal counterparty to all trades on the F&O segment and guarantees their financial settlement. This chapter gives a detailed account of clearing mechanism, settlement procedure and risk management systems at the NSE for trading of derivatives contracts. 8.1 Clearing Entities Clearing and settlement activities in the F&O segment are undertaken by NSCCL with the help of the following entities: 8.1.1 Clearing Members In the F&O segment, some members, called self clearing members, clear and settle their trades executed by them only either on their own account or on account of their clients. Some others called trading member. 8.1.2 Clearing Banks Funds settlement takes place through clearing banks. For the purpose of settlement all clearing members are required to open a separate bank account with NSCCL designated clearing bank for F&O segment. The Clearing and Settlement process comprises of the following three main activities: 1) 2) 3) Clearing Settlement Risk Management 8.2 Clearing Mechanism The clearing mechanism essentially involves working out open positions and obligations of clearing (self-clearing/trading-cum-clearing/professional clearing) members. This position is considered for exposure and daily margin purposes. The open positions of 74 traded. While entering orders on the trading system, TMs are required to identify the orders. These orders can be proprietary (if they are their own trades) or client (if entered on behalf of clients) through ‘Pro/ (as shown in the example below). Consider the following example given from Table 8.1 to Table 8 800, where 200 is his proprietary open position on net basis plus 600 which is the client open positions on gross basis. The proprietary open position at end of day 1 is 200 short. We assume here that the position on day 1 is carried forward to the next trading day i.e. Day 2. On Day 2, the proprietary position of trading member for trades executed on that day is 200 (buy) – 400 (sell) = 200 short (see table 8.3). Hence the net open proprietary position at the end of day 2 is 400 short. Similarly, Client A’s open position at the end of day 1 is 200 long (table 8.2). The end of day open position for trades done by Client A on day 2 is 200 long (table 8.4). Hence the net open position for Client A at the end of day 2 is 400 long. Client B’s open position at the end of day 1 is 400 short (table 8.2). The end of day open position for trades done by Client B on day 2 is 200 short (table 8.4). Hence the net open position for Client B at the end of day 2 is 600 short. Therefore the net open position for the trading member at the end of day 2 is sum of the proprietary open position and client open positions. It works out to be 400 + 400 + 600, i.e. 1400. Table 8.1: Proprietary position of trading member Madanbhai on Day 1 Trading member Madanbhai trades in the futures and options segment for himself and two of his clients. The table shows his proprietary position. Note: A buy position ‘200@ 1000"means 200 units bought at the rate of Rs. 1000. Trading member Madanbhai Proprietary position Buy 200@1000 Sell 400@1010 75 Table 8.2: Client position of trading member Madanbhai on Day 1 Trading member Madanbhai trades in the futures and options segment for himself and two of his clients. The table shows his client position. Trading member Madanbhai Client position Client A Client B Buy Open 400@1109 Sell Close 200@1000 600@1100 200@1099 Sell Open Buy Close Table 8.3: Proprietary position of trading member Madanbhai on Day 2 Assume that the position on Day 1 is carried forward to the next trading day and the following trades are also executed. Trading member Madanbhai Buy Proprietary position 200@1000 Sell 400@1010 Table 8 200@1099 Sell Open Buy Close The following table 8.5 illustrates determination of open position of a CM, who clears for two TMs having two clients. Table 8.5: Determination of open position of a clearing member TMs clearing through CM Buy ABC PQR Total 4000 2000 6000 Sell 2000 Net Buy Sell 1000 1000 Net 2000 1000 Buy 4000 1000 5000 Sell 2000 Net 2000 Proprietary trades Trades: Client 1 Trades: Client 2 Open position Long 6000 1000 7000 Short 2000 2000 2000 3000 3000 (1000) 2000 5000 +2000 5000 -1000 2000 (1000) 4000 +2000 -1000 2000 +3000 76 8.3 Settlement Procedure. 8.3.1 Settlement of Futures Contracts Futures contracts have two types of settlements, the Mark-to-Market (MTM) settlement which happens on a continuous basis at the end of each day, and the final settlement which happens on the last trading day of the futures contract. MTM settlement: All futures contracts for each member are marked-to-market (MTM) 8.6 explains the MTM calculation for a member. The settlement price for the contract for today is assumed to be 105. Table 8.6: Computation of MTM at the end of the day Trade details Quantity bought/sold Brought forward from previous day Traded during day Bought Sold Open position (not squared up) Total 100@100 200@100 100@102 100@100 Settlement price 105 102 105 500 200 500 1200 MTM The table 8.6 above gives the MTM on various positions. The MTM 77. The CMs who have a loss are required to pay the mark-to-market (MTM) loss amount in cash which is in turn ‘theoretical settlement price’ is computed as per the following formula: F = SerT This formula has been discussed in chapter 3. After completion of daily settlement computation, all the open positions are reset to the daily settlement price. Such positions become the open positions for the next day. closing price for a futures contract is currently calculated as the last half an hour weighted average price of the contract in the F&O Segment of NSE. Final settlement price is the closing price of the relevant underlying index/security in the capital market segment of NSE, on the last trading day of the contract. 8.3.2 Settlement of options contracts Options contracts have two types of settlements, daily premium settlement and final exercise. 78 Final exercise settlement Final exercise settlement is effected for all open long in-the-money strike price options existing at the close of trading hours, on the expiration day of is short on the option. Exercise process The period during which an option is exercisable depends on the style of the option. On NSE, index options and options on securities are European style, i.e. options are only subject to automatic exercise on the expiration day, if they are in-the-money. Automatic exercise means that all in-the-money options would be exercised by NSCCL on the expiration day of the contract. The buyer of such options need not give an exercise notice in such cases. Exercise settlement computation In case of option contracts, all open long positions at in-the-money strike prices are automatically exercised on the expiration day and assigned to short positions in option contracts with the same series on a random basis. Final exercise is automatically effected by NSCCL for all open long in-the-money positions in the expiring month option contract, on the expiry day of the option contract. The exercise settlement price is the closing price of the underlying (index or security) on the expiry day of the relevant option contract. The exercise settlement value is the difference between the strike price and the final settlement price of the relevant option contract. For call options,. Settlement of exercises of options is currently by payment in cash and not by delivery of securities. The exercise settlement value for each unit of the exercised contract is computed as follows: Call options = Closing price of the security on the day of exercise — Strike price Put options = Strike price — Closing price of the security on the day of exercise The closing price of the underlying security is taken on the expiration day. (T = exercise date). 79 The exercise settlement value is debited / credited to the relevant CMs clearing bank account on T + 1 day subject to compliance of the position limits prescribed for them and their sub-accounts, and compliance with the prescribed procedure for settlement and reporting. A FII/a sub-account of the FII, as the case may be, intending to trade in the F&O segment of the exchange, is required to obtain a unique Custodial Participant (CP) code allotted from the NSCCL. FII/sub-accounts of FIIs which have been allotted a unique CP code by NSCCL are only permitted to trade on the F&O segment. 8.4 Risk Management NSCCL has developed a comprehensive risk containment mechanism for the F&O segment. Risk containment measures include capital adequacy requirements of members, monitoring of member performance and track record, stringent margin requirements, position limits based on capital, online monitoring of member positions and automatic disablement from trading when limits are breached. The salient features of risk containment mechanism on the F&O segment are: There are stringent requirements for members in terms of capital adequacy measured in terms of net worth and security deposits. 1. NSCCL charges an upfront initial margin for all the open positions of a CM. It specifies the initial margin requirements for each futures/options contract on a daily basis. The CM in turn collects the initial margin from the TMs and their respective clients. 2. Client margins: NSCCL intimates all members of the margin liability of each of their client. Additionally members are also required to report details of margins collected from clients to NSCCL, which holds in trust client margin monies to the extent reported by the member as having been collected formtime basis. Limits are set for each CM based on his capital deposits. The on-line position monitoring system generates alerts whenever a CM reaches a position limit set up by NSCCL. At 100% the clearing facility provided to the CM shall be withdrawn. Withdrawal of clearing facility of a CM in case of a violation will lead to withdrawal of trading facility 80 for all TMs and/ or custodial participants clearing and settling through the CM 5. CMs are provided a trading terminal for the purpose of monitoring the open positions. Further trading members are monitored based on positions limits. Trading facility is withdrawn when the open positions of the trading member exceeds the position limit. 6. A member is alerted of his position to enable him to adjust his exposure or bring in additional capital.. 7.. 8.4.1. 8.4.2 Types of margins The margining system for F&O segment is explained below: • Initial margin: Margin in the F&O segment is computed by NSCCL upto client level for open positions of CMs/TMs. These are required to be paid up-front on gross basis at individual client level for client positions and on net basis for proprietary positions. NSCCL collects initial margin for all the open positions of a CM based on the margins computed by NSE-SPAN. A CM is required to ensure collection of adequate initial margin from his TMs and his respective clients. The TM is required to collect adequate initial margins up-front from his clients. • Premium margin: In addition to initial margin, premium margin is charged at client level. This margin is required to be paid by a buyer of an option till the premium settlement is complete. 81 • Assignment margin: Assignment margin is levied in addition to initial margin and premium margin. It is required to be paid on assigned positions of CMs towards exercise settlement obligations for option contracts, till such obligations are fulfilled. The margin is charged on the net exercise settlement value payable by a CM. 8.5 Margining System NSCCL has developed a comprehensive risk containment mechanism for the Futures & Options segment. The most critical component of a risk containment mechanism is the online position monitoring and margining system. The actual margining and position monitoring is done online, on an intra-day basis using PRISM (Parallel Risk Management System) which is the realtime position monitoring and risk management system. The risk of each trading and clearing member is monitored on a real-time basis and alerts/disablement messages are generated if the member crosses the set limits. 8.5.1 SPAN approach of computing initial margins The objective of SPAN is to identify overall risk in a portfolio of futures and options contracts for each member. The system treats futures and options contracts uniformly, while at the same time recognizing the unique exposures associated with options portfolios like extremely deep out-of-the-money short positions, inter-month risk and inter-commodity risk. Because SPAN is used to determine performance bond requirements (margin requirements), its overriding objective is to determine the largest loss that a portfolio might reasonably be expected to suffer from one day to the next day. In standard pricing models, three factors most directly affect the value of an option at a given point in time: 1. 2. 3. Underlying market price Volatility (variability) of underlying instrument Time to expiration As these factors change, so too will the value of futures and options maintained within a portfolio. SPAN constructs sixteen scenarios of probable changes in underlying prices and volatilities in order to identify the largest loss a portfolio might suffer from one day to the next. It then sets the margin requirement at a level sufficient to cover this one-day loss. The computation of worst scenario loss has two components. The first is the valuation of each contract under sixteen scenarios. The second is the application of these scenario contract values to the actual positions in a portfolio to compute the portfolio values and the worst scenario loss. The scenario contract values are updated at least 5 times in the day, which may be carried out by taking prices at the start of trading, at 11:00 a.m., at 12:30 p.m., at 2:00 p.m., and at the end of the trading session. 82 8.5.2 Mechanics of SPAN The results of complex calculations (e.g. the pricing of options) in SPAN are called risk arrays. Risk arrays, and other necessary data inputs for margin calculation are then provided to members on a daily basis in a file called the SPAN Risk Parameter file. Members can apply the data contained in the risk parameter files, to their specific portfolios of futures and options contracts, to determine their SPAN margin requirements. SPAN has the ability to estimate risk for combined futures and options portfolios, and re-value the same under various scenarios of changing market conditions. Risk arrays The SPAN risk array represents how a specific derivative instrument (for example, an option on NIFTY index at a specific strike price) will gain or lose value, from the current point in time to a specific point in time in the near future, for a specific set of market conditions which may occur over this time duration. The results of the calculation for each risk scenario i.e. the amount by which the futures and options contracts will gain or lose value over the look-ahead time under that risk scenario - is called the risk array value for that scenario. The set of risk array values for each futures and options contract under the full set of risk scenarios, constitutes the risk array for that contract. In the risk array, losses are represented as positive values, and gains as negative values. Risk array values are represented in Indian Rupees, the currency in which the futures or options contract is denominated. Risk scenarios The specific set of market conditions evaluated by SPAN, are called the risk scenarios, and these are defined in terms of: 1. How much the price of the underlying instrument is expected to change over one trading day, and 2. How much the volatility of that underlying price is expected to change over one trading day. SPAN further uses a standardized definition of the risk scenarios, defined in terms of: 1. 2. The underlying price scan range or probable price change over a one day period, and The underlying price volatility scan range or probable volatility change of the underlying over a one day period. Table 8.7 gives the sixteen risk scenarios. +1 refers to increase in volatility and -1 refers to decrease in volatility. 83 Table 8.7: Worst scenario loss Risk scenario number Price move in multiples of price scan range 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0 0 +1/3 +1/3 -1/3 -1/3 +2/3 +2/3 -2/3 -2/3 +1 +1 -1 -1 +2 -2 Volatility move multiples of volatility range +1 -1 +1 -1 +1 -1 +1 -1 +1 -1 +1 -1 +1 -1 0 0 Fraction of loss considered (%) 100 100 100 100 100 100 100 100 100 100 100 100 100 100 35 35 Method of computation of volatility The exponential moving average method is used to obtain the volatility estimate every day. The estimate at the end of day t, σt is estimated using the previous day’s volatility estimate σt-1 (as at the end of day t-1), and the return rt observed in the futures market on day t. whereis λ a parameter which determines how rapidly volatility estimates change. A value of 0.94 is used for λ SPAN uses the risk arrays to scan probable underlying market price changes and probable volatility changes for all contracts in a portfolio, in order to determine value gains and losses at the portfolio level. This is the single most important calculation executed by the system. 84 Scanning risk charge As shown in the table giving the sixteen standard risk scenarios, SPAN starts at the last underlying market settlement price and scans up and down three even intervals of price changes (price scan range). At each price scan point, the program also scans up and down a range of probable volatility from the underlying market’s current volatility (volatility scan range). SPAN calculates the probable premium value at each price scan point for volatility up and volatility down scenario. It then compares this probable premium value to the theoretical premium value (based on last closing value of the underlying) to determine profit or loss. Deep-out-of-the-money short options positions pose a special risk identification problem. As they move towards expiration, they may not be significantly exposed to “normal” price moves in the underlying. However, unusually large underlying price changes may cause these options to move into-the-money, thus creating large losses to the holders of short option positions. In order to account for this possibility, two of the standard risk scenarios in the risk array, Number 15 and 16, reflect an “extreme” underlying price movement, currently defined as double the maximum price scan range for a given underlying. However, because price changes of these magnitudes are rare, the system only covers 35% of the resulting losses. After SPAN has scanned the 16 different scenarios of underlying market price and volatility changes, it selects the largest loss from among these 16 observations. This “largest reasonable loss” is the scanning risk charge for the portfolio. Calendar spread margin A calendar spread is a position in an underlying with one maturity which is hedged by an offsetting position in the same underlying with a different maturity: for example, a short position in a July futures contract on Reliance and a long position in the August futures contract on Reliance is a calendar spread. Calendar spreads attract lower margins because they are not exposed to market risk of the underlying. If the underlying rises, the July contract would make a loss while the August contract would make a profit. As SPAN scans futures prices within a single underlying instrument, it assumes that price moves correlate perfectly across contract months. Since price moves across contract months do not generally exhibit perfect correlation, SPAN adds an calendar spread charge (also called the inter-month spread charge) to the scanning risk charge associated with each futures and options contract. To put it in a different way, the calendar spread charge covers the calendar basis risk that may exist for portfolios containing futures and options with different expirations. For each futures and options contract, SPAN identifies the delta associated each futures and option position, for a contract month. It then forms spreads using these deltas across contract months. For each spread formed, SPAN assesses a specific charge per spread which constitutes the calendar spread charge. 85 The margin for calendar spread is calculated on the basis of delta of the portfolio in each month.. A calendar spread position on Exchange traded equity derivatives may be granted calendar spread treatment till the expiry of the near month contract. Margin on calendar spreads is levied at 0. However, in the event that underlying market conditions change sufficiently, these options may move into-the-money, thereby generating large losses for the short positions in these options. To cover the risks associated with deepout-of-the-money short options positions, SPAN assesses a minimum margin for each short option position in the portfolio called the short option minimum charge, which is set by the NSCCL. The short option minimum charge serves as a minimum charge towards margin requirements for each short position in an option contract. For example, suppose that the short option minimum charge is Rs.50 per short position. A portfolio containing 20 short options will have a margin requirement of at least Rs. 1,000, even if the scanning risk charge plus the calendar spread charge on the position is only Rs. 500. The short option minimum margin equal to 3% of the notional value of all short index options is charged if sum of the worst scenario loss and the calendar spread margin is lower than the short option minimum margin. For stock options it is equal to 7.5% of the notional value based on the previous days closing value of the underlying stock. Notional value of option positions is calculated on the short option positions by applying the last closing price of the relevant underlying. Net option value The net option value is calculated as the current market value of the option times the number of option units (positive for long options and negative for short options) in the portfolio. Net option value is added to the liquid net worth of the clearing member. This means that the current market value of short options are deducted from the liquid net worth and the market value of long options are added thereto. Thus mark to market gains and losses on option positions get adjusted against the available liquid net worth. 86 Net buy premium To cover the one day risk on long option positions (for which premium shall be payable on T+1 day), net buy premium to the extent of the net long options position value is deducted from the Liquid Networth of the member on a real time basis. This would be applicable only for trades done on a given day. The net buy premium margin shall be released towards the Liquid Networth of the member on T+1 day after the completion of pay-in towards premium settlement. 8.5.3 Overall portfolio margin requirement The total margin requirements for a member for a portfolio of futures and options contract would be computed by SPAN as follows: 1. 2. Adds up the scanning risk charges and the calendar spread charges. Compares this figure to the short option minimum charge and selects the larger of the two. This is the SPAN risk requirement. 3. Total SPAN margin requirement is equal to SPAN risk requirement less the net option value, which is mark to market value of difference in long option positions and short option positions. 4. Initial margin requirement = Total SPAN margin requirement + Net Buy Premium. 8.5.4 Cross Margining Cross margining benefit is provided for off-setting positions at an individual client level in equity and equity derivatives segment. The cross margin benefit is provided on following offsetting positionsa. b. c. 1. Index Futures and constituent Stock Futures positions in F&O segment Index futures position in F&O segment and constituent stock positions in CM segment Stock futures position in F&O segment and stock positions in CM segment In order to extend the cross margining benefit as per (a) and (b) above, the basket of constituent stock futures/ stock positions needs to be a complete replica of the index futures. 3. The positions in F&O segment for stock futures and index futures of the same expiry month are eligible for cross margining benefit. 4. The position in a security is considered only once for providing cross margining benefit. E.g. Positions in Stock Futures of security A used to set-off against index futures positions is not considered again if there is a off-setting positions in the security A in Cash segment. 5. Positions in option contracts are not considered for cross margining benefit. The positions which are eligible for offset are subjected to spread margins. The spread margins shall be 25% of the applicable upfront margins on the offsetting positions. 87 Prior to the implementation of a cross margining mechanism positions in the equity and equity derivatives segment were been treated separately, despite being traded on the common underlying securities in both the segments. For example, Mr. X bought 100 shares of a security A in the capital market segment and sold 100 shares of the same security in single stock futures of the F&O segment. Margins were payable in the capital market and F&O segments separately. If the margins payable in the capital market segment is Rs.100 and in the F&O segment is Rs. 140, the total margin payable by MR. X is Rs.240. The risk arising out of the open position of Mr. X in the capital market segment is significantly mitigated by the corresponding off-setting position in the F&O segment. Cross margining mechanism reduces the margin for Mr. X from Rs. 240 to only Rs. 60. 88 CHAPTER 9: Regulatory Framework The trading of derivatives is governed by the provisions contained in the SC(R)A, the SEBI Act, the rules and regulations framed under that and the rules and bye–laws of the stock exchanges. This Chapter takes a look at the legal and regulatory framework for derivatives trading in India. It also, discusses in detail the recommendation of the LC Gupta Committee for trading of derivatives in India. 9.1 Securities Contracts (Regulation) Act, 1956 SC(R)A regulates transactions in securities markets along with derivatives markets. The original act was introduced in 1956. It was subsequently amended in 1996, 1999, 2004, 2007 and 2010. It now governs the trading of securities in India. The term “securities” has been defined in the amended SC(R)A under the Section 2(h) to include: • Shares, scrips, stocks, bonds, debentures, debenture stock or other marketable securities of a like nature in or of any incorporated company or other body corporate. • • Derivative. Units or any other instrument issued by any collective investment scheme to the investors in such schemes. • Security receipt as defined in clause (zg) of section 2 of the Securitisation and Reconstruction of Financial Assets and Enforcement of Security Interest Act, 2002 • • Units or any other such instrument issued to the investor under any mutual fund scheme1. Any certificate or instrument (by whatever name called), issued to an investor by an issuer being a special purpose distinct entity which possesses any debt or receivable, including mortgage debt, assigned to such entity, and acknowledging beneficial interest of such investor in such debt or receivable, including mortgage debt as the case may be. • • • Government securities Such other instruments as may be declared by the Central Government to be securities. Rights or interests in securities. “Derivative” is defined to include: • A security derived from a debt instrument, share, loan whether secured or unsecured, risk instrument or contract for differences or any other form of security. • A contract which derives its value from the prices, or index of prices, of underlying securities. 1 Securities shall not include any unit linked insurance policy or scrips or any such instrument or unit, by whatever name called, which provides a combined benefit risk on the life of the persons and investments by such persons and issued by an insurer referred to in clause (9) of section 2 of the insurance Act, 1938 (4 of 1938) 89 Section 18A of the SC(R)A. 9 relating to securities markets. calling for information from, undertaking inspection, conducting inquiries and audits of the stock exchanges, mutual funds and other persons associated with the securities market and other intermediaries and self–regulatory organizations in the securities market. • performing such functions and exercising according to Securities Contracts (Regulation) Act, 1956, as may be delegated to it by the Central Government. 9. According to this framework: • Any Exchange fulfilling the eligibility criteria 90 its members and would have to obtain prior approval of SEBI before start of trading in any derivative contract. • The Exchange should have minimum 50 members. The members of an existing segment of the exchange would not automatically become the members of derivative segment. The members seeking admission in the derivative segment of the exchange would need to fulfill the eligibility conditions. • The clearing and settlement of derivatives trades would be through a SEBI approved clearing corporation/house. Clearing corporations/houses complying with the eligibility conditions as laid down by the committee have to apply to SEBI for approval. •) (b) (c) (d) (e) (f) (g) (h) (i) • Fixed assets Pledged securities Member’s card Non-allowable securities (unlisted securities) Bad deliveries Doubtful debts and advances Prepaid expenses Intangible assets 30% marketable securities The minimum contract value shall not be less than Rs.2 Lakh. Exchanges have to submit details of the futures contract they propose to introduce. • The initial margin requirement, exposure limits linked to capital adequacy and margin demands related to the risk of loss on the position will be prescribed by SEBI/Exchange from time to time. • There will be. 91 • The trading members are required to have qualified approved user and sales person who should have passed a certification programme approved by SEBI. 9.3.1 Forms of collateral’s acceptable at NSCCL Members and authorized dealers have to fulfill certain requirements and provide collateral deposits to become members of the F&O segment. All collateral deposits are segregated into cash component and non-cash component. Cash component means cash, bank guarantee, fixed deposit receipts, T-bills and dated government securities. Non-cash component mean all other forms of collateral deposits like deposit of approved demat securities. 9.3.2 Requirements to become F&O segment member The eligibility criteria for membership on the F&O segment is as given in table 9.1. Requirements for professional clearing membership are provided in table 9.2. Anybody interested in taking membership of F&O segment is required to take membership of “CM and F&O segment” or “CM, WDM and F&O segment”. An existing member of CM segment can also take membership of F&O segment. A trading member can also be a clearing member by meeting additional requirements. There can also be only clearing members. Table 9.1: Eligibility criteria for membership on F&O segment (corporates) Particulars (all values in Rs. Lakh) Net worth1 CM and F&O segment 100 (Membership in CM segment and Trading/Trading in F&O segment) CM, WDM and F&O segment 200 (Membership in WDM segment, CM segment self clearing membership in F&O segment) 300 (Membership in CM segment and trading and clearing membership in F&O Segment) Interest free security deposit (IFSD) with NSEIL Interest free security deposit (IFSD) with NSCCL Collateral security deposit (CSD)3 Annual subscription 25** 1 25** 2 15* 15* 110 260 300 (Membership in WDM segment, CM segment and Trading and clearing membership in F&O segment) and self-clearing membership and trading/trading and 92 Notes for Table 9.1: 1 No additional networth is required for self clearing members. However, a networth of Rs. 300 Lakh is required for TM-CM and PCM. * Additional IFSD of 25 lakhs with NSCCL is required for Trading and Clearing (TM-CM) and for Trading and Self clearing member (TM/SCM). ** Additional Collateral Security Deposit (CSD) of 25 lakhs with NSCCL is required for Trading and Clearing (TM-CM) and for Trading and Self clearing member (TM/SCM). In addition, a member clearing for others is required to bring in IFSD of Rs. 2 lakh and CSD of Rs. 8 lakh per trading member he undertakes to clear in the F&O segment. Table 9.2: Requirements for Professional Clearing Membership (Amount in Rs. lakh) Particulars Eligibility Net Worth Interest Free Security Deposit (IFSD)* Collateral Security Deposit (CSD) Annual Subscription 25 2.5 25 Nil 25 25 CM Segment F&O Segment Trading Member of NSE/SEBI Registered Custodians/Recognised Banks 300 300 *The Professional Clearing Member (PCM) is required to bring in IFSD of Rs. 2 lakh and CSD of Rs. 8 lakh per trading member whose trades he undertakes to clear in the F&O segment and IFSD of Rs. 6 lakh and CSD of Rs. 17.5 lakh (Rs. 9 lakh and Rs. 25 lakh respectively for corporate Members) per trading member in the CM segment. 9.3.3 Requirements to become authorized / approved user Trading members and participants are allowed to appoint, with the approval of the F&O segment of the exchange, authorized persons and approved users to operate the trading workstation(s). These authorized users can be individuals, registered partnership firms or corporate bodies as defined under the Companies Act, 1956. Authorized persons cannot collect any commission or any amount directly from the clients he introduces to the trading member who appointed him. However he can receive a commission or any such amount from the trading member who appointed him as provided under regulation. Approved users on the F&O segment have to pass a certification program which has been approved by SEBI. Each approved user is given a unique identification number through which he will have access to the NEAT system. The approved user can access the NEAT system 93 through a password and can change such password from time to time. 9.3.4 Position limits Position limits have been specified by SEBI at trading member, client, market and FII levels respectively. Trading member position limits Trading member position limits are specified as given below: 1. Trading member position limits in equity index option contracts: The trading member position limits in equity index option contracts is higher of Rs.500 crore or 15% of the total open interest in the market in equity index option contracts. This limit is applicable on open positions in all option contracts on a particular underlying index. 2. Trading member position limits in equity index futures contracts: The trading member position limits in equity index futures contracts is higher of Rs.500 crore or 15% of the total open interest in the market in equity index futures contracts. This limit is applicable on open positions in all futures contracts on a particular underlying index. 3. Trading member position limits for combined futures and options position: • For stocks having applicable market-wise. • For stocks having applicable market-wise position limit (MWPL) less than Rs.500 crores, the combined futures and options position limit is 20% of applicable MWPL and futures position cannot exceed 20% of applicable MWPL or Rs.50 crore which ever is lower. The Clearing Corporation shall specify the trading member-wise position limits on the last trading day month which shall be reckoned for the purpose during the next month. Client stock) on futures and option contracts on a particular underlying stock is 20% of the number of shares held by non-promoters in the relevant underlying security i.e. 20% of the free–float in terms of no. of 94 shares of a company. This limit is applicable on all open positions in all futures and option contracts on a particular underlying stock. The enforcement of the market wide limits is done in the following manner: • At end of the day the exchange tests whether the market wide open interest for any scrip exceeds 95% of the market wide position limit for that scrip. In case it does so, the exchange takes note of open position of all client/TMs as at end of that day for that scrip and from next day onwards they can trade only to decrease their positions through offsetting positions. •. • The normal trading in the scrip is resumed after the open outstanding position comes down to 80% or below of the market wide position limit. Further, the exchange also checks on a monthly basis, whether a stock has remained subject to the ban on new position for a significant part of the month consistently for three months. If so, then the exchange phases out derivative contracts on that underlying. FII / MFs position limits FII and MFs position limits are specified as given below: 1. The FII and MF position limits in all index options contracts on a particular underlying index are Rs. 500 crores or 15% of the total open interest of the market in index options, whichever is higher, per exchange. This limit is applicable on open positions in all option contracts on a particular underlying index. 2.. In addition to the above, FIIs and MF’s can take exposure in equity index derivatives subject to the following limits: a. Short positions in index derivatives (short futures, short calls and long puts) not exceeding (in notional value) the FIIs/MF’s holding of stocks. b. Long positions in index derivatives (long futures, long calls and short puts) not 95 exceeding (in notional value) the FIIs/MF’s holding of cash, government securities, T-bills and similar instruments. In this regards, if the open positions of the FII/MF exceeds the limits as stated in point no. (a) and (b) above, such surplus is deemed to comprise of short and long positions in the same proportion of the total open positions individually. Such short and long positions in excess of the said limits are compared with the FIIs/MFs holding in stocks, cash etc in a specified format. 3. For stocks having applicable market-wide. For stocks having applicable market-wide position limit of less than Rs. 500 crores, the combined futures and options position limit is 20% of applicable MWPL and futures position cannot exceed 20% of the applicable MWPL or Rs. 50 crore whichever is lower. The FIIs should report to the clearing member (custodian) the extent of the FIIs. At the level of the FII sub-account /MF scheme Mutual Funds are allowed to participate in the derivatives market at par with Foreign Institutional Investors (FII). Accordingly, mutual funds shall be treated at par with a registered FII in respect of position limits in index futures, index options, stock options and stock futures contracts. Mutual funds will be considered as trading members like registered FIIs and the schemes of mutual funds will be treated as clients like sub-accounts of FIIs. The position limits for Mutual Funds and its schemes shall be as under: 1. Position limit for MFs in index futures and options contracts A disclosure is required from any person or persons acting in concert who together own 15% or more of the open interest of all futures and options contracts on a particular underlying index on the Exchange. Failing to do so, is a violation of the rules and regulations and attracts penalty and disciplinary action. 2. Position limit for MFs in stock futures and options The gross open position across all futures and options contracts on a particular underlying security, of a sub-account of an FII, / MF scheme should not exceed the higher of: • 1% of the free float market capitalisation (in terms of number of shares), OR 96 • 5% of the open interest in the derivative contracts on a particular underlying stock (in terms of number of contracts). These position limits are applicable on the combined position in all futures and options contracts on an underlying security on the Exchange. 9.3.5 Reporting of client margin purpose of meeting margin requirements.. 9. This will facilitate in retaining the relative status of positions namely in-the-money, at-the-money and out-of-money. This will also address issues related to exercise and assignments. • Adjustment for corporate actions shall be carried out on the last day on which a security is traded on a cum basis in the underlying cash market. • Adjustments shall mean modifications to positions and/or contract specifications namely strike price, position, market lot, multiplier. These adjustments shall be carried out on all open, exercised as well as assigned positions. • The corporate actions may be broadly classified under stock benefits and cash benefits. The various stock benefits declared by the issuer of capital are bonus, rights, merger/ de–merger, amalgamation, splits, consolidations, hive–off, warrants and secured premium notes and dividends. • The methodology for adjustment of corporate actions such as bonus, stock splits and consolidations is as follows: – Strike price: The new strike price shall be arrived at by dividing the old strike 97 price by the adjustment factor as under. – Market lot/multiplier: The new market lot/multiplier shall be arrived at by multiplying the old market lot by the adjustment factor as under. – Position: The new position shall be arrived at by multiplying the old position by the adjustment factor, which will be computed using the pre-specified methodology. The adjustment factor for bonus, stock splits and consolidations is arrived at as follows: – – – Bonus: Ratio - A:B; Adjustment factor: (A+B)/B Stock splits and consolidations: Ratio - A:B ; Adjustment factor: B/A Right: Ratio - A:B • • • • – minimizing fraction settlements, the following methodology is proposed to be adopted: 1. 2. 3. 4., shall be decided in the manner laid down by the group by adjusting strike price or market lot, so that no forced closure of open position is mandated. • Dividends which are below 10% of the market value of the underlying stock, would be deemed to be ordinary dividends and no adjustment in the strike price would be made for ordinary dividends. For extra-ordinary dividends, above 10% of the market value of the underlying stock, the strike price would be adjusted. • The exchange will on a case to case basis carry out adjustments for other corporate actions as decided by the group in conformity with the above guidelines. 98 CHAPTER 10: Accounting for Derivatives This chapter gives a brief overview of the process of accounting of derivative contracts namely, index futures, stock futures, index options and stock options. (.). 10.1 Accounting for futures equity index futures is similar to a trade in, say shares, and does not pose any peculiar accounting problems. Hence in this section we shall largely focus on the accounting treatment of equity index futures in the books of the client. Accounting at the inception of a contract Every client is required to pay to the trading member/clearing member, the initial margin determined by the clearing corporation as per the bye-laws/regulations of the exchange for entering into equity index futures contracts.. On the balance sheet date, the balance in the ‘Initial margin - Equity index Payments made or received on account of daily settlement by the client would be credited/ debited to the bank account and the corresponding debit or credit for the same should be made to an account titled as “Mark-to-market margin - Equity index futures account”. The client may also deposit a lump sum amount with the broker/trading member in respect of mark-to-market margin money instead of receiving/paying mark-to-market margin money on 99 daily basis. The amount so paid is in the nature of a deposit and should be debited to an appropriate account, say, “Deposit for mark-to-market margin account”. The amount of “markto-market margin” received/paid from such account should be credited/debited to “Mark-tomarket margin - Equity index futures account” with a corresponding debit/credit to “Deposit for mark-to-market margin account”. At the year-end, any balance in the “Deposit for markto-market margin account” should be shown as a deposit under the head “current assets”. Accounting for open positions Position left open on the balance sheet date must be accounted for. Debit/credit balance in the “mark-to-market margin - Equity index futures account”, represents the net amount paid/ received on the basis of movement in the prices of index futures up to the balance sheet date. Keeping in view ‘prudence’”. Accounting at the time of final settlement At the expiry of a series of equity index - Equity index equity index futures contracts. Accordingly, if more than one contract in respect of the series of equity index. 100 On the settlement of equity index futures contract, the initial margin paid in respect of the contract is released which should be credited to “Initial margin - Equity index - Equity index futures account” with a corresponding credit to “Initial margin - Equity index equity index futures traded (separately for buy/sell) should be disclosed in respect of each series of equity index futures. The number of equity index futures contracts having open position, number of units of equity index futures pertaining to those contracts and the daily settlement price as of the balance sheet date should be disclosed separately for long and short positions, in respect of each series of equity index futures. 10.2 Accounting for options The Institute of Chartered Accountants of India issued guidance note on accounting for index options and stock options from the view point of the parties who enter into such contracts as buyers/holder or sellers/writers.’, as the case may be. In the balance sheet, such account should be shown separately under the head ‘Current Assets’. The buyer/holder of the 101 option is not required to pay any margin. He is required to pay the premium. In his books, such premium would be debited to ‘Equity Index Option Premium Account’ or ‘Equity Stock Option Premium Account’, as the case may be. In the books of the seller/writer, such premium received should be credited to ‘Equity Index Option Premium Account’ or ‘Equity Stock Option Premium Account’ as the case may be.’, ‘Deposit for Margin Account’. At the end of the year the balance in this account would be shown as deposit under ‘Current Assets’. Accounting for open positions as on balance sheet dates The ‘Equity Index Option Premium Account’ and the ‘Equity Stock Option Premium Account’ should be shown under the head ‘Current Assets’ or ‘Current Liabilities’, as the case may be. In the books of the buyer/holder, a provision should be made for the amount by which the premium paid for the option exceeds the premium prevailing on the balance sheet date. The provision so created should be credited to ‘Provision for Loss on Equity Index Option Account’ to the ‘Provision for Loss on Equity Stock Options Account’, as the case may be. The provision made as above should be shown as deduction from ‘Equity Index Option Premium’ or ‘Equity Stock Option Premium’ which is shown under ‘Current Assets’. In the books of the seller/writer, the provision should be made for the amount by which premium prevailing on the balance sheet date exceeds the premium received for that option. This provision should be credited to ‘Provision for Loss on Equity Index Option Account’ or to the ‘Provision for Loss on Equity Stock Option Account’, as the case may be, with a corresponding debit to profit and loss account. ‘Equity Index Options Premium Account’ or ‘Equity Stock Options Premium Account’ and ‘Provision for Loss on Equity Index Options Account’ or ’Provision for Loss on Equity Stock Options Account’ should be shown under ‘Current Liabilities and Provisions’. In case of any opening balance in the ‘Provision for Loss on Equity Stock Options Account’ or the ‘Provision for Loss on Equity Index Options Account’, the same should be adjusted against the provision required in the current year and the profit and loss account be debited/credited with the balance provision required to be made/excess provision written back. 102 Accounting at the time of final settlement On exercise of the option, the buyer/holder will recognize premium as an expense and debit the profit and loss account by crediting ‘Equity Index Option Premium Account’ or ‘Equity Stock Option Premium Account’. Apart from the above, the buyer/holder will receive favorable difference, if any, between the final settlement price as on the exercise/expiry date and the strike price, which will be recognized as income. On exercise of the option, the seller/writer will recognize premium as an income and credit the profit and loss account by debiting ‘Equity Index Option Premium Account’ or ‘Equity Stock Option Premium Account’. Apart from the above, the seller/writer will pay the adverse difference, if any, between the final settlement price as on the exercise/expiry date and the strike price. Such payment will be recognized as a loss. As soon as an option gets exercised, margin paid towards such option would be released by the exchange, which should be credited to ‘Equity Index Option Margin Account’ or to ‘Equity un-exercised. 103 10.3 Taxation of Derivative Transaction in Securities 10.3.1 Taxation of Profit/Loss on derivative transaction in securities Prior to Financial Year 2005–06, transaction in derivatives were considered as speculative transactions for the purpose of determination of tax liability under the Income-tax Act. This is in view of section 43(5) of the Income-taxessee.. 10.3.2 Securities transaction tax on derivatives transactions w.e.f. 1st June, 2008 in relation to sale of a derivative, where the transaction of such sale in entered into in a recognized stock exchange. Sl. No. 1 2. Taxable securities transaction Sale of an option in securities Sale of an option in securities, where option is exercised 3. Sale of a futures in securities 0.125% 0.017% Purchaser Seller Rate 0.017% Payable by Seller 104 Consider an example. Mr. A. sells a futures contract of M/s. XYZ Ltd. (Lot Size: 1000) expiring on 29-Sep-2005 for Rs. 300. The spot price of the share is Rs. 290. The securities transaction tax thereon would be calculated as follows: 1. 2. Note: Total futures contract value = 1000 x 300 = Rs. 3,00,000 Securities transaction tax payable thereon 0.017% = 3,00,000 x 0.017% = Rs. 51 No tax on such a transaction is payable by the buyer of the futures contract. References: 1. Jorion, Phillipe, (2009), Financial Risk Manager Handbook Risk (5th ed.) New Jersey: John Wiley 2. 3. Kolb, Robert W., (2007) Futures, Options and Swaps, (3rd ed.) Blackwell: Malden, MA Hull, John C., Futures, Options and Other Derivatives (2009) (7th ed). Prentice Hall India: New Delhi 4. Chance, Don, M., Brooks Robert (2008), Derivatives and Risk Management Basics, Cengage Learning: New Delhi. 5. 6. Morgan J. P., Risk Metrics, Irwin Stulz, Rene M, (2003), Risk Management and Derivatives, Thomson South Western: Cincinnati 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. Strong, Robert A. (2006), Derivatives- An Introduction, Thomson Asia: Singapore Ajay Shah and Susan Thomas, Derivatives FAQ Leo Melamed, Escape to Futures Hans R.Stoll and Robert E. Whaley, Futures and options Terry J. Watsham, Futures and options in risk management Robert W. Kolb, Futures, options and swaps National Stock Exchange, Indian Securities Market Review John Kolb, Introduction to futures and options markets National Stock Exchange, NSENEWS David A. Dubofsky, Options and financial future: Valuation and uses Dr. L. C. Gupta Committee, Regulatory framework for financial derivatives in India Prof. J. R. Varma & Group, Risk containment in the derivatives market Mark Rubinstein, Rubinstein on derivatives 105 20. 21. 22. Rules, regulations and bye–laws, (F &O segment) of NSE & NSCCL Robert W. Kolb, Understanding futures markets Websites • • • • • • • 106 MODEL TEST PAPER DERIVATIVES MARKET DEALERS MODULE Q.1 Theta is also referred to as the _________ of the portfolio (a) (b) (c) (d) Q.2 time decay risk delay risk decay time delay [2 Marks] [1 Mark] All of the following are true regarding futures contracts except (a) (b) (c) (d) they they they they are regulated by RBI require payment of a performance bond are a legally enforceable promise are market to market Q.3 Clearing Members (CMs) and Trading Members (TMs) are required to collect upfront initial margins from all their Trading Members/Constituents. [2 Marks] (a) (b) FALSE TRUE [3 Marks] Q.4 All open positions in the index futures contracts are daily settled at the (a) (b) (c) (d) mark-to-market settlement price net settlement price opening price closing price Q.5. An American style call option contract on the Nifty index with a strike price of 3040 expiring on the 30th June 2008 is specified as ’30 JUN 2008 3040 CA’. [2 Marks] (a) (b) FALSE TRUE [2 Marks] Q.6 Usually, open interest is maximum in the _______ contract. (a) (b) (c) (d) more liquid contracts far month middle month near month 107 Q.7 An equity index comprises of ______. (a) (b) (c) (d) basket of stocks basket of bonds and stocks basket of tradeable debentures None of the above [1 Mark] Q.8 Position limits have been specified by _______ at trading member, client, market and FII levels respectively. [2 Marks] (a) (b) (c) (d) Sub brokers Brokers SEBI RBI Q copper fabricator entering into futures contracts to buy his annual requirements of copper. A farmer selling his crop at a future date An exporter selling dollars in the spot market Q.11 An investor is bearish about ABC Ltd. and sells ten one-month ABC Ltd. futures contracts at Rs.5,00,000. On the last Thursday of the month, ABC Ltd. closes at Rs.510. He makes a _________. (assume one lot = 100) [2 Marks] (a) (b) (c) (d) Profit of Rs. 10,000 loss of Rs. 10,000 loss of Rs. 5,100 profit of Rs. 5,100 108 Q.12 The interest rates are usually quoted on : (a) (b) (c) (d) Per Per Per Per annum basis day basis week basis month basis [2 Marks] Q.13 After SPAN has scanned the 16 different scenarios of underlying market price and volatility changes, it selects the ________ loss from among these 16 observations [2 Marks] (a) largest (b) 8th smallest (c) smallest (d) average Mr. Ram buys 100 calls on a stock with a strike of Rs.1,200. He pays a premium of Rs.50/call. A month later the stock trades in the market at Rs.1,300. Upon exercise he will receive __________. [2 Marks] (a) (b) (c) (d) Rs.10,000 Rs.1,200 Rs.6,000 Rs.1,150 Q.14 Q.15 There are no Position Limits prescribed for Foreign Institutional Investors (FIIs) in the F&O Segment. [1 Mark] (a) (b) TRUE FALSE Q.16 In the Black-Scholes Option Pricing Model, when S becomes very large a call option is almost certain to be exercised [2 Marks] (a) (b) FALSE TRUE Q.17 Suppose Nifty options trade for 1, 2 and 3 months expiry with strike prices of 1850, 1860, 1870, 1880, 1890, 1900, 1910. How many different options contracts will be tradable? [2 Marks] (a) (b) (c) (d) 27 42 18 24 109 Q.18 Prior to Financial Year 2005 - 06, transaction in derivatives were considered as speculative transactions for the purpose of determination of tax liability under the Income-tax Act [1 Mark] (a) (b) TRUE FALSE [3 Marks] Q.19 ______ is allotted to the Custodial Participant (CP) by NSCCL. (a) (b) (c) (d) A unique CP code An order identifier A PIN number A trade identifier Q.20 An interest rate is 15% per annum when expressed with annual compounding. What is the equivalent rate with continuous compounding? [2 Marks] (a) (b) (c) (d) 14% 14.50% 13.98% 14.75% Q.21 The favorable difference received by buyer/holder on the exercise/expiry date, between the final settlement price as and the strike price,, or index of prices, of underlying securities. [1 Mark] (a) (b) TRUE FALSE Q.22 Q.23 110 Q.24 The risk management activities and confirmation of trades through the trading system of NSE is carried out by _______. [2 Marks] (a) (b) (c) (d) users trading members clearing members participants Q.25 A dealer sold one January Nifty futures contract for Rs.250,000 on 15th January. Each Nifty futures contract is for delivery of 50 Nifties. On 25th January, the index closed at 5100. How much profit/loss did he make ? [2 Marks] (a) (b) (c) (d) Profit of Rs. 9000 Loss of Rs. 8000 Loss of Rs. 9500 Loss of Rs. 5000 Q.26 Manoj owns five hundred shares of ABC Ltd. Around budget time, he gets uncomfortable with the price movements. Which of the following will give him the hedge he desires (assuming that one futures contract = 100 shares) ? [1 Mark] (a) (b) (c) (d) Buy Sell Sell Buy 5 ABC Ltd.futures contracts 5 ABC Ltd.futures contracts 10 ABC Ltd.futures contracts 10 ABC Ltd.futures contracts Q.27 An investor is bearish about Tata Motors and sells ten one-month ABC Ltd. futures contracts at Rs.6,06,000. On the last Thursday of the month, Tata Motors closes at Rs.600. He makes a _________. (assume one lot = 100) [2 Marks] (a) (b) (c) (d) Profit of Rs. 6,000 Loss of Rs. 6,000 Profit of Rs. 8,000 Loss of Rs. 8,000 Q.28 The beta of Jet Airways is 1.3. A person has a long Jet Airways position of Rs. 200,000 coupled with a short Nifty position of Rs.100,000. Which of the following is TRUE? [2 Marks] (a) He is bullish on Nifty and bearish on Jet Airways (b) He has a partial hedge against fluctuations of Nifty (c) He is bearish on Nifty as well as on Jet Airways (d) He has a complete hedge against fluctuations of Nifty 111 Q.29 Suppose a stock option contract trades for 1, 2 and 3 months expiry with strike prices of 85, 90, 95, 100, 105, 110, 115. How many different options contracts will be tradable? [2 Marks] (a) (b) (c) (d) 18 32 21 42 [2 Marks] Q.30 The bull spread can be created by only buying and selling (a) (b) (c) (d) basket option futures warrant options Q.31 A stock broker means a member of_______. (a) (b) (c) (d) SEBI any exchange a recognized stock exchange any stock exchange [1 Mark] Q.32 Ashish is bullish about HLL which trades in the spot market at Rs.210. He buys 10 three-month call option contracts on HLL with a strike of 230 at a premium of Rs.1.05 per call. Three months later, HLL closes at Rs. 250. Assuming 1 contract = 100 shares, his profit on the position is ____. [1 Mark] (a) (b) (c) (d) Rs.18,950 Rs.19,500 Rs.10,000 Rs.20,000 Q.33 A January month Nifty Futures contract will expire on the last _____ of January [2 Marks] (a) Monday (b) Thursday (c) Tuesday (d) Wednesday Which of the following are the most liquid stocks? (a) (b) (c) (d) All Infotech stocks Stocks listed/permitted to trade at the NSE Stocks in the Nifty Index Stocks in the CNX Nifty Junior Index 112 [2 Marks] Q.34 Q.35 In the books of the buyer/holder of the option, the premium paid would be ___________ to ‘Equity Index Option Premium Account’ or ‘Equity Stock Option Premium Account’, as the case may be [2 Marks] (a) (b) (c) (d) Debited Credited Depends None Q.36 Greek letter measures a dimension to_______________ in an option position [1 Mark] (a) the risk (b) the premium (c) the relationship (d) None An option which gives the holder the right to sell a stock at a specified price at some time in the future is called a [1 Mark] (a) (b) (c) (d) Naked option Call option Out-of-the-money option Put option Q.37 Q.38 Trading member Shantilal took proprietary purchase in a March 2000 contract. He bought 1500 units @Rs.1200 and sold 1400 @ Rs. 1220. The end of day settlement price was Rs. 1221. What is the outstanding position on which initial margin will be calculated? [1 Mark] (a) (b) (c) (d) 300 200 100 500 units units units units Q.39 In which year, foreign currency futures based on new floating exchange rate system were introduced at the Chicago Mercantile Exchange [1 Mark] (a) (b) (c) (d) 1970 1975 1972 1974 113 Q.40 The units of price quotation and minimum price change are not standardised item in a Futures Contract. [1 Mark] (a) (b) TRUE FALSE Q.41 With the introduction of derivatives the underlying cash market witnesses _______ [1 Mark] (a) lower volumes (b) sometimes higher, sometimes lower (c) higher volumes (d) volumes same as before Clearing members need not collect initial margins from the trading members [1 Mark] (a) FALSE (b) TRUE Which risk estimation methodology is used for measuring initial margins for futures/ options market? [2 Marks] (a) (b) (c) (d) Value At Risk Law of probability Standard Deviation None of the above Q.42 Q.43 Q.44 The value of a call option ___________ with a decrease in the spot price. [2 Marks] (a) (b) (c) (d) increases does not change decreases increases or decreases Q.45 Any person or persons acting in concert who together own ______% or more of the open interest in index derivatives are required to disclose the same to the clearing corporation. [1 Mark] (a) 35 (b) 15 (c) 5 (d) 1 114 Q.46 NSE trades Nifty, CNX IT, BANK Nifty, Nifty Midcap 50 and Mini Nifty futures contracts having all the expiry cycles, except. [2 Marks] (a) (b) (c) (d) Two-month expiry cycles Four month expiry cycles Three-month expiry cycles One-month expiry cycles Q.47 An investor owns one thousand shares of Reliance. Around budget time, he gets uncomfortable with the price movements. One contract on Reliance is equivalent to 100 shares. Which of the following will give him the hedge he desires? [2 Marks] (a) (b) (c) (d) Buy Sell Sell Buy 5 Reliance futures contracts 10 Reliance futures contracts 5 Reliance futures contracts 10 Reliance futures contracts Q.48 Spot Price = Rs. 100. Call Option Strike Price = Rs. 98. Premium = Rs. 4. An investor buys the Option contract. On Expiry of the Option the Spot price is Rs. 108. Net profit for the Buyer of the Option is ___. [1 Mark] (a) (b) (c) (d) Rs. Rs. Rs. Rs. 6 5 2 4 Q.49 In the NEAT F&O system, the hierarchy amongst users comprises of _______. [2 Marks] (a) branch manager, dealer, corporate manager (b) corporate manager, branch manager, dealer (c) dealer, corporate manager, branch manager (d) corporate manager, dealer, branch manager The open position for the proprietary trades will be on a _______ (a) (b) net basis gross basis [3 Marks] Q.50 Q.51 The minimum networth for clearing members of the derivatives clearing corporation/ house shall be __________ [2 Marks] (a) (b) (c) (d) Rs.300 Lakh Rs.250 Lakh Rs.500 Lakh None of the above 115 Q.52 The Black-Scholes option pricing model was developed in _____. (a) (b) (c) (d) 1923 1973 1887 1987 [2 Marks] Q.53 In the case of index futures contracts, the daily settlement price is the ______. [3 Marks] (a) closing price of futures contract (b) opening price of futures contract (c) closing spot index value (d) opening spot index value Premium Margin is levied at ________ level. (a) (b) (c) (d) client clearing member broker trading member [1 Mark] Q.54 Q.55 In the Black-Scholes Option Pricing Model, as S becomes very large, both N(d1) and N(d2) are both close to 1.0. [2 Marks] (a) (b) FALSE TRUE Q.56 To operate in the derivative segment of NSE, the dealer/broker and sales persons are required to pass _________ examination. [1 Mark] (a) (b) (c) (d) (e) Certified Financial Analyst MBA (Finance) NCFM Chartered Accountancy Not Attempted [1 Mark] Q.57 The NEAT F&O trading system ____________. (a) (b) (c) (d) allows one to enter spread trades does not allow spread trades allows only a single order placement at a time None of the above 116 Q.58 Margins levied on a member in respect of options contracts are Initial Margin,.750, Futures Contract Maturity = 1 year from date, Market Interest rate = 12% and dividend expected is 6%? [2 Marks] (a) (b) (c) (d) Rs. 795 Rs. 705 Rs. 845 None of these Q.60 117 Question No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Answers (a) (a) (b) (a) (b) (d) (a) (c) (a) (d) (b) (a) (a) (a) (b) (b) (b) (a) (a) (c) (a) (a) (a) (c) (d) (b) (a) (b) (d) (d) Question No. 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 Answers (c) (a) (b) (c) (a) (a) (d) (c) (c) (b) (c) (a) (a) (c) (b) (b) (b) (a) (b) (a) (a) (b) (a) (a) (b) (c) (a) (a) (b) (a) 118 This action might not be possible to undo. Are you sure you want to continue? We've moved you to where you read on your other device. Get the full title to continue listening from where you left off, or restart the preview.
https://www.scribd.com/doc/69843152/DMDM-rev
CC-MAIN-2016-36
refinedweb
32,231
62.78
Using the AWS Ruby SDK to Put a Drupal Site's Assets Behind a CDN by Peter Wolanin As a demo for my local Drupal meetup, I offered to show how to use an origin pull CDN to serve the static assets of a Drupal 7 site installed on Acquia Cloud. If you are not familiar with basic CDN concepts and terminology, start by reading this article on key properties of a CDN by Wim Leers. The value of using a CDN for a site's static assets is primarily a faster total page load for the end-user since once the main page HTML is loaded, the requests for images, CSS, JS, and other assets needed to fully render the page happen faster because there is a lower latency to the CDN edge server. Although Acquia Cloud customers use a variety of CDNs, CloudFront by Amazon Web Services (AWS) is an affordable CDN that supports both pull and push modes which make it a great fit for serving Drupal's static files and other content. Since I already had easy access to an AWS development account, I picked CloudFront as the CDN for the demo. Most people who need to set up CloudFront for a single site will probably want to use the AWS Console as illustrated in the CloudFront Getting Started documentation. However, I wanted to understand how to set this up in a scripted fashion, and the AWS ruby SDK is a tool I've been using recently with EC2. So, this blog post is going to end up being as much of a tutorial on using the CloudFront API via the ruby SDK as on anything else. To get started, I signed up for an Acquia Cloud free site, and then installed Acquia Drupal 7 and added my ssh key so I could manage the code: I did a git clone of the codebase and added the latest -dev versions of the Devel and CDN modules. I enabled Devel generate and CDN, and then generated some dummy content. The AWS ruby SDK seems to be the best option if you don't want to manipulate raw XML, so make sure you have it and some current version of ruby (use rvm if not). Install the latest 'aws-sdk' gem and make sure you have AWS credentials you are ready to start. I ran all the needed steps in irb. $ irb 2.1.1 :001 > require 'aws-sdk' => true 2.1.1 :002 > AWS::VERSION => "1.36.1" 2.1.1 :003 > AWS.config(:access_key_id => 'BTICJ5JI43N2UCMJ3IMF', :secret_access_key => 'UOP87B7dCYqiYCGT24KZnotArEALkeyEalBMiT3fa7ai') => <AWS::Core::Configuration> 2.1.1 :004 > cf = AWS::CloudFront.new => <AWS::CloudFront> See the top-level ruby SDK CloudFront docs. So, so far it was easy. Looking at the CloudFront client docs was the next step. After experimenting to see if the SDK filled in any defaults, it became apparent that one needs to just build up piece-by-piece a Hash with every required element. Again, this is the sort of work needed for scripting, but is managed in the UI if you are using the AWS Console. In terms of our goal of serving static assets from a Drupal site, we have to define our site as the origin server. In the data hash we define a single origin with the site domain name (I'm using "cdnmeetupdemo.example.com" in examples here). We give this origin an ID, and reference the origin's ID as the one to use in the default cache behavior entry. Here's an example of a Hash that seemed to be the minimum acceptable data for the API call (I've reformatted the big hashes so they are readable): 2.1.1 :030 > reference_string = Time.now.to_i.to_s => "1394678174" 2.1.1 :031 > dc = {:caller_reference=>reference_string, :aliases=>{:quantity=>0}, :default_root_object=>"", :price_class=>"PriceClass_100", :enabled=>true, :logging=> {:enabled=>false, :include_cookies=>false, :bucket=>"nop", :prefix=>"nop"}, :comment=>"demo distribution", :origins=> {:quantity=>1, :items=> [{:id=>"dev", :domain_name=>"cdnmeetupdemo.example.com", :custom_origin_config=> {:http_port=>80, :https_port=>443, :origin_protocol_policy=>"http-only"}}]}, :default_cache_behavior=> {:target_origin_id=>"dev", :forwarded_values=>{:query_string=>true, :cookies=>{:forward=>"none"}}, :trusted_signers=>{:items=>[], :enabled=>false, :quantity=>0}, :viewer_protocol_policy=>"allow-all", :min_ttl=>3600, }, :viewer_certificate=>{:cloud_front_default_certificate=>true}, :cache_behaviors=>{:quantity=>0}} 2.1.1 :032 > resp = cf.client.create_distribution(:distribution_config => dc).data => {:id=>"E2WPA9OXGCG31D", :status=>"InProgress", :last_modified_time=>2014-03-13 02:38:41 UTC, :in_progress_invalidation_batches=>0, :domain_name=>"d11l5pg90vjhev.cloudfront.net", :active_trusted_signers=>{:items=>[], :enabled=>false, :quantity=>0}, :distribution_config=> {:caller_reference=>"1394678174", :aliases=>{:items=>[], :quantity=>0}, :default_root_object=>nil, :origins=> {:items=> [{:id=>"dev", :domain_name=>"cdnmeetupdemo.example.com", :custom_origin_config=> {:http_port=>80, :https_port=>443, :origin_protocol_policy=>"http-only"}}], :quantity=>1}, :default_cache_behavior=> {:target_origin_id=>"dev", :forwarded_values=>{:query_string=>true, :cookies=>{:forward=>"none"}}, :trusted_signers=>{:items=>[], :enabled=>false, :quantity=>0}, :viewer_protocol_policy=>"allow-all", :min_ttl=>3600, :allowed_methods=>{:items=>["GET", "HEAD"], :quantity=>2}, :smooth_streaming=>false}, :cache_behaviors=>{:items=>[], :quantity=>0}, :custom_error_responses=>{:items=>[], :quantity=>0}, :comment=>"demo distribution", :logging=> {:enabled=>false, :include_cookies=>false, :bucket=>nil, :prefix=>nil}, :price_class=>"PriceClass_100", :enabled=>true, :viewer_certificate=>{:cloud_front_default_certificate=>true}, :restrictions=> {:geo_restriction=>{:items=>[], :restriction_type=>"none", :quantity=>0}}}, :request_id=>"967e4b4e-aa58-11e3-9a9d-9b9f4c7850ae", :location=> "", :etag=>"E121KPOFVHLWAN"} Looking at the input data, you can see I picked only a single default caching behavior. It has a 1 hour (3600 second) TTL, and it passes query strings but not cookies to the Drupal site. This make is a reasonable start for serving static assets (images, CSS, etc), but it would not support logged in users. The meaning of :price_class isn't explained in the SDK docs, so look at the pricing chart and you'll see that PriceClass_100 is the cheapest and just has edge locations in the U.S. and E.U. Some of the other settings like the :origin_protocol_policy don't seem to be documented that I can find. The allowed values of "http-only" or "match-viewer" leads me to guess that the "http-only" setting will make a http request to the origin, even if the CDN receives a https request for the asset. For this demo, I don't have a SSL certificate for the site, so that seems like the right option. Most elements of the distribution configuration are explained in the CloudFront API documentation. The one key piece of information we need from the result to configure the Drupal site is the CDN domain name: :domain_name=>"d11l5pg90vjhev.cloudfront.net". As an aside, different CDN providers use different tricks to map your location to an appropriate set of edge servers, and for CloudFront you see the response back from looking up the CDN domain name is multiple IP addresses which will be used round-robin by a browser: $ host d11l5pg90vjhev.cloudfront.net d11l5pg90vjhev.cloudfront.net has address 54.230.205.168 d11l5pg90vjhev.cloudfront.net has address 54.230.205.117 d11l5pg90vjhev.cloudfront.net has address 54.230.204.247 ... If I run the same from a remote server, I get a different result, since a different set of edge servers are considered to be "closer". # host d11l5pg90vjhev.cloudfront.net d11l5pg90vjhev.cloudfront.net has address 54.230.16.140 d11l5pg90vjhev.cloudfront.net has address 54.230.16.179 d11l5pg90vjhev.cloudfront.net has address 54.230.16.185 ... So I went to the CDN module configuration section General tab and put it into Testing mode. Then I went to the Details tab, and while the default of origin pull was right, I was stuck here until taking the advice printed in the message to install and enable the Advanced Help module. The Advanced Help provides popups (see orange boxes below) that made it clear that to configure all files to be served via one CDN, I just need to enter the CDN url into the box. In this case, I entered http:// plus the CDN host name from above. Going to the home page (still in Testing mode) as administrator I can inspect the teaser images and see that that they are now being served from the CDN. Success! Before enabling the CDN, but with Drupal page caching enabled, I tested the total page load time as an anonymous user and saw about 350-500 ms on a full refresh. This required 20 http requests total, and the static files, but not the main HTML are being cached by Varnish. Going back and setting the CDN module mode to Enabled means that anonymous users also get the images, CSS, etc. from the CDN. Trying again, a full page refresh was much faster - in the range of 200-300 ms. In both cases loading the main HTML content took 100 - 150 ms. Meaningfully benchmarking this from different endpoints would be a much bigger task, but with this simple setup, I was able to significantly improve the page load time for a stock Drupal 7 site by using the CloudFront CDN for static files. You can see in the network tab of the browser's developer tools that the static files are served from cloudfront.net Inspecting the response headers from one of the images using curl or the developer tools in the browser also lets me see that the image is cached by CloudFront: HTTP/1.1 200 OK Content-Type: image/jpeg Content-Length: 1951 Connection: keep-alive Server: nginx Last-Modified: Thu, 13 Mar 2014 17:02:56 GMT Cache-Control: max-age=1209600 Expires: Thu, 27 Mar 2014 21:45:12 GMT X-AH-Environment: dev Accept-Ranges: bytes Date: Thu, 13 Mar 2014 21:45:12 GMT X-Varnish: 550805980 Age: 4 X-Cache: Hit from cloudfront Via: 1.1 b64f1dc57c19be31a8989da60e442079.cloudfront.net (CloudFront) X-Amz-Cf-Id: aZsTan2oUCJIXawH3dhD-ENlZqyQDroJpyR2tSmjSBnravGyBT95aA== Finally, to clean up. This part goes back to a SDK tutorial, so quit here if you're not interested. You need to first disable, and then later delete the distribution. This turned out to be harder than creating the distribution in the first place. The reason being that the update call requires a full, valid distribution configuration object (there is no shortcut call to toggle the enabled state). If you look at the response to the initial create call, you can see that there is actually more data than listed in the SDK docs, and also that empty strings came back as nil. If you try to use the initial distribution configuration with :enabled set to false, the API rejects the call due to the other data elements being missing (like the allowed methods, custom error responses, and restrictions). 2.1.1 :116 > dc[:enabled] = false => false 2.1.1 :117 > cf.client.update_distribution(:id=>resp[:id], :if_match=>resp[:etag], :distribution_config => dc) AWS::CloudFront::Errors::InvalidArgument: The parameter Allowed method settings is required. So, the dc Hash was sufficient to create a distribution, but not to update it. On the other hand, If you take the response back from the API (which seems to have all the needed data) and try to use it to make an update after toggling enabled to false, it fails due to the nil values not being strings. 2.1.1 :118 > resp[:distribution_config][:enabled] = false => false 2.1.1 :119 > cf.client.update_distribution(:id=>resp[:id], :if_match=>resp[:etag], :distribution_config => resp[:distribution_config]) ArgumentError: expected string value for option :default_root_object My solution (with apologies to anyone who is actually a ruby expert) was to define a recursive function to walk through the data and convert nil to empty string.: def recursive_nil_stringify!(item) if item.is_a?(Hash) indexes = item.keys elsif item.is_a?(Array) indexes = 0...item.size elsif item.nil? return '' else return item end indexes.each { |key| item[key] = recursive_nil_stringify!(item[key]) } item end Now I was able to update the distribution configuration with :enabled set to false, and after waiting a few minutes for that change to deploy, I was able to delete it. The results below are truncated for readability. Note that after updating the distribution configuration, the :etag value changes and you have to use that new value in the final deletion call after the distribution reaches the "Deployed" status again. 2.1.1 :134 > recursive_nil_stringify!(resp[:distribution_config]) => { ... } 2.1.1 :135 > cf.client.update_distribution(:id=>resp[:id], :if_match=>resp[:etag], :distribution_config => resp[:distribution_config]) => {:id=>"E2WPA9OXGCG31D", :status=>"InProgress", ..., :etag=>"E2PNQ1Z5X5G9P0"} } 2.1.1 :136 > resp = cf.client.get_distribution(:id=>"E2WPA9OXGCG31D").data => {:id=>"E2WPA9OXGCG31D", :status=>"Deployed", ... , :etag=>"E2PNQ1Z5X5G9P0"} 2.1.1 :137 > cf.client.delete_distribution(:id => resp[:id], :if_match => resp[:etag]) => {:request_id=>"3fc8ea8b-aaf8-11e3-bf83-6b90d5cf46e4"} CloudFront continues to add new capabilities to that will make it attractive to Drupal site owners, and I'm looking forward to using it more in the future. Great post! Great post Peter! This was one of the things we weren't sure about when moving to Acquia Cloud. We've used (and frequently recommend) CDNs such as the Amazon Cloudfront one in quite a few deployments and it's really great how easily you can enable the CDN using the CDN module. We've been wondering how that would work with AC, good to know that you guys have that handled. Cheers, Alberto Add new comment
http://www.acquia.com/blog/using-aws-ruby-sdk-put-drupal-sites-assets-behind-cdn
CC-MAIN-2015-06
refinedweb
2,155
53.51
You're reading the documentation for a development version. For the latest released version, please have a look at Foxy. ROS 2 Bouncy Bolson (codename ‘bouncy’; June 2018)¶ Table of Contents Bouncy Bolson is the second release of ROS 2. Supported Platforms¶ This version of ROS 2 is supported on four platforms (see REP 2000 for full details): Ubuntu 18.04 (Bionic) Debian packages for amd64 as well as arm64 Ubuntu 16.04 (Xenial) no Debian packages but building from source is supported Mac macOS 10.12 (Sierra) Windows 10 with Visual Studio 2017 Binary packages as well as instructions for how to compile from source are provided (see install instructions as well as documentation). Features¶ New features in this ROS 2 release¶ New launch system featuring a much more capable and flexible Python API. Parameters can be passed as command line arguments to C++ executables. Static remapping via command line arguments. Various improvements to the Python client library. Support for publishing and subscribing to serialized data. This is the foundation for the upcoming work towards a native rosbag implementation. More command line tools, e.g. for working with parameters and lifecycle states. Binary packages / fat archives support three RMW implementations by default (without the need to build from source): eProsima’s Fast RTPS (default) RTI’s Connext ADLINK’s OpenSplice For an overview of all features available, including those from earlier releases, please see the Features page. Changes since the Ardent release¶ Changes since the Ardent Apalone release: The Python package launchhas been redesigned. The previous Python API has been moved into a submodule launch.legacy. You can update existing launch files to continue to use the legacy API if a transition to the new Python API is not desired. The ROS topic names containing namespaces are mapped to DDS topics including their namespaces. DDS partitions are not being used anymore for this. The recommended build tool is now colconinstead of ament_tools. This switch has no implications for the code in each ROS 2 package. The install instructions have been updated and the read-the-docs page describes how to map an existing ament_toolscall to colcon. The argument order of this rclcpp::Node::create_subscription() signature has been modified. Known Issues¶ New-style launch files may hang on shutdown for some combinations of platform and RMW implementation. Static remapping of namespaces not working correctly when addressed to a particular node. Opensplice error messages may be printed when using ros2 paramand ros2 lifecyclecommand-line tools.
https://docs.ros.org/en/rolling/Releases/Release-Bouncy-Bolson.html
CC-MAIN-2021-17
refinedweb
414
56.96
> j3dme-0.3.0.rar > Camera.java /* * J3DME Fast 3D software rendering for small devices * Copyright (C) 2001 Onno Homm net.jscience.j3dme; /** * This class allows you to define camera objects in the * virtual world. You can define multiple cameras and place them * into the same world. A camera must be linked to the view port * in order to have the renderer display what its visible in the world. * The Viewport class will provide the details for the connection. */ public class Camera{ /** * The x component of the camera location in the world */ public int x; /** * The y component of the camera location in the world */ public int y; /** * The z component of the camera location in the world */ public int z; /** * The pitch orientation of the camera */ public int pitch; /** * The yaw orientation of the camera */ public int yaw; /** * The roll orientation of the camera */ public int roll; /** * The field of view sets how many pixels (left to right) * are visible */ public int fieldOfView; private World world; protected int[] x_tfx; protected int[] y_tfx; protected int[] z_tfx; private Coordinate c = new Coordinate(); private int vx,vy,vz; protected int visibility_mask; protected int[] surface_masks; /** * Constructs a Camera object * Construct a camera in the provided world with a field of view of * fov. The field of view is expressed in the number of pixels that * are visible on the view plane. * * @param w The virtual world seen by the camera * @param fov The field of view in pixels * @return A Camera object in world w with a fov. */ public Camera(World w, int fov){ // Init Camera location x = 0;y = 0;z = 0; // Init Camera Orientation pitch = 0;yaw = 0;roll = 0; // Link Camera to virtual world world = w; // Set Field Of View fieldOfView = fov << 8; // Set maxium coordinates x_tfx = new int[128]; y_tfx = new int[128]; z_tfx = new int[128]; // Align camera model and surface visibility with the World visibility_mask = 0; surface_masks= new int[32]; } /** * Returns the world visible through the camera * * @return A World object. */ public World getWorld(){ return world; } /** * Determines if a model is visible in the Camera FOV * Calculates if the provided model is visible in the * field of view (FOV) of the camera. The method returns * true if the model is visible and false if the model * is not in view or to small to be seen. * * @return Is model visible or not. */ public boolean inView(Model model){ c.x = model.x - x; c.y = model.y - y; c.z = model.z - z; c.setRotation(pitch,yaw,roll); c.rotate(); int scale = fieldOfView / c.getDistance(); if (scale == 0) return false; // Too small Geometry geometry = model.getGeometry(); int radius = geometry.getBoundingRadius(); if ((c.z + radius) < 0) return false; // Behind the camera if (((Math.max(Math.abs(c.x), Math.abs(c.y))-radius)*scale) > fieldOfView >> 1) return false; // out of view // Record the view vector vx = c.x; vy = c.y; vz = c.z; return true; // In view } /** * Returns the visible world coordinate transformations * This method captures the scene as visible through the current * camera object. The camera will return a transformation matrix * with all the visible model coordinates. * * @return The transformation matrix in a int array. */ public void captureScene(){ Model model; Geometry geom; int offset = 0; int num = world.getNumberOfModels(); // Process Models in world for(int i= 0;i * This method uses a quick perceived distance instead of the actual * mathematcial distance. * * @param model The model to determine approx. distance to. * @return The approximate model distance from camera */ public int getModelDistance(Model m){ c.x = x - m.x; c.y = y - m.y; c.z = z - m.z; return c.getDistance(); } }
http://read.pudn.com/downloads9/sourcecode/comm/35214/j3dme-0.3.0/j3dme-engine/src/net/jscience/j3dme/Camera.java__.htm
crawl-002
refinedweb
603
55.64
Created on 2015-10-16 11:16 by martin.panter, last changed 2016-05-25 08:03 by martin.panter. As mentioned in Issue 25209, here is a patch to complete module and attribute names in import statements. This is a rewrite of some personal code I have had kicking around for a few years, but I have added extra features (parsing “import x as alias”, supporting “from .relative import x”). All the existing completions should continue to work as long as the statement immediately preceding the cursor does not look like an “import” statement. When an import statement is detected, these other completions are disabled. When alternative completions are displayed, my code appends a dot (.) indicator to package names, but this is not inserted in the input line. Maybe people think this is a good idea or maybe not. This illustrates what it looks like in action. Text in square brackets was automatically completed: Python 3.6.0a0 (qbase qtip readline/complete-import.patch tip:65d2b721034a, Oct 16 2015, 10:02:3) [GCC 5.1.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import io, h<Tab><Tab> hashlib heapq hmac html. http. >>> import io, htm[l].<Tab><Tab> html.entities html.parser >>> import io, html.e[ntities] >>> from html import e<Tab><Tab> entities escape >>> from html import es[cape] The code works around Issue 16182 (byte vs code point indexing) in a very simplistic way. It probably won’t give useful completions (if any) for non-ASCII input involving imports. The patch currently does not complete built-in module names (sys.builtin_module_names). This should not be hard to add, but I need to decide whether the support should be added specially in rlcompleter, or generally in pkgutil.iter_modules() instead. I also have code to complete the following, which I could try to make patches for if there is interest: * keyword argument names to function calls, e.g. open("file", enc[oding=] * attributes on constructor return types, e.g. ValueError("msg").__t[raceback__] I'm reviewing the patch, but it will take a time. Wouldn't be simpler to use regular expressions instead of tokenizer? For now Completer doesn't depends on the readline module, nor other global state. It can be used for completing in other environment, for example to complete words in IDE. Patched Completer retrieves additional information from the readline module. This can break existing code. It would be nice to decouple Completer from readline. In contrary to user .pythonrc.py file, we are free to invent new interfaces. May be add methods to the Completer class that provides needed additional information (nothing by default), and add Completer's subclass ReadlineCompleter that implements these methods using readline? Found presumable bugs: "import sy" doesn't suggest completion "sys". "import os.p" doesn't suggest completion "os.path". Is there a reason ipython's import completer couldn't be borrowed in its entirety? At work, I use a lightly adapted version of the code from ipython to do completion when I'm using the plain interactive interpreter (for whatever reason), and it works just fine. Josh: Thanks for pointing out I Python. I haven’t used it much myself, but it does seem to do a similar thing to my proposal. Looks like the relevant code may be around module_completion() at <>. The “sys” module is one of the builtin modules that I mentioned above. I plan to discuss changing pkgutil.iter_modules() to include it, in a separate bug report. The “os.path” case is more awkward. The “os” module is not actually a package. I believe “import os.path” only works because executing the “os” module modifies sys.modules. My code currently avoids importing non-packages, because I thought it would be annoying to accidentally run a script via tab completion (anything not protected by ‘if __name__ == "__main__" ’). On the other hand, I Python happily completes “os.path” (and many more non-submodule names). It also can be tricked into running scripts, e.g. if you do “import idlelib.__main__.” and press Tab. But maybe this is not a real problem, and I should stop being paranoid. I tend to avoid regular expressions if practical. But Serhiy you may be right that some simple string matching rules would reduce the need for tokenizing. It looks like I Python only has a few simple rules for the entire input line being “import x” and “from x import y”. The disadvantage is less accurate understanding of more complicated syntax, like “from x import y; from z import (a, bb as b, . . .”. It is a tradeoff between simpler code that only supports basic functionality versus complex code that supports more complete functionality. I hear your points about decoupling from Readline and backwards compatibility. I will consider the overall architecture more in a future update. It would be good to allow this stuff to be used in e.g. Idle (though I wouldn’t know where to wire it in myself). Added few cursory comments on Rietveld. "sys" and "os.path" cases are not critical and we can ignore them if it complicates the code. But preserving Completer independence from readline looks more important to me. We can just add methods get_line_buffer(), get_begidx(), get_endidx() and get_completion_type() to Completer, but may be better to add more high level methods. I moved all the calls targetting the readline module into a ReadlineCompleter subclass. However the logic for parsing “import” statements still exists in the base Completer class in private methods. An overview of the two classes: class Completer: def complete(self, text, state): self._get_matches(text) def _get_matches(text): # Only completes global and object.attr names, like before def _code_matches(self, code, ...): # Completes import statements, otherwise returns (None, ...) class ReadlineCompleter(Completer): # New public class def complete(self, text, state): # Moved Yury’s Tab insertion logic here return super().complete(...) def _get_matches(text): code = readline.get_line_buffer()[:readline.get_endidx()] self._code_matches(code) super()._get_matches(text) # Fallback to existing behaviour Perhaps the _code_matches() and related methods could be turned into more general public APIs, e.g. complete_code(code) -> list of modules, attributes, globals, etc. But that would affect global_matches() and attr_matches(), which I have not touched so far. Other changes: * Limit underscore-prefixed completions, consistent with Issue 25011; see new _filter_identifiers() method * Changed the demo in the documentation; attributes like __doc__ are omitted by default * Removed workaround for non-ASCII input in favour of fixing Issue 16182
https://bugs.python.org/issue25419
CC-MAIN-2019-43
refinedweb
1,075
59.09
In this tutorial, we are going to learn how to read a file in Python 3. After we have learned how to open a file in Python, we are going to learn how to write to the file and save it again. In previous posts, we have learned how to open a range of different files using Python. For instance, we have learned how to open JSON, CSV, Excel, and HTML files using Pandas, and the json library. Here, however, we are going to open plain files (.txt) in Python. Prerequisites For this how to read a file in Python tutorial, we need to have Python 3 installed. One of the easiest ways to install Python is to download a Python distribution, such as Anaconda, ActivePython, or Enthought Canopy, to name a few. Here’s a YouTube tutorial on how to install Anaconda. Reading Files in Python Now, when we are working with Python, there is no need to import a library in order to read and write files. Reading and writing files, in Python, is handled natively in the language. In this post, we will, thus, focus on using Python to open a file and we will use the built-in open function to get a file object. Python’s File Object Now, when we are using Python’s open function, it will return something known as a file object. These objects will contain methods and attributes that we can use to gather information about the file we have opened (much like we’ve learned when using Pandas dataframe objects, for instance). One neat thing, of course, is that we can use these methods to change the file that we have opened using Python. In this Python read from a file tutorial, we are going to work with the mode attribute. This attribute will tell us which mode the file we have opened, using Python, is in. Furthermore, the name attribute will give us the name of the file we have opened in Python (i.e., the name of the file object). How do You Read a File in Python? Opening, and reading, a file in Python is easy: we just type ourfile = open('PATH_TO_FILE') and then ourfile.read(). What Does read() Return in Python? Now, if we open a file in Python the read() return a Python string object. How to Read a File in Python using the open() function In this section, we are going to learn how to load a file in Python using the open() function. In it’s simplest example, open() will open a file and create a file object. As can be seen, in the image above, there are a couple of arguments that can be used, however, when opening a file using Pythons open() function. The most commonly used arguments, however, are the first two. Note, the first is mandatory and the rest of them are optional. If we don’t add a mode, the file will be opened in read-only mode in Python. Using the mode argument when reading files in Python In this section, of the post on how to read a file in Python, we will go through the different modes in which we can read a file. As previously mentioned, if we don’t pass anything with the mode argument the file will be written in read-only. In this reading files in Python tutorial, we are going to work with the following modes: That is, we can open a file in read-only, write, append, and read and write mode. If we use append (‘a’) we will append information at the end of that file. A Simple Read a File in Python Example Now, we are going to read a file in Python using only the file name as an argument. As evident, in the code example below, open() takes a string with the file path as input. In this reading a file in Python example, it is assumed that the example file is in the same directory as the Python script. Or in this case, the Jupyter notebook. exfile = open('example_file') print(exfile) In the image, above, it becomes evident that we have a file object that we have opened in read-only mode. To iterate what we did, we opened up the text file (example_file.txt) without any other arguments. This, in turn, leads to that the file was opened in the read mode. Thus, we cannot write to that file. If we want to print the name of the file we can just type print(exfile.name). Creating a Text file and Writing to the File using Python In the next how to read a file in Python example, we are going to create a file using Python open(). Now, we are going to use open with the write mode. That is, we are going to open a file object and then use the file objects write method. exfile = open('example_file2', 'w') print(exfile) Now, in the image above, we can see that we have a file object in write mode (‘w’). In the next code chunk, we are going to add one line of text to this file: exfile.write('This is example file 2 \n') If we want to, we can, of course, add more lines by using the write method again: exfile.write('Line number 2, in example file 2') exfile.close() Note, how we closed the file using close() in the last line above. In the image, below, we can see the example file we have created with Python. How to Read a Text File in Python using open() In the next Python read a file example, we will learn how to open a text (.txt) file in Python. This is, of course, simple and we have basically already the knowledge on how to do this with Python. That is if we just want to read the .txt file in Python we can use open and the read mode: txtfile = open('example_file.txt') Opening a File in Python: read() Example: This was simple. Now, if we want to print the content of the text file we have three options. First, we can use the read() method. This Python method will read the entire file. That is, txtfile.read() will give us the following output: Reading a File to a Python list: readlines() Example: If we, on the other hand, want to read the content from a file to a Python list, we can use the readlines() method. That is if we want to read the text file into a list we type: txtfile = open('example_file.txt') print(txtfile.readlines()) Furthermore, we can also use the sizehint argument. This enables us to get certain lines. For example, the following code will read the two first lines, into two different string variables, and print it: txtfile = open('example_file.txt') line = txtfile.readlines(1) print(line) line2 = txtfile.readlines(2) print(line2) Finally, when we have opened a file in Python we can also loop through the content and print line by line: txtfile = open('example_file.txt') for line in txtfile: print(line) Reading a File in Python and Appending Content to It In the next example, we are going to read a file in Python and append information to the file. More specifically, we are going to load a .txt file using Python and append some data to it. Again, we start by opening the file in Python using open() but using the append mode: .. open('example_file2.txt', 'a') Next, we are going to add content to this using write(), again. txtfile.write('\n More text here.') When appending text, in Windows 10 at least, we have to add the \n before the line or else this line will be appended next to the last character (on the last line, of the file). If we are to add more lines, we have to remember to do this as well; txtfile.write(‘\nLast line of text, I promise.) txtfile.close() Finally, we can open the text file using a text editor (e.g., Notepad, Gedit) and we’ll see the last two lines that we’ve added: How to Read a file in Python using the with Statement In the next how to open a file in Python example, we are going to read a file using the with statement. This has the advantage that we don’t have to remember to close the file and the syntax for using the with statement is clean to read: with open('example_file2.txt') as txtfile2: print(txtfile2.read()) Now, if we try to use the read() method Python will throw a ValueError: txtfile2.read() Splitting Words in File and Counting Words As final reading a file in Python example, we are going to use the string split() method to split the sentences in the text file into words. When we have read the file and split the words, we are going to use the Counter subclass from collections to use Python to count words in an opened file. from collections import Counter with open('example_file2.txt') as txtfile2: wordcount = Counter(txtfile2.read().split()) print(len(wordcount)) # Output: 43 Counting Words in Python Now, the Counter subclass is giving us a dictionary that contains all words and occurrences of each word. Thus, we can print all words and their count like this: for k in sorted(wordcount, key=wordcount.get, reverse=True): print(k, wordcount[k]) In the code example above, we are looping through the keys in the dictionary and sort them. This way, we get the most common words on top. Of course, reading a file with many words, using Python, and printing the result like this is not feasible. If we have the need it is, of course, also possible to rename a file (or multiple files) in Python using the os.rename() method. Reading other File Formats in Python Now, we have learned how to load a file in Python, and we will briefly discuss other file formats that Python can handle. Python can, of course, open a wide range of different file formats. In previous posts, we have used the json library to parse JSON files in Python, for instance. Furthermore, we have also learned how to read csv files in Python using Pandas, open Excel files with Pandas, among other file formats that are common for storing data. - See here for some examples of file formats Python can read. Conclusion: Reading & Writing Files in Python In this tutorial, we have learned the basics of how to open files in Python. More specifically, we have learned how to read a file in different modes, create and write to a file, append data to a file, and how to read a file in Python using the with statement. In future posts, we will learn more about how to read other file formats using Python (e.g., CSV, Excel). Drop a comment below if you need anything covered in this or a future blog, and stay tuned!
https://www.marsja.se/how-to-read-a-file-in-python-write-to-and-append-to-a-file/
CC-MAIN-2020-24
refinedweb
1,845
79.4
package jdiff; import java.io.*; import java.util.*; /** A class to compare vectors of objects. The result of comparison is a list of <code>change</code> objects which form an edit script. The objects compared are traditionally lines of text from two files. Comparison options such as "ignore whitespace" are implemented by modifying the <code>equals</code> and <code>hashcode</code> methods for the objects compared. <p> The basic algorithm is described in: </br> "An O(ND) Difference Algorithm and its Variations", Eugene Myers, Algorithmica Vol. 1 No. 2, 1986, p 251. <p> <p> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. <p> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. <p> You should have received a copy of the <a href=COPYING.txt> GNU General Public License</a> along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ public class DiffMyers { /** Prepare to find differences between two arrays. Each element of the arrays is translated to an "equivalence number" based on the result of <code>equals</code>. The original Object arrays are no longer needed for computing the differences. They will be needed again later to print the results of the comparison as an edit script, if desired. */ public DiffMyers]); } /** Scan the tables of which lines are inserted and deleted, producing an edit script in reverse order. */ private change build_reverse_script() { change script = null; final boolean[] changed0 = filevec[0].changed_flag; final boolean[] changed1 = filevec[1].changed_flag; final int len0 = filevec[0].buffered_lines; final int len1 = filevec[1].buffered_lines; /* Note that changedN[len0] does exist, and contains 0. */; } /** Scan the tables of which lines are inserted and deleted, producing an edit script in forward order. */ private change build_script() { change script = null; final boolean[] changed0 = filevec[0].changed_flag; final boolean[] changed1 = filevec[1].changed_flag; final int len0 = filevec[0].buffered_lines; final int len1 = filevec[1].buffered_lines; int i0 = len0, i1 = len1; /* Note that changedN[-1] does exist, and contains 0. */; } /* Report the differences of two files. DEPTH is the current directory depth. */ public change diff_2(final boolean reverse) { /*. */ if (reverse) return build_reverse_script(); else return build_script(); } /** The result of comparison is an "edit script": a chain of change objects. Each change represents one place where some lines are deleted and some are inserted.. */ public static class change { /** Previous or next edit command. */ public change link; /** # lines of file 1 changed here. */ public int inserted; /** # lines of file 0 changed here. */ public int deleted; /** Line number of 1st deleted line. */ public final int line0; /** Line number of 1st inserted line. */ public final int line1; /**. */. <p>; } }
http://www.java2s.com/Open-Source/Java/Source-Control/jdiff/jdiff/DiffMyers.java.htm
CC-MAIN-2013-48
refinedweb
492
68.26
Distributed Java Programming with RMI and CORBA Distributed Java Programming with RMI and CORBA Qusay H. Mahmoud January 2002 The Java Remote Method Invocation (RMI) mechanism and the Common Object Request Broker Architecture (CORBA) are the two most important and widely used distributed object systems. Each system has its own features and shortcomings. Both are being used in the industry for various applications ranging from e-commerce to health care. Selecting which of these two distribution mechanisms to use for a project is a tough task. This article presents an overview of RMI and CORBA, and more importantly it shows how to develop a useful application for downloading files from remote hosts. It then: - Presents a brief overview of distributed object systems - Provides a brief overview of RMI and CORBA - Gives you a flavor of the effort involved in developing applications in RMI and CORBA - Shows how to transfer files from remote machines using RMI and CORBA - Provides a brief comparison of RMI and CORBA The Client/Server Model The client/server model is a form of distributed computing in which one program (the client) communicates with another program (the server) for the purpose of exchanging information. In this model, both the client and server usually speak the same language -- a protocol that both the client and server understand -- so they are able to communicate. While the client/server model can be implemented in various ways, it is typically done using low-level sockets. Using sockets to develop client/server systems means that we must design a protocol, which is a set of commands agreed upon by the client and server through which they will be able to communicate. As an example, consider the HTTP protocol that provides a method called GET, which must be implemented by all web servers and used by web clients (browsers) in order to retrieve documents. The Distributed Objects Model A distributed object-based system is a collection of objects that isolates the requesters of services (clients) from the providers of services (servers) by a well-defined encapsulating interface. In other words, clients are isolated from the implementation of services as data representations and executable code. This is one of the main differences that distinguishes the distributed object-based model from the pure client/server model. In the distributed object-based model, a client sends a message to an object, which in turns interprets the message to decide what service to perform. This service, or method, selection could be performed by either the object or a broker. The Java Remote Method Invocation (RMI) and the Common Object Request Broker Architecture (CORBA) are examples of this model. RMI RMI is a distributed object system that enables you to easily develop distributed Java applications. Developing distributed applications in RMI is simpler than developing with sockets since there is no need to design a protocol, which is an error-prone task. In RMI, the developer has the illusion of calling a local method from a local class file, when in fact the arguments are shipped to the remote target and interpreted, and the results are sent back to the callers. The Genesis of an RMI Application Developing a distributed application using RMI involves the following steps: - Define a remote interface - Implement the remote interface - Develop the server - Develop a client - Generate Stubs and Skeletons, start the RMI registry, server, and client We will now examine these steps through the development of a file transfer application. Example: File Transfer Application This application allows a client to transfer (or download) any type of file (plain text or binary) from a remote machine. The first step is to define a remote interface that specifies the signatures of the methods to be provided by the server and invoked by clients. Define a remote interface The remote interface for the file download application is shown in Code Sample 1. The interface FileInterface provides one method downloadFile that takes a String argument (the name of the file) and returns the data of the file as an array of bytes. Code Sample 1: FileInterface.java import java.rmi.Remote; import java.rmi.RemoteException; public interface FileInterface extends Remote { public byte[] downloadFile(String fileName) throws RemoteException; } Note the following characteristics about the FileInterface: - It must be declared public, in order for clients to be able to load remote objects which implement the remote interface. - It must extend the Remoteinterface, to fulfill the requirement for making the object a remote one. - Each method in the interface must throw a java.rmi.RemoteException. Implement the remote interface The next step is to implement the interface FileInterface. A sample implementation is shown in Code Sample 2. Note that in addition to implementing the FileInterface, the FileImpl class is extending the UnicastRemoteObject. This indicates that the FileImpl class is used to create a single, non-replicated, remote object that uses RMI's default TCP-based transport for communication.: - Create an instance of the RMISecurityManagerand install it - Create an instance of the remote object ( FileImplin this case) - Register the object created with the RMI registry. A sample implementation is shown in Code Sample 3.(); } } } The statement Naming.rebind("//127.0.0.1/FileServer", fi) assumes that the RMI registry is running on the default port number, which is 1099. However, if you run the RMI registry on a different port number it must be specified in that statement. For example, if the RMI registry is running on port 4500, then the statement becomes: Naming.rebind("//127.0.0.1:4500/FileServer", fi) Also, it is important to note here that we assume the rmi registry and the server will be running on the same machine. If they are not, then simply change the address in the rebind method. Develop a client The next step is to develop a client. The client remotely invokes any methods specified in the remote interface ( FileInterface). To do so however, the client must first obtain a reference to the remote object from the RMI registry. Once a reference is obtained, the downloadFile method is invoked. A client implementation is shown in Code Sample 4. In this implementation, the client accepts two arguments at the command line: the first one is the name of the file to be downloaded and the second one is the address of the machine from which the file is to be downloaded, which is the machine that is running the file server. Code Sample 4: FileClient.java). Finally, it is time to start the RMI registry and run the server and client. To start the RMI registry on the default port number, use the command rmiregistry or start rmiregistry on Windows. To start the RMI registry on a different port number, provide the port number as an argument to the RMI registry: prompt> rmiregistry portNumber Once the RMI registry is running, you can start the server FileServer. However, since the RMI security manager is being used in the server application, you need a security policy to go with it. Here is a sample security policy: grant { permission java.security.AllPermission "", ""; }; Note: this is just a sample policy. It allows anyone to do anything. For your mission critical applications, you need to specify more constraint security policies. Now, in order to start the server you need a copy of all the classes (including stubs and skeletons) except the client class ( FileClient.class). To start the server use the following command, assuming that the security policy is in a file named policy.txt: prompt> java -Djava.security.policy=policy.txt FileServer To start the client on a different machine, you need a copy of the remote interface ( FileInterface.class) and stub ( FileImpl_Stub.class). To start the client use the command: prompt> java FileClient fileName machineName where fileName is the file to be downloaded and machineName is the machine where the file is located (the same machine runs the file server). If everything goes ok then the client exists and the file downloaded is on the local machine. To run the client we mentioned that you need a copy of the interface and stub. A more appropriate way to do this is to use RMI dynamic class loading. The idea is you do not need copies of the interface and the stub. Instead, they can be located in a shared directory for the server and the client, and whenever a stub or a skeleton is needed, it is downloaded automatically by the RMI class loader. To do this you run the client, for example, using the following command: java -Djava.rmi.server.codebase= FileClient fileName machineName. For more information on this, please see Dynamic Code Loading using RMI. CORBA The Common Object Request Broker Architecture (or CORBA) is an industry standard developed by the Object Management Group (OMG) to aid in distributed objects programming. It is important to note that CORBA is simply a specification. A CORBA implementation is known as an ORB (or Object Request Broker). There are several CORBA implementations available on the market such as VisiBroker, ORBIX, and others. JavaIDL is another implementation that comes as a core package with the JDK1.3 or above. CORBA was designed to be platform and language independent. Therefore, CORBA objects can run on any platform, located anywhere on the network, and can be written in any language that has Interface Definition Language (IDL) mappings. Similar to RMI, CORBA objects are specified with interfaces. Interfaces in CORBA, however, are specified in IDL. While IDL is similar to C++, it is important to note that IDL is not a programming language. For a detailed introduction to CORBA, please see Distributed Programming with Java: Chapter 11 (Overview of CORBA). The Genesis of a CORBA Application There are a number of steps involved in developing CORBA applications. These are: - Define an interface in IDL - Map the IDL interface to Java (done automatically) - Implement the interface - Develop the server - Develop a client - Run the naming service, the server, and the client. We now explain each step by walking you through the development of a CORBA-based file transfer application, which is similar to the RMI application we developed earlier in this article. Here we will be using the JavaIDL, which is a core package of JDK1.3+. Define the Interface When defining a CORBA interface, think about the type of operations that the server will support. In the file transfer application, the client will invoke a method to download a file. Code Sample 5 shows the interface for FileInterface. Data is a new type introduced using the typedef keyword. A sequence in IDL is similar to an array except that a sequence does not have a fixed size. An octet is an 8-bit quantity that is equivalent to the Java type byte. Note that the downloadFile method takes one parameter of type string that is declared in. IDL defines three parameter-passing modes: in (for input from client to server), out (for output from server to client), and inout (used for both input and output). Code Sample 5: FileInterface.idl interface FileInterface { typedef sequence<octet> Data; Data downloadFile(in string fileName); }; Once you finish defining the IDL interface, you are ready to compile it. The JDK1.3+ comes with the idlj compiler, which is used to map IDL definitions into Java declarations and statements. The idlj compiler accepts options that allow you to specify if you wish to generate client stubs, server skeletons, or both. The -f<side> option is used to specify what to generate. The side can be client, server, or all for client stubs and server skeletons. In this example, since the application will be running on two separate machines, the -fserver option is used on the server side, and the -fclient option is used on the client side.. Implement the interface Now, we provide an implementation to the downloadFile method. This implementation is known as a servant, and as you can see from Code Sample 6, the class FileServant extends the _FileInterfaceImplBase class to specify that this servant is a CORBA object.); } } Develop the server The next step is developing the CORBA server. The FileServer class, shown in Code Sample 7, implements a CORBA server that does the following: - Initializes the ORB - Creates a FileServant object - Registers the object in the CORBA Naming Service (COS Naming) - Prints a status message - Waits for incoming client requests); } } } Once the FileServer has an ORB, it can register the CORBA service. It uses the COS Naming Service specified by OMG and implemented by Java IDL to do the registration. It starts by getting a reference to the root of the naming service. This returns a generic CORBA object. To use it as a NamingContext object, it must be narrowed down (in other words, casted) to its proper type, and this is done using the statement: NamingContext ncRef = NamingContextHelper.narrow(objRef); The ncRef object is now an org.omg.CosNaming.NamingContext. You can use it to register a CORBA service with the naming service using the rebind method. Develop a client The next step is to develop a client. An implementation is shown in Code Sample 8. Once a reference to the naming service has been obtained, it can be used to access the naming service and find other services (for example the FileTransfer service). When the FileTransfer service is found, the downloadFile method is invoked.: - Running the the CORBA naming service. This can be done using the command tnameserv. By default, it runs on port 900. If you cannot run the naming service on this port, then you can start it on another port. To start it on port 2500, for example, use the following command: prompt> tnameserv -ORBinitialPort 2500 - Start the server. This can be done as follows, assuming that the naming service is running on the default port number: prompt> java FileServer If the naming service is running on a different port number, say 2500, then you need to specify the port using the ORBInitialPortoption as follows: prompt> java FileServer -ORBInitialPort 2500 - Generate Stubs for the client. Before we can run the client, we need to generate stubs for the client. To do that, get a copy of the FileInterface.idlfile and compile it using the idlj compiler specifying that you wish to generate client-side stubs, as follows: prompt> idlj -fclient FileInterface.idl - Run the client. Now you can run the client using the following command, assuming that the naming service is running on port 2500. prompt> java FileClient hello.txt -ORBInitialPort 2500 Where hello.txt is the file we wish to download from the server. Note: if the naming service is running on a different host, then use the -ORBInitialHostoption to specify where it is running. For example, if the naming service is running on port number 4500 on a host with the name gosling, then you start the client as follows: prompt> java FileClient hello.txt -ORBInitialHost gosling -ORBInitialPort 4500 Alternatively, these options can be specified at the code level using properties. So instead of initializing the ORB as: ORB orb = ORB.init(argv, null); It can be initialized specifying that the CORBA server machine (called gosling) and the naming service's port number (to be 2500) as follows: Properties props = new Properties(); props.put("org.omg.CORBA.ORBInitialHost", "gosling"); props.put("orb.omg.CORBA.ORBInitialPort", "2500"); ORB orb = ORB.init(args, props); Exercise In the file transfer application, the client (in both cases RMI and CORBA) needs to know the name of the file to be downloaded in advance. No methods are provided to list the files available on the server. As an exercise, you may want to enhance the application by adding another method that lists the files available on the server. Also, instead of using a command-line client you may want to develop a GUI-based client. When the client starts up, it invokes a method on the server to get a list of files then pops up a menu displaying the files available where the user would be able to select one or more files to be downloaded as shown in Figure 1. Figure 1: GUI-based File Transfer Client CORBA vs. RMI Code-wise, it is clear that RMI is simpler to work with since the Java developer does not need to be familiar with the Interface Definition Language (IDL). In general, however, CORBA differs from RMI in the following areas: - CORBA interfaces are defined in IDL and RMI interfaces are defined in Java. RMI-IIOP allows you to write all interfaces in Java (see RMI-IIOP). - CORBA supports inand outparameters, while RMI does not since local objects are passed by copy and remote objects are passed by reference. - CORBA was designed with language independence in mind. This means that some of the objects can be written in Java, for example, and other objects can be written in C++ and yet they all can interoperate. Therefore, CORBA is an ideal mechanism for bridging islands between different programming languages. On the other hand, RMI was designed for a single language where all objects are written in Java. Note however, with RMI-IIOP it is possible to achieve interoperability. - CORBA objects are not garbage collected. As we mentioned, CORBA is language independent and some languages (C++ for example) does not support garbage collection. This can be considered a disadvantage since once a CORBA object is created, it continues to exist until you get rid of it, and deciding when to get rid of an object is not a trivial task. On the other hand, RMI objects are garbage collected automatically. Conclusion Developing distributed object-based applications can be done in Java using RMI or JavaIDL (an implementation of CORBA). The use of both technologies is similar since the first step is to define an interface for the object. Unlike RMI, however, where interfaces are defined in Java, CORBA interfaces are defined in the Interface Definition Language (IDL). This, however, adds another layer of complexity where the developer needs to be familiar with IDL, and equally important, its mapping to Java. Making a selection between these two distribution mechanisms really depends on the project at hand and its requirements. I hope this article has provided you with enough information to get started developing distributed object-based applications and enough guidance to help you select a distribution mechanism.
http://blog.csdn.net/CanFly/article/details/13439
CC-MAIN-2018-09
refinedweb
3,056
53
Digital Clock RTC With LED Display of 4 Digits and 7 Segments Introduction: Digital Clock RTC With LED Display of 4 Digits and 7 Segments. Note: Code updated to revision V1.3 in Oct.2017 - Introduction of the colon (double dot) flicking in the hours. - Introduction of brightness control in the code.. Display CC (FYQ-5642AX/)? Hello, Sorry for my delay to answer you and thank you for your question. This information was missing and I will update it on Instructables. The display is CA as you can see in the image below. The code number of display is just for reference but you can use another similar one. Regards, Luís Antonio thanks for great instructable in my case dots are not working ...whats the problem? Shivam gautam, Probably the LED display is not exactly the same of this project. You need to check the electrical diagram of your display and try to identify what pin controls the colon / dots. Please provide straight forward circuit diagram of the project and how to get following libraries " What if i using 4 one digit 7segment display? You can do it replicating same wiring connections of 4 digits 7 segment display. technical question : no way to change the 8 protection resistances with only 4 connected to commun anode pins ? Good question! I had this concern too! When you make some electronic circuit you must know all technical limitations of the components you are using and the basis of these information are in their datasheets. In my project, all segments of LED display are limited by their maximum current and so they are protected by individual resistors. If you connect the resistors only to common pins, you need to consider the maximum current when all 7 segments will be on. In this case it can works well with only 1 resistor, but the brightness of that segment will be lower. Another point you need to consider is the limit of each port of -595- shift register. I want ask if it's possible to add simple if routine that verify if the hour decimal number is 0 (B01111110) then he no display it ... make it ... too easy ... : if (dezenaHora != 0) { digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, LSBFIRST, 8); //Set DISPLAY 1 (top view from left to right) shiftOut(dataPin, clockPin, LSBFIRST, ~num[dezenaHora]); //Set the Hour (ten) digitalWrite(latchPin, HIGH); } I think I love arduino :) The power of the Arduino comes from the code you make. ;-) Hello I sucess (with difficulty) to run this beautiful clock ... I would like to make some light changes on the code: 1- add two pushbuttons to manually change hours and minutes 2- use a variable resistance (photoresist type) in order to decrease the luminosity automatically in the absence of light 3- I also want to modify the display time delay ... I would like it to be much longer than the delay to display of temperature and humidity ... If you can help me ... I start under arduino Thank you Hello, Esloch, Congratulations! Great job and thanks for sharing!! Related to your questions: 1- I have published here another projects using push buttons. Take a look on them to understand the electrical connections and the associated Arduino's code. Question 2 and 3 are correlated due to the design of this clock. The following statements control the duration of each feature being shown. If you want less brightness in the LEDs, try add a delay statement inside the "whille" loop and change the time of delay and check the results of brightness in the display: ti = millis(); // Initial time for the Timer of Hour/Time while ((millis() - ti) < 3000) { //Timer of 3 seconds to show the Hour delay(50); //Change this value to define the range of brightness you want hora = hour(); minuto = minute(); .... One way to automatize this process is to use an analog port to read the LDR and convert it to a variable range to be used into delay function, like this example: while ((millis() - ti) < 3000) { //Timer of 3 seconds to show the Hour int val =analogRead(0); //Port 0 to read the LDR val =map(val,0,1023,0,100); delay (val); hora = hour(); minuto = minute(); ... Note: Increasing the time delay, the flicking of display will increase too. Thank you for your answer To follow and understand, especially that I start under arduino, I try to attack code modifications one by one I want to reduce the hide time between dispalys ... it's controled with delay (500) ... if I change it to delay (200) ... this change take effect only in the last delay ... I try also to remove it ... suppose I no want hide time between displays ... work only in the last ... Esloch, All delays statements have a function in the code and they are working. If you remove the statements of delay(500) there will be no interval anymore. Try do the opposite such as test. Use a delay (3000) for all of them. In this case you will see an interval of 3 seconds between features changes. Maybe you are not realizing any difference now because delay(500) means a half of second only! I think the problem is that to read information of the DHT sensor it takes some time ... some think like 300 ms .. to place a lower time in delay has no effect ... we must always wait for this time reading I think I remove the statements delay (500) ... and it's remain some delay between the display of clock and temperature ... and between the display of temperature and humidity ... but no between humidity and clock ... :( the brightness control work fine .. thanks :) I did some tests and I suggest use the delay time between 1 to 20 to control the brightness. for the 3 point : - I success to change display time (change (millis() - ti) < 3000) ... work fine) - I try to change the wait time between displays ... I change delay(500); to delay(100); ... but only the last delay take effect (between humidiy and time) ... strange :/ I mam beginner with AURDINO . Thank All Hello sir! I am new to Arduino and I've been trying to do this same project but I have encountered several problems of which, some I have been able to solve and others not ... So I turn to your help to see if I can finish it! sketch_jun14e:6: error: expected unqualified-id before numeric constant #define DHT11 11 //Define al pin 11 como sensor DHT11 ^ C:\Users\Cejas\Desktop\sketch_jun14e\sketch_jun14e.ino:7:1: note: in expansion of macro 'DHT11' DHT11 DHT; //Define el nombre DHT al sensor de temperatura y humedad ^ C:\Users\Cejas\Desktop\sketch_jun14e\sketch_jun14e.ino: In function 'void loop()': C:\Users\Cejas\Desktop\sketch_jun14e\sketch_jun14e.ino:83:53: warning: large integer implicitly truncated to unsigned type [-Woverflow] shiftOut(dataPin, clockPin, LSBFIRST, ~B10000000); //Configura los LEDs de los doble puntos ^ sketch_jun14e:94: error: expected primary-expression before '.' token chk = DHT.read(DHT11_PIN); //Lee la data del sensor DHT11 ^ sketch_jun14e:94: error: 'DHT11_PIN' was not declared in this scope chk = DHT.read(DHT11_PIN); //Lee la data del sensor DHT11 ^ sketch_jun14e:97: error: expected primary-expression before '.' token temp = DHT.temperature; //Lee la temperatura en grados centÃgrados (ºC) ^ sketch_jun14e:132: error: expected primary-expression before '.' token umid = DHT.humidity; //Lectura de humedad ^ exit status 1 expected unqualified-id before numeric constant (I'm using Arduino Mega with all the bookstores mentioned ...) By another way, I wanted to ask if you could add 2 pushbuttons to "set" the time, for example every time you press a button add +1 hour and the other that adds +1 minute. First of all, thanks for your help! greetings from Argentina Hello, TanoT2, Thank you to try to replicate this project. I have some comments: 1) I see you have done some changes in the original code. 2) Did you try to run my original code? 3) Did you see any errors after compilation of original code? 3) In your version of code, you need to fix the following declaration: #define DHT11_PIN 11 //Sensor DHT11 conected to the pin 11 on Arduino Pls, try again and keep me informed. Saudações do Brasil, LAGSILVA Hello again! Yes, I tried with the original code and this was the error: (also want to say that I tried to copy all the code and execute it in a new file and the same thing...) Arduino:1.8.2 (Windows 7), Tarjeta:"Arduino Mega ADK" sketch_jun15a:16: error: 'dht11' does not name a type dht11 DHT; //Define the name DHT for the sensor of Temperature and Humidity C:\Users\Cejas\Desktop\sketch_jun15a\sketch_jun15a.ino: In function 'void loop()': C:\Users\Cejas\Desktop\sketch_jun15a\sketch_jun15a.ino:92:53: warning: large integer implicitly truncated to unsigned type [-Woverflow] shiftOut(dataPin, clockPin, LSBFIRST, ~B10000000); //Set LEDs of double dots sketch_jun15a:102: error: expected primary-expression before '.' token chk = DHT.read(DHT11_PIN); //Read data of sensor DHT11 sketch_jun15a:105: error: expected primary-expression before '.' token temp = DHT.temperature; //Reading the Temperature in Celsius degree (ºC) sketch_jun15a:152: error: expected primary-expression before '.' token umid = DHT.humidity; //Reading the Humidity exit status 1 'dht11' does not name a type I tried with different libraries of the dht11 on the internet, and if you compare them, they are differen .... I used this one: AND I had to rename the DHT.h and DHT.cpp to dht11.h and dht11.cpp to "fix" the error: no such a file or directory error #include <dht11.h> // Temperature and Humidity Library Im confused... Hello Tano T2, If you use another library you must update the main code to use the correspondent statements of new library. Libraries sometime are updated by their authors and an older code that use them must be updated too. Maybe this is the case here and I need to update my code for current versions of DHT libraries, but I won't do it for now. Anyway I included at Step 3 of this Instructable the DHT11 library I have used when I developed this project. Please, try to download and install it in your Arduino IDE and tell me if finally it works. Regards, LAGSILVA ALMOST DONE!! Finally worked! Only shows me an error with double points: In function 'void loop()': warning: large integer implicitly truncated to unsigned type [-Woverflow] shiftOut(dataPin, clockPin, LSBFIRST, ~B10000000); And both, the temperature and humidity indicates 0 ° C and 0% ... I'm using a DHT22, is it compatible? Hello Tano T2, There are some differences between DHT11 and DHT22. This last one is more accurated. I have updated my code to use DHT library of Adafruit that can be used for both types of sensor. Try download it and set the code according to the sensor version you are using in the following statements: //#define DHTTYPE DHT11 // DHT 11 #define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321 //#define DHTTYPE DHT21 // DHT 21 (AM2301) Please, inform me about the results. Regards, LAGSILVA Tano T2, Great news !! I do not see this warning message in my Arduino IDE. Maybe the code will run because it is not an error, but the root cause must be investigated. Probably the indication of 0ºC and 0% is because the data of DHT was not read correctly. As I told you, the main code must be updated to use more recent libraries of DHT. Try investigate about differences between DHT22 and DHT11 and keep me informed about your progress. From my side I will do it too. Note: I think all this road blocks are very good for everyone learn more and more. Investigation, tryouts and learning are part of the maker world. Go ahead, be patient and be curious all the time! Regards, LAGSILVA i had some erros in coding. please help me clear this.. Did you add all libraries into your Arduino's IDE ? You need install all the followings libraries before compile the code: <Time.h> : Time Library <DS1307RTC.h> : Real Time Clock Library <Wire.h> : Wire Library <dht11.h> : Temperature and Humidity Library yes, i was added the all libraries. but still this error will be came again and again,,! Hello Amarnath, I have added in Step 3 of this Instructable the DHT11 library I have used when I developed this project. Please, try install it in your Arduino IDE and tell me if it finally works. Regards, LAGSILVA 1) Check the directories structures of libraries in your Arduino installation. Probably the compiler is not finding the dht11 library. 2) Try Google "arduino error does not name a type". I found many solutions for this error. Maybe one of them can fix it. Great work! I built my own version in an hour and your code worked perfectly. I have one small issue though. I'm using two 2-digit displays instead of one 4-digit, so I don't have the central dots between hour and minute. Instead, a single decimal point lights for the second digit. I guess this is set by this part of the code: shiftOut(dataPin, clockPin, LSBFIRST, ~B10000000); //Set LEDs of double dots Is there any way to also make the decimal point for digit to also light at this time? That way I can rotate my second 2-digit display by 180 degrees to recreate the double dots. Grrrmachine, Thank you very much!! Please, post a photo of your project here. If your display are with the LEDs not inclined some degrees, I think it is feasible to put one of them upside down. If not, the result could be a little bit strange due to the different angles of inclination of both displays when you rotate one of them by 180 degrees. The logic of sequence to control the LED of the displays of my project is: Dot - A - B - C - D - E - F - G For your project you must consider the transfer function for the 2nd. display: Dot - E - F - G - A - B - C - D I see you have two ways to apply this logic: 1) Change wire connection of 2nd display according with 2nd sequence. 2) Create a second byte num2[ ] with new sequence to be applied in the 2nd display and update the code (in this case you can mantain same wiring connection of original project). //Digits Matrix - 0 to 9 - For 1ST. Display byte num1[] = { B01111110, // Zero B00110000, // One B01101101, // Two B01111001, // Three B00110011, // Four B01011011, // Five B01011111, // Six B01110000, // Seven B01111111, // Eight B01111011, // Nine }; //Digits Matrix - 0 to 9 - For 2ND. Display byte num2[] = { B01101111, // B00000110, // B01011101, // B00011111, // B00110110, // B00111011, // B01111011, // B00001110, // B01111111, // B00111111, // }; Good luck and keep me posted on your progress! Regards, LAGSILVA Sir Lagsilva i have a question, can i not include the sensor temperature and humidity sensor?.... Will it affect the circuit or not?.. Thank you Hello, Ed Marsjosef, I am understanding you want only the clock function running, without the temperature and humidity information been displayed. Yes, you can delete the sensor and the circuit will be not affected. Without the sensor, the code will consider as 0 (zero) the values of temperature and humidity. Regards, LAGSILVA Thank you sir Hi Lagsilva, I really enjoy your projects and can tell you are a real enthusiast by the way you respond to fellow builders especially beginners like myself! I'll be following your builds with interest. You have a real talent for explaining things and should do some full build videos which I'm sure would be popular! Keep the projects coming! Davy Hello, Davy, Thank you very much for your feedback! I am not a specialist, I am really an enthusiast of this technology that help us to learn more, to be curious, to be inventive, to be better than yesterday! Everyone is a beginner in something because we do not know everything. But we can learn!! All the time! Regards, Luís It's your enthusiasm that shines through! Keep it up! ;-) Hello. Thank you so mutch for a great idea. :-) Bought the parts yesterday, and assembled today. BUT, i get this errorcode trying to verify the script. Could you help? ______________________ In file included from C:\Users\arnes\Downloads\Digital_Clock_V1_English\Digital_Clock_V1_English.ino:13:0: C:\Users\arnes\Documents\Arduino\libraries\DS1307RTC/DS1307RTC.h:19:22: error: 'tmElements_t' has not been declared static bool read(tmElements_t &tm); ^ C:\Users\arnes\Documents\Arduino\libraries\DS1307RTC/DS1307RTC.h:20:23: error: 'tmElements_t' has not been declared static bool write(tmElements_t &tm); ^ Digital_Clock_V1_English:16: error: 'dht11' does not name a type dht11 DHT; //Define the name DHT for the sensor of Temperature and Humidity ^ C:\Users\arnes\Downloads\Digital_Clock_V1_English\Digital_Clock_V1_English.ino: In function 'void setup()': Digital_Clock_V1_English:50: error: 'setSyncProvider' was not declared in this scope setSyncProvider(RTC.get); // Update the time with data of RTC (Real Time Clock) ^ C:\Users\arnes\Downloads\Digital_Clock_V1_English\Digital_Clock_V1_English.ino: In function 'void loop()': Digital_Clock_V1_English:63: error: 'hour' was not declared in this scope hora = hour(); ^ Digital_Clock_V1_English:64: error: 'minute' was not declared in this scope minuto = minute(); ^ C:\Users\arnes\Downloads\Digital_Clock_V1_English\Digital_Clock_V1_English.ino:92:53: warning: large integer implicitly truncated to unsigned type [-Woverflow] shiftOut(dataPin, clockPin, LSBFIRST, ~B10000000); //Set LEDs of double dots ^ Digital_Clock_V1_English:102: error: 'DHT' was not declared in this scope chk = DHT.read(DHT11_PIN); //Read data of sensor DHT11 ^ exit status 1 'dht11' does not name a type Hello, Veigrillen, Thank you !! I hope you have success with this project. It sounds me there is some missing library. Did you install the following libraries into your Arduino folder ? If you have done that, please try the following: 1) Download again the file "Digital_Clock_V1_English.ino". 2) Open it on a word editor (WordPad, for example) and copy all the text. 3) Create a new file on Arduino Software. 4) Clean all the statements of new file and paste the text you have copíed on item #2. 5) Recompile the program and inform me the results. Good luck!! Thank you so mutch. :) I finally got rid of the error codes, but encountered another problem. I got the wrong RTC module. I got an DS3231N, and not the DS1307, so im not able to complete the "mission. Unless there is an easy workaround? Thanks again. Good news, Veigrillen !! I do not see any issue if you use the DS3231 RTC. Both modules use I2C bus and you can apply same library. In fact the DS3231 is much more accurate than DS1307 !! Just take care with corresponding connections SDA, SCL, Vcc and GND. Take a look on this tutorial:... Let me know about your tests. Well, i got everything uploaded, and my led lights up, but i recon theres something wrong.. :) Hello, Veigrillen, Any progress ? Did you revise the connections and find out what is the issue ? Uhm,, im a complete newbie, and didnt know that i could just reverse the connectors, so I just ordered a new led display with Common Anode. (They havnt arrived yet) I feel kinda stupid now ;-) Do you know if there is a "walkthroug" to reverse them? Right now i got an SMA420564 display Thanks in advance Yes, it is possible to use a Common Cathode display, but you need to update all instructions of the program. With right programming, you can control this hardware as you want! For example, the following statements to set the Display #1 must be updated. From: digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, LSBFIRST, 8); //Set DISPLAY 1 shiftOut(dataPin, clockPin, LSBFIRST, ~num[dezenaHora]); //Set the Hour digitalWrite(latchPin, HIGH); To: digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, LSBFIRST, ~8); //Set DISPLAY 1 shiftOut(dataPin, clockPin, LSBFIRST, num[dezenaHora]); //Set the Hour digitalWrite(latchPin, HIGH); The sign ~ inverts the signal from HIGH to LOW or vice versa. Try to update all statements related to setup of the digits of display.
http://www.instructables.com/id/Digital-Clock-with-RTC-using-LED-Display-of-4-Digi/
CC-MAIN-2017-43
refinedweb
3,296
65.22
I may regret this, but my web-based factory method pattern example lacked a "modern" touch. Well, that's not entirely true, it could add relatively new input elements like number, telephone, and week inputs to a form: But darn it, what about awesome Paper Elements? Will a <paper-input>element serve as a product of the pattern? It sure would be neat if I could simply drop it into the pattern without many changes. But alas, it seems that some changes are going to be required. Even though it behaves like an input field, the PaperInput class implements HtmlElement, not InputElementlike my FormBuilderclass wants: abstract class FormBuilder { // ... void addInput() { var input = _labelFor(inputElement); container.append(input); } InputElement get inputElement; // ... }The factory method in this example is the inputElementgetter, which returns an InputElement. Because of the PaperElementinheritance, I have to change that to return the more general HtmlElement: abstract class FormBuilder { // ... HtmlElement get inputElement; // ... }How many other changes am I going to have to make? Well, I certainly have to list Polymer as a dependency in my project's pubspec.yaml. To get <paper-input>, I need paper_elementsas well: name: factory_method_code dependencies: polymer: ">=0.15.1 <0.17.0" paper_elements: ">=0.7.0 <0.8.0" transformers: - polymer: entry_points: - web/index.htmlNext, I have to import the paper element into the containing page: <!doctype html> <html lang="en"> <head> <!-- ... --> <link rel="import" href="packages/paper_elements/paper_input.html"> <script type="application/dart" src="input_factory.dart"></script> </head> <body><!-- ... --></body> </html>I have to do the same with the backing code in the input_factory.dartscript: import 'package:polymer/polymer.dart'; import 'package:paper_elements/paper_input.dart'; abstract class FormBuilder { // ... } // Concrete factories here...The final Polymer-y thing that needs to happen is an initPolymer()call in my main()entry point, also in the input_factory.dartscript: main() async { await initPolymer(); // Start up the factory code once Polymer is ready... }That's it for the Polymer preliminaries. Now what needs to change in the pattern itself to accommodate PaperInput? Mercifully, not much. In the RandomBuilderclass, which is a concrete factory implementation of the FormBuilder, I add a new random option (#5) for PaperInput: class RandomBuilder extends FormBuilder { RandomBuilder(el): super(el); Element get inputElement { var rand = new Random().nextInt(7); if (rand == 0) return new WeekInputElement(); if (rand == 1) return new NumberInputElement(); if (rand == 2) return new TelephoneInputElement(); if (rand == 3) return new UrlInputElement(); if (rand == 4) return new TimeInputElement(); if (rand == 5) return new PaperInput(); return new TextInputElement(); } }Unfortunately, I also have to make a change in the superclass. Previously, when all of the products were InputElementinstances, I could count on them supporting the typeproperty (e.g. telephone, number, time), which I could use as a default textlabel on the page: abstract class FormBuilder { // ... _labelFor(el) { var text = el.type; var label = new LabelElement() ..appendText("$text: ") ..append(el); return new ParagraphElement()..append(label); } }That will not work for PaperInput, which does not support the typeproperty. If I had control of the product classes, I could force PaperInputto support type. Since that is not possible, I either have to create wrapper classes or, more easily, add an object type test for InputElement: abstract class FormBuilder { // ... _labelFor(el) { var text = (el is InputElement) ? el.type : el.toString(); // ... } } By itself, that one line is not too horrible. That said, I can imagine things going quickly off the rails here by adding a non- InputElement into the mix. For a limited use case like this example, however, it works. In the end, it was fairly easy to get a PaperInput element added to the mix of my InputElement factory method. Most of the effort was the usual Polymer overhead. The resulting interface mismatch likely will not cause too much trouble in this case, but could get ugly quickly in other scenarios. Day #91
https://japhr.blogspot.com/2016/02/factory-method-pattern-and-polymer.html
CC-MAIN-2018-22
refinedweb
635
50.84
This entry leads you through the development of a simple parser for reading in name/age pairs. You'll see how to use You will print out the contents of an input file in a certain format. The input is: Griffin 2 Terence 33 Karen 31 Tom 32 Pat 26 Parsing A grammar to recognize a sequence of name/age pairs is pretty simple. Define a grammar class derived from Parser to indicate you will be recognizing token streams (not characters or tree nodes). class P extends Parser; // match one-or-more 'name followed by age' pairs startRule : ( NAME AGE )+ ; We will define the references to NAME and AGE later, but for now assume they represent a series of letters and a series of digits, respectively. Also assume whitespace is ignored. It's probably worth mentioning at this point that tools such as awk and PERL work on a line by line basis, not character by character. Hence, you could write a quick parser to read name/age pairs if they happen to be consistently on a line together or on separate lines. Here is a quick awk invocation that works if the data is on one line: awk '{print "("$1","$2")"}' < input Unfortunately, it will print "(,)" for empty lines at the end also. A real parser, on the other hand, looks only at a stream of vocabulary symbols (tokens); they generally ignore whitespace unless it is part of the vocabulary such as in Python or make (tabs count--ick). Anyway, "right tool for the right job" etc... Grammar P recognizes name/age sequences, but does nothing with them. In other words, no output is generated. Let's extend the grammar to generate output in the form of "(name,age)". In order to access the attributes of an input token, label the token reference, which gives you a token object that you can manipulate with standard methods such as getText. A simple System.out.println method call generates the desired output: class P extends Parser; // match one-or-more 'name followed by age' pairs startRule : ( n:NAME a:AGE {System.out.println("("+n.getText()+","+a.getText()+")");} )+ ; Lexical Analysis A parser applies a grammatical structure to a sequence of input tokens, but where do the input tokens come from? From a beast called a lexical analyzer or lexer that scans the input characters looking for patterns. [Sounds like a parser doesn't it? It is, but lexers parse characters not tokens. ANTLR treats lexical analysis, parsing, and tree parsing as simply variations on recognition. This generalization provides a pleasing notational consistency across recognizer types.] To define a vocabulary of tokens, create another grammar class, but this time derive it from Lexer and then create a rule for each token: // Lexer framework (rule contents are missing here) class L extends Lexer; NAME: ... ; AGE : ... ; WS : ... ; // white space, which will be ignored To match any character in a range, use the range operator; for example, '0'..'9' matches a digit. Therefore, to match a series of digits, we can embed the range in the (...)+ positive closure (one-or-more) block or "loop". AGE can then be completely specified as: // match a decimal age of any length AGE : ( '0'..'9' )+ ; Similarly, NAME can be specified as: // match an upper/lower case name of any length NAME: ( 'a'..'z' | 'A'..'Z' )+ ; The alternative operator ' |' is used to indicate that either range can be matched. Each time through the loop the lexer will match either a lowercase or an uppercase letter. Whitespace such as tab, space, and newline is very often ignored by parsers. Rather than have the parser try to match and ignore whitespace tokens everywhere, it is customary for the lexer to match and throw out whitespace. Ignoring whitespace in the lexer is a matter of specifying what constitutes whitespace and then setting the token type for that token to be a special value: Token.SKIP. Use ANTLR-action method $setType to set the token type. In the following rule, you'll note that rather than a $setType on each alternative, we grouped the alternatives and placed a single action at the end. WS : ( ' ' | '\t' | '\r' '\n' { newline(); } | '\n' { newline(); } ) {$setType(Token.SKIP);} //ignore this token ; The Lexer has a predefined notion of newline or carriage return that is used in both the lexer and the parser for error handling and by user actions. A standard method newline can be called to increment the current line number. This concludes both the parser and lexer. Easy, right? Put them both in the same file called t.g and run ANTLR on it to generate the implementation Java files: $ java antlr.Tool t.g ANTLR Parser Generator Version 2.20 1997 MageLang Institute To invoke the parser, a main program such as the following suffices: import java.io.*; class Main { public static void main(String[] args) { try { L lexer = new L(new DataInputStream(System.in)); P parser = new P(lexer); parser.startRule(); } catch(Exception e) { System.err.println("exception: "+e); } } } Compile everything and run the input file through the program as standard input. You should get something similar to the following: $ javac *.java $ java Main < input (Griffin,2) (Terence,33) (Karen,31) (Tom,32) (Pat,26) $ Conclusion This Field Guide entry demonstrates all of the basic elements needed to build a typical parser and lexer. Future entries are more terse, but develop more complicated and useful recognizers and translators. Source The following files contain the complete solution to the problem discussed here.
http://www.antlr.org/article/firstgr/index.html
crawl-002
refinedweb
915
63.49
school Lacey Lyons scores her 2,000th point in Cryste River girls basketball. PAGE 11 C- >o :-- > 0 L-L l, --'- ^SL^^.^^^ ^?^^ ______ I'^ ..-* ______.*.* r l C; ON- d > .Ii I i; FORECAST: IMostly 69 cloudy Norlh winds 5 to 10 mph Partly 44 clOtdy tonight ." L"? Bush defends domestic spying "Copyrighted Material .Syndicated Conten = Available from Commercial News Providers" W .Vl "= Courthouse running out of space DAVE PIEKLIK dpieklik@chronicleonline.com Chronicle Almost three years after a new addition opened at the Citrus County Courthouse to accommodate growth, some staff members say they've already run out of room. At her office last Thursday, Administrative Judge Patricia :Thomas said she has talked with county officials to discuss the current situation and possible solutions to free up space. "We've already reached capacity," she said. Explaining what court employees currently face, Thomas said, among :other temporary solutions, space once used for storage has now been converted to office space. She said efforts also are under way to create "overflow courtrooms" in the event the other five courtrooms are filled Please see SPACE/Page 5A Program seeks new coordinator Doctor Ride at stake JIM HUNTER jhunter@chronicleonline.com Chronicle The man who created Doctor Ride, the program that helps elderly patients get to their doctors when they have no VOLUNTEER other way to do so, is looking for To coordinate someone to keep the Doctor the unique vol- Ride program unteer program or drive for it, going. call Pat Jim Pitts of McCormack Beverly Hills, at 464-1033. who also started the program to deliver weekend meals to elderly res- idents unable to get meals for them- selves, created the Doctor Ride pro- gram in Citrus County more than a Please see PROGRAM/Page 5A Fire destroys young couple's home MATTHEW BECK/Chronicle Joshua Sweat holds his girlfriend, Angel Teeter, on Monday afternoon while standing in what is left of their rental home in Hernando. The couple, who does- n't have renter insurance, lost everything they own Saturday night after an electrical fire destroyed their wood-framed home. Smoke, flames claim lives oftwo pets as wel as belongings in Hernando house KHUONG PHAN kphan@chronicleonline.com Chronicle Joshua Sweat and Angel Teeter thought they had the found the perfect little home six months ago. 'Angel found it, and she kept saying how cute it was," Sweat's grandmother Belita Spafford said. The 1,200 squard-foot, two-bedroom, wood- frame home on Lakefront Drive in Hernando seemed like a wonderful place for the young cou- ple to live and raise their dogs. On Saturday evening, everything changed. According Citrus County Fire Rescue, an elec- trical fire broke out in the couple's bedroom. A neighbor dialed 911 at 8:41 p.m., and by the time HOW TO HELP SA trust fund has been established in the name of Joshua Sweat at the Suncoast Schools Federal Credit Union. Call the credit union at (800) 999-5887. several fire engines and tankers arrived, the house was fully engulfed in flames. Within 15 minutes, firefighters put the fire out, but the home was destroyed Luckily, Sweat and Teeter weren't home. The. young couple was at Spafford's house celebrat- ing Teeter's 19th birthday. Sweat, also 19, didn't suspect a thing until they were driving down the street. "Ididn't think it was my house," he said. "As we came up closer, I realized that it was my house..I jumped out of the truck while it was running. The first thing I asked was, 'Where are my dogs? Did they make it?' They said no, and that they were gone." Two of the couple's dogs, Dixie, a pit bull, and Precious, a pregnant cocker spaniel, had suc- cumbed to the smoke and perished during the blaze. While the couple is thankful for their own safety, the loss of their beloved pets is almost too much to bear. "I had her for 2 1/2 years," Teeter said of Precious as tears welled in her eyes. The couple's third dog, an American bulldog Please see /Page 4A Report on utilities purchase says county could operate more efficiently Rate estimates projected lower TERRY WIrr terrywitt@chronicleonline.com Chronicle A consultant's report released Friday says water and sewer utilities owned by the Florida Governmental Utility Authority in Citrus County would be less expensive to operate if the county owned them. The report by Rose, Sundstrom & Bentley, LLP said customer rates would benefit from the cost savings. Rate increases covering a 10-year planning period would be 15 percent less if the county owned the systems, cash reserves would be higher and the county's borrowing requirements would be lower, the report said. The report also said the county would have more accountability than FGUA. Rose, Sundstrom & Bentley LLP was hired by the Citrus County Commission on Oct. 11 to analyze whether the FGUA systems should be purchased by the county or left in FGUA's hands. Burton & Associates Inc. prepared the financial analysis. "A preliminary financial assess- ment prepared by Burton & Associates Inc. provides that the cost to operate the Citrus Systems would be less under county ownership than under FGUA ownership," the report Please see t'iTE/Page 4A Utility chief questions consultant's report TERRY WITT terrywitt@chronicleonline.com Chronicle A key manager for the Florida Governmental Utility Authority on Monday said a consultant's report that discusses whether Citrus County should purchase FGUA's local water and sewer systems is riddled with "inaccuracies and inconsistencies." Systems Manager Robert Sheets sent a letter to County Commission Chairman Gary Bartell asking for an opportunity to appear before the board in January to address the prob- lems he sees in the report. He said he couldn't attend today's board meeting. The report by Rose, Sundstrom & Bentley, LLP will be discussed by Please see /Page 4A X Annie's Mailbox . .6C j Movies .......... 7C SComics ......... 7C SCrossword ....... 6C Editorial........ 10A Horoscope ....... 7C Obituaries ....... 6A Stocks .......... 8A Three Sections 6 118 4578 200211 5 Take a deep breath Scuba diving is the portal to a new world, where most have never gone./1C Preliminary results in Iraq's electoral commission released partial and preliminary results Monday from the Dec. 15 parliamentary elections./12A Seaplane crashes off Miami Beach . Witnesses said Chalk's Ocean Airways plane exploded in the air./3A Survey tracks drug use in teens M America's teens are smoking less and popping pain r.iii more./5A MA Lecanto man faces charges in incident with shotgun./4A U Unwanted births up in the United States./12A --'-- 2 ..A E ........... D M .. .. 2.T TECT OU.CH L Florida LOTTERIES_ tR Here are the winning numbers selected Monday in the Florida Lottery: CASH 3 5-2-0 PLAY 4 9-4-0-4 FANTASY 5 5-9-10-29-36 SUNDAY, DECEMBER 18 Cash 3:7-9-3 Play 4: 9-7-2-4 Fantasy 5: 7 -9 -11 -20-22 5-of-5 5 winners $39,288.76 4-of-5 449 $70 3-of-5 12,265 $7 SATURDAY, DECEMBER 17 Cash 3: 9- 5 6 Play 4: 9 8 6 2 Fantasy 5: 10 18 -21 26 27 5-of-5 3 winners $95,025.23 4-of-5: -14 21 23 -33 5-of-5 1 winner $263,31090 4-of-5 S 333 $127.50 3-of-5 11,023 $10.50 Mega Money: 8 11 16 34 Mega Ball: 7 4-of-4 MB 1 winner $1.6 million 4-of-4 6 $2,142 3-of-4 MB 3 $339 3-of-4 1,816 $46 2-of-4 MB 2,519 $23 2-of-4 54,931 $2 1-of-4 MB 18,345 $250 THURSDAY, DECEMBER 15 Cash 3: 0- 1 -1 Play 4:2 7 9 9 Fantasy 5: 16 23 24 33 35 5-of-5 1 winner $237.780.23 4-of-5 266 $144 3-of-5 81512 $1250 WEDNESDAY, DECEMBER 14 Cash 3:0 6 8 Play 4:0 6 7- 8 Fantasy 5: 1 11 14 -20 35 5-of-5 2 winners $129.17033 4-of-5 348 $11950 3-of-5 10,762 $10.50 Lotto: 8- 12 38 -44-47-50 INSIDE THE NUMBERS To verify the accuracy of winning lottery numbers, players should double-check the numbers printed above with numbers officially posted by the Florida Lottery. On the Web, go to .com; by telephone, call (850) 487-7777. mNi--amn ets DVR gmieHgIhf ll k :jmk '' 9 r Alien loves London U wP *'..re a ***40- a0- 0 IIn .. e : :* e: m:...- ::. -:: ..... ......AW - a- ..,:: s -- "- a- wns"-" a -=owam. I r r *** **. -......==; ...... ..... ..... .... .- a. w I.. :: ,. 1* *| -iii K. -a *AIMM. M *w- am- SI. ala ..... .. .. .-u.. .. ...e.. ewe. S. e.e "-s.. "Copyrighted Material iUa& m 11 Today in STORY Y Today is Tuesday, Dec. 20, the 354th day of 2005. There are 11 days left in the year. Today's Highlight in History: On Dec. 20, 1803, the Louisiana- Purchase was completed as own- ership of the territory was formally transferred from France to the United States during ceremonies in New Orleans. On this date: In 1879, Thomas A. Edison pri- vately demonstrated his incandes- cent light at Menlo Park, N.J. In 1963, the Berlin Wall was opened for the first time to West Berliners, who were allowed one- day visits to relatives in the Eastern sector for the holidays. In 1989, the United States launched Operation Just Cause, sending troops into Panama to topple the government of General Manuel Noriega. In 1999, the Vermont Supreme Court ruled that homosexual cou- ples were entitled to the same benefits and protections as wed- Sded couples. Ten years ago: lin Bosnia- Herzegovina, NATO began its peacekeeping mission, taking over from the United Nations. Five years ago: President-elect Bush named businessman Paul O'Neill to be his treasury secretary; Ann Veneman to be the first female secretary of agriculture; Mel Martinez to be secretary of housing and urban development; and Don Evans, secretary of commerce. One year ago: In a sobering assessment of the Iraq war, President Bush acknowledged during a news conference that Americans' resolve had been shaken by grisly scenes of death and destruction, and he pointedly criticized the performance of U.S.- trained Iraqi troops. *A Chilean appeals court upheld the indict- ment and house arrest of General Augusto Pinochet on murder and kidnapping charges during his rule. Today's Birthdays: Comedian Charlie Callas is 78. Actor John Hillerman is 73. Psychic Uri Geller is 59. Singer Alan Parsons is 56. Actress Jenny Agutter is 53. Actor Michael Badalucco is 51. Rock singer Billy Bragg is 48. Rock singer-musician Mike Watts (The Secondmen,. Minutemen, flREHOSE) is 48. Country singer Kris Tyler is 41. Rock singer Chris Robinson is 39, Singer JoJo is 15. Thought for Today: "Friendship is unnecessary, like philosophy, like art.... It has no survival value; rather it is one of those things that give value to survival." C.S. Lewis, British author (1898-1963). Syndicated Content S"- Available from Commercial News Providers" ______________________.S.-a. , :- "" [.^ ^1 . Il-- *- . .- ......... So aft S. - . w"t low '.e Milk 0 00.1kiibp AY o"*'fC ur i* -ONIN. * e--------- - .-e. SWMRYIN * a*--( .. A S e : a S11yok.. ..a* 1-.. - t i nwo WMMMIOW-40APP m .m a CI I ar -I J uM4i==~ S :. **:" ::ri8E-IlljI :I - a... a o I I ':*i. I jmmmm -- g I SM < reS * :::: i, .... '.. . 2A TUESDAYDECEMBER 20 5 ENTERTAINMENT CITRUS COUNTY (FL) CHRONICLE , 1 "W ,r 14 - M ll:- ---- C- 2 P d l -' I. ,' 3A TUESDAY DECEMBER 20, 2005 a____ mo A w - 0 0 amn, qam mmo - ap 0 0 4 1 -low MID -'- - % "4P o- 0 wom -nu .0m a qw Teen Court head put on leave Accounting issues under investigation DAVE PIEKLIK dpieklik@ chronicleonline.com Chronicle Thi difretor for'Teen Court of Citrus County has been placed on paid administrative leave, pending an investiga- tion into "accounting issues." Barbara Hinkle was placed on leave Monday after the -Citrus County Sheriff's Office was asked to investigate the 9- year-old alternatives to incar- ceration program. Contacted by cell phone, Hinkle said she turned in her keys and securi- ty clearance badge for her office at the Citrus County Courthouse in Inverness after being told she was being placed on leave because of "conduct unbecoming." She declined further com- ment. Jessica Lambert, spokes- woman for the county which oversees Teen Court opera- tions said she could not com- ment, and an official with the human resources department was not immediately available. Sheriff's spokeswoman Gail Tierney said the office was notified Monday morning by a county official about "account- ing concerns" with the pro- gram, although she could not say if they specifically involved Hinkle. "They did ask us to look into it (Monday) morning," she said. Tierney also could not elab- orate on what the accounting issues involved. She said the office would be investigating, and that she could learn more within a few. days. Hinkle has been with Teen Court for five years. She start- ed out as a volunteer judge, and then became assistant director of the program in August 2002. This past February, Hinkle was promot- ed to the top spot, taking over for former director Thomas Moore, who retired from the program in February. Reached at his home Monday afternoon, Moore said he was surprised by the news about his successor. "I couldn't believe it," he said. "I don't know what to say." Moore, a former police offi- cer from Connecticut, said it's too early in the investigation to say for sure what could hap- pen, but stressed the role Teen Court plays. S "The big thing to remember Sis the program and the kids," he said. "It's a great program S and needs to continue." <* ' ' ** L * S -m - ___ - a o - - ~ - * - w - - - - - * W MATTHEW BECK/Chronicle The children of the Carter Street Head Start Program were guests at the yearly Christmas party hosted by Foral City Chapter 164, Order of the Eastern Star. Santa Claus entertained parents and the Head Start pupils as he distributed a bag full of pres- ents, as well.as a new bicycle to each child. Many throughout the local community contributed to the purchase of the gifts. District considers deal plant settlement JIM HUNTER jhunter@chronicleonline.com Chronicle The governing board of the Southwest Florida Water Management District will consider a proposed settlement today with Tampa Bay's regional water supply authority concerning a dispute about the performance of a new desalination plant The agreement, if supported by the water district's board, will end the con- tract dispute about what the water district would get for its $85 million in capital investment in the desalination plarit. The sum of $85 million was provided by taxpayers in the 16-county water district, which includes Citrus County. The Apollo Beach plant originally was designed to deliver 25 million gallons a day of drink- able water, but it did not meet the contract design efficiency standards when it began operating. In 2004, Tampa Bay Water picked anoth- er company to remediate the problems to operate it long term. The original plant and pipeline costs were $110 million, but with the remediation costs the total capi- tal price of the program will be about $150 million. Tampa Bay has said it would seek to recover the overrun from performance bonds and professional liability insurance funds, but the operational performance of the plant had the two partners in the alter- native water source project at odds. At issue was the 25 million gallons a day the water district contracted for in its investment agreement of the ad valorem taxes. Tampa Bay Water holds that no plant ever operates at maximum capacity every day. It said under current conditions that it would operate the plant at 25 mil- lion gallons a day capacity as needed - could even go up to 28.75 million a day if needed but not at the maximum capac- ity every day. Tampa Bay Water said there are times when, because of wet weather and water levels, it's not necessary to run the plant at capacity. The contract issue of performance for the $85 million went to mediation, and a spokeswoman for Tampa Bay Water said Monday the supply authority board had approved the proposed agreement and was hopeful the water district board would approve it today At full capacity, the plant is designed to provide Tampa Bay region with 10 percent of its drinking water supply The water is blended with water from other less-expen- sive water supply sources, making the desalinated water more affordable. Tampa originally held that desalination was too expensive a way to develop alter- native sources of drinking water, but even- tually partnered with the water district With the agreement of the $85 million in capital investment. At a projected $2.54 per thousand gal- lons, the desalinated water is deemed to be the least expensive desalinated water in the world. When the $85 million from the water district is applied to the cost, Tampa Bay Water said, that would reduce the cost another 61 cents per thousand gal- lons, but the water district was more con- cerned with the contracted performance standard. Under the proposed agreement, Tampa Bay Water would agree to produce at least 15 million gallons a day on an annual aver- age from the plant in 2009 and 2010. A .memo from Water District Chairwoman Heidi McCree and Executive Director David Moore said they believed the settlement represented the best terms on which the two negotiating teams were able to agree. - 4S - O - ow -a 0- .0 - - a - 0 - -.0 - - o .0 * - - * 0 - . . o .0 - o - So o .0 - .0-- e S S Public hearing to discuss Chassahowitzka sewer costs TERRY WITT terrywitt@ chronicleonline.com Chronicle A public hearing today could set the stage for the county to create a water and sewer prop- erty assessment in Chassa- howitzka, but the size of the assessment may not be known for several months. Commissioners must make a decision at today's hearing to impose the assessment if they are to meet the deadline for adding it to next year's proper- ty tax roll. But County Engineering Director Al McLaurin said the size of the assessment can't be determined until the project is rebid and redesigned. The county is in a financial jam with the project. The only bid received for the project was $11.1 million, or $6 million over budget. To make up the difference, staff origi- nally proposed a property assessment of $10,366, plus a connection fee of $3,760. * WHAT: Citrus County Commission meeting. WHEN: 1 p.m. today. WHERE: Citrus County Courthouse. WHAT: Chassahowitzka hearing is set for 3:15 p.m. Chassahowitzka residents ,bjiveh-lr Staff has come up with a new plan. They will ask commis- sioners today lobr permission to bid the two systems separately and design the sewer with shal- lower pipes. After bids are received, the assessment can be calculated again, said McLaurin. He is hopeful the new design will attract local bidders who won't have to house employees in motels or travel long dis- tances to reach the work site. He also believes multiple bid- ders could result in more com- petition and lower bids. In July, commissioners will have a final hearing about the assessment. The final project costs for the sewer will be known by then. Bids for the water system will be advertised in January. State Sen. Mike Fasano, R- New Port Richey, has pledged to introduce legislation that would give the county $2 mil- lion of additional state funding for the project. The state already has contributed more than $4 million in grant money Fasano said Chassahowitzka is now his top priority for water projects in his district IS "Copyrighted Material SSyndicated Content -_. Available from Commercial News Providers" Eastern Star hosts Head Start Christmas party _ ~Ld~l~a~R~a~R~4AjJauPr - ' Ib - at - - - Q O q 0 r oo * * Loca SAMO vml , OUN Y ( ) EMONICI.E Shotgun pushed through bathroom door Lecanto manfaces burglar assault charges to step betweenthe two men, but Jones as lca e pushed her away She managed to rush the bleeding man KHUONG PHAN Office, Jones entered the home of two into the bathroom. Jones, still upset, kphan@chronicleonline.com acquaintances unannounced Sunday slammed his hand on the door repeatedly Chronicle afternoon. A man was napping on the Jones then went into the woman's bed- couch, and Jones slapped the man on his room, found a 20-gauge Mossberg shotgun, A Lecanto man was arrested Sunday chest pushed the weapon through the top of the evening after he had threatened another The man tried to keep Jones away from bathroom door and pointed it at the man man with a shotgun. him, but Jones managed to put him in a inside. Joel Shawn Jones, 23, 1121 S. Fieldview headlock and repeatedly punched him in The woman grabbed the barrel of shot- Loop, was arrested on charges of armed the face, causing him to bleed. The man gun, and managed to push it back through burglary and aggravated assault with a then went into the bathroom to clean up, the door. The shotgun then fired, sending deadly weapon. while Jones quickly followed behind. A one round through the house. According to the Citrus County Sheriff's woman, who also lived at the house, tried Jones' bond was set at $32,000. I- s I-- C. "Copyrighted Material Syndicated Content Available from Commercial News Providers" Florida Highway Patrol DUI arrest Robert Earl Platt, 58, 3378 Arundel Terrace, Homosassa, at 10:35 p.m. Sunday on charges of driving under the influence and driv- ing under the influence resulting in damage/injury. His bond was set a $1,500. Citrus County Sheriff Arrests Jonathan David Haffkoss, 21, 7777 E. Smoke Trail, Inverness, at 8:08 p.m. Sunday on a charge of marijuana possession. He was released on his own recognizance. John Ray Jacobs, 67, 7650 Homosassa Trail, Unit 26, Hom- osassa, at 9:44 p.m. Sunday on charges of marijuana possession, possession of drug paraphernalia and giving false information to a law enforcement officer. His bond was set at $1,500. Jared Riley, 18, 2515 S. Coleman Ave., Homosassa, at 12:30 a.m. Sunday on a charge of possession of alcohol by a person younger than 21 years of age. ON THE NET For more information: about arrests made by the Citrus County Sheriff's Office, go to and click on the link to Daily Reports, then Arrest Reports. He was released on his own recognizance. Heather Rachel Villanueva, 21, Crystal River, at 1:51 p.m. Monday on charges of child neglect and petit theft. According the sheriff's office, Villanueva pilfered a pair of shoes from a department store. She took the shoes from the rack and put them on her feet. She then took her old shoes and placed them under- neath the blanket that was wrapped around a baby she was carrying. Her bond was set at $5,250. Jeremiah Hub Ward,,22,4255 S. Plum Tree Terrace, Invemess, at 1:20 p.m. Monday on charges of knowingly driving with a suspended license and carrying a concealed weapon. His bond was set at $750. UTILITIES Continued from Page 1A said. "As a result, customer rates would benefit directly from county ownership." When FGUA purchased the water and sewer systems in November 2003 from Florida Water Services Corp., the county retained the option of I--_-* T- 0 --r'- -+;;+- -+ A-j-- struction costs in Citrus Springs and Pine Ridge prompted commissioners to take an early look at a potential buyout The report, which is prelim- inary, appears to make a case for the county buying the sys- tems. However, the report cau- tions that the county will have to do its own financial analysis to determine whether it would assume FGUAs existing debt buying uie uuilities at a future Gary or issue Donas it it decides to date. Few in county govern- Bartell buy the systems. ment expected the purchase commission The report said FGUA's to occur this soon. chairman. existing bond debt is $21.8 mil- However, recent criticism of lion. Transition costs would be FGUA's use of property assessments $280,000, and the county also would to pay for line maintenance and con- have to repay the $2.5 million FGUA The report said FGUA's existing bond debt is $21.8 million. Transition costs would be $280,000, and the county also would have to repay the $2.5 million FGUA borrowed as a "line of credit" after it took over the Citrus Systems. borrowed as a "line of credit" after it took over the Citrus Systems. County Commission Chairman Gary Bartell said the key is whether the county could buy the systems without raising rates. He said FGUA agreed to keep rates stable for five years, except for annual adjustments for inflation. However, some county officials say FGUA's use of property assessments has breached its pledge not to increase rates. County Utilities Regulatory Director Robert Knight said the property assessments are a rate increase. The report does not specifically answer the question of whether cur- rent rates could be maintained if the county took over the systems, but Bartell said Burton & Associates is expected to make a presentation at today's meeting. "If they are going to recommend a rate increase, that won't sit well with me," Bartell said. "We'll have to wait for the presentation. We just need good numbers so we can make an intelligent decision." Cathy Taylor, director of the coun- ty's Office of Management and Budget, said she had not been provid- ed a copy of the report, but had requested it Taylor said the numbers would have to show that rates would be equal to or less than current rates for the county to have an interest in pur- chasing FGUAs systems. CHIEF Continued from Page 1A commissioners beginning at 2 p.m. Bartell said he wants Sheets present to address his concerns. "If we're going to make a deci- sion tomorrow, I would like all the facts," Bartell said. But Sheets said FGUA has not had an opportunity to conduct an extensive review of the rec- ommendations outlined in the report. He said he received the FIRE Continued from Page 1A named Bo, was tied up outside and survived the flames by hid- ing underneath Sweat's Bay Area Air Conditioning work van parked within the home's car- port Bo was taken-to the Hu- mane Society Monday morning, where he awaits adoption. The cause of the fire appears to have been no fault of Teeter or Sweat, as the couple made sure to be extra careful any time they left their home. "Nothing was turned on," Sweat said. "We always turn everything off when we leave. I was already skittish about leav- ing things like heaters and even the lights on." The fire was so intense that Sthe couple's bedroom, in the back of house, is now nothing more than charred wood. In addition to eating away the wooden walls, the flames were so hot that they melted glass, disintegrated a television, torched a computer and warped the couple's steel bed report Sunday and could see it wasn't factual. "It's full of inaccuracies, mis- quotes and outdated informa- tion," Sheets told the Chronicle. "The information on cost num- bers is ludicrous. It's laughable." Among other things, Sheets said the report does not address whether Citrus County would increase staffing for its utility system, which would expand from 6,000 customers to 18,000 customers if the FGUA systems we6readded, and makes no meni- tion of how staffing would be A I Ku -~ 'a frame into a sunken, sad dip. In the living room, bright pink insulation falls from the ceiling, covering scorched couches. The small Christmas tree in the corner in nothing but a blackened twig, and the couple's 30-inch television and various appliances are just hunks of melted plastic. "You read about it or hear about it on the news about peo- ple's houses burning down around the holidays, but you never know how bad it could possibly be until it happens," Sweat said. Throughout the rest of the house, everything is pitch black, as the flames scorched just about every conceivable inch of the place. "Cleaning supplies and a couple of pots and pans, that's about it," Sweat said when K ~~*i youoil get'+ SIC' .,...i ',. ",'i. .. ..-.. .." .*L4 '7". c ;$... h .; . Roer- W.:i H.:nes LJS MC.IRETSsgt- D" 20I :1955 .."' I. ..-21:1955. N C, N I \/Vi I A 1 1 1',J I Visit Us at wwwpedimhealthcare.com convenient t a r 1,jrl. Convenient U Tn da rs edBL Healthcare Dr Dacelin St Martin is one of the few physicians in the country with dual board certification in both Pediatrics & Internal Medicine. His office in Beverly Hills is a one-of-a-knd for Citrus County with both practices under one roof. Visit us at wwwpedimheathcare.com to learn more. Two separate practices: Pediatrics & Internal Medicine including a sick id's waiting room E D ace lin .~ ~ T 17 St.M ar in ,ILAA IUERegna ou mlevrd B 1 BT d( infe nbt eivc I ntra ein eel il nr" funded. He said the report claims county staff was consulted be- fore the report was made, but he said in reality only Utilities Reg- ulatory Director Robert Knight was asked for information. In his letter, Sheets said the FGUA fully recognizes Citrus County's right to assume owner- ship of its 11 water and five wastewater systems. He said interlocal agreement gives the county the authority. But he said he believes FGUA and the county can work togeth- It took us a long time to get all of Joshua Sweat lost home and belongings to fire. asked about what he could sal- vage from the fire. What few things that sur- vived the blaze were inside closed cabinets. Amazingly, a Bible story Teeter had received as a gift came out of the fire virtually unscathed, even though it was kept under- neath the couple's bed. The couple rented the home and did not purchase renter's insurance. Compounding mat- ters is that Sweat kept what lit- tle money he could save inside the couple's now destroyed bedroom.' "It took us a long time to get IN antationinn.cor &W0226 er to address the following issues: Providing water and sewer to the Chassahowitzka area. Addressing the expanding number of private utility systems in the county in a cost-effective and environmentally responsi- ble manner There are currently 150 systems, Sheets said. a Addressing the impact on the county's lake system. Sheets said FGUA is working with Citrus ,County and the city of Inverness to try to protect the lakes. all of this," Sweat said. "Now we have nothing." Through the help of family, friends and the Red Cross, the couple was able to get things like money and clothes. Spafford has set up a trust fund in her grandson's name at the' Suncoast Schools Federal Credit Union. Without the aid, Teeter and Sweat would have nothing more than the clothes on their backs. "I never knew how great peo- ple were, but they've been so good," Spafford said. For now, the couple plans to spend Christmas with family in Georgia, and may return to their native Orlando if they can't get reestablished in Citrus County. "I guess we'll just try to start over again," Sweat said. To help, call the Suncoast Schools Federal Credit Union at (800) 999-5887. ]us Seasoned Pear Stuffed Pork Loin w/honey bourbon pork jus Side Dishes STraditional Herb Stuffing, Cranberry Relish, Herb Wild Rice Pilaf Red Bliss Potato Mash, Fresh Dinner Rolls, Cheese & Sausage Board, Steamed Peel & Eat Shrimp Vegetable Steamed Normandy Blend Spaghetti Squash seasoned with brown sugar- Sbutter sauce Assorted Desserts PLANTATION INN & GOLF RESORT 9301 West Ford Island Trail, Crystal River n 795-4211 lo Flo rida's BestCommunity% Mea *Dunh N 162 Crys Gerry Mi Charlie E Tim HesE John Prc Neale Br John Mu Tom Fee Kathie S Where to find us: idowcrest office 4 :, , 4 N. Meadowcrest Blvd. tal River, FL 34429 Inverness office c Iournpuae a ..-. 106 W. Main St., Inverness, FL 34450 Beverly Hills office: Visitor 3603 N. Lecanto Highway Beverly Hills, FL Who's in charge: mulligan ....................................... Publisher, 563-3222 Brennan ........................................ Editor, 563-3225 s .............................. Director of Operations, 563-3227 iv 1 PERIODICAL POSTAGE PAID AT INVERNESS, FL SECOND CLASS PERMIT #114280 For the RECORD this. Now we have nothing. VERTICAL BLIND OUTLET' 649 E Gulf To Lake Lecanto FL 0 637-1991 -or- 1-877-202-1991 ALL TYPES OF BLINDS rj' oin ts [or Our Christmas buffet $23.95 Tomato Florentine, Basil-Cheddar Chowder Salads Tossed Salad w/Assorted Dressings Three-Bean Salad w/Citrus Vinaigrette (garbonzo, kidney, wax) Ham-Tortellini Salad w/Fromage Dressing Carvina Station Peppercorn-Garlic Encrusted Prime Rib with Herb Demi Jus Entries Broiled Marinated Orange Roughy w/roasted red pepper- mango sauce Sliced Roast Turkey w/herb-garlic giblet sauce SGrilled Seasoned Chicken Breast w/cherry brandy demi I 4A TUESDAY, DECEMBER 20. 2005 RTIC US C T FL C o - * v. CI w w 1. -W, * *" Aup m- bm .Om wp 0 b*mw t .ow.0 ft ,, - * S 0 -- "Copyrighted Material Syndicated Content 0 S Available from Commercial News Providers" . * - * -. - * 0 - S - * SPACE S-Continued from Page 1A and another is needed. Growing pains Opened Jan. 2003, the 40,000- S square-Foot, $7-million new addition was unveiled, follow- Sing-more than seven years of planning. Four courtrooms .were added to-the then 22- year-old building, along with extra space for the Clerk of Courts and other court person- nel. Original plans called for a 100,000-square-foot building, but were rejected by county commissioners because of cost issues. At that time, Thomas and others complained the smaller-sized plan would be inadequate to address popula- tion growth. With the courthouse seeing an increase in case filings per month, and a recent Florida Supreme Court report that says the Fifth Judicial Circuit which includes Citrus County is the fastest growing circuit in the state in the past . two years; Thomas is prepared jfr more growing pains. "We're not at critical yet," she said. "If we get a new judge, we can get fairly criti- cal." Numbers game Cu- rrently, four circuit judges, one county judge,. a magistrate and traffic hearing officer handle the 31,053 cases the Clerk of the Circuit Courts -office said were filed this year -According to the same data, 28,521 cases were handled in 2003; the following year, 27,429 cases were handled, according to the same source. The numbers are only expected to increase with the High Court's finding. To address a high caseload, six county judges and three cir- cuit judges were appointed this year to the Fifth Circuit, including Circuit Judge Carol Falvey, 45, of Crystal River, who was appointed to serve as Family Law Judge in Citrus County. .While Thomas acknowl- edged such appointments help with the caseload, space issues only become worse. "We need places to put them. Citrus County is certainly, growing," she said. "The whole Fifth Circuit is growing." Search for space To alleviate the space crunch, Thomas said court- room use is rotated, so a judge who is on the bench can use the court of one who isn't work- ing. A jury assembly room on the first floor also is being ren- ovated to convert into an extra courtroom if needed. John Sullivan, director of courts, said space at the Historic Courthouse next door is also being considered. Al- . though it does- n't have securi- ty systems that would be need- . ed for some felony proceed- ings, he said the second John floor has an old Sullivan courtroom that director of has been used -courts. in the past for a couple ofcivil trials. Sullivan acknowledged the current courthouse is probably too small, saying, "We would like to have seen it a little bit bigger." He added the county had a limited budget at the time, and had to go with the smaller plans. However, he said he meets weekly with court staff to make sure space is used wisely. In the meantime, county spokeswoman Jessica Lambert said Monday the county and court staff will meet in the near future to discuss space needs. She saidissues like population growth aren't just a courthouse problem, and that such offices as the Supervisor of Elections and sheriff's office also face the same problems. "We're looking across the board," Lambert said of find- ing space. Thomas agreed she wasn't alone, saying about the county, "They've got a lot on their plate." PROGRAM Continued from Page 1A decade ago. For the past two and a half years; retired Hernando resi- dent Pat McCormack has been managing, the program. But- now, because of other responsi- bilities in-her life, she is step- ping away from the managing end of the program, although she will continue driving. Pitts highly praised McCormick's handling of the program. "She's been great," he said, but added that he will not be able to pick up the responsibil- ity for organizing the volunteer effort So he's hopirig'to find someone to fill McCormick's shoes. Although he still manages to drive for the weekend meal delivery, he said, "I'm not in good health. I'm 78, and I've run out of energy." The program helps people who can't drive and who have no one to take them to get to their doctor or a medical facili- ty in the county. The require- ments are that they are 65 or older and have no family in the area to help them. They can get one ride a week and have to request it three to five days in advance. McCormack said the coordi- nation is mostly phone work and takes from 12 hours a week to 20 or 30 at the busiest time. Pitts said without the pro- gram the elderly residents who use it would not be able to keep medical appointments without spending a lot of money - money they don't have. "It's probably one of the most impor- tant programs in the county," said McCormack The Doctor Ride program doesn't accept money and never has, Pitts noted. Volunteers do it for the person- al satisfaction of helping peo- ple who need it very much. Although grateful, patients have often offered to pay some- thing, a proud Pitts said. The. point is that those in the pro- gram can't afford to pay. "A dol- lar has never changed hands," he said. Volunteers generally drive 4.41 % 0 APY* : about once a month and spend about two hours or so total, Pitts said. The program coordi- nator sets up the trips, which are probably about five or six a day back and forth between places such. as Inverness, Floral City, Homosassa, Crystal River and Beverly Hills, he said. All realize the importance of what they do. "They just do it joyfully," he said. SWhile the county does have a bus system that will pick up res- idents for a nominal fee, often just going to a doctor's office half way across the county takes all day, with the transfer- ring and waiting. "These people are sick" Pitts said, and a whole day of travel- ing can be excruciating and debilitating for many of them. "I don't want to see this die," Pitts said of the program. "It's too good of a thing." McCormack said the pro- gram is most rewarding for the volunteers. As for the patients, she said, "They're so apprecia- tive. They need us." Anyone interested in coordinating the Doctor Ride program or driving 4 month $25,000 minimum balance Short term. Great rate. Don't wait. Open World's 4-Month Certificate of Deposit (CD) and enjoy a great rate while Institution Term APY you wait for an even greater rate. Your WORLD 4 Months 4.41% deposit is FDIC insured to the legal maximum, and our competition-crushing SunTrust 3 Months 2.00% 4.41% APY is guaranteed for four full months. AmSouth 3 Months 2.25% All we ask is that your deposit of $25,000 or more come from a financial institution other than World So get going Wachovia 3 Months 2.25% to a World branch today. WORLD SAVINGS How may we help you? World Savings rates: 1-800-HOT-RATE (1-800-468-7283) N Wal-Mart as SWorld/13/05. World Savings and the World symbol are registered marks of GWFC. 2005-World Savings N4483-05FW I; III II for it can call McCormack at 464-1033. Pitts added that the group is always looking for volunteer drivers for the Doctor Ride and the weekend meals delivery program. It delivers meals by 2 p.m. on weekends and holidays. For information about that pro- gram, call Pitts at 527-0523. Pitts noted, that Franks Family Restaurant in Her- nando, owned by Bill and Carol Wineski, has provided the meals at no cost to the program for the past six years. He said they began helping when they learned the federal Meals on Wheels program provided meals only on weekdays, and the Wineskis have provided the food ever since, Pitts said. They even go in when they're off for a holiday, just to make sure those needy residents get a meal, he said. You're a classic, you only get better with ag Robert W. Hines :USMC RET Ssgt. SDc. 20, 1955 -- ~ V . 440 Wb O,,W C'mon, get a great rate. I. i n 1 ide Sears 'stal River Mall SEARS 711Ik Mail d 237-1665Cene 79 a-1484sonalOn-o CITRUS COUNTY (FL) CHRONICLE TUESDAY, DECEMBER 20. 2005 5A I - 4w . -- o 40M. - r 6 TESAwDCME 20 205,''n r 'vU! IeflIVIUtp Marie Arsenault, 88 INVERNESS Marie Clair Arsenault, 88, Inverness, died Thursday, Dec. 8, 2005, at Citrus Memorial Hospital. Born April, 17, 1917, in Quebec, Canada to Napolian and Mary Ann (Arbour) Arsenault, she moved to this area in 1981 from Long Island, N.Y. She was a homemaker and a parishioner of Our Lady of Fatima Catholic Church. Her husband, Adrian Arsenault, preceded her in .death on May 1, 2000. She is survived by two broth-' ers, Amedee Arsenault and Albert Arsenault, both of Canada. Chas. E. Davis Funeral Home with Crematory, Inverness. Lucy Banczak, 79 OCALA Lucy Virginia Banczak, 79, Ocala, died Saturday, Dec. 17, 2005, in Inverness. Born Dec. 15, 1926, in Cairo, Ill., to Walter and Clara Caraker, she moved to Ocala in 1981 from Fort Lauderdale. She was a retired Registered- Nurse. She enjoyed traveling, cook- ing and watching the Food Network She was preceded in death by her parents. Surviving are two nieces and two nephews. Hooper- Funeral Home, Inverness. Dolores Foley, 62 INVERNESS Dolores M. Foley, 62, Inverness, died Sunday, Dec. 18, 2005, in Inverness. Born April 21, 1943, in Lowell, Mass., to Armand and Doris (Driscoll) Beaumont, she moved here three years ago from Methuen, Mass. Mrs. Foley was a private care Certified Nursing Assistant She enjoyed playing bingo and scrapbooking. She was Baptist She was preceded in death by her son, Kenneth Foley, in 2005. Survivors include two sons, Kevin Foley of Plaistow, N.H., and Bruce Foley of Manchester, N.H.; one brother, Armand H. Beaumont Jr. of Inverness; four sisters, Priscilla Beaumont and Sandra Augusta both of Methuen, Mass., Doreen Stanwood of Arizona and Marjorie Aspland of California; and five grandchil- dren. Chas. E. Davis Funeral Home with Crematory, Inverness. Elsie Lowther, 81 CRYSTAL RIVER Elsie E. Lowther, 81, Crystal River, died Saturday, Dec. 17, 2005. She was born Jan. 26, 1924, in Columbus, Ohio, to William and Belle Armentrout, and moved .to Crystal River 18 years ago from Deerfield Beach. She was a home aker and she was Baptist. She was pre- Elsie ceded in death Lowther by her husband of 58 years, Jack E. Lowther, in 1995. Survivors include five daughters, Martha Adams and Susie Stephens both of Columbus, Ohio, Alice Tade of Pompano Beach, Sandra Mecyssine, 64 CRYSTAL RIVER Sandra J. Mecyssine, 64, Crystal River, died Saturday, Dec. 17, 2005, in Lecanto. A native of Calumet City, Ill.,. she moved to this area five years ago from Orlando. She was a retired cashier in the retail industry. She enjoyed cooking and watching butterflies and she was a great friend to all who knew her. She was Christian. She was preceded in death by her father, Samuel Huston, and a sister, Roberta Huston. Survivors include her daugh- ter, Rhonda L. Walker and hus- band, Chris, of Windermere; granddaughter, Lauren Walker of Windermere; grandson, Dalton Walker of Windermere; mother, Evelyn Huston of Leesburg; sister, Janet Mize of Beverly Hills; three brothers, Walter Huston of Santa Rosa Beach, Jim Huston of Monee, Ill., and Donald Huston of Leesburg; and many nieces and nephews. Fero Funeral Home, Beverly Hills. Lillian Medeiros, 70 INVERNESS Lillian C. "Lil" Medeiros, 70, Inverness, died Saturday, Dec. 17, 2005, at the Hospice Care Unit at Citrus Memorial Hospital in Inverness. Mrs. Medeiros was born April 1, 1935, in Sydney Mines, Nova Scotia, to Jackie and Katie Vickers and moved here in 1994 from Norwalk, Conn. She was a retired hospital unit secretary in Norwalk for more than 20 years. She was a member of the Women of the Moose No. 2112 and Eagles Aerie 3992, both of Inverness. She was Catholic. Her husband, Jesse Medeiros, preceded her in death Oct 10, 2002. Survivors include her daugh- ter, Patricia Nolan of Santa Ana, Calif.; one brother, Joe Vickers of Ontario, Canada; six sisters, June Stanley of Inverness, Kay Metcalf of Cox Heath, Nova Scotia, Eileen McNeal of North Sydney Nova Scotia, Patsy Lee ,of Sydney, Nova Scotia, Maureen Hopkins of Calgary, Canada, and Mary Thorne of North Sydney, Nova Scotia; dear friends, Bill and Krystyna Green of Inverness and Peter and Jean Banks of Inverness. In lieu of flowers, memorials are suggested to Hospice of Citrus County, PO. Box 641270, Beverly Hills, FL 34464. Chas. E. Davis Funeral Home with Crematory, Inverness. Evelyn 'Kim' Pulphus, 64 BEVERLY HILLS Evelyn J. "Kim" Pulphus, 64, Beverly Hills, died Sunday, Dec. 18, 2005, in Beverly Hills. She was born April 5, 1941, and she moved here three years ago from her native Cincinnati, Ohio, where she was a computer operator for Belcan industries. She was a member of Mac World Addicts and she loved her dogs and the ocean. She was a member of Kenwood Fellowship in Cincinnati. She was preceded in death by her husband, Alex Pulphus, in 1974; and a brother, Michael Bocklett Survivors include best friend and companion, Charles Tolliver of Beverly Hills; two sons, William Thornhill and wife, Tammy, of Cincinnati, Ohio, and Kevin Tolliver of Columbus, Ohio; two daughters, Alexis Chappell and husband, Michael, of Cleveland, Ohio, and Angela Boone of Los Angeles, Calif.; her mother, Dorothy Connor and husband, Thomas, of Cincinnati, Ohio; six brothers, Danny Bocklett of California, Gary Bocklett, George Bocklett, both of Cincinnati, Ohio, William Bocklett of Atlanta, Ga., Vincent Bocklett and Tim Bocklett, both of Cincinnati, Ohio; four grandchildren; and one great-grandchild. Hooper Funeral Home, Homosassa. George Roberts, 78 HOMOSASSA George Basil Roberts, 78, Homosassa, died Monday, Dec. 12, 2005, in Crystal River. Mr Roberts was born Nov. 5, 1927, in New York City, N.Y, to George and Jenny Roberts. He was a mason. He is survived by his son, William J. Turner of Spencer, WVa. Hooper Funeral Home, Homosassa. Arthur Schineller, 80 HERNANDO Arthur J. Schineller, 80, Hernando, died Saturday, Dec. 17, 2005, in Inverness. Born Feb. 1, 1925, in Brooklyn, N.Y, to William and H e r m i n a Hermina (Heft) Schi- neller, he moved here in 1995 from Baldwin, N.Y. Mr Schineller was a World War II Army Battle of the Bulge survivor Prior to retiring, he was employed as a plumber for the Town of Hempstead. He was Catholic. He was preceded in death by his parents; his wife, Florence Schineller, Dec. 22, 2003; three brothers, Herman, William and Joseph Schineller; and four sisters, Marie Masi, Julia Schineller, Emma Schineller and Wilhelmena Avery. Survivors include two daughters, Sally Piechotta and Judy A. Velsor and husband, Allen, all of Inverness; a sister, Theresa Stokel of Elmont, N.Y; a sister-in-law, Ursula Louise Milatz of Long Island, N.Y; seven grandchildren; and five great-grandchildren. Hooper Funeral Home, Inverness. Lee Schlee, 91 SARASOTA Lee Woodruff Schlee, 91, Sarasota, formerly of In- verness, died Friday, Dec. 16, 2005, in Sarasota. Born Feb. 22, 1914, in Ellisburg, Pa., to Peter and Nora Schlee, he moved here in 1980 from Hallandale before moving to Sarasota. Mr Schlee was a Navy veter- an serving in World War II and a construction supervisor. He was preceded in death by his first wife, Winifred Arlene Schlee, March 29, 1995; broth- er, Harvey Schlee; and sister, Hazel Huey He is survived by his wife, May Schlee, of Sarasota. Hooper Funeral Home, Inverness. Lucille Shull, 83 INVERNESS Lucille M. Shull, 83, Inverness, died Saturday, Dec. 17, 2005, in Inverness. Born Jan. 10, 1922, in Dansville, N.Y, to George and Gretchin Conklin, she moved here in 1981 from Hulberton, N.Y Mrs. Shull was a former sec- retary for the Board of Education business manager. She was a graduate of Rochester Business Institute. She was a member of First Presbyterian Church, Inver- ness, the Inverness Woman's Club and FHM Ladies Auxiliary American Legion, Holley, N.Y She sang in choir since 1981; secretary for the Presbyterian Women;, helped in the kitchen for church meals and was a bookkeeper at church. She' was preceded in death by two sisters, Catherine Robinson and Alice Walker. Survivors include her hus- band of 62 years, Clair Shull of Inverness; two sons, James S. Shull of Holley, N.Y, and John M. Shull and wife, Lori, of Holley, N.Y; a brother, Donald W Conklin and wife, Nancy, of Dansville, N.Y; four grandchil- dren, Becky Klimchuk, Matthew Shull, Erin Shull and Kari Shull; and two great- grandchildren. ,Hooper Funeral Home, Inverness. Mildred Williams, 75 LECANTO Mildred L. Williams, 75, Lecanto, died Sunday, Dec. 18, 2005, at her home under the care of her family and Hospice of Citrus County. Mrs. Williams was born April 21, 1930, in Miami, to Arthur and Leodia (Faske) Fairbrother and she moved to this area 21 years ago from Hialeah. She was a dental assistant and a homemaker She was Catholic. She was preceded in death by her sister, Dorothy Perry, in 2004. Survivors include her hus- band of 54 years, Earl G. Williams of Lecanto; one son, Brian Williams of Detroit, Mich.; one daughter, Janet Peck and husband, Robert, of Cheyenne, Wyo.; one brother, Luther Fairbrother of South Miami; and four grandchil- dren, Zachary and Alexandra Peck, Randall and Brian Williams. Strickland Funeral Home, Crystal River Click on- cleonline.com to view archived local obituaries. Funeral NOTICES Marie Clair Arsenault. The Mass of Christian burial for Marie Arsenault will be offered at 1 p.m. Tuesday, Dec. 20,2005, from Our Lady of Fatima Catholic Church. Inurnment will follow at a later date in Fero Memorial Gardens of Beverly Hills. Lucille M. Shull. The service of remembrance for Lucille M. Shull, 83, Inverness, will be conducted at 3 p.m. Wednesday, Dec. 21, 2005, at the First Presbyterian Church of Inver- ness with Pastor Craig Davies officiating. Friends may call from 2 to 5 p.m. Tuesday (today) at the Inverness Chapel of Hooper Funeral Homes. Cremation will be under the direction of Hooper Crematory. Mildred L Williams. Calling hours for Mildred L. Williams, 75, Lecanto, will be from 3 to 5 p.m. Thursday, Dec. 22, 2005, at the Strickland Funeral Home Chapel in Crystal River In lieu of flowers, the family suggests that those who wish may make a memorial donation to Hospice of Citrus County at PO. Box 641270, Beverly Hills, FL 34464. Private cremation arrangements under the direc- tion of Strickland Funeral Home, Crystal River. WdmatXC (X-w&d in Nn ukldin* dzpu te "Copyrighted Material Syndicated Content -n n.Bui Available from Commercial News Providers" Now Open! All Seasons RV Consignment & Tractor Sales Tractors Boats RV's Auto Over 20 Years Experience .- Y GIs Your RV Fi dH eIn A Storage tI a For kaleP ilding Beautiful Homes, .and Lasting Relationships! 1-800-286-1551 or 527-1988 5685 Pine Ridge Blvd. STATE CERTIFIED: CBC042359 DENTURE LAB ON PREMISES No CHARGE FOR INITIAL CONSULTATION OR SECOND OPINION FEE FOR NECESSARY X-RAYS C. N. Christian III, D.D S., PA. CITRUS HILLS DENTAL Located in the Hampton Square at Citrus Hills MOST INSRANCEACCEPTE (352) 527-1614 - CIas. E. Iacii 'Funera[l Home Wit, Crematory Walter Marciniak Mass: Fri.. 1/6/06 Our Lady of Fatima Marie Arsenault Masss: Tues., 1pm Our Lady of Fatima Lester Hambel Services: Weds.. 10am Chapel Burial: Oak Ridge Cemetery Betty Stalbaum Service: Wed..3pm Chapel Denton Shaw Service: Fr..(1230) 2pm Chapel Burial: Beveriy Hills Lillian Medeiros Pnrvate Cremation Arrangements Ed Worcester Private Cremation Arrangements 651726-8323 551095 6A TUESDAY, DECEMBER 20, 2005 Cnnus Counvy (FL) E 7A TUESDAY DECEMBER 20, 2005 Drive safe, save lives AARP courses bring skills, discounts Special to the Chronicle Mature drivers, 50 and over, should take the AARP Driver Safety course as Sa refresher. It is designed to teach compensating skills to the older driver. You do not have to be a Florida resi- dent nor an AARP member to register. There is a course fee of $10 per per- son and many insurance companies offer a premium discount to partici- pants Community Center, There is a course fee of $10 per person and many insurance companies offer a premium discount to Participants who complete the course.. FFWC Fall Tour RIGHT: Crystal River Woman's Club members attending the Florida Federation of Women's Clubs District 5 Fall Tour in Ocala Oct. 20 were, from left, seat- ed: Naomi Gray, Mary Lou Rothenbohl, president; Andree Mergen, International Affairs chair- man; Helen LeFave, second vice president. Standing: Lili Baker, histori- an; Holly Oder, past president; Ruth Levins, chaplain and Pauline Grogan. ;,;FAR RIGHT: President Mary Lou Rothenbohl is shown with FFWC President-elect Pat Keel and Claudia Edwards, District 5 direc- tor. LEFT: Representing the Inverness Woman's Club were: standing, Fran Pierce; seated Maxine Henderson on the left and Sandra Koonce on the right. Special to the Chronicle Fire Safety House seeks workshop participation Special to the Chronicle Do you like having fun teach- ing children to be fire safe and have the time to help? Those at Fire Prevention need your help with the Fire Safety House. From April 1997 to April 2005, the Fire Safety House has been presented to 12,620 par- ticipants (86 percent are chil- dren) in 1,037 workshops at 184 functions. Most programs are present- ed to the elementary schools. The Fire Safety House pro- gram is extremely important to prevent fire injuries and deaths. The Fire Safety House can be credited with reducing the number of children fire deaths in Citrus County. Fire Prevention will provide the necessary training to pres- ent the fire safety programs and to operate the Fire Safety House. Anyone who has the time and desire to assist in the Fire Safety House program, contact Kenneth Clamer at the Fire Prevention Office (527-5407) for more information. Talent starts young Playhouse 19, Gulf Islands Civic Theatre and the Performing Arts Group out at the Citrus County A r t Art Center please take note an otd Ruth Levins send AROUND THE o u t COMMUNITY your talent scouts to Lecanto High, Citrus High and Crystal River High. The bud- ding performing artists of the schools drama groups are amazingly talented. Lecanto's Panther Players recent production of "Jekyll and Hyde" The Musical by Steve Cuden and Frank Wildhorn from the book and lyrics of Leslie Bricusse and Music by Frank Wildhorn, based on the story by the heralded writer Robert Louis Stevenson was a sell- out success at Curtis Peterson Auditorium. With more than 30 musical numbers, the two-act pres- entation included lavish cos- tumes for the nine scenes in the first act and seven scenes in the second act Directed by Beth Bedee, the 31 members of the cast were right on cue in the pre- cision-challenged routines required of them. Assisting Bedee with the choreogra- phy were Saxon George- White and Katie Lowery. The vocalists were mature beyond their years. An emo- tionally charged perform- ance "Hyde the Musical" was entertainment at its finest. Seniors David Watson, as John Utterson, Steven Jenks, as Dr. Henry Jekyll and Mr. Edward Hyde, Stephanie Coatney, as Lucy Harris and Lindsey Smith, as Emma Carew, all mainstays of the drama group will be missed. All plan to pursue the arts in college. With a mere fling of his abundant hair, Jenks cap- tured his Jekyll-Hyde role in an intense tormented and powerful revelation that left us awe struck The Crystal River High School Players presented "Up the Down Staircase," dramatized by Christopher Serge and directed by Catherine Tweeddale Tate. Quoting Robert Browning "A man's reach should exceed his grasp," the troupe of players of 10 students as fac- ulty members and 20 stu- dents as students ... a high school setting within a high school was a perfect fit. The two-act play was a nostalgia trip for this former teacher, especially the open- ing scene for the Sylvia char- acter, played expertly by Annelise Reding as she tried to teach the importance of first impressions and was thwarted by mounds of paper work and messages from the principal. Annelise Reding gets the Oscar for her role as Sylvia Barrett, the beginning teacher who, rejected at first by the students, by the end of term was deeply loved and appreciated by blazing a trail instead of conformity in her classroom. Over at Citrus High, Charles Dickens classic "Christmas Carol" was performed three times for a growing number of drama fans countywide. Let's support the drama departments of our local high schools. I guarantee you'll be thoroughly enter- trained. Ruth Levins participates in a variety of projects around the community. Let her know about yourgroup's upcoming activities by writ- ing to P.O. Box 803, Crystal River FL 34423. Father Christmas 2005 Special to the Chronicle Anthony J. Palumbo, M.S., S.A., chief executive officer of Hospice of Citrus County, was chosen by the Father Christmas Ball committee to be Father Christmas 2005. Each year, the committee chooses a person who makes a positive difference in the lives of our citizens. Palumbo spoke of the new Hospice House in Lecanto that has 16 beds and that Hospice volunteers are always needed. Palumbo and Hospice touch the lives of us all. Citrus County Cruisers Special to the Chronicle The Citrus County Cruisers recently installed the new officers for 2006, shown from left: Doug Thomas, member at large; Jim Moran, member at large; Dick Bump, treasurer; Sandy Hawkes, secretary; Ricky Olpinski, president; Dick Rausch, vice president; Roland Sorel, member at large. - SA TUESDAY, DECEMBER 20, 2005 STOCKS CITRUS COUNTY (FL) CHRONICLE THEMAR MOST ACTIVE (S1 OR MORE) Name Vol (00) Last Chg Pfizer 1334962 24.32 +1.74 Lucent 485735 2.90 +.07 Merck 376336 32.25 +2.24 TimeWam 249951 17.95 -.05 FordM 201032 8.23 -.07 GAINERS (52 OR MORE) Name Last Chg %Chg RPCs 25.80 +2.47 +10.6 Pfizer 24.32 +1.74 +7.7 Tektronx 29.25 +2.07 +7.6 ChileFd 16.91 +1.18 +7.5 Merck 3225 +2.24 +7.5 LOSERS (S2 ORMO RE) Name Last Chg %Chg FTI Cnslt 26.93 -2.80 -9.4 BrasilTele 14.65 -1.08 -6.9 ParPharm 30.23 -2.22 -6.8 GrafTech 6.19 -.44 -6.6 Koor 10.44 -.70 -6.3 DIARY Advanced Declined Unchanged Total issues New Highs New Lows Volume 947 S 2,421 153 3,521 69 94 2,211,443,790 MOST ACTIVE (S1 OR MORE) Name Vol(00) Last Chg SPDR 471445 125.71 -.65 iShRs2000s225582 67.00 -.84 SP Engy 194042 50.75 -.32 SemiHTr 142149 37.12 -.92 OilSvHT 105169 128.70 -1.67 GAINERS ($2 OR MORE) Name Last Chg %Chg AccesslT 11.10 +1.48 +15.4 SilverlfRn 4.29 +.54 +14.4 CGIHIdgn 2.28 +.24 +11.8 TanRnggn 4.79 +.49 +11.4 GeoGlobal 12.05 +1.07 +9.7 LOSERS ($2 OR MORE) Name Last Chg %Chg Palatin 2.85 -.60 -17.4 SulphCon 8.75 -1.10 -11.2 MTSMed 6.20 -.69 -10.0 BirchMtgn 7.14 -.73 -9.3 Terremkrs 4.52 -.42 -8.5 DIARY Advanced Declined Unchanged Total issues New Highs New Lows Volume 3416 591 95 1,032 36 23 274,978,974 MOST ACTIVE (Si oR MORE) Name Vol (00) Last Chg Oracle 878044 12.32 -.37 NasdlOOTr Microsoft SiriusS Cisco 731239 40.92 670798 26.83 599694 6.67 463627 17.47 GAINERS ($2 OR MORE) Name Last Chg %Chg Ault nc 2.87 +1.14 +65.9 HaupgDig 5.51 +1.51 +37.8 VocalTecn 7.37 +1.74 +30.8 Stereotaxis 8.75 +1.70 +24.1 Dynavax 4.79 +.68 +16.5 LOSERS ($2 OR MORE) Name Last Chg %Chg Phmcyc 3.30 -5.90 -64.1 PooreBros 2.57 -.66 -20.4 Oilgear 9.89 -2.11 -17.6 AvalonPhn 4.28 -.67 -13.5 IRISInt 22.36 -3.05 -12.0 DIARY Ad. inied 955 Declined 2,132 Unchanged 130 Total issues 3,217 New Highs 80 New Lows 74 Volume 1,734,995,751 serrannual declaration, unless otherwise footnoted. Name: Stocks appear alphabetically by the company's full name .(not its abbreviation). Names consisting of Initials appear at the beginning ol each letter s list Last: Price stock was irad.ng at when exchange closed for the day. Chg: Loss or gainfor the day. No change Indicated by ... N-m 1-1 Div Hm tiro ChB i 11D 10J 1 9 75 1 D g m0 1, SAC'/ln 1 T.O ACM; EG -1 Slock Footnotes. :.: iFE ei6 jrfr Irr.n 93 11d iw.u rn,- [. : ll.l Ic.I [rdam'p I..c, r. P PPE Hl L. Ch .:.:.mpany rj. l ic, ,2 ,i d&,] Ljo6a in I.il 1: r,.ai C. C .mpnr, Ir.n larly li:lcd a a 11 C",I ? \13 .:n r.,n Aman.:'r, E.r.r irang ; Em ilr C',m;a.yr. lal:rh lla-.:e r n'l .- er and 3'' , ,9': in Carind-lln Jollar, h e.Tio.saryl ame I.jrm rai. saq ,:jplall 3and srlu lsT,, 0 \ .. -11. i qu i.a I.aio'. r. Slioc1 wusi a ,r.a I .uc In i bi HiBT yearr Tr ,e 52 nlJ h ar.dJ l I I ijul A " .1Ia o nl Itrom inFr. jlrn- ,r, .1 Iad.-lli pti Palai',io il.,: in.J P, r cl..rn [ Ui l l~, Holieil owe. ;nsiirri.ri. of .urchs pri,.e q Ci.ieda..i m.uiuil fu.j.d PE ia u, c i,c-ii e1 If Riglhr tO uy i.ur. aT a I pf:-lia pr'. i .101. ha I ,pl. L at i a l IpP ,l' 1 .. i . wrin Ihih bAl v"gr ai-Th.ls *.I, r, Bniol hsn c. r16 liiiupl ma] *I -jn.ln t enin ula.re iv yarr ailw-ng a purine aeni d wn .hr IUr *13.. iiuei '1 ur. i Wen ,.*, . IrCuadin m.:. irn,wn .on .e.:unII *.i Cormpany In 5anl2upicy ur inCiaiiinip or I.i ; ,, ,c:,l a ,all .3 unad l In. E i? 1ruli lcy law Appears in lio.rl .r I ir-i, '. > ; Dividend Footnoles: a E>lea dl..ldealsnd aI~ pald l 6 ul a le ,o ,iidad b Anr, nul f. plui soil, C L Uqaidallrng divllda.rE AT.c.mun a'lbra.l] ur paid h' 1lr T 12 nin l r,i r,6 I .- j Canern annual rele awlOen lwas increasfA DO mosi recear aillaenld announciemren i - Sum ol dlwdands pa..l al8tr l8toK Scpill no igular rSat I" Sum ol d.ludends paid inr. yiar y'rua- .r Mosi r4icTrrl ala ana i s umilld ir dalesraoa Declareaoi paidJ r i yearr aclmulal.B i aELI iimS nllrn drl.idena iI aiR.srs m Current annual islare aldh V s'jeciadb DY iTL'br .i,1, M'!r . recent i olaii1 anrrunceBrmeni p inllla divldend annual late noti nan yeld no 11 , trnoi,r r Declared or pala i prIn ending 12 months plui aSoci dividnd I Padl in eliOL appioImale L asr. value on a.-ij.iribullor, date Source: The Associated Press. Sales figures are unofficial. I STOC S O OAS ITRS YTD Name Div YId PE Last Chq %Chg Name AT&T Inc 1.33 AmSouth 1.04 BkofAm 2.00 BellSouth 1.16 CapCtyBk s.65 Citigrp 1.76 Disney .27 EKodak .50 ExxonMbl 1.16 FPLGps 1.42 FlaRock s .60 FordM .40 GenElec 1.00 GnMotr 2.00 HomeDp .40 Intel .40 IBM .80 -.13 -3.6 -.30 +2.5 -.44 -1.0 +.09 +.2 -.95 +9.7 -.20 +2.1 -.16 -11.7 -.49 -26.9 -.36 +12.6 -.19 +14.4 -1.35 +29.3 -.07 -43.8 Div YId PE Last YTD Chg %Chg LowesCos .24 McDnlds .67 Microsoft .36 Motorola .16 Penney .50 ProgrssEn 2.42 SearsHldgs .. SprintNex .10 TimeWarn .20 UniFirst .15 VerizonCml.62 Wachovia 2.04 WalMart .60 Walgrn .26 52-Week Net % YTD 52-wk High Low Name Last Chg Chg % Chg % Chg 10,984.46 10,000.46 Dow Jones Industrials 10,836.53 -39.06 -.36 +.50 +1.64 4,190.55 3,348.36 Dow Jones Transportation 4,108.15 -34.34 -.83 +8.16 +10.11 438.74 319.75 Dow Jones Utilities 412.14 -5.68 -1.36 +23.05 +23.69 7,867.59 6,902.51 NYSE Composite 7,778.59 -35.41 -.45 +7.29 +9.30 1,778.74 1,186.14 Amex Index 1,754.05 -6.93 -.39 +22.29 +24.00 2,278.16 1,889.83 Nasdaq Composite 2,222.74 -29.74 -1.32 +2.17 +4.46 1,275.80 1,136.15 S&P500 1,259.92 -7.40 -.58 +3.96 +5.46 693.63 570,03 Russell 2000 672.25 -10.84 -1.59 +3.17 +5.36 12,787.08 11,195.22 DJ Wilshire 5000 12,595.49 -93.20 -.73 +5.22 +6.99 NEWYORKaSTOCKaEXCHANG Div Name Last Chg ... ABB Ld 9.18 +.03 .92 ACELtd 53.42-1.38 .66 ACMlnco 8.24 +.01 ... AESCplf 15.91 -.32 .44 AFLAC 46.99 -.58 1.481 AGLRes 35.00 -.30 .AKSteel 7.69 -.19 1.92 AMURs 37.88 -.10 ... AMR 21.76 -.29 .90e ASAUd 52.91 +.04 1.331 AT&TInc 24.83 -.13 1.75 AT&T2041 25.10 +.03 .38r AUOpion 13,68 -20 .79e m XA 31.68 -.46 1.10 AbtLab 40.43 +26 .70 AberFlc 63.01 -.33 .30p Accenhre 28.20 -.39 .86e AdamsEx 12.61 -.07 .30 Adesa 24.17 +.04 .. AdvMOpt 42.05 -.11 .. AMD 28.12 -.05 ... Aeropsi 23.88 -.75 .041 Aenas 94.23 -2.37 .. AffCmpS 56.17 +.64 .Agerers' 12.83 -27 .. Agilent 35.05 -.25 .03 Agnicog u18.41 -.17 .. Ahold 7.57 -.07 128 AirProd 59.30 -.02 .. Airan 14.54 -.38 .76 Albertsn 23.86 -.47 1.81 Albrtsnun 24.35 +.10 .60 Alcan 39.72 +.07 .. Alcatel 12.90 -.04 .60 Alcoa 28.55 +.32 .99e Alcon 131.40 -6.17 .. AlgEngy 31.86 -.19 .40 AlegTch 33.01-1.09 .40 Mergan 107.51 -1.03 126 Allete 45.11 -.76 2.80e AlliCap 56.57 +.11 AlliData 35.15 -.70 .89 AIWrld2 12.27 -.02 .. AdWaste 8.95 -.18 1.28 Allstate 54.16 -.13 1.54f Alltel 64.01. +.05 .. AlphaNRsn 19.00 +.18 .18 Alpharma 28.42 -1.70 3.20 Alria 76.58 -.74 .Amdocs 27.00 -.94 1.20 AmHess 125.53-1.12 2.54 Ameren 51.72 -.55 .62i AMoIalLs 30.00 +.04 .60 AmAxde 18.38 -.16 1.48f AEP 37.00 -.42 .04f AEqlnvf 12.87 -.13 .48b AmExp 51.27 -.66 1.08 AFndRT 12.12 -.20 .60 AmlntGpof 65.82 +.67 .38] AIPCIf 8.06 +.46 .60 AmStand 39.97-1.29 .78 AmSIP3 10.58 +.02 .AmTower 26.83 -.26 ... Ameridt 25.31 -21 e224 Ameigas 29.08 +.03 .20 AmerisBg 80.90-1.03 1.04f AmSouth 26.55 -.30 .72 Anadrk 95.97 +.15 .24 AnalogDev 36.78 -.92 .56e AnglogldA 48.62 -.81 1.08 Anheusr 44.27 -.01 .. AnnTaylr 33.36 +.01 1.44e Annaly 11.36 -.19 .. Anteon 54.14 -.24 .80e Anworth d7.46 -.13 .60 AonCorp 35.83 -.32 .401 Apache .69.17 -.33 .17 ApplBio 26.26 -.53 .431 AquaAms 2f.49 -27 .. Aquila 3.65 -.13 .281 Aramark 26.67 -.29 .32 ArchCoal 79.48 +.51 .34 ArchDan 24.56 -.50 1.73 ArchstnSm 42.37 -.36 ... ArowEl 31.93 -.04 .40 ArvMert 14.25 -24 1.10 Ashlandn 55.86 -.72 .68 AsdEstat 8.99 -.03 .32 Assurant 41.38 -.85 1.03e AstraZen u49.50 +1.08 1.26f ATMOS 26.38 -.42 .. AutoNaI 22.08 -.52 .74f AutoData 46.37 -.23 ... AutoZone 91.98 -.18 .. Avaya 10.49 -.11 Avial 28.25 -.59 .66 Avon 29.19 -.11 1.52 BB&TCp 42.83 -.55 .68e BHPBilLt 32.33 +.03 .20 BJSvcss 37.39 -.58 ..BJsWhls 30.00-1.29 ... BMCSft 2028 -.07 2.09e BPPLC 6528 -.44 2.081 BRT 24.62 +.12 .52f BakrHu 60.12-1.15 .40 BalCp 39.86 -.28 .79e BcoBrads 28.91 -1.16 .48e Bncoltaus 23.49 -1.09 2.00 BkofAm 46.53 -.44 .84 BkNY 31.77 -.24 .72 Banta 49.72 -.37 .52 Bard 67.18 +.27 ... BarrPhm 60.32 -.46 22 BanickG 26.84 -.22 .52 BauschLIf 79.56 -2.17 .58e Baxter 37.90 -.61 1.121 BearSt 115.20 -2.37 .. BearingPIf 7.54 -.08 .40 BeazrHm s 69.35 -.90 .861 BeclDck. 59.29 -.13 1.16 BellSouth 27.85 +.09 .20 Berkleys 45.71 -1.99 .32 BestBuys 43.71 -1.25 .. BigLots 11.75 -.25 1.28 BIkHICp 35.36 -.56 .75a BIkFL08 15.09 +.06 .50 BlockHRs 24.22 +.05 .04j Blockbstr 3.88 +.08 .04 BlckbsftB 3.45 +.10 .57e BlueChp 6.42 -.04 1.20f Boeing 69.97 -.78 ... Bombay d2.76 -.08 .40f Borders 20.92 -.37 .. BostBeer 25.59 -.61 2.72a BostProp 74.50-1.18 ... BostonSc 25.61 -.03 .80 Bowatr 29.95 -.46 .40 Brinker 38.45 -.12 1.12 BrMvSa 22.49 +.47 .60 BungeLt 54.25 +.28 .80 BurNSF 66.61 -.68 .40 BurlRsc u86.34+1.24 ... CCESpnwi 10.80 +.05 2.16 CHEngy 46.05 -.60 .10 CIGNA 109.57 -1.78 .64 CITGp 51.64 -.67 .16 CKERst 13.43 -.59 ... CMSEng 14.56 -.27 .48 CSSlnds 31.81 -.23 .521 CSX 48.74 -.60 .15 CVSCps 27.64 -.62 ... CablvsnNY 23.15 -.85 .16 CabotO Gs46.36 -.18 .91e CadbyS 37.40 -.64 .28 CallGol 13.89 -.36 .24 Camecogs 61.52 +1.02 .72 CampSp 30.33 +.02 .24 CdnNRsgs 50.78 -.34 .11 CapOne u86.00 +.26 1.26 CapMpfB 12.70 +.20 .24 CardnlHIth 68.00 -.84 .. CaremkRx 51.75 -1.36 CarMax 27.05 -.34 .80 Carnival 53.04 +.39 1.00 Caterpils 56.83 -281 ... Celanesen 19.64 +.35 1.18e Cemex 59.32 -.68 .44 Cendant 16.50 -.23 .24m CenterPnt 13.01 -.29 1.71 Cen pPr 49.43 .16 Centex 70.09-1.32 .24 CntryTel 33.56 -.20 .. ChmpE 13.93 -.20 .. ChRvLab 42.25 -.60 .01 Checkpnt 24.08 -.40 .20 Chemtura 12.25 -.25 .20 ChesEno 32.09 +.03 1.80 Chevron 56.75 -.76 1.84 ChiMerc 367.15-1.86 ... Chlcoss 43.50 +.25 .40 Chiqluita 19.99 +.12 1.72 Chubb 95.48 -1.08 1.48e ChungTel 17.95 +.02 .16 Cimarex 40.70 -.51 .. CinciBell 3.70 -.05 1.92 CINergy 41.68 -.32 .07 CirCiv u22.70 +1.45 1.76 Citfo 49.17 -.20 1.00 CitzComm 12.75 -.10 .40a ClairesSirs 28.94 -.23 .75a ClearChan 32.68 -.20 1.161 Clorox 57.75 +1.99 .. Coachs 33.12 -.76 .16 CocaCE 19.80 -.10 1.12 CocaCI 41.42 +.21 ... Coeur 3.92 -.13 1.16 ColgPal 55.88 -.06 .61 ColBgp 24.10 -.16 .65a Collnlln 8.11 -.03 2.20 Comerica 57.49 -.26 .44 CmcBNJs 34.13 -.67 .24 CmdMtls 35.39 -1.68 .. CmtyHt 38.76 -.29 1.13e CVRD 40.12 -1.04 .83e CVRDpf 34.92 -.43 .16 CompAs 28.30 -.73 CompSc 49.10 -.09 1.09 ConAgra 20.60 +.09 124 ConocPhils 58.60 +1.25 ... Conseco u22.91 -.19 .56 ConsolEgy 65.51 +.45 2.28 ConEd 46.53 -.32 .ConstellAs 25.45 +.43 1.34 ConslellEn 59.10 -2.52 ... CirB 19.98 -.25 .. Cnvgys 16.97 -.15 .. CoopCams 41.07 -.22 .06 CooperCo 48.33 -.64 C:.j:l.:.L 1u,2 0 30 ':.:.,i,,,,r . -m .09e CorusGr 10.10 -.08 .60 CntwdFn 35.25 -.19 .. CovantaH 14.66 +.11 .. Coventys 55.90-1.18 .. CwnCstle 27.20 -.02 .. CrownHold 19.39 -.32 1.20 Cummins 87.85-1.16 .. CypSem 14.22 -.44 .78a DNPSelct 10.34 -.11 .96 DPL 25.73 -.30 .36 DRHorins 36.57-1.24 2.06 DTE 43.67 -.53 1.93e DaimlrC 51.08 +.14 .04m DanaCplf 6.85 +.05 .08 Danaher 55.72 -.07 .40 Darden 38.21 -.60 SDeanFds 37.71 -.39 1.560 Deere '69.42 -.60 .80e DeutTel 16.52 -.18 .30 DevonE 63.68 -.49 .50 DiaOffs 67.59 -.61 .82 Diebold 37.93 -.39 .16 Dillards 24.05 -.21 .:. DirecTV 13.90 +.10 .27f Disney 24.54 -.16 .18 DollarG 19.11 -.06 2.68 DomRes 80.50 -.37 1.04 DonlleyRR 34.37 -.35 .32m Doralinlf 10.58 -.16 .68 Doser 40.90 -.50 1.34 DowChm 43.63 -.09 1.00 DowJns 36.35 +.79 1.48 DuPont 42.15 -.35 1.24 DukeEgy 27.04 -.24 1.88a DukeRy 34.10 -.62 1.00 DuqUght 16.80 -.07 .. Dynegy 4.67 -.10 .. ETrade u21.05 -.17 .72m ECCCapn 2.34 -.03 .. EMCCo 13.48 -.23 .16 EOGRess 77.01 -.64 1.76 EastChm 51.02 +.14 .50 EKodak 23.59 -.49 1.24 Eaton 66.89 -.37 .401 Ecolab 35.47 -.23 1.08f Edisonlnt 45.90-1.18 .16 EIPasoCp 12.31 ... Elan 13.25 -.35 .20 EDS 23.40 -.08 1.78f EmrsnEl 75.46 -.06 1.28 EmpDist 20.66 -.32 ... Eulex 19.73 -.44 3.70 EnbrEPtrs d43.84 -.81 .30 EnCanas 46.73 -.18 .91e Endesa 25.88 -.15 1.00 EndurSpec 35.00 -.06 ... EngyPrt 22.19 -.45 ... EnPro 27.66 -.62 .10 ENSCO 45.55 -.22 2.16 Entergy 69.80 -.60 .84 EqtRess 36.90 -.20 .68 Eqtylnn 13.97 +.26 2.00 EqOffPT 29.05 -.05 1.77f EqtyRsd 39.30 -.56 .44 EverestRe 97.05 -2.44 1.60 Exelon 53.55-1.04 1.16 ExxonMbl 57.70 -.36 1.42 FPLGps 42.76 -.19 ... FCnslt 26.93 -2.80 FairchldS 17.37 -.61 .38 FamDIr 22.87 -.08 1.04 FannieMIf 47.24 -.27 .32 FedExCp 99.23 -.67 .24 FedSignl 15.03 -.28 1.00 FedrDS 64.78 -.19 2.00 Ferrellgs 20.99 -.03 .58 Ferrolf 18.69 1.00a RdlNFns 36.74 -.63 1.00 FidlNTtln 24.30 +.14 .24 FrstData 42.66 -1.22 4.12e FFinFds 16.80 -.30 1.80f FstHorizon 39.40 -.03 .48 FstMarb 29.45+1.70 1.60 FtTrFid d17.13 -.21 1.801 FrstEngy 49.12 -.53 .60 FaRocks 51.32-1.35 .36f- FootLockr 23.10 +.10 .40 FordM 8.23 -.07 6.40m FdgCCTgs 38.04 +.16 ... ForestLab 41.70 +.59 .. ForestOil 45.60 -.72 1.44 FortuneBr 78.01 +.17 .40a FrankRes 95.47 -1.54 1.881 FredMac 65.91 -.11 1.00a FMCG 53.00 -.80 .Freescale 25.90 -.46 .FreescB 25.93 -.49 .80m FriedBR 10.57 -.36 .16a FrontOils 40.30 +.10 11.90r Frontline 39.08 -.92 .80 GATX 35.70 -.31 .76a GabelllET 8.05 -.16 ... GameStp 30.87 -.67 1.16 Gannett 61.68 -.14 .18 Gap 18.00 -.24 .. Gateway 2.63 -.09 .. Genentch 89.76 -2.59 1.60 GenDyn 113.63 -.80 1.001 GenElec 35.82 -.24 1.64f GnGrthPrp 46.90 -.60 1.361 GenMills 49.50 -.25 2.00 GnMotr 21.05 -.84 1.56 GMdb33 16.80 -.33 .30 Genworth 33.80 -1.18 .70 GaPacif u47.94 +.10 .83e Gerdaus 15.60 -.78 ... Glamis 24.64 -.51 1.53e GlaxoSKIn 51.97 +.36 .901 GlabalSFe 48.15 -.25 .13e GolUnhassu25.63 -1.01 .le GoldFLtd 16.84 +.19 .18a Goldcrpg 19.65 -.39 .32f GoldWFn 66.66 -.96 1.00 GoldmanS 125.13 -1.37 .80 Goodrich 38.98 -.96 .. Goodyear 17.15 -.35 .. GrafTech 6.19 -.44 .. GranlPrde 43.80 -.57 1.66 GtPlainEn 28.82 -.57 1.00 GMP 29.49 +.34 ... Griffon 23.72 -.38 .34 Gtech 30.50 -.40 .71e GuangRy 14.46 +.11 .40 Guidant 67.10 +.15 .60 HCAlnc 51.48 -.63 .84 HRPTPrp 10.33 -.12 .50 Hallibtn 62.61 -1.11 1.06e HanJS 13.36 -.06 .55 HanPtDiv 8.19 +.11 .68 HanPtDv2 10.22 +.11 ... Hanover 14.12 -.17 .Hanoverlns 38.71 -.55 1.74e Hanson 54.79 -.21 .72f HarleyD 52.30 -.23 ... HarmonyG 12.93 -.01 1.45 HarrahE 67.60 +.40 1.20f HarffdFn 85.57 -.95 .36 Hasbro 20.36 +.07 1.24 HawaiiE 26.02 -.28 2.48 HIICrREIT 33.92 -.38 .24f HItMgt 22.37 -.34 2.64 HIthcrRIty 33.26 -.25 .HealthNel 50.75 -.97 .HedaM 3.55 -.07 1.20 Heinz 34.42 -.39 ... HellnTel u11.17 +.21 .98 Hershey 57.70 -.16 .32 HewlettP 28.87 -.05 1.70 -s,.r,a.PI 28.63 -.39 .16 -,.... 22.42 -.57 .40 HomeDp 41.82 -.68 .91f Honwlllntl 37.86 -.02 .48f HostMarr 18.30 -.15 ... HovnanE 49.41 -.85 .36 HughSup 35.93 -.70 .Humana 46.66 -.51 ... Hunsmnn 18.30 -.06 .39e ICICIBk 28.40 +.03 IDTCorp 11.91 +.04 .08 IMSHifh 24.63 -.30 .4e IShBrazil 32.59 -.94 .04e IShJaan u13.24 -.04 .16e IShMalasia 7.05 -.04 .08e iShTaiwan 12.23 +.05 2.50e IShSP500 126.38 -.73 2.60e iShREsts 65.39 -.65 .72 ITTInds 102.91 +1.04 1.20 Idacorp 29.14 -.17 1.32 ITW 89.33 -.71 .48 Imation 45.57 -.87 1.80m ImpacMtg 9.97 -.18 .40 INCO 42.77 -.87 .64 IngerRds 40.14 -.71 ... IngrmM 2.00 +.20 .80 IBM 82.76 -.61 .IntlCoaln 10.23 +.08 .50 InlGame 29.49 -.01 1.00 IntPap 33.51 -.18 InRect 32.17 -.77 ... SEn 26.90 -1.29 Interpublic 9.77 -.06 IronMtn 43.30 -.70 .02 JLG u46.40 -.48 1.36 JPMoroCh u39.60 -.19 ... Jabil 34.82 -.31 .04 JanusCap 18.83 -.03 .. Jardens 31.81 -.65 1.32 JohnJn 61.19 +.33 1.121 JohnsnCd 72.95 -.99 1.001 KBHomes 73.24-1.68 .. KCSEn 24.97 -.56 .48 Kaydon 31.81 -.59 1.11 Kellogg 44.36 -.27 .64 Kellwoodlf 23.10 -.18 .20 KerrMcG 91.62 -.90 1.30 Kecorp 33.71 -.33 1.86f KeySpan 35.77 +.39 1.80 KimbClk 58.85 -.27 3.00 KindMorg 92.44 -1.53 KingPhrm 16.86 -.14 ... Kinross gf 8.30 +.02 ... Kohls 46.28 +.60 .56e KoreaEIc u19.51 +.46 .92 Kralt 28.33 -.13 ... KrspKrmil 6.01 -.02 ... Kroger 19.10 -.01 .50 L-3Com 70.74 -1.43 .32e LLERy 3.30 +.02 .. LSILog 7.98 -.19 1.44 LTCPrp 21.10 -.77 .44 LaZBoy 14.36 -.74 ... LaQuinta 11.03 LabCp 54.03 -.51 1.38 Ladede 29.40 +.06 LVSands 38.47 -.26 LeapFrog 11.85 -.43 .72 LeggMason120.97 +.48 .80 LehmBt 127.06-1.93 .64f LennarA 61.73-1.12 .441 Lennox 28.20 -.84 ... Lexmark 46.86 -.77 .58e LbtyASG d5.50 -.09 ... UbtyMA 7.81 +.02 1.60f UllvEli 57.59 +.93 .60 Urmited 22.90 1.521 UncNal 51.69 -.37 .24 Undsay 18.99 +.11 ... UonsGtg d7.64 -.25 .23 UzClaib 34.90 -.10 1.20f LockhdM 62.63 -1.18 .50 LaPac 26.77 +.06 .24 LowesCos 68.54 -.87 ... Lucent 2.90 +.07 .90 Lyondell 23,93 +.17 1,80 M&TBk 109.62-1.31 ,56 MBNA 27.28 -.24 1.001 MDCs 64.13 -1.88 ,76 MDURes 32.96 +.02 .. MEMCIf 21.86 -.57 .50 MCR 8.41 -.01 .60 MGIC 64.26 -.61 .. MGMMirs 35.51 -1.01 .MPSGrp 13.68 -.53 .03e Madeco 8.30 -.10 1.52 Magnalg 68.54 -.71 .49 MgdHi 5.93 +.02 1.20 Manulifg u58.61 -.86 1.32 Marathon 61.43 -.36 .42 MarlntA 66.96 -.76 .68 MarshM 32.21 +.01 .96 Marshlls 43.75 -.16 MStewr 18.13 -.90 .80 Masco 30.36 -28 .16 MasseyEn 39,51 -.52 .MatScdll 12.70 .501 Mattel 16.31 -.19 ... Maxtor 4.53 .36 Maytag 18.97 +.02 .67f McDnlds 34.10 -.65 .66a McGrwHs 52.18 -.19 .24 McKesson 51.25 -.96 ... McAfee 26.95 -.31 ... MedcoHlth 56.98 -.50 .39 Medtmic u58.34 +.59 .80 MellonFnc 33.65 -.38 1.52 Merck 32.25 +2.24 ... MeridGId 20.23 +.11 .80 MerrillLyn 68.26 -.55 .521 MetLife 49.48 -.34 ,40 Michaels 35.85-1.02 .. MicronT 13.65 -.02 2.381 MidAApt 48.40 -1.56 ... Midas 18.05 -.27 ... Milacron 1.33 -.02 ... Millipore 65.64 -1.54 2.51 MillsCp 42.91 -.41 .08e MitsuUFJ u14.17 +.10 .57e MobileTels 34.45 +.01 .80f Monsnto 75.57 -.04 .30m Montpelr 18.01 +.01 .28f Moodyss 61.42 -.08 1.08 MorgStan 56.67 -.21 1.40e MSEmMkI u22.78 -.12 ... Mosaic 14.18 +.07 .16 Motorola 22.33 -.08 .73 MunienhFd 11.08 -.08 .45 MurphOs 53.23 -.62 .24 MylanLab 20.62 -.34 NBTY d16.77 +.02 .. CRCps 34.13 -.43 ... Nabors 76.78 +.87 1.48 NaeCity 34.30 -.52 1.16 NatFuGas 32.81 -.52 2.27e NatGrid 48.93 -.32 ... NOilVarco 62.17.-1.40 .12f NatSemi 26.51 -.71 Navistar 27.33 -.63 ... Navteq 45.56 +.29 .21a NewAm '2.01 -.02 6.801 NwCentFn 38.30 +.74 1.441 NJRscs 43.04 -.61 1.00 NYCmtyB 17.07 -.18 .66 NYTimes 27.54 +.29 .84 NewellRub 24.05 +.04 .. NewfExps 49.96 -.04 .40 NewmtM 50.15 -.35 ... NwpkRs 8.27 -.22 .12e NewsCpA 15.87 -.01 .10e NewsCpB 16.83 .92 NiSource 21.67 -.29 1.86 Nicor 40.96 -.41 1,241 NikeB 87.26-1.24 .. 99CentsIf 10,53 -.26 .161 NobleCorp 70.90 -.99 .20 NobleEns 41,68 -.25 .44e NokiaCD u18.49 -.04 .34 Nordstrms 37,03 +.65 .52 NorfkSo 42.62 -.39 .NorelNet 3.20 -.04 1,00f NoFrkBc 27.48 -.22 .70 NoestUI 19.83 -.15 3.20 NoBordr 42.23 -.28 1.04 NorthropG 58.38 -.76 .40 NovaChem 34.39 -.59 .86e Novarts 52.65 +.76 .36 Novellsn 16.28-1.08 1.16 NSTARs 28.78 -.57 .60a Nucor 65.55 -.69 .84 Nuveenlnv 43.98 -.36 .83 NvFL d13.82 -.18 .85 NVIMO 13.94 -.01 1.33 OGEEngy 27.30 -.51 1.44 OcciPet 81.60 +.75 .. OffcDpt 29.36 -.88 .80 Olin 19.06 -28 .09 Orincre 58.46 -.98 .OreStI 27.73 -1.15 .27 Oshkshs 44.23 -.89 .52 OutbkStk 40.55 -.45 ... Owenslll 19.75 1.20 PG&ECp 37.32 -.19 .21 PMIGrp 39.82 -.55 2.00 PNC 63.47 -.42 .80 PNMRes 24.87 -.17 1.88 PPG 57.15 +.48 1,00 PPLCps 29.45 -.68 .48 PXREGrp 12.90 -.18 ... PacaCre 89.04 -.85 1.00 PackAmer 22.58 +.21 ... Pactv 21.05 -.96 ... ParPharm 30.23 -222 ... ParkDr u10.47 -.02 ... PaylShoe 24.45 -.92 .38 PeabdyEs 81.69 -.21 3.00f Pengrthg 23.37 +.02 2.60 PenVaRs 54.65 -.04 .50 Penney 52.86 -.48 .27 PepBoy 14.16 -.29 .32 PepsiBott 29.48 +.02 1.04 PepsiCo 59.54 -.28 .34 PepsiAmer 2321 +.07 1.30e Prmian 15.46 -.02 .40 PetroCgs 40.05 +.35 .58e PetrbrsA 60.61 -1.68 1.52e Petrobrs 67.16 -2.00 .961 Pfzer 24.32 +1.74 1.50a PhelpD 140.36 -.64 .52e PhilipsEl 31.48 -.49 .92 PiedNG 24.02 +.02 ,48 Pier1 9.28 +.09 .091 PilgrimsPr 34.73 +.37 .89 PimoStrat 10.67 -.27 2.001 PinWst 42.65 -.52 .24f PioNrl 51.45 -.41 1.24 PitnyBw 41,52 -.62 .10 PlacerD 22.06 -.42 :.. PlainsEx 41.33 -.51 1.52 PlumCrk 36.78 -.53 1.80 PoslPrp 40.47 -.44 .72 Praxair 51.74 -.59 ... Pidelntllf 30.90 +.01 .651 PrinFncl 48.88 -.84 1.12 ProctGam 58.55 +,44 2.421 ProgrssEn 44.46 -.54 .12 ProgCp 118.69 -1.07 .24 ProsStHiln 2.88 -.02 .781 Prudent 74.77 -.04 2.24 PSEG 65.14 -1.36 1.00 PugetEngy d20.23 -.37 .16 PulleHs 41.56 -.86 .38a PHYM 6.67 -.03 .49a PIGM 9.32 -.09 .36a PPrlT 6.07 +.01 .62 Quanexs 48.75 -1,30 ... QtmDSS 3.10 +.01 ... QkslvRess 43.68 -.23 .. Quiksilvrs 13.38 -.40 .. QwestCm 5.77 -.15 .16f RPCs 25.80 +2.47 .641 RPM 18.03 -.06 .25 RadioShk 21.18 -1.01 ... Racorp 40.32 -.50 .081 RangeRss 27.37 +.06 .48f RJamesFn 37.40 -.02 1.88 Rayoniers 39.99 -.16 .88 Raytheon 39.18 -.43 1.40 Rltylnco 22.06 -.27 1.36 RegionsFn 34.58 -.36 ... ReliantEn 10.11 -.13 .63e Repsol 29.31 -.67 ... RepPropn 12.00 .56 RepubSv 37.36 -.39 ... ResMeds 39.14 -1.49 ... RetailVent 12.19 -.45 .. Revlon 3.00 -.10 .. RiteAid 3.53 -.11 .90 RockwlAul 59.40 -.41 .25e Rowan 36.04 -.54 .60 RylCarb 44.10 -.01 2.22 RoyDShAn 61.55 -.74 1.61e Royce 19.95 -.15 .36e SAPAG 45.97 -.36 1.56 SCANA 40.00 -.82 .88 SLMCp 54.74 +.94 .36 SabreHold 23.55 -.54 .20 Safeway 24.97 +.55 .64 SJoe 68.01 -.57 ... Sude 51.28 -.48 .92 StPaulTrav 44.37 -.41 .Saks 16.21 -1.01 .. Salesorce 34,53 -.49 1.04 SalEMInc2 13.38 +.08 .12e SalmSBF 15.22 -.07 3.06e SJuanB 44.10 +.64 .73e Sanofi 44.20 +1.37 .79 SaraLee 18.75 -.15 .22 ScheroPI 20.74 +.97 .84 Schlmb 97.95 -1.97 .101 Schwab 14.68 -.41 .04 SclAdanta 43.14 -.17 1.66e ScottPw 38.23 -.60 .44 Scripps 47.45 +.68 .32 SeagateT 19.56 -.03 1.16 SempraEn 45.83 -.74 .60 Sensient 17.50 -.44 .44 Svcmstr 12.00 -.03 ... ShopKo 28.80 +.03 2.24 Shurgard 57.49 -.41 3.32e SiderNac 20.24 -.67 SierrPac 13.14 -.40 2.80 SimonProp 77.37 -1.53 ... SixFlags 7.34 +.09 .64 SmithAO 36.15 +.52 .24 Smithlnts 36.84 -1.02 ... Solectm 3.80 +.06 .23e SonyCp 37.21. +.30 .. Sothbys 17.68 -.08 1.49 SouthnCo 35.15 -.23 6.37e SlhnCopp 67.32-1.55 1.251 SoUnCo 23.93 -.53 .02 SwstAirl 16.56 -.26 .. SwnEngys 34.99 -.41 .24f SovrgnBcp 21.44 -.10 ... Sphedon 9.90 -.10 .10 SrinlNex 24.64 +.11 .16 StdPacs 37.54 -.99 .84 Standex 27.53 -.67 ... StarGas 1.75 +.07 .84 StarwdHU 63.11 -.78 .76f StateStr 57.37-1.01 .16 Steris 25.49 -.66 .. sTGold 50.20 +.11 .111 Stryker 46.73 -1.01 .30j SturmR 6.79 -.04 2.45 .SubPpne 24.52 -.09 2.52 SunCmts 30.04 -.84 .24 Suncorg 62.75 -.76 .80 Sunocos 78.37 -.98 ... Suntech n u22.50 +1.55 2.20 SunTrst 73.38 -.63 ... SupEnrgy 21.10 -.89 .02 SymbIT 12.21 -.08 .68f Sysco 32.47 -.18 .85 TCFFnl 27.22 -.74 .88 TDBknorth 29.65 -.14 .76 TECO 17.58 -.34 .24 TJX 22.85 -.24 1.651 TXUCps 52.09-1.49 4.06 TXUpfD 83.60 -231 .32r TaiwSemi 9.59 -.11 .34 TalismEg 51.00 +.13 .40 Target 52.80 -.87 .24 Tektronx 29.25 +2.07 1.40r TelNorL 18.03 -.27 .68e TelMexLs 24.02 -.02 .. TelspCel 3.63 -.21 .90 Templelns 43.60 +.31 .. TempurP 12.78 -.19 .TenetHrth 8.19 -.26 2.70 Teppco d35.11 -.59 ...Teradyn 14.16 -.62 ... Terra 5.34 2.95e TerraNitro 19.94-1.16 .401 Tesoro 59.27 +1.73 ... TetraTs 29.70 -.70 .12f Texlnst 32.03 -1.04 .. Theragen 3.02 +.01 .. ThermoB 31.68 +.33 ... ThmBet 41.42 -.55 1.68 3MCo 77.57 +.48 .60 Tiwtr 46.01 -.29 .32 Tiffany 38.88 -,29 .20 TimeWam 17.95. -.05 .60 Timken 31.10 -.13 ... TenMslf 65.52 +.42 1.00e Todco 40.14 +.01 .40 ToddShp 28.63 +.17 .TollBross 36.24 -1.11 .Too nc 26.76 -1.41 .65e TorchEn 6.95 -.07 .44 Trchmrk 54.93 -.19 1.68 TorDBkg 51.25 -.12 3.66e Total SA 127.79-1.24 .24 TotalSys 22.44 -.02- 1.72 TwnCty 29.79 -.51 ... Transocn 66.45 -1.14 .16 Tredgar 12.21 +.01 .281 TriCont 18.54 -.08 ... TriadH 39.71 -.09 .72 Tribune 31.03 +.23 .40 Tycolntl 28.46 +.08 .16 Tyson 16.80 -.06 2.88 UILHold d46.78 -.68 2.20 USTInc 41.76 +.17 248e UUniao 59.52 -2.99 .15 UniFirst 30.50 -.12 1.20 UnionPac 77.04 -.79 ., Unisys 6.01 -.12 1.20 UDomR 23.10 -.30 .01r UtdMicro 3.11 -.04 1.32 UPSB 75.07 -.95 1.20 USBancrp 30.38 -.54 .40 USSteel 45.81 -1.06 .88 UtdTechs 57.14 -.89 .02 Utdhlths 61.85-1.29 .Univision 30.00 -.25 .Unova 33.58 -.35 .30 UnumProv 21.59 -.28 .31 ValeantPh 17.75 -.06 .20 ValeroEs 51.79 -.48 1.22f Vectren 27.30 -.91 ... VerltDGC 35.00 -2.30 1.62 VerizonCm 30.52 +.03 .28 ViacomB 33.76 -.27 .22 VintgPt 53.82 +.32 .. Vishay 13.43 -.04 ... Visteon 6.55 -.04 .76e Vodafone 21.43 -.36 3.20f Vomado 83.67-1.10 .46e Votorantim 12.12' -.06 .18 Wabash 18.19 -.79 2.04 Wachovia 53.43 -.47 .60 WalMart 48.96 -.31 .26 Walgm 45.57 -.72 .16 Walterind 50.32 +.22 .52 WamerMn 19.03 +.78 1.961 WAMut 43.25 -.56 .88f WsteMInc 30.77 -24 ... WatsnPh 32.44 -36 Weathflnts 36.37 -.56 .20 Wellmn 6.67 -.40 ... WellPoints 76.64 -1.60 2.08 WellsFrgo 63.65 -.10 .68f Wendys 54.84 +.14 .92 WestarEn 22.04 -.27 .66a WAstTIP2 11.74 -.01 .. WDitl 15.13 -.18 .40 WestwOne 16.35 -.08 2.00 Weyerh 66.66 +.39 1.41e WilmCS 17.86 -.14 .30 WmsCos 23.69 -.05 .. WmsSon 43.29 -.33 .36 Winnbgo 33.27 -.56 .88 WiscEn 39.05 -.55 .68 Wortihg 20.37 -.21 1.12 Wrig-, 4 .' 1.001 Wyer. 4 .1. 2.00 XLCap 65.27 -.73 .301 XTOEgys 45.58 -.34 .86 XcelEngy 18.61 -.29 .Xerox 14.50 -.53 .50f YankCdl 25.49 -.04 .46 YumBrds 47.23 -1.10 Zimmer 70.16 -1.39 .53 ZweigTI 4.69 -.01 AMERICANaSTOCK EXCHANGE Div Name Last Chg .ATCross 4.02 +.07 .42 AbdAsPac 5.97 +.09 .. Ableauc .34 +.01 .Abraxas 5.87 -.22 AccesslT 11.10 +1.48 .37f AdmRsc 22.25 -.15 ... ADDvntgT 5.10 +.42 .AmOrBion 4.62 -.19 .. AWStar .08 +.02 .. ApexSilv 16.18 -.48 .. ApdloGg .19 -.01 .. AvanirPh 3.42 -.07 ... Axesstel 1.25 +.16 ...BemaGold 2.80 -.06 .05e BiotechT. 196.48 -3.77 ... BlrchMtgn 7.14 -.73 .Bodisenn 13.78 -32 ... Callisto 1.52 +.09 ... CalypteBh ..17 +.01 .. Camblorg 2.63 -.03 ..CanArgo 1.35 -.09 ... CanoPetn u7.01 -.08 .32 CarverBcp 15.12 +.01 ... CelsionCp .28 -.01 .01 CFCdag 6.29 -.01 ... Chenieres 37.68. -.46 .321 ComSys 12.07 -.03 ... CovadCmn d.70 -03 .. Crystallxg 1.98 -.03 ...DHBInds 4.69 -.26 2.24e DJIADiam 108.21 -.30 ... DSLnet .04 -.01 ... DaSysh .50 +.36 .EagleBbnd .11 -.01 1.51 EVLtdDur 15.98 -.09 .. EdorGIdo 4.34 +.17 .31e Eswth 7.65 .43a FTrVLDv u13.94 +.09 .41 FaPUils 14.21 +.03 ... FullHseRn 2.80 -.09 .. GascoEngy 6.81 -.24 ... GeoGlobalu12.05 +1.07 ... GlobeTeln 3.74 -.03 ...GoldStra 2.29 -.11 ... GreyWolf 7.83 -.22 ... Harken .63 ... ... Hemispx 2.19 -.11 ...HomeSol 5.11 +.16 .07 IAMGIdg 7.30 -.14 .28e iShMexico u35.60 -.36 .80e iShEmMkts 87.30 -.20 .94e iShSPLA 121.66 -2.78 4.13e iSh20TB 90.79 +.09 .80e iShEAFEsu60.29 -.11 ...iShNqBio 75.46 -1.27 1.65e iShR100V 70.16 -.24 .58e iShR1000G 51.63 -.58 1.15e iShR2000Vs66.45 -.78 .30e iShR2000G 69.65 -1.00 .84e iShRs2000s67.00 -.84 ... InSiteVis .87 -.02 ... IngSys 2.16 -.04 ... IntrNAP .40 -02 .30e IntntHTr 68.06 -1.53 ...InterOllg 24.30 -1.71 ... IvaxCor 31.28 -.79 ... KFXInc 14.07 +.06 ... MadCatzg .69 +.01 ... Merrimac 9.00 ... MeroHith 2.02 -.01 .Miramar 1.90 -.02 .. Mpower d1.15 .. NatGsSvcs 18.87 1.92 ... hgtMg 1.74 +.04 .. 02Dieselh .49 +.12 .62e OilSvHT 128.70-1.67 ... Palain 2.85 -.60 ... PeruCopgn 2.61 -.15 2.04 PetofdEg 17.56 -.06 1.87e PhmHTr 71.00 +1.95 ... PionDril 17.87 -.14 .01p PwSWrn 15.27 -.34 ... Prvena 1.08 -.01 ... Qnstakeg .19 4.92e RegBkHT 142.43 -1.31 .Rentech 3.93 +.20 5.04e RetailHT 97.14 -1.46 ... SeabGldg u8.67 +.50 .23e SemiHTr 37.12 -.92 ... SilvWhtngn 5.14 +.08 ..SilverlfRn u4.29 +.54 ..Sinovac 4.51 -.35 2.32e SoftHTr 37.67 -.54 2.14e SPDR 125.71 -.65 1.40e SPMid 134.21 -.89 .63e SPMatis 29.66 -.14 .40e SPHIthC 31.98 +.28 .45e SPCnSt 23.76 -.04 .33e SPConsum 33.05 -.36 .57e SPEnow 50.75 -.32 .71e SPFnd 31.70 -.28 .49e SPInds 31.36 -.31 .14e SPTech 21.31 -.26 1.01e SPUtI 31.88 -.43 ... Stonepath .68 -.02 ... SulphCon 8.75 -1.10 ... Tag-It .46 +.05 .. TanRnggn u4.79 +.49 .. TitanPhm 1.49 +.04 .. TmsmrEn u5.50 +.15 .UltraPIgs 55.90 +.15 4.05e U6iHTr 115.99 -1.38 ... Viragenh .51 .. WSilverg 10.26 +.19 Wstmlnd 21.60 +.45 ... Yamanag u5.79 -.20 I N^ASDAQ NATIONALMA5RaETa Div Name Last Chg .ACMoore 14.53 -.10 .ADCTelrs 23.45 -59 .ASMLHId 19.74 +.04 .ATITech 16.10 +.19 .ATMllnc 27.59 +.42 .ATSMed 2.77 -.11 .AVIBio 3.55 -.21 Aastrom 2.10 -.11 .. Abaenix 21.60 +.08 .. AcaComb 1.49 -.04 ... Accelrys 7.98 +.80 .AccHme 48.50 +1.79 .Acivisns 13.23 -.23 .Actuate 3.11 +.10 .20 Acxiom 22.64 -.76 .. Adaptec 5.85 +.05 .. AdobeSvs 38.45 -.37 .. AdolCp 14.25 +.25 .36 Adtran 31.16 -.82 .. AdvDiglnf 10.18 +.10 .. AdvEnd 11.36 -.33 .45 Advanta 28.32 +.27 .54 AdvantB 30.16 -.11 .Aerollex 10.24 -.35 .. Affymet 42.43-1.22 .. AirspanNet 5.35 -.14 AkamalT 19.48-1.06 1.52e Akzo 46.43 +.10 .. Alamosa 18.52 -.01 .60a Adila 25.45 +.27 .. Alexon 19.44 -.70 .. AggnTech 6.59 -.20 .Alkerm 17.85 -.63 ... Alloyl 7.01 -.20 ..Ascripts 13.76 +.15 .. aitrNano 2.12 -.11 ... AleraCp 18.82 -.29 .. AmarinCp 1.07 -.10 .. Amazon u48.37 -.84 .. Amedlsy 41.90 4.15 .AmerBo 1.11 -.01 .. AmrBiowt .20 3.161 AmCapSr 36.98 -21 .30 AEagleOs 21.22 +.06 .AmPharm 38.18-1.01 .40 APwCnv 22.04 -.30 .Ameriade 24.39 -.01 .. Amaen 77.63-1.36 ... AmkorT 5.61 -.07 .. Amylin 39.15 +.15 .. Anadgc 5.60 +.05 .40 Anlogic 47.73 -.02 .. Analysts 2.42 +.05 .. AnlySur 2.02 -.08 ... Andrew 10.94 -.04 .. AndrxGp 16.98 -.35 .. AngioDyn 24.24 +.08 .82e AngloAm 33.53 +01 .Animas u24.23 +20 .. Antigncs 5.00 -.18 .. Aphton .30 ... ..ApolloG 62.50-1.11 1.76f Apololnv 1826 +.34 ... ApleCs 71.38 +.27 .201 Applebees 2331 +.06 .. AppidDigl 2.72 -.11 .. ApldInov 3.58 -.06 .12 AldMatl 18.43 -.50 .. AMCC 2.63 -06 .. aQuantve 25.47-1.11 .ArenaPhm u13.94 -.21 ... ArladP 5.60 -.30 .. Aribanc 7.94 +.15 .60 ArkBest 42.61-1.03 .04e ArmHId 6.23 -.12 .. Arotech .45 +.04 Anis 9.55 -.35 .. ArtTech u2.13 +.11 .. Artesyn 9.79 -.35 ArhroCr 39.04-1.26 .. AspenTc 8.19 1.08 AssedBanc 32.60 -.2 .161 AstaFdg 27.99 -.26 .. AtRoad 5.50 -24 .. Atari 1.10 -.01 .. AthrGnc 16.27 -.46 .. Atheros 11.18 -.29 ... Atmel 3.18 -.17 .. Audible 13.34 -.11 .AudCodes 11.45 +.49 ...Audvox 13.40 +1.05 .. Aultnc- 2.87 +1.14 .03j Autodesk 45.25 +115 .Avanex 1.16 -.04 .Avantlmm 1.77 -.10 .AvidTch 54.12 +.71 .. AvoctCp 28.40 +.31 Aware 5.63 -.19 .. Axcelis 4.68 -.06 ... BEAero 20.83 -.34 ... BEASys 9.42 -.09 ... Baidun 66.54 +.83 ... BallardPw 4.30 -.25 ... BeaconP 1.91 -.19 .25 BeasleyB 13.75 -.33 .16 BebeStrss 14.52 -.02 .BedBath 41.17 -.80 .Bioayst 15.15 -.30 .Biogenldc 44.09-1.22 .04 BioLase 8.10 +.15 ... BoMarin 10.32 -.40 .25e Biomet 36.74 -.71 ... Bioira 1.28 -.06 .. Biopurers .80 ... Blkboard 29.16-1.59 .48 BobEvn 23.74 -.35 Borand 6.56 +.19 .BostnCom 1.19 +.04 BrigExp 12.39 -.20 .. Brightpnts 29.44 +.17 .. BroadVis .64 +.10 .. Brdom 47.01 -2.01 ..Broadwing 6.16 -.25 ... BrdeCm 4.04 -.08 ... BrooksAut 12.27 -.57 BusnObj 40.01 -.36 ... C-COR d4.98 +.02 .52 CBRLGrp 34.82 -.60 ...CDCCpA 3.10 -.09 .431 CDWCorp 58.01 -.33 .52 CHRobns 36.22 -.58 ... CMGI 1.53 -.06 ... CNET 14.57 -.39 ... CVThera 24.43 -.71 ... CabotMic 28.92 -.31 ... Cadence 17.55 -.34 ... CalDives 37.48 -.23 .. CalAmp 10.00 -.15 ... CalM 6.78 -.22 .651 CapCtyBks 36.67 -.95 .. CpslnTrb 3.15 CardioDyn 1.17 +.02 ... Cardlomg u9.99 -.75 ... CareerEd 32.49 +.02 .18 Caseys 24.88 -.06 ...Celadon u28.45 +.59 ... Celgene 57.08 -1.11 ... CellGens 6.21 -.31 CeelThera 2.22 -.12 ... CentenBkn 12.37 -.53 .CentAl 24.19 -.68 ... Cephln 55.83 -1.52 ... Ceradynes 44.08 +.40 Cemer 86.88 +.20 ::. ChrmSh 12.98 -24 ... ChartCm 1.24 -.08 ... ChkPoint 20.25 -25 ... ChkFree 47.11 -.30 ... Checkers 14.82 +.02 Cheesecake37.84 -.46 ..ChidPlc 48.89-2.54 ... ChinaMedn 33.18 -.48 ... ChlnaTcFn 13.12 -.69 ... Chiron 44.76 -.09 ... Chordnt 2.50 -.03 .50 ChrchlND 37.30 ... CienaC 2.82 -.12 1.22 CinnFin 44.95 -.05 .32f Cintas 42.19 -.50 ... Cirrus 6.56 -.05 ... Cisco 17.47 -.05 ... CadelSec .38 -.02 ... CirixSy 27.46 +.46 ... CleanH 29.81 -.10 ... ClickCm 21.65 -.85 ... Cogent 23.64 -.21 ...CogTech 50.35 +.33 ... Cognosg 33.72 +.59 SCdwtlCrs 30.97 -1.11 ... Comarco 10.20 -.13 ..Comcast 26.63 -.20 ... Comcsp -26.30 -.32 1.40 CompsBc 49.17 -.41 ... CompCrd 37.80 -.62 ... Comauwre 9.26 -.01 .. Comtechs 30.37 +.47 Comvers 27.00 -.27 .. ConcurTch 12.88 +.28 ... ConcCm 1.81 -.04 Conexant 2.31 -.06 .. Conmed 23.93 -.02 Connetcs 14.46 -.38 ... Copart 22.85 -.29 ... orinthC 12.01 -.30 .CostPlus 16.00 -93 .46 Costco 48.66 -.09 .. Craylnc 1.49 -.05 .CredSys 6.73 -.02 .CreeInc 25.59 -.59 ... Crcell 25.03 +.46 .30p Ctip.com 58.72 +.44 .. CublstPh 20.56-1.67 ... CumMed 12.44 -.37 ... CuraGen 3.13 -.21 ... CurHith .41 +.14 ... CuronMed .37 -.03 ... Cutera 28.09 +.94 Cyberonic 34.01 -.28 SCymer 36.78 -1.67 .. Cynosure n 20.69 -.55 ...CyprsBio 5.42 -.31 .. CytRx 1.07 +.02 .. Cytogen 3.10 -.29 .. Cytyc 28.01 -.41 ... DDiCorp .80 +.02 .DRDGOLD 1.35 .12 DadeBehs 40.30 -.47 ... Danka 1.34 ... DealrTrkn 19.50 -.30 ... DeckOut 29.00-1.31 ... Delllnc 31.90 -.65 ... DtaPtr 17.99 +.74 Dndreon 5.25 -.12 ... Dendrite 14.39 -.24 .Dennysn 4.14 -.36 .DiamClust 7.83 +11 SDgtlGen .56 +.01 ... gRiver 29.53 -.62 ...Digitas 12.72 -.20 .. Diodess u34.09 -.85 .DirectdEn d14.02 +02 .. DiscHdAn 15.63 -.42 ... DiscvLabs 6.42 -.28 .. DistEnSy 7.54 -.14 ... DobsonCm 7.60 -.20 ... DlrTree 23.31 -.27 DressBn 35.54 -.34 .80 DryShipsn 12.28 +.11 .10 DynMatis 29.39 -.85 ... Dynavax 4.79 +.68 .. eBays 44.62 -1.32 ... EGLInc 36.25 -.35 ... eResrch 13.37 -.04 ... EZEM 23.55 +.20 ... EhUink 11.40 -.27 ... EchelonC 8.53 +.89 .. EchoStar 26.97 -.28 ... Edipsys 19.34 -.59 ... EdgePet 25.54 +13 ...EducMgt 33.31 +01 .151 EduDv 8.25 -.01 ... 8xnc 2.15 -.19 ... ElectSi 23.38 -.38 ... Ectrgls 3.02 -.07 ... ecArts 52.25 -1.17 ... EFII 27.25 -.36 ... ElizArden 20.36 +.10 .64m IPCHold 27.22 -.77 ... Emcore 6.79 +.02 ... IPIXCp d1.90 -.15 ... Emdeon 7.93 -.10 ... iRobotn 30.87 +.55 ... eMrgelnt .50 -.04 ... IdenixPh 18.36 +.79 ... EncoreCap 16.90 -.94 ... Idenix 5.11 +.15 ... EncrMed 5.11 +.09 .. ImaxCp d7.61 -.66 ... EncysiveP 7.00 -.02 ... Imclone 33.28 -.16 ... EndoPhrm 29.93 -.30 .. Immucor 24.03 -.62 ... EngyConv 35.32 -.52 .. Imunmd 2.50 +.03 ... Entegris 9.60 -.30 .. InPhonic d9.59 -.48 2.16 Enlerrags d16.93 -.77 .. Incyte 5.65 -.13 ... Entrust 4.96 +.06 1.08 IndpCmty 39.73 +.11 ... EnzonPhar 7.29 -.20 .. IndevusPh 4.56 -.15 ... Equinix 40.20 -1.10 ... InfoSpce 26.81 +.35 .36e EricsnTI 34.42 -.25 ... InFocus 4.05 +.04 ... Euronet 25.64 -.36 .,. Informal 11.22 -.09 .. EgrSIr 11.67 -.35 .29e Infosys u78.92 -.97 ... Exelixis 8.71 -.43 .. Insight 19.28 +.02 .. Expedian 25.42 -.68 ... Insmed 1.74 -.11 .30 Expdlntl 67.41 -.51 ... InspPhar d4.78 -.17 ... ExpScripts 87.96 -.09 IntgDv 12.41 -.10 ... ExtNetw 4.93 +.02 ISSI 6.51 -.10 F5Netw 52.60 -.69 .40f Intel 25.78 -.60 ... FLIRSyss 23.01 -.16 .. Intellisync 5.11 .31 Fastenas 38.91 -1.25 InterDig 17.66 -.47 2.04 RFeldlnvn 11.65 +.21 ,. Intgph 49.89 +.52 1.521 FdfthThird 38.89 -.55 .06 IntlSpdw d44.10 -.28 in.isar 2.22 -.08 .. IntemtCap 7.60 -.27 .10 FinUne 17.68 -.87 Int"tlnit 10.88 -.07 ... FstAdvnA 28.55 -2.01 IntntSec 21.25-.54 1.12 FstMerit 26.45 -.40 20f Intersil 24.29 -.78 .. Fiserv 42.88 +.03 ... Intevac 13.04 +87 ... Flext 10.85 +.10 ntraase 17.40 -.40 Fonar .79 -.03 ..ntuit 52.52 -.67 ... FormFac 24.47 -1.28 ... IntSurg 115.13 -.72 Forward 15.41 -.59 InvBncpn 10.84 -.15 FossilInc 20.29 +.18 .08 InvFnSv 37.07 +.33 FosterWhn 36.13 -1.43 .nvitogn 68.12 +.05 Foundry 13.69 -.26 nationn 9.80 +05 ... FoxHo 31.53 -3.81 ... IRISInt 22.36 -3.05 ... FmtrAir 8.67 -.01 .. Isis 5.12 -.15 FuelCell 8.65 -.3 .. Isonics 2.06 -.01 Ftrmia .39 -.01 IstaPh 6.04 +.22 ,.. Iton 40.79-1.78 IvanhoeEn 1.15 -.03 ... GMXRs 36.61 -.08 ... xia 13.78 -.25 .50 Garmin 61.35 +.31 ... GeacCmg 10.83 -.04 j2Gob 46.57 -.74 .Gemstar 2.76 -.06 JDSUniph 2.51 -11 .GenProbe 46.44-1.73 ... JDaUnio 2.51 -.11 ... Genaera d1.30 -.04 .18 JackHenry 19.20 +.08 GnComa 9.0 -.0 ... Jamdat 26.42 -.14 nGnComt .8 -.06 ... JetBlue 21.35 +.63 Geniotr 7.788 -.02 .30f JoyGIbls 35.75-1.17 SGenesMcr 17.07 -1.04 JnorNtw 21.90 +.06 Genta 1.35 -.10 48 KLATnc 49.72 -.95 .36 Gentexs 19.27 +.24 Keryo 14.13 -.19 Genniva 14.80 -.76 Kery*io 14.13 -.19 Genva 14.90 -.7 KnghCap 988-.33 Genzyme 70.38 -.78 Komag 35.47 -.46 " ...? Komng 35.47 -.46 GeronCp 863 -.11 ... KopinCp 5.32 -.25 ... GigaMed 2.93 +.39 KosPhr 50.31 -.06 .GileadSc 50.58 -.11 Kroos 43.34 -55 ... GlblePnt 3.28 -.43 Kulicke 8.73 +25 ieFnll n -!Kslicke 873 +*25 Globllnd 11.70 -.32 481 LCAViss 49.01 -39 .20 GoldBnc 18.04 +.08 LKQCp 34.11 -.52 GoldKist 15.16 -.30 .481 LSIInds 16.46 -.21 ...Gooale u424.60-5.55 .LTX 4.54 -10 ... GreenfidOn 5.57 +.19 LalPh .82 -.10 ... Gymbree 22.45 +.28 LamRsch 34.70-1.33 .96 HMNFn 29.20 -.30 Lasrscp 23.37 -45 ... HainCelest 20.58 -.45 Lance 4.46 -11 ...Hansens 78.70 +122 LawSnSf 7.16 +05 .80 HarbrFL 38.90 -.05 Level3 2.90 -.09 .Harmonic 5.02 +.01 LexarMd 8.38 -13 ...HaupqDIa 5.51 +1.51 .. LibGIobAs 22.19 -.19 ... HthGrdsn 5.91 +.22 UbGlobCn d20.74 -36 ... Hologics 37.14 -.91 Lfecell 19.95 -.24 ... HomeStore 5.21 +.02 i.. UfePtH 37.70 -.69 .28 HookerFu 16.96 -.34 ghtbrdg 776 -.14 HotTopic 1457 -29 Uncare 41.38 -36 .28 HudsCdys 11.76 ... 40 UnearTch 3661 -.84 ... HumGen 8.11 -.47 Uonbrdg 6.95 -11 .24 HunUBs 22.79 -.43 LodgEnt 14.05 -27 .86 HuntBnk 2408 -.32 ... LookSmtrs 402 -.09 ... Hydrgcs d2.56 -.15 Loudeye 46 HyperSolu 52.65 +.03 IACInters 27,71 +.01 ICOS 27.83 -.13 .+ M-SysFD u3362 -.18 1.68 MCGCap 14.69 -.11 6.00e MCIIncs 19.70 +.04 ... MDIInc .65 -.01 ... MGIPhr d16.18 -.50 ... MIVA 5.24 +03 ... MRVCm 2.04 -.03 ... MTRGam 10.20 +18 .40 MTS 35.00 -1.00 ... Macrvsn 16.28 -.31 MagelnHI 31.31 +.19 ... MarchxB u25.57 +.29 ... Martek 24.25 -.81 ... Marvelff 58.06 -1.55 ..Marixx 21.04 +.80 .50f Maxim 36,63 -1.00 .MaxwlrT 15.18 -.07 ... McData 3.33 -.07 .McDataA 3.64 +.01 ... Medlmun 35.08 -.18 ... Medarex u11.74 -.01 ... Mediacm 5.07 -.03 SMedAct u20.51 +.05 ... MediCo 16.95 -.61 ... MentGr 10.00 +.09 ... Merclntrlf 31.43 -1.06 .MergeTc 26.21 +.01 .MesaAir 9.69 +.12 .30 MetalMg 23.42 -.14 .44 Methanx 18.14 -.06 .. Micrel 11.58 -.36 .64f Microchp 31.48 -.93 .Mcromse 7.27 -.23 .MicroSemi 27.39 -.25 .361 Microsoft 26.83 -.07 ... Microtune 4.35 -.29 MillCell 1.40 -.09 ... MillPhar 9.75 -.08 .Mindspeed 2.12 -.07 .Misonix 4.78 +.02 .Mitcham u18.45 +.38 .20 Molex 26.54 -.16 Monogrm 1.48 -.13 MnstrWw 39.60 -.65 .09j MovieGal 5.53 -.15 Myogen u32.02 +.51 .NABIBio 3.52 -.16 NETgear 19.19 -.75 NGASRs 11.91 -.21 NIIHIdgs 46.04-1.30 NPSPhm 11.58 -.52 NTLInc 68.35 -.08 .. Nanogen 2.61 -.11 Napster 3.55 +.10 .14e Nasd100Tr 40.92 -.66 .57e Nasdaqn 37,07 +.25 Nastech 15.18 -.13 NatAlHn 10.45 .15 .20 Natlnstru u31.71 +.41 SNektarTh 15.79 -.71 NeoMgicrs 7.77 +.19 NeoPharm 8.07 -.27 Neoware u24.15 +2.98 Net2Phn 2.00 Nelease 57.67 +22 Netfix 25.62 -.68 NetwkAp 28.93 -.93 NtwrEng 140 -05 Neurcnne 61.49 -.81 NexMed .80 -.03 NextiPrt 26.32 -.27 NrroMed 14.70 -.30 20e NobltyH 24.47 -48 .84 NorTrst 53.71 -.47 NthldLb 13.42 +.32 NvtWrs 12.65 -.49 Novavax 4.53 +06 Novell 8.62 Novius 24.14 -.47 NuHonz 10.07 +.09 ... NuanceCm 6.46 -.22 NutriSys 41.03 +91 .Nvidia 36.24 -61 .. 2Micron 9.24 -.76 OSIPhrm 2443 +49 OidDomFs 26.00 -.63 OmniVisn 19.52-1.00 SOnAssign 11.04 -52 ..OnSmcnd 5.59 -.04 ...OnyxPh 28.04 -.99 ... OpnwvSy 17.15 -.65 ... Opsware 7.03 -.17 .08 OptionCrs 12.93 -.07 .16 optXprsn 25.28 -.42 ... Oracle 12.32 -.37 ... OraSure 7.93 -.53 SOrthfx 39.50 -.11 .. Osdent 2.18 -.12 1.12 OtlerTail 29.49 -.52 .. Overstk 35.76 -1.00 .PAM 17.20 +.28 ... PETCO 21.67 -.49 .PMCSra 7.58 -.23 ... PRGSchz .63 +.01 1.00a Paccar 69.91 -.21 ... PacSunwr 23.84 -.52 .Palm Inc 29.85 +.28 .. PanASIv 18.04 -.36 ...Panacos 7.00 -.76 ... PaneraBrd 69.44 -.06 ... ParmTc 5.91 -.23 .. Pathmrk 10.02 -.26 .Patterson 34.01 -.24 .16 PattUTI 33.60 -.45 .641 Paychex 40.96 -.01 ... Pegasus 9.02 +.76 PnnNGms 31.55 -.53 ... PrSeTch 24.57 +.30 .. Peregrine .93 +.01 .171 Perrgo 14.25 -.22 .PetMed 14.39 -.07 .Petrohawk 14.04 +.15 PetDvI 33.73 -.38 .12 PetsMart 24.52 -.77 .20a PhrmPdt 61.86 +.97 ...Phmcyc d3.30 -5.90 .Photrin 15.52 -.38 .Pixars 52.54 -.85 Pxwrks 5.16 -.18 PlanarSy 8.45 -.71 ... PlugPower 5.48 -.15 .. Polycom 14.63 -.02 .60 Polymed 33.30 -.70 PooreBros d2.57 -.66 PortPlay 26.66 +74 .Powrlntg 2278 -.17 PwrDsine d597 -.18 Powrwav 12.68 -34 Prestek 9.21 -17 1.12f PriceTR 73.48-1.02 PrimusT 81 -.02 ProgPh 22.48 -.63 ProgSoft 31.19 -15 ProtDsg 28.59-.41 QIAGEN 1195 +05 OLT 6.25 +13 ...QiaoXing 7.10 -.40 QogK 31.97 -.43 .36 Qualcom 4369-1.26 ... QuantaCap 520 +.08 ... QuanFuel 2.70 -.03 QuestSftw 15.01 +01 ... Quidel 9.99 -15 RFMicD 564 -.25 SRSASec 11.22 -.33 RadThrSv 3425-2.50 ROneD 10.92 +01 Rambus 1646 -24 .Randgol 15.91 +40 RealNwk 8.05 -18 RedHat 2603 -27 Redback 14.01 -.02 Rdiff.cm 18.54-1.90 RentACt 18.66 -.29 RepubAir 14.32 -.13 44b RepBcp 12.18 -.29 SRschMotn 63.01 +.33 ... RgelPh 8.43 -.39 ... RightNow 17.99 -.03 24f RossStrs 28.38 +12 I221 RoyGid 3056 -23 Ryanar 5585 -87 .SBACom 17.37 -.57 .22 SEIInv 38.52 +.13 SFBCIntl 13.86 +.72 1.00 Safeco 56.73 -.33 .SalixPhm 16.69 -.61 ... SanDisk 59.72 +1.68 ... SangBio 4.26 +.36 .Sanmina 4.25 +.02 ... Sapient 5.56 -.16 Sawis ,70 +.03 .07 Schnitzer 30.14 -.63 .Scholaste d28.58 -.72 SciClone 2.02 +.03 SSciGames 26.99 -.58 ...SeaChng 8.27 -.14 ... SearsHldgs118.71 -1.04 .. SecureCmp 12.22 -.43 SelCmfrt 27.49 -.34 .881 Selctln 53,68 -.68 .Semtech 18.45 -.39 Sepracor 52.40 +.27 ... SeraCare 19.30-1.26 .. Serolog 19.20 +.17 .Shanda 16.15 +47 .17e Shire 38.69 +.10 ... ShufiMsts 26.26 -.73 SiRFTch 28.20 -.96 .10 SiebelSys 10.53 ... SierraWr 11.54 -.55 .. Sify u10.24 +.14 .. SigmDg 14.18 +.34 .76 SigmAl 63.27 -.74 ...SigmaTel 13.54 +.20 ... Silicnimg 9.21 -.36 ... SilcnLab 36.81-1.62 ... SST 5.27 -.21 .12r Sicnware u6.03 +.09 SilvStdg 14.31 -.16 .Sina 24.54 -.47 ... SiriusS 6.67 -.28 ... SimaThera 3.09 -.12 ... SkillSoft 5.45 +.02 .12 SkyWest 26.67 -.73 SkywksSol 5.30 -.12 SmurfSte 13.05 +13 .Sohu.cm 19.06 -.67 .SonicSol 14.35 -.01 .SncWall 7.85 -.03 Sonus 3.59 -11 .36 SouMoBc 14.10 -.09 ... SpanBdcst 5.09 -.13 ... SpansionAnul3.71 +.16 ... Sphenx 3.75 +.12 .. Stamps.cm 22.28 -98 ... SdMic 30.88 -1.48 17 Stapless 22.39 -.21 .StarScien 2.25 -.25 Sarbuckss 30.65 -.54 .40 SIDyna 33.92 -.44 30 SteelTch 26.28 +.54 .StemCells 3.43 -29 .Stereotaxis 8.75 +1.70 10 SewEntf 5.08 -.22 Stratex u3.52 -.09 SunMro 4.31 -.12 SunPower nu3004 -.74 SupTech .54 -.02 .. SuperGen 5.16 -.36 .96f SusqBnc 24.08 -.26 SwftTm 19.58 -.26 .Sycamore 481 -.16 ... Symantec d1661 -49 Symetnc 8.35 +.06 Synaptcs 25.43 -.21 .Syneron 4028 -.07 SSynopsys 20.41 -.39 .Synovs 10.92 +.25 .. THQs 23.22 -28 TLC Vision 648 +.06 .84a TOPTank 12.73 -.24 TRMCorp 7.29 -.06 TakeTwos 17.32 -20 Tanoxinc 16.13 +43 TapestyP .35 +.06 ST-oPh 14.00 -.07 TASERf 6.28 .26 .TechData 40,47 +.06 .. Tegal .55 -.01 .Tekelec 12.86 -.03 .TelwestGI u23.59 +.08 .Telikinc 16.20 -.14 .Tellabs 10.67 -.29 .TesseraT 25.90 -.31 .27e TevaPhrm 43.09 -1.86 ... ThStreet u7.00 +.35 Thoratc 20.73 -.39 3Com 3.61 TibcoSft 7.17 -.07 .TWTele 9.55 -.34 STiVoInc 5.23 -.03 TrdeStatn 12.58 -.36 TrnWEnI 6.21 -.22 .Tmsmeta 1.15 +.04 TmSwtc 1.66 -.09 TridMics 17.50 -.45 TrimbleN 34.29 -.16 TriQuint 4.37 -.18 TrueRellgn 15.45 -.99 .641 TrstNY 12.76 -.71 .84f Truslmk 28.69 -.48 .65 TuesMm 24.50 -.16 24/7RealM u7.88 +.09 .. USGIobal u15.10 +.82 SUTStrcm 8.33 -.07 .Ulicom 9.64 +.13 .321 Umpqua 28.91 +25 UndArmrn 26.49 -1.15 UtdNtdF 27.93 -.58 .80 UtdOnln 14.44 -.58 .USEnr 4.35 -.30 ... UtdSurgs 32.81 -.69 UtdThrp 69.06 -2.03 SUnvAmr 15.09 -.34 .111 UnivFor 56.49 +.08 .UrbanOuts 26.54 +.27 VASftwr 1.74 -.07 ValueClick 18.84 +1.46 VanranS 41.76 -.82 .VascoDta 9.52 -.38 Vasogeng 2.02 -.08 ... Vasomed .41 .Veecolnst 17.31 -.42 .. VerinlSys 34.53 -1.49 ...Verisgn 22.51 -.38 .VertxPh 27.09 -.60 .VerticlNel .59 -03 .ViaCelln 5.88 +.76 .. VonPhm dl.72 -.06 ..ViroPhrm 19.99 -.07 ... Vitesse 2.01 -.10 .WJCom 1.53 -16 .. WPCS Intl nu0.67 +1.07 WarrenRs 15.07 -29 WaveSys .69 -.06 .WebEx 21.85 -33 ... Websense 64.94 -.28 WstCorp 39.96 -.07 Westell 4.36 -.34 WetSeal 4.75 -.03 1.20f WholeFd 15394 +.44 WildOats 12.28 +07 WmsScotsn1581 -.30 WindRvr 13.95 -.27 WdssFac 543 -.15 ... WnSys 20.81 -.53 ... WHearg 49 +.01 ... Wynn 53.99 -.85 XMSat 2838 -1.26 XOMA 167 -14 ... XcyeTh 54 +06 .28 Xilin 2623 -.96 .Yahoo 4105-1.27 YellowRd 44.20 -.54 Youbet 4.81 -.17 ZebraT 43.11 -.55 ZhoneTch 210 -07 1.44 ZionBcp 7574 -11 ZixCorp 230 +21 Zoran 16.43 -.3312 1.3464 Brazil 2.3810 2.3345 Britain 1.7628 1.7724 Canada 1.1668 1.1589 China 8.0725 8.0731 Euro .8326 .8325 Hong Kong 7.7516 7.7519 Hungary 210.10 210.56 India 44.950 45.250 Indnsia 9855.00 9870.00 Israel 4.6145 4.5805 Japan 115.97 115.67 Jordan .7085 .7100 Malaysia 3.7792 3.7780 Mexico 10.7210 10.7340 Pakistan 59.90 59.87 Poland 3.20 3.23 Russia 28.6570 28.6440 SDR .6928 .6933 Singapore 1.6619 1.6672 Slovak Rep 31.65 31.64 So. Africa 6.3306 6.3893 So. Korea 1017.40 1016.00 Sweden 7.8550 7.8856 Switzerlnd 1.2917 1.2898 Taiwan 33.18 33.16 U.A.E. 3.6728 3.6720 British pound expressed in U.S. dollars. All others show dollar in foreign currency. Yesterday Pvs Day Prime Rate 7.25 7.00 Discount Rate 5.25 5.00 Federal Funds Rate 4.25 4.25 Treasuries 3-month 3.87 3.84 6-month 4.19 4.17 5-year 4.36 4.46 10-year 4.44 4.55 30-year 4.64 4.75 FUTURES Exch Contract Settle Chg Lt Sweet Crude NYMX Feb06 58.05 -1.00 Corn CBOT Mar 06 2083/4 +11/4 Wheat CBOT Mar06 3231/4 +31/2 Soybeans CBOT Mar06 6201/2 +18 Cattle CME Feb06 96.80 -.27 Pork Bellies CME Feb06 83.62 -.35 Sugar (world) NYBT Mar06 14.33 +.13 Orange Juice NYBT Jan 06126.45 -1.10 SPOT Yesterday Pvs Day Gold (troy oz., spot) $503.60 $528.40 Silver (troy oz., spot) $8.567 $8.792 Copper (pound) $2.lb95 b 2.1b55 NMER = New York Mercantile Exchange. CBOT = Chicago Board of Trade. CMER = Chicago Mercantile Exchange. NCSE = New York Cotton, Sugar & Cocoa Exchange. NCTN = New York Cotton Exchange. I - CIRus COUNTY (FL) CHRONICLE BUSINESS TUESDAY. DECEMBER 20. 2005 9A MUTUrALFD 3 4-wk Name .NAV Chg %Rtn AARP Invst: CapGrr 47.48 -.47 +0.6 GNMA 14.81 ... +0.9 Global 32.61 -.05 +4.1 Gthinc 23.14 -.17 +0.2 Intl 51.19 -.09 +4.8 PthwyCn 11.96 -.04 +0.8 PthwyGr 13.92 -.08 +1.2 ShTrmBd 9.94 ... +0.4 SmCoStk 25.88. -.39 -0.5 AIM Investments A: Agrsvp 10.94 -.15 +1.4 BasValAp 34.20 -.27 +2.5 ChartAp 13.41 -.07 +1.4 Constp 24.76 -.33 +0.6 HYdAp 4.36 ....+1.7 IntlGrow 23.30 -.08 +5.6 MuBp 8.05 ... +0.6 PremEqty10.42 -.08 +1.0 SelEqtyr 18.60 -.18 +0.4 WeingAp 13.95 -.19 -0.7 AIM Investments B: CapDBt 15.95 -.17 +1.4 PremEqty 9.60 -.08 +0.9 AIM Investor CI: Energy 40.80 -.36 +6.7 SmColp 13.13 -.19 +0.3 SummitPp12.00-.09 +2.0 UMtiles 14.01 -.16 +4.0 AMF Funds: AdjMtg 9.69 ... +0.3 Advance Capital I: Balancpn18.49 -.10 +1.4 Retlncn 9.84 ...+1.1 Alger Funds B: SmCapGr 14.97 -.08 -1.8 AlllancBern A: AmGvlncA7.64 ... +1.3 BalanAp 17.71 -.08 +0.7 GlbTchAp60.29-.69 +0.5 GrncAp 3.90 -.02 +1.0 SmCpGrA24.22 -.40 +0.2 AllianceBern Adv: LgCpGrAd 21.64 -.37 0.0 AllianceBern B: AmGvlncB7.64 ... +1.4 CorpBdBp ... ... NA GIbTchBt54.26 -.63 +0.4. GrowthBt26.16 -.42 +0.2 SCpGrB t20.33 -.34 +0.2 USGovtBp6.92 ... +0.6 AlllanceBern C: SCpGrCt20.38 -.34 +0.1 Allianz Funds C: GwthCt 1886 -.17 +1.2 TargtCt 16.72 -.18 -0.6 Amer Century Adv: EqGropn23.53 -.23 +1.0 Amer Century Inv: Balanced n6.21 -.10 +0.9 Eqlncn 7.92 -.03 +1.0 Growthln20.74 -.19 -0.1 Heritageln1421 -.19 +1.8 IncGrn 30.75 -.17 +02 IntDiscrn1426 +.03 +9.1 IntlGroln 10.07 ... +5.1 LfeSdn 5.38 -.03 -0.4 NewOpprn5.97-.12 -0.5 OneChAgn11.42-.05 +1.5 RealEstln25.46 -.27 +1.7 Seectln 38.62 -.27 +0.6 Ultra n 30.47 -.35 -0.1 Utiln 13.75 -.14 +3.6 Valuejnvn 6.98 -.03 +0.9 American Funds A: AmcpAp 19.37 -.16 +1.5 AMuNiAp 27.50 -.10 +0.8 BalAp 18.35 -.06 +1.0 BondAp 1325 -.01 +0.8 CapWAp 19.0 ... +2.1 CaplBAp54.05 -.10 +22 CapWGAp38.10-.05 +3.7 EupacAp42.66 +.04 +5.2 FdlnvAp.35.74 -22 +32 GwthApx30.82 -.63 +3.0 HITrAp 12.15 ... +1.3 IncoAp 18.60 -.05 +1.5 InBdAp 13.45 ... +0.4 ICAAp 32.53-.18 +1.9 NEcoAp 23.51 -.15 +3.0 NPerAp 30.69 -.10 +3.5 NwWrdA 38.99 +.01 +3.9 SmCpAp 3.02 -.19 +3.9 TxExAp 12.41 ... +0.5 WshAp 31.08 -.13 +1.2 American Funds B: BalBt ,1827 -.06 +0.9 CaplBBt 54.05 -.10 +2.2 GrwthBte29.92 -.43 +3.0 IncoBt 18.50 -.05 +1.4 ICABt 32.36 -.18 +1.9 WashBt 30.93 -.13 +1.1 Ariel Mutual Fds: Apprec 46.89-.29 0.0 Aiel 49.93 -.51 -2.4 Artisan Funds: Intl 25.28 +.05 +5.3 MidCap 30.79 -.34 +0.9 MidCapVat18.382-.16 +1.5 Baron Funds: A I 5601 -r6 -01 Go',r,A 1-1 -59, U0 SrG.C.iJ. .01 -29 +32 Bernstein Fds: IntDur ... .. NA DivMu 13.99 ... +0.5 TxMglntV 23.99 -.09 +4.5 IntVal2 23.96 -.09+4.4 BlackRock A: AutoraA 34.03 -.40 -0.2 HiYlnvA, 7.86 ... +1.4 Legacy 14.57 -.13 +1.0 Bramwell Funds: Growth 1922 -.19 +0.9 Brandywine Fds: Bmdywnn31.13 -.42 +0.8 Brinson Funds Y: HMdl Y n 6.97 ... +1.2 CGM Funds: CapDvn 34.86 -.41 +3.1 Multn 28.79 -.11 +2.5 Calamos Funds: Gr&lncAp3 1.02 -28 +12 GrwthAp 54.99 -.62 +2.1 GrowthCt52.51 -.60 +2.0 Calvert Group: Incop 16.77 +.01+0.6 IntlEqAp 21.09 -.03 +5.2 MBCAI 10.28 ... +0.2 Munlnt 10.69 +.01 +0.4 SocialAp 28.82 -.13 +1.1 SocBdp 15.85 ... +0.6 SocEqAp 35.85 -23 +0.4 TxFLt 10.56 ... +0.1 TxFLgp 16.51 +01 +0.7 TxFVT 15.62 ... +0.5 Causeway Intl: nstitutnlr n16.53-.05 +4.5 Clipperx 88.93-1.14 +2.5 Cohen & Steers: RftyShrs 77.57 -.97 +0.9 Columbia Class A: Acor t 27.43 -.27 +1.1 Columbia Class Z: AcomZ 28.02 -.28 +1.2 AcmlntZ 32.96 -.09 +6.0 Columbia Funds: ReEsEqZ 24.45 -.28 +1.8 Davis Funds A: NYVenA33.86 -.18 +1.8 Davis Funds B: NYVenB 32.49 -.17 +1.7 Davis Funds C &Y: NYVenY 34.23 -.18 +1.8 NYVenC32.70 -.17 +1.7 Delaware Invest A: TrendAp 21.93 -.38 -1.1 TxUSAp 11.48 +.01 +0.8 Delaware Invest B: DelchB 3.24 ... +0.9 SelGrBt 24.31 -28 -0.8 Dimensional Fds: lntSmVa x n17.52-1.02+06.4 USLgVaxn21.79-.38 +0.4 US Micro xn14.70-l 37+0.7 USSmall x n19.42-1.53 +0.4 US SmVax 26.32-2.660+0.4 IntlSmCo x n16.14-.96 +6.7 EmgMktxn20.33-.17 +4.7 IntVaxn 17.95 -.54 +4.3 TM USSV x 23.30-2.49+0.6 DFARIE xn24.90-1.05+0.8 Dodge&Cox: . Balanced 82.75 -.17 +1.1 Income 12.67 +.01 +0.6 InStltk 35.44 -.17 +4.0 Stock 139.79 -.44 +1.4 Dreyfus: Aprec 40.88 -.15 +1.1 Discp 33.94 -.19 +12 Dreyfx 10.36 -.50 +2.0 Dr500lnt 37.15 -22 +1.0 EmrngLd 41.16 -.57 -02 FLIntr 13.04 ... +0.5 InsMutn 17.76 ... +0.6 SWaUlAr 28.53 -.19 +1.7 Dreyfus Founders: GrowthBnlO.51 -.06 +0.2 GrwlFpn11.07-.06 +0.3 Dreyfus Premier: CoreEqAt 15.03 -.05 +1.0 CorVIvp 31.88 -.17 +1.5 UdHYdAp 7.22 -.01 +1.0 TxMgGCt 16.06 -.06 +0.8 TchGroA 24.08 -.41 +0.8 Eaton Vance Cl A: ChinaAp 15.45 +.15 +7.0 GrwthA 7.58 -.07 +2.3 IrBosA 6.32 -.01 +1.4 SpEqtA 11.39 -.17 +1.0 MunBdl 10.66 +.01 +1.1 TradGvA 7.32 ... +0.4 Eaton Vance Cl B: FLMBt 10.90 ... +0.9 HlthSBI 11.98 -.04 +0.6 NatlMBt 1128 +.01 +1.2 Eaton Vance Cl C: GovtC p 7.31 -.01 +0.3 NatMCt 1128 +.01 +12 Evergreen A: AstAllp 14.43 -.01 +2.1 Evergreen B: DvrBdBt 14.57 +.01 +0.9 MuBdBt 7.45 ... +0.5 EvergreenC: AstAJICt 13.97 -.01 +2.0 Evergreen I: CorBdl 10.44 -.01 +0.7 SIMunll 9.93 ... 14J Excelsior Funds: Energy 24.17 -.18 4.5 HiYieldp 4.50 -.01 -, ValRestr 46.27 -.33 -1i FPA Funds: Nwlnc 10.82 ... ,'.4 Federated A: AmLdrA 23.60 -.12 5 MidGrStA33.78 -.40 - MuSecA 10.64 ... ..: Federated B: StrlncB 8.61 ... i Federated Insti: Kaufmn 5.54 -.05 .0 Fidelity Adv Foc T: HICarT 23.48 -.17 -j' NatResT 40.39 -.35 :5 Fidelity Advisor A: DivlntlAr 20.74 -.02 -50 Fidelity Advisor I: EqGrln 51.13 -.43 -1 EqlnIn 28.85 -.16 -.: IntBdIn 10.87 ... =' Fidelity AdvisorT: BalancT 15.84 -.09 -1 DivlntTp 20.55 -.02 -4 'DivGrTp 12.16 -05 -16 DynCAT p16.23-.18-1 EqGrTp 48.39 -.41 i EqlnT 28.51 -.16 -0 GovlInT 9.96 ... -ir GrOppT 33.42 -.42 -1 1 HilnAdTp 9.78 -.02 +2.2 IntBdT 10.85 ... +0.5 MidCpTp24.14 -.18 +1.4 MulncTp 12.89 ... +0.6 OvrseaT 19.67 +.01 +5.2 STFiT 9.41 ... +0.4 Fidelity Freedom: FF2010n 14.31 -.04 +1.2 FF2020n 14.94 -.07 +1.6 FF2030n 15.23 -.08 +1.7 FF2040n 8.97 -.05 +1.8 Fidelity Invest: AggrGrrn17.71 -.19 +1.2 AMgrn 16.07 -.02 +1.6 AMgrGrn 15.16 -.03 +1.8 AMgrlnn 12.78 -.02 +0.9 Balancn 18.66 -.12 +1.8 BlueChGrn43.38-.37 +0.5 CAMunn12.36 ... +0.5 Canada n 42.41 -25 +6.1 CapApn 25.16 -.26 +1.3 Cplncrn 8.39 ...+1.9 ChinaRgn1921 +.16 +4.9 CngSn 410.70 -.38 +1.3 CTMunrn1.37 ... +0.5 Contran 65.76 -.59 +12 CnvScn 22.49 -.13 +2.6 Destin 14.31 -.15 +0.4 Destln 11.90 -.07 +0.4 DisEqn 27.82 -.25 +0.7 DMvntIn 3223 +.03 +4.6 DNvGthn 29.00 -.11 +1.9 EmrMkn 17.90 +.09 +6.7 Eq ncn 53.00 -.28 +1.3 EQI n 22.95 -.14 +1.1 ECapAp 21.76 ,-.03 +4.9 Europe 35.85 +.06 +5.5 Exch n 282.45 -.69 +0.8 Exportn 2128 -24 +1.4 Fideln 31.86 -24 +1.0 Fiftyrn 22.77 -.18 +1.8 FLMurn 11.41 ... +0.5 FrlnOnen26.87 -.13 +1.5 GNMAn 10.88 ... +0.8 Govtlncn 10.13 +01 +0.7 GroCon 6320 -.70 +1.0 Grolncn 34.67 -.29 +0.6 Grolnclln1020 -.08 +0.5 Highlncrn 8.80 ... +1.3 Indepnn 19.66 -.14 +1.9 IntBdn 10.29 .. +0.5 IntGovn 10.05 ...+0.5 IntlDiscn 31.24 +.04 +4.8 lntlSCprn26.38 +.06 +8.0 InvGBn 7.36 ... +0.7 Japann 17.45 +.15+11.0 JpnSmn 15.91 +20+14.7 LatAmn 31.25 -.53 +2.3 LevCoStk n2621 -.26 +3.8 LowPrn 40.61 -.32 +2.3 Magellnn105.85 -.91 +1.2 MDMUrnlO.82 ... +0.7 MAMunnll.85 ... +0.7 MIMunn11.81 ... +0.7 MidCapn 26.32 -25 +2.7 MNMunn11.39 +.01 +0.5 MtgSecn 11.05 ... +0.8 Munilncn 12.78 ... +0.7 NJMunrn11.47 ... +0.7 NwMktrnl4.61 ... +1.4 NwMill n 34.56 -.38 +2.5 NYMunn1279 ... +0.7 OTCn 37.96 -.55+0.8 OhMunn11.62 ... +0.6 Ovrsean 40.81 +.05 +5.6 PcBasn 24.86 +.17 +7.5 PAMunrnlO.77 ... +0.6 Purinn 18.76 -.06 +1.1 RealEn 30.91 -.39 +1.6 StlntMun 10.19 ... +0.3 STir., 866. .e 0 SmllCpSrnl8.16-.19 +1.4 SEAsian 20.75 +.23 +7.7 StkSlcn 24.83 -.23 +0.6 Stratlncn 10.50 ... +1.4 Trend n 57.99 -.41 +1.2 USBIn 10.89 +.01 +0.7 Utility 14.94 -.15 +2.3 ValStratn31.03 -.28 +2.4 Valuen 75.34 -.64 +2.5 Wrldwn 19.41 -.0 +3.5 Fidelity Selects: Air 39.71 -.51 +2.4 Autonn 33.61 -.23 +1.5 Bankingn35.91 -.29 +0.5 Biotchn 60.68 -.85 -2.8 Brokrn 6921 -.36 +2.9 Chemn 65.42 -.51 +2.3 Compn 36.38 -.55 +1.6 Conlnd n 25.21 -.24 +0.5 CstHon 47.46-1.03 +1.9 DfAern 71.93 -.83 +2.6 DvCmn 20.02 -.27 +0.5 Eleclrn 43.85 -.70 +1.9 Enrgyn 47.04 -.40 +5.1 EngSvn 65.93 -.80 +7.1 Envirn 15.80 -.22+3.7 FinSvn 114.73 -.67 +0.6 Foodn 51.16 -.35 +2.2 Goldrn 31.61 -.10 +6.1 Health 136.12 -.94 +0.2 HormFn 50.97 -.44 +0.6 IndMtn 42.91 -.40 +2.6 Insurn. 67.59 -.64 -2.1 Lalisrn 78.33 -.86 +2.0 MedDIn 54.00 -.85 +1.6 MdEqSysn24.66 -.24 -1.3 Multmd n 48.45 -.50 +2.0 NtGasn 39.31 -.29 +6.7 Papern 29.77 -.05 +3.3 Pharm n 9.95 +.05 +2.0 Retail n 48.89 -.54 -0.3 Softwrn 52.46 -.63 -0.1 Techn 63.91 -.91 +1.0 Telcm n 39.50 -.41 +2.2 Trans n 45.95 -.49 -0.9 Ui'lGrn 43.94 -.47 +2.2 Wireless n 6.86 -.04 +0.9 Fidelity Spartan: Eqldxlnvn44.76 -.26 +1.1 5001nxlnv rn87.69-.52 +1.1 Govlnn 10.91 +.01 +0.7 InvGrBdnlO0.38 ... +0.7 Fidelity Spart Adv: EqldxAdn44.76 -.26 +1.1 5s0Adrn 87.69 -.52 NE First Eagle: GIbIA 41.77 +.03 +2.5 OverseasA 22.85+.05 +3.2 First Investors A BIChpAp 21.17 -.12 +0.7 GlobtAp 7.20 -.04 +2.7 GovtAp 10.83 ... +0.9 GrolnAp 14.05 -.11 +1.1 IncoAp 3.00 ... +1.3 InvGrA p 9.64 ... +0.8 MATFAp 11.88 ... +0.5 MITFAp 12.54 ... +0.9 MidCpAp27.62 -.30 +0.5 NJTFAp 12.88 ... +0.5 NYTFAp 14.31 -.01 +0.5 PATFAp 13.07 ... +0.6 SpSitAp 20.19 -.29 +0.3 TxExAp 9.99 ... +0.5 TotRtAp 14.18 -.08 +0.9 ValueBp 6.71 -.03+0.6 Firsthand Funds: GlbTed 3.91 ... +2.4 TechVal 32.61 -.60 -1.0 Frank/Temp Fmk A: AGEAp 2.09 ... +2.1 AdjUSp 8.92 ... +02 ALTFAp 11.44 ... +0.5 AZTFAp 11.00 ... +0.6 Ballnvp 61.42 -.57 +0.7 CaelnsAp 12.63 ... +0.5 CAIntAp 11.47 ... +0.5 CaITFAp 727 ... +0.6 CapGrA 11.24 -.09 +1.2 COTFAp 11.96 ... +0.6 CTTFAp 11.04 ... +0.5 CvScAp 16.06 -.08 +1.3 DbITFA 11.85 ... +0.6 DynTchA 26.42 -.35 0.0 EqlncAp 20.59 -.05 +1.4 Fedlntp 11.36 ... +0.7 FedTFAp 12.06 +01 +0.7 FLTFAp 11.87 ... +0.5 FoundAlp12.94 +.01 +2.4 GATFAp 12.06 +.01 +0.8 GoldPrMA24.12+.03 +6.3 GrwthAp 36.64 -.28 +1.4 HYTFAp 10.72 +.01 +0.9 IncomAp 2.40 ...+1.1 InsTFAp 12.27 ... +0.5 NYITFp 10.88 ... +0.5 LATFAp 11.46 ... +0.6 LMGvScA 9.91 -.01 +0.3 MDTFAp 11.71 ... +0.6 MATFAp11.87 ... +0.6 MITFAp 12.23 +.01 +0.6 MNInsA 12.06 ... +0.7 MOTFAp 12.22 +.01 +0.8 NJTFAp 12.09 +.01 +0.6 NYInsAp11.55 ... +0.7 NYTFAp 11.82 +.01 +0.6 NCTFAp 12.24 ... +0.6 OhiolAp 12.51 +.01 +0.7 ORTFAp11.81 ... +0.7 ISHOW To READ TH MTUL UD*A1LE Here are the 1,000 biggest mutual lunds listed on Nasdaq Tables show the fund name, sell price or Net Asset Value tNAV) ana daily net change, as well as one total return figure as follows Tues: 4-wK lotal return 19) Wed: 12-mo total return I%) Thu: 3-yr cumulative total return (fo) Frl: 5-yr cumulative total return 1%) Name: Name of mutual fund and lamlly. NAV: Nel asset value Chg: Net change in price of NAV. Total return: Percent change in NAV for the time period shown, with dividends reinvested If period longer than 1 year, return is cumula- live. Data oased on NAVs reported to Lipper by 6 pm Eastern. Footnotes: e Ex-capital gains distribution f Previous day's quote. n No load lund. p Fund assets used to pay astrioulion costs r - Redempllon PATFAp 10.37 ... +0.6 ReEScAp 25.68 -.32 +1.7 RisDvAp 32.29 -.18 +0.8 SMCpGrA37.69 -.33 +1.2 USGovA p 6.49 ... +0.9 UtilsAp 11.91 -.14 +2.5 VATFAp 11.79 ... +0.5 Frank/Temp Frnk B: IncomB1 p2.40 ... +1.1 IncomeBt 2.40 +.01 +1.5 Frank/Temp Frrik C: InormCt 2.42 ... +1.5 Frank/Temp Mtl A&B: DiscA 27.41 +.04 +3.7 QualfdAt 21.20 -.01 +2.6 SharesA 25.15 -.01 +2.7 Frank/Temp Temp A: DvMktAp23.05 +.13 +4.2 ForgnAp 12.70 ... +3.4 GIBdAp 10.33 ... +2.5 GrwthAp 22.96 +.04 +3.3 IntxEMp 15.99 -.01 +3.3 WorldAp 17.77 -.02 +2.7 Frank/Temp Tmp Adv: GrthAv 22.97 +.04 +3.3 Frank/Temp Tmp B&C: DevMktC 22.64 +.12 +4.7 ForgnCp 12.55 ... +3.4 GE Elfun S&S: S&SPM 47.12 -.21 +1.3 GMO Trust III: EmMkr 22.10 +.03 +5.2 For 16.49 -.04 +4.7 IntlGrEq 29.40 -.09 NE USCoreEq 14.64 -.08 +2.0 GMO Trust IV: EmrMkt 22.06 +.03 +5.2 IntllntrVI 32.05 -.08 +5.0 Gabelli Funds: Asset 43.43 -.31 +1.9 Gartmore Fds D:: Bond 9.58 ... +0.5 GvtBdD 10.22 +.01 +0.6 GrowthD 7.15 -.08 -0.4 NationwD21.70 -.16 +0.8 TxFrr 10.51- ... +0.6 Gateway Funds: Gateway 25.49 -.05 +0.3 Goldman Sachs A: GrIncA 25.89 -.11 +0.9 MdCVAp 34.99 -.35 +1.1 SmCapA 40.57 -.53 +0.4 Guardian Funds: GBG InGrA 15.15-.03 +4.8 ParkAA 32.46 -.19 +1.9 Harbor Funds: Bond 11.73 ...+0.8 CapAplnst 32.97-.40 +0.8 Intlr 50.97 -.13 +3.4 Hartford Fds A: AdvrsAp 15.99 -.05 +1.3 CpAppAp35.48 -.30 +1.7 DivGthAp19.13 -.08 +1.4 SmlCoAp19.79 -.21 +1.4. Hartford HLS IA: SBondx 11.23 -.54+0.7 CapAppx52.62-7.47 +1.7 Div&Grx 20.89-1.06 +1.4 Advisersx22.60-1.98 +1.2 Stockx 49.54 -.88 +1.5 Hartford HLS IB: CapApp px 52.38-7.34 +1.6 Hennessy Funds: CorGrow 19.16 -.28 +2.5 CorGroll 28.64 -.46 +3.2 HollBalFdn15.64 -.05 +0.9 Hotchklis& Wiley: LgCpVAp23.33-.23 +0.9 M.dJ,:BV i-279' -.28 +1.3 ISI Funds, NoAmp 7.44 ... +1.1 JPMorgan A Class: MCpValp 23.40 -.22 +1.4 JPMorgan Select: IntEqn 32.40 -.10 +3.9 JPMorgan Sel CIs: CoreBdn 10.63 ... +0.6 lntrdAern24.46-.17 +1.3 Janus: Balanced 22.40 -.13 +1.0 Contrarian 14.93 -.04 +2.6 CoreEq .23.55 -.19 +1.5 Enterpr 41.65 -.46 +0.4 FedrTEn 6.97 ... +0.6 FIxBnd n 9.45 ... +0.8 Fund 25.57 -.30 +0.5 GI LifeScir n19,90-.21 -1.1 GITechr 11.80 -.11 +1.1 Grinc 35.87 -.25 +21 Mercury 22.95 -.23 +0.7 MdCpVal 22.27 -.18 +1.6 Olynpus 32.54 -.31 +0.4 Orion 8.24 -.11.+1.4 Ovrseasr31.00 -.03 +4.3 ShTmBd 2.87 ... +0.3 Twenty 48.95 -.49-0.3 Ventur 55.91 -.79 +0.5 WrddWr 43.49 -.24 +3.0 JennlsonDryden A: BlendA 18.06 -.17 +1.7 HMdAp 5.67 ... +1.2 InsuredA 10.74 ... +0.6 UtilityA 14.24 -.15 +5.0 JennisonDryden B: GrowthB 15.00 -.19 +0.6 HiYldBt 5.66 ... +1.1 InsuredB 10.76 ... +0.5 John Hancock A: BondAp 14.93 ... +0.7 ClassicVlp 25.01 -.08 +0.7 StrlnAp 6.85 -.01 +1.5 John Hancock B: StrncB 6.85 -.01 +1.5 Julius Baer Funds: IntlEql r 37.56 -.03 +5.4 IntlEqA 36.83 -.03 +5.3 Legg Mason: Fd OpporTrt 16.85 -.29 +0.4 Splnvp 44.96 -.66 +0.3 ValTrp 69.58 -.80 +1.5 Legg Mason Instl: ValTrlnst 76.58 -.88 +1.6 Longleaf Partners: Partners 31.64 -.33 +0.1 Intl 17.31 -.07 +1.0 SmCap 27.54 -.14 -0.6 Loomis Sayles: LSBondl 13.46 -.03 +0.9 Lord Abbett A: AffilAp 14.15 -.02 +1.4 BdDebAp 7.78 -.01 +1.1 GlncA p 7.00 ... +2.1 MidCpAp23.91 -.27 +0.4 MFS Funds A: MITAp 18.48 -.14 +1.2 MIGAp 12.88 -.12 +0.2 GrOpAp 8.96 -.09 +0.2 HilnAp 3.80 ... +1.4 MFLAp 10.10 ... +0.7 TotRAp 15.42 -.05 +0.9 ValueAp 23.27 -.13 +1.0 MFS Funds B: MIGB 11.77 -.11 +0.3 GvScBt 9.49 ... +0.6 HilnBt 3.81 .. +1.1 MulnBt 8.58 ... +0.6 TotRBt 15.42 -.05 +0.9 MainStay Funds B: CapApB t28.95 -.42 +0.3 ConvBI 13.69 -.10 +1.2 GovtBt 821 ... +0.6 HYdBBt 6.25 ... +1.2 InlEqB 12.98 -.07 +3.6 SmCGBp 14.78 -.26 +1.0 TotRtBt 18.85 -.12 +0.4 Malrs & Power: Growth 73.32 -.53 +1.6 Managers Funds: SpdlEqn 93.86-1.15 +1.1 Marslco Funds: Focusp 18.16 -.22 +0.1 Merrill Lynch A: GIAlAp 16.85 -.03 +2.2 HealthAp 6.65 -.08 +0.7 NJMunBd 10.58 ... +0.9 Merrill Lynch B: BatCapBt ... ... NA BaVIBt 30.52 -.19 +2.0 BdHilnc 5.32 -.01 +1.4 CalnsMB 11.54 ... +0.7 CrBPtBt ... ... NA CpITBI 11.77 +.01 +0.7 EquityDiv 15.85 -.06 +2.3 EuroBt 15.79 -.08 +5.5 FocValt 12.56 -.09 +3.0 FndlGBt 17.24 -.20 -0.2 FLMB1 10.34 +.01 +0.7 GWIBI 16.53 -.03 +2.1 HealthBt 4.91 -.06 +0.6 LatABtx 34.56 -.85 +0.7 MnlnBt 7.84 ... +0.7 ShTUSGt 9.09 -.01 +0.3 MuShtT 9.93 ... +0.3 MulntBt 10.38 ... +0.5 MNIIBt 10.47 ... +0.6 NJMBt 10.57 ... +0.9 NYMB1 10.97 +.01 +0.8 NatRsTBt 148.26 -.36 +7.5 PacBt ... .. NA PAMBt 11.21 ... +0.6 Value0ppt23.06-.30 +1.6 USGovt 10.07 ...+0.6 Utmcmt 12.09 -.12 +3.5 WldlnBt 6.11 -.02 +2.9 Merrill Lynch C: GAICt 16.02 -.03 +2.1 Merrill Lynch I: BalCapl .. NA BaVII 31.17-.20 +2.1 BdHilnc 5.02 ... +1.6 CalnsMB 11.54 ... +0.7 CrBPt .. ... NA CplTI 11.77 +.01 +0.7 DvCapp 22,09 +.08 +6.2 EquityDv 15.79 -.06 +2.5 Eurolt 18.39 -10 +5.6 FocVall 13.86 -.10 +3.2 FLMI 10.34 +.01 +0.7 GIAIIt 16.90 -.02 +3.0 Health 7.24 -.10 +0.6 LatAlx 36.13-124+0.7 Mnlnl 7.85 ... +0.9 MnShtT 9.93 ... +0.3 Mum 10.39 ... +0.6 MNatll 10.48 ... +0.8 NatRsTrt51.28 -.38 +7.5 Pac ... ... NA ValueOpp25.80 -.33 +1.7 USGovt 10.07 ... +0.6 UtIcmlt 12.11 -.12 +3.6 Wdlncl 6.12 -.01 +2.9 Midas Funds: Midas Fd 2.80 ... +9.4 Monetta Funds: Monettan12.00 -.15 +1.0 Morgan Stanley A: DivGthA 33.29 -.27 +1.1 Morgan Stanley B: GIbDivB 14.78 -.04 +2.4 GrwthB 14.05 -.17 +0.4 StrtB 18.88 -.12 +0.8 MorganStanley Inst: GIValEqAn18.71-.07 +2.4 IntlEq n 22.35 -.12 +3.2 Muhlenk 85.41 -.42 +1.8 Under Funds A: IntemtA 21.02 -.29 +1.8 Mutual Series: BeacnZ 17.26 -.02 +2.7 DiscZ 27.70 +.03 +3.7 QualfdZ 21.35 -.01 +2.6 SharesZ 25.35 -.01 +2.7 Neuberger&Berm Inv: Focus 32.55 -.22 +1.4 Intlr 21.42 -.11 +6.5 Partner 28.08 -.33 +1.9 Neuberger&Berm Tr: , Genesis 48.51 -.56 +0.9 Nicholas Applegate: EmgGrotnll.45 -.19 +1.4 Nicholas Group: Hilnc In 2.14 ... +0.9 Nichn 62.35 -.31 +0.8 Northern Funds: SmCpldx n0.8 -.17 +0.1 Technlyn11.73 -.18 +0.1 Nuveen Cl R: InMun R 10.76 +01 +0.7 Oak Assoc Fds: WhitOkSGn32.45-.46 0.0 Oakmark Funds I: Eqtylnc r n25.04 -.07 +2.6' Global n 23.64 -.03 +4.3 Intlrn 22.65 ... +4.0 Oakmarkrn4121-.28 +0.9 Selectrn 32.95 -.27 +2.1 Old'Mutual Adv II: Tc&ComZn12.38-.17 +0.1 Oppenheimer A: AMTFMu 10.07 ... +1.1 AMTFrNY,12.79 +.01 +0.9 CAMuniAp11.40+.01 +1.1 CapApAp43.23 -.47 +0.5 CaplncApl2.46 -.07 +0.1 ChlncAp 9.32 -.01 +1.2 DvMktAp35.53 +.14 +6.5 Discp 43.65 -.79 0.0 EquityA 10.55 -.10 +0.2 GlobAp 66.29 -.35 +3.4 GIbOppA 36.13 -.27 +4.6 Goldp 21.82 -.11 +5.3 HiYdAp 9.33 ...+1.3 IntBdAp 5.82 -.03 +1.0 LtdTmMu 15.74 ... +0.7 MnStFdA 37.42 -.22 +1.2 MidCapA 18.33 -.21 -1.0 PAMuniAp12.67 .. +0.9 StrlnAp 4.22 ... +1.2 USGvp 9.53 ... +0.7 Oppenheimer B: AMTFMu 10.04 +.01 +1.0 AITFrNY 12.79 +.01 +0.8 CplncBt 12.32 -.06 +0.1 ChlncBt 9.31 -.01 +12 EquityB 10.13 -.09 +0.1 HIYlBt 9.18 -.01 +1.3 StrlncBt 4.23 -.01 +0.9 Oppenhelm Quest: QBalA 17.88 +.01 +0.3 Oppenheimer Roch: RoMuAp18.18 +.01 +1.0 PIMCO Admin PIMS: TotRtAd 10.48 ... +0.8 PIMCO Instl PIMS: AIIAsset 13.11 +.01 +1.5 ComodRR 17.10+.11 +6.9 HiYld 9.71 ... +1.5 LowDu 9.99 -.01 +0.5 RealRtnl 11.03 +.01 +0.8 TotRt 10.48 ... +0.8 PIMCO Funds A: RealRtAp11.03 +.01 +0.8 TotRtA 10.48 ... +0.8 PIMCO Funds D: TRtnp 10.48 ... +0.8 PhoenlxFunds A: BalanA 15.03 -.05 +1.1 CapGrA 15.70 -.18 +1.0 IntA 11.49 ... +4.7 Pioneer Funds A: BalanAp 9.96 -.05 +0.8 BondAp 9.16 ... +0.8 EqlncAp 29.22 -.11 +1.2 EurSelEqA32.62-.15 +4.7 GrwlhAp 12.60 -.13 +0.2 IntNalAA 19.99 -.06 +4.6 MdCpGrA14.72 -.22 -0.2 MdCVAp23.26 -.24 +2.5 PionFdAp44.49-.25 +1.1 TxFreAp 11.58 ... +0.6 ValueAp 17.60 -.07 +2.0 Pioneer Funds B: HiYdB 110.78 -.04 +0.4 MdCpVB 20.36 -.21 +2.4 Pioneer Funds C: HiYdCt 10.88 -.04 +0.4 Price Funds: Balancen19.79 -.07 +1.3 BIChip n 32.87 -.32 +0.5 CABond nlO.96 ... +0.6 CapAppn20.09 -.10 +1.4 DivGron 22.89 -.16 +1.3 Eqlncn 26.11 -.09 +1.2 Eqlndexn33.84 -.20 +1.0 Europen 17.15 -.07 +3.8 FLIntmn 10.76 ... +0.5 GNMAn 9.46 ... +0.9 Growth n 28.53 -.24 +0.6 Gr&lnn 20.77 -.18 +1.0 HithScin 24.61 -.30 +0.3 HiYieldn 6.91 ... +1.2 ForEq n 17.23 -.05 +4.2 IntlBond n 9.51 -.01 +3.3 IntDis n 40.85 +.05 +6.8 IntlStkn 14.63 -.04 +4.2 Japann 11.43 +.01 +8.3 LatAmrn 24.65 -.40 +1.3 MDShrtn 5.13 ... +0.4 MDBondn1l.65 +.01 .0.6 MidCapn 53.75 -.56 +1.6 MCapVal n23.33 -.18 +2.3 NAmern 31.91 -.39 +0.3 NAsian 11.67 +.09 +4.8 NewEran40.85 -.33 +4.7 NHorizn31.68 -.48 +0.7 NIncn 8.95 ... +0.8 NYBOndnll.29 ... +0.6 PSIncn 15.07 -.05 +1.0 RealEstn 19.43 -.21 +1.5 SciTecn 19.77 -.28 +0.5 ShtBdn 4.68 ... +0.3 SmCpSIk n32.71-.43 +0.5 SmCapVal n36.83-.50 -0.5 SpecGrn 18.23 -.14 +1.6 Speclnn 11.81 -.01 +1.1 TFIncn 9.95 ... +0.6 TxFrHn 11.89 .. +0.7 TFIntmn 11.09 ... +0.6 TxFrSI n 5.33 ... +0.2 USTint n 5.31 ... +0.7 USTLgn 11.77 +.02 +1.2 VABondnll.60 ... +0.6 Valuen 23.46 -.14 +1.6 Putnam Funds A: AmGvAp 8.90 +.01 +0.6 AZTE 9.20 ... +0.6 ClscEqAp 13.32 -.10 +0.9 Convp 17.60 -.11 +0.9 DiscGr 18.41 -.22 +1.0 DvrlnAp 9.88 +01 +0.9 EuEq 23.11 -.12 +5.1 FLTxA 9.13 ... +0.5 GeoAp 17.94 -.07 +0.8 GIGvAp 12.20 ... +2.2 GIbEqtyp 9.22 -.05 +3.4 GrlnAp 19,80 -.10 +1.4 HIlhAp 62.68 -.03 +1.5 HiYdAp 7.90 ... +1.3 HYAdAp 5.95 .. +1.3 IncmApp 6.74 ...+0.6 IntlEqp 26.60 -.14 +4.8 IntGrlnp 13.55 -.09 +4.9 InvAp 13.62 -.13 +1.3 MITxp 8.99 :.. +0.5 MNTxp 8.98 ... 0.5 NJTxAp 9.20 ... +0.5 NwOpAp45.54 -.49 +1.1 OTCAp 7.87 -.10 +0.9 PATE 9.08 ... +0.5 TxExAp 8.77 ... +0.6 TFlnAp 14.85 ... +0.6 TFHYA 12.92 ... +0.6 USGvAp 13.09 +.01 +0.8 UtilAp 11.12 -.11 +2.4 VstaAp 10:63 -.11 +1.4 VoyAp 17.54 -.23 +0.5 Putnam Funds B: CapAprt 19.00 -21 +0.5 ClscEqBt13.22 -.10 +0.9 DiscGr 16.96 -.21 +1.0 DvrlnBt 9.80 +.01 +0.9 Eqlnct 16.71 -.10 +1.1 EuEq 22.19 -.12 +5.0 FLTxBt 9.13 .... +0.5 GeoBt 17.77 -.07 +0.8 GllncBt 12.15 -.01 +2.1 GIbEq t 8.37 -.05 +3.3 GINtRst 30.29 -.22 +4.3 GrlnBt 19.52 -.10 +1.4 HlthBt 56.52 -.03 +1.5 HYldBt 7.87 ... 1.3 HYAdBt 5.87 ... +1.3 IncmBt 6.70 ... +0.6 IntGrInt 13.24 -.09 +4.7 IntlNopt 12.77 -.04 +4.9 InvBt 12.54 -.11 +1.4 NJTxBt 9.19 ... +0.5 NwOpBt 40.85 -.44 +1.0 NwValp 17.77 -.13 +1.2 NYTxB t 8.70 ... +0.5 OTCBt 6.94 -.09 +0.7 TxExBt 8.78 ...+0.6 TFHYBt 12.94 ... +0.5 TFnBt 14.87 ... +0.5 USGvBt 13.02 +.01 +0.7 UtIBt 11.05 -.11 +2.3 VistaBt 9.26 -.10 +1.3 VoyBt 15.35 -.20 +0.5 RiverSource/AXP A: Discover 9.45 -.15 +1.4 DEI 12.45. -.10 +1.6 DivrBd 4.80 ... +0.8 DvOppA 7.56 -.03 +1.3 GlblEq 6.65 -.03 +3.9 Growth 29.19 -.11 +2.5 HiYdTEA 4.40 ...+0.5 Insr 5.39 ... +0.6 Mass 5.33 ... +0.6 Mich 5.27 +.01 +0.6 Minn 5.26 ... +0.7 NwD' 24.59 -.11 +1.8 NY 5.08 ... +0.7 Ohio 5.24 ... +0.6 SDGov 4.73 ... +0.3 RiverSource/AXP B: EqValp 11.28 -.09 +1.2 Royce Funds LwPrStkr 15.29 -.18 +2.5 MiroCapl 15.73 -.14 +2.5 Premierlr 16.63 -.14 +2.8 ToaRetlr 12.55 -.12 +0.4 Russell Funds S: DivEqS 48.02 -.34 +0.5 QuantEqS38.34 -.25 +1.2 Rydex Advisor: OTC 10.72 -.15 -0.9 SEI Portfolios: CoreFxAnlO.31 ... +0.7 IntlEqAn 12.61 ... +5.3 LgCGroA n19.96-.19 -0.2 LgCValAn21.40 -.09 +1.2 STI Classic: CpAppA p 11.78 -.09 +0.3 CpAppCp 11.08 -.09 +0.1 LCpVIEqA 12.90 -.04 +1.0 QuGrStkCt23.88-.19 -0.1 TxSnGrlp25.51 -.20 0.0 Salomon Brothers: BaancBp 13.02 -.03 +0.8 Opport 50.85 -.50+0.6 Schwab Funds: 1000lnvr 36.49 -24 -0.3 S&Plnv 19.37 -.11 +1.0 S&PSel 19.42 -.11 +1.0 SmCplnv 22.89 -.35 0.0 YIdPlsSI 9.66 ... +0.4 Scudder Funds A: DrHiRA 45.70 ... +2.8 FlgComAp 19.40-.12 +2.8 Scudder Funds S: EmMkln 11.30 ... +1.3 EmMkGrr22.84 +.09 +5.2 GIbBdS r 9.49 ... +1.8 GIbDis 40.07 -.18 +4.5 GlobalS 32.62 -.05 +4.1 Gold&Prc 19.68 -.05 +5.1 GrEuGr 30.75 -.01 +6.6 GrolncS 23.11 -.17 +0.2 HiYdTx 12.80 ... +0.7 Incomes 12.67 +.01 +0.7 IntTxAMT 11.18 ... +0.6 IntlFdS 51.37 -.09+4.8 LgCoGro 25.59 -.27 +0.6 LatAmr 47.76 -.92 +0.8 MgdMuniS 9.09 ... 0.7 MATFS 14.26 ... +0.6 PacOppsr 15.91 +.11 +5.9 ShtTmBdS 9.94 ... +0.3 SmCoVIS r27.36-.45 -0.9 Selected Funds: AmShSp 40.43 -.19 +1.7 Seligman Group: FrontrAt 12.32 -.18 -1.1 FrontrDt 10.77 -.16 -1.2 GIbSmA 16.46 -.15 +3.5 GIbTchA 13.61 -.17 +1.3 HYdBAp 3.31 ... +0.9 Sentinel Group: ComSAp31.54 -.22 +1.4 Sequoia n155.97-1.24 -0.8 Sit Funds: LrgCpGr 37.25 -.30 +1.0 Smith Barney A: AgGrA p10.77-1.12 +0.7 ApprAp 14.58 -.08 -0.1 FdValAp 14.74 -.06 +1.6 HilncAt 6.77 ... +1.2 InArCGAC p 12.86+.03 +5.1 LgCpGA p23.23 -.23 -0.4 Smith Barney B&P: FValBt 13.75 -.06 +1.5 LgCpGBt21.84 -.22 -0.5 SBCplnct 17.03 -.07 +1.4 Smith Barney 1: DvStrl 16.57 -.03 +0.5 Grnd 115.99 -.13 +1.3 St FarmAssoc: Gwth 50.55 -.25+0.9 Stratton Funds: Dividend 34.44 -.38 -0.3 Growth 44.32 -.49 +2.5 SmCap 43.35 -.44 +2.2 SunAmerlca Funds: USGvBt 9.33 +.01 +1.0 SunAmerica Focus: FLgCpAp18.90 -.30 -.1 TCW Galileo Fds: SelEqty 20.75 -.43 -1.5 TD Waterhouse Fds: Dow3"0 ... 0.0 TIAA-CREF Funds: BdPlus 10.12 ... +0.8 Eqlndex 9.15 -.07 +1.0 Groins 12.96 -.08 +0.9 GroEq 9.76 -.14 +0.2 HiYldBd 9.10 ... +1.2 InllEq 12.10 -.05 +4.9 MgdAlc 11.56 -.06 +1.5 ShtTrBd 10.35 .. +0.4 SocChEq 9.86 -.08 +0.8 TxExBd 10.76 +.01 +0.7 Tamarack Funds: EntSmCp 32.95 -.51 -0.2 Value 46.48 -.11 +0.9 Templeton Instlt: EmMSp 18.60 +.11 +4.7 ForEqS 22.19 ... +4.5 Third Avenue Fds: InU r 21.43 -.04 +4.2 RIEstVIr 30.57 -.27 +1.4 Value 60.14 -.22 +1.6 Thrivent Fds A: HiYld 5.06 ... +1.4 Incom 8.59 ... +0.8 uo. Ia" .5' *. : '' 65 T . a.r 5* d.. ULIUU < WJVE |)41. *lJ Cf~i -y-* IpJ Sm C.. LgCpStke 26.75 -.47 +0.7 TA IDEX A: FdTEAp ... ...0.0 JanGrowp26.10-.31 +0.2 GCGlobp25.82 -.11 +1.6 TrCHYBp 9.01 +.01 +1.3 TAFIxln p 9.36 ... +0.8 Turner Funds: SmlCpGrn25.29 -.36 +0.6 Tweedy Browne: GlobVal 26.54 +.05 +1.6 US Global Investors: AIIAmn 28.57 -.26 -0.1 GibRs 15.38 -.09 +7.7 GldShr 9.92 -.03 +5.0 USChina 7.68 +.07 +4.9 WldPrcMn 19.71 -.12 +6.7 USAA Group: AgvGt 31.31 -.42 +0.1 CABd 11.09 ... +0.7 CmstStr 26.06 -.08 +1.4 GNMA 9.57 ... +0.8 GrTxStr 14.44 -.03 +0.7 Growth 15.27 -.18 +0.3 Gr&lnc 18.56 -.15 +0.9 IncStk 15.41 -.06 +1.6 Inco 12.21 +.01 +0.6 Intl 23.40 -.06 +3.8 NYBd 11.94 +.01 +0.8 PrecMM 19.78 -.06 +7.0 SciTech 10.60 -.13 +1.1 ShtTBnd 8.84 -.01 +0.3 SmCpStk 13.49 -.19 +0.2 TxElt 13.13 +.01 +0.7 TxELT 14.00 ... +0.7 TxESh 10.62 ... +0.3 VABd 11.57 ... +0.6 WldGr 17.90 -.08 +2.3 Value Line Fd: LevGtn 28.27 -.32 +2.0 Van Kamp Funds A: CATFAp 18.70 ... +0.8 CmstAp 17.95 -.02 +1.9 CpBdAp 6.60 ... +0.7 EGAp 41.65 -.51 +0.7 EqlncAp 8.71 -.02 +1.0 Exch 370.83 +1.39 +1.8 GrInAp 20.65 -.07 +1.1 HarbAp 14.50 -.06 +1.1 HiYIdA 3.53 ... +1.4 HYMuAp 10.88 ...+1.1 InTFAp 18.77 ... +0.7 MunlAp 14.60 ... +0.6 PATFAp 17.33 +.01 +0.7 StrMunlnc13.20 ... +1.1 US MtgeA 13.65 ... +0.7 UtilAp 19.09 -.20 +3.4 Van Kamp Funds B: CmstBt 17.95 -.03 +1.9 EGB t 35.51 -.43 +0.6 EnterpBt 12.06 -.13 +0.8 EqlncBt 8.57 -.03 +0.9 HYMuBt 10.88 ... +1.0 MulB 14.56 ... +0.6 PATFBt 17.27 ... +0.6 StrMunlnc13.20 +.01 +1.1 US Mtge 13.59 ... +0.5 UtilB 19.05 -.20 +3.4 Vanguard Admiral: CpOpAdl n76.52 -.62 +0.8 ExplAdml n75.47 -.99 +0.8 500Admln116.54-.69 +1.1 GNMAAdn10.28+.01 +1.1 HlthCrn 58.87 +.12 +3.0 HiYldCpn 6.16 ... +1.3 HildAdm n10.75 .. +0.7: lTBdAdmln10.33 ... +0.8 TAdmln 13.29 ... +0.6 LtdTrAd n 10.70 ... +0.4 MCpAdml n80.56-.77 +1.8 PrmCaprn7025-.44 +1.6 STsyAdmlnlO.33 ... +0.4 ShtTrAdn 15.53 ... +0.3 STIGrAd n.51 ... +0.5 llBAdml n1.03 ... +0.7 TStkAdm n30.33 -.22 +1.0 WellslAdm n51.09-.08 +0.7 WelltnAdm n54.72-.14 +1.3 Windsorn58.00 -.16 +2.2 WdsrllAd n55.90 -.07 +1.2 Vanguard Fds: AssetAn 25.55 -.15 +1.0 CALTn 11.68 +.01 +0.8 CapOppn33.10 -.27 +0.8 Coanrtn 13.85 -.10 +2.7 DivdGron12.54 -.04 +1.3 Energy 56.15 -.30 +5.0 Eqlncn 23.00 -.09 +1.3 Explrn ,80.94-1.07 +0.7 FLLTn 11.64 +.01 +0.7 GNMAn 10.28 +.01 +1.1 Grolncn 32.40 -.18 +1.0 GrhEq n 10.43 -.14 0.0 HYCorpn 6.16 ... +1.2 HlhCren139.47 +.26 +2.9 InflaPron 12.41 .01 +0.8 !ntlExplrn17.72 -.01 +7.0 IntlGrn 21.49 -.06 +5.1 IntlValn 34.61 -.09 +5.6 ITIGraden 9.76 ... +0.7 ITTsryn 10.96 +.01 +0.8 UfeConn 15.68 -.04 +1.0 LieGron 21.33 -.11 +1.5 Ufelncn 13.65 -.02 +0.7 UfeModn 18.78 -.08 +1.3 LTIGraden9.42 +.01 +1.1 LTTsryn 11.53 +.01 +1.2 Morgn 17.76 -15 +1.8 MuHYn 10.75 ... +0.7 MulnsLg n12.61 ... +0.8 Mulntn 13.29 ... +0.6 MuLtdn 10.70 ...+0.3 MuLongnll.27 +.01 +0.8 MuShrtn 15.53 ... +0.3 NJLTn 11.84 ... +0.7 NYLTn 11.30 +.01 +0.8 OHLTTEn12.02 +.01 +0.7 PALTn 11.35 +.01 +0.7 PrecMtls r n23.39+.02 +4.9 Prmcprn 67.63 -.42 +1.6 SelValurn18.75 -.13 +1.6 STARn 19.91 -.06 +1.7 STiGrade n0.51 ... +0.5 STFed n 10.26 .. +0.6 StratEq n 21.86 -.25 +1.4 USGron 18.09 -.26 +0.5 USValue n13.59 -.06 +2.0 Wellslyn 21.09 -.03 +0.7 Welltnn 31.67 -.08 +1.3 Wndsrn 17.19 -.05 +2.2 Wndslln 31.49 -.04 +1.2 Vanguard Idx Fds: 500 n 116.52 -.68 +1.1 Balanced n20.01 -.09 +0.9 EMktn 18.96 +.06 +5.0 Europe n 28.54 -.09 +4.7 Extend n 34.43 -.41 +0.7 Growth n 27.83 -.27 +0.5 ITBndn 10.33 ... +0.8 LgCaplxn22.65 -.14 +1.1 MdCapn17.75 -.17 +1.8 Paclcn 11.26 ... +4.7 REITrn 20.26 -.23 +0.6 SmCapn 28.70 -.41 +0.4 SmlCpVln14.l80 -21 +0.3 STBndn 9.92 ... +0.4 TotBnd n 10.03 ... +0.7 Totlnuln 14.47 -.02 +4.7 TotStkn 30.33 -.22 +1.0 Value n 22.60 -.07 +1.7 Vanguard Instl Fds: Instldxn 115.59 -.68 +1.1 InsPIn 115.60 -.68 +1.1 TotlBdIds n50.67 ... +0.8 InsTStPlus n27.25-20 +1.0 MidCplstn17.8L1 -.17 +1.8 TBIlstn 10.03 ... +0.7 TSInstn 30.34 -.22 +1.0 Vantagepoint Fds: Growth 8.74 -.08 +0.3 Victory Funds: DvsStA 16.97 -.11 +1.5 Waddell & Reed Adv: CorelnvA 6.18 -.05 +1.8 Wasatch: SmCpGr 41.41 -.57 +0.2 Weltz Funds: Value 36.47 -.18 +0.7 Wells Fargo Adv: Opptylnv 44.87 -.40 +1.1 Western Asset: CorePlus 10.41 -.01 +1.0 Core 11.20 ... +0.9 William Blair N: GrowthN 11.39 -.08 +0.9 IntlGthN 24.84 -.03 +4.6 Yacktman Funds: Fundp 15.17 ...+1.1 5bxs 10 lor *0 ft-W GN o - , - S-. "Copyrighted Material S S Syndicated Content b Available from Commercial News Providers" ltm ( rlra rw in I mun urfta r. Sd. . . li 3.4m hHomoristmsas I HOMOSRSR PU Celebration of Lights WILDLIFE PRRK' Fri, Dec. 16 through Sat., Dec. 24th Park reopens from 5:30 to 8:00 pm Presented by the Friends of Homosassa Springs Wildlife Park and co-sponsored by the Citrus County Chronicle & WOW 1043. ', Tuesdayt Decmber 20- SPEACE IN THE PARK TranquilityNight - Suggested Donations ~ $2.00 for adults $1.00 for children ages 6 through 12 years. Free admission for children Age 5 and under. Transportation Thanks To Our Sponsors from the Visitor Center on US. 19 to the West Entrance on Fishbowl Drive every night. MENDS Refreshments & popcorn available. For More Information Call (352)628-5343 Monday Friday CH ONICLE , 651457 www 1hroicleonIlineo0m 9 C(i~~rjl~~ ~ 4 * u o 1OA TUESDAY DECEMBER 20, 2005 A n ,:r ,-r ,:j ,rn.:li ,rl ,:,.,T, "From the errors of others a wise man corrects his own." Publi1ius Syrus CTRUS COUNTY CHRONICLE EDITORIAL BOARD Gerry Mulligan .......................... publisher Charlie Brennan ............................... editor Neale Brennan ...... promotions/community affairs Kathle Stewart ..................circulation director Mike Arnold .......................... managing editor Andy M arks ................................sports editor John Murphy ............. classifleds/online leader Founded in 1891 Jim Hunter ...............................senior reporter by Albert M. Curt Ebltz ..............................citizen member williamson Mike Moberley ........................guest member "You may differ with my choice, but not my right to choose." David S. Arthurs publisher emeritus LEARN FROM EXAMPLE Start recruiting process as soon as possible It seems like only yesterday that an unassuming Beverly Hills resident took over the role of Crystal River city manag- er and now that search is about to begin again. Phil Deaton has been a rock for the city and his leadership was instrumental in calming some of the turmoil at City Hall. His 40 years of experience in municipal adminis- tration have been evident in his local tenure. As city council members look for someone to replace Deaton, they should keep in mind the leadership charac- teristics that THE IS City mana, search replace OUR OP Choose Deaton applies to the job and seek someone who possesses similar qualities. -Although seemingly unassum- ing, Deaton' is a perfectionist who knows how to keep the waters calm and get the job done. Therefore, he needs to be a part of the screening and selec- tion process. Deaton is willing to stay in the manager's job through the selec- tion process and transition to a new manager. The city council should make the most of that offer, without delaying the search. City leaders will need to act quickly and be conscientious of Deaton's time and health con- cerns. City council members have indicated they will use an outside recruiting firm to help select the best replacement. Given the events surrounding the last city manager search, the council should first exhaust |SUE: any local candi- ger urges dates. Then, if there h for is not a qualified rment. local candidate, the search should be 'INION: widened and aided wisely. by the use of a pro- fessional recruiting service. Phil Deaton has brought 40 years of professional experience to the city of Crystal River. He is a true professional .who has passion for ,his work, and likes to see projects to fruition and done correctly the first time. He has been a stable force and replacing his skills and talents will be a challenge. Making the wrong selection of a manager has the potential to void all the progress made in the last year or so. Every effort needs to be made to get this one right the first time. United Way needs your help If every Citrus County family . donated $25 to United Way this " holiday season, the fundraising . agency would meet its goal of support for the 23 nonprofit agencies in our community. We urge residents to get involved, and send in a check. Your contribution Not for sissies S I am calling in response to the Dec. 10 writer of "Football injuries," in Sound Off. I encourage this person to go back and reread the article because they obviously didn't understand it the first time they read it. Nowhere does CALL Kevin (Fagan) say soccer is 5 ., for sissies. As a matter of fact, 563u he said that if you get beat in soccer, you're not a sissy; if you get beat in football, you are a sissy. Now I can probably assume the person who called in probably never played football, because they wanted to let Kevin know that not everyone is a fan of football and it is considered a barbaric sport. * For n Opini see P Well, that's their opinion. 11 Kevin played football and his opinion was that a player felt like a sissy if they got beat. That is it. He has nothing but respect for the sport of soccer and for those who play it. I'm sure he doesn't think his own kids are sissies. Did this reader read the part about how much time he took to leam about the sport of soccer and that he helped start Nature Coast Soccer League? Maybe if the reader took the same amount of time to leam about football that Kevin took to leam about soccer, then they might understand what he means when he talks about football. Or maybe the reader has already formed their opinion on Kevin, which is too bad because they missed out on what the article was truly about. I would also like to mention that I. JN know for a fact that Kevin Fagan puts academics first above all sports and he would never sacrifice his sons or daughters for any sport... Pets as presents At Christmastime, people S buy small pets to give to other people. First of all, they should 0579 check and make sure the per- son wants one, because peo- ple don't always like pets. And secondly, small pets should be bought in twos, not just one alone. Sound bytes This is a Sound Off that will never make your modest little paper nore ... The Sound Off sound bytes on ... and the letters running ... 'AGE (are) anti-Republican. It's understandable because Citrus County is a heavily Democratic county, isn't it? Oh, wait a minute, maybe it isn't. And you people, I admire your courage. Setting a trap? Well, I see we have another speed trap in Inverness. Two to three miles south of Inverness, on (County Road) 581, the county has placed 45-mph speed limits, although there's only one house in that area. That way they can get more unsus- pecting travelers going down think- ing it's still 55 mph, so that way they could get more money for the county by putting this low speed in an area where there's really nothing down there. Murtha proposes new strategy A s any professional debater will tell you, framing the terms of the debate is more than half the battle. We saw a good example of that in the Republican reaction to Democratic Rep. John Murtha's call for withdraw- . al of U.S. forces from Iraq. If the choice is between "cutting and running," Charle which connotes cowardice OTI and weakness, or "staying VOI the course," which con- notes strength and manli- ness,- ployment, which he estimates could be done safely in about six .months. He advocates keeping a Marine force close enough that it could come back in if the new Iraqi government needs its help. In other words, Murtha's pro- posal is a new strategy for the situa- tion. He wants hearings and an intelli- gent debate. The political stunt the Republicans pulled was designed to make sure there would be no debate. They voted 1 "tPl *: W) y Reese is to stay until the insur- HER agency is defeated. Trouble CES is, we don't have enough troops in Iraq to defeat it. It is costing us about $1 billion a week; it costs the insurgency practi- cally con- cept fam- ily would all be burned to death. You can't make friends by treating the wounds you inflict. The facts of a failed policy are on the ground for all to see. After two years, :opyrighted Materi; indicatedd Conteni there are more attacks, not fewer; more American casualties, not fewer; and there is no security Americans have to fort up, and they venture out only in heavily armed convoys. Electrical generation, clean water and oil production are still woefully inade- quate. pro- found way. This isn't George Bush's war. We the people collectively put those troops in harm's way. They can't speak for them- selves, nor can they set policy. We owe them a serious debate and the wisest possible policy You don't stay the course if the course is the wrong one. So far, the Bush administration has refused all discussion and has simply replied with slogans, stunts and talk- ing points. The troops deserve better than that. Over there, it is not a political gotcha game. It is daily a matter of life and death. They will leave Iraq eventually. The question is; how many will die and be maimed before the departure date? Write to CharleyReese at P.O. Box 2446, Orlando, FL 32802. Al-Arian case After a torturous and prolonged ordeal, with all the power, resources and prestige of the government arrayed against him, a jury of his peers acquitted Prof. Sami Al-Arian on eight charges related to terrorism and was unable to reach a decision on a number of others, reportedly because of a few diehard holdouts for conviction. I suppose we may now assume that, though not generally applauded in our society, it will be, well, OK to be Muslim, OK to wear "funny" clothes, OK to be politically unpopular and OK to support movements such as statehood for Palestine in the face of powerfully entrenched and moneyed interests in opposition. Although my best wishes go to Al- Arian and his family, I must admit that they were not my primary con- cern during this challenge to our sys- tem of justice. My primary concern was for my country Had America been poisoned by 9/11? Would the Patriot Act prevail over human rights and constitutional guarantees? Could the reverses of the war in Iraq profit from a coat of paint by cracking down on "terrorism" in the homeland? And however could the belligerent one-track flag-wavers be appeased by anything less than a verdict of guilty? Then 12 ordinary citizens, chosen by lot, stepped up to the challenge, damned the pressures, and mustered the courage to save America. I am proud of them and much relieved. Their verdict will be far from uni- versally received. The super-patriots, in some vogue today, will say it places eh. us in further danger of "terrorism" and will detract support from the war. Other enthusiasts contrarily will claim that the verdict just goes to show what a great country this really is. I and some fellow quieter patriots are certainly relieved and simply quite satisfied that the jury gave us what we expect from America. Rolf Norbom Crystal River War causing debt Since Bush got us into this uncalled for war with Iraq, we have to rebuild Iraq for the poor Iraqi people. It's Bush's fault! We ruined their beauti- ful country, their economy, killed and maimed thousands of children, moth- ers, fathers, soldiers, animals, etc. We are never told just how many Iraqi people died or are maimed. Can you imagine how we would feel and how we would act if their country did this to our country? Now, after billions and billions of our taxpayers' money and 2,200 of our beloved soldiers dead and thousands maimed for life, we have to spend bil- lions to rebuild Iraq. We are so brain washed and are like sheep. It's all about money and ruling the world. They have to have a puppet to blame for this catastrophe while they plan their next move. Our wonderful country is doomed economically and socially because of this uncalled for war. There are evil people in this world, and we are letting them get away with this catastrophe. These people behind this want this country poor like the other countries so they have complete control like they have in Mexico, India, Africa, China, etc. They will only be the rich and poor, no more middle class. The poor can never speak out. If they get our kids on drugs, alcohol and porn, they are winning. We are in debt trillions of dollars. Our young are in debt with their cred- it cards being pushed down their throats. Why should we have the right to install a new Iraqi government? Who will benefit? The insurgents are only protecting their country If Iraq came over here and bombed us, we would be called insurgents too. We certainly wouldn't stand for it Florence Cl. Available from Commercial News Providers' LETTERS to the Editor c I I ~i i F I L - *Lf Cu op'y(L HOIL PNO USA.DCME 20 205h Finish the job Re: B. Dallenger's letter of November I do not know whether this person served in the military or not, but, before you make an opinion, get your facts straight Basic training is longer than six weeks. Then follow schools and so forth. Most of the time, service personnel do not get to "the fleet" in less than six months, some up to two years. I served in the U.S. Marine Corps for 22 years. I spent the last 18 months of it in Iraq. A lot of facts are severely over- looked. People know only what the media tell them; nine times out 10, it's death and destruction. I can show firsthand pic- tures of what the media does- n't show you; for example, all of the schools, hospitals, roads, refineries, etc., that we have rebuilt We help people by pro- viding the bare necessities of life that they have to struggle for Are we in Iraq for the right reasons? That is debatable. I bet Dallenger supported the war when it first started. I also bet the letter writer was look- ing for blood after 9/11. I was over there during the first round, also. Guess what? We pulled out then. What hap- pened next? Saddam Hussein went to the south after we left and performed genocide on hundreds of thousands of peo- ple. Why, because we left be- fore the Shiites were properly trained to take on Saddam. Have you seen the graves? I have. I concede that we have our own share of problems. I also concede that our political leaders should keep their noses on their own faces. But hey, quit being a wuss. Let us finish what we started. Believe it or not, you're the ones that are keeping us over there so long. Quit trying to divide us. David Jenkins Beverly Hills Noisy complainers The Chronicle printed air- boat noise has been a problem for more than 20 years. Please give us the actual facts. If an honest poll from people who Ido not own an airboat and live 'on or near the water were taken, you would hear that most people do not mind hear-, ing an airboat going out to the swamp. The few, and I mean a small portion of, homeowners who complain about airboats seem to complain about every- thing else from road noise to neighbors playing radios. The Chronicle defames all air- boats and county commission- ers without getting the real facts about who and where the complaints are coming from. The county is dealing with it and getting all the facts and correcting all the problems it can just as fast as they can. It takes knowledge to make deci- sions and sometimes a little longer to get the facts than some people or newspapers would like. There are small groups of chronic complainers and self- appointed political police that want to do all of our thinking for us, as they believe most of us cannot think or govern our- selves. If the Chronicle would print the truth about all the airboat and noise ordinance meetings, not just here in Citrus County, but all over the state, everyone would see that there are far fewer people complaining about the noise than there really is. It seems people want to lis- ten to the complainers as it sells more papers when there is some trouble to report. The fact is, as we will see, there is one thing no one person or group of people can do, and that is to take our freedoms away without a fight. There is one person who complained so much his neighbors have asked him to please stop and to please move. So it seems to me the actions of a few cannot outdo the actions of the many. The airboaters and the county commissioners are trying to their best to make everyone happy, so the complainers can move on to another cause. Don B. Powell Hernando Septic tank study We read Mike Wright's arti- cle, "Annexation has couple steamed." Mike did some research. Dee Atkins refused comment City Manager Phil Deaton went into political backpedaling. Deaton said, "I believe what people tell me, unless I see evidence to the -contrary." Deaton didn't believe us when we told him our septic system wasn't failing. Until right now, according to Deaton, no study has been done to test for failing septic systems on Nokomis Point. That doesn't sound like a city interested in cleaning the waters, only gathering more taxes. Now he says it can be done without annexation. We went to a city council meeting in September with our three-minute speech in hand, only to have Deaton tell Susan Kirk, and us, Nokomis was a done deal. We wanted to speak on our behalf. We left without our say. We now learn of more public hearings Dec.12 and Jan. 9. Atkins has written to the neighbors about Nokomis that "we need to get out from under these failing drain fields," and "we are desperate for sewers," claiming we are a major pollution problem. Other streets share these two canals. The water in Woodland Estates and elsewhere looks just like Indian Waters and they are on sewers. How about everyone being more responsible with pesti- cides and fertilizers? This situ- ation has been misrepresent- ed to our neighbors and the city of Crystal River. The five vacant lot owners and the five absentee owners, from Miami to Anchorage, are being led to ..belieyethe.sk is falling with- out anything but Atkins' word. It is time for someone to prove this is the truth or get their hand out of the pockets of, not only us, but also others who don't want annexation on this street We believe this is about one owner having a problem. The city should postpone annexa- tion hearings until the facts are proposed to all property owners. A septic tank study needs to prove the vacant lots, empty houses and the four full-timers are polluting. Then ask them if they want to pay $12,000-plus and city taxes for- ever Sandie Burns Crystal River Empty promises The Constitution of The State of Florida: "All natural persons, female and male alike, are equal before the law and have inalienable rights, among which are the right to enjoy and defend life and lib- erty, to pursue happiness, to be rewarded for industry, and to acquire, possess and protect property." Sen. Carey Baker filed Sen- ate Bill sb0506 Limitation on the exercise of the power - eminent domain by a "govern- mental entity" a state agency. No bill filed by a senator or representative covers all gov- ernmental powers to confis- cate private property. I submit this example that is occurring throughout Florida: Owners of property adjacent *to my property filled all their ponds and wetlands, elevated the land and sloped it to drain storm water into my property. No permit was needed. In addition, there is evidence that a subsurface drainage sys- tem also drains water into more than two acres of my property to flood it The Department of Environmental Protection is not only allowing this situation, but possibly has assisted the adjacent property owner. More than two acres of my land was confiscated and given to the adjacent property owner by DEP to use as a pri- vate storm water retention area. The adjacent property owner who was given my land gave me a citation through DEP action for placing some branches on the upland stolen property that is being turned into a swamp by the adjacent property owner. I am not - allowed to use the more than two of the five acres I bought. The adjacent property owner may use-that acreage, but I retain the title and I pay taxes on the land. I get no compen- sation. My neighbor gets a gift from DEP Most legislators support this. It is called regulatory taking - a system of government taking that circumvents eminent domain. Neither the governor nor the legislators will tell you that property rights bills are empty promises, because gov- ernment theft of land can be titled anything instead of emi- nent domain. They have the power to make it lawful. Read my story- ertyrights.com or call me at (352) 748-1988. Gertrude C. Dickinson Lake Panasoffkee Arctic oil The following letter was sent to Sens. (Bill) Nelson and (Mel) Martinez and to District 5 Rep. Ginny Brown-Waite: Brown-Waite seems to think that the Arctic National Wild- life Refuge is the Alaska State Refuge. Perhaps she is unfa- miliar with the U.S. Govern- ment purchase of Alaska in 1867. It is a U.S. refuge, and I want it protected from oil drillers. I also hate to think my land, as a citizen, is to be bar- gained at prices below their value to satisfy industry and the anti-environmentalists. These additions should never have been added to the budg- et. I'd like to know why so many legislators seem bound to pro- tect industry's desires ahead of citizens' needs and the wel- fare of this nation. The oil in Alaska will not be avdillible for years, and legislators need to insure that industry has vehicles and alternates fuels before Alaska oil is available. The refuge protects one of our last wild frontiers. Drilling legislation would forfeit the 1.5 million-acre biological heart of the refuge to oil com- panies; in return, consumers would see only a one penny per gallon reduction in the price of gasoline 20 years from now. The mining provision threat- ens to sell off millions of acres of public land, including some of our most treasured lands, at a bargain price. Despite claims that this bill would pro- hibit the sale of protected lands within like National Parks and Wilderness Areas, a loophole would allow private individuals or companies to purchase any public land with pre-existing mining claims. Tens of thousands of acres of land in our National Parks, National Monuments and Wilderness Areas could be put up for sale. In fact, about six million acres of existing min- ing claims within national forests, national parks, Wilderness Study Areas and other public lands could be privatized. Both of these provisions would have major negative consequences for America's wild public lands, and they should be rejected. I urge you to filibuster if necessary to en- sure that these provisions do not become law, including vot- ing against any bill that con- tains Arctic Refuge drilling or the harmful mining legisla- tion. George Harbin Homosassa Floral City thanks As presenters of Floral City Heritage Days 2005, the mem- bers of Floral City Heritage Council, wish to extend our appreciation to the many indi- viduals, organizations, church- es and businesses that made a success of this historical edu- cational event Dec. 2 and 3. We thank the press, radio stations and WYKE TV for promotion of the event and we are most grateful to our Heri- tage Day 2005 Sponsors: "Shin- ing Star" Sponsor: Citrus County Chronicle. "Platinum" Sponsor: the Floral City Lions Foundation Inc., Nature Coast Visitor's Guide, Progress En- ergy; to our "Gold" Sponsors: Capital City Bank, John D. Gelin M.D., The Hagar Group, Moonrise Resort, TOOFAR, and Mount Carmel Methodist Church; and to our "Silver Sponsors": Bank of Inverness, and ED.S. Disposal Inc. Special "thank yous" go to all committee chairmen of the event, to the seven historic home owners and five other historic property owners for the Blue Banner Tour of Historic Homes, to the 93 vol- unteers and to the businesses, organizations and individuals who put up Giant Christmas Cards, assisted us in other ways, to the property owners throughout the village who allowed us to schedule this event on their property or in adjacent areas and to the BOCC and the Roadside Main- tenance Division who permit- ted and assisted this event Also, appreciation is extend- ed to all those who prepared the village with Christmas dec- orations and grounds prepara- tion. To all those organizations who prepared the mouth- watering foods, to those who demonstrated early Florida Folklife daily living skills, to the many musicians on Satur- day and carolers and musi- cians on Friday night, to the Citrus Model "A" Club and to all the other organizations, exhibitors and activity partici- pants, we express our sincere gratitude for your participa- tion. You make the event We are grateful to those who provided "special assistance" for this event: Camp E-Nini- Hassee, Shamrock Inn, Floral City Volunteer Fire Depart- ment, Sheriff's Office Com- munity Patrol Unit 5, Nature Coast EMS at Floral City, Cit- rus County Historical Society Inc. treasurer, Old Courthouse Heritage Museum docents, Coastal Heritage Museum docents and council members, and Floral City Garden Club. For those individuals in the community in addition to Council members who loaned items to make the event hap- pen: Cecil Crews, Keith Barco, Bill Bishop and Robert Metz, we are thankful for your assis- tance. Again, on behalf of the Flor- al City Heritage Council, we Letters to the EDITOR say a sincere "thank you" to all our sponsors, to providers of special assistance, to property owners, to all who volunteered to prepare for and present this event, to all food, music, exhib- it and activity participates and a personal note of gratitude is extended to our 2005 commit- tee chairmen and members. A big "thank you" goes out to all the many visitors who at- tended Floral City Heritage Days 2005. See you next year ... Under. The Oaks!! Marcia L. Beasley council & event chairwoman False intelligence Mr McFadden's letter of Dec. 5 is marvelous. He quotes from the Senate Intelligence Committee of July 2004 that did not find "evi- dence that the Administration officials attempted to coerce, influence, or pressure analysis to change judgments ... and the Robb-Silverman report that "... no evidence of politi- cal pressure to influence the Intelligence Community's pre- war assessments ...." Mr. Bush and Mr. Cheney have both been repeating that they were cleared of undue pressure by both of the aforementioned committees. However, the real questions were not answered nor addressed by these com- missions. The real questions are the use of intelligence known to be false by other countries and many intelligence agencies; the stripping of vital dissents to intelligence reports pre-war; the manipulation of the public and the Congress by stripping all caveats from intelligence information; that the Congress authorized war only after diplomacy failed, while the president went to war without any diplomatic overtures to Iraq; and the misinformation to the public and Congress. Actually, many, but not all, Democrats are outraged at the deceit that got us into an ille- gal pre-emptive war that has put too many of our young troops in such grave peril. Congratulations, Mr. McFad- den, for your repetition of the message of the week from Fox News, and Messrs. Bush and Cheney. You really did prove my point that Republicans for the most part march in lock- step to the administration's tunes. Marilyn J. Day Beverly Hills Funding EOC One of the most ridiculous quotes I've heard from our county administrator, although he does come up with some left-field remarks, was in the recent article regarding the new EOC. He stated the center would not be paid for from tax dollars, but instead from the county~general fund. Wow, I wonder where the general fund dollars come from? I'm also tired of reading how we should re-evaluate the payscale of our county employ- ees. Anyone who has consid- ered a county position can tell you the county payscale is above average when compared to other Citrus County jobs, especially when considering the benefits. Consider the CITRUS - CARDIOLOGY CONSULTANTS P.A. "We encourage everyone over age 50 to establish a relationship with a cardiologist for the prevention or early detection of heart disease." C is t a RAMON L. TORRES, MD, FACC Consultative and Invasive Cardiology. WORKING HAND IN HAND WITH CITRUS MEMORIAL HEALTH SYSTEM TO BRING LIFE SAVING MEDICAL CARE TO THE CITIZENS OF CITRUS COUNTY. (352) 726-8353 Jewelry Belts Wallets Purses & Shoes 3i GultIo Hwy44FontinS number of applications received for posted county jobs, and that should tell you how good the positions are. Employees aren't leaving their positions at low- and mid-level, and it's normal for turnover at the top-level positions; it's nor- mal in the private sector, too. I also think it would be a big mistake for the county to take over our water from FGUA. So they made a mistake in not communicating, etc., but it appears as if they're trying to make up for that and get their ducks in a row. Our commis- sioners are complaining about FGUA potentially raising the water rates, etc. If the county takes over, our rates would go up ... and I bet a lot more than with FGUA. Our county empire keeps growing and along with that growth goes employee wages, benefits, etc. It scares me to think about it. I would wager money that it will cost the county more to run this entity than FGUA- And last, but not least, paid firefighters are a mistake. Look around the country, at counties much larger than Citrus, and you'll see depart- ments with efficient perform- ance from volunteers. I laughed recently when all the new figures were put out in an article showing how much response time has improved. Must be time to justify hiring more paid firefighters, huh? Beverly Brown Beverly Hills Caring circus During this season of love and peace, it was fitting to learn that the Cole Brother's Circus stopped using exotic animals in their shows. I remember when the Cole Brother's Circus came to Inverness several years ago. We went to see where the ele- phants were kept As we wan- dered away from the crowd, the gaiety and noise receded into the distance. It became very quiet As we kept going, we heard a strange swishing sound. It turned out to be the elephants swaying back and forth. In the wild, they travel hundreds of miles, but here they each had a chain around a front and rear leg. The sway- ing is abnormal behavior because of stress and suffering. Though they seemed to enjoy the bags of apples we brought them, I will never for- get the great sadness I saw in the eyes of these magnificent and intelligent beings. I feel a great relief and joy knowing that they, as well as the tigers, bears and other animals of the Cole Brother's Circus, will no longer have to spend their lives being hauled back and forth across the United States in filthy, cramped trailers. These animals will no longer have to endure whips, tight collars, muzzles, electric prods and bullhooks. At this time of peace on earth, let us feel compassion for those unfortunate animals that are still chained and caged in circuses. To quote Guila Manchester: "Don't turn your back upon their pain because it's hard to see. They have no other place to turn, they've only you and me." Isabell Spindler Beverly Hills BLINDS WE'LL MEET OR BEATANY COMPETITORS PRICE' FAST DELIVERY PROFESSIONAL STAFF In Home Consulting Valances SFREE Installation LECANTO -TREETOPS PLAZA 1657W. GULFTO LAKE HWY HOURS:MON.-FRI.9AM -5 PM r i EveningsandWeekends byAppoinmn I I --- -n C i * 308 W. HIGHLAND BLVD. INVERNESS, FL 34452 Your Brighton Headquarters II - I - CITRUS COUNTY (FL) CHRONICLE OPINION TUESDAYDECEMBER 20 2005 2.1A 12A TUESDAY DECEMBER 20, 2005 www chronicleonline.com ,- r-;:. .1 --1*-L ". ,. ,', Sh7ite In es lead * O e-- a-r et-i::^:. - . . .Mi, f marathon siton I- m V" .* .t a..... ~~";;............ ~ i ......... ... ... ......... . qm 6 ; . ... 4 a a" n .. r 9 a .i//iii . ..:. ia .. fi:. .,.. 1=. so dIb qm o a~im -il iI Copyrighted Material Syndicated Content Available from Commercial News Providers" IA ,N w.. ... .. ...... . .........- -- -r; -~--- .... ....... S .. .. .. ....... " ... S al r ; ; ,a a$*as- * II- enS- -- p, : , .. ,. q*rp erveoummmew amOs whmmo-b mm I:.,,a .. ,I!r II " ,40iii" i, - - .. . ... ... More accolades? Bush up for AP's top honor PACE 48 :- . . ( ~ .1 I ~ ., - :: I .' "*plSSSSS ssi.., _.M-.. DE( E,.,BER 20, '005 -I -I-I--- - aloft arrr ~-oft OEM~rr um lam d l llltm 1 s w o* Role Citrus 2-1 loss reversal avenges with 2-1 win at Lecanto C.J. RISK cjrisak@chronicleonline.com Chronicle It was, as advertised previ- ously, a game'of both signifi- cance and the talent to sup- port it Only the result was reversed. When last Lecanto met Citrus in girls soccer at Citrus, it was the Panthers who slipped away with a 2-1 victory. In last night's rematch at Lecanto, the Hurricanes struck first and last, which gave them a 2-1 triumph. "I'll tell you one thing," said Citrus coach Charlie Gatto, "It's going to be one exciting district tourna- ment." If the regular season in District 4A-6 is any indica- tion, that prediction is sure to be accurate. The Hurricanes are 10-2-1 overall and have completed their district sea- son with a 10-1-1 mark, Lecanto is also 10-2-1 overall and is 9-1 in 4A-6, with two matches remaining. "It was a typical Citrus- Lecanto game," noted Lecanto coach Kevin Towne afterward. "I thought both teams played well. And yes, it should be (a good district tournament)." All the scoring in this game came in the first half. although both sides missed other opportunities. The first goal of the match could arguably be called decisive. since Citrus scored it and -n-ever trailed thereafter "Our game plan \\as to score more goals," said Gatto. always prone to simplifica- tion. "I thought if we scored first, they would have to come and chase us they wouldn't be able to sit back and play defensively. And they did." And yet, it required a bit of fate or fortune or divine intervention, or maybe all three, to take the early lead. The Panthers had carried the play in the game's early moments, mounting a couple of dangerous attacks into the Citrus zone. But a quick counter by the Hurricanes reached Amber Jordan, who sent it to Kayla MATT BECK r,,r.:-,..:re ABO!tE: Lecanto's Erin Carpenter (5) gets a shove from Lecanto's Jennifer Nelson during the Canes' 2-1 win. BELOW: Lecanto's Maggie Mueller and Citrus' Stacey Wiemert fight for a header. Nelson. The deflected shot at the 33:05 mark ofthe opening half hit Leca nto keeper Samr King's hands but the ball rolled just over the goal line, giving Citrus a 1-0 lead. The score boosted Citrus, but it was not the Hurricanes who took advantage next. Moments after the mandato- ry water break midway' through the half, the Panthers broke in and did the one thing Citrus had been trying to prevent let Please see i /Page 3B Surprise wins boost Lecanto grapplers C.J. RISAK "The kids are starting to That proved important, boost- came on pins, the first by Tin cjrisak@chronicleonline.com understand it, they're starting to ing Lecanto's lead to 39-24. How Smith over Ryan Charron with Chronicle feel what's going to happen." important became evident two nine seconds left in the firs It's one of the wonders of youth you just don't know what to expect And that's what Lecanto's wrestling team delivered in its non-district dual meet against Lake Weir Monday. The Panthers got a couple of match wins that easily could have gone in the opposite direction, and that led to a 39-36 victory. "You've got young kids and that's going to happen," said Panthers' coach Dick Slack. "Whoever hits their move is going to come out on top. Lecanto clearly benefited from four forfeits by the Hurricanes (the Panthers had two). Still, the decisive factor in the meet came in matches at 125 and 189 pounds. In the former, Lecanto's Robert Ebaugh was clinging to a 2-0 lead until the third period, when Lake Weir's William Dorrell tied it with a reversal. Dorrell nearly pinned Ebaugh, but couldn't manage it and the third period ended tied at 2-all. In the one-minute overtime, it was Ebaugh that got the take- down to earn a 4-2 victory. matches later, both ending in pins favoring the Hurricanes. The 189 match was even more dramatic. Lake Weir's Charles Everett built a commanding 16-6 lead over Lecanto's Michael Yerman with the third period nearly half over. But Yerman reversed and then got Everett on his back, completing the pin with 1:04 left in the third. Of the nine matches in which both teams had wrestlers (Lecanto forfeited at 135 and 145; Lake Weir forfeited at 103, 119, 145 and 160), the Panthers won four. The other victories tn h t period at 14U, the second Dy Charles Beatty in just 25 sec- onds of the opening period against John Karpinski at 215. The Hurricanes got a late comeback for a win as well, matching Yerman's effort at 189. In the 112 match, Lecanto's Jacob Junkins went upl3-4 early in the third period with a take- down, but Lake Weir's Randy Preualt reversed and pinned Junkins with just 35 seconds left. Junkins is a freshman; Yerman, who won at 189, is a sophomore. Which means with youth, you never do know. iFl tt "Copyrighted Material Syndicated Content Available from Commercial News Providers" "This is my first year as a head coach but I've seen her play for years and I've enjoyed watching her," said Hurricanes coach Eli Jackson. Lyons tallied 18 points over- Please see LYONS/Page 3B I____ 1__-____ _______ ___ i ( Ir'(%%11lflt t.iL9 1b4 I'~ ~_l_*l__mIJ_~_r_ r%_ ~1__~__~~_ I~ _ 1 II Panther boys beat Citrus .lnRc- a^e. BURTON For the Chronicle INVERNESS As Monday night's District 4A-6 match between Lecanto and Citrus moved into its latter stages, it was the Panthers who were able to make plays in the clutch. Todd Maloney scored with just under 10 minutes left to give Lecanto a 2-1 win over the Hurricanes on a chilly night at the Citrus Bowl. ?.. -. "(Todd) plays his heart out," Panthers coach Doug Warren said. "He goes all out each time we play." The winning goal was keyed by the hustle of Derek Smith, who went into the left corner and passed towards the goal box to Jon Lowe, who found Maloney open on the right side for the go-ahead goal. From there, Smith and com- pany consistently won the ball and kept the Hurricanes (4-5-4, 3-4-3) off the scoreboard. The win gave Lecanto a 1-0-1 record this season against Citrus. Please see ",",'J/Page 3B Center of attention Livingston leads Pirates past CHS ANDY MARKS amarks@chronicleonline.com Chronicle When Citrus and Crystal River first met on Dec. 9, Pirates center J.C. Livingston went without a field goal and scored just 4 total points in his team's 45-36 win. So Livingston had a point to prove when he and his team- mates took on the Hurricanes again in Inverness on Monday "I needed to step it up a little bit," Livingston said. It was a giant step. Livingston burned the Canes for 26 points and 10 rebounds and Brennan McNally hit the game-winning jumper from the baseline with 50 seconds to play in the Pirates 66-63 victory. "I think (Livingston) came out today more offensive- minded," Citrus coach Tom Please see PIRATES/Page 3B Lyons' milestone CR star scores 2,000th point JON--MICHAEL SORACCHI jmsoracchi@chronicleonline.com Chronicle For Lacey Lyons, scoring 15 points in a game isn't anything special. But when Lyons reached the mark on a free throw that com- pleted a three-point play with 5:29 left in the third quarter, there was cause for celebra- tion. The Crystal River senior guard earned the 2,000th point of her career Monday night during her team's 45-30 victory over Citrus in the Pirates' Den. " ; :- -' i 2B TUESDAY, DECEMBER 20, 2005 *y;. "' , M agi c Utah Seattle Portland L.A. Clippers Phoenix Golden State L.A. Lakers Sacramento "Copyrighted Material .... ........... ,..., Syndicated Content Available from Commercial News Providers" g * I"-II mw-:m - EASTERN CONFERENCE Atlantic Division L Pct GB L10 12 .520 5-5 12 .478 1 5-5 14 .417 2% 4-6 17 .261 6 2-8 20 .200 8 4-6 Southeast Division L Pet GB L10 11 .560 5-5 13 .409 3% 3-7 13 .409 3% 3-7 18 .280 7 2-8 17 .261 7 4-6 Central Division L Pct GB L10 3 .864 9-1 8 .636 5 6-4 9 .591 6 4-6 9 .591 6 7-3 11 .522 7% 5-5 WESTERN CONFERENCE Southwest Division L Pct GB L10 5 .792 8-2 6 .750 1 8-2 9 .609 4% 6-4 13 .458 8 4-6 13 .435 8% 7-3 Northwest Division L Pet GB L10 10 .545 5-5 13 .480 12 4-6 13 .458 2 5-5 12 .455 2 5-5 16 .304 5% 2-8 Pacific Division L Pct GB L10 8 .652 .- 6-4 9 .609 1 6-4 11 .560 2 5-5 11 .542 2% 7-3 15 .400 6 3-7 : .. Home 9-5 6-6 8-6 3-6 1-12 Home 8-3 5-7 6-4 5-7 4-6 Home 7-1 8-3 9-3 6-5 5-5 Home 11-1 10-3 7-5 6-5 3-6 Home 7-4 8-3 5-8 6-7 5-7 Home 10-2 9-5 8-6 5-6 7-7' Away Conf 4-7 7-10 5-6 5-8 2-8 6-9 3-11 2-10 4-8 5-10 Away Conf 6-8 9-6 4-6 5-8 3-9 6-8 2-11 6-9 2-11 4-3 Away Conf 12-2 10-1 6-5 8-5 4-6 7-4 7-4 11-2 7-6 7-5 Away Conf 8-4 10-2 8-3 9-4 7-4 9-4 5-8 8-8 7-7 7-7 Away Conf 5-6 8-9 4-10 6-7 6-5 5-8 4-5 4-8 2-9 2-9 Away Conf 5-6 7-4 5-4 9-8 6-5 5-6 8-5 6-8 3-8 6-9. Wednesday's Games New Jersey at Orlando, 7 p.m. L.A. Clippers at Indiana, 7 p.m. Golden State at Philadelphia, 7 p.m. Utah at Boston, 7:30 p.m. San Antonio at New York, 7:30 p.m. Portland at Memphis, 8 p.m. New Orleans at Minnesota, 8 p.m. Toronto at Houston, 8:30 p.m. Washington at Denver, 9 p.m. Bobcats 106, Kings 103 SACRAMENTO (103) Stojakovic 5-16 2-2 13, Abdur-Rahim 12- 20 8-9 32, Miller 3-6 2-2 8, Bibby 8-24 4-4 23, Wells 1-2 0-0 2, Garcia 0-1 0-0 0, Martin 5-9 9-10 19, Thomas 1-2 0-0 2, Hart 0-1 0-0 0, Skinner 0-0 0-0 0, Williamson 2- 2 0-0 4; Totals 37-83 25-27 103. CHARLOTTE (106) Wallace 7-12 1-3 15, Okafor 6-12 0-0 12, Brezec 9-13 8-9 26, Felton 6-14 2-4 14, Rush 0-3 0-0 0, Carroll 3-5 1-3 7, May 0-4 1-2 1, Burleson 2-5 3-4 9, Robinson 1-5 1- 4 3, J.Jones 1-5 4-4 6, Bogans 4-10 3-3 13. Totals 39-88 24-36 106. Sacramento 30 22 21 26 4 103 Charlotte 25 27 27 20 7 106 3-Point Goals-Sacramento 4-18 (Bibby 3-10, Stojakovic 1-5, Garcia 0-1, Martin 0- 2), Charlotte 4-18 (Burleson 2-4, Bogans 2-5, Rush 0-1, Felton 0-1, Wallace 0-2, Carroll 0-2, J.Jones 0-3). Fouled Out- None. Rebounds-Sacramento 53 (Miller 12), Charlotte 56 (Okafor 12). Assists- Sacramento 25 (Bibby 8), Charlotte 22 (Felton 9). Total Fouls-Sacramento 30, Charlotte 27. Technicals-Charlotte Defensive Three Second. Pistons 106, Grizzlies 104 DETROIT (106) Prince 10-18 1-2 24, R.Wallace 3-11 2-6 9, B.Wallace 3-8 3-4 9, Hamilton 6-18 7-8 19,'Billups 8-18 10-10 30, Evans 0-0 0-0 0, McDyess 4-7 1-2 9, Delfino 1-4 2-2 4, Arroyo 1-3 0-0 2, Davis 0-0 0-0 0. Totals 36-87 26-34 106. MEMPHIS (104) Battier 4-10 0-0 10, Gasol 13-25 6-6 32, Wright 7-12 0-0 14, E.Jones 5-9 0-0 11, Stoudamire 10-172-3 24, Miller 4-7 1-1 10, Burks 0-2 0-0 0, Cardinal 1-3 1-2 3, D.Jones 0-0 0-0 0. Totals 44-85 10-12 104. Detroit 28 20 21 18 6 13 106 Memphis 18 21 22 26 6 11 104 3-Point Goals-Detroit 8-17 (Billups 4-7, Prince 3-5, R.Wallace 1-3, Hamilton 0-1, Delfino 0-1), Memphis 6-12 (Battier 2-3, Stoudamire 2-5, E.Jones 1-2, Miller 1-2). Fouled Out-E.Jones, Miller. Rebounds- Detroit 54 (B.Wallace 14), Memphis 48 (Gasol 13). Assists-Detroit 19 (Billups 9), Memphis 21 (Stoudamire 7). Total Fouls- Detroit 19, Memphis 29. Technicals- B.Wallace, Memphis Defensive' Three Second. A-16,897 (18,119). S hn, ('vutLit flvtr In '\ t'rIzm< l ., iii -i n . ~ ;; ~ ~ NMI: I I Ir (' ir ;iru !:-. ww= il ___~____1 Sunday's Games Philadelphia 107, Toronto 80 Atlanta 110, Denver 107, OT New Jersey 118, Golden State 90 New Orleans 89, San Antonio 76 Dallas 102, Minnesota 95 Portland 97, Washington 92 Houston 76, L.A. Lakers 74 Monday's Games Toronto 92, Orlando 90 Charlotte 106, Sacramento 103, OT Boston 109, Golden State 98 Detroit 106, Memphis 104, 20T Washington at Seattle, 10 p.m. Tuesday's Games Utah at Cleveland, 7 p.m. Atlanta at Miami, 7:30 p.m. Raptors 92, Magic 90 TORONTO (92) Graham 5-8 0-3 11, Bosh 6-17 7-8 19, Araujo 0-1 0-0 0, Peterson 7-14 2-4 19, James 5-10 1-1 13, Aa.Williams 4-6 0-0 8, Martin 1-4 0-0 2, Rose 5-12 3-8 15, Bonner 1-8 2-2 5. Totals 34-80 15-26 92. ORLANDO (90) G.Hill 4-7 3-6 11, Howard 5-10 1-2 11, Battle 5-10 3-3 13, Stevenson 3-10 4-4 10, Francis 6-14 8-10 20, Turkoglu 3-6 0-0 6, Garrity 1-2 0-0 3, Nelson 7-11 0-0 14, Kasun 1-1 0-1 2, Augmon 0-0 0-0 0. Totals 35-71 19-26 90. Toronto 19 25 28 20 92 Orlando 27 19 24 20 90 3-Point Goals-Toronto 9-16 (Peterson 3- 4, Rose 2-3, James 2-4, Graham 1-2, Bonner 1-3), Orlando 1-7 (Garrity 1-2, GHill 0-1, Stevenson 0-1, Nelson 0-1, Turkoglu 0- 2). Fouled Out-None. Rebounds-Toronto 48 (Bosh 12), Orlando 52 (Battie 9). Assists-Toronto 21 (Martin 7), Orlando 15 (Francis 5). Total Fouls-Toronto 26, Orlando 20. Technicals-Toronto Defensive Three Second, Orlando Defensive Three Second, Francis. A-12,511 (17,248). Celtics 109, Warriors 98 GOLDEN STATE (98) Murphy 9-20 8-10 27, Dunleavy 2-5 0-0 4, Foyle 1-2 0-0 2, B.Davis 8-19 8-13 24, Richardson 10-25 0-0 23, Biedrins 2-3 0-0 4, Cabarkapa 0-1 0-0 0, Fisher 4-10 3-3 12, Diogu 0-2 0-0 0, Cheaney 0-2 0-0 0, Miles 1- 1 0-0 2. Totals 37-90 19-26 98. BOSTON (109) Blount 5-10 7-9 17, Pierce 6-16 6-8 19, Perkins 2-2 0-0 4, Banks 6-11 2-3 16, R.Davis 7-16 6-8 21, LaFrentz 4-7 2-2 10, Greene 2-7 0-0 4, Jefferson 6-10 1-2 13, Gomes 2-4 1-1 5. Totals 40-83 25-33 109. Golden State 27 24 29 18 98 Boston 26 36 23 24 109 3-Point Goals-Golden State 5-21 (Richardson 3-6, Fisher 1-3, Murphy 1-5, Dunleavy 0-1, Cheaney 0-1, B.Davis 0-5), Boston 4-11 (Banks 2-3, R.Davis 1-3, Pierce 1-4, LaFrentz 0-1). Fouled Out-Dunleavy. Rebounds-Golden State 48 (Murphy 12), Boston 63 (Pierce 9). Assists-Golden State 15 (B.Davis 9), Boston 23 (R.Davis 7). Total Fouls-Golden State 30, Boston 24. Technicals-Boston Defensive Three Second 2. Flagrant fouls-B.Davis. I ---- SPORTS CrrRus COUNTY (FL) CHRONICLE .. r. I Cimus CouNn' (FL) CHRONICLE SPORTS TUESDAY, DECEMBER 20. 2005 3B HOCKEY National Hockey League EASTERN CONFERENCE Atlantic Division W LOT PtsGF GA N.Y Rangers 20 10 4 44106 84 Philadelphia 19 8 5 43119 101 N.Y Islanders 16 14 2 34107 115 New Jersey 14 13 5 33 94 105 Pittsburgh 8 18 7 23 88 132 Northeast Division W LOT PtsGF GA Ottawa 23 5 2 48132 63 .Buffalo 23 10 1 47112 105 Montreal 16 9 6 38 91 98 Toronto 17 13 3 37113 SNorthwest Division W LOT PtsGF GA Vancouver. 20 9 3 43107 94 .Calgary 19 9 4 42 78 73 Edmonton 18 11 4 40105 98 :Colorado 17 13 3 37123 110 Minnesota 14 15 4 32 89 81 Pacific Division W LOT PtsGF GA Dallas 21 9 1 43105 85 Los Angeles 20 13 1 41115 .97 Anaheim .15 13 6 36 95 94 Phoenix 16 15 2 34 91 88 San Jose 14 13 4 32 96 102 STwo points for a win, one point for over- time loss or shootout loss. Sunday's Games Colorado 2, N.Y. Rangers 1 Florida 3, Washington 2 Dallas 5, Chicago 3 Anaheim 5, San Jose 4 Monday's Games' Buffalo 2, Philadelphia 1, SO Toronto 9, N.Y. Islanders 6 Minnesdta 2, Dallas 1 Calgary at Edmonton, 9 p.m. Los Angeles at Vancouver, 10 p.m. Tuesday's Games Tampa Bay at Carolina, 7 p.m. New Jersey at N.Y. Rangers, 7 p.T. Ottawa at Montreal, 7:30 p.m. Columbus at Detroit, 7:30 p.m. Colorado at Nashville, 8 p.m. St. Louis at Phoenix, 9 p.m.' Anaheim at San Jose, 10:30 p.m. Wednesday's Games Dallas at Columbus, 7 p.m. New Jersey at N.Y. Islanders, 7 p.m. Nashville at Chicago, 8:30 p.m. Los Angeles at Calgary, 9 p.m. Edmonton at Vancouver, 10 p.m. St. Louis at Anaheim, 10:30 p.m. NHL Scoring Leaders Through Dec. 18 GP G A PTS Jagr, NYR 34 23 28 51 - Thornton, SJ 30 12 36 48 '-"Alfredsson, Ott 30 22 25 47 Heatley, Ott 30 21 25 46 SSpezza, Ott 29 12 34 46 SKovalchuk, Atl 31 21 24 45 Savard, Atl 34 14 31 45 'Staal, Car 32 22 22 44 Forsberg, Phi 25 10 34 44 -Demitra, LA 34 17 24 41 Datsyuk,'Det 34 14 26 40 0 i Mlibe6,Tor .. 32 11 '29 40 "Marle'au: SJ" "''' 31 13 26 39 Gagne, Phi 27 23 14 37 Prospal TB 33 14 23 37 Shanahan, Det 34 19 17 36 Naslund, Van. 32 17 19 36 Hossa, Atl 34 15 21 36 STanguay, Col 33 12 24 36 'Richards, TB, 33 11 25 36 BASKETBALL How the AP Top 25 Fared Monday 1. Duke (10-0) did not play. Next: vs. St. John's, Wednesday. 2. Connecticut (8-0) did not play. Next: vs. Morehead State, Friday. 3. Villanova (7-0) did not play. Next: vs. iLa Salle, Thursday. 4. Memphis (8-1) did not play. Next: vs. Louisiana Tech, Tuesday. 5. Florida (10-0) did not play. Next: at Miami, Thursday. 6. Illinois (11-0) did not play. Next: vs. Missouri, Wednesday. 7. Oklahoma (6-1) did not play. Next: vs. West Virginia, Thursday. 8.. Gonzaga (8-2) beat Eastern Washington 75-65. Next: at Saint Louis, Thursday. 9. Washington (9-0) did not play: Next: vs. Lehigh, Friday. 10. Michigan State (9-2) did not play. Next: at Wisconsin-Green Bay, Wednesday. 11. Louisville (6-1) did not play:Next: vs. Middle Tennessee, Tuesday. 12. UCLA (8-1) did not pjay. Next: vs. 'Wagner, Wednesday.) did ndt play. Next: at Southern California, Wednesday. 18. Indiana (6-2) beat Charlotte 71-54. Next: vs. Butler, Friday. 19. Kentucky (7-3) did not play. Next: vs. lona, Friday. 20. Nevada (7-1) did not play. Next: vs. Georgia, Wednesday. LYONS Continued from Page 1B all to go along with 11 rebounds and 6 assists. "I just knew that I was close," said Lyons of the milestone. "My goal last year before I got injured was to get 2,500." The game was stopped for a moment to honor the accom- plishment and then play resumed. Ashley Clark scored 9 and Meghan Hirsch added 8 for the Pirates while Krystal Boardman led the Hurricanes with 7 points. SCrystal River's win was buoyed by a 20-3 advantage that the Pirates built in the first quar- ter against the Hurricanes. During that period, Crystal River ._ did practically whatever it want- ed on both ends of the floor. On the AIRWAVES TODAY'S SPORTS BASKETBALL 7 p.m. (FSNFL) Stetson at Florida State. (Live) FOOTBALL 8 p.m. (ESPN) New Orleans Bowl -Arkansas State vs. Southern Mississippi. From Lafayette, La. (Live) (CC) HOCKEY 7 p.m. (SUN) Tampa Bay Lightning at Carolina Hurricanes. From the RBC Center in Raleigh, N.C. (Live) 8 p.m. (OUTDOOR) Colorado Avalanche at Nashville Predators. From the Gaylord Entertainment Center in Nashville, Tenn. (Live) SOCCER 12 p.m. (FSNFL)Aston Villa vs. Manchester United. (Taped) Prep CALENDAR TODAY'S PREP SPORTS BOYS BASKETBALL 7 p.m. West Port at Dunnellon NBAI Through Sc Iverson, Phil. Bryant, LAL James, Clev. Arenas, Wash. Wade, Mia. Pierce, Bos. Nowitzki, Dall. Brand, LAC Redd, Mil. Allen, Sea. Anthony, Den. Bosh, Tor. Richardson, G.S. 2 O'Neal, Ind. Carter, N.J. Garnett, Minn. Lewis, Sea. Hamilton, Det. Duncan, S.A. 2 Davis, Bos. FG Pe Mourning, Mia. Abdur-Rahim, Sac. Haywood, Wash. Parker, S.A. Brand, LAC Iguodala, Phil. Brezec, Char. Garnett, Minn. Battier, Mem. Gooden, Clev. Reb Camby, Den. Howard, Orl. Duncan, S.A. Marion, Phoe. B. Wallace, Det. Jamison, Wash. 2 Garnett, Minn. O'Neal, Ind. Brand, LAC Magloire, Mil. As Nash, Phoe. Davis, G.S. Billups, Det. Knight, Char. Miller, Den. Kidd, N.J. Iverson, Phil. Cassell, LAC Paul, N.Ok Ford, Mil. Leaders gh Dec.18 coring G FG FTPTSAVG 25 290 227 834 33.4 24 275 1'76 751 31.3 22 235 176 681 31.0 21 185 154 584 27.8 25 235 208 680 27.2 23 197 176 600 26.1 24 220. 148 626 26.1 23 217 142 576 25.0 21 173 128 523 24.9 22 187 96 540 24.5 '4 188 176 560 23.3 24 '183 172 538 22.4 24 204 85 537 22.4 22 182 126 492 22.4 22 179 96 489 22.2 '2 191 96 481 21.9 22 167 95 48021.8 21 179 8445621.7 4' 192 103 488 20.3 23 185 74 465 20.2 percentage FG FGA PCT 103 185 .557 147 265 .555 81 147 .551 202 371 .544 217 404 .537 95 177 .537 92 172 .535 ,191 359 .532 101 191 .529 92 176 .523 bounds G OFF DEF TOT AVG 21 61 218 279 13.3 21 73 202 275 13.1 24 72 220 292 12.2 3 73 204 277 12.0 21 72 172 244 11.6 22 54 188 242 11.0 22 39 195 234 10.6 22 59 173 232 10.5 23 78 164 242 10.5 22 78 149 227 10.3 rsists G AST AVG 23 238 10.3 23 224 9.7 21 184 8.8 23 197 8.6 .25 205 8.2 23 178 7.7 25 184 7.4 23 167 7.3 24 171 7.1 22 156 7.1 21. N.C. State (8-1) did not play. Next: at Alabama, Thursday. 22. Wake Forest (8-2) did not play. Next: at Richmond, Thursday. 23. Tennessee (6-0) did not play. Next: at Oklahoma State, Thursday. S24. Ohio State (7-0) did not play. Next: vs. Tennessee State, Friday. 25. Iowa (8-3) did not play. Next: vs. Drake, Tuesday. Top 25 Boxes No. 8 Gonzaga 75, E. Washington 65 E. WASHINGTON (4-5) Beitinger 4-8 4-7 13, Williams 4-6 2-3 12, Butorac 3-5 0-1 7, Stuckey 7-15 5-6 20, Smith II 1-8 2-2 5, Penoncello 3-6 0-0 8, Bekkering 0-3 0-0 0, Humphrey 0-0 0-0 0, Zumwalt 0-1 0-0 0, Risper 0-2 0-0 0. Totals 22-54 13-19 65. GONZAGA (8-2) Morrison 11-23 5-10 29, Batista 7-15 8-10 22, Mallon 3-7 1-2 7, Altidor-Cespedes 1-1 1- 1 3, Raivio 1-7 2-2 5, Pargo 0-2 0-0 0, Gurganious 1-1 0-0 2, Knight 0-0 0-0 0, Pendergraft 1-2 5-67. Totals 25-58 22-31 75. Halftime-Gonzaga 36-32. 3-Point Goals-E. Washington 8-21 (Williams 2-2, 'Penoncello 2-5, Butorac 1-1, Beitinger 1-2, Smith II 1-4, Stuckey 1-6, Zumwalt 0-1), Gonzaga 3-11 (Morrison 2-5, Raivio 1-6). Fouled Out-Beitinger. Rebounds-E. Washington 40 (Butorac 8), Gonzaga 40 (Pendergraft 9). Assists-E. Washington 16 (Smith II 4), Gonzaga 14 (Morrison 4). Total Fouls-E. Washington 24, Gonzaga 16. A-11,879. No. 18 Indiana 71, Charlotte 54 INDIANA (6-2) Killingsworth 7-12 2-5 17, Vaden 5-10 0- 0 14, Ratliff 1-2 0-0 3, Strickland 4-8 0-0 12, Monroe 2-3 0-0 4, White 4-11 0-2 8, Wilmont 3-3 0-0 9, Suhr 0-0 0-0 0, Allen 0- 1 0-0 0, Kline 0-0 0-0 0, Calloway 2-3 0-0 4. Totals 28-53 2-7 71. CHARLOTTE (5-5) Withers 4-12 0-2 8, Alexander 3-12 2-2 11, Nance 3-8 2-2 8, Goldwire 1-7 4-4 7, Baldwin 2-10 0-0 6, Coleman 3-7 2-3 8, Williams 0-0 3-5 3, Lewis 0-0 0-0 0, Bennett 1-8 0-0 3, Jamison 0-0 0-0 0. Totals 17-64 13-18 54. Halftime-Indiana 40-30. 3-Point Goals-Indiana 13-23. (Strickland 4-6, Vaden 4-8, Wilmont 3-3, Killingsworth 1-2, Ratliff 1-2, Monroe 0-1, Alien 0-1), Charlotte 7-19 (Alexander 3-6, Baldwin 2- 4, Bennett 1-3, Goldwire 1-5, Withers 0-1). Fouled Out-None. Rebounds-Indiana 41 (Strickland 9), Charlotte 38 (Withers 10). Assists-Indiana 15 (Monroe 4), Charlotte 9 (Goldwire 4). Total Fouls- Indiana 14, Charlotte 12. A-8,442. USA Today/ESPN Top 25 Poll The top 25 teams in the USA Today- ESPN men's college basketball poll, with first-place votes in parentheses, records through Dec. 18, points based on 25 points fol a first-place vote through one point for a 25th-place vote and previous ranking: I Record Pts Pvs 1. Duke (29) 10-0 773 1 2. Connecticut (1) 8-0 738 2 3. Villanova (1) 7-0 '718 3 4. Memphis 8-1 655 5 5. Florida 10-0 632 6 6. Illinois 11-0 624 8 7. Washington 9-0 571 10 8. Oklahoma 6-1 549 9 9. Gonzaga 7-2 489 11 10. Louisville 6-1 447 4 11. Michigan State 9-2 429 12 12. UCLA 8-1 421 14 13. George Washington 8-0 366 15 14. Boston College 7-2 319 13 15. Texas 8-2 291 7 16. Maryland 7-2 267 17 17. Indiana 5-2 248 18 18. N.C. State 8-1 238 19 19. North Carolina 6-1 198 20 20. Kentucky 7-3 184 22 21. Nevada 7-1 144 21 22. Ohio State 7-0 136 25 23. Wisconsin 9-1 105 24 24. Wake Forest 8-2 93 16 25. Pittsburgh 8-0 65 - Others receiving votes: Tennessee 61, Syracuse 52, Arizona 51, Iowa 41, LSU 27, Xavier 24, Bucknell 23, Michigan 18, Kansas State 15, Air Force 8, Clemson 6, Notre Dame 6, West Virginia 6, lona 5, Northern Iowa 5, Colorado 4, Indiana State 4, Texas A&M 4, Buffalo 3, Missouri State 3, Cincinnati 2, Colorado State 2, Houston 2, Vanderbilt 2, Oklahoma State 1. While Citrus turned over the ball on four of its first five pos- sessions, the Pirates started the game with a Setera Lockley steal and layup. Lyons had a hand in the next four points, hitting a turnaround jumper in off the glass and then assisting Meghan Hirsch's layup to give Crystal River a 6-0 lead. A pair of Ashley Clark layups later, the Pirates had built a 10-0 lead with 2:28 left in the opening period. "In the first quarter, everyone did a good job distributing the ball," Lyons said. The Hurricanes got on the board with a drive from the wing by sophomore guard Ashly Duval to cut the deficit to 10-2. Crystal River kept up its great play at both ends and closed out the quarter on a 10-1 run capped by a Lyons putback on an offen- sive rebound with 10 seconds left shot, Crystal River had scored the first six points of the second quarter to expand the lead to 26- 3. Citrus, however, showed its first signs of life when the Hurricanes reeled off six of their own points in a row. Rachel Fults grabbed one of her game-high 13 rebounds and scored on a putback to start the run and Ashley Hoglund hit her only shot of the game (a 3-point- er) to cap the run and pull Citrus to a 26-10 disadvantage. Citrus plays 7 p.m. Wednesday at home against Wildwood while the Pirates next tip-off at the Nature Coast Holiday Tournament on December 27. and Jeremy Spencer trainer for Casper of the Pioneer League, Ron Gideon field coordinator, Rich Dauer infield coordina- tor, Mary Foley catching coordinator and Jerry Bass equipment manager. FLORIDA MARLINS-Claimed C John Baker off waivers from Oakland. LOS ANGELES DODGERS-Agreed to terms with SS Nomar Garciaparra on a one-year contract. NEW YORK METS-Agreed to terms with LHP Darren Oliver, LHP Pedro Feliciano and RHP Jose Parra on minor league contracts. Released LHP Kaz Ishii. PHILADELPHIA PHILLIES-Acquired RHP Ricardo Rodriguez from Texas to complete an earlier trade. American Association EL PASO DIABLOS-Agreed to terms with INF Jack Joffrion. FORT WORTH CATS-Agreed to terms with OF Jordan Foster and INF Terence Green. ST. JOSEPH-Named Chris Carminucci field manager. Northern League FARGO-MOORHEAD REDHAWKS- Sold the contract of RHP Brandon Culp to the Oakland Athletics. GARY SOUTHSHORE RAILCATS- Sold the contract of INF Ben Risinger to the San Diego Padres. WINNIPEG GOLDEYES-Agreed to terms with C Aaron Mendoza. Sold the contract of C Matt Stocco to the San Diego Padres. BASKETBALL American Basketball Association BELLINGHAM SLAM-Signed C Eric Sandrin. Continental Basketball Association CBA-Suspended Albany G 'Donnie Boyce and Rockford C Kenyon Gamble for one game and fined them undisclosed amounts for their actions in a Dec. 15 game. IDAHO STAMPEDE-Added F Josh Davis to the roster. SIOUX FALLS SKYFORCE-Waived G Josh Mueller. Signed F Kevin Melson. FOOTBALL National Football League NEW YORK GIANTS-Signed LB Roman Phifer and TE Matt Kranchick. SAN FRANCISCO 49ERS-Waived CB Willie Middlebrooks. Arena Football League AUSTIN WRANGLERS-Signed OS Chris Taylor. Waived OS Nate Turner. COLORADO CRUSH-Signed QB Tom Petrie. Waived OL-DL Tom Burke and WR- DB Jqn Pendergrass. LAS VEGAS GIlADIATORS-Signed OL-DL Tupe Peko. LOS ANGELES AVENGERS-Signed WR-DB Ataveus Cash and WR-DB Ricky Sharpe. Re-signed OL-DL Furnell Hankton.. SAN JOSE SABERCATS-Signed OL- DL Alan Harper. HOCKEY National Hockey League ATLANTA THRASHERS-Assigned G Adam Berkhoel to Gwinnett of the ECHL. CAROLINA HURRICANES-Recalled G Cam Ward from Lowell of the AHL. Assigned G Kevin Nastiuk to Lowell. CHICAGO BLACKHAWKS-Assigned D Anton Babchuk to Norfolk of the AHL. COLUMBUS BLUE JACKETS- Assigned F Steven Goertzen to Syracuse of the AHL. DETROIT RED WINGS-Recalled G Joey MacDonald from Grand Rapids of the AHL. Assigned LW Valtteri Filppula and G Jimmy Howard to Grand Rapids. EDMONTON OILERS-Placed RW Radek Dvorak on injured reserve. Recalled D Matt Greene from Iowa of the AHL. LOS ANGELES KINGS-Placed F Jeff Cowan on injured reserve, retroactive to Dec. 11. MONTREAL CANADIENrS-Recalled G Yann Danis and F Andrei Kostitsyn from Hamilton of the AHL. NEW JERSEY DEVILS-Announced the resignation of Larry Robinson, coach. Announced president and general manag- er Lou Lamoriello will take over for Robinson on a temporary basis. PHOENIX COYOTES-Claimed C Krystofer Kolanos off waivers from Edmonton and assigned him to San Antonio of the AHL. ST. LOUIS BLUES-Recalled G Reinhard Divis from Peoria of the AHL. Assigned G Chris Beckford-Tseu to Peoria. TORONTO MAPLE LEAFS-Recalled F John Pbhl from Toronto of the AHL. Signed G Justin Pogge to a three-year entry-level contract. Central Hockey League TULSA OILERS-Signed LW Mike Possin. Waived D Bryan Jaeger and F Justin Siebold. SOCCER Major League Soccer METROSTARS-Signed M Youri Djorkaeff to a one-year contract. COLLEGE BIG SOUTH CONFERENCE- Announced the resignation of John Guthrie, coordinator of men's basketball officials. ELON-Named Pete Lembo football coach. FLORIDA-Announced junior RB Skyler Thornton has decided to transfer. LOUISIANA COLLEGE-Named Dennis Dunn football coach. MARYLAND-Signed Gary Williams, men's basketball coach, to a contract extension through 2013. RUTGERS-CAMDEN-Named Tim Oswald men's soccer coach. SOUTHERN ILLINOIS-Announced the resignation of Shane Hawkins, assistant basketball coach. TENNESSEE-Announced PG Sa'de Wiley-Gatewood will leave the school. TEXAS-Announced sophomore men's basketball F Dion Dowell will transfer. TROY-Named Tony Franklin offensive coordinator and Matt Moore offensive line coach. UC IR\'INt_--Named April Heinrichs women's soccer coach. their game in the first, they did play the Pirates evenly in the game's final three quarters. After Lockley went coast-to- coast for a layup keyed by team- mate Brandy Worlton's blocked BOYS Continued from Page 1B "I think the kids felt like we should have won the first time we played them," Warren said. "Not to take anything away from Citrus, though ... this was a nice win." Lecanto (5-6-2, 5-3-2) jumped out to a quick 1-0 lead just five minutes into the match on a goal by Noah Heinze. Smith's corer kick to Lowe, who missed on a header, found CANES Continued from Page 1B Maggie Mueller create some- thing. "She's their whole team," said Gatto of Mueller. "Without her, they have nothing. One day you'll turn on your TV and watch her play. That girl's got talent" With less than 20 minutes remaining, Mueller moved inside and Natalie Burnett moved to the right wing. On a run into the middle, Mueller drew the defense with her, then sent the ball back out to Burnett. Burnett put it inside to Vanessa Ramirez, stationed alone in front of Citrus keeper Kelsey Keating, and Ramirez finished to knot it at 1-1. "We were trying to move (Mueller) around and mix it up a bit," said Towne. The plan worked once but not 4w - * - lo "Copyrighted Material Syndicated Content -, \ Available from Commercial News Providers" t - PIRATES Continued from Page 1B Densmore said. "He looked like he was going to get his points no matter what." Livingston's Citrus counter- part, 6-foot-7 center Walt Howard, spent much of the game in foul trouble, which caused him to miss most of the second and third quarters and much of the fourth. "Doesn't really matter," Livingston said. "Even when he was out there I was doing the same. I've been playing against Walt since I was in middle school, so it's just me and him going at it." Howard finished with 13 points and 9 rebounds for Citrus. But it was guard Nick Delguidice that kept the Canes in the game with Howard sit- ting. Delguidice hit five 3s - three in the second quarter alone and led the Canes in scoring with 19. But Delguidice missed the one 3 he would have traded for all the others. With 11 seconds remaining and the Canes trail- ing by three, Delguidice drove the length of the court amidst heavy pressure but couldn't find an open look at the basket. His desperation attempt with a sec- ond left fell well short, and the Pirates celebrated at midcourt "It's a great win for us," Pirates coach Tony Stukes said. "It's district, it's county, it's com- ing up on break and the kids are excited. It's going to be a good momentum-builder for us." Crystal River took the lead for good on an in-bounds play with 50 seconds left With the Hurricane defense sagged on Livingston in the middle, McNally flashed open on the baseline, received a pass from Steven D'Amico and swished a 19-footer without hesitating. It was the last of a bunch of baskets Crystal River scored off of set in-bounds plays with D'Amico at the helm. "If you plan, better things happen," noted Stukes. "When (in-bounds plays) are working you stick to them. We ran the same one all night long and it kept working, so we never changed it." Jay Winborne was also effec- tive all night long for the Pirates - and then some. The Crystal River junior point guard played a near-flawless floor game in scoring 17 points, dishing out 7 assists and hitting two clutch free throws with 11.2 seconds on the clock to force Citrus into 3- point mode. "Jay is definitely coming on strong," Stukes said. "That's his best game at Crystal River by far, but that's what he's capable of doing. He can do that for us every night. I've held him back a little bit in the past and we're asking him for a little bit more now." It was a little bit more than Densmore wanted to see from Winborne, who created havoc for the Citrus defense by repeat- edly penetrating into the lane. and forcing shifts. "He gets that step on you and away he goes," Densmore said. "He can either score or dish. He had a nice game." Roger Jones also had a hot hand and finished with 13 points for the Pirates (54, 4-2), who host Central on Thursday. Citrus (5-3, 4-2) will have to keep its intensity up for another cross-county rival game the Canes visit Lecanto on Thursday. *CITRUS COUNTY (FL) CHRONICLE SPORTS TUESDAY, DECEMBER 20, 2005 3B its way to Heinze for the goal. The Panthers outshot the Hurricanes 11-3 in the first half, but saw the hosts stay in the match thanks to their defense. Citrus finally broke through 10 minutes into the second half when a header by Chad Richie found its way past Tyler Jordan. Lecanto, though, continued to battle and Maloney's goal helped turn the match back around. Overall, the Panthers had a 17- 6 edge in shots. Ctirus goalie .Jamal Johnson had 12 saves while Lecanto's Jordan finished with five. again. Lecanto's insistence on attacking through Mueller only aided Citrus' defensive strategy The game-winning goal came courtesy of the same duo that got the Hurricanes' first score, only with roles inverted. A pass inside from Nelson beat the Lecanto defense and reached Jordan, and her shot from inside the box got past King to make it 2-1 with 12:45 left in the opening half. Citrus continued to apply pres- sure after taking the lead, con- trolling the play through the first 20 minutes of the second half. In the final 15 minutes, however, Lecanto did put together several strong scoring chances, two of them starting with Mueller and reaching Burnett. One drive, however, went just over the crossbar; a second hit the goal- post So very close. Which clearly adds promise to Gatto's predic- tion regarding the upcoming 4A- 6 tournament ntl w. + -rln- T rt_+ nI+ +br1n v* TRANSACTIONS BASEBALL American League CHICAGO WHITE SOX-Agreed to terms with C A.J. Pierzynski on a three- year contract.. OAKLAND ATHLETICS-Agreed to terms with LHP Joe Kennedy on a one-year contract. SEATTLE MARINERS-Agreed to terms with LHP Jarrod Washburn on a four-year contract. TAMPA BAY DEVIL RAYS-Agreed to terms with INF Sean Burroughs on a one- year contract. National League CINCINNATI REDS-Agreed to terms with INF Ryan Freel on a two-year contract and INF Aaron Holbert and OF Andy Abad on minor league contracts. COLORADO ROCKIES-Agreed to terms with RHP Bret Prinz and LHP Steve Colyer on minor league contracts. Named Tom Runnells manager, Chuck Kniffin pitching coach and Heath Townsend trainer for Colorado Springs of the PCL, Stu Cole manager, Orlando Merced hitting coach and Austin O'Shea trainer for Tulsa of the Texas League, Chad Kreuter manager and Chris Strickland trainer for Modesto of the California League, Richard Palacios pitch- ing coach and Chris Dovey trainer for Asheville of the South Atlantic League, Darron Cox manager and Doug Linton pitching coach for Tri-City of the Northwest League, Mark Thompson pitching coach that gave the Pirates a 17-point lead heading into the second quarter. In the first quarter alone, Lyons scored 8 points, collected 5 rebounds, and handed out 3 assists and Crystal River commit- ted just 3 turnovers during that span. "The last time we played them, in the first quarter, we played intimidated," said Citrus' Jackson, whose team fell to 6-5 overall and 2-4 in District 4A-6. "We really didn't do anything dif- ferent but we played better (after the first quarter). Crystal River coach Jere DeFoor noticed the difference, too. "I thought we played well in the first quarter but it got sloppy after that," said DeFoor, whose team improved to 10-1 overall and 7-1 in district If the Hurricanes had been off ** - ' -,- ) o CITRus COUNTY (FL) CHRONICLE Bush le ^Copyrighted Material ISyndicated Content.. Available from Commercial News Providers' Area USTA leagues looking for players ft&Mmw 4:... Area Senior players (age 50 and over) will start their USTA league play Jan. 7-8. Some teams will play on Saturday, others on Sunday. Teams need to have at least six players on their roster by Dec. 28, while more can be added afterwards. i So far Citrus - County has submit- ted seven teams: 3.0 Women: Pine Ridge, captain Marilyn Erii Butler; Skyview, cap- den I tain Diane Halloran. -~ 3.5 Women: CRHS, captain Gail Sansom; Skyview, captain Sue Barry; Sugarmill Woods, captain Antoinette van den Hoogen. 3.5 Men: Pine Ridge, captain Norm Berry. 4.0 Men: Skyview, captain Andy Belskie. Some of these teams could use more players, so if you are over 49 or turn 50 anytime in 2006, give them a call. The USTA has been tweak- ing the tiebreak rule again. Last time around, they came up with an extended tiebreak- er to be played instead of a third set. Now they have come up with a system that I am not even going to try to explain. Instead, read the USTA ver- sion, which I got from our District 4 director, Cathy Priest. "The Coman Tiebreak Procedure is the same as the present tiebreak (set or match), except that pro- cedure for playing the Coman. Tiebreak is the same as a set or match tiebreak For exam- ple, if the Coman Tiebreak Procedure is used when the set score is 6-6, the player whose turn it is to serve shall serve the first point from the deuce court; after the first point, the players shall change ends and the follow- ing two points shall be served by the opponents) (in dou-- bles, the player of the oppos- ing team due to serve next), starting with the ad court; after this, each player/team shall serve alternately for two consecutive points (starting with the ad court), changing ends after every four points, until the end of the tiebreak It's Girl ey guys. Have you ever wanted to be a fly on the wall at a women's beau- ty salon? Or maybe at a wedding shower? Ever wonder if the girls talk about the same stuff you do when they go to lunch together? Act the same? Tell similar jokes? I have to admit, I've been curi- ous about how they behave when we're not around. Well, I finally I had a chance to find out last week when Synette Parrish, the captain of the Alley Brats, one of the teams in the Tuesday Gals league at Manatee Lanes, invited me to join them. The Alley Brats were in fourth place in the league, and only one point behind the third place team. With a good night they could move up. I hoped to see some fierce competition between the two teams, and to observe the team members at their best I wasn't disappoint- ed. Synette started the Alley Brats six years ago along with friends Cora Lee and Betsy Bowman. They've stayed togeth- Manatee Lanes Crystal Manatee Handicap Men: T-Bone Young 262-688 Women: Eve Donaldson 259-691 Scratch Men: Jason Home 299-729 Women: Eve Donaldson 191, Nan Young 519 Morning Birds Handicap Women: Dot Brett 268, Betty Tone 686 Scratch Women: Fran Barlow 210-555 West Citrus Mixer Handicap Men: Jeff Dalbow 263-696 Women: Karin Gerrran 240, Sandra Fisher 670 Scratch Men: Gregg Kirkland 225, Kevin Fisher 627 Women: Sandra Fisher 211, Karin German 500 Cruisers Bowling League Handicap Men: Bob Iverson 267-717 Women: Patti Anderson 231, Patti Otenbaker 631 Scratch Men: Bob Iverson 235 Women: Is Night er ever since. Over the six years there have been several other women who have come and gone. Anita Black joined the team the second year. Margo Freeman has been with them for two years, and Deanna Shepard for a year. All three of the new additions told me that they did not know the others before joining the team, but all expect to be back next year. "We are an average team," Synette said. "We don't have any bowlers on the team that are real good, but we still all look forward to bowling night and competing together. We do take our bowling seriously even if it doesn't look like it." Synette and her biggest fan, husband Steve, live in Beverly Hills. She is the registrar at the Cypress Creek Correctional Academy in Lecanto. She car- ries a 148 average and her high- est game so far is an almost per- fect 298. Synette had her own cheering section when I was there, made up of her husband's son, Brandon Bernard, and his fiance, Ashley Geer. "Our bowling is our night Patti Anderson 168 Citrus Hills league Handicap Men: Paul Simek 276, Angelo Lomb 666 Women: Mimi DeMartin 261, 653 Scratch Men: Paul Simek 267-599 Women: Mimi DeMartin 237-581 Fun Bunch Handicap Men: Robbie Platz 300-756 Women: Anne Fish 280, Kelly Johnson 733 Scratch Men: Robbie Platz 300,-756 Women: Anne Fish 237-585 AdultlYouth Holiday No-Tap Tournament Age 10 & up First Place: Trevor Roberts & Steve Ellis 1403 Second Place: Rebekah & Les Cook 1391 Age 11 & up First Place: John & Lucas Sparrow 1560 Second Place: Jules & Jay Bridges 1550 Wvatt Denninotnn childr bowled two perfect Out weekly at Manatee Lanes out." Synette explained. "We're all mellow. We're just here to have fun." Cora and Synette are old friends. Cora has a 126 average and her high game is 205. Married for three years, she currently lives in Crystal River and works at Rainbow Tile. Betsy, wife of Inverness attorney Steven Bowman of the firm Bowman and Wilson, is one of the original members of the team, but is unable to bowl this season due to a back injury. That Dor S, doesn't stop her from having her night out with the gals, however, as she was there cheering them on and enjoying everyone's company. Betsy is a 150 bowler with a high game of 208. Anita, with a 144 average and a high game of 225, has been married for 25 years and lives in Dunnellon. It's obvious she er to her than Manatee Lanes, but that doesn't make any differ- ence to her as evidenced by her five-year loyalty. "I didn't know any of the other girls before I was put on this team, but we all are like sisters now." Margo said. Margo lives in Homosassa, and S works for Johnson Kia as a service advisor. She has two children, Dawn and Tim, and two grand- SRua children, and looks forward to her night 7,,, out with the girls weekly. Margo has been bowling since 1967 and has lived in Citrus County since 1985. With a 146 average and a high game of 253, Margo showed her intense com- petitiveness a little more than the others. Just watching her approach, and reaction after- wards gave me a clue that in spite of her smile, she meant business. enjoys her teammates. There Deanna is the new girl on the are several bowling houses clos- block. She has been in the Bowling Leagu games back-to-back Joe Riser & John Walker (adults) bowled a perfect game each Sportsmen's Bowl Sunbowlers Senior League Men: Warren Aplin 222, Larry Gray 584 Women: Tessy Randazzo 198, Barbara Barnes 530 Monday Night His and Hers league Men: Jerry Bassett 223-605 Women: Jean Cunningham 210, Robin Budd 561 Tuesday Night Firstnighters Mark Wrightson 255-627 Wednesday Morning Early Birds Kinda Badore 213-488 Thursday Afternoon Hits and Misses Men: Paul Spohn 224, Skip George 526 Women: Barbara Steffen 185, Millie George 464 Thursday Night Pinbusters Jean Cunningham 187-497 Friday Afternoon Kings and Queens Men: Ted Crites 193-494 Women: Barbara Barnes 204-505 Friday Evening Friday Nighters Men: Mark Wrightson 242, Don Griffin 622 Women: Annie Lowe 216-594 Saturday Morning Youth League Men: Steven Faron 171, Derek Paquette 406 Women: Kim Wrightson 171-486 Parkview Lanes Monday Night Specials Handicap Men: Dan Ressler 291, 743 Women: Denise Manning 267, Lorl Ciquera 733 Scratch Men: Dan Ressler 268.674 Women: Lori Ciquera 238, 649 Preserve Pinbusters Handicap Men: Dale Hofstetter 237,630Women: Carolyn Hylton 255 Bette Summers 637 Scratch Women: Carolyn Hylton 206 Parkview Seniors Handicap Men: Charlie Lord 274,717 league for seven years but only joined the Alley Brats this year to replace Betsy when she got hurt. Deanna lives in Beverly Hills and is a nurse at Citrus Memorial Hospital. She also has two children and two grandchil- dren, Skylar and Victoria. "I love bowling in the league," she said. "The work at the hos- pital is so stressful, I need some place to unwind. Not only is bowling a perfect way, the fun personalities of my teammates helps me forget every thing at work." Deanna has a 133 average and a high game of 204. It didn't take me long to real- ize that women do in fact talk and act different than men when together. At least they do when bowling together. The time I spent with them was a total pleasure. Though very competitive, they were unlike the men bowlers I have known. I didn't hear any profan- ity or see any displays of disgust, anger or frustration. No whin- ing, and excuses about missed shots. Conversation with the women Women: Dot Calverley 267,642 Scratch Men: Charlie Lord 235 Ladies Classic Handicap Mary Briscoe 253, 658 Scratch Mary Briscoe 213 Late Starters Handicap Men: Ron Gable 248, Rich Soletto 653 Women: Marilyn Seymour 228 Melida Manion 651 Scratch Men: Rich Soletto 234 Women: Shirley Tenity 210. Wednesday Night Men Handicap Gary Thibault 297 Jim Dollar 723 Scratch Jim Dollar 268. Mark Smith 667 Women's Trio Handicap Rue Pilkinton 253,659 Scratch Fran Barlow 225 Holder Hotshots Handicap Men: John Gilbert 276 Ron Barker 736 Women: Jennifer Kish 267 Marilyn Seymour 766 Scratch Men: Kevin Williams 234 Parkview Owls during the match was difficult. It was almost surreal the entire evening. Laughter surrounded our table. What a difference in attitude. I don't ever remember watching men bowl, myself included, where they all laughed and enjoyed each other so much. They all could have been sisters. One would never have thought that other than Cora and Synette, they seldom if ever socialize together away from Manatee Lanes. I had a great time and met some awfully nice people. They told me that if I ever want a night out to relax and have fun, I am welcome to join them on any Tuesday night. I'll remem- ber that. As for what women are like together, don't worry yourself about it. They have a blast. Oh by the way, the Alley Brats won two games and total points moving them into third laugh- ing all the way Don Rua, Chronicle bowling correspondent, can be reached at donrua@gmail.com. Handicap Men: Jim Cheff 298,750 Women: Susan Jones 283, 773 Scratch Men: Jim Cheff 277,687 Women: Fran Barlow 235 Bowler of the Week Men: Charlie Lord, 117 pins over his aver- age. Women: Susan Jones, 113 pins over her average Parkview Strike-A-Mania Jeff Hickey rolled a 300 in each game, with Fred Craycraft tying him in the first game and Andy Curtis tying him in the third game. Rick Rollason and Robert Castleberry had third-place finishes, with Fred and Dave Norris tying for second in the other game. Jeff, Fred and Andy fin- ished 1-2-3 in the series, and Fred. also won a third of the Strike-A-Mania pot with natural strikes in the second game. The 8- pin NoTap Strike-A-Mania is held every Saturday night, and the strike pot is now $57. Players must sign in by 6:30 p.m., and the cost is $12 per person. 4B TUESDAY, DECEMBER 20, 2005 SPORTS Ic H ,,,gp * ... . game. USA Tennis Florida will use the Coman Tiebreak Procedure at all USA League Tennis Regional and S e c tional Championships in the 2006 league year fbr all set and match tiebreaks. S Use of the Coman Tie b r e a k Procedure is encouraged during local district league play." c van Remember it says loogen "encouraged," it is I not mandatory. For those of you who are going to any of these Championships you bet- ter save this part of the paper because you are going to need it. League Results Monday Night Ladies Doubles The results for Dec. 12 were: Brooksville Aces def. Sugarmill Woodsies; 4-1 (Incomplete); Citrus Hills Court Defenders def. Pine Ridge Racqueteers, 3-2; Black Diamond def. Bicenternial Babes, 4-2. For more infor- mation or to report scores, contact Antoinette van den Hoogen at 382-3138 or hoera@juno.com. Tuesday Womens Leagues USA Women Team Tennis This league is geared towards the 3.0 and The results for Dec. 13 were: Meadowcrest Aces vs Riverview, 2-2; Riverhaven Ospreys def. Citrus HillS, 4-2; Crystal River vs Riverhaven Gators, 3-3; Pine Ridge def. Sugarmill Woods, 4-0. For information about this league, contact Myrtle Jones at 341-0970 or e-mail mbj30@netsignia.net. Thursday Citrus Area Doubles The results for Dec. 12 were: Citrus Hills Swingers def. Skyview, 6-3; Citrus Hills Aces def. Crystal River Racqueteers, 6-3; Pine Ridge Mavericks def. Bicentennial Babes, 7-2; Sugar Mill Oakies def. Pine Ridge Fillies, 6-5; Crystal River Yoyo's def. Sugar Mill Sweetspots, 7-2. For information about this league, contact chairperson Gail Sansom at 746-4455 or bsansom@tam- pabay.rr.com. Thursday Evening Men's League The matches for Dec. 15 were rained out again. For information, contact the Administration Office at Whispering Pines Park at 726-3913. Friday Senior Ladies Doubles 3.0-3.5 sea- son, or you want to be a sub, contact Betsy Dykes at 795-5299 or Lucy Murphy at 527-4239 or e-mail. --1-- Eric van den Hoogen, Chronicle tennis correspon- dent, can be reached at hoera@juno.com. f.:t: ,h iI J''I ;L " Underwater escapades C TUESDAY DECEMBER 20, 2005 I, i-iiiin..iiii 11 I.- .11 --- -^---- -- -- .^- -, *a,;..,3|B.i.1| Dr. Ed Dodge HEART CONNECTIONS I .- ,.:. .. I MIKE WINKLES/Special to-the Chronicle Sean Bradley, scuba instructor, practices controlled descending and ascending with student diver John "Ski" Szafranski in the indoor pool a;t American Pro Diving Center. There's more to safe diving than knowing what 'scuba' means JoY GALLON For the Chronicle Scuba diving might be the most incredible adventure you will ever undertake. It is the portal to a new world, where most have never gone and never will. For some of us, though, the thought of scuba diving brings up images of actor Lloyd Bridges, in the 1957-1961 TV series, "Sea Hunt," struggling'underwater against knife-wielding thugs who are trying to rip a hole in his air hose and kill him. Luckily for most divers, this is never the experience they will have. And besides and this should make you feel better cut- ting an air hose is difficult Although scuba has its dangerous and difficult aspects, almost any- one can learn to do it You do not have to be a master diver to enjoy the sport. Advances in technology have made scuba gear immensely easier to use, whetfleryou are big and strong, or small and non-athlet- ic. "Basically, everybody can do it," Sean Bradley, PADI Course .Instructor with American Pro-Dive in Crystal River, said.'"We have certified several amputees and people paralyzed from the waist down. I took an 86-year-old man deep diving to 86 feet for his birth- day. He loved it" Bradley said even people who Student diver John "Ski" Szafranski, right, works with scuba instructor Sean Bradley as they practice underwater skills in the indoor pool at American Pro Diving Center. have had lung transplants and heart attacks can scuba if their doc- tors clear them. "And deaf kids," Bradley said, "we teach them maybe 40 hand sig- nals, and these kids can carry on conversations like crazy underwater!" U F . If you think you are too a handicapped to dive, talk c with Julie Wols, MDEA w instructor evaluator at c Crystal River Water J Sports. "We've taken blind people scuba diving," Wols said. "We take them to an entry level shallow dive it gives them an opportunity to try it." She also said that the handi- capped may need an assistant to help them operate their BC or other equipment Read ibout living /eek ;olun oy G There are several scuba pro- grams that offer "open water" cer- tification, but NAUI and PADI are the best known. It is important to be certified to scuba dive, because use of the equipment and safety rules of diving are not more something we intuitively t scuba know. g next Bill Oestreich, owner of in a Birds Under Water Dive nn by Shop, said, "You have 3allion. been taught all your life to hold your breath in the water, but you can't do it on ascent because it will rupture your lungs, and form a blockage of oxygen-rich blood to the brain. In dive class, we teach basic survival skills. For example, if you run out of air, get- ting air from your dive buddy. It takes repetition in shallow water, IN TECHNICAL TERMS Scuba stands for self-contained underwater breathing appara- tus. I BC vest buoyancy control vest, like a life-preserver. Regulator Breiathing appara- tus held in the mouth, which connects to the air tank on Your back. Snorkel Hbolk-shaped breathing tube for swimming on the surface of the water. 8 Weight Belt -- A wet suit keeps a person near ;or at the water's surface. A little added weight on. a belt counteracts the buoy- ancy of the wet suit, allowing the diver to sink lower. Wet suit Stretchy, neoprene bodysuit that aids in flotation and warmth. learning these skills. In a panic sit- uation, the poorly learned skills are the ones that will first be lost" Dive shops will not fill air tanks for people who do not have certifi- cation. And, of course, diving with- out proper training is an invitation to a shorter life span maybe not just your own. The basic scuba certification course is for those 10 years or older, and takes two to four days. It' starts with classroom study and testing, and then time in a pool or shallow water to become familiar with the equipment and hand sig- Please see ESCAPADES/Page 4C Medicare stymies even those who served our country Recently, military veterans re- ceiving benefits from the U.S. Department of Veterans Affairs (VA) have'been experiencing the same confusion as the rest of us. I have received questions from the most honorable of all military veterans (vets). In fact, this past week 4 I had the honor and-pleas- ure of speaking to a disabled . veteran, who reads this col- umn. Initially, I received e- mail from this disabled vet, who receives many, but not Dan ] all, of his multitude of pre- SEN scriptions from the VA. This vet has so many med- ADVC ical conditions that he has a need for some 16 different prescrip- tions monthly May god bless this read- er for his desire to continue onward, and also for his military service. He and some "buddy vets" share the same con- R fusion of the ins-and-outs of this new law, as the rest of the public. His basic dilemma concerned the bureaucratic answers to questions received from the VA, as well as the problem of attempting to figure out if he can continue with his VA medications and apply for -. Part D. Almost all federal and S state agencies and the legis- lators' offices that represent us cannot seem to respond S. with direct, understandable Zohan answers to simple questions. IOR This is a complaint I receive from readers of all ages and 'CATE backgrounds. It is, quite sim- ply, shameful! The disabled veteran reader was told by a Part D-approved insurer that he could not continue to receive VA pre- scriptions and Part D of Medicare. The answer he received was: "The govern- ment would not allow two government plans." Actually, this is not quite true. The correct answer should be: "The government, meaning the VA and Medicare's Part D, will not cover or can- not cover a single prescription by both plans; in other words, no duplication in coverage. So, the overall answer to the reader's question would be: One can have Part D and continue to receive the medica- tions that the VA clinic or hospital pre- scribe. Note: The above scenario does not concern Tricare or CHAMPVA benefici- aries. These are health insurance plans for active vets, as well as retired vets, and they know who they are. Why would someone want both plans? In this reader's situation, the VA does not cover all of his medications. In addition, he currently is paying an out- of-pocket expense of nearly $5,000 per year for those medications that are not covered by the VA. So, as with all other Medicare benefi- ciaries, one would have to closely mon- itor the formulary (drugs) and stipula- tions of a plan. Some interesting side issue questions arise about using both VA and Part D coverage. If one just uses VA coverage for prescriptions, is it considered Med- icare "Credible Coverage"? In other words: Will you pay the Medicare pen- alty, because you did not join Part D? The answer is no, according to the VA and Medicare. However, are we talking about only the drugs that the VA cov- ers? According to Medicare, prescription VA benefits will not change in 2006. So, quite clearly Medicare is aware that Medicare beneficiaries have been receiving VA prescriptions. According to the VA, it clearly states that you may Please see : '/Page 4C Holidays link hearts hristmas, Hanukkah and Kwanzaa are marvelous celebra- tions of spirit that link hearts around the world at this time of year. The season is wondrous because the spirit of love, peace and joy lights up the world for a time. How marvelous it would be if this spirit could light up our lives all year long! The truth is that it can if we let it. The linkage be- tween our hearts, our lives and the spirit of love is not simply a sentimental one. Real connections exist that have been proven scientifi- cally. The key to strengthen- ing these connections is to understand and nourish love the language of the heart. The Institute of Heart- Math is an organization that has carefully researched and documented heart con- nections since 1991. Many of its findings were published in a book titled "The HeartMath Solution." Sci- entific.conclusions that are well established include the following: Please see DODGE/Page 3C Dr. Sunil Gandhi CANCER & BLOOD DISEASE How to prevent prostate cancer P rostate cancer is the commonest of all can- cers except skin can- cer. This year alone, it will strike more than 232,000 men. Every man has about a 1-in-10 chance of getting prostate cancer in his life- time. Advances in screening and newer diagnostic tech- nology have led to earlier and earlier diagnoses of-the disease. Still, it is a lot better not to get prostate cancer at all. So the National Cancer Insti- tute and researchers around the world are doing many studies to find ways to reduce the chance of getting prostate cancer. Unfor- tunately, this is easier said than done. Studies are diffi- cult and very expensive. Still, I will cite some recom- mendations in the article. The prostate is a walnut- sized gland behind the base of the penis, in front of the rectum and below the blad- der. It surrounds the ure- thra, the tube-like channel that carries urine and semen through the penis. The prostate's main function is to produce seminal fluid, the liquid in semen that pro- tects, supports and helps transport sperm. Please see C,.%r ,',!l,/Page 4C .I 2C TUESDAY, DECEMBER 20, 2005 Plantar fasciosis can explain persistent symptoms The last column discussed plantar fasciitis vs. plantar fasciosis. Fasciitis is an inflam- mation of the plantar fascia that causes heel pain and-typically presents when first arising after being off the foot for a period of time. Fasciitis should be visualized on bone scan or MRI and usually 'I responds to exercise and anti-inflam- matory medication, such as NSAIDS or cortisone. I mentioned in the last column that plantar fasciosis is a rela- tively new concept as a cause of heel pain, where the plantar fascia under- 'i goes microscopic structural failure without information. ' Plantar fasciosis helps explain Dr. David those patients who fail to respond to exercises, NSAIDS, and corticosteroid BEST" injections and have negative bone FOR l scan and MRI studies that are finely tuned to identify inflammation in tissue. I have two current patients I am treating with what I believe is plantar fasciosis. One patient has had symptoms of fasciitis for almost one year and has not responded to an exercise regimen, NSAIDS, physical therapy, corticosteroid injec- tions or orthotic inserts, and had a negative MRI exam for fasciitis. Another patient was treated successfully for plantar fasciitis three years prior with conserva- tive measures.including exercise and corticos- teroid injection. The patient presented recently with a return of symptoms that was not respond- ing to exercise. I told the patient that I could not remember a patient who had exercised their fasciitis away and had it return. I was surprised that she had returned three years later for the same problem. I injected the painful area that had previously benefited from the treatment and the patient did not respond. I ordered an MRI test that was also negative, but the patient continued I .1 to complain of pain similar to the first episode. Anti-inflammatory medication will not help fas- ciosis. Stretching exercises are the primary treat- ment for fasciosis and fasciitis, in my opinion, and are well accepted in the medical community. Night splints are devices worn on the legs while sleeping that can stretch the offending tissue. Night splints are documented in several studies to ben- efit heel pain due to the fascia, but I find that only about 20 percent of my patients are compliant or will tolerate the splints due to a number of reasons. Insert or orthotic management may Help those with fascia-induced heel B. Raynor pain, but the devices are expensive, usually not covered by insurance, FOOT restrict shoe choices, and should be VARD used for the patient's lifetime to be effective. A patient may elect to live with the problem if conservative measures fail to provide relief. Patients can also elect to have surgery performed to try to relieve pain. Surgical alternatives include an endoscopic technique in which a cut is made in the fascia through a small tube known as Sa cannula. Extra corporeal shock wave therapy, ,ECSWT, uses sound waves to create an inflamma- tory reaction in the fascia to stimulate healing Without an incision. Time-honored open surgery directly accesses the fascia through an incision, but requires keeping weight off the treated foot after surgery. Each procedure has advantages and disadvan- tages and should be used as a last resort when patients fail all conservative care and elect not to live with the problem. **---m---- David B. Raynor, DPM, is a podiatrist in Inverness. He can be reached at 726-3668 with questions or suggestions for future columns. Long-term costs of medical education Jaw pain can have many causes Isaw a new patient this week who had non- with tapping sensitivity is a crack or fracture in specific pain in the lower right jaw that she the tooth. There are also times when a gum could not attribute to the gums or the teeth, abscess elicits tapping sensitivity. It is this type of situation that is very difficult for a The cold sensitivity: Cold sensitivity is most a doctor to diagnose definitively. common with a hypersensitive After careful examination, I found nerve. A hypersensitive nerve is a crack in one of her molars, a crown most common when the nerve is on another molar that went very far affected by decay This can also hap- below the gums, and both teeth were .y pen when the bite is not correct. This sensitive to tapping and to a cold *., is most common with the recent stick test As I told her, any of these placement of a new crown. findings could be the cause of her '. As you can see, things can get quite pain. Or you could fix one thing only complicated and in this patient's to still have symptoms. ,. case, it sure is. This patient elected Let's go over what each of the Dr. Frank Vasii to hold off on any treatment or fur- above findings can contribute to her their evaluation. This is probably a pain. SOU ND good idea, since something will prob- * The crack: A crack or fracture in BITES ably surface as the cause of her pain. a tooth can be a very hard thing to As I told her, it may be one of the diagnose. In some cases you diagnose it solely above or a combination of any of them. The only by symptoms; in this patient's case, it was very risk with waiting on treatment is if the problem apparent, surfaces at an inopportune time. Cracks will often give vague symptoms. In most I hope this situation helps you, the reader, cases, the patient has pain during chewing that is because these are all common occurrences in relieved when the pressure is removed. There the dental office. If you have one of these symp- can be cold sensitivity, but not always. If left undi- toms, you may want to talk to your dentist about agnosed for a long time, it can lead to the need for it. On the other hand, if you have a set of symp- a root canal because the nerve is affected. toms that has been hard for your dentist to diag- The crown far below the gums: If a foreign nose, please understand how difficult it is and object were meant to be far below the gums, God that, sometimes, the approach this patient took would have made it that way. Some people tol- is the best. rate this situation better than others, but more This will be my last column until the New often than not, the patient will have a vague Year. I take this time off each year to spend time ache that cannot be pinpointed. The typical fix with my family and friends. I wish each and for something like this is to surgically reposition every one of you a blessed holiday season. the bone and gum level as it was meant to be. Sensitivity to tapping: The sensitivity to tap- ping is usually associated with a bone abscess. Dr. Frank Vascimini is a Homosassa dentist This patient had no visible abscess on the X-ray, Send your questions to 4805 S. Suncoast Blvd., but that does not mean one is not forming that Homosassa 34446 or e-mail them to him at we cannot see. Another thing that is common info@masterpiecedentalstudio.com. Women's Cancer Support Group learns about Medicare Part D e have all read articles Medical Colleges' and was recently about the recently published in one of my medical legal debate journals. It has some interesting that goes on in Florida and how facts and tidbits that I thought I it affects medical care. would make public. No matter what The average grad- side of the argument .I uating medical stu- you are on, we still dent owes more than all need proper med- $115,000 by the time ical care. And there I he or she leaves is another factor that '" medical school, and is little-known to the we all know that is general public that not the end of train- affectsthe amount of ing. From medical doctors who are pro- A school, you go to a duced to take care of Dr. Denis Grillo residency, which can our mothers, fathers, last up to sik years. sisters, brothers, EAR, NOSE When comparing wives and kids. & THROAT premedical educa- That fact is the tion and medical cost of a medical education. R school education, premed costs Florida has'a wonderful Sys- abofit 10 percent ofwh.at it costs tem for its high school kids thr to go .to medical Ib school. the first four years of college, Graduates from medical school which is called your premedical have significant debt wl en they education. If you have good graduate. Eighty-five percent of grades, there are Sunshine graduating students have some scholarships to help you get debt to repay. The most common through school. form of debt is loans they have Medical school, which is con- taken out through their years of sidered graduate school, or the study, and the loan burden has period after, the .initial four risen from 45 percent of the years of college, is not covered class requiring to take loans out, by Sunshine scholarships and is to nowadays where 60 percent far more costly. of the class requires a loan to get The following information is through their education. available and was published by Scholarships are available, The American Academy of but they only cover one-quarter of the cost of tuition. Tuition in medical school itself has become a problem. It has risen more than 150 percent at private medical colleges and more than 300 percent in public medical schools. Indebtedness for living expenses has outstripped the increase of medical school tuition. The latest compiled sta- tistics from 2004 suggest that the average graduating medical stu- dent has to pay approximately $1,200 a month against his or her indebtedness. That, coupled with the med- ical malpractice that exists in our state and, for that matter, the rest of the country, would now dissuade young, talented people from seeking positions in med- ical school. Ultimately, the pursuit of a medical degree is a very diffi- cult and personal decision. One has to be very focused. I certain- ly hope there is an up-and-com- ing generation who will be around to help this aging baby- boomer and many others who are likely to need their services. Denis Grillo, D.O., is an ear, nose and throat specialist in Crystal River. Call him at 795-0011. Health NOTES Information line The Citrus County Health De- partment (CCHD) has a new www. citruscoufityhealth.org and the Community Resource number 211 will also be provided. Call Judith Tear at 527-0068, Ext. 271. Open house Local Jazzercise instructors Trina Murphy, Jennifer McLendon and Nikki Ferarri will teach a spe- cial 60-minute Jazzercise class 6t 5:45 p.m. today at the Crystal Glen Clubhouse in Lecanto. Call Jennifer McLendon at 634- 3874 or check out www. citruscountyjazzercise.com. Healthy eating Diet is an important part of a healthy lifestyle. Join us for "Heart- Healthy Eating" from 2 to 4 p.m. Wednesday in the CMH Auditor- ium, on the comer of Grace Street and Osceola Avenue, Invemess. This program is repeated every month by dietitian Penny Davis, R.D., L.D., who will discuss the right way to eat to improve your health and prevent heart disease. The program is free of charge and open to the public. Registra- tion is required by calling 344- 6513. Reserved parking for the program will be available in the hospital's "Q" parking lot, on the opposite corner of Grace Street and Osceola Avenue. Managing diabetes Diabetes classes are offered from 9 to 10 a.m. Monday at the Citrus County Health Department in Lecanto. Classes are free. No registration is required. , Jan. 23 What is diabetes? Jan. 30 Meal planning. Feb. 6 More about meal plans. Feb. 13 Medications and moni- toring. Feb. 20 Sick days. Feb. 27 Avoiding complications. SFasting blood sugars are offered from 8 to 9 a.m. Monday through Friday in all three Citrus County Health Department sites. There is a $10 fee. No appointment is nec- essary. Call Lynece Hand, R.N., 795-6233, Ext. 240 or Carol Burke, R.D., 726-5222. We Serve Citrus ITRUS & Levy Counties COUNTY COUNSELING L Alcohol/Substance Abuse Family Counseling SSupervised Visitations .- And Exchanges Court Ordered - Probation Requirements SSubstance Testing Jo IL Gordon CAP-ICADC 35;2-447-2001 Free screening Inverness Sports & Orthopedic Rehab offers free screening, by appointment, for individuals with balance disorders/dizziness and Please see ;-(T'E-T/Page 3C NANCY A. ROGERS, R.N., OCN Special to the Chronicle The monthly meeting of the Women's Cancer Support Group was held at the Cancer and Blood Disease Center in Lecanto with V Upender Rao, M.D., FACP, leading the discus- sion. Nancy and Ron Dunwoodie, licensed insurance agents, spoke about Medicare Part D, which seemed to be confusing some of participants. Starting Jan. 1, 2006, Medicare will pro- vide prescription drug cover- age that will make it easier for everyone with Medicare to pay for the drugs they need to stay healthy. Everyone with Medicare can choose to enroll in this voluntary drug coverage program regardless of their income, health or how they are paying for their prescription drugs at this time. Because there are many plans available to choose from, Speaker available Special to the Chronicle Sherri King, PTA, clinic man- ager of Sports & Orthopedic Rehab is available, free of charge, as a guest speaker for civic groups, support groups, churches, schools and corpora- tions. Topics could include physical therapy intervention for balance disorders/fall pre- vention, treatment for dizzi- ness, proper body mechanics to help reduce neck/back injuries, osteoporosis and general con- ditioning. Call 341-3740. SSeaso^n s GreetWngsA Our Wish for You... Enjoy the company of good friends and family... Reminisce the good times shared... * ASSISTED LIVING * Give the gift of love and happiness this holiday season! C& A 231 N.W. Hwy. 19, Crystal River, FL AT KINCG BAY (352) 564-2446 R;E IDENCE Lic. #AL10230 wwwcedarcreklieco I EV & Staff kw W BDawn Goodpaster, PA-C. Would Like To Wish You & Your Family a Happy, Healthy Holiday Season. 6152 W. Corporate Oaks Drive Crystal River, 794-5086 Clinic Hours: Mon. Thurs. 9AM 5PM Fri. 8AM till Noon Dr. James Lemire, Medical Director - ' - ~ -- l some of us were asking for help in how to make that decision. Nancy gave information about the different plans that offer prescription drugs in our area. She also told us we can call (800) MEDICARE (633-4227) or visit to get information that is tailored just for you. She advised us once we have the information about the plans that are available to us, compare the plans. Nancy showed us how to make a simple chart to help compare one plan to another. Some of the items she suggest- ed we may want to compare are the monthly premium, 'deductible, what percentage you pay for-co-insurance and what amount you pay for co-' payments. She said it is impor- tant not to base your decision only on the cost of the premi- um., You should also compare for- mularies to see whether the drugs you take are covered by the plan and where the plan's network pharmacies are locat- ed. Also, some of the pharma- cies have a mail order plan that may be very helpful. Be sure to have a list of the med- ications you are currently tak- ing to help make a decision about which plan will work best for you. Because the program was so well received, we decided to ask her to repeat the program for our other patients and their families who might need addi- tional information about Medicare Part D. The next meeting of the Women's Cancer Support Group will be at 3 p.m. Monday, Jan. 9. Christine Martensson, licensed cl in ical social worker, will be the-guest speaker All women who have been diag- nosed with either breast or ovarian cancer are invited to attend, whether or not you are on treatment at this time. Call the Cancer & Blood Disease Center, 746-0707, for informa- tion. ,. - 11--1--m I CITRUS COUNTY (FL) CHRONICLE HEALTH ,i ^,C- .n'-L-C.O--ESAY ,DEEME 20.2 Saline rinse can help with sinus conditions DODGE Continued from Page 1C SCan a nasal irrigation S using saltwater help S with allergy and sinus problems? A: A nasal saline (saltwater) 'rinse or wash, if properly used, ,may be helpful for a number of 'conditions such as sinusitis, -rhinitis, allergies or post-nasal :drip. The nose acts to warm, h 'moisten and clean air before it chard enters the lungs. The bones of ASK -the face around the nose con- PHARf -tain hollow spaces called paranasal sinuses, which -reduce the weight of the facial bones while 'maintaining bone strength and shape. These air-filled spaces of the nose and sinuses also humidify and warm the air, 'add to the sense of smell and play a signif- 'icant role in the quality of human sound. SThe sinuses are lined with cells that produce mucus and have tiny hair-like projections called cilia that help to 'remove foreign particles into the nasal cavity through small openings called ostia. "The average adult produces about 1 quart -of mucus in their sinuses daily, which serve to keep the nose and sinuses moist and to trap inhaled irritants. As long as the mucus is thin and watery, it will flow easily along its course and eventually be swallowed. However, mucus that becomes thick can remain in the sinuses or nose leading to congestion, headache, post-nasal drip and cough. Mucus that remains stagnant also provides an opportunity for infection. Some of the causes of thick- ened mucus in the nose and sinuses include colds, the flu, allergies, pollution or dry air. Nasal rinses or wash- es with saline solution can help to cleanse the sinuses and keep them moist. Saline rinses/washes can aid in washing away thickened mucus, allergy causing parti- cles and irritants, such as pollens, dust particles, pollutants and bacteria. It should be noted, however, that the mucus membranes that line the nose and sinuses are sensitive and delicate. Therefore, only properly prepared saline solutions should be used for this purpose. Two nonprescription, preservative-free saline rinse/wash products that contain pre-measured packets of ingredients to prepare a proper saline solution are Sinus Rinse and SinuCleanse. Both of these products can be found at many pharma- cies nationwide or can be obtained online: Sinus Rinse, (877) 477-8633; SinuCleanse- anse.com, (888) 547-5492. Sinus Rinse uses a plastic squeeze bot- tle to administer the saline rinse, while SinuCleanse uses a plastic nasal washing pot known as a neti-pot. A starter kit of these products, which includes an admin- istration device, costs about $15. If you use these products, please make sure that you read and follow all instruc- tions carefully. These products should not be used in certain situations, so be sure to contact your physician and pharmacist for further advice. ---a--111 Richard Hoffmann has practiced pharmacy for more than 20 years. Send questions to him at 1135 N. Timucuan Trail, Inverness, FL 34453. The heart has its own nerv- ous system that works with the brain and yet operates inde- pendently of it in striking ways. It also sends messages to the brain and the rest of the body by way of cardiac hor- mones, pressure waves and electromagnetic fields. Heart rhythm has a major influence on brain rhythm and function. The heart's rhythm is modi- fied by emotions. Feelings of anger, fear and distress cause the heart to beat in a rather chaotic fashion. By contrast, feelings of love and appreciation lead to a coherent rhythm that affects the body and the brain in pro- found ways, improving their efficiency greatly The amazing, but in- escapable, conclusion from all available data is that the heart has a unique kind of holistic wisdom that differs from the rational intellect of the brain. Yet our brains are able to override the intuition of our hearts, and as a result, we often fail to tap into this rich source of wisdom. Real love is gentle, but does it have genuine power? Perhaps Teilhard de Chardin, famed Jesuit scien- tist, said it best: "Someday, after mastering winds, waves, tides and gravity, we shall har- ness the energy of love, and for the second time in the history of the world, man will have dis- covered fire." When people link hands and hearts to sing, "Let peace begin with me," they exert a strong universal force for good the spirit of peace and love! ----m---- Dr. Ed Dodge is a retired Inverness physician. Visit his Web site,. NOTES Continued from Page 2C options for treatment. Call 341- 3740 to schedule a free screening. V SupportGROUPS James J. Ronzo, D.O, is evaluating __ the public interest in a support group for our Osteoporotic resi- n Osteoporosis Support dence. This group would begin Group SGulfcoast Spine Institute and Dr. Please see GROUPS/Page 4C heart Associates Announces The Addition of Donna J Michaud, ARNP Specializing In Women's Health Adult Family Practice Call For Appointments 352-795-9266 5606 W. Norvell Bryant Hwy., Crystal River, FLI "I'm Wearing One!" "The Qualitone CIC gives you better hearing for about 1/2 the price of others you've heard of. I'm wearing onel Come & try one foryourself. 'll give you a 30 DAY TRIAL. NO OBLIGATION. on Qualitone CIC David Ditchfield TRI-COUNIY AUDIOWLGY Audioprosthologist & HEARING AID SERVICES Inverness 726-2004 Beverly Hills 746-1133 ,NEWS!NORING TREATMENT As Seeit On Good Morning America James L. Lenire, Mo Medical Director Valerie Brandt, MSN, ARNP M 11 Primary Care Integrative Medicine Anti- ing herapies Chelation Therapy Colon Cleansing Detoxifleation , 1 ,,I i M ani, Woren's r seath Blo-ldantrial HRT, JT. U170 6,8o- LAralo : ' CITIZEN OF THE YEAR NAME: I TOWN: SPHONE (won't be published). My nominee for Citizen of the Year (and why) is: .1 5d Weisenbirger, D.O., F.O.C.O.O. IH H ,-"' Board Cernfied Ear. Nose, Tlroat & Focial Plusnc Surgeon S : ..'. "Your Gulf Coast Snoring Expert" ... Free Consultations earnosethroardoc. cont Over 15 Years In Citrus CotLnry Cornpetnive Pricing Male urination problems? Up at night having to "go"? Trouble starting your stream? Revolutionary new drug-free formula helps you regain your youthfid say- ing about Prostalex Plus: "I used to get up more than 6 times a night. Now I don't have to get up even once!" -Pat G. "I almost had to quit my job as a truck driver, but now I can gofor hours and hours without having to look for a bathroom." Larry D. '4ll my urination problems-urgency, frequency, low flow, dribble-they're totally gone now!" -Scott packaging). That way you can see for yourself how effec- tive and powerful the Prostalex Plus for- mula really is! Call toll-free now at 1- 888-241-9203. Call now for your risk-free trial: 1-888-241-9203 Hoffmann ATHE YIAC. I - .CITRUS COUNTY (FL) CHRONICLE TUESDAYDECEMBER 20 200 C 4C ruEs~y, DECEMBER 20, 2005 HEALTH Cimus COUNTY (FL) CHRONICLE Coping with cancer during holidays GANDHI Continued from Page 1C P people going through can- cer treat- ments need to take special care of themselves through the holidays, which can be stressful even in the best of times. I often tell my patients to use their Dr. C. treatment as per- Ben mission to be sane AMEF during the holidays, CAN to take a break from SOC the normal holiday routine, and try to enjoy themselves. The follow- ing suggestions aim to help people with cancer preserve their energy, capture a little holiday joy and deepen their personal relationships. First of all, set lower expec- tations for this holiday season. Don't worry about decorating the house, baking or buying gifts for everyone in your life. Remind yourself that this is temporary. For a short period, you can relax, and it's OK With that in mind, let other people do things for you. Delegate tasks and errands to others, many of whom may be looking for a way to help you during this trying time in your life. And, always remember to rest each day. Many people experience fatigue during can- cer treatment and need to find the right balance of rest and activities. It's also OK to allow yourself some depres- sion, some pity, but then pick yourself up and go on. Many of my patients have a pity party for a day or two, and that is OK, but too long, such as two weeks, could be a sign of clinical depression. The rate of depres- sion among cancer patients is 15 percent to 24 percent, about twice that in the general popu- lation. So if a person in treat- ment doesn't care about getting out of bed, or is physically unable to get up, it could be clinical depression rather than fatigue, and should be dis- cussed And make no apologies if you need to retire early or skip a gathering that will be trying, such as one with hyper grand- children. Do so without regret or an elaborate explanation. Simply saying "I don't feel up to it" should be all the explana- tion needed. Food doesn't taste right to many people in treatment, and rich, holiday dishes can inten- sify feelings of nausea. Focus on family, friends and spiritual- ity now and look forward to enjoying meals at the next hol- iday, when treatment will be finished. Eventually, the taste will come back People around the cancer patient always want to feed that person. Food rep- resents life and celebration. But love and friendship can easily be the main holiday focus for people with cancer. And finally, don't center the holiday around your cancer Others may need to help the person in treatment see past his or her illness to capture the joy and excitement of the holi- days. While it is impossible to ignore the fact that you are dealing with cancer, it does not have to be the main course of the entire holiday season. State your intentions to enjoy the moment, and look forward to a better holiday next year Dr. Bennett is a board-certified radiation oncologist, past president of the Citrus County Unit of the American Cancer Society and a member of the Board of Directors and Executive Committee of the Florida Division of the American Cancer Society. E-mail him at cjbennett@rboi.org. G RP the Citrus Cancer Support Group Christmas Social. Support Group, sponsored by The G O U S from 4:30 to 6 p.m. the third Light refreshments are provided Cottages of Gentle Breeze, 9416 Tuesday monthly in the Cafeteria at the meetings. Call 344-6596, N. Gentle Breeze Loop, Citrus Continued from Page 3C Meeting Room. These meetings Carol at 344-6436, or Virginia at Springs, 11 a.m. Call (352) 489- meeting January 2006. are open to any diagnosed cancer 726-1551, Ext. 2235. 5539 to reserve onsite respite serv- Call to register at 341-4778. patient, family and friends, plus E Citrus Caregiver Support ices. Refreshments will be provid- Cancer support group interested community members. Groups ed. Citrus Memorial Hospital hosts Today's program will be a Wednesday: Family Caregiver Call Sandra at (800) 717-3277. SC APA DES for a shallow open water dive, followed by tryout scuba gear in a pool or shallow dive three or four deeper dives, always closely to find out if they like it The cost is about assisted by able instructors. $100, while certification usually costs Continued from Page 1C In Citrus County, the open water dives around $250. are usually done in local spring-fed It is the most exhilarating experience to nals. Students practice important, but not waters, which stay at 72 degrees year float, breathing easily underwater, watch- difficult, skills such as clearing water from round no matter what the weather ing fish swim through your bubbles, with their masks, using their spare regulators, Most dive shops in Citrus County that no pressure to rush back to the surface. It and removing and replacing their gear teach scuba diving also offer a "Discover is like a trip to outer space without the while under water. After this, students go Scuba" type of course. It allows people to rocket. ROHAN Continued from Page 1C join Part D, yet the VA also indicates that its coverage is approved as credible, meaning no penalty. However, at this late date, the VA hasn't a clue as to how it will let Medicare know that you are receiving VA meds, to prove credible coverage! The government is trapped with this one. Either way, it will J CARDIOLOGY CONSULTANTS P.A. 2- VWW.CITRUSCARDIOLOGY.ORG 's D accomplished doctors are dedicated to providing MD, FACC exceptional diagnosis and treatment. 308W.HighlandBlvd. Inverness, FL 34452 Did You Know... * If you have a prescription from your doctor for a cane, walker, wheelchair or 3 in 1 bedside commode you can pick it up on your way home or we will deliver right to your door or rehab center. not cause a penalty, and you may have both. When in doubt, punt! Keep my green tea warm, and I will talk to you next week Send questions and comments to "SeniorAdvocate," 1624 N. Meadowcrest Blvd., Crystal River FL 34429 or e-mail danrohan@atlantic.net Tomatoes and tomato prod- ucts, cruciferous vegetables such as broccoli, cauliflower and cabbage, soy and other legumes and nutrients common- ly found in all of them reduce the risk of prostate cancer. The most likely reason is that they provide antioxidant protection against cell damage and DNA. Different studies have shown that lycopene mainly from tomatoes is the best quencher of free oxygen radicals. Cooked tomatoes may be a little better than raw products. This may reduce the risk of prostate can- cer by almost one-third. Vitamin E is an antioxidant, which may reduce risk by as much as 40 percent All you require is 50 IU of supplemental vitamin E. Most multivitamin tablets have a lot more than 50 IU, so you do not need to take any extra vitamin E supple- ments in addition to a multivita- min tablet Actually, some stud- ies have shown deleterious effects of excess vitamin E on the heart Selenium is an essential trace nutrient that humans receive in their diet through plants, ani- mal products and nutritional supplements. In a nutrition pre- vention of cancer trial, a total of 974 men were randomized to either a daily supplement of 200 micrograms of selenium or a placebo. Patients were treated for an average of 4 1/2 years and followed for a mean of 6 1/2 years. The selenium-treated group had two-thirds less risk of developing prostate cancer Cruciferous vegetables, which also (include Brussels sprouts, bok choy and kale, are rich in the chemicals called phytochemicals. These can induce antioxidant enzymes to fight cell damage caused by free radicals. These vegetables also help in fighting against many other cancers, too. So it is advis- able to eat five servings of these vegetables a day. I will continue this article next week and also report some diet and nutrients that can actu- ally increase the risk of getting prostate cancer ---B-- 651993 C f cmj COUNTYm INC Excellence in Hospice Care since 1983 Did You Know? Hospice is not a place. Fact: Hospice care is provided wherever the patient resides. About 80% of hospice care is provided in the home, but patients can receive hospice care in a Hospital, Nursing Home,Assisted Living Facility, Residential Care Facility or Hospice House. For more information on hospice care give us a call. In Citrus 352.527.2020 Toll Free 866.642.0962 COMPLETE MEDICAL & SURGICAL FOOT CARE / A, Adult & Pediatric 4 Ff/Aot*"Swply Specializing in: CITRUS PODIATRY CENTER, PA ~- .. S eEDWARD J DALY, DPM ... - KENNETH R PRITCHYK, DPM* *Board Certified Podiatric Physician & Surgeon M11 ''"l'Bl 'il-- K^tes''" i-mart! UTILIZE YOUR VISION INSURANCE BENEFITS BEFORE DECEMBER 31ST! FORYOR NENI* *' WE' *CIN9 HUAN, ELCAEAENA MDIAR INLUIN COIE NDUNVESA).N Call 1-800-683-EYES or visit optimart.com for a store near you - ------* Inverness 2623 E. Gulf to Lake Hwy. I / 352-637-5180 Crystal River 1661 US Hwy 19 S. (Kash & Karry Shopping Center) 352-563-1666 A DON'T FORGET "'VGFT CERTIFICATES! THE PATENT AND OTHER PERSONS RESPONSIBLE FOR PAYMENT RASARIGHT TO REFUSE PAY CANCEL OR BE REIMBURSED FOR PAYMENT FOR ANY OTHER SERVICE EXA.!NATICO CR TREATMENT. WHICH IS PERFORMEDASA RESULT OF AN WITHIN 72 HOURS OF RESPONDING TO THE ADVERTISEMENT FOR THE FREE DISCOUNTED FEE OR REDUCED FEE SERVICE. EXAMINATION OR TREATMENT OFFER EXPIRES 12M2445 NOT VALID VsTH PRIOCRPURCHASES PRICES ILLUSTRATIVE OF TWO COMPLETE PAIR OF GLASSES WITH STANDARD CLEAR LENSES MID OURBRONZE COLLECTION FRAMES LIMT ONE DONATION PER CUSTOMER lAY NOT BE COMBINED WITH ANY OTHER OFFER OR INSURANCE L,:LSS OTHiERWISE NOTED POWER OVER STANDARDAND PRISMADDITONAL. Joseph nett RICAN ICER IETY e'* I I , HfmEMM'sGPfT A ^i~~~r~ijT"i * We are a Medicare approved dealer for power wheelchairs and scooters. SWe offer Medicare repairs by our CERTIFIED TECH on staff. *We are your LOCAL full service mobility dealer. Quality Mobility, Inc. 352-564-1414 599 S.E. Suncoast Blvd. Behind Dillon's Inn 4C TUESDAY, DECEMBER 20, 2005 HEALTH CITRUS cOUNTY (FL) CHRONICLE C sCOUNT (FL) CHRONICLED D.C.MR. 2 f the Govt ss rae r io .- so.i handover of sets of money now f 4 6 - 4 - * * * * - * - anb.- u40- - -W- - M- .--4w Available fro :opyrighted Material Syndicated Content S. - m Commercial News Providers" e- * -^ f -B _____ .^ - -^ .- - *. *W o - - 'Wa qmw 8- . Mom -60- qrp 4L goo CITRUS COUNTY (FL) CHRONICLE TUESDAY DRCHMBER 20 C * afa to e rt a n- GC TUESDAY~~~~~~~~~~~~~~ DEEBR2.20 NETI M N IRSCUT F)CIoI l" 19 News 117 NBC News Ent. Tonight Access Deal or No Deal (N) (In My Name Is The Office Law & Order: Special News Tonight Sw 19 19 19 Hollywood Stereo) '14' cc 4049 Earl '14' '14' 68643 Victims Unit'14, L,S,V' 1104204 Show PWEI) BBC World Business The NewsHour With Jim Nova "Spies That Fly" Innovation "High-Tech Frontline (In Stereo) S Independent Lens (N) (In PBS 3 3 News 'G' Rpt. Lehrer cl 2827 'PG' c (DVS) 1575 War" (In Stereo) 'PG' 1198 Stereo) 'G' [i 29391 WUFT1 BBC News Business The NewsHour With Jim Nova "Spies That Fly" Warship: At War 'PG' Frontline (In Stereo) E Being Tavis Smiley PBS 5 5 6681 Rpt. Lehrer (N) 66223 'PG' c (DVS) 42643 62407 65594" Served 21285 WIOFLA 8 News 9391 NBC News Ent. Tonight Extra (N) Deal or No Deal (N) (In My Name Is The Office Law & Order: Special News Tonight NBC 8 8 8 8 'PG' c Stereo)'14' 9 68681 Earl'14' '14' 13117 Victims Unit '14, LS,V' 7206372 Show WFV News 9] ABC WId Jeopardy! Wheel of According to Rodney (N) ABC News Presents a Barbara Walters Special: News Nightline ABC 20 20 20 20 3759 News G'G 2914 Fortune (N) Jim'P, 'PG, L' 9 Heaven, Where Is It? How Do We Get There? 5484876 94517372 WTSP) 101 1 News 4001 CBS Wheel of Jeopardy! NCIS "KillAri"'14, L,S,V' NCIS "Kill Ari"'14, L,S,V' 48 Hours Mystery The News Late Show CBS 110 10 10 10 Evening Fortune (N) 'G' c 4865 c9 19339 9 99575 birth of Jesus. 92662 5285136 IWTVT 13 News 9 77914 Geraldo at The Bernie Bones "The Man in the House Dr. House treats a News [] 30846 News The Bernie FOX 13 13 Large 'PG' Mac Show Bear"'14, L' [ 40223 nun. '14, L,S' 9 37759 9502488 Mac Show WCJBI -- News 87759 ABC WId Ent. Tonight Inside According to Rodney (N) ABC News Presents a Barbara Walters Special: News Nightline ABC11 1 News Edition Jim 'PG, PG, L Heaven, Where Is It? How Do We Get There? 7111556 48472594 WC 2 Richard and Lindsay Kenneth Fresh Rejoice in the Lord 'G' Life Today Bay Focus The 700 Club (N) 9 Phil Driscoll Dr. IND E 2 2 2 2 Roberts 'G' 8946204 Hagin Jr. Manna 1163488 'G'5891681 8958049 1186339 Co Lindstrom IWFI News 52001 ABC WId Inside The Insider According to Rodney (N) ABC News Presents a Barbara Walters Special: News Nightline ABC 11 11 News Edition 72865 Jim'PG, 'PG, L' Heaven, Where Is It? How Do We Get There? 3238556 83102827 WMOR Will & Grace Just Shoot Will & Grace Access Movie: ** "Messenger of Death" (1988) Charles Fear Factor (In Stereo) Access Cheaters IND 12 12 12 12 'P S' Me '14' 'PG' Hollywood Bronson, Trish Van Devere. 9 60681 'PG' 9 56488 Hollywood 'PG' 13469 WTTA Seinfeld 'G' Every- Every- Sex and the Gilmore Girls (In Stereo) Supernatural "Bloody News Yes, Dear Seinfeld Sex and the IND 6 6 6 6 8808407 Raymond Raymond City'14, 'PG, L' c 9552914 Mary" '14, V' 9572778 9211961 'PG, D' 'PG' City '14, IWTI The Malcolm in The Friends'14' Hates Chris All of Us America's Next Top The King of The King of South Park South Park IND 4 4 4 4 Simpsons -the Middle Simpsons c 4643 'P L' c9 Model 9 28001 Queens Queens'G' '14' 90730 '14'95469 SANN News Marketplace County Full Throttle 663440 Playing it Patchworks Fresh Hope Janet Parshall's America! Circuit Court ANN News FAM 1 16 16 16 16 47597 Live Court Smart1 51 8 63778 __20759 IWOGX Friends'14' Friends 'PG' King of the The Bones "The Man in the House Dr. House treats a News (In Stereo) 9 Geraldo at Home FOX 1 13 13 c 8827 c 2407 Hill 'PG L' Simpsons Bear" '14, L' 98765 nun. '14, L,S' 9 86001 96488 Large (N) Improvemen IWA X Variety 8049 The 700 Club 'PG' c9 Bishop T.D. The Power Manna-Fest This Is Your Rod Trusty Praise the Lord cc 48339 IND 21 21 21 884285 Jakes of Praise 'G'2759 Day'G' 15575 UNI 1515 3827 Univisi6n valientes. 584575 593223 Edici6n Especial 852488 Univision (WxP) Shop'Til On the Pyramid 'G' Family Feud Sue Thomas: F.B.Eye Early Edition "Blackout" Doc "Price of a Miracle" Time Life Paid PAX 17 You Dro Cover 'G' 84198 'PG' "Missin" 86681 'PG' 5 73117 'PG' c 76204 Music Program (A T) 54 544 4 City Conidential '.PG' M Americanstice Cod ase es Bouty Bounty county county crossing oran 1__ o 769778 418407 Hunter Hunter Hunter Hunter "Strangled"'14'173515 A 55 64 55 55 Movie: ** "Beaches" (1988, Drama) Bette Movie: *** "Holiday inn"(1942) Bing Crosby, Movie: *** "A Christmas Carol" (1951) Alastair Midler, Barbara Hershey. c[ 725932 Fred Astaire: c[ 9671372 Sim, Kathleen Harrison. 89507865 ANI 52 35 52 52 The Crocodile Hunter The Most Extreme 'G' c] Into the Lion's Den Zoologist Dave Salmoni lives Animals Behaving Badly Into the Lion's Den 'G' SDiaries 'G' 9 8948662 1156198 among lions for three months. 'G' 1169662 'G' 9] 1155469 8174204 AV 77 The West Wing "Noel" 2005 Radio Music Awards (In Stereo) c 891989 Party Party "Kid's Queer Eye for the Project Runway "All __ 'P' c9 776594 Birthdays" (N) 313049 Straight Guy '14' 316136 Dolled Up"'14'996353 (I 27 61 -27 27 Movie: *** "My Com.- Reno911! Daily Show Colbert Chappelle's South Park The Showbiz Show With Daily Show Colbert I 2 2 Cousin Vinnv" 283488 Presents '14' 11339 Report 'MA, L David Spade '14' Report ( T 98 45 98 98 CMT Music 318488 Dukes of Hazzard "The CMT Greatest Men of CMT Greatest Women of In the Moment "Carrie Dukes of Hazzard 'G' Runaway" 'G' 62049 200548469 200551933 Underwood" 54020 51117 WT 96 65 96 96 orthLiving Footstep- Daily Mass: Our Lady of Mother Angelica Live Myst. of the TheHoly The Savior 7061865 Stories of I Christ the Angels 'G' 8754575 Classic Episodes Rosary Rosary Hymns 'G' F 29 52 29 29 7th Heaven "My Kinda A Very Barry Christmas Movie: * "Eloise at Christmastime" (2003, Whose Whose The 700 Club 'PG' c Guy" 'G' c 927730 'PG' [] 575391 Comedy) Julie Andrews. 'G' c 562827 Line? Line? 287759 (F 30 60 30 K30 ing of the King of the That'70s That'70s Movie: ** "Anger Management" (2003, Nip/Tuck "Chdrry Peck" Nip/Tuck "Quentin Costa" 0 6 3 3 Hill 'PG' [] Hill'PG' c9 Show'PG, Show'14, Comedy Adam Sandier, Marisa Tomei. 8741001 (N)'MA, L,S,V' 8760136 (N)'MA' 5226925 (HT 23 57 23 23 Weekend Landscaper Curb Appeal House Designed to Design Decorating Mission: Designers' Small Space Design on a Designer S warriors s 'G' Hunters Sell Remix Cents (N) Orgnz Challenge Dime 'G' Finals (f 51,T 25 51 51 Heavy Metal "A-10 Modem Marvels 'G' c Modern Marvels 'PG' [ Modern Marvels (N) 'PG' Modern Marvels "Sugar" Modern Marvels 'PG' c T1ankbuster"'G' 2116858 8769407 8745827 9 8758391 'PG' c9 8768778 7026907 S 24 38 24 24 Golden Girls Golden Girls Movie: "Stolen Miracle" (2001, Drama) Leslie Movie:. ** "Miracle on the 17th Green" (1999, Will & Grace Will & Grace Hope, Hugh Thompson. 'PG, L,V' 294049 Drama) Robert Urich. 91 567372 '14' '14' C 28 36 28 28 All Grown Danny Fairly Jimmy SpongeBob Jimmy Full House Fatherhood Roseanne Roseanne Roseanne The Cosby Up 'Y' Phantom Oddparents Neutron Neutron 'G'778391 'G' 'PG' 672876 'PG'377484 'PG' 780136 Show 'PG' ( ) 31 59 31 31 Stargate SG-1 (In Stereo) Movie: ** "Dragonfly" (2002, Suspense) Kevin Movie: ** "Fairy Tale: A True Story" (1997, "Xtro II: The Second 1 59 31 3 'PQ V' 9 9331827 Costner, Joe Morton. B 8000049 Drama) Florence Hoath. 5615759 Encounter"2965440 E 37 43 37 37 World's Wildest Police CSI: Crime Scene CSI: Crime Scene Movie: ** "Uncle Buck" (1989) John Candy. An easygoing MXC 'PG' Videos 'PG' ] 125846 Investigation'PG, D' Investigation'14, LV' relative takes care of three children. 246204 738469 [ 49 23 49 49 Seinfeld Seinfeld Every- Every- Friends 'PG'Friends 'PG' Sex and the Sex and the Daisy- Movie: *X "A Night at the Roxbury" 'PG' 670285 PG 694865 Raymond Raymond 955488 967223 City'14, City'14, America (1998) 2257285 (TCI 53 Movie: * "The White Cliffs of Dover" (1944, Movie: ** "Father of the Bride" (1950, Movie: * "Yours, Mine and Ours" (1968) Drama) Irene Dunne. 9 4718001 Comedy) Spencer Tracy. ] (DVS) 9565488 Lucille Ball, Henry Fonda. 5179049 (Ti) 334 53 53 Cash Cab Cash Cab MythBusters Curing sea- Mega Machines "Task Dirty Jobs "Dirtiest Water MythBusters 'PG' c9 1 Shouldn't Be Alive 'PG' 5(aN) 'G' G' 146643 sickness. 'PG' 407391 Masters" 'PG' 423339 Jobs" '14, L' 9 403575 406662 9 773399 (TC) 50 46 50 50 Martha Susan Lucci. (N) Rides Graphic artist. 'G' Overhaulin' Best of 2005 Adam Carolla Project (N) Adam Carolla Project (N) Adam Carolla Project'14, 'G' c9 110914 ] 881865 (N) 'PG' 867285 '14, DL' 887049 '14, D,L' 880136 D,L' 489681 4TIT) 48 133 48 48 Charmed "Wrestling With Law & Order "The Fire Law & Order "Tombstone" Law & Order: Trial by Law & Order "C.O.D." '14' Cold Case "Glued" (In SDemons" 'P, L,V' 118556 This Time" '14' 889407 '14' 9 865827 Jury'14' [c 878391 [] (DVS) 888778 Stereo) 'P L,V' TRAV 9 54 9 9Food Crazy'G' 9 Taste of America With Taste of Taste of Made in Made in National Parks "Great Taste of Taste of I5523681 Mark DeCarlo'PG' America America America America Train Rides"'G'8620154 America America ( 32 75 32 32 Night Court Night Court Night Court Night Court Little House on the Andy Griffith Sanford and Good Times Good Times Happening! Cheers 'PG' S 'PG' 'PG 'PG' 'PG' Prairie 'G' 1150914. Son 'PG' 'PG' 'PG 2827556 S 3 47 Movie: *** "Red Law & Order: Special Law & Order: Criminal Law & Order: Criminal Law & Order: Criminal Law & Order: Criminal S47 2 Dragon" (2002) 177020 Victims Unit '14' 171597 Intent "Poison" '14' Intent'14' 9 276961 Intent'14' 9 521038 Intent'14' c 658223 1WG 18 1818 18 Home Home America's Funniest Home Da Vinci's Inquest "This Da Vinci's Inquest "An Act WGN News at Nine (In Sex and the Becker 'PG, mprovemen Improvemen Videos 'PG' 304391 ... Is Evil" 'PG' 320339 of God"'PG' 300575 Stereo) [9 303662 City 14, L 376643 i 46 40 46 46 Sister, Sister Phil of the Thas So Thats So Movie: "The Ultimate Christmas Lizzie American Sister, Sister That'sSo That's So 'G' 194353 Future'G' Raven'Y7' Raven'G' Present"(2000) 'G' 2252681 McGuire'G' Drgn 'G'295876 Raven 'Y7 Raven'G' HALL 68 M*A*S*H M*A*S*H Walker, Texas Ranger Walker, Texas Ranger Movie:"Twice Upon a Christmas" (2001, Fantasy) M*A*S*H M*A*S*H 'PG' 1412488 'PG' 1496440 "Royal Heist"'14, V "ar Cry" 'PG' 1158556 Kathy Ireland, John Dye. .G' [ 1151643 'PG' 5898594 'PG' 2825198 OMovie: *k "Father of the Bride Part Il" (1995, Movie: *** Troy" (2004, Action) Brad Pitt. Achilles leads Greek KingKong: Dare to Dream: U.S. Comedy) Steve Martin. 9 853556 forces in the Trojan War. c 86766594 First Look Women's Soccer Team AX Movie: ** "Elekta" Movie: ***i "The English Patient" (1996, Drama) Ralph Fiennes. Flashbacks Movie: *** "Assault on Precinct 13" (2005, _I_1_ _1__(2005) 9635440 reveal a plane-crash survivors tragic tale. c9 96676285 Action) Ethan Hawke. c 6101372 S 97 66 97 97 Rumor Has R. Wrld Direct Effect (In Stereo) Laguna Laguna Laguna Laguna Laguna Laguna True Life "I'm Jealous" (In t Chal. 'PG' 573933 Beach Beach Beach Beach Beach Beach Stereo) 278001 S 71 Megastructures North Sea Expeditions to the Edge Megastructures "Super Seconds From Disaster Megastructures (N)'G' Megastructures"Super Wall.'G'3797223 'G'7268594 Port"'G'7244914 'PG'7264778 7267865 Por"' 'G'1938310 62 Movie:oral Toral Movie: ** "Ice Castles" (1979) Lynn-Holly Johnson, Movie: ***'t "Awakenings" (1990, Drama) Robin Movie: **' "Convicted" SToral" (1970) 69230846 Robby Benson. 9 95691579 Williams. 9 99637681 'PG' 19958575 ( Bi) 43 42 43 43 Mad Money 9361469 On the Money 6292049 The Apprentice (In Stereo) Mad Money 6281933 The Big dea With Donny TheApprentce (n Stereo) 'PG' cc6278469 ________ Deutsch 'PG' 3479204 ( 40 29 40 40 ou Dobbs Tonight cc The Situation Room Paula Zahn Now 9 Larry King Live 9 571533 Anderson Cooper 360 ] 329049 394488 476169 476989 (CiRT) 25 55 25 25 NYPD Blue "I Don't Cops'PQ L' Cops'14, Cops'PG, Cops'P' CopsCop V Cops'P, Psychic Pschic Masterminds Masterminds Wanna Dye"'MA' 9389865 3843372 D,L,V L,V 3852020 3848827 8224020 L,V 9384310 Detectives Deectives (N)'PG' 'PG' CSPA 39 50 39 39 House of Representatives 7580117 Tonight From Washington 774440 Capital News Today 798020 (FNi 44 37 44 44 Special Report (Live) 9 The Fox Report With The O'Reilly Factor (Live) Hannity & Colmes (Live) On the Record With Greta The O'Reilly Factor 9359223 Shepard Smith 9] ] 5690440 9 5610204 Van Susteren 8084001 NBC 42 41 42 42 The Abrams Report Hardball 9 5627594 Countdown With Keith Rita Cosby Live & Direct Scarborough Country The Situation With Tucker 9339469 Olbermann 5603914 5623778 5626865 Carison (EP] 33 27 33 33 SportsCenter(Live) Sonic Bowl Mania Insider College Football New Orleans Bowl -Arkansas State vs. Southern Mississippi. From Lafayette, SportsCente 112846 3c 876407 La. (Live) c9 697662 r ESPN) 34 28 34 34 ESPN Quite Frankly With NFL Films Our Greatest Hopes, Our NBA Coast-to-Coast (Live) c9 4897049 Madden Madden Madden Hollywood Stephen A. Smith 9203223 Presents Worst Fears Nation Nation Nation S F L 35 39 35 Totally The Sports College Basketball Stetson at Florida State. (Live) Best Damn Sports Show Totally Best Damn Sports Show Best-Sports Football List 649001 Period 953681 Football Period 131952 I i 36 11 FSU Seminole Sports NHL Hockey Tampa BayLightning at Carolina Ice Time Inside the Esiason Summer X Corps Planet X 'G' S3 __ Spectacular 28204 Hurricanes. (Subect to Blackout) Live) 1389440 Extra Lightning Golf 50778 318. ==.dip^^ MA.M m= ^. ^ Local R __o _____ WJUF-FM 90.1 WHGN-FM 91.9 WXCV-FM 95.3 WXOF-FM 96.3 National Public Radio Religious Adult Contemporary Adult Mix S I . WRGO-FM 102.7 WIFL-FM 104.3 WGUL-FM 106.3 WRZN-AM 720 Oldies Adult Mix Oldies Adult Standards . 1 *up 4 0 0 * - AD I 4 I g o low- 'Available from Commercial News Providers" A I IJ - ~ p "Copyrighted Materi Syndicated Conten ial it - 6C TUESDAY. DECEMBER 20, 2005 CITRus COUNTY (FL) CHRONICLE , ENTERTAINMENT 4M -o I qw ft I)w CITRUS COUNTY (FL) CHRONICLE * r'I,' COMIC S TuEsFnAv )pcICPMBRn 20 2,0n 7C 6 - I.-- P r'~ k$q'qf 'PA' S 9 . 0 \,- 9^^ wZ )i~i 4f ayt - '1 - --- -I --I S - .- - 0A --1 up a -4 ft .df Pio I 4 1 - 0 5 0 Ii;" . 4 O 40~ v O sd a 41 f - * * a "Copyrighted Material1 Syndicated Content_ q dop air Available from Commercial News Provid o1 <- t jf *1 r p 19 * 49 * qw"- LI. qo S 4 b I ,a1 I 'j -0-Dad-wo 1L. c; a',-U':II 0P ,~ .4.0 w -%-tr tA. 4 b-~ a awe, U -v. -- Today HOROSCOPE. I I f p Times subject to change; call ahead. Your Birthday: The conditions that affect your work and those that have an influence on your social life will be improving considerably for you in the year ahead. Much of the reason will be due to your cheerful spirit. Sagittarius (Nov. 23-Dec. 21) People you deal with today will realize that your interest in them is deep and sincere, and because of this you'll make a bigger hit with them than those whose duty it is to please you. Capricorn (Dec. 22-Jan. 19) It's a good day to decorate your surroundings or do some gift-wrapping. You could beautify anything you touch today. Aquarius (Jan. 20-Feb. 19) When it comes to important matters, don't waste your time trying to go through intermediaries who really haven't the authority to help you. Go straight to the top. Pisces (Feb. 20-March 20) If you put yourself out a bit today and be more solicitous of those who are working on your behalf, your kindness will inspire them to do a better job for you. Aries (March 21-April 19) Although you may have had a few rough knocks to contend with lately, your ability to treat life philosophically rather than emo- tionally will move you right past any barriers today. Taurus (April 20-May 20) You are much more in touch today with the issues concerning your family than anyone might realize. Gemini (May 21-June 20) Nothing pleases you more than getting involved in group activities with ami- cable friends, and today could be just such a time for you. Cancer (June 21-July 22) Respond willingly today if people ask you to do a little something extra for them. Even though the rewards may not be immediate, what you gain down the line will be vast. Leo (July 23-Aug. 22) The holiday spirit could be in full swing today, so if you have some business to conduct, it might prove wise to plan your meeting in pleasurable surroundings where giving is in the air. Virgo (Aug. 23-Sept. 22) Nothing will give you more pleasure today than doing things that would make those you love happy and secure. Libra (Sept. 23-Oct. 23) Bright rays of sunshine will begin to pierce your life today, which previously might have looked a bit bleak. Scorpio (Oct. 24-Nov. 22) Some kind of material reward could be in the offing for you today. It might be a raise or bonus for a job well done or simply the bread- and-butter variety for good services rendered. * * -:_ e 1 S * -^ .,, o I3 'U *dh1 & Today's MOVIES o o -F aP - 40 -, o0 , Today's HOROSCOPE J- r~3GWRO 8C TUESDAY, DECEMBER 20, 2005 |C CITRUS COUNTY C T U32 M F. 0- U. pm Thursday Saturday Issue................. 1 pm Friday 6 Lines for 10 Days! 2 items totaling 1 150................. 550 $151 -$400..............1050 $401 800...............1550 $801 $1,500..........$2050 Restrictions opply.rAECJIA NOTICESn002-06 EPW~ANTEDI 105-JU 160 FINANCT~IA ~iL 8019~1 [SERV eICES 201-26 AIMALS 40-415 MOILEHME O RN R AE504 11RAL SATEFRRN 5560RAL SATEFOALE70-70 VACANT:ROPRT 81-89TANSORATIO*94-95 "Copyrighted Material Syndicated Content Available from Commercial News Providers" OW .NNW m.. q WORKING MAN, 50 yrs old, Black, looking for companion Race unimportant. Beverly Hills 1-310-989-1473 CARING, ATTRACTIVE, loyal Christian lady with sense of humor & family values. Seeking a hon- est gentleman friend 57+ Reply Blind Box 906-P c/o Citrus County Chronicle, 106 W. Main St., Inverness, FL 34450 ** FREE SERVICE** Cars/Trucks/Metal Removed FREE. No title OK 352-476-4392 Andy Tax Deductible Receipt I Roster, 5 Hens, Electric, Golf Cart, needs work. (352) 341-6295 2 Dogs, free to good home, 1 -3 yr. old F. 1 8 mo. old M, brother & sister (352) 628-5704 COMMUNITY SERVICE The Path Shelter is available for people who need to serve their community service. (352) 527-6500 or (352) 746-9084 Leave Message FREE GROUP COUNSELING Depression/ Anxiety (352) 637-3196 or 628-3831 I CAT ADOPTIONS SpMd P op i HlHing A.n-ia FREE CATS TO GOOD HOME Female 6 toe and Male fluffy, both fixed. Separate or together, call 697-0125 2 yr. old neutered black lab. Current on vaccines & heartguard. (352) 344-2324 FREE REMOVAL OF Mowers, motorcycles, Cars. ATV's. jet ski's, 3 wheelers, 628-2084 KITTENS PURRFECT PETS spayed, neutered, ready for permanent loving homes. Available at Eileen's Foster Care (352) 341-4125 rescued ae.com Requested donations are tax deductible SPECIALS KEYWEST Jumbo Shrimp 13-15ct. $5b; 16-20ct $4.501lb. 352-795-4770 LOST BLACK LAB 3 yr. old, male, answers to "Duke" Marvin St., Floral City area Reward (352) 344-0953 LOST Shelly, BIk. & Wht. (Sm. Collie) in Equestri- an Area of Pineridge answers to name of Tara, large reward (352) 586-8589, Cell (352) 746-0024 FOUND FEMALE SIAMESE front claws are out Floral City area (352) 726-5715 EJ--I Divorces Bankruptcy I *Name Change Chikj Support. I *Wills sl Invemess 637-40221 IH0mosfASla...795.59 j *CHRONICLE. INV. OFFICE 106 W. MAIN ST. courthouse Sq. next to Angelo's Pizzeria Mon-Fri 8:30a-5p Closed for Lunch CITRUS REAL ESTATE I I SCHOOL, INC. I S(352)795-006 IN WHMP1J Tutoring Avail. Exp. Retired Educator. Current FL Teacher Certif. Inv.201-0792 "MR CITRUSCOUNTf' ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 ATTRACTIVE SWF seeking male companion. Candi, 352-628-1036 HOLIDAY SPECIAL S KEYWEST Jumbo Shrimop 13-15ct. $51b;16-20ct $4.50lb. RECEPTIONIST Immediate opportuni- ty for a part-time receptionist at busy and growing auto dealership. Great working conditions. Hours are 8-6 Sat., 11-3 Sunday. Apply in person Monday through Friday, 8 -5 p.m., ask for Penny. I I 11 'A 1275 S. Suncoast Blvdl (US 19) Homosassa eoe/dfwp COSMETOLOGIST & NAIL TECH Full & Part time. (352) 628-5200 M- SCNA'S F/T 3-11 Shift differential. Bonuses abundant Highest paid in Citrus County. Join our team, Cypress Cove Care Center (352) 795-8832 COOK Avante at Inverness, a skilled nursing facility is accepting applications for a fulltime Cook. Previous experience is preferred. Excellent wages and benefits. Please apply at: 304 S. Citrus Ave., Inverness or 352-637-0333 or mail to tcypret@avant group.com I Cst Inverness, faciiesume at (352) 795-5044 DENTAL FRONT DESK prDunellon. Excellent pay & benefit package. Fax Resumes to: (352) 489-8462 Experienced! RN Supervisor Weekends 0 FT Evening Nurse PT Nights Nurse Competitive Health/ Dental Benefits COME JOIN OUR TEAM Contact Connie or apply at I 136 NE 12th Ave. (352) 795-5044 Fax (352) 795-5848 DFWP EOE EARN AS YOU LEARN CNA Test Prep/CPR Continuing Education 341-2311/Cell 422-3656 Housekeeping /Laundry Supervisor FT In long term care facility. Management experience helpful. Apply in person at: SURREY PLACE OF LECANTO 2730 W. Marc Knighton Court, Life Centers of America Maintenance Assistant FT Experienced LTC facility needs an experienced Assistant for the Plant Maintenance Department. Visit us at: 3325 W. Jerwayne Lane, Lecanto FL 34461. EOEDFWP MEDICAL ASSIST. Full time position for front/back office for new FP/sports med office by CMH. Fax resume. 352-726-2808 RN's/LPN's NEW VISIT RATES BEST RATES IN TOWN Looking for extra $ for The Holidays? A+ Healthcare Home Health (352) 564-2700 -A- Cypress Creek Juvenile Offender Correctional Center, a residential program maximum risk males committed to the Dept of Juvenile SMilitary. C^ Your world first Need a job or a qualified employee? This area's #1 employment source! Cila rileds ADMINISTRATIVE ASSISTANT PT For busy office. Fax resume to 352-527-0754 r REAL ESTATE CAREER I Sales Lic. Class | S$249.Start 1/10/06 | CITRUS REAL ESTATE I ALL POSITIONS Apply 9;30am-11am La Luna Italian Rest. 859 U.S. Hwy. 41-S, Inverness .,, ALL POSITIONS New restaurant in Homosassa next to Kash & Karry opening soon. Apply in person Noon 5 p.m APPLEBEE'S Crystal River & Inverness now hiring ALL POSITIONS Apply in person, Between 2-4 NO CALLS PLEASE. BAKERY HELP & PKG & DELIVERY EARLY MORNINGS Apply Monday Friday before 10am at 211 N. Pine Ave.., Inv COOKS NEEDED Scampi's Restaurant (352) 564-2030 Sous Chef & Receptionist Exp. req. Vandervalk Restaurant 352-400-2138 $$$ SELL AVON $$$ FREE gift. Earn up to 50% Your own hrs, be your own boss. Call Jackie I/S/R 1-866-405-AVON REAL ESTATE CAREER | Sales Lic. Class I S$249.Start 1/10/06 I CITRUS REAL ESTATE I SCHOOL, INC. (352)795-0060 ----- J SALES Exp, outside sales, or Insurance Sales for the the right person salary + commissions 6 mos. training $100.k + potential first year call Jill, and Fax resume to: 352-795-9688 For interview SALES AGENTS Wanted. High energy outgoing real estate sales professionals for fast paced NEW CONSTRUCTION CONDO sales in Crystal River. Week- end work required. Please fax resumes to 813.920.3604 aftn: Destiny.. com $$$$$$$$$$$$$$$ 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 houis RTIU M-K 10 [! I- I. Boys ..-d g, .. o r "-16 -old Dec.12r, 17. 27 and Jan. 4.n7 Prk C, l H ,r Bi--nro-nnial Park Cr, si.ial Ri.,r [ Nature oast Bse CIASSIFIEDS CITRUS COUNTY (FL) CHRONICLE TUESDAY. DECEMBER 20. 2005 9C :AC INSTALLERS *SERVICE TECHS *HELPERS FREE Health Ins. 401K., Company truck & 2 weeks paid vacation. Family Owned & Operated. $TOP PAYS$ SENICA AIR CONDITIONING INC 1803 SE US HWY 19 , Crystal River 34429 L (352) 795-9685 16i m ALUMINUM INSTALLERS/ GUTTERS MUST HAVE CLEAN DRIVER'S LICENSE Call:(352) 563-2977 Your World 1of Na a e 4aeGJ '.,- Auto Body Technician, Exp. Must have own tools. Combination person, Salary& benefits ALL PRESTIGE AUTO 352- 795-7000 AUTO MECHANIC/ TECHNICIAN Mon-Fri. Southside Automotive (352)489-5341 Your l.-world -irs ff.,, O,. . FRAMERS Local-Steady 352-302-3362 CERAMIC TILE INSTALLERS Experience Required. Steady work, new construction, Apply in person to The Floor Shoppe, 4070 County Road 124A, Wildwood Ask for Mike or call 352-748-4811 and make an appointment AN EXP. FRAMER & LABORERS NEEDED (352) 637-3496 AUTOMOTIVE DETAILER Drug Free Workplace (352) 726-9799 CHET'S SEPTIC CDL PUMP TRUCK DRIVER Apply at: 1101 Middle School Rd., Inverness Between 7:30am - 4:00 pm(352)637-1411 I YourScallne Pay depending on exp. (352) 422-2708 EXPERIENCED FOREMAN For Manufactured Home set up crew. Acme Homes II Inc Benefits, bonuses and overtime. interview. (352) 726-9475 EXP. PLASTERERS & LABORERS (352) 563-0580ville Has the Following Openings EXP. MICA CABINET LAYOUT & ESTIMATOR KITCHEN CABINET SERVICE TECH Mica & wood exp. MICA LAMINATOR Billing exp. required. If qualified please call (352) 793-8555ER & HELPER For Inverness Area. (352) 418-2014 FRAMERS, LABORERS & SHEETERS WANTED Most tools supplied. Call Butch 352-398-5916 Housekeeping /Laundry Supervisor FT In long term care facility. Management experience helpful. Apply in person at: SURREY PLACE OF LECANTO 2730 W. Marc Knighton Court, GM SERVICE TECH NEEDED DUE TO INCREASED BUSINESS Good pay & benefits. Apply at Johnson's Pontiac Inc. 3029 S Suncoast Blvd. Homosassa, Fl. (352) 628-3533 Lathers Excellent company. Must have transporta- tion. (352) 690-7268 MECHANIC For Tractor Trailer Shop in Wildwood. Experience w/TK & carrier reefers units helpful. Evening shift Mon.- Fri. Ask for Paul or Jim. (352) 748-5500 S "Copyrighted Material . Syndicated Content Available from Commercial News Providers" j:" '_ U mop a mo .o* m o g A TREE SURGEON ULic.&lns. Exp'd friendly serve. Lowest rates Free estimates,352-860-1452 & TREE SERVICE 352-697-1421 V/MC/D AFFORDABLE, I DEPENDABLE, I A HAULING CLEANUP, n &.OL PROMPT SERVICE I : Trashre, Trees, Brush, S352-6 697-121126 _1 AFORBLETU E Sguarranteed l 344-1102 ', DAVID'S ECONOMY TREE SERVICE, Removal, S& trim. Ins. AC 24006. S352-637-0681 220-8621 S DOUBLE J STUMP GRINDING, Mowing, Hauling,Cleanup, Mulch, Dirt. 302-8852 Your World C-.-RpN"CLE Clasrifieds ^ajc<;t~ilnll he xom' R Removed. I FREE ESTIMATES. Licensed & Insured. 1 (352)458-1014 R WRIGHT TREE SERVICE, tree removal, stump grind, trim; lns.& Lic #0256879 352-341-6827 STUMP GRINDING Lic. & Ins. Free Est. Billy (BJ) McLaughlin 352-212-6067 STUMPS FOR LE$$ "Quote/sp cheap you won't'believe it!" (352) 476-9730 COMPUTER TECH MEDIC ON SITE REPAIRS Software & Hardware issues resolved. Internet Specialists (352) 628-6688 Cooler S352-464-3967 Unique Effects-Painting, In Bus. since 2000, Interior/Exterior 17210224487 One Call .To Coat It CUSTOM UPHOLSTERY Modern & antique. Denny, 628-5595 or 464-2738 -iln VChris Satchell Painting & Wallcovering.AII 1326872 Screen rms,Carports, vinyl & acrylic windows, roof overs & gutters Lic#2708 (352) 628-0562 #1 IN HOME REPAIRS, paint, press.wash, clean roof&gutters, clean up, haul #0169757 344-4409 A HIGHER POWER Ceiling fans, Lights, etc. Lic. #999900022251 422-4308/344-1466 S AFFORDABLE, S DEPENDABLE HAULING CLEANUP. PROMPT SERVICE I I Trash, Trees, Brush, Appl. Furn, Const, I I Debris & Garages | 352-697-1126 Andrew Joehl Handyman. General Maintenance/Repairs Pressure & cleaning. Lawns, gutters. No job too small Reliable. Ins 0256271 352-465-9201 Movlng,Cleanouts, & Handyman Service Lic. 99990000665 (352) 302-2902 GOT STUFF? You Call We Haul CONSIDER IT DONEI MovlngClean-708 CITRUS ELECTRIC All electrical work. Lic & ins ER13013233 352-527-7414/220-8171 All of Citrus Hauling/ Moving items delivered, clean ups.Everything from A to Z 628-6790 S AFFORDABLE, I DEPENDABLE, I HAULING CLEANUP, I PROMPT SERVICE I i Trash, Trees, Brush, l Appl. Furn, Const, * i Debris & Garages i *t Repair Vinyl Tile * Wood (352) 341-0909 SHOP AT HOME! Richard Nabbefeld Flooring Installer. LLC Lic./Ins. L05000028013 (352)361-1863 Installations by . Brian CC2303 We're oly4 i(t# 4 ouv imaglnatin *-' 352-628-7519 " Siding, Soffit & Fascia, Skirting, Roofovers, Carports, Screen Roomns,POOLBOY SERVICES I Total Pool Care I SAcrylic Decking e 352-464-3967 RIP RAP SEAWALLS & CONCRETE WORK Lic#2699 & Insured. (352)795-7085/302-0206 A AFFORDABLE, DEPENDABLE, HAULING CLEANUP, PROMPT SERVICE I I Trash, Trees, Brush, I Apple. Furn, Const, Debris & Garages | 352-697-1126 DUKE & DUKE, INC. Remodeling additions Lic. # CGC058923 Insured. 341-2675 CERAMIC TILE INSTALLER Bathroom remodeling, handicap bathrooms. Lic/Ins. #2441 795-7241 CUTTING EDGE Ceramic Tile. Lc. #2713, Insured. Free Estimates. (35\ A'22Jono1O/Debrls removal Lic.#3081, 464-2701/563-1049 D&C TRUCK & TRACTOR SERVICE, INC. Landclearing, Hauliog & Grading. Fill Dirt, Rock, Top Soil & Mulch. Lic. Ins.(352)302-7096 HAULING All Aspects, Fill Dirt, Rock, Mulch, etc. Lic. Ins. (352) 341-0747 AFFORDABLE, DEPENDABLE, HAULING CLEANUP, PROMPT SERVICE I Trash, Trees, Brush, | D's Landscape & Expert Tree Svce Personalized design. Cleanups & Bobcat work. Fill/rock & Sod: 352-563-0272 PRO-SCAPES Complete lawn service. Spend time with your Family, not your lawn. Lic./Ins. (352) 613-0528 S AFFORDABLE, DEPENDABLE, HAULING CLEANUP, PROMPT SERVICE I Trash, Trees, Brush, Appl. Furn, Const, | Debris & Garages | 352-697-1126 L m m -lm SPO BOY SERVICES I Total Pool Care I Acrylic Decking 352-464-3967 L mm im mJ . Lic. Anytime, 344-2556, Richard + YUCKY WATER?+ We Will Fix III 90 yrs. exp Affordable Solutions to all your water problems. 464-1170/866-314-9825 "MR CITRUS COUNT' ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 RAINDANCER Seamless Gutters, Soffit Fascia, Siding, Free Est. Lic. & Ins. 352-860-0714 They're Looking For Your Business!! 563-3209 For Information About Advertising WHAT'S MISSING? Your ad! Don't miss out! Call for more information. 563-3209 k- CITRUS COUNTY (FL) CHRONICLE CLASSIFIED ,7 . Trde " Pressure W Cleaning PRO FINISH PAINTING & POWER WASHING If You Want The Best Cog The Best MC/Visa ,a (352) 382-7039 /~^aU__^__ ^---Mkj I J&^^l 'V^^^^H1 ff wwa^^^W-'- ^^oi^^'^^WSW * ^H^EI ^*Ifil A fli^H /^*d j^^^li.^^ '^ _jBb. ** B l _J ^*^IIRB ^BL1BfrH.*lH^K^B^^9 ^^B ^^R ^^^^^i ) -E ^^^^^^&. ^^^^^^^^H ^^^& j^^L ^^iH^^^rtii^^^RIH^^ ^^^^^iiRu^^^^Bmi^^^^^^^^^ ^I^^^Hi^^^l^^m^- ^mki^^^diii-^ ^B w ^flBi ^y ^^ ^^^^^ ^^^i4 f^& ''S^^^^^' ''IBSBBWff^ '^^l^^^^w^ ^vs?^-"'1" s ** _______________________________*_______'______" " _____ %OOOOT IOC TUESDAY, DECEMBER 20, 2005_ MASON HELPERS Exp'd and reliable. Transportation req'd. Pay depending on experience. 352-302-9102 or 352-220-9000 Mechanic Wanted Must be experienced In diesel and must have tools. Apply at SMG, Crystal River 795-7170, ask for Steve. MILL HAND 2nd shift machinist w/exp.. w/conventional hodrz, milling machines. Call Tim at 795-1163 OPERATORS Pan, Dozer, & Grader operators needed at In Wlldwood. Good Call 352-748-0955 DFWP AN HBOIRRESRS Needed Citrus Co. Work. Trans. provided. Vacation. 621-1283 (362) 302-0743. Plywood Sheeters & Laborers Needed in Dunnellon Great Southern Woodlee, Fl33538 call Sean 0 Dell (352) 793-9410 Drug Free Work Placed EOE Residential Front-End Loader Operator Must have 2 yrs. exp. Call (352) 596-6500 or ae'(352) 279-5201 Residential Grading Tractor Operator Must have 2 yrs. exp. (352) 596-6500 or (352) 279-5 AAA EMPLOYMENT * LIGHT MAINT. $10 MED. ASSIST. $9 DRIVER $10 P/T ASSIST. $8 SR. ADM. ASSIST $12 MED.TRANSC. COM 3rd PartyColl $8+com PEST TECH TRAINEE $10 Call for Appt. 795-2721 BUDDY'S HOME FURNISHINGS Is currently seeking a Delivery Driver/ Account Manager Trainee. Must have clean Cl9ss D license. Good people skills. (352) 344-0050 or Apply In person at 1534 N. Hwy. 41, Inverness. EOE DFWP 1LOC TUESDAY, DECEMBER 20 :2005 CDL-DRIVER Class A, B or C w/ passenger endorsement. P/T 20hrs week. Nursing exp. helpful Apply at: Barrington Place 2341 W. Norvell Bryant Lecanto, Fl, Man-Sat, Ferrara's Dell 3927 N. Lecanto Hwy. Beverly Hills, FL (352) 746-3354 Delivery Driver General Help Cm I CASHIER With bookkeep,,i n g exp. for fast paced business. Top pay for top exp. 352-302-5840 Ask for Steve P/TMAINTENANCE PERSON Apply at Best Western Citrus Hills Lodge Substitute %089 Part-timeI For Ocala, CLW, Tampa areas. Class D LIc., local ref., $10-12/hr., Benefits 2541 W Dunnellon Rd Exp. Horsefeeder with reliable trans. to Lecanto. Lv. detailed msg. (352) 628-7084 JOBS GALOREIII EMPLOYMENT.NET OFFICE ASSISTANT For Home Bullder Must be take charge Individual- 40 hour work week. Construction experience helpful. Organizational & Customer Service skills a must. Fax Resume 352-637-4141 PART-TIME SCHOOL CROSS- ING GUARD The Crystal River Police Department is accepting applications for Part-time school crossing guards. The starting wage is up to $12.00 per hour. Appli- cants can apply at City Hall, located at 123 NW Highway 19, in Crystal River, M-F, from 9:00am to 4:30pm Pianist For Fundamental Baptist Church. Also need Music Director/ Song Leader. (352) 628-4793 PRO-SHOP HELP WANTED Golf exp. necessary. Apply in person. D/F/W/P EOE El Diablo G6lf & Country Club. No Phone Calls SRAL ESTATE CAREER $249. Start 1/10/06 CITRUS REAL ESTATE I SCHOOL, INC. S (352)795-0060 SECURITY OFFICERS Class D License Required. Local. 352-726-1551 Ext 1313 Call btw. 7am -3pm, WANTED DIRECT CARE STAFF To provide care for a developmentally disabled individ ual In Floral City. Contact Rick at 465-3551 WE BUY HOUSES Ca$Sh.......Fast I 352-637-2973 lhomesold.com OFFICE ASSISTANT General Office Duties Include Answering Phone, Clerical, Filing, Faxing & Computer Work. Must Be A Good People Person, Able To Multi-Task, & Have Computer Skills. Good Speller & Attention To Detail Very Important. 20 To 25 Hours/Week EOE DFWP Qualified Applicants Must Under Go Drug Screening. E-MAIL RESUnME With Resume In The Subject Line marks@ chronicleonline. corna OR FAX RESUME 352-489-6593 "LIVE AUCTIONS" For Upcoming Auctions 1-800-542-3877 2 Hand Made Quilts 70 x 91 89 x 78 $195. both (352) 563-2691 I E Dept. 56 - Dickens Village 19 buildings, 28 accessories, $1,500. obo. (352) 527-0055 -g 5 PERSON HOT TUB 1 10/220V. w/cover good cond. $950, (352) 563-1421 Hot Tub w/ cover $1425. (352) 346-1711 -a 2 REFRIGERATORS, 1 brand new 18 cu.ft., $400. obo, 1 Older but in good cond. $60. (352) 746-7564 STOVE, wood or coal cooking stove, never used, exc cond, $500. Antique 2 man cross cut saw, exc cond, $100.(352) 726-6075 C"-I art-tim c" Help- 2 DINETTE SETS both solid wood 4 chairs with each $65 ea. 0B0 352-344-8984 42x60 GLASSTOP PEDESTAL TABLE, 4 upholstered chairs, excellent cond., $375 (352) 726-5490 94' SOFA, brown w/2 reclining ends $300/ abo. (352) 344-3321 ACCENT CHAIR $50. Two night stands $50. (352) 726'7572 "MR CITRUS COUNT" ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 /Substltute basis, Work a few days a week or just weekends and earn extra money before the sun comes up, 352-563-3282 ADVERTISING NOTICE: This newspaper does not knowingly accept ads that are not bonafide employment offerings. Please use caution when responding to employment ads.. Martin 1-866-724-2363 7127 U.S. Hwy. 19 New Port Richey, FL 34652 REAL ESTATE CAREER | Sales Lie. Class | 1 $249.Start 1/10/06 CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060 WOODCRAFT SUPPLIES $15,000 invested $5,000 Dr's orders to sell. (352) 746-3997 50 Seat Restaurant Turn key operation (352) 249-6966 WE MOVE SHEDS 564-0000 -U! CRAFTSMEN RIDER MOWER 12hp. 40" $150; (352) 489-7464 FREE REMOVAL OF Mowers, motorcycles, Cars. ATV's, Jet ski's, 3 wheelers. 628-2084 RIDING MOWER Needs some TLC, $50. (352) 628-2769 Staghorn Plant 6ft. diameter, $600. (352) 564-0788 GRAND OPENING Consignment Furniture & Much Morel Blue Moon Resale At Kingsbay Plaza (Behind Little Caesar's) (352) 795-2218 INVERNESS Yard sale Wed. thru Sat. Dolls, mower, etc. 111 Iris Lane Black Sequin Dress, medium $35. Leather Jacket, mens, med., $50. Both like new (352) 726-0040 Small freezer $60, (352) 860-1426 Whirlpool over oven microwave. Side/top vents. Hardware, manuals, Ex.Cond. $55.00. (352) 476-4378 g--- E MERRY I CHRISTMAS FROM: I THE DUDLEY I AUCTION FAMILY .See you Jan. 8 L i ATV LIFT 1250 capacity, exc, cond. $85 ALLIED FLOOR JACK 3-1/2 ton, excellent cond,, $60 (352) 637-7248 Mechanic Tool Box with tools $150. obo (352) 527-9226 &Mvultl 2 COMPUTERS Priced Under $300 each. Call for info. 352-212-2563 3 NEVER USED PRINTER, Scanner ink cartridges HP 78- Tri color, $25 (352) 637-9268 COMPUTER 600 MHZ P3, CD Burner, DVD, Scanner, Camera, 15 Monitor, Loaded, $200, 795-1153 Computer,2.HGHZ256 Ram, 80GIgHD, SIMCd reader, CDwrlter, ASiHLtY L:AIlcK SUFA/mlrror &, (362) 628-3995 Dinette Set w/ 4 chairs $55. Bedroom Set, chest, dresser, & night stand $100. obo good condition (362) 746-7864 Dining Set formica top, 4 chairs, $135. (352) 489-0882 Dining Table like new, 40". x 60" leaf 18", 6 Chairs $400. (352)465-1384 DR SET, Rect, tbl, 6 chrs, sm. china cbt $300, 352-344-3321 Entertainment Center $60. Kitchen Table, Formica, no chairs $50. (352) 628-5472 Executive Desk,6'x3' w/ matching Credenza, 6'x2', $400. (352) 382-1731 MERRY CHRISTMAS FROM: THE DUDLEY AUCTION FAMILY See you Jan. 8 FURNITURE Bamboo couch, chair, coffee table,end table. $150.00, Call 637-5331 Grand Father Clock 6fft. 4 in., solid wood, 3 way chain drive. Colonial registered, perfect cond. 28 yrs. old $650. abo (352) 212-6560 HIDE-A-BED QUEENSIZE. Teak table 6x32,6 din- Ing chairs. Old Hump- back trunk 637-5708 KING BEDROOM SET Pecan, triple dresser w/mlrror, armoire, 2 nightstands, king head- board, Ex. cond. $600. (352) 382-5351 KITCHEN TABLE Glass top table, four leather cream colored chairs. Asking 300.00. Call 726-2693 Lazy Boy Recliner . mauve, $200. (352) 489-0882 Leather Couch & Love Seat, both w/ recliners, buff, new condition paid $2,200. asking $1,450 aba (352) 212-6560 Moving must sell T.V. Armoire, $500., Cherry BD Set, $450. Ethan Allen DR, $3500. OBO (352)382-7229/476-1802 PAUL'S FURNITURE New Inventory daily Store Full of Bargains Tues-Frl 9-5 Sat 9-1 Homosassa 628-2306 Preowned Mattress Sets from Twin $30; Full $40 Qn $50; Kg $75. 628-0808 Sectional Sofa, 5 pc., light green, excel, cond. $275. (352) 628-6001 CITRus COUNTY (FL) CHRONICLE WORDY GURDBY TRICKY ICKY 1. Gloomy Grinch er Carrey (1) Every answer is a rhyming y (1) pair of words (like FAT CAT and DOUBLE TROUBLE), and 2. Stage in a process for getting ready (1) they will fit in the letter squares. The number after the definition tells you how many 3. Formed a twined hairdo (1) syllables in each word. To win I ]II]m l-- $10, send your original rhymes with your definitions to this 4. Gmnby's horse when he's corn (2) newspaper. All entries become S I the property ofUFS, Inc, * JQM'of Yards/in Stock. Many colors. Sacrlflce352am Sell $5 ea. Or 76 pcs. (2,200 value) $300 takes all (352) 634-3864 cell David Bramblett (352) 302-04481 7. "A Christmas Carol" writer speeds u (2) 1 1 Il 1 1l I I 2005 United Feature Syndicate, Inc. I Thanks and $10 to Patty Yanez of Lakeside, CA for #4. Send your entry to this newspaper. Smaaiab SNaIOII "I JaOIma jIaH'B9 sEaA'lHs sA'I 'sg AIHOd IAaOH't GI ivH aOM i'S daS isid IP MHI) * suaa1smv 12-20-05 051520 Crosses, 14.yo & batt. seat belt & horn, asking $5,000 obo (352) 726-6536 Oversized Elec. Lift Chair, Multi-level vibra- tion w/heat. Full stand & recline positions. Mauve upholstry, good cond. $600. 352 628-4524 Power Scooter JAZZY 1104 Orig. $3000, Sell $800 (352) 726-7405 PRIDE LIFT CHAIR Electric, Rose color, Cost $1200 Sell $600 PORTABLE TOILET $15 (352) 344-2584 Video Eye Power Magnification System w/montor. $3500. new, $2500. OBO Uke new. (352) 527-4341 Beginner Guitar Lessons. Affordable/ Flex. hrs.Call Ben (352) 302-0883 Casio Keyboard. CT-638 Tone Bank. Portable stand, chair & case. $150.0BO (352) 465-4952 KAWAI Z-1000 KEYBOARD/ACOUSTIC, amp system, Peavey amp KB/A60, like new, barely used, $850 (352) 302-9451 Peavey Base Amp, Combo 300. on wheels, nice cond. $250. Fender Stratt Guitar, like new cond. Squire. $150. (352) 382-0098 PIANO K-Kawai, Baby Grand GE-1, $6,000. For info. Call 527-9982 PIANO, SPINET Mahogany $500/obo (352) 628-7426 Body Toner, multi Gym, new condition, rowing machine, $50. obo (352) 637-4892. Bowflex Ultimate w/ leg attachment, like new 1 yr. old, $1,350. (352) 628-7729 Elliptical Exercise Machine Uke new, minimal use, $200. oboe 352-586-6849 NEW BALANCE 9.0 ELLIPTICAL Original price $1300, asking $850. Call Brooke @ 352-212-9255 NORDIC TRACK SKI MACHINE $75 w/extra belt, (352) 637-2989 -4Sprin Air Hockey Table 60 x 30" good cond. $50. (352) 795-5444 BICYCLES Schwinn, 3-speed, coaster brake. His & Hers, Ideal for adults. Like new. $99. ea. (352) 382-1052 HOLIDAY SPECIAL a KEYWEST Jumbo Shrimop 13-15ct. $51b; 16-20ct $4.501b. 352-795-4770 Gas powered Golf Cart $800. (352) 341-6295 476-3681 Lady's 26" "Bike" 7 mos, old, w/ free tire pump. many extras $50. (352) 563-5244 POOL TABLE 3-pleceW x 66L x. 0BO (352) 400-1233 BUY, SELL, TRADE, PARTS, REPAIRS, CUST. BUILD Hwy 44 & 486 S!!--I 14K Gold Marquise cut Diamond Solitaire Ring. .39 carat w/Diamond Jacket,. Size 6. Valued at $1800 asking $1100 OBO (352) 344-5893 BUYING OLD WOOD BASEBALL BATS Any condition. Baseball gloves & signed balls. SCat. Humanitarians of Florida Low Cost Spay & Neuter by Appt. Cot Neutered $20 Cat Spayed $25 Doa Neutered & start at $35 (352) 563-2370 Jack Russell Puppies for Sale. Ready by Xmas. (352) 628-3436 Miniature Pincher, all shots, neutered, trained $150. (352) 527-2958 352-613-2798 PUREBRED MINIATURE POODLE, young male, ready for breeding, black, $150. (352) 628-2459 Red Tail Boa 1 yr. old, bik, bellied, boa constrictor, $100. (352) 447-3436 8' x 13' kennel. $150.OBO (352) 302-7985 Horse Sitting w/TLC at your barn. Long & short Term. 352-746-6207 Sorrel Colt 8 mos. old. quiet, sire 14 horse Son of Kid Clue. Can be reg S650. (352) 344-0064 900 Ib Angus Heifer 3 1/2 years old $950. (352) 621-3175. 1, 2 & 3 BDRMS. Quiet family park, w/pool, From $400. Inglis, (352) 447-2759 Crystal River DW 3/2scrn, furn /11/2. 2 porches, 1 shed No pets or smoking W/D, $600/mo. 1st, last & dep. 352-628-6643.,lst., last, sec., possible lease opt./purchase 352-795-7162 - U1711 ,701-III Brand New: 3/2 on well kept lot in Beautiful Sumter County. Perfect starter home. $500. Down. $650mo. PNI WAC. Call Today Toll free: 1-866-773-5338 Over 3,000 Homes and Properties listed at homefront.com 3/2 w/Concrete Block add on, car port sets on 1 acre. Fenced, 12X20 shed, well, septic, off 488, $75,000 (352) 302-6025 NICE SINGLEWIDE ON HALF ACRE. 3-4 miles from Homosassa Walmart. Call C.R. 464-1136 to see it. $65,900. View Photo Tour at. enter tour #0047-6128: click on Find Tour. American Realty & inesltmentsd C. R. Bankson Realtor 464-1136 BakgoudChecs AdEploymen HeathPhsial WllBeReuiedFo Pst OF 0 AYPRBATONPEIO *availa -C in a l--pCoeetiginte Inveressareas RESIDENTI L ADE CT3r -sifanda.* hitaviabe Respnsile fr asistn evlpentally isabled auls n resiental ettna.ProoCofHS ip -ma IED -equied TRANSIIO AL IVN-CAC:F\ adP C pstin apprx.e 0 l orssomeweee nds e Appy A Th Ky TainngCentC r usines Offce- a g : -80-55183Ex.34)*E E 5. Bookcase ledges of Santa's helpers (1) 6. Croquet arch in a copse (2) I 1 1 1 1 1 1 I i- i--, List with me & get a Free Home Warranty & No Transaction Fee (352) 302-0448 Nature Coast HOLIDAY SPECIAL 4 KEYWEST Jumbo Shrimop 13-15ct. $51b; 16-20ct $4.501b. 352-795-4770 Fiber Optic Christmas Tree 6Y, Craftsman, 5600 Waft, 10.0hp, OHV eng., 8600 surge watts, never used. $600. (352) 382-3312 Generator. Porter Cable. Gas, 3250 watt, like hew. Just In time for Xmasl 10KX60 Dirt Bike. Too much to list. $1300. Jr. 5 piece CB Drum Set, Instructional video $200. (352) 628-2947 Kirby Upright Vacuum, generation 5, good cond. $150. abo (352) 465-6051 Large Outdoor TV Antenna w/ 30 ft. pole $75. (352) 795-5444, bik & chro- me, 49cc, disc brakes, street lights, both less than a year old $250 ea. (352) 527-4552 PUCH MOPED like new 1500 ml. $400. ab 85152( TUESD DECEMBER 20 2005 11 -." 1LMobifleHome Ei.and and 3/2 ON 5 BEAUTIFUL ACRES Fenced & Gated, Horses welcome. Just off Citrus Ave. Financing Available. Call (352) 302-3126 A MUST SEEt New 3 bedroom, 2 bath on 1/2 acre. Great location, the best construction, too many options to list. Seller motivated, $2,000 down, $587.47 per mo. Call for more into 352-621-9181 Beautiful 3/2 on 1/2 acre in great school district. $2,000 and $650 mo. (352) 795-6085 Crystal River 2/1, SWMH on 1 acre, secluded, ponds, $59,000. (352) 302-3884 FOR SALE BY OWNER In East Cove, Inverness '93.14X52,2/11/ on 4 1/ acre. new well, appliances, tile,. carpet, paint & decks, enclosed scrn. pool, $1 19,900.352-302-1466 Just what you've been looking for. New 4/2 on 5 acres. Zoned for agriculture. Horses Welcome. $6,000 Down $70 mo. (352) 795-8822 LAKE PANASOFFKEE Fishing haven! 3/2 dou- blewide recently remod- eled on 100x150 lot, jacu2zi and above ground poo. Minutes to boat ramp and marina. Call today! $129,000. Mary P. Larkin, Realtor Foxfire Realty (352) 307-0304 (866) 578-0156 toll free LAND/HOME. 1/2 acre homesile in coun- try setting . 3 bedroom2 ath ww"a diveway, appliance package, ust See, $579.68 per month W.A.C. Call 352-621-9183 Like New Homes of .Mer;lI ?.' Fat T, R. or, .2' ,ac .v.,oded iC1.l Roailings Hills Area just 11/2 blocks off 140th Ave. 3/2 MH front & back porches, garden pond, shed, partially fenced, 1.16acres. $129,500. < (352) 489-5415 -E 2003 JACOBSON, DW, 2/2,55+ park, Stone- brook Park glassed & screened in Florida Rm., excel. location on pond, mostly furn., ceiling fans, sprinkler sys., allapl's., incl.'W/D $77,777. (352) 628-7778 or 628-9660 I/I on lake w/dock privileges. Newly decorated X, FIl rm., porch,, Isl. kit. all apple's. cus. storm awn ceiling fans. Close shops, hosp., $65,500. (352) 795-8983 LEESBURG Hawthome Gated Comn .0BO Lot rent incl. wtr, garb. sewer, lawn & boat docking, by owner, Pets ok. 352-447-4093 Walden Woods, 2002 Gated 55+ comm., 3/2, upgrades, & some turn., corner lot. MUST SELL! Reduced!! $67k (352) 382-4076 "MobSile H c Cilscm. Mgnit. Robbie Anderson LCAM, Realtor 352-628-5600 Info@orooerty manaamentgrouD. HERNANDO 1/1, clean, apt. avail. Jan. 1 Util., Incl. No pets/ No smoking $850 mo. 1st, last, sec. 637-3495 or 270-320-3332 CRYSTAL RIVER 1 Bedroom, laundry on premises, $450 mo.+ sec. deposit. ,cn aZ fn"ac Specialist in Property Mngmnt/ Rentals, beverlv.kinag centurv21.com Nature Coast INVERNESS Neat & clean, 1/1, cent H/A, SR 44-E $495 mo (352) 726-1909 2700+ SQ. FT. Med Prol. Bldg. n.e ._ ,uill r irn I,',n ...P.,g c.l o Lgtea.? . "c.,J d -t. 'r ',rij I ..:.r par, 352-527-2099 Prime Location HWY 44 /2 Mi. West of Wal-mart 1760sq.ft. Retail Space, (2) 5,000 sq.ft. out par- Sels Will Build to Suit! Assurance Group Realty, 352-726-0662 Brentwood Maintenance Free. 3/2/2 over looks golf course $1,100. Call Gloria (352) 746-9770 CITRUS HILLS Furnished Condo, avail 01/06, also avail, after 4/1/06, furn. or unfurn. (352) 527-4599 Citrus Hills Meadowview, 2/2/1 turn., $1100 CRYS RIVER/HOM. 2/1, with W/D hookup, CHA, wtr/garbage incl. $500mo., 1st, Last & sec. No pets. 352-465-2797 INVERNESS Neat & clean, 1/1, cent H/A, SR 44-E $495 mo (352) 726-1909 Inverness New 2/2, no smoRing & no pets, $750/mo. 1st, last & sec. (352) 341-3562 Daily/Weekly w Monthly w Efficiency Seasonal $725-$1800/mo. Maintenance Services Available Assurance Property Management 352-726-0662 Wowl 2/1, w/ scr. par, C/H/A, avail 12/31 $500/mo. 1st. 1st,/, carport, very clean, 2050 Howard St. $800, mo 352-746-5969 Citrus Springs 3/1 $700./mo. 2/2 $700./mo (352) 476-1398 or (352) 464-3519 CITRUS SPRINGS NEW 4/2/2 Home in quiet neighborhood. $1,000/mo incds water/lawn. (858) 869-3400 I'm local. CRYSTAL RIVER 3-BR, 2-BA, nice, clean, ': 00i, 352-795-6299 j'r ^ * FOREST RIDGE ESTATES 2/2/2 Villa $825. mo Please Call: (352) 341-3330 visit the web at: citrusvillages HERNANDO Must See l DW, 2/2, Bonus Rm., 1450 sq. ft. C/H/A, Ig. Fl. Rm., w/ hot tub, $725. mo. 1st., st., sec. petsneg., no smoking (352) 860-1571 HOMOSASSA 3/2, FP, Lecanto schools, $695 mo, 1ost, last & Sec. Realtor Owner (352) 302-4057 HOMOSASSA Sasser Oaks, 2/2/1, scr porch, W/D, Shed, fenced yard, $725mo. No smoking. No pets, Avail 1/1/06 (352) 2628-7449 If you can rent You Can Own Let us show you how. Self- employed, all credit Issues bankruptcy Ok. Associate Mortgage Call M-F 352-344-0571 INVERNESS 2/1,w/appl's. Non smoking. No pets. $600 Den, Fapproval. Gam. Quiet area. $700 mo. (352) 746-3073 INVERNESS 3/2/1, yr old house, W/D W/D, 1st, last & Sec. $875, mo. no pets (352) 637-4567 (352) 228-1464- INVERNESS 3/2/2 NEW HOMES, Pets on approval. Gall Stefanski Coldwell Banker 726-1192 or 601-2224 INVERNESS HIGHLANDS 3/2/2 Brand New! W/D $1,000/mo. Franklin Realty Consultants of $1500.mo. SMW Sales (352) 382-2244 CRYSTAL RIVER 2/2/2 waterfront beautifully decorated. Jacuzzi, fireplace, dock, bikes, grills, pool, tennis, W/D, priv. patio. Full amenities. Long term or short term. $1800. ma joannlrwin@msn.com (352) 875-4427 HOMOSASSA RVRFNT. $1150-$1800/mo, Seas. add $200/mo. Incl. all util. (352) 628-7913 a Hernando 3/1.5 $750, per mo. No pets (352) 628-0164 NATURE COAST NATURE COAST "MR CITRUS COUNW1 ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders <352) 422-6956 m', .r . GEORGE OUELLETTE Exit Realty Leaders *Over 20 years exp. in the housing field *Let my experience work for you. Call me at 586-7041 Office 527-1112 PUBLISHER'S NOTICE: S SSales Lic. Class I * $249. Start 1/10/06 I CITRUS REAL ESTATE I SCHOOL, INC. (352)795-0060 WOMAN'S CIRCUIT TRAINING BUSINESS FOR SALE C= SBj I-.- Jit asBS The Islands of Crystal River 2/2 Newly remodeled condo. Clubhouse, Dock, pool, tennis, cable Inc. $750. (414) 690-6337 BEVERLY HILLS Priv. bath, $100wk 1st & last week. (352) 746-1186 after 5 INVERNESS $125 wkly. incl. util. Call 352-341-1278 FOR SALE BY OWNER FREE WEBSITE Homesite.com Priced Reduced, 3/2/2, corner lot, appliances, shed, patio, lanai, C/A/H, built 1996, 1689 W, Datura & N. Ocean $176,000. 352-442-2386. 'Your Neighborhood REALTOR' call Cindy BIxler REALTOR 352-613-6136 cbixler 5@tampa Craven Realty, Inc. 3C5-72A-1515 0- Spotted Dog Real Estate LOVE THE TRAIL? So do II Let me help you find the perfect home or lot on or near the trail Call Cynthia Smith, Realtor Direct (352) 601-2862 Doing J.W. Morton, R.E., Inc 726-6668 637-4904 MUST SELL, Lrg. 3/2/2, many upgrades, $195,900 neg. (352) 860-1919 Need a mortgage & banks won't help? SSelf 25+Yrs, Experience Coall & Compare $150+Million SOLD!!! 53 BEVERLY HILLS BLVD. Corner Lot Neat 2/1/1 Sunroom, newer ' appliances & Berber carpet. $97,500 (352) 527-7833odemission.com 3.9%/2.9% Full Service Listing Why Pay More??? No Hidden Fees 25+Yrs, Experience Call & compare' $150+Million SOLDII Please Call for Details, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. CRYSTAL RIVER 2/2/2 waterfront, beautifully decorated, Jacuzzi, fireplace, dock, bikes, grills, pool, tennis. W/D. priv. patio, Full amenities., Long term or short term. $1800. mo. joannirwin@msn.com (352) 875-4427 CRYSTAL RIVER 1/1, completely furnish- ed waterfront condo $1100 mo 352-795-3740 HOMOSASSA RVRFNT. $1150-$1800/mo. Seas. add $200/mo. Incl. all until. (352) 628-7913 ROOM WANTED Single man desires clean room. Willing to pay $300/mo. (352) 601-3341 KATHY TOLLE (352) 302-9572 Ust with me and get a Free Home Warranty & No transaction fees (352) 302-9572 Nature Coast LAURIE B. LATER, P.A. For Personalized Service List with me Free Home Warranty & No Transaction Fee (352) 302-6602 Nntura Coast fauline uavis 352-220-1401 List with me and get a Free Home Warranty & no transaction fee 352-220-1401 pdavis.c21-nc.com Nature Coast "oysa.1 ive3 0im s $ COUNTRYSIDE ESTATES Irg 3/2-/2 "Here to help you through the Process" homesandland.com donna@sllverkina properties.com HOMOSASSA SPRINGS Country living on your own, High & Dry YsAc at chronicleonline.com Licne .EBrke WaefonGf Inesmnt acn Spotted Dog Real Estate (352) 628-9191 E-u fl Buyers & Sellers ore smarter than ever. Let me work WITH you for the best deal! Meredith Mancini (352) 464-4411 Exit Realty Leaders Crystal River CITRUS COUNT (FL) CHRONICLE FINANC'N BO KESEM INAR AN ONUTIO - S"IHr a n o REDUCED TO $174,900. Floral City, Nice, 2/1/1 W/util, bldg. & pole. barn on 2.38 ac. Abuts horse trail. Not a mobile. Deborah Bellett Seaside Realty 352-650-3118/592-9595 * I . [ *' *t, , i Buyers & Sellers are smarter than ever. Let me work WITH you 2/1.5/1 W/ Detrached. coam (352) 795-5410 Adorable 1/1/1 In town. Immaculate cond., $94,000. Waybright Real Estate (352) 795-1600 ..e ' S21, Nature Coast CLASSIFIED 3.9%/2.9% Full Service Listing Why Pay More??? No Hidden Fees 25+Yrs. Experience Call & Compare $150+Mllllon SOLDI!! P M 441 *^sr, " '*... -* , 2/2, 2000 sq. ft under 2 sky lights, I. Rm.,scn, rm., laundry rm., lots of closets, iurn., avail. immed. $185,000, (352) 3/2/2, 2434 sq. ft. + 408d sq. ft. lanai, split plan 2 REE sis. RecoCded pool, wetbar, well, 3 walk in closets, ,many $289,000. (352)382-73832 much to list. Immediate Occupancy. REDUCEDI 183 Pine St. $279,500 (352) 382-3312 Glenn Quirk 352-228-0232 Kristine Quirk 352-228-0878 . PUT THE QUIRKS TO WORK! Nature Coast IMPRESSIVE, ELEGANT, FORMAL, ONE OF A KIND! Outstanding custom, contemp. pool home. 5/3/3,4200sq.ft. on priv. %ac. Lg. state of the art kit. Huge master & tam./21/, 25+Yrs. Experience Call & Compare $150+Million SOLD!!! Please Call for Details, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. WAYNE CORMIER Here To Help! Visit: waynecormier.com (352) 382-4500 (352) 422-0751 Gate House Realty "MR CITRUSCOUNTY ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 Bonnie Peterson Realtor "PEACE OF MIND" is what I offer "YOU" (352) 586-6921 Paradise Realty & Investments, Inc. (352) 795-9335 Meadowcrest~ wyjomes^^ Gitrus Hills Homes I Invernessi cc mS -II "**J Beverly Hills c= Homes T 12C TUESDAY, DECEMBER 20, 2005 BSRtl R Over 3,000 SELNG? Homes and 5/2, barn/work room Call Me on approx 11acres, Call Me $349,000. Contact: PHYS STRICKLAND Lisa VanDeboe (352) 613-3503 Broker (R) /Owner EXIT REALTY LEADERS 352-422-7925 HOME FOR SALE Over 3,000 On Your Lot, $103,900. Homes and 3/2/1, w/ Laundry Properties Atkinson Construction listed at 352-637-4138 Uc.# CBC059685 homefront.com Over 3,000 Homes and Properties S Michele Rose homefront.com REALTOR "IimplyNG, Reuf- 5/2barnwork Work Harder" 352-212-509779 thorn@atlantic.netr Craven DLHomes In r C E REAL ESTATE CAREER | Sales Lic. Class I I $249. Start 1/10/06 CITRUS REAL ESTATE SCHOOL, INC. I (352)795-0060 " REDUCED TO $174,900. Floral City, Nice, 2/1/1 W/util. bldg. & pole barn on 2.38 ac. Abuts horse trail. Not a mobile. Deborah Belleft Seaside Realty 352-650-3118/592-9595 SEEN THE REST? WORK with the BEST! Deborah Infantine Top Sales Agent 2004 & 2005. (Inv. Office) EXIT REALTY LEADERS (352) 302-8046. RAINBOW SPRINGS CC /2 + end. lanai, overlooking 8th tee. Tile/carpet floors, neutral colors, appl's., garden shed. huge oak trees. $230,000. 8272 N. Golfview Dr. (352) 527-9616 Over 3,000 Homes and Properties listed at homefront.com WAYNE CORMIER Here To Help! Visit: waynecormier.com (352) 382-4500 (352) 422-0751 Gate House Realty Western NC Mountain Gated Golf Community New Phdse Opening Limited Home Sites Starting at $99,000 2 Hrs. North of Atlanta Toll Free (866) 997-0700 CEDAR KEY 1 wk + bonus wk. Prime time. $1700 obo. (352) 212-5277 I Evelyn Surrencv I List with me & Get a Free Home Warranty & No transaction fees 352-634-1861 Nature Coast Homosassa By Owner Richman's-Bargailn Natural Splendor on the clearest water on the west coast. Gated 3BR/3.5bth suites, 4200sf $863,000. 352-628-4928 LET OUR OFFICE GUIDE YOU! r " Plantation Realty. CrrRUS CouNTY (FL) CHRONICLE LAKEFRONT Condo. 2/1. $75k. 407-836-5624 or 407-644-8523. RON EGNOT 352-287-9219 Real Estate-Real Easy TOLL FREE 877-507-7653 U- 1st Choice Realty 3.9%/2.9% Full Service Listing Why Pay More??? No Hidden Fees 25+Yrs. Experience Call & Compare $150+Mllllon SOLD!!! Please Call for Details, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. -E WE BUY HOUSES & LOTS Any Area or Cond. Call anytime, Iv. message 352-257-1202 OLbERlve.com WANTED 3/2 wl at least 2 acres of land, Owner Finance have down payment Crystal River Schools (352) 212-2065 WE BUY HOUSES CaSh............Fast I 352-637-29731'9 nthnl For Cn9I DLB We Specialize In Helping YOU Acquire A Quality-Low-Priced Building Lot. 1-800-476-5373 ask for C.R. B6nkson at ERA American Realty & Investments cr.bankson@era.com FOR FREE PACKAGE of Lots & Maps Call 800 # Above Lv. Name & Address PINE RIDGE ESTATES 4563 N. Lena, 1.06,Acre Lg. Oaks. ti -ed. nc-. fill $86,000. (352) 621-6621 RAINBOW SPRINGS GOLF COMMUNITY Dunnellon. Lot4, Fox Trace, $75K. Lot 14, Country Club South, $70K(214) 402-8009 HOMOSASSA LOT $33,500. (352) 628-7024 HOMES ONLY Homosassa Resid. 5 acres. Corner lot, 2 paved sides. $150,000. or 2.5 acres for $75,000. Cleared & Fenced. (352) 621-0522, 00.(352) 793-8102 EXQUISITE CORNER LOT RIVERHAVEN VILLAGES No pillngs needed, view of water 11920 WTimberlane $89,900. Call 697-1608 Realtor Owned Lot ready for home 'or moblle.Owner FlnanclngAvall. $20,000-$25,000. (352) 220-2274 or (352) 422-7925 WATERFRONT Over one beautiful acre in Floral City right off Hwy41. Only$79,900. Cal1(352) 302-3126 1997 Johnson Ocean Runner. 115hp, 25" shaft, new lower unit 1 yr. All controls. SS prop. $1850. (352) 634-3679 Honda Outboard 712 --;------'' CLEAN USED BOATS We Need Them! We Seln Themlir. $7,000 (352) 795-7095 BAYLINER I/O S2002, 17.5' w/ mercruiser, very low hrs, loaded, $7500. (352) 794-0070 CAROLINA SKIFF17' '04 Less than 15hrs, semi V series center console, 60HP Yamaha, trailer. $8,000. (352) 637-5426 CHALLENGER '98, 17ft., Bass Boat; 50H motor, F.F., cust. trail., troll, motor $4,350.obo (352) 637-2735 CHRISTMAS SPECIAL Fold Back Fishing Chairs, $19.95 & up. In-stock only Monroe Sales Mon-Fri. 9a-5p (352) 527-3555 HOLIDAY SPECIAL * KEYWEST Jumbo Shrimo 13-15ct. $51b; 16-20ct $4.501b. 352-795-4770 Fiberglass 12' 5 hp outboard motor, foot control trolling motor, galv. trl., $1000. (352) 344-4312 GALAXY 20',-1986, cuddy, Kept: In high & dry, new mo- tor, low hrs. Exc. cond. $5400.(352) 795-7335 Gheenoe 15ft., 6 In., 9.9 Merc., trolling motor, trailer w/ Snew axle & tires, under cover, excel, cond.' $1,600., (352) 341-0336 HURRICANE, 1992 Boat & trailer, $3500/obo (352) 628-7913 HUGE PONTOON & DECK BOAT SALE Holiday Savings on all New & Pre Owned Inventory Crystal River Marine 352-795-2597 PONTOON 1992 40HP Johnson motor, (352) 860-0083 PONTOON BOAT '98 Landau, 18FT, 50HP Nlssan, Incl. trailer, $6,500 (352) 344-3321 PREMIERE 17' 1997 PONTOON 40HP Force, Incl, trailer, Blmlni top. $4500. (352) 382-3573 PROLINE 1972 24' Guide boat, hull only, $3800. (352) 628-7913 RAINBOW RIVER CANOE & KAYAK RENTALS & SALES 1999-2005 Models Seasonal Clearance (352) 489-7854 Rinker Cutty Cabin 1987, 23', 165hp mere.,400. (352) 795-6764 SILVERTON FUN BOATI 1987, 34 Ft., runs great $15,000 or trade, (352) 249-6982 or 249-6324 1995 Southwind 33LRQ Ford Chas/ Class-A WIdebody 45k ml, Basement storage, b/u camera, elec. level jacks, Loaded NICE. $29,00.lin CR. $130,000.8OO (219)608-7349 Search 100's of Local Autos Online at wheels.comqculate sleeps 6, full bath/kit. $6500. (352) 621-3049 (352) 613-3253 'ROCKWOOD 1989, 16', nice cond. $2500/obo 352- 794-0446 or 352-270-0183 2 Dual 8" Sub Woofers in a ban pass box w/ 500 watt amp. $200. (352) 489-7475 (352) 464-0433 4 alum ,15x9 rims. Fits Toyota or Chevy. $200. OBO(352) 795-3701. HITCH Reese for FORD, $60 OBO, Call. after 6 (352) 344-5436 Topper off of Ford F150, 8ft bed $50. i'C'es AO_ 4aoa , et ski's, 3 wheelers. 628-2084 VEHICLES WANTED, Dead or Alive. Call Smitty's Auto 628-9118 1996 MERCURY COUGAR 100000 miles, AM/FM Stereo, Cassette, loaded $800.00 or best offer. needs work. 352-697-0990 lc Bat 1998 CHEVY Cavalier, exc cond, 1 owner, super clean, AC, cruise, 76K, dealer malnt. $5,000. 302-4510 '98 Nissan Ultima Power Pack, Sunroof, CD..$5,995 '99 Toyota Corolla 4dr,Power Pack, Sunrof, Nice!.$7,980 '02 Chevy Cavalier 2dr, Black, Shap, Loaded $7,995 MANY MORE IN STOCK ALL UNDER WARRANTY -*BIG SALE- CARS. TRUCKS. SUVS CREDIT REBUILDERS $500-$1000 DOWN Clean, Safe Autos CONSIGNMENT USA 909 Rt44&US19Airport 564-1212 or 212-3041 BMW 5301, Needs work, $1700.0BO. BUICK '96, Skylark, 43k orig. mi, excellent shape $5,000. obo 352 257-9321 CADILLAC 1996, Sedan Deville, triple bik, New Rules for Car Donations Donate your vehicle to THE PATH (Rescue Mission for Men Women & Children) at (352) 527-6500 CAMARO '95 White, V-6, auto, AC, tilt CD plyr. 74K orig. ml. Great Shape, $4500 (352) 634-0432M,ONSTAR, BOSE 6CD CALL 352-949-0094 REASONABLE OFFER Chrysler Sebring Conv. JXI Gold Edition, 1999, 78k orig. miles, CD player,,$6500. (352) 503-3198 DODGE '00, Neon, blue, auto, good Xmas present $2,900. (352) 228-7526 FORD '05, Focus, 9,500 ml., cruise control, PW, mint condition, $16,000. '(352) 344-2550 FORD '96, Taurus, GL, green, 6cy. 56k mil. $2,000. (352) 341-3295. '82 CADILLAC 65K mi., $2,500. obo Trade? (352) 560-0043 BMW Motorcycle 1979, R45, Good cond, w/sidecar, $2000. (352) 795-8040 CHEVROLET '65, Nova, Goodrench motor, turbo 400 trans. $3,500. ab Silyer m. . Search 100's of Local Autos Online at wheels.com (,ti ) 1i MERCURY 1994, Villager, body/inter very good cond, upgraded. stereo, needs engine, $500. 352-302-6082 Search 100's of Local Autos Online at wheels.com CIRjPfil] AIV & UIK I ltIK YAMOTO 2006, 150 cc, auto., elec. start, with reverse, less than 10 hrs ridden C1 .nn h- oHernandrln 2UU0 EIxremeScl OorUUI, 125cc, good cond. less than 700mi., asking $1,200. (352) 465-6051 BMW '92, K75 Touring Bike, w/ windshields, and hard saddle bags, gar. kept, $3,000.obo 352-621-3980,228-3153 'lIus Mlero , ". PATHFINDER 1989 2DR, 4WD, Cold AC, PS,PB, many extras. 127K miles. $2000 B00. 352-417-0009. FORD RANGER 4x4 1988 Cab Plus, 6 cyl. 2.9L, 117,500 mi, Asking $2500. (352) 344-0786 Search 100's of Local Autos Online at wheels.com CfiONIC%,, 511-1220 TUCRN PUBLIC NOTICE NOTICE IS HEREBY GIVEN that the Citrus County Board of County Commissioners will meet In Special Meeting for the purpose of conducting an ATTORNEY/CLIENT SESSION on Tuesday, January 10, 2006, at 10:00 o'clock A.M., in the Commission Meeting Room, Citrus County Courthouse, 110 North Apopka Avenue, Inverness, Flori- da. for the purpose of commencing an attorney/client session pursuant to Section 286.011(8), Florida Statutes. The purpose of the ATTORNEY/CLIENT SESSION will be to discuss settlement negotiations and litigation strategy, Including, but not limited to, an action styled: James D. Ownbv and Citrus Sprinas Landowner's Association. Inc.. on behalf of themselves and all others similarly sit- uated vs. Citrus County. Florida: Citrus Sorinas Municipal Services Benefit Unit: Citrus County Prooerty Appraiser' and Citrus County Tax Collector. Case No.: 2004-CA-1840. Pursuant to said statute, the Board will meet In open session and subsequently commence the attor- ney/client session which Is estimated to be approxi- mately one (1) hour in duration. At the conclusion of the ATTORNEY/CLIENT SESSION the meeting shall be re- opened. Those persons to be in attendance at this ATTOR- NEY/CLIENT SESSION are as follows: Commissioner Gary Bartell Commissioner Jim Fowler Commissioner Dennis Damato Commissioner Joyce Valentine .Commissioner Vicki Phillips Richard Wm. Wesch, County Administrator Robert B. Battista, County Attorney Michele L. Lieberman. Assistant County Attorney Millie A. Mainwaring, Assistant County Attorney Robert A. Williams, Fowler White Boggs Banker Charles Wachter, Fowler White Boggs Banker Representative of Joy Hayes Official Court Reporters Gary Bartell, Chairman Board of County Commissioners of Citrus County, Florida Published one (1) time in the Citrus County Chronicle, December 20, 2005. 509-1228 TU/WCRN AA-05-14/Brown PUBLIC NOTICE NOTICE IS HEREBY GIVEN that the following public hear- ing will be held by: The Citrus County Planning and Development Review Board (PDRB) on January 5, 2006, at 9:00 AM, In the Lecanto Government Building, 3600 West Sovereign Path, Room 166, Lecanto, Florida. Please note that the PDRB meeting begins at 9:00 AM. The actual time that a particular iem is discussed will vary depending on how fast the PDRB moves through the agenda. 1. Said hearing shall be for the purpose of considering an amendment to the Land Development Code Atlas (LDCA). At this hearing a recommendation will be mode and forwarded to the Citrus County Board of County Commissioners. 2. All persons desiring to be heard, to speak for or against, may be heard, AA-05-14 McKean & Associates Engineers. Inc. on be- half of Jim Brown Is requesting an amendment to pro- vide for a major modification of the approved Master Plan of Development for Pelican Cove, thereby effec- tively amending Ordinances 89-A72 (Z-89-46), 90-A18 (Z-90-11) and 2002-A21 (AA-02-09). More specifically, the request Is to reduce the maximum number of dwelling units in Phases I and II from one-hundred four (104) to one-hundred two (102) units. The plan amend- ment provides for a redistribution of six (6) dwellings units (three duplexes) to be located in the northwest proximity of the project (corner of North Cove Shore Drive and West State Park Street) In Phase II. Also, a recreational amenity (picnicking) Is proposed at the southwest corner of the project. The request Is for property lying In Sections 17 and 18, Township 18 South, Range 17 East, Further described as Parcels 44410 and 44400 (inclusive of Pelican Cove Condo), located South of West State Park Street (Crystal River Area). A complete legal description is on file with the Depart- ment of Development ore, December 20 and 28, 2005./ John M. Cassell 7324 W. Green Acres St. Homosassa, Florida 34446 Attorney for Personal Representative: /s/ John S. Clardy III Florida Bar No. 123129 Crider Clardy Law Firm PA PO Box 2410 Crystal River. Florida 34423-2410 Telephone: (352) 795-2946 Your world first. Es 'r\ Da v Ci LorNiacLE Classifieds CLASSIFI the Citrus County Chroni- cle, December 13 and 20, 2005, 510-1227 TUCRN Notice to Creditors Estate of Anna M. Inamorati PUBLIC NOTICE IN THE CIRCUIT COURT FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION CASE NO. 2005-CP-1515 IN RE: THE ESTATE OF ANNA M. INAMORATI Deceased. NOTICE TO CREDITORS The administration of the Estate of Anna M. Inamo- rati, deceased, whose date of death was Octo- ber 6, 2005, 20, 2005. Personal Representative: /s/ ELAINE R. ABOSHAR 15 Kyle Drive Salem, New Hampshire 04079 20 and 27, 2005. 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/00354
CC-MAIN-2017-34
refinedweb
60,903
77.64
. In the first three installments of this series, we have reviewed new frameworks introduced with iOS 9 SDK, enhancements to existing frameworks, and the new Safari content blocking API. In this article, we are going to examine new features added to iOS main programming languages, the recently open sourced Swift and Objective-C. Swift Swift 2 introduces new features in five different areas: - language fundamentals, such as enums, scoping, arguments syntax, etc. - pattern matching - features availability checking - protocol extensions - error handling. A few of those features, such as the new do scoping operator, are not backward compatible. To cope with this, Xcode 7 includes a new Swift migrator that will convert Swift 1.2 code into legal Swift 2.0. Enums In Swift 2, enums carry enough reflection information that it is possible to print them. Given: enum Animals { case Dog, Cat, Troll, Dragon } let a = Animals.Dragon The statement print(a) will now correctly output Animals.Dragon, whereas in previous Swift versions the output was a bare (Enum Value). Another improvement related to Enums allows Swift to represent associated values of different types through an Enum. As an example, the following code is now a legal way to represent an Either type: enum Either<T1, T2> { case First(T1) case Second(T2) } Finally, Enums have been extended to support a form of recursive nesting through the use of the indirect keyword: enum Tree<T> { case Leaf(T) indirect case Node(Tree, Tree) } The example above still does not define a full-fledged recursive union, though, because of a limitation in Swift. Indeed, even in Swift 2 enum values are stored inline, so a recursive enum would have an infinite size. Previously, libraries were available to circumvent such limitations, but they came with a cost in terms of both readability and integration with other Swift features like pattern matching. The use of the indirect keyword allows to express recursion naturally and works perfectly with the rest of the language features. Scoping operators A new do statement allows developers to introduce an explicit scope. This can be useful to reuse a name already declared or ensure that some resource is released early. The do statement looks like this: do { let a = Animals.Troll ... } To avoid any ambiguity with the do .. while statement present in earlier versions of Swift, Swift 2 renames the latter into repeat .. while. Option sets Options sets are a way to represent a set of booleans in Swift 1.x: viewAnimationOptions = nil viewAnimationOptions = .Repeat | .CurveEaseIn | .TransitionCurlUp if viewAnimationOptions & .TransitionCurlUp != nil { ... This kind of syntax is widely used in Cocoa, but in actuality it is just a remnant of the C language. So, Swift 2 does away with it and introduces its own type for option sets, represented by the OptionSetType protocol: struct MyFontStyle : OptionSetType { let rawValue : Int static let Bold = MyFontStyle(rawValue: 1) ... static let Strikethrough = MyFontStyle(rawValue: 8) } So, an option set can now be any Set or struct type conforming to the OptionSetType protocol. This leads to much cleaner syntax when using the option set: myFont.style = [] myFont.style = [.Underline] myFont.style = [.Bold, .Italic] if myFont.style.contains(.StrikeThrough) { This syntax does not rely on bitwise operations as the previous example, nor does it conflate the use of nil to represent an empty option set. It should be noted that option sets rely on another new feature in Swift, namely default implementations for protocol extensions, so just by conforming to the OptionSetType protocol you get default implementations for, e.g., the contains method. We will cover protocol extensions later. Functions and Methods Swift 1.x syntax for declaring functions and methods inherited two distinct conventions derived respectively from C, where function arguments have no labels, and Objective-C, that introduced labels for method arguments. So you had the following type of declarations: func save(name: String, encrypt: Bool) { ... } class Widget { func save(name: String, encrypt: Bool) { ... } save("thing", false) widget.save("thing", encrypt: false) In Swift 2, the above code would be: func save(name: String, encrypt: Bool) { ... } class Widget { func save(name: String, encrypt: Bool) { ... } save("thing", encrypt: false) widget.save("thing", encrypt: false) So, functions adopt the same conventions as methods: - the first argument name is implied by the function name; - subsequent arguments do carry labels. Those changes, though, do not apply to functions imported from C and Objective-C APIs. Additionally, the model to declare parameter labels has been streamlined by removing the # option, which was used in Swift 1.x to denote an parameter having the same internal and external name. Unit Testing A problem with unit testing Swift 1.x code is that Swift 1.x requires you to mark symbols Public to be visible to unit test bundles. A consequence of this is that many symbols ended up being Public that really were not meant to be. Xcode 7 will automatically build Swift 2 code in a special “compile for testing” build mode that makes it easier to control visibility from unit tests without making symbols Public. Indeed, unit tests can use @testable and import <Module> statements to get access to both public and internal symbols in <Module>. Release builds are not affected by this change to preserve the correct behavior as to both performance and access control. Pattern matching The most common form of pattern matching in Swift is possibly the if let statement to deal with optionals and bind them safely to a symbol. Using the if let statement often leads to what is known as the “pyramid of doom”, when too many if let statements are nested together. Swift 1.2 improved things a little by introducing compound conditions in if let statements: if let dest = segue.destinationViewController as? BlogViewController let blogIndex = tableView.indexPathForSelectedRow()?.row where segue.identifier == blogSegueIdentifier { But this does not solve the problem of early exits, and does not easily allow to carry through some alternative action when an optional cannot be unwrappewd. In Swift 2, a new guard statement aims to make dealing with optionals much more natural: guard let name = json["name"] as? String else { return .Second("missing name") } A guard statement conditionally unwraps an optional and binds it to a name, just like if let does. But instead of being visible in the scopr created by if let, the bound name shares the same scope as the executed guard. The scope introduced by the guard statement is solely used to exit the current scope, e.g. by returning, throwing, breaking, asserting, or in any other way. By doing this, the compiler has the guarantee that the names in the guard statement are bound and can be used in the fall-trough. guard statements can also use compound conditions, just as if let: guard let name = json["name"] as? String, let year = json["year"] as? Int else { return .Second(“bad inputâ€) } let person = processPerson(name, year) You can also use more advanced pattern matching with guard case statements. Consider the following type: enum Entity { enum EntityType { case EntityTypeA case EntityTypeB } case EntityWithFamilyAndTrait(type: EntityType, family: Int, trait: Int) } Now, when we have an Entity? optional, we can use pattern matching to ensure that it matches a desired EntityType and additionally bind a name to one of its properties: var entity : Entity? ... guard case let Entity.Entry(.EntityTypeA, _, t) = entity where t < SOME_T else { <bail out> } <do something with t> Similarly, the if case statement can be used, which is the dual of guard case. Another form of pattern matching available in Swift is the switch statement, which allows to check against optionals, class hierarchies, ranges, etc. switch bar() { case .MyEnumCase(let value) where value != 42: doThing(value) default: break } One of the drawbacks of switch is that it has to be exhaustive, and this can be a pain. So, Swift 2 has ported the switch/ case pattern matching to other control statements. if case is one of those, and it allows to rewrite the above switch more succinctly as follows: if case .MyEnumCase(let value) = bar() where value != 42 { doThing(value) } Another statement to support pattern matching is for .. in, so you can check for a boolean inline: for value in mySequence where value != "" { doThing(value) } instead of the old equivalent: for value in mySequence { if value != "" { doThing(value) } } for .. in also supports specifying a case filter using pattern matching to specigy more complex conditions: for case .MyEnumCase(let value) in enumValues { doThing(value) } Similarly to for case, while case allows to use pattern matching in a while statement. Other improvements to pattern matching in Swift 2 are support for x? pattern for optionals, improved switch exhaustiveness checker, and a new warning of “unreachable case”. API availability API availability is a new feature aiming to improve how programmers can ensure they do not use any unsupported API. This is usually done by using the respondsToSelector: method, but this is less than ideal. In Swift 2 the compiler guarantees that you do not use any API that is not supported on your minimum deployment target by emitting a warning when you try to do that. For the compiler to let you use a more rencent API, it must be guarded by an if #available(...) check, e.g.: if #available(OSX 10.10.3, *) { //-- 10.10.3-only API can be used here } The * in the above example makes sure that check will also succeed for any newer SDK version than 10.10.3. Protocol Extensions Protocol extensions are a Swift 2 feature that allows you to define behavior on protocols, rather than in each type that conforms to that protocol. Protocol extensions go hand in hand with class extensions, which is a mechanism available in Swift 1.0, and provide more flexibility. Say you want to create the following extension to an Array class: extension Array { func countIf(match: Element ->maBtocohl:)T.-G>enIenrtat{or.Element -> Bool) -> Int { var n = 0 for value in self { if match(value) { n++ } } return n } } This is perfectly fine. On the other hand, the countIf implementation does not really rely on anything specific to the Array class and might be used without change for other collections. In Swift 1, you either duplicate that implementation in every collection class, such as dictionaries, sets, etc., or you use a global function: func countIf<T : CollectionType>(collection: T, match: T.Generator.Element -> Bool) -> Int { ... } This is not optimal on two accounts: it is not as easy to read as the Array extension, and it is no longer a method and does not feel like a real extension to the class. Furthermore, it is not as easily discoverable, e.g. it will not show up in autocompletion. To fix this, Swift 2 allows you to define method implementations inside of a protocol, so they are inherited by all types conforming to that protocol: extension CollectionType { func countIf(match: Element -> Bool) -> Int { var n = 0 for value in self { if match(value) { n++ } } return n } } Protocol extensions have wide ranging effects, in that they have allowed to convert Swift 1.x global generic algorithms such as filter and map into methods: let x = filter(map(numbers) { $0 * 3 }) { $0 >= 0 } //-- Swift 1 let x = numbers.map { $0 * 3 }.filter { $0 >= 0 } //-- Swift 2 Furthermore, protocol extension are at a base of a powerful new design approach, dubbed protocol-oriented programming, that tries to address a few issues found in OOP, such as: implicit sharing of referenced objects; rigidity and fragility of inheritance; frequent necessity of downcasting in overridden methods. It may be worth noting that Swift will emit a warning in case a class tries to conform to two different protocols that happen to define a default implementation for a method that both define. This helps avoiding or taking under control the “diamond problem”. Error handling To understand Swift’s new features related to error handling, it can help to consider that there are three ways that a function can fail: - a lot of functions can fail in one fairly simple, sort-of innate way, such as when trying to convert a Stringinto an Int; such cases are satisfactorily handled through an optional return value; - at the other end of the spectrum, there are logic errors in a program caused by coding errors, such as indexes out of bounds, unmet preconditions, etc., that are very much harder to deal with, because usually you do not know how to handle them. - a third case is that of detailed, recoverable errors, such as when a file is not found, or when there is a network failure, or a user cancelling an operation. The handling of the third kind of situations is what Swift 2 tries to improve. If we consider a typical way that error handling is carried through in Swift and Objective-C, we find the following pattern, where a function receives an inout NSError? argument and returns a Bool to represent the success or failure of the operation: func preflight(inout error: NSError?) -> Bool { if (!url.checkResourceIsReachableAndReturnError(&error)) { return false } resetState() return true } This approach has some downsides, such as adding a lot of boilerplate, making it somewhat less clear what the method does, and, most importantly, requiring the manual implementation of a convention, i.e., what the Bool return value stands for. On the other hand, it also has some upsides, such as making it evident that both checkResourceIsReachableAndReturnError and preflight can fail, and having a very explicit, human understandable control flow. Now in Swift 2, you can express the fact that a function can fail by using the throws keyword: func checkResourceIsReachable() throws { ... } Any function that can fail must be called using the try keyword, otherwise a compiler diagnostics is emitted. When calling a function with try, you can handle the error locally using a do .. catch block: func preflight() { do { try url.checkResourceIsReachable() resetState() return true } catch { return false } } Alternatively, you can skip error handling and allow the error to propagate to the caller: func preflight() throws { try url.checkResourceIsReachable() resetState() } The do .. catch statement allows the use of pattern matching, so you could write: func preflight() { do { try url.checkResourceIsReachable() resetState() return true } catch NSURLError.FileDoesNotExist { return true } catch let error { return false } } There are times when you want your program to fail when some anomalous condition arises, e.g., you cannot find a resource that should be present in your app bundle. For such cases, Swift provides a shorthand through the try! keyword: func preflight() { try! url.checkResourceIsReachable() resetState() } When a function wants to signal a failure condition, it can use the throw statement specifying an error to be thrown. Any type that conforms to the ErrorType protocol can be thrown, which includes NSError. A new possibility opened by this is to define error types as enums, which can be done very easily: enum DataError : ErrorType { case MissingName case MissingYear case SomethingMissing(String) // add more later } Enums are ideal to represent groups of related errors and can also carry data in a payload, as shown above. Another important new feature related to the try catch mechanism is defer, which allows to make sure that some action is carried out whenever the current scope is exited. This is handy to handle cases such as the following one to ensure that didEndReadingSale is called both when the function exits normally and when it throws: func processSale(json: AnyObject) throws { delegate?.didBeginReadingSale() defer { delegate?.didEndReadingSale() } guard let buyerJSON = json["buyer"] as? NSDictionary { throw DataError.MissingBuyer } let buyer = try processPerson(buyerJSON) guard let price = json["price"] as? Int { throw DataError.MissingPrice } return Sale(buyer, price) } Swift’s implementation of try .. catch is not as costly in terms of performance as it happens in other languages. Specifically, in Swift there is no table-based unwinding of the stack and the mechanism is similar in performance to an explicit “if” statement. Using try .. catch in Swift 2 allows to streamline the declaration of methods that can fail, so a typical method taking an NSErrorPointer argument (the equivalent to Objective-C NSError**): func loadMetadata(error: NSErrorPointer) -> Bool //-- Swift 1 now becomes: func loadMetadata() throws //-- Swift 2 Similarly, a method that signals an error condition through an optional being nil: class func bookmarkDataWithContentsOfURL(bookmarkFileURL: NSURL, -> NSData? //-- Swift 1 can now be written as in the following example as a method that throws and returns a non optional type: class func bookmarkDataWithContentsOfURL(bookmarkFileURL: NSURL) throws -> NSData //-- Swift 2 The transformations above are applied automatically by Xcode Migrator, already mentioned above, and have been also propagated throughout the standard library. Diagnostics In addition to this, Swift 2 brings a great number of improvements to diagnostics and fix suggestions, such as correctly detecting when the developer is trying to change a var through a non-mutating method of a struct, or when a var property is never changed after initialization, or a let property never read, or when ignoring the result of a function call, and more. Interoperability When you write Swift code, a set of predefined rules determines whether and how methods, properties, etc. are exposed to Objective-C. Furthermore, a few attributes are available to get more control on that. Those are: @IBOutletand @IBActionto let Swift attributes and methods be usable in Interface Builder as outlets and actions; dynamic, which will enable KVO for a given property; @objc, which is used to make a class or a method callable from Objective-C. class MyController : UIViewController { @IBOutlet var button : NSButton @IBAction func buttonClicked(sender) { } @objc func refresh() { } } In Swift 2, a new @nonobjc attribute is available to explicitly prevent a method or property from being exposed to Objective-C. This can be useful when, e.g., you define two Swift methods that only differ by their closure type – this is legal in Swift, whereas in Objective-C methods differ by name: class CalculatorController : UIViewController { func performOperation(op: (Double) -> Double) { // ... } @nonobjc func performOperation(op: (Double, Double) -> Double) { // ... } } Another area where Swift 2 tries to improve interoperability is with C pointers. This aims to fix an annoying limitation of Swift that prevented it from fully working with important C-based frameworks such as Core Audio that makes extensive use of callback functions. In short, in Swift 1.x it was not possible to define a C function from a closure that captures context. In Swift 2.0, that limitation has been lifted and now a C function pointer is just a special kind of closure annotated with the @convention(c) attribute: typedef void (*dispatch_function_t)(void *); //-- C typealias dispatch_function_t = @convention(c) (UnsafeMutablePointer<Void>) -> Void //-- Swift Objective-C Apple has introduced three major new features to Objective-C in Xcode 7: - nullability; - lightweight generics; __kindoftypes. Nullability Although introduced already in Xcode 6.3, it is worth mentioning that the Objective-C allows now to precisely characterize the behavior of any methods or properties as to their being allowed to be nil or not. This maps directly into Swift’s requiring an optional or non-optional type and makes an interface way more expressive. There are three nullability qualifiers: nullable( __nullablefor C pointers), meaning that a pointer can be niland mapping to a Swift optional; nonnull( __nonnullfor C pointers), meaning that nilis not allowed and mapping to a Swift non optional type; null_unspecified( __null_unspecifiedfor C pointers), where no information is available as to what behavior is supported/required; in this case, such a pointer maps to an auto-wrapped Swift optional. The qualifiers listed above can be used to annotate Objective-C classes as in the following example: NS_ASSUME_NONNULL_BEGIN @interface UIView @property(nonatomic,readonly,nullable) UIView *superview; @property(nonatomic,readonly,copy) NSArray *subviews; - (nullable UIView *)hitTest:(CGPoint)point withEvent:(nullable UIEvent *)event; @end NS_ASSUME_NONNULL_END The example above uses an audited region, i.e., a region delimited by NS_ASSUME_NONNULL_BEGIN and NS_ASSUME_NONNULL_END, to select sensible defaults. This allows developers to only annotate non-default cases. In an audited region, defaults are: - single-level pointers are assumed to be nonnull; - NSError** parameters are assumed to be nullable for both levels. Lightweight generics Lightweight generics in Objective-C have problably been the most highly requested feature for the last decade of Objective-C, according to Apple’s engineer. They are motivated first and foremost by their use with collection types, such as NSArray, NSDictionary, etc. One issue that Objective-C collection types have is that when ported to Swift they lose almost every type information, defaulting to collection of AnyObject and forcing to lots of downcasts. So, this is how an array of view can be declared in Xcode 7: @interface UIView @property(nonatomic,readonly,copy) NSArray<UIView *> *subviews; @end which corresponds to the following Swift declaration: class UIView { var subviews: [UIView] { get } } CLANG is able to enforce type safety for typed collections and will emit a diagnostic when you try to add the wrong object type to a typed collection. Type collections are just a specific case of generics, which are a generic feature of the language now. So, this is how you would declare a generic class: interface NSArray<ObjectType> : NSObject - (ObjectType)objectAtIndex:(NSUInteger)index; - (instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt; - (NSArray<ObjectType> *)arrayByAddingObject:(ObjectType)anObject; @end As usual in many languages, type parameters are specified in <..> and they can be used throughout the interface to represent the actual type. The same idea holds for class extensions and categories, that can be typed or non-typed. This change to the language has been implemented in a way to provide binary compatibility, so no changes to the Objective-C runtime are required and any binary using generics will still run unmodified on older OS versions. “Kindof” types “Kindof” types are related to generics and are motivated by the following case. As it is known, the UIView class defines its subviews property as an array of UIView objects: @interface UIView @property(nonatomic,readonly,copy) NSArray<UIView *> *subviews; @end So, if we add a UIButton to a parent UIView as its bottom-most subview and try to send it a message that is only meant for a UIButton, then the compiler will emit a warning. This, on the other hand, is perfectly fine because we know that the bottom-most subview is a UIButton: [view insertSubview:button atIndex:0]; //-- warning: UIView may not respond to setTitle:forState: [view.subviews[0] setTitle:@“Yes†forState:UIControlStateNormal]; Using “kindof” type, we can introduce some flexibility in the Objective-C type system so implicit casts to both the superclass and to any subclass are allowed: @interface UIView @property(nonatomic,readonly,copy) NSArray< _kindof UIView *> *subviews; @end //-- no warnings here: [view.subviews[0] setTitle:@“Yes†forState:UIControlStateNormal]; UIButton *button = view.subviews[0]; Generics and “kindof” types allow developers to remove id/ AnyObject from almost anywhere in their APIs. id can still be required, though, mostly in the case when there is really no available information as to the type that is being handled: @property (nullable, copy) NSDictionary<NSString *, id> *userInfo; Next Article in Series The next and final article in the series will cover what is new with Apple Developer Tools, including Xcode 7, Interface Builder, LLDB, etc. About the Author.. Community comments Oliver by Oliver Dodson / Objective-C and Swift by John Oldman / Swift rules by Petter Tchirkov / Swift vs Objective-C by Alina Kem / Swift opportunities by Nataly Palienko / Objective-C and Swift by Aleksandra Bessalitskykh / Oliver by Oliver Dodson / Your message is awaiting moderation. Thank you for participating in the discussion. It's hard to think of any huge downsides to using Swift rather than Objective-C. The only thing I can think of is that some developers might not be so keen on converting their apps since they've invested so much time into learning and using Objective-C and their codebases are likely big. Apple hasn't given a future date for when they plan to drop support for Objective-C (maybe they never will?). But the interoperability of Swift and Objective-C and fun of learning a new language make that somewhat hard to believe. Also I Recommend read mlsdev.com/en/blog/51-7-advantages-of-using-swi... Objective-C and Swift by John Oldman / Your message is awaiting moderation. Thank you for participating in the discussion. Clang and Swift both use the same underlying runtime, and Swift doesn't have any equivalent to Objective-C++ for integrating things like Boost or Qt into an application. On top of that, there's a fairly large amount of legacy code in ObjC and Clang has a small but significant user base outside the Applesphere that would be very unhappy if Apple left them high and dry. More thoughts yalantis.com/blog/how-to-move-your-app-from-obj... Swift rules by Petter Tchirkov / Your message is awaiting moderation. Thank you for participating in the discussion. I think Swift is much more readable, it's easier to maintain, requires less code. Proofs:... thunderrise.com/blog/swift-vs-objective-c:-the-... Swift vs Objective-C by Alina Kem / Your message is awaiting moderation. Thank you for participating in the discussion. Actually, both languages have their advantages and tradeoffs, each occupies its niche, yet they do have a possibility to work together.Swift gains poularity ...Some interesting information to read erminesoft.com/objectivec-vs-swift/ Swift opportunities by Nataly Palienko / Your message is awaiting moderation. Thank you for participating in the discussion. Swift gives you a lot of opportunities, for example, you can draw linear schedules with use of standard components on Swift even if it is narrowly specialized and absolutely unported steelkiwi.com/blog/drawing-linear-schedules-use... Objective-C and Swift by Aleksandra Bessalitskykh / Your message is awaiting moderation. Thank you for participating in the discussion. Great article Sergio. Very helpful! As you know, selecting the most appropriate language depends on the project and team context, and preference to a particular programming language. In my opinion, if you want to create new modern apps, Swift should definitely be a better choice. Swift has a lot of advantages, there are the main benefits of it: - Apple and IBM move forward with Swift - Less code, less legacy - Swift is faster, less error-prone, open-source and interactive - Swift is closer to other platforms I suggest you should take a look at this article mlsdev.com/blog/swift-vs-objective-c to find out more information about Swift and Objective-C and how they should be better utilized.
https://www.infoq.com/articles/whats-new-ios9-swift-objc/?itm_source=articles_about_Swift&itm_medium=link&itm_campaign=Swift
CC-MAIN-2020-50
refinedweb
4,394
52.19
4.3. Embedding ApacheDS as a Web Application has been edited by Emmanuel Lécharny (Nov 19,.4. gray elements will be developed in two steps and.4 and Tomcat 6.0.18 installed locally; it uses and (in the case of ApacheDS) copies the necessary files from their lib directories to the lib directory of the web application. You will likely want to adjust the installation directories defined in the build.xml file. Note: Within the build script, Tomcat is only used for compilation. To be more concrete, only the servlet-api.jar is needed. Other options to provide this library at build time are imaginable, especially if you plan to deploy ApacheDS on a Web Application Server other than Tomcat. After building the project, the classes folder will contain the compiled class files of the two $.1.PrintWriter; import java.util.Hashtable; import javax.naming.Context;let; } }: To get the sample code you can either generate a maven project using the apacheds-webapp archetype or StartStopListener.java (Step 1) RootDseServlet.java (Step 2) web.xml ApacheDSWebApp.zip all sources including a build script for Apache Ant (build.xml)
http://mail-archives.apache.org/mod_mbox/directory-commits/200811.mbox/raw/%3C20571412.1227133200026.JavaMail.www-data@brutus%3E/
CC-MAIN-2015-35
refinedweb
190
60.72
Hi Guys, Can someone please explain me why this is happening #include<iostream> using namespace std; class a { public: int a1; // If I remove this it'll work fine a() { cout << "Constructor of a \n"; } ~a() { cout << "Destructor of a \n"; } }; class b : public a{ public: b() { cout << "constructor of b \n"; } virtual ~b() { // If I remove virtual from here ... it'll work fine cout << "destructor of b\n"; } }; int main() { a *p = new b; delete p; return 0; } Result is : Constructor of a constructor of b Destructor of a a.out(1563) malloc: *** error for object 0x100154: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug ---------------------------------------------------------------- I know that if I'll put virtual in front of the destructor of the base class code will work fine. But, I want to use it the above way. Can someone please explain me the reason behind this kind of behavior? Thanks in advance
https://www.daniweb.com/programming/software-development/threads/120725/virtual-destructor-problem
CC-MAIN-2017-17
refinedweb
155
63.53
On Tue, Mar 6, 2012 at 6:58 PM, Peter Zijlstra <peterz@infradead.org> wrote:> On Tue, 2012-03-06 at 17:57 +0800, Lai Jiangshan wrote:>> /*>> + * 'return left < right;' but handle the overflow issues.>> + * The same as 'return (long)(right - left) > 0;' but it cares more.>> About what? And why? We do the (long)(a - b) thing all over the kernel,> why would you care more?@left is constants of the callers(callbacks's snapshot), @rightincreases very slow.if (long)(right - left) is a big negative, we have to wait for a longtime in this kinds of overflow.this kinds of overflow can not happen in this safe_less_than()>>> + */>> +static inline>> +bool safe_less_than(unsigned long left, unsigned long right, unsigned long max)>> +{>> + unsigned long a = right - left;>> + unsigned long b = max - left;>> +>> + return !!a && (a <=
https://lkml.org/lkml/2012/3/6/250
CC-MAIN-2018-47
refinedweb
135
79.5
Description – In this tutorial, we will learn - How to create a WCF Service - How to create Service Endpoints - How to Host the Service over IIS - How to Consume the service using ASP.NET Web application Step 1: First open Visual Studio (any version) and Create a new Class Library project. Step 2: Once the project gets created, delete the Class1.cs file which is auto-generated. Step 3: Right Click on Project Name and Add a WCF Service. Step 4: Once the WCF Service is added to the project, it will add two types of files mentioned below. As you can see above, System.ServiceModel is added to the reference libraries as this is the main .NET assembly which supports WCF Services. So, it is a must. Step 5: First open IDemoService.cs file and replace the code with the below mentioned code. using System.ServiceModel; namespace DemoWCFService { [ServiceContract] //Till will tells the class file that this is a WCF Service public interface IDemoService { [OperationContract] //This will expose the Operations that can be operated using this WCF Service string GetResponse(); //This is the Method name implementation. } } As you can see above, System.ServiceModel is referenced in the using statements. IDemoService interface is decorated with [ServiceContract] attribute which tells the project that this is a WCF Service. GetResponse() is a custom method which returns string and it is also decorated with [OperationContract] attribute, which tells that this method can be consumed by client. Step 6: Open DemoService.cs file and replace the code with the below mentioned code. namespace DemoWCFService { public class DemoService : IDemoService { string IDemoService.GetResponse() => "This is the Response from WCF Service."; } } As it is very simple to understand, that the method that we have declared in the Interface file is implemented here and it is returning the simple text. Step 7: Now comes the main concept i.e. Endpoints. Endpoints are the access points for the client applications to access the WCF Service for request and response functionality. They have main 3 properties: - Address – it tells at which location the service is hosted - Type of Binding – it specifies that in which format the data is to be exchanged - Contract – it is actually used to specify the interface name that we have just created. It tells which methods are accessible to the client. <configuration> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="mexBehaviour"> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <services> <service name="DemoWCFService.DemoService" behaviorConfiguration="mexBehaviour"> <endpoint address="" binding="basicHttpBinding" contract="DemoWCFService.IDemoService"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="" /> </baseAddresses> </host> </service> </services> </system.serviceModel> </configuration> You will find a file named app.config, the above code is to be pasted in that file. If you are using Visual Studio 2013 and above, so this file with this code will be autogenerated but not in the earlier versions. Now let’s have a look at the app.config file code. - In the behaviours element, you can see that a tag name serviceMetadata is added. This tag allows the MetaData of the service to be available to the client in the form of WSDL document. If you wish to know what is WSDL document, I will explain that in a later tutorial but for now think it to be a document which shares data to the client. - In the services tag, we have named the service which is the combination of namespace of class file followed by classname. - Then we have specified endpoint (explained above), address property has been left blank, but you can give it any meaningful name, binding is basic HTTP binding, contract name is the name of the interface. Identity element is used to specify that we want to host the service at localhost means using IIS. - Another endpoint is being mentioned which allows WSDL document to be generated. - Then in the host address, we have added the baseAddress as localhost followed by port number of local system. Now we have completed creating our service. Now we need a hosting application which will host it over HTTP Protocol. Step 8: Now add a new Windows Console application project to the same solution. Once the project is created, Add a reference to System.ServiceModel assembly and the WCF Service project. Now open Program.cs file and replace the code with the below one. using System; using DemoWCFService; using System.ServiceModel; namespace DemoServiceHost { class Program { static void Main(string[] args) { using (var host = new ServiceHost(typeof(DemoService))) { host.Open(); Console.WriteLine("The Host Started Successfully at " + DateTime.Now); Console.ReadLine(); } } } } In the above code, we have created the object of ServiceHost class and pass the type of service to its constructor. The rest of the code is self explanatory. Now in the App.config file, add the same code as that of the WCFService project’s App.config file that we just discussed above. Set this as Startup project and run the application using Ctrl + F5 keys together, a console window will open which confirms that your service is now hosted. Now its the time to consume that service in an ASP.NET Web application Step 9: Add a new ASP.NET Web Application project to the same solution. Step 10: First thing to keep in mind is that the service host should be running to be consumed. So, please go to folder of your Service host project and find the bin folder, there you will find exe file, run that in the Administrator mode. Step 11: Lets consume the WCF Service that we created to generate the proxy classes so that we can use them. Step 12: Add a new Webform to the project and press f7 key to move to the source code file. Add the following code to the Page_Load event. using System; using DemoWCFServiceClient.DemoWCFServiceConsumer; namespace DemoWCFServiceClient { public partial class index : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { var client = new DemoServiceClient(); Response.Write(client.GetResponse()); } } } Just you need, is to add the Service proxy class in the using directive and in Page_Load() event, we create instance of the client and the method of the WCF Service will be automatically visible to the instance as shown in the above images. Now, finally you have consumed the service, lets run the project and check if everything is fine but before that we need to do some settings to run the host and web application at the same time. Just follow the below two steps: Now press Ctrl + f5 together and web page will load and the response from wcf service will be displayed on the page as shown below. If I missed something, please comment it so that I can update OR give your valuable feedback and share. Enjoy coding!! One thought on “Basics of WCF Service with Hosting and Consuming using ASP.NET” […] Classes, Interfaces. For a basic knowledge of WCF Services, I recommend to read my previous article which will makes it easy for you to understand this […]
https://debugsolutions.wordpress.com/2016/07/10/basics-of-wcf-service-with-hosting-and-consuming-using-asp-net/
CC-MAIN-2017-34
refinedweb
1,172
56.55
1) I have the following <taskdefs: ]]> 2) Starting the build file as follows doesn't work, see the image attached: ]]> Setting -> IDE Settings -> Resources doesn't help as well - there's nothing to map the URI to. See "XML Namespace Support" Attachment(s): 1.png What worse - having above errors in the beginning of the build file totally disables all Ant's completions :( It also disables all Ctrl+Click tooltips .. I meant Ctrl+Space completions If this was the only problem... The ant editor seems to have a hitch against custom taskdefs. Isn't nobody concerned about this issue ? Without proper support of namespaces for custom Ant tasks - it's impossible to recognize to which package some custom task belongs, as usually the only person who knows that is the one who used that task. For example - people go and ask me what is <propertycopy and I have to tell them it's Ant-Contrib every time. If it was written as <ant-contrib:propertycopy - no question was asked at all. The same about <deploy vs <tomcat:deploy, etc and etc .. I really hope someone will adress this issue and make usage of custom tasks in our build files much more readable and easy.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206921145-Ant-project-xmlns-xyz-XML-Namespace-Support-isn-t-recognized
CC-MAIN-2020-05
refinedweb
204
70.94
This week I discovered graph-tool, a Python library for network analysis and visualization that is implemented in C++ with Boost. As a result, it can quickly and efficiently perform manipulations, statistical analyses of Graphs, and draw them in a visual pleasing style. It’s like using Python with the performance of C++, and I was rightly excited: It's a bear to get setup, but once you do things get pretty nice. Moving my network viz over to it now!— Benjamin Bengfort (@bbengfort) June 24, 2016 The visualization piece also excited me; as I tweeted, graph-tool sits between matplotlib and Gephi. It does a better job than matplotlib at the visualization, including things like edge curvature and directionality markers that are very difficult to do in native matplotlib. The graphs are very comparative to Gephi renderings, though it is probably a lot easier to do in Gephi then coding in graph-tool. Because graph-tool is a C++ implementation, you can’t simply pip install it (giant bummer). I used homebrew to install it, and got it working outside of a virtual environment. I am not sure how to add it to a virtualenv or to the requirements of a project yet, but I imagine I will simply lazy load the module and raise an exception if a graph tool function is called (or gracefully fallback to NetworkX). Ok, enough loving on graph-tool. Let’s do what we came here to do today, and that’s convert a NetworkX graph into a graph-tool graph. Converting a NetworkX Graph to Graph-Tool Both NetworkX and Graph-Tool support property graphs, a data model that allows graphs, vertices, and edges to have arbitrary key-value pairs associated with them. In NetworkX the property graphs are implemented as a Python dictionary, and as a result, you can use them just like you’d use a dictionary. However, in graph-tool these properties are maintained as a PropertyMap, a typed object that must be defined before the property can be added to a graph element. This and other C++ requirements make graph-tool Graphs a harder to generate and work with, though the results are worth it. First a note: import networkx as nx import graph_tool.all as gt We will refer to networkx as nx and graph-tool as gt and prefix variables accordingly, e.g. nxG and gtG refer to the networkx and graph-tool graphs respectively. The snippet is long, but hopefully well commented for readability. As you can see, converting a networkx graph or indeed even creating a graph-tool graph is very involved primarily because of the typing requirements of the C++ implementation. We haven’t even dealt with pitfalls like other Python objects like datetimes and the like. In case you didn’t want to inspect the code in detail, the phases are as follows: - Create a graph-tool graph, using is_directedto determine the type. - Add all the graph properties from nxG.graph - Iterate through the nodes and add all their properties - Create a special idproperty for nodes since nx uses any hashable type - Iterate through the edges and add all their properties - Iterate through the nodes (again) and add them and their values to the graph - Iterate through the edges, use a look up to add them and their values Potentially there is a mechanism to clean up and make this better, faster or stronger - but I think the main point is to illustrate how to get graph-tool graphs going so that you can use their excellent analytics and visualization tools!
https://bbengfort.github.io/2016/06/graph-tool-from-networkx/
CC-MAIN-2021-17
refinedweb
599
56.69
User talk:LFaraone From OLPC We could use some help welcoming new users here :-) Also, with userboxen. Sj talk 17:49, 6 December 2007 (EST). I'm thinking maybe that that kind of archiving is too fierce Hi, sure, be bold. Over the years tons of folks have posted lots of basically useless dross to Talk:The_OLPC_Wiki. But don't throw the baby out with the bathwater! Under the current set-up, to find the older comments and dialogs, one must click "show" in the "there's an archive" box, then click "001". Very, very non-intuitive, which means that the content of the archive will be seen very, very rarely. Given the specifics of the content, maybe that's not such a bad thing. But I'd recommend setting the default /delay-until-archived/ at three months, not one month, and I'd recommend chopping up the existing archive retroactively in to 3-month chunks. I'm trying to do what I can with the "ask a question" archive, and while what I'm doing isn't ideal either, and isn't automate-able, I think it leaves the underlying content more accessible. ~ Hexagonal 10:34, 11 December 2007 (EST) - (pasted in here) I've reverted my changes, and will set up 3 month-old archiving. Three month chunks might be a little bit difficult to do, would one month chunks be acceptable? ffm bot flag foruser:fireBot Added. Careful with that; use it in good health. Automated archiving is no substitute for human care; in particular, a slowly-developing page doesn't need regular archives. And in the Q&A/FAQ cases, we need to cull out good q's and a's from the long list that is there. Sj talk 19:14, 11 December 2007 (EST) activated lease I'm not sure why krstic full-protected the page. You should ask him... I would guess it is b/c it's supposed to be sensitive. On the other hand, it's clearly not as clear as it could be yet. Meanwhile, leave specific edits you want to make on the talk page. --Sj leave me a message 21:36, 30 December 2007 (EST) mop, bucket, broom You are now an admin. Note that we don't yet have a full set of policies on this wiki, so please feel free to help put policies in writing and to make good use of the OLPC: namespace. --Sj leave me a message 11:52, 1 January 2008 (EST) need your comment Hey ffm, I need your comment in order to obtain the admin permission... Please help me out at: Administrators#Chih-yu_Chao Thanks a lot! Chihyu 15:10, 7 January 2008 (EST) welcome message feel free to edit it to make it more generic. I can always make a Template:Welcome-sj template :) --Sj leave me a message 16:53, 8 January 2008 (EST) Weekly Zine (Left on Talk:Weekly_zine) > I'd be happy to give the report on admins, vandals, and whatnot. > ffm 18:08, 15 January 2008 (EST) You are on! :) Thanks for offering. The first issue is monday, so summaries do by this friday/saturday to Seth. I added you to the editorial board list. And if you can think of a better short two/three word description of your area of interest, go ahead and update too. --IainD Interwiki map stuff Hi! Your request was handled... I went with OLPC: I hope i got what the URL should be: rather than .... if not, please advise ASAP as your request didn't include the desired URL. This is an important wiki and I want to make sure I/we did it right. Probably best to drop me a mail on some WMF wiki if it's urgent, although I do have my watchlist set to mail notify me here. Best. ++Lar: t/c 22:48, 18 January 2008 (EST) Re: my request) a buggy pagename Hello. I've requested deleting a page. Please check this page by this URI. (The former may be linked the page you already deleted, the latter is linked correctly.) -- LeeSI 02:20, 20 January 2008 (EST) wiki information for teamwiki members Hiya ffm, I need some help. A lot of support gang folks don't know much about wikis, and have no public information about them and what they do. I don't care about people's pseudonymity, but want to set a precedent that people who are working on sensitive information such as personal email addresses are people who themselves are well known within our community. Can you help me get support folks to add to their public profiles here? Thanks! --Sj leave me a message 15:14, 29 January 2008 (EST) zine work Nice work. Do you have any relevant images you could add? it would be good to have illustrators' and photographers' branches of the art community. --Sj talk 19:20, 5 February 2008 (EST) OOppsss... 'Zine .. MoS ffm, - I think we crossed paths in the 'zine world. Now that I see your 'MoS' page, I realized that had undid some of your edits not knowing why they were there. Sorry about that... BTW, great idea.. I had wondered the best way of doing feature/section summaries to the front page. :) Ixo 19:48, 5 February 2008 (EST) ixo or not ixo. Yes.. iain. I just went through the wiki and renamed everything to ixo. (!=DDM) --ixo 20:10, 5 February:26, 5 February 2008 (EST) IRC Chat.. posted answer, but you had already signed off ffm, (17:05:45) ixo: ffm: 'annoying' would definitely not be the word I would use. Although, I think I heard some frustration/angst in Kim's voice when she was talking about updates, and sometimes interruptions of 'we can fix that'.. threw her off a bit. There's allot of discussions with energy and enthusiasm, and sometimes we veer off topic quickly. Phone conference time is limited and expensive for some. Adam did a great job of 'pulling conversation back onto topic'. Some of the more specific technical/implementation details could be directed off-line with the one-or-two people interested in it. Many of the conf phone people were quiet backgrounders, and some were more vocal. I find it, always difficult to balance between too much or too little. *shrug* My basic approach, give the quiet ones a turn to speak first.. :) every once in awhile. Just my 2 cents. Keep up the enthusiasm ! (17:06:19) ixo: (doh.. that ended up being a bit longer than I thought... sorry... I didn't mean to drool on like that... *gulp*) So I hope that made sense ? thanks, :-) --ixo 20:41, 10 February 2008 (EST) yes, can reply yes, I can reply. I thought I should have my Contact info on the my TALK page, that's what won't stick. Sandy creating 'box' for email addresses How do create the 'box' around email addresses, great idea. I can do very basic HTML if you tell me how it is done. Thanks, CulsegSandy 20:33, 12 February 2008 (EST) Policy project See OLPC:Policy_project, now updated. --Sj talk 20:47, 13 February 2008 (EST) Java in Browse bug ffm, I posted a bug (#6465) for the Java plugin failing to load. I've tried 1.5.0_13 in both jdk and jre forms and get the same error. Java itself works fine, the plugin works under 'real' Firefox, which is interesting because both Browse and Firefox pick it up from the same place. Do you know, specifically, of a jre that works with Browse? Rmyers 10:57, 15 February 2008 (EST)) Why transclusions? Not sure exactly what you are trying to accomplish, but why do you need three pages and two transclusions to get 10 lines from Olpc-contrib/mw.py into Olpc-contrib and then into Manual_Wireless_Association, when you could just put it into Manual_Wireless_Association in the first place? Maybe I'm missing something, I'm willing to go with WP:AGF for now; but if there is not a compelling reason arguing against just putting the wiki-text directly into Manual_Wireless_Association then maybe you should simplify this, it's a wiki, not an obfuscated perl contest. Cjl 14:15, 20 July 2008 (UTC) Rename done You have been renamed from Firefoxman to LFaraone, as requested. A redirect is automatically set up from your old name to your new one. --Sj talk 06:11, 21 October 2008 (UTC) Nice weather for a jam
http://wiki.laptop.org/go/User_talk:LFaraone
CC-MAIN-2015-40
refinedweb
1,425
73.78
Revision history for Perl module XML::SemanticDiff 1.0004 2014-02-04 - Update the contact info for Shlomi Fish from the old one. 1.0003 2014-02-01 - Add separate LICENSE file (CPANTS). - Add inc/Test/Run/Builder.pm . 1.0002 2013-08-17 - Convert "Changes" (this file) to CPAN::Changes. - Thanks to . 1.0001 2013-08-17 - Fix - Case problem with "repository" in "Build.PL". - Remove trailing space. 1.0000 2009-07-28 - Fixed the POD displaying: - 0.99 2008-10-03 - Now can exclude some paths from the comparison: - 0.98 2008-09-13 - Added the LICENSE section to the POD (Kwalitee). - Added the "use warnings" (Kwalitee). - Added the "Repository URL" on the resources page. 0.97 2007-08-08 - Added the README (Kwalitee) - Specified the LICENSE (as "perl") explicitly in the Makefile.PL. (Kwalitee) - Added t/pod.t. (Kwalitee). - fixed the POD in the process. - Created a Build.PL script based on the Makefile.PL in order to make sure the META.yml is according to the SPEC. (Kwalitee). - Added the t/pod-coverage.t file and made sure the files have full POD coverage. (Kwalitee) - Made sure the second argument in compare can accept a processed XML result, and refactored the code in the process. Added the t/13to-doc-read.t test file. - Converted the "PathFinder" package in lib/XML/SemanticDiff.pm to "XML::SemanticDiff::PathFinder" to maintain namespace purity. - Converted the Pkg to use an object using Non-Expat-Options. Made the global variables as class members using accessors. 0.96 2007-07-03 - Fixed the warning emitted with the namespaces being undefined. (t/8nonexist_ns.t) - fixes - Fixed the search algorithm so it will identify the location of the XML tags properly. (t/09two-tags.t) - Applied a modified version of: - Fixes an exception when comparing XML with multi-byte characters. - Thanks to RMBARKER - t/10wide-chars.t - Applied a modified version of: - Fixes a case where the same tags in different places with identical contents, are not considered semantically identical. - Thanks to CLOTHO for reporting it and suggesting a fix. - t/11tag-in-different-locations.t - Added a regression test against bug: - Seems to already have been fixed. - t/12missing-element-has-o-as-cdata.t 0.95 2002-04-09 [ Undocumented changelog. ] 0.93 2001-06-14 - third (hopefully final) BETA - more doc fixes. 0.91 2001-06-12 - second BETA release. - code cleanup. - major doc fixes. 0.50 2001-05-25 - initial public BETA release. 0.01 2001-05-24 - original version; created by h2xs 1.19
https://metacpan.org/changes/distribution/XML-SemanticDiff
CC-MAIN-2015-48
refinedweb
426
62.95
InterruptHookIdle() Attach an idle interrupt handler Synopsis: #include <sys/neutrino.h> int InterruptHookIdle( void (*handler)(uint64_t *, struct qtime_entry *), unsigned flags ); Arguments: - handler - A pointer to the handler function; see below. - flags - Flags that specify how you want to attach the interrupt handler. For more information, see Flags, below. Library: libc Use the -l c option to qcc to link against this library. This library is usually included automatically. Description: The InterruptHookIdle() kernel call attaches the specified interrupt handler to the idle interrupt, which is called when the system is idle. This is typically used to implement power management features. The arguments to the handler functions are: - uint64_t* - A pointer to the time, in nanoseconds, when the next timer will expire. - struct qtime_entry * - A pointer to the section of the system page with the time information, including the current time of day. The simplest idle handler consists of a halt instruction.. Processor interrupts are enabled during the execution of the handler. Don't attempt to talk to the interrupt controller chip. The end of interrupt command is issued to the chip by the operating system values. Blocking states This call doesn't block. Returns: An interrupt function ID, or -1 if an error occurs (errno is set). Use the returned ID with the InterruptDetach() function to detach this interrupt handler. Errors: - EAGAIN - All kernel interrupt entries are in use. - EPERM - The calling process doesn't have the required permission; see procmgr_ability() .
https://developer.blackberry.com/playbook/native/reference/com.qnx.doc.neutrino.lib_ref/topic/i/interrupthookidle.html
CC-MAIN-2020-05
refinedweb
240
50.53
10695/how-can-i-calculate-number-of-days-between-two-dates In Java, I want to calculate the number of days between two dates. How can I do this? You may refer this. This might work for you. int days = Days.daysBetween(date1, date2).getDays(); You are making some conversions with your ...READ MORE Whenever you require to explore the constructor ...READ MORE You could probably use method invocation from reflection: Class<?> ...READ MORE List<String> results = new ArrayList<String>(); File[] files = ...READ MORE public static String daysBetween(String day1, String day2) ...READ MORE One possible solution could be using calendar ...READ MORE The following code might be helpful: public static ...READ MORE You can use Java Runtime.exec() to run python script, ...READ MORE import java.util.*; public class AmstrongNumber { public static void ...READ MORE import java.io.BufferedWriter; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; public class WriteFiles{ ...READ MORE OR Already have an account? Sign in.
https://www.edureka.co/community/10695/how-can-i-calculate-number-of-days-between-two-dates
CC-MAIN-2019-47
refinedweb
166
65.08
Spline with multiple segments On 12/07/2014 at 11:39, xxxxxxxx wrote: Hi I need some help. I try to build my own Point Treacer but i can only set 1 segment . Hope someone can help me. Download On 12/07/2014 at 15:11, xxxxxxxx wrote: A simplified Version: import c4d from c4d import utils def main() : #create spline tmp = c4d.SplineObject(6, c4d.SPLINETYPE_AKIMA) tmp.ResizeObject(6, 2) tmp.SetSegment(0, 3, False) tmp.SetPoint(0, c4d.Vector(0,12,0)) tmp.SetPoint(1, c4d.Vector(0,120,80)) tmp.SetPoint(2, c4d.Vector(0,20,70)) tmp.SetSegment(1, 3, False) tmp.SetPoint(0, c4d.Vector(23,0,0)) tmp.SetPoint(1, c4d.Vector(0,30,80)) tmp.SetPoint(2, c4d.Vector(0,200,70)) #create container container = c4d.BaseObject(c4d.Onull) tmp.InsertUnder(container) return container On 13/07/2014 at 06:13, xxxxxxxx wrote: What about continuing the indices with 3, 4, 5 instead of 0, 1, 2 which you have already set? :) Best, -Niklas On 13/07/2014 at 06:53, xxxxxxxx wrote: thx On 16/07/2014 at 12:07, xxxxxxxx wrote: I would really like to know how you got on with this as I have struggled a lot in the past to try and rebuild the tracer object. Thank you for your previous scene file, could you please post an updated one for us to learn from. Kind regards
https://plugincafe.maxon.net/topic/8027/10430_spline-with-multiple-segments
CC-MAIN-2020-40
refinedweb
239
63.9
ERROR: undefined macro. If @OSArch = By paullauze, in AutoIt General Help and Support Recommended Posts Similar Content - By JoGa Greetings, here is a Autoit3 v3.3.14.5, 64 Bit installation on windows 10 with current updates. In a simple script I'm Dllcall'ing a 64 bit dll. # T1.au3 Local $name = "T1DLL.dll" if (FileExists($name)) Then ConsoleWrite("DLL '" &$name &"' exists" &@CRLF) EndIf Local $DLL = DllOpen($name) if (@ERROR OR $DLL = -1) then ConsoleWrite("DllOpen ERROR=" &@ERROR &" DLL=" &$DLL &@CRLF) Else ConsoleWrite("DllOpen Success" &@CRLF) endif DllCall($DLL, "none:cdecl", "SomeFunction", "str", "DLL Call from T1.au3") if (@ERROR) then ConsoleWrite("DllCall ERROR=" &@ERROR &" DLL=" &$DLL &@CRLF) Else ConsoleWrite("DllCall Success" &@CRLF) endif The C code contains one 64 bit OpenCV call: cv::destroyAllWindows();. Excuting T1.au3 with SciTE gives: If the c code is compiled *without* the OpenCV call T1.au3 runs successful: I checked T1DLL.dll, it's definitely a 64 bit dll. What could cause the problem? Any hint would be very much appreciated. Thanks Wolf - By Irios Searching and searching but I'm unable to find anyone with a proper solution. I see a lot of similar questions on this topic, but nothing that really provides what I'm looking for. Basically, I just want to convert a 8 byte hex value to unsigned integer. I.e. "FFFFFFFFFFFFFFFF". I'm working on SNMP opaque data types, and UINT64 values end up as signed INT64 when I use the internal processing of AutoIt. (Yeah, I know, this is because AutoIt always uses signed) Example ( I know you guys love example code snippets haha, so here's a two-liner): $sUINT64 = "FFFFFFFFFFFFFFFF" ConsoleWrite( Dec($sUINT64) ) -1 is not the result I want, of course. And I don't want "1.84467440737096e+019" either by adding manually in AutoIt. I need the decimal value (as a string) of 264 = 18,446,744,073,709,551,616 Anyone got a clever UDF for this? Or will I have to write one myself, adding and multiplying each hex value, and generating a text string as a result? I know how it can be done, I just hoped someone already had done it so I could steal their code. -. -
https://www.autoitscript.com/forum/topic/152255-error-undefined-macro%09if-osarch/
CC-MAIN-2019-43
refinedweb
369
64.71
More Signal - Less Noise June has been a madhouse month; I’ve been working 80 hour weeks as has just about everyone who has anything to do with Silverlight, and yet there has been very little noise. It is, as they say, the quiet before the storm. As you know, we can’t yet talk about the biggest developments, but I can say that many of us are working on making sure that when Silverlight 3 ships the site is ready with videos and related material that is completely up to date. That means of course that existing videos must be checked for breaking changes, and new videos must be created to highlight the exciting new features in Silverlight 3 that have not yet been announced. We expect to have a great deal ready on the first day, and to keep it coming over the first weeks. Much more about that as soon as the cone of silence is lifted. To coincide with the release of Silverlight 3, I’m starting two new projects that I believe will greatly enhance my ability to meet the needs of a very broad range of developers. One of the concerns voiced in the past year, for example, was that the videos and tutorials were fine as far as they went, but each stood in splendid isolation, with little connection to the reality of creating software. Yet, we also know that one of the great benefits of the How Do I video series is that a developer can watch any without having to watch them all. I have found what I hope will be a terrific way to provide the best of both: the open and documented development of projects complex enough to touch on nearly every aspect of Silverlight, and to raise many deeply related issues such as I’ve named the overarching project AgOpenSource -- an on-going development project that will be completely tracked,documented and explored within a wiki-document housed inside my blog. AgOpenSource will consist of creating applications from initial brainstorming , through design, development, testing, delivery and what we are calling recycling. Now, not every application will be developed fully and not every application will be a candidate for the entire process, but if we do in fact build something that works and if it has value for our site, recycling indicates that we would then use that application as part of silverlight.net. The documentation for AgOpenSource explains that it will start out as a “Glass House” project in which the information flow will be pretty much one way. I’ll continue to create videos, mini-tutorials and so forth and I’ll also be building all the bits and pieces myself. It is my goal, and I expect to achieve it quite quickly, to move AgOpenSource to CodePlex and to make it an Open Source project, as described in the documentation. I believe that will greatly enhance every aspect of AgOpenSource (hence the name) and I very much look forward to that transition. The first application that we’ll tackle within AgOpenSource is the VideoWiki project that was conceived back in April. This project was discussed in a number of posts, but nowhere do I see a full “vision statement” of what it is. Clearly there is much brainstorming and “sketching” to be done. A VideoWiki is best understood as a HyperVideo with interchangeable links. Briefly, and you can find much more detail in the VideoWiki page of the AgOpenSource documentation, a HyperVideo has links associated with various times, scenes or events in the video. When you follow the link you may be taken to additional information or even to another video. With a VideoWiki, the set of links and where they take you are uncoupled from the video, and you may choose from a variety of links for any given video. For example, imagine that when you choose our video on creating Out Of Browser applications in Silverlight 3, you are offered to watch it in our VideoWiki player. If you agree to do so, you are then asked which links you’d like: Once you make your choice, you load your video and your link set, and as you watch, links slowly appear in a window next to the video. If you click on one, the video pauses, and a new video opens with additional information. Starting the week of July 20, the previously announced Better-Videos project will begin to ramp up. The effect, I believe will be more effective videos produced more quickly, but this is an experiment in the truest sense; no one knows what the outcome will be. Because the internal day-to-day progress of this effort is not directly related to Silverlight programming, I’ve sequestered the blog entries about the Better-Video project in the Video Bloglet that you can access from the sidebar on any page Neither of these projects will slow down the other avenues for information and interaction. In fact, I expect to add more. For now, here is what I see as the pyramid of information flow. Short Bursts – Twitter Mini-Articles & Flashes – Quick Bits Substantive Articles – This Blog Diary of the BetterVideo Project – Video Bloglet The AgOpenSource Project – the AgOpenSource Wiki Deep Dives Into Silverlight – Mini-Tutorials and Videos Extended Analysis of Silverlight Programming – Full Tutorials Social Networking? Facebook, LinkedIn, My Books & Photos Timing is everything… and while we’ve not announced the release schedule for Silverlight 3, I can say that I expect to be finished with my sequestered work before I come back from vacation (mid-July). At that point I will pour myself into AgOpenSource and my other projects, keeping ahead of the curve and responding to the three drastically different needs of our community: Right now, it is the silence before the storm, but by the end of July, the signal : noise ratio should approach 1. About a month ago I wrote about getting organized. Since it is Sunday and I’m saving my big announcement blog entry for tomorrow morning <smile>, I thought I’d take a moment for a not-so-quick follow up.. I could certainly have treated E-Mail as just more Information but it was much more efficient to treat it separately., store it 100% reliably be able to retrieve it no mater where I am, in less than 3 seconds. [I’m going to table the issue of adding notes from the car for the moment, but see my discussion of Jott below). Toodledo has three key features:: You may remember that my first approach was to have just 5 mailboxes: :-) Step 2: I created these mailboxes: Manage the 3,000 email messages I get every day I spend no more than 20-30 minutes a day reading my email I see everything important I never miss a critical email I can retrieve any email I need within 3 seconds,. About 5-10 times a week I get a letter that says something like this: “Your book, Complete Idiots' Guide to a Career in Computer Programming is wicked old. Do you still believe a programmer can be self-taught and is it possible for someone my age?”: I have had four career altering moments: Warning: I now work for Microsoft as the “Silverlight Geek” and thus have a strong bias. But you know that.. Everything you need for Silverlight is at our web site. Start with my Guide to Getting Started. (Note to self: update that page very soon!)! From now until sometime this summer, you may notice bursts of slow. Please mark this up to:. In a previous post I mentioned that Silverlight 3 has enhanced support for data entry validation. In this first of two mini-tutorials on the topic, I will take you through the process of implementing validation in some detail. The key to understanding Silverlight validation is the division of logic from UI. In this case, the logic is delegated to the business object that the input control is bound to, and the UI is owned by the the input control (and the associated controls for displaying error conditions.) In the case shown above, the text box into which the user is invited to type an ISBN is the input control. Not shown is a business object (also, in these cases called a data object) that holds the rules about what makes for a valid ISBN. On the left of this diagram is the UI. It is presented to the user as a text box, and implemented using Xaml. On the right is the business logic. A business object is created, in this case as a class in C# that represents, most often, an object in the user’s domain of concern – here a book. The business object (the book) knows what a valid ISBN is, the UI does not. The Business object determines if the value given to it by the UI is valid. If not, it throws an exception, specifying what is wrong. In this case, it might throw one of three exceptions: The UI doesn’t know what the rules are, and the Business object doesn’t know how the UI will present the problem to the user (if at all!). And that is good. We are already asking the Binding Object to connect the User Control to the Business object, so it is the obvious choice to also pass along the value for validation and the objects response (if any). Normally, when you bind a property to a TextBox you would provide the Mode and the Path, in this case, you add two more properties: 1: Text="{Binding Mode=TwoWay, 2: NotifyOnValidationError=True, 3: Path=ISBN10, 4: ValidatesOnExceptions=True}" The Business Object throws an exception if the data is not valid, and puts the reason in the Exception’s message. The Binding Object turns the exception into a message to the control, and sets the controls visual state from Valid to either InvalidUnfocused or InvalidFocused. What the control does when it changes visual state from Valid to one of the invalid states is entirely up to the designer of the control or whomever templates that control. [We’ll look at templating error states in the second part of this mini-tutorial in a few weeks.] For this to work, the control must bind using two way binding and it must support the new ValidationState group (you can see the validation states group very readily by beginning the templating process of any of the input controls that support validation out of the box as shown here: As of this writing, the controls that will support validation out of the box at RTW are With the exception of PasswordBox, all of these already work in the Beta version. You now have all the pieces, let’s put them together step by step. The designer sets up a binding between an input control (text box) and a data object (the Book object) ensuring that The user is prompted to enter an ISBN into the text box. The value entered is not evaluated until one of two events; either the user leaves the text box (causing the text box to fire its TextChanged method, or the user clicks the handy Validate Now! button which invokes UpdateSource on the textBox’s TextProperty without having to actually leave the textBox. In either case, the data is given to the Binding Framework which passes it to the Data Object for validation, If the data is not valid, the DataObject throws an exception to the BindingFramework. The Framework turns the exception into an instruction to the input control to set its validation state to Invalid. This will kick off a storyboard, in our case turning the border red, and when the user clicks in the control bringing up the error message from the exception which is passed to the control in its error message. [This drawing based on an original image by Karen Corby] There are times when I find that I follow every word of a presentation but I still have no idea how to actually do it. So here’s how. 1. Create a new project 2. Createi a business object that is going to own data validation 3. Create two way data binding between one or more input controls from the supported list above to one or more properties on your data object 4. For each control you want to validate, create a setter on the bound property that tests for the conditions you want to validate, and throws an exception if the data is not valid. In the control, be sure to set the two flags (NotifyOnValidationError=True, ValidatesOnExceptions=True). That’s it! Honest. Here is the complete MinPage.xaml for this example followed by the complete code behind… 1: <UserControl xmlns="" 2: xmlns:x="" 3: xmlns:d="" 4: xmlns:mc="" 5: x:Class="Validation_OutOfBox.MainPage" 6: Width="600" 7: Height="250" 8: mc: 9: <Grid x:Name="LayoutRoot" 10: 11: <Grid.RowDefinitions> 12: <RowDefinition Height="1*" /> 13: <RowDefinition Height="1*" /> 14: <RowDefinition Height="1*" /> 15: <RowDefinition Height="1*" /> 16: </Grid.RowDefinitions> 17: <Grid.ColumnDefinitions> 18: <ColumnDefinition Width="1*" /> 19: <ColumnDefinition Width="1*" /> 20: </Grid.ColumnDefinitions> 21: <TextBlock Text="{Binding Path=Title}" 22: HorizontalAlignment="Center" 23: VerticalAlignment="Bottom" 24: Grid.Row="0" 25: Grid.Column="0" 26: Grid.ColumnSpan="2" 27: FontFamily="Georgia" 28: 29: <TextBlock x:Name="Prompt10" 30: Text="Please enter the 10 digit ISBN" 31: TextWrapping="Wrap" 32: HorizontalAlignment="Right" 33: VerticalAlignment="Bottom" 34: FontFamily="Georgia" 35: FontSize="18" 36: Grid.Column="0" 37: Grid.Row="1" 38: 39: <TextBox x:Name="TenDigits" 40: FontFamily="Georgia" 41: FontSize="18" 42: HorizontalAlignment="Left" 43: VerticalAlignment="Bottom" 44: Margin="5" 45: Width="150" 46: Height="40" 47: Grid.Column="1" 48: Grid.Row="1" 49: TextWrapping="Wrap" 50: Text="{Binding Mode=TwoWay, 51: NotifyOnValidationError=True, 52: Path=ISBN10, 53: ValidatesOnExceptions=True}" /> 54: 55: <Button x:Name="FillIt" 56: Content="Fill With valid ISBN 10" 57: Width="120" 58: Height="25" 59: Grid.Column="1" 60: Grid.Row="2" 61: FontSize="12" 62: HorizontalAlignment="Left" 63: VerticalAlignment="Bottom" 64: Margin="5" 65: 66: <Button x:Name="ValidateIt" 67: Content="Validate Now!" 68: Background="#FFFFFF00" 69: Width="120" 70: Height="25" 71: Grid.Column="0" 72: Grid.Row="2" 73: FontSize="12" 74: Margin="5" 75: VerticalAlignment="Bottom" 76: 77: </Grid> 78: </UserControl> Here’s the complete code behind, 1: using System.Windows; 2: using System.Windows.Controls; 3: using System.Windows.Data; 4: 5: namespace Validation_OutOfBox 6: { 7: public partial class MainPage : UserControl 8: { 9: public MainPage() 10: { 11: InitializeComponent(); 12: Book b = new Book(); 13: b.Title = "Data Validation for Fun and Prophet"; 14: LayoutRoot.DataContext = b; 15: FillIt.Click += new RoutedEventHandler( FillIt_Click ); 16: ValidateIt.Click += new RoutedEventHandler( ValidateIt_Click ); 17: } 18: 19: void ValidateIt_Click( object sender, RoutedEventArgs e ) 20: { 21: BindingExpression bindingExpression = TenDigits.GetBindingExpression( TextBox.TextProperty ); 22: bindingExpression.UpdateSource(); 23: } 24: 25: void FillIt_Click( object sender, RoutedEventArgs e ) 26: { 27: TenDigits.Text = "059652756X"; 28: } 29: } 30: } Finally, here is the business class/ data object 1: using System; 2: using System.ComponentModel; 3: 4: namespace Validation_OutOfBox 5: { 6: public class Book : INotifyPropertyChanged 7: { 8: public event PropertyChangedEventHandler PropertyChanged; 9: 10: private string title; 11: public string Title 12: { 13: get 14: { 15: return title; 16: } 17: set 18: { 19: title = value; 20: NotifyPropertyChanged( "Title" ); 21: } 22: } 23: 24: private string isbn10; 25: public string ISBN10 27: get 28: { 29: return isbn10; 30: } 31: set 32: { 33: 34: if ( value.Length != 10 ) 35: { 36: throw new ArgumentException( "Must be exactly 10 integers long" ); 37: } 38: 39: char[] isbnAsArray = value.ToCharArray(); 40: 41: foreach ( char c in isbnAsArray ) 42: { 43: if ( ( !Char.IsNumber( c ) ) && c.ToString().ToUpper() != "X" ) 44: { 45: throw new ArgumentException( "Must be numbers or letter X" ); 46: } 47: } 48: 49: int runningTotal = 0; 50: for ( int i = 0; i < 9; i++ ) 51: { 52: int val = ( Convert.ToInt32(isbnAsArray.ToString()) 53: * ( 10 - i ) ); 54: runningTotal += val; 55: } 56: int mod = runningTotal % 11; 57: int checkSum = 11 - mod; 58: 59: int isbnCheckSum = -1; 60: if ( isbnAsArray[9].ToString().ToUpper() == "X" ) 61: isbnCheckSum = 10; 62: else 63: isbnCheckSum = Convert.ToInt32(isbnAsArray[9].ToString()); 64: 65: if ( isbnCheckSum != checkSum ) 66: { 67: throw new ArgumentException( "Checksum is invalid!" ); 68: } 69: 70: isbn10 = value; 71: NotifyPropertyChanged( "ISBN10" ); 72: } 73: } 74: 75: private void NotifyPropertyChanged( String propertyName ) 76: { 77: if ( PropertyChanged != null ) 78: { 79: PropertyChanged( this, new PropertyChangedEventArgs( propertyName ) ); 80: } 81: } 82: } 83: } That’s it! Example-Code Quality, Guaranteed! This code was compiled with Silverlight 3 (Beta) using Visual Studio 8 SP1 on Windows 7 (RC) and also on Silverlight 3 (Beta) using Visual Studio 10 (Beta) on Windows 7 (RC). For more on this guarantee, please see this page. Ever) I. The slides are here as a zip file.: The DataValidation demo is, if I’m honest, my favorite. I particularly like that this works by combining two existing parts of the Silverlight framework:: If you are serious about obtaining a deep understanding of all this, I’d also read the following mini-tutorials With all that done, error handling will be almost self-evident. The data entry classes have a new Visual State Group: ValidationStates that consists of three possible states. Tim Heuer did a brilliant job in his recent blog post sorting through and summing up some of the confusion that has arisen out of the current unusual circumstances of Silverlight, Blend and Visual Studio all having two versions available at the same time: a release version and a pre-release version. Rather than replicating his work, let me point you to his post and also provide a slightly different perspective of life on the bleeding edge… Silverlight 2 is a released development product available here Silverlight 3 is a beta product (with no commercial go live license) that is scheduled to go live this summer. It is available here. Blend 2 is the current commercial version of Expression Blend, available with full support (and on a trial basis if you like) here. This supports Silverlight 2. Blend 3 is in Preview mode and targets Silverlight 3, it is available on a trial basis here. To target Silverlight 2 you will want Blend 2 SP1. Visual Studio 2008 SP1 is the current and fully supported edition and it comes in many flavors: Standard, Professional, and Team System Visual Studio 2010 Beta is ready for testing. Windows Vista is our current released operating system for individual computers, available here Windows 7 Release Candidate is here and available for you to test There are numerous mix and match variations, but why make yourself crazy? NB: If you choose Visual Studio 2010 you will not be able to use the RIA Services at this time. You can choose other combinations (e.g., Silverlight 2, Blend 2 and VS 2010, but unless you have good reason to, I don’t see the point. If you want the exhaustive list, however, see Tim’s post. Please note that any time you are installing a Beta product you are on the bleeding edge and you must be prepared for less reliability than with a released product. Further, it is my personal belief that if you install a pre-release product you must also be prepared to repave your machine when you install the next version. It may not be needed, but being ready for it is a prudent precaution. Using pre-release software can certainly create headaches: when you run into a problem you must ask yourself: Is it Blend? Visual Studio? Win7? Silverlight or me? Aiiii! But it is also the very best way to keep ahead of the learning curve, and each of these products, though pre-release is surprisingly stabile and each is well supported on their respective Microsoft sites: As a personal choice, I am currently keeping these working environments: Silverlight 2, Blend 2, Visual Studio 2008, Vista. Silverlight 3, Blend 3, Visual Studio 2008, Windows 7. Silverlight 3, Blend 3, Visual Studio 2010, Windows 7. I do most of my work on the last of these, and so far it has been a gas. As Tim correctly points out, one very powerful option when working with pre-release software is to use virtual machines – easily reset and recreated, but typically you pay a bit of a performance penalty. I confess. After years of developing with separate debuggers, editors and compilers it was a wondrous thing to have an Integrated development environment in which all three and more were combined. I love Visual Studio. And for the past year or so I imagined that Blend, while wonderful, was a temporary solution until Dev10 (shorthand for Visual Studio 2010) was ready. Bzzzz. No! But thanks for playing! After reviewing Dev10 (which is wonderful) and talking with the team, I’m now convinced that while many developers will do all their development in Visual Studio, serious (and certainly advanced) Silverlight programmers will in fact opt to work with two tools indefinitely. It isn’t just that Blend is better suite for some types of work and VS for others; it is that there are real limitations (did I say that?); places where they do not overlap, and won’t any time soon. For example, and taking this from the perspective of a developer; I’m thrilled that I can now create rows and columns in my grid in VS and that I can drag and drop controls on the design surface. That greatly simplifies the design process and while Blend may have some advantage there, only time will tell whether it is worth switching back and forth to accomplish these goals. On the other hand, if I want to add animation I have two realistic choices: hand code it in Xaml in Visual Studio (always fun, might be dangerous, maybe tomorrow) or open Blend (where it just keeps getting easier). Similarly, if I want to template a control (which, interestingly, I want to do more and more, especially as I work more with Data Validation), then once more Blend is not only the tool of choice, it is my only viable alternative: Visual Studio just isn’t designed to make that easy. “Well,” I hear you say, “why go to VS at all? You can code right in Blend, with Intellisense and etc.” Yah, you can. But as my buddy Dave Platt says (I’m cleaning this up) you can have an appendectomy through your mouth; it just takes longer and hurts more. The ability to do bits of coding in Blend is a great convenience, but it wasn’t designed to be a programmer’s environment and there is no comparison between the level of support if offers and the level of support offered in Visual Studio. Not even close. (OK, I owe you a list of specifics, but for now let’s take it as given). It is tempting to be somewhat defensive about this; almost as if this were a step backwards. But on reflection, I think it is actually a great leap forwards. Rather than trying to make VS into an almost adequate designer, the folks who own Visual Studio decided to create a great developer tool. When you need to go beyond that, to take on relatively advanced design problems (such as managing view state and the associated story boards) it makes sense to use a tool that does that for a living. And since the two tools work on the same project at the same time, with no need to “import” or “export” cycling between them is (nearly) painless. While I strongly encourage you to create a machine with VS2010 (on Win7 if you can!) and with Blend 3, please note that as of this writing you can not open a Silverlight 3 project written for .NET 4 with the Blend 3 currently available (remember, we released Blend 3 back in March, years ago in web time). To overcome this horrific limitation <smile>, you need only create a .NET 3.5 application. To do so, create a new solution, click on C# (or VB or Silverlight) and then drop down the framework and select ..Net Framework 3.5 as shown here, You’re back in business, though you will not for now be able to take advantage of the new .NET 4.0 framework features. I will be returning to this theme of two-tools quite a bit, but wanted to open the door for discussion right away as I explore the myriad features in Silverlight 3.. We? Remember. Doonesbury Aug. 27 1993. Towards: What is more, a number of input controls (TextBox, CheckBox, RadioButton, ListBox, ComboBox and soon PasswordBox) already have default storyboards for transitioning into these states (as you’ll see in just a moment This means that right out of the box these controls know how to respond to invalid data, where the validity is determined by the object to which they are bound. Sweet. Let’s start simple, using the out-of-the-box capabilities, and then in a subsequent post I’ll look at how a little templating can give you much finer control over the interaction with the user. To make this work you need the following:)";} This code was compiled with Silverlight 3 – Which is a beta product! For more on this guarantee, please see this page. The Silverlight Toolkit is innovative in many ways, not least of which is that controls are released in one of four quality bands: The control I’ll be considering today was developed (and described here) by Ruurd Boeke and is currently in the Experimental band. You can expect that the API will change quite a bit, but that said, it is an enormously useful control right now; and thus I’ve submitted a video and this write-up. The goal of the Transitioning Content control is to make it easy to add animation when you are changing content within a control as demonstrated here. [You’ll need to click on DomainUpDown on the left (and surprisingly, not on TransitioningContent!) and Animations on top. The following cropped image illustrates where to click, but provides only a shadow of the impact To make this crystal clear, and to show how easy it really is to use this control, we’ll build the example three times: first with a Content Control, then with a Transitioning Content Control, and finally, adding data binding and the ability to transition more complex objects. Version 0 begins with a grid with two columns. The left column contains a ContentControl and the right a button. Here is the complete Xaml: <UserControl x: <StackPanel Background="Bisque"> <ContentControl x: <Button x: </StackPanel></UserControl> The job of the ContentControl is to hold a single piece of content: in this case a string. The button’s job is to cause that content to change, which we do programmatically in the button’s click event handler in MasterPage.xaml.cs, shown in full: using System;using System.Windows;using System.Windows.Controls;namespace tccDemo{ public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); doChange.Click += new RoutedEventHandler( doChange_Click ); } void doChange_Click( object sender, RoutedEventArgs e ) { Random random = new Random(); cc1.Content = random.NextDouble().ToString(); } } // end class} // end namespace Each time the button is clicked, a new value is displayed. For more on Skinnable Custom Controls, see the blog series that starts here, or consider these videos (click on the image to go to the video): Before we dive into the TransitioiningContent control and how it does its work, let’s look at how to use it. We start by replacing the ContentControl with a TransitioningContentControl, but to do this we need to add a reference to System.Windows.Controls.Layout.Toolkit in the references and a namespace to the top of the Xaml file xmlns:layout="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit" With that in place we can modify MainPage.xaml to replace the ContentControl with the TransitioningContentControl and replace the Change button with two buttons: one for Up and one for down. Here is the complete Xaml: <UserControl x: <StackPanel Background="Bisque"> <layout:TransitioningContentControl x: <Button x: <Button x: </StackPanel></UserControl> The code is modified only to set the Transition property of the TransitioningContentControl. Here is the complete code behind file: using System;using System.Windows;using System.Windows.Controls;namespace tccDemo{ public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); UpButton.Click += new RoutedEventHandler( UpButton_Click ); DownButton.Click += new RoutedEventHandler( DownButton_Click ); } void DownButton_Click( object sender, RoutedEventArgs e ) { tcc.Transition = "DownTransition"; Random random = new Random(); tcc.Content = random.NextDouble().ToString(); } void UpButton_Click( object sender, RoutedEventArgs e ) { tcc.Transition = "UpTransition"; Random random = new Random(); tcc.Content = random.NextDouble().ToString(); } }} Here is the effect: In both of the examples so far, the content has been a simple string. It is possible, however, to provide a more complex object, by modifying the TransitioningContentControl and using an explicit ContentTemplate. <layout:TransitioningContentControl x: <layout:TransitioningContentControl.ContentTemplate> <DataTemplate> <StackPanel > <TextBlock Text="{Binding Title }" FontFamily="Georgia" FontSize="14" /> <TextBlock Text="{Binding Author }" FontFamily="Georgia" FontSize="14" /> </StackPanel> </DataTemplate> </layout:TransitioningContentControl.ContentTemplate></layout:TransitioningContentControl> This follows all the normal conventions of using a ContentTemplate. We fill it with a DataTemplate which holds a StackPanel, allowing us to place two TextBlocks, both of which use binding syntax to indicate that they are going to bind to the Title and Author properties of whatever object they are given, respectively. The rest of the Xaml file is unchanged. We need a data object, and so we create as simple a data object as possible to illustrate this idea; noting that of course you can get your data from a database, from an XML file, etc. Here is the complete contents of Book.cs including the static property we’ll use to obtain some pre-created data, using System.Collections.Generic;namespace tccDemo{ public class Book { public string Title { get; set; } public string Author { get; set; } public static List<Book> Books { get { List<Book> theBooks = new List<Book>(); theBooks.Add( new Book() { Title = "The Raw Shark Texts", Author = "Steven Hall" } ); theBooks.Add( new Book() { Title = "Columbine", Author = "Dave Cullen" } ); theBooks.Add( new Book() { Title = "Unfriendly Fire", Author = "Dr. Nathaniel Frank" } ); theBooks.Add( new Book() { Title = "The Inheritance", Author = "Dave Sanger" } ); theBooks.Add( new Book() { Title = "Sir Gawain and the Green Knight", Author = "Simon Armitage" } ); theBooks.Add( new Book() { Title = "The Superorganism", Author = "Holldobler and Wilson" } ); return theBooks; } } }} MainPage.xaml.cs is modified somewhat more significantly, to hold a membervariable of type List<Book> (thus avoiding having to “get” the data repeatedly) and a counter as a convenience so that we can cycle through our somewhat meager collection. Here is the complete MainPage.xaml.cs using System.Collections.Generic;using System.Windows;using System.Windows.Controls;namespace tccDemo{ public partial class MainPage : UserControl { private List<Book> books = Book.Books; private int counter = 0; public MainPage() { InitializeComponent(); tcc.Transition = "Normal"; tcc.Content = books[counter++]; UpButton.Click += new RoutedEventHandler( UpButton_Click ); DownButton.Click += new RoutedEventHandler( DownButton_Click ); } void UpButton_Click( object sender, RoutedEventArgs e ) { tcc.Transition = "UpTransition"; tcc.Content = GetBook(); } void DownButton_Click( object sender, RoutedEventArgs e ) { tcc.Transition = "DownTransition"; tcc.Content = GetBook(); } public Book GetBook() { if ( ++counter >= books.Count ) counter = 0; return books[counter]; } }} The constructor sets the initial visual state to Normal and sets the content of the TransitioningContentControl to the first book in the collection. It then sets up the two event handlers. The job of each is to set the Transition state and then call the helper method that gets the next book in the collection. The TransitioningContent is a bit ambivalent about its visual states. There are four states that are hardwired into the control as it is currently written: However, if you examine the attributes at the top of the class (used to signal, for example, both the Visual State Manager and tools like Blend what visual states the class supports) you’ll find this: [TemplateVisualState(GroupName = PresentationGroup, Name = NormalState)][TemplateVisualState(GroupName = PresentationGroup, Name = DefaultTransitionState)][TemplatePart(Name = PreviousContentPresentationSitePartName, Type = typeof(ContentControl))][TemplatePart(Name = CurrentContentPresentationSitePartName, Type = typeof(ContentControl))]public class TransitioningContentControl : ContentControl There are precisely two visual states made visible to Blend and the VSM. The net effect is that you can certainly use the UpTransition and DownTransition, but they were added as examples of how you can freely extend this class with any transitions you like. Here’s how it works. The TransitioningContentControl consists of two parts both of type ContentControl: PreviousContentPresentationSitePartName and CurrentContentPresentationSitePartName. To add an animated transition from content A to content B you need only hand the two to this control and tell it, by passing in a string, what storyboard to invoke. If you pass in the string TransitionUp or TransitionDown then it already knows what storyboard to invoke, as Ruurd Boeke wrote those and put them in the Resources section of TransitioningContentControl.xaml. Here, for example, is his UpTransition: <vsm:VisualState x: </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="30"/> <SplineDoubleKeyFrame KeyTime="00:00:00.300" Value="0"/> <:00.300" Value="0"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/> <SplineDoubleKeyFrame KeyTime="00:00:00.300" Value="-30"/> </DoubleAnimationUsingKeyFrames> </Storyboard></vsm:VisualState> The effect of this is to target first the opacity of the current content, which will go from 0 to 1 over 3/10 of a second. During that same time period it will move up the Y axis from 30 to 0 (remember that the Y axis counts up as it moves down the screen). In the second half of the animation the targetproperty is the opacity of the previous content which fades away from 1 to 0 over that same 3/10 of a second, while the content itself moves up from 0 to –30. Notice that the storyboard is within the VisualState whose name is UpTransition. The class itself has a public property named Transition: /// <summary>/// Gets or sets the name of the transition to use. /// These correspond directly to the VisualStates inside/// the PresentationStates group./// </summary>public string Transition{ get { return GetValue(TransitionProperty) as string; } set { SetValue(TransitionProperty, value); }} This acts as a front for the Dependency Property which is registered immediately below public static readonly DependencyProperty TransitionProperty = DependencyProperty.Register( "Transition", typeof(string), typeof(TransitioningContentControl), new PropertyMetadata(OnTransitionPropertyChanged)); A quick review of the Silverlight documentation reveals the meaning of each of the four parameters: Notice that the type of the TransitionProperty is string, and parenthetically, notice that the final parameter, typeMetadata, is explicitly noted for usage with a PropertyChangedCallback, which is what is done here. OnTransitionPropertyChanged is overloaded in the implementation, but the net effect is to set the source of the content control and to set the string representing the new transition and then to call ChangeTransition whose job is to make sure it is safe to set a new transition, and then to obtain the PresentationState Visual State group and then to look to see if there is a state for the string passed in. If so, that transition is set as the new value for the transition. Thus, with this somewhat unusual control, you can modify the visual states within the PresentationGroup) without subclassing, and by doing so (and providing a storyboard) you can add any transition you like, which you can then invoke by passing in its name! Caveat! As noted earlier, this control is in the experimental band, and this API is very likely to change. I hope you found this bit of control spelunking as interesting as I did sorting it out; and it is just fine to set all of the details aside and just use the control in conjunction with other controls to create animated transitions without over-worrying about how it is doing its magic. I think it is fair to say that interest in Silverlight is wicked-high.
http://silverlight.net/blogs/jesseliberty/default.aspx
crawl-002
refinedweb
5,983
50.87