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 |
|---|---|---|---|---|---|
Binding a .JAR
- PDF for offline use
-
-
- Related Articles:
-
Let us know how you feel about this
Translation Quality
0/250
last updated: 2017-03
This walkthrough provides step-by-step instructions for creating a Xamarin.Android Java Bindings Library from an Android .JAR file.
Overview
The Android community offers many Java libraries that you may want to use in your app. These Java libraries are often packaged in .JAR (Java Archive) format, but you can package a .JAR it in a Java Bindings Library so that its functionality is available to Xamarin.Android apps. The purpose of the Java Bindings library is to make the APIs in the .JAR file available to C# code through automatically-generated code wrappers.
Xamarin tooling can generate a Bindings Library from one or more input .JAR files. The Bindings Library (.DLL assembly) contains the following:
The contents of the original .JAR file(s).
Managed Callable Wrappers (MCW), which are C# types that wrap corresponding Java types within the .JAR file(s).
The generated MCW code uses JNI (Java Native Interface) to forward your API calls to the underlying .JAR file. You can create bindings libraries for any .JAR file that was originally targeted to be used with Android (note that Xamarin tooling does not currently support the binding of non-Android Java libraries). You can also elect to build the Bindings Library without including the contents of the .JAR file so that the DLL has a dependency on the .JAR at runtime.
In this guide, we'll step through the basics of creating a Bindings Library for a single .JAR file. We'll illustrate with an example where everything goes right – that is, where no customization or debugging of bindings is required. Creating Bindings Using Metadata offers an example of a more advanced scenario where the binding process is not entirely automatic and some amount of manual intervention is required. For an overview of Java library binding in general (with a basic code example), see Binding a Java Library.
Walkthrough
In the following walkthrough, we'll create a Bindings Library for Picasso, a popular Android .JAR that provides image loading and caching functionality. We will use the following steps to bind picasso-2.x.x.jar to create a new .NET assembly that we can use in a Xamarin.Android project:
Create a new Java Bindings Library project.
Add the .JAR file to the project.
Set the appropriate build action for the .JAR file.
Choose a target framework that the .JAR supports.
Build the Bindings Library.
Once we've created the Bindings Library, we'll develop a small Android app that demonstrates our ability to call APIs in the Bindings Library. In this example, we want to access methods of picasso-2.x.x.jar:
package com.squareup.picasso public class Picasso { ... public static Picasso with (Context context) { ... }; ... public RequestCreator load (String path) { ... }; ... }
After we generate a Bindings Library for picasso-2.x.x.jar, we can call these methods from C#. For example:
using Com.Squareup.Picasso; ... Picasso.With (this) .Load ("") .Into (imageView);
Creating the Bindings Library
Before commencing with the steps below, please download picasso-2.x.x.jar.
First, create a new Bindings Library project. In Xamarin Studio or Visual Studio, create a new Solution and select the Android Bindings Library template. (The screenshots in this walkthrough use Visual Studio, but Xamarin Studio is very similar.) Name the Solution JarBinding:
The template includes a Jars folder where you add your .JAR(s) to the Bindings Library project. Right-click the Jars folder and select Add > Existing Item:
Navigate to the picasso-2.x.x.jar file downloaded earlier, select it and click Add:
Verify that the picasso-2.x.x.jar file was successfully added to the project:
When you create a Java Bindings library project, you must specify whether the .JAR is to be embedded in the Bindings Library or packaged separately. To do that, you specify one of the following build actions:
EmbeddedJar– the .JAR will be embedded in the Bindings Library.
InputJar– the .JAR will be kept separate from the Bindings Library.
Typically, you use the
EmbeddedJarbuild action so that the .JAR is automatically packaged into the bindings library. This is the simplest option – Java bytecode in the .JAR is converted into Dex bytecode and is embedded (along with the Managed Callable Wrappers) into your APK. If you want to keep the .JAR separate from the bindings library, you can use the
InputJaroption; however, you must ensure that the .JAR file is available on the device that runs your app.
Set the build action to EmbeddedJar:
Next, open the project Properties to configure the Target Framework. If the .JAR uses any Android APIs, set the Target Framework to the API level that the .JAR expects. Typically, the developer of the .JAR file will indicate which API level (or levels) that the .JAR is compatible with. (For more information about the Target Framework setting and Android API levels in general, see Understanding Android API Levels.)
Set the target API level for your Bindings Library (in this example, we are using API level 19):
Finally, build the Bindings Library. Although some warning messages may be displayed, the Bindings Library project should build successfully and produce an output .DLL at the following location:
JarBinding/bin/Debug/JarBinding.dll
Using the Bindings Library
To consume this .DLL in your Xamarin.Android app, do the following:
Add a reference to the Bindings Library.
Make calls into the .JAR through the Managed Callable Wrappers.
In the following steps, we'll create a minimal app that uses the
Bindings Library to download and display an image in an
ImageView;
the "heavy lifting" is done by the code that resides in the .JAR file.
First, create a new Xamarin.Android app that consumes the Bindings Library. Right-click the Solution and select Add New Project; name the new project BindingTest. We're creating this app in the same Solution as the Bindings Library in order to simplify this walkthrough; however, the app that consumes the Bindings Library could, instead, reside in a different Solution:
Right-click the References node of the BindingTest project and select Add Reference...:
Check the JarBinding project created earlier and click OK:
Open the References node of the BindingTest project and verify that the JarBinding reference is present:
Modify the BindingTest layout (Main.axml) so that it has a single
ImageView:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns: <ImageView android: </LinearLayout>
Add the following
usingstatement to MainActivity.cs – this makes it possible to easily access the methods of the Java-based
Picassoclass that resides in the Bindings Library:
using Com.Squareup.Picasso;
Modify the
OnCreatemethod so that it uses the
Picassoclass to load an image from a URL and display it in the
ImageView:
public class MainActivity : Activity { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); ImageView imageView = FindViewById<ImageView>(Resource.Id.imageView); // Use the Picasso jar library to load and display this image: Picasso.With (this) .Load ("") .Into (imageView); } }
Compile and run the BindingTest project. The app will startup, and after a short delay (depending on network conditions), it should download and display an image similar to the following screenshot:
Congratulations! You've successfully bound a Java library .JAR and used it in your Xamarin.Android app.
Summary
In this walkthrough, we created a Bindings Library for a third-party .JAR file, added the Bindings Library to a minimal test app, and then ran the app to verify that our C# code can call Java code residing in the .JAR. | https://docs.mono-android.net/guides/android/advanced_topics/binding-a-java-library/binding-a-jar/ | CC-MAIN-2017-30 | refinedweb | 1,267 | 58.48 |
:
Install
You can install Jug with pip:
pip install Jug
or use, if you are using conda, you can install jug from conda-forge using the following commands:
conda config --add channels conda-forge conda install jug
Citation
If you use Jug to generate results for a scientific publication, please cite
Coelho, L.P., (2017). Jug: Software for Parallel Reproducible Computation in Python. Journal of Open Research Software. 5(1), p.30.
Short Example
Here is a one minute example. Save the following to a file called primes.py (if you have installed jug, you can obtain a slightly longer version of this example by running jug demo on the command line):
from jug import TaskGenerator from time import sleep @TaskGenerator def is_prime(n): sleep(1.) for j in range(2,n-1): if (n % j) == 0: return False return True primes100 = [is_prime(n) for n in range(2,101)]
This is a brute-force way to find all the prime numbers up to 100. Of course, this is only for didactical purposes, normally you would use a better method. Similarly, the sleep function is so that it does not run too fast. Still, it illustrates the basic functionality of Jug for embarassingly parallel problems.]
Testimonials
“I’ve been using jug with great success to distribute the running of a reasonably large set of parameter combinations” - Andreas Longva
What’s New
version 1.6.9 (Tue Aug 6 2019)
- Fix saving on newer version of numpy
version 1.6.8 (Wed July 10 2019)
- Add cached_glob() function
- Fix NoLoad (issue #73)
- Fix jug shell’s invalidate function with Tasklets (issue #77)
version 1.6.7 (Fri Apr 13 2018)
- Fix issue with deeply recursive dependency structures and barrier()
- Allow mapreduce.map() results to be used as dependencies
version 1.6.6 (Sat Apr 7 2018)
- Fix bug in shell’s invalidate() function
- Fix wrong dependency handling with mapreduce.map()
version 1.6.5 (Mon Mar 12 2018)
- Add get_tasks() to ‘jug shell’ and document ‘from jug.task import alltasks’ (patch by Renato Alves)
version 1.6.4 (Thu Nov 2 2017)
- Fix exit_after_n_tasks. It would previously execute one task too many
version 1.6.3 (Wed Nov 1 2017)
- Add citation request
version 1.6.2 (Thu Oct 26 2017)
- Add return_value argument to jug_execute
- Add exit_env_vars
For older version see ChangeLog file.
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/Jug/ | CC-MAIN-2020-05 | refinedweb | 420 | 64.51 |
tzset()
Set the time according to the current time zone
Synopsis:
#include <time.h> void tzset( void );
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The tzset() function sets the global variables daylight, timezone and tzname according to the value of the TZ environment variable, or to the value of the _CS_TIMEZONE configuration string if TZ isn't set, or to UTC0 if neither is set.
The global variables have the following values after tzset() is executed:
- daylight
- Zero indicates that daylight saving time isn't supported in the locale; a nonzero value indicates that daylight saving time is supported in the locale. This variable is cleared or set after a call to the tzset() function, depending on whether or not a daylight saving time abbreviation is specified in the TZenvironment variable.
- timezone
- The number of seconds that the local time zone is earlier than Coordinated Universal Time (UTC) (formerly known as Greenwich Mean Time (GMT)).
- tzname
- A two-element array pointing to strings giving the abbreviations for the name of the time zone when standard and daylight saving time are in effect.
The time that you set on the computer with the date command reflects Coordinated Universal Time (UTC). The environment variable TZ is used to establish the local time zone.
Examples:
#include <stdio.h> #include <stdlib.h> #include <time.h> void print_zone() { char *tz; printf( "TZ: %s\n", (tz = getenv( "TZ" )) ? tz : "default EST5EDT" ); printf( " daylight: %d\n", daylight ); printf( " timezone: %ld\n", timezone ); printf( " time zone names: %s %s\n", tzname[0], tzname[1] ); } int main( void ) { tzset(); print_zone(); setenv( "TZ", "PST8PDT", 1 ); tzset(); print_zone(); return EXIT_SUCCESS; }
produces the output:
TZ: default EST5EDT daylight: 1 timezone: 18000 time zone names: EST EDT TZ: PST8PDT daylight: 1 timezone: 28800 time zone names: PST PDT
Classification:
Last modified: 2013-12-23 | http://developer.blackberry.com/native/reference/core/com.qnx.doc.neutrino.lib_ref/topic/t/tzset.html | CC-MAIN-2014-15 | refinedweb | 315 | 51.18 |
User:Bollmann
This tutorial explores the Glasgow Haskell Compiler's compile-time meta programming in Template Haskell. It motivates use cases for meta programming and explains the different Template Haskell features on simple toy programs. The aim is to give an overview of Template Haskell's functionality in an example-driven manner.
Contents
Introduction
Template Haskell (TH) is the standard framework for doing type-safe, compile-time meta programming in the Glasgow Haskell Compiler (GHC). It allows writing Haskell meta programs, which are evaluated at compile-time, and which produce Haskell programs as the results of their execution.
Template Haskell was conceived by Tim Sheard and Simon Peyton Jones[1] by drawing on the ideas of Lisp macros, but in the typed setting of Haskell. Since then, the original implementation has evolved quite a bit[2][3]. Most notably, in 2007 Geoffrey Mainland added support for quasi quoting[4], which makes the embedding of domain specific languages into the Haskell host language much easier.
As it exists today, Template Haskell has two main areas of application: Haskell code generation at compile-time and facilitating the embedding of domain specific languages.
As a code generator, Template Haskell empowers a user to write many, syntactically different, programs all at once by means of a single meta program. All that is needed is a uniform, algorithmic description to create the different result programs. And the meta program then precisely implements the algorithm to compute all the different result programs as its output. This proves useful for example to avoid writing the same repetitive, boilerplate code over and over again. To this end, Template Haskell is used (among many others) in the
aeson library to automatically derive a data type's
ToJSON and
FromJSON instances for JSON serialization; and in the
lens library to mechanically create a data type's lenses.
As a framework for creating domain specific languages (EDSLs), Template Haskell allows a user to embed programs written in another programming language inside of a Haskell program. This enables writing parts of the program in the concrete, domain specific syntax of a different programming language. It has the benefit to think about -- and to express -- domain specific problems in the language best suited for the task. In particular, it lets a user focus on the domain specific problem and removes all additional language burdens induced by inconvenient syntax, unsuited control constructs, etc. Programs from the embedded language are parsed and translated into corresponding (but syntactically heavier) Haskell code at compile-time by Template Haskell. In this sense, (e.g.,) the shakespearean template languages from the
shakespeare library use Template Haskell at their core. They expose succinct domain specific languages to write HTML, CSS, and Javascript code inside of a Haskell based web application.
Introducing Template Haskell in an Example-driven Manner
In this section, we will review the Template Haskell features to write meta programs. The first set of examples show-cases Template Haskell's potential as a code generator; the second set of examples highlights its facilities to create embedded domain specific languages (EDSLs).
To avoid confusion in the sequel, we distinguish between meta programs and object programs. Meta programs are the Haskell programs that run at compile-time and which generate Template Haskell object programs as the result of their execution; they are the programs that devise or manipulate other programs by some algorithmic means. Object programs, on the other hand, are the Template Haskell programs manipulated and built by the Haskell meta programs at compile-time. Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): n >= 1
, constructs the source code for an
-ary
curry function:
import Control.Monad import Language.Haskell.TH curryN :: Int -> Q Exp curryN n = do f <- newName "f" xs <- replicateM n (newName "x") let args = map VarP (f:xs) ntup = TupE (map VarE xs) return $ LamE args (AppE (VarE f) ntup) the object program of the
curry3 function of type
((a, b, c) -> d) -> a -> b -> c -> d in abstract syntax.
To run a meta program like
curryN at compile-time, Template Haskell's splice operator "
$" is used. When applied to a
Q Exp computation it performs this computation and converts the resulting object program to real Haskell code. Hence, enclosing a Haskell meta program by "
$(..)" means to evaluate it and to splice in the generated Haskell code as the result of the splice. To ensure type safety, the meta program is type checked before being run at compile-time. For example, writing
$(curryN 3) typechecks and then evaluates the meta function
(curryN 3) at compile time and puts the resulting object program
\f x1 x2 x3 -> f (x1, x2, x3) in place of the splice.
To generate function declarations for the first
curry functions, we can devise a further meta program on top of
curryN as follows:
genCurries :: Int -> Q [Dec] genCurries n = sequence [ mkCurryDec i | i <- [1..n] ] where mkCurryDec ith = do cury <- curryN ith let name = mkName $ "curry" ++ show ith return $ FunD name [Clause [] (NormalB cury) []]
Running
$(genCurries 20) will then splice in the first 20 curry functions at compile-time, namely:
curry1 = \ f x1 -> f (x1) curry2 = \ f x1 x2 -> f (x1, x2) curry3 = \ f x1 x2 x3 -> f (x1, x2, x3) curry4 = \ f x1 x2 x3 x4 -> f (x1, x2, x3, x4) ... curry20 = \ f x1 x2 ... x20 -> f (x1, x2, ..., x20)
Q.
First, object programs created by Template Haskell are represented as regular algebraic data types, describing a program in the form of an abstract syntax tree. The Template Haskell library provides algebraic data types
Exp,
Pat,
Dec, and
Type to represent Haskell's surface syntax of expressions, patterns, declarations, and types, respectively. Virtually every concrete Haskell syntactic construct has a corresponding abstract syntax constructor in one of the four ADTs. Furthermore, all Haskell identifiers are represented by the abstract
Name data type. By representing object programs as regular algebraic data types (and thus as data), normal Haskell can be used as the meta programming language to build object programs..
Thus, Template Haskell's core functionality constitutes evaluating object programs with "
$" and building them from algebraic data types inside the quotation monad
Q. However, constructing object programs in terms of their abstract syntax trees is quite verbose and leads to clumsy meta programs. Therefore the Template Haskell API also provides two further interfaces to build object programs more conveniently: syntax construction functions and quotation brackets". = sequence [ mkCurryDec i | i <- [1..n] ]:
genCurries :: Int -> Q [Dec] genCurries n = sequence [ mkCurryDec i | i <- [1..n] ] where mkCurryDec ith = funD name [clause [] (normalB (curryN ith)) []] where name = mkName $ "curry" ++ show ith
The new
funD,
clause, and
normalB functions directly correspond to the formerly used
FunD,
Clause, and
NormalB constructors. The only difference lies in their types:
While the syntax constructors work with raw TH expressions, the syntax construction functions expect their monadic counterparts. They construct a TH object program directly in
Q, thus freeing the API consumer from doing the monadic wrapping and unwrapping manually. For every syntax constructor, there is a corresponding monadic syntax construction function provided.
On top of syntax construction functions, quotation brackets are a further shortcut for representing Haskell code. They allow to specify an object program using just regular Haskell syntax by enclosing it inside oxford brackets
[| .. |]. That way, object programs can be specified yet much more succinctly. For example, a meta program building a Haskell expression for the identity function is still quite verbose, if expressed with either ADTs or syntax construction functions:
genId :: Q Exp genId = do x <- newName "x" lamE [varP x] (varE x)
Using quotation brackets, writing the same meta program can be abbreviated much further as:
genId' :: Q Dec genId' = [| \x -> x |]
Quotation brackets quote regular Haskell code as the corresponding object program fragments inside the
Q monad. There are quotation brackets for quoting Haskell expressions (
[e| .. |]|), patterns (
[p| .. |]), declarations (
[d| .. |]), and types (
[t| .. |]). Writing
[| .. |] is hereby just another way of saying <code[e| .. |]</code>. Using quotation brackets in a sense "lifts Haskell's concrete syntax into corresponding object program expressions inside the
Q monad. By doing so, quotation brackets represent the dual of the already introduced splice operator
$: Evaluating a meta program with "
$" splices in the generated object program as real Haskell code; in contrast, quotation brackets
[| .. |] turn real Haskell code into an object program. Consequently, quotation brackets and the splice operator cancel each other out. The equation
$([| e |]) = e holds for all expressions
e and similar equations hold for declarations, and types[2]..[5]
mapN :: Int -> Q Dec mapN n | n >= 1 = funD name [cl1, cl2] | otherwise = fail "mapN: argument n may not be <= 0." where name = mkName $ "map" ++ show n cl1 = do f <- newName "f" xs <- replicateM n (newName "x") ys <- replicateM n (newName "ys") let argPatts = varP f : consPatts consPatts = [ [p| $(varP x) : $(varP ys) |] | (x,ys) <- xs `zip` ys ] apply = foldl (\ g x -> [| $g $(varE x) |]) first = apply (varE f) xs rest = apply (varE name) (f:ys) clause argPatts (normalB [| $first : $rest |]) [] cl2 = clause (replicate (n+1) wildP) (normalB (conE `[])) [] \text.
Reification
The final major Template Haskell feature not yet described is program reification. Briefly, reification allows a meta program to query compile-time information about other program parts while constructing the object program. It allows the meta program to inspect other program pieces to answer questions such as: "what's this variable's type?", "what are the class instances of this type class?", or "which constructors does this data type have and and how do they look like?". The main use case is to generate boilerplate code which auto-completes manually written code. A prime example is to generically derive type class instances from bare data type definitions.
Suppose we've defined the following polymorphic data types for representing potentially erroneous values, lists, and binary trees, respectively:
data Result e a = Err e | Ok a data List a = Nil | Cons a (List a) data Tree a = Leaf a | Node (Tree a) a (Tree a)
Moreover, suppose we want to derive
Functor instances for all of these types. Deriving these instances manually is straightforward, but writing them all out by hand is quite cumbersome. Especially since writing a
Functor instance follows the same pattern across all of the above types and in fact any type
T a.:
data Deriving = Deriving { tyCon :: Name, tyVar :: Name } deriveFunctor :: Name -> Q [Dec] deriveFunctor ty = do (TyConI tyCon) <- reify ty (tyConName, tyVars, cs) <- case tyCon of DataD _ nm tyVars cs _ -> return (nm, tyVars, cs) NewtypeD _ nm tyVars c _ -> return (nm, tyVars, [c]) _ -> fail "deriveFunctor: tyCon may not be a type synonym." let (KindedTV tyVar StarT) = last tyVars instanceType = conT ``Functor `appT` (foldl apply (conT tyConName) (init tyVars)) putQ $ Deriving tyConName tyVar sequence [instanceD (return []) instanceType [genFmap cs]] where apply t (PlainTV name) = appT t (varT name) apply t (KindedTV name _) = appT t (varT name))
Most notably,
f, while retaining all other shapes.
genFmap :: [Con] -> Q Dec genFmap constructors = do funD `fmap (map genFmapClause constructors) genFmapClause :: Con -> Q Clause genFmapClause (NormalC name fieldTypes) = do f <- newName "f" fieldNames <- replicateM (length fieldTypes) (newName "x") let pats = varP f:[conP name (map varP fieldNames)] body = normalB $ appsE $ conE name : map (newField f) (zip fieldNames fieldTypes) clause pats body [] newField :: Name -> (Name, StrictType) -> Q Exp newField f (x, (_, fieldType)) = do Just (Deriving typeCon typeVar) <- getQ case fieldType of VarT typeVar' | typeVar' == typeVar -> [| $(varE f) $(varE x) |] ty `AppT` VarT typeVar' | leftmost ty == (ConT typeCon) && typeVar' == typeVar -> [| fmap $(varE f) $(varE x) |] _ -> [| $(varE x) |] leftmost :: Type -> Type leftmost (AppT ty1 _) = leftmost ty1 leftmost ty = ty.
Template Haskell for building Embedded Domain specific Languages (EDSLs)
To see Template Haskell's potential for building an EDSL, consider the problem of pattern matching text with regular expressions. Suppose, as part of a Haskell program we need to devise many different regular expressions and use them to pattern match text fragments. Regular expressions are easily defined by an algebraic data type capturing their structure, as well as an evaluator checking whether a regular expression matches some input string. [6]
data RegExp = Char (Set Char) -- [a], [abc], [a-z]; matches a single -- character from the specified class | Alt RegExp RegExp -- r1 | r2 (alternation); matches either r1 or r2 | Seq RegExp RegExp -- r1 r2 (concatenation); matches r1 followed by r2 | Star RegExp -- r* (Kleene star); matches r zero or more times | Empty -- matches only the empty string | Void -- matches nothing (always fails) | Var String -- a variable holding another regexp -- (explained later) deriving Show match :: RegExp -> String -> Bool match r s = nullable (foldl deriv r s)
The evaluator
match is hereby based on the concept of derivatives[7]: an initial regular expression
r matches an input string
s, if
r matches the first character of
s and its derivative regular expression
(deriv r) matches the remainder of
s:
nullable :: RegExp -> Bool nullable (Char _) = False nullable (Alt r1 r2) = nullable r1 || nullable r2 nullable (Seq r1 r2) = nullable r1 && nullable r2 nullable (Star _) = True nullable Empty = True nullable Void = False nullable (Var _) = False deriv :: RegExp -> Char -> RegExp deriv (Char cs) c | c `Set.member` cs = Empty | otherwise = Void deriv (Alt r1 r2) c = Alt (deriv r1 c) (deriv r2 c) deriv (Seq r1 r2) c | nullable r1 = Alt (Seq (deriv r1 c) r2) (deriv r2 c) | otherwise = Seq (deriv r1 c) r2 deriv (Star r) c = deriv (Alt Empty (Seq r (Star r))) c deriv Empty _ = Void deriv Void _ = Void deriv (Var _) _ = Void').
To preserve type safety and yet to be able to use regular expressions conveniently, we want to embed the concrete regular expression syntax into the Haskell host language. This can be done via Template Haskell's quasi quotes and furthermore enabling the
QuasiQuotes extension. This allows defining quasi quotes for regular expressions, denoted
|[regex| .. |], where anything inside the quasi quote is considered part of an embedded regular expression language. Using quasi quotes, we can then specify the regex for email addresses from above naturally as follows:
validDotComMail :: RegExp validDotComMail = [regex|([a-z]|[0-9])*@([a-z]|[0-9])*.com|]
We can even compose regular expressions easily from smaller building blocks:
alphaNum, validDotComMail' :: RegExp alphaNum = [regex|[a-z]|[0-9]|] validDotComMail' = [regex|${alphaNum}*@${alphaNum}*.com|] with
${..}. For example, refining our wellformedness check for .com mail addresses, we might want to ensure at least one character to occur on either side of the "@" symbol:
chars, validDotComMail'' :: RegExp chars = [regex|[a-z]|[A-Z]|[0-9]|[-_.]|] validDotComMail'' = [regex|${plus chars}@${plus chars}.com|] plus :: RegExp -> RegExp plus r = Seq r (Star r)''.
Intuitively, a quasi quote like
[regex| .. |] converts an embedded language's concrete syntax to Haskell code at compile-time. It is defined by a quasi quoter, which is a parser for the embedded language. Its task is to parse the embedded language's syntax into a corresponding Template Haskell expression and then to splice this expression as real Haskell code in place of the quasi quote. The conversion of embedded language code to corresponding Haskell code hereby happens before typechecking the Haskell module. Hence, trying to splice in malformed embedded language fragments will raise a Haskell type error at compile-time.
The quasi quoter
regex for our embedded language of regular expressions can be defined as follows:
regex :: QuasiQuoter regex = QuasiQuoter { quoteExp = compile , quotePat = notHandled "patterns" , quoteType = notHandled "types" , quoteDec = notHandled "declarations" } where notHandled things = error $ things ++ " are not handled by the regex quasiquoter." compile :: String -> Q Exp compile s = case P.parse regexParser "" s of Left err -> fail (show err) Right regexp -> [e| regexp |]
That is, formally a
QuasiQuoter consists of four parsers,
quoteExp :: String -> Q Exp quotePat :: String -> Q Pat quoteType :: String -> Q Type quoteDec :: String -> Q Dec
to parse raw strings of the embedded language into the different categories of Haskell syntax. In this example, however, we only want to splice embedded regular expressions into the context of Haskell expressions, so we only define the
quoteExp parser in the
regex quasi quoter. This parser compiles an embedded regular expression given as a string into a corresponding Template Haskell expression.
Compilation by the
compile function proceeds in two stages: First, we parse the input string regex into a corresponding
RegExp value. Second, we encode this
RegExp value as a Haskell expression in Template Haskell's
Q Exp type. It is the second step that allows us to interpolate variables (or even code) from the Haskell host language into the EDSL for regular expressions.
Parsing a raw regular expression into a corresponding
RegExp value is a routine task using (e.g.) the parsec library:
regexParser :: Parsec String () RegExp regexParser = alts <* eof where atom = try var <|> char var = Var <$> (string "${" *> many1 (noneOf "}") <* P.char '}') char = charclass <|> singlechar singlechar = (Char . Set.singleton) <$> noneOf specials charclass = fmap (Char . Set.fromList) $ P.char '[' *> content <* P.char ']' content = try (concat <$> many1 range) <|> many1 (noneOf specials) range = enumFromTo <$> (noneOf specials <* P.char '-') <*> noneOf specials alts = try (Alt <$> seqs <*> (P.char '|' *> alts)) <|> seqs seqs = try (Seq <$> star <*> seqs) <|> star star = try (Star <$> (atom <* P.char '*')) <|> try (Star <$> (P.char '(' *> alts <* string ")*")) <|> atom specials = "[]()*|".
instance Lift a => Lift (Set a) where lift set = appE (varE `Set.fromList) (lift (Set.toList set)) instance Lift RegExp where -- lift :: RegExp -> Q Exp lift (Char cs) = apply `Char [lift cs] lift (Alt r1 r2) = apply `Alt (map lift [r1, r2]) lift (Seq r1 r2) = apply `Seq (map lift [r1, r2]) lift (Star r1) = apply `Star (map lift [r1]) lift Empty = apply `Empty [] lift Void = apply `Void [] lift (Var vars) = foldl1 appE $ map (varE . mkName) (words vars) apply :: Name -> [Q Exp] -> Q Exp apply n = foldl appE (conE n).
Shakespearean Templates
In much the same manner as in the last example, Template Haskell and quasi quotes are used in Michael Snoyman's
shakespeare library[8][9]. It defines embedded templating languages for working with the internet's web languages from within a Haskell web application. In particular, the
shakespeare library provides the template languages Hamlet, Cassius, and Julius for writing embedded HTML, CSS, and Javascript code, respectively. All three templating languages internally work quite similarly to the previous example's EDSL for regular expressions: quasi quotes allow one to write HTML, CSS, or JavaScript code in concrete (though slightly modified) syntax inside of Haskell. Moreover, identifiers from the Haskell host language as well as code fragments can be interpolated into the template languages at compile-time. In the remainder we will briefly show-case the
shakespeare library's templating language Hamlet for creating HTML documents; the other templating languages Cassius and Julius are similar.
To create and output a simple web page from inside a Haskell application, the following is enough:
import Data.Text import Text.Hamlet import Text.Blaze.Html.Renderer.String data Page = Home | About | Github mkUrls :: Page -> [(Text, Text)] -> Text mkUrls Home _ = "/home.html" mkUrls About _ = "/about.html" mkUrls Github _ = "" webPage :: Text -> Text -> HtmlUrl Page webPage title content = [hamlet| <html> <head> <title>#{Text.toUpper title} <body> <h1>#{title} <div>Welcome to my Shakespearean Templates page! <hr> <div>Links: <ul> <a href=@{Home}>My Homepage <a href=@{About}>About me <a href=@{Github}>Check out my Github <hr> <div>#{content} |] main = putStrLn $ renderHtml $ webPage "Hello Shakespeare!" "Hello World!" mkUrls type. Hence, as soon as a link's constructor shape is changed, the compiler statically forces us to update all references to this link as well. Furthermore, there is only one distinct place in the code to maintain or update a link's raw URL, thus minimizing the risk of dead URLs.
For example, suppose we want to add more external links to our web page. We could model this fact by changing the
Page data type to
data Page = Home | About | External ExternalPage data ExternalPage = Github | Haskell | Reddit and, moreover, changing the <hask>mkUrls</hask> renderer function to account for the new links: <haskell> mkUrls :: Page -> [(Text, Text)] -> Text mkUrls Home _ = "/home.html" mkUrls About _ = "/about.html" mkUrls (External page) _ = mkExternalUrls page mkExternalUrls :: ExternalPage -> Text mkExternalUrls Github = "" mkExternalUrls Haskell = "" mkExternalUrls Reddit = "".
Finally, Hamlet allows to use some control constructs like if conditionals, for loops, and let bindings to embed basic business logic into a webpage's template. Michael Snoyman gives a gentle (and much more in-depth) introduction to shakespearean templates and Yesod[8][10].
- ↑ Tim Sheard and Simon Peyton Jones. Template Meta-Programming for Haskell. SIGPLAN Not., 37(12):60-75, December 2002.
- ↑ 2.0 2.1 Tim Sheard and Simon Peyton Jones. Notes on Template Haskell, Version 2. URL: simonpj/papers/meta-haskell/notes2.ps, 2003.
- ↑ Simon Peyton Jones. Major Proposed Revision of Template Haskell. URL:, 2010
- ↑ Geoffrey Mainland. Why it's nice to be quoted: Quasiquoting for Haskell. In Proceedings of the ACM SIGPLAN Workshop on Haskell, Haskell '07, pages 73-82, New York, NY, USA, 2007. ACM
- ↑ Note that
-ary maps are better written using Applicative Functors and
ZipLists. For understanding Template Haskell as a code generator, this example is still useful though.
- ↑ This example draws on Penn's CIS 552 Advanced Programming course, specifically Assignment 5:.
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs named
regexps-derivs
- ↑ 8.0 8.1 Michael Snoyman. Shakespearean Templates. URL: [Accessed: May 2016].
- ↑ Michael Snoyman. The
shakespeareHaskell library. URL: [Accessed: May 2016].
- ↑ Michael Snoyman. Haskell and Yesod. URL: [Accessed: May 2016].
Cite error:
<ref> tag with name "regexp-derivs" defined in
<references> is not used in prior text. | https://wiki.haskell.org/index.php?title=User:Bollmann&oldid=60756 | CC-MAIN-2019-43 | refinedweb | 3,566 | 50.97 |
Allen Wirfs-Brock gave the following defense of OOP a few days ago in a series of six posts on Twitter:
A young developer approached me after a conf talk and said, “You must feel really bad about the failure of object-oriented programming.” I was confused. I said, “What do you mean that object-orient programming was a failure. Why do you think that?”
He said, “OOP was supposed to fix all of our software engineering problems and it clearly hasn’t. Building software today is just as hard as it was before OOP. came along.”
“Have you ever look at the programs we were building in the early 1980s? At how limited their functionality and UIs were? OOP has been an incredible success. It enabled us to manage complexity as we grew from 100KB applications to today’s 100MB applications.”
Of course OOP hasn’t solved all software engineering problems. Neither has anything else. But OOP has been enormously successful in allowing ordinary programmers to write much larger applications. It has become so pervasive that few programmers consciously think about it; it’s simply how you write software.
I’ve written several posts poking fun at the excesses of OOP and expressing moderate enthusiasm for functional programming, but I appreciate OOP. I believe functional programming will influence object oriented programming, but not replace it.
Related:
34 thoughts on “The success of OOP”
I completely agree. Having driven the conversion of a major OSS project from pure procedural to OOP code over the last few years, it’s not a silver bullet but it definitely makes managing larger code bases and larger teams far easier. You have to not abuse it, of course, but that’s true of everything.
Many FP principles are just restatements of OOP principles in a different way. These days, I’m strongly advocating Functional-esque OOP: Separating service objects (functions) from data objects (structs), making the latter immutable where possible (and the service objects, always), using map, reduce, fold, etc. where possible at the micro-level, and so on.
All of these different programming paradigms are hard for many people to grasp, but they really are all valuable in their own right, for the right things. And when you get down to it all say the same thing: Maintainable code comes from divide and conquer, separation of concerns, and otherwise breaking a problem apart. The rest is just syntax and methodologies for breaking a problem apart.
>> Many FP principles are just restatements of OOP principles in a different way
I think you’ll find FP ie Lisp came before OOP.
>> I’m strongly advocating Functional-esque OOP
I am reminded of 🙂
Disclaimer: I’ve been an OO developer for 20+ years. Sick of implementing of FP ideas in OO hence now a fully fledged Clojure convert.
Larry, I agree with you about separating functions (service methods) from data objects (structs, maps, what have you), but the purists will call that an anemic class and an anti-pattern.
Purists are very useful until they aren’t. 🙂 It’s extremely tempting to put business logic onto domain data objects. Sometimes it makes sense, and it’s fine. But one of the most common refactorings I find myself doing is moving such logic off of a domain data object into a service because it’s more maintainable, it avoids a service dependency on an object that needs to be serialized, it’s more testable, or some similar reason. I almost want to see a language with a syntactic distinction between service objects and data objects/structs-with-utility methods to help drive that home. (Such a language may exist; I’ve just not used it.)
bowlocks: If you really want to be pedantic about it, FP traces its origins to Church in the 1930s, as do turing machines. OOP still comes out of the procedural/turing mindset. And the term FP, as far as I’m aware, didn’t exist until 1977 although LISP does predate it. LISP is not a purely functional language, though. In either case, the point being that “good” practices in a purely FP world and in an OOP world are not all that different; they’re just expressed differently.
2 major caveats:
First, OOP is a very vague term, whose meaning shifts drastically over time and across communities. I’m willing to believe OOP is a success, but the truth is, I don’t even know what you are talking about.
Second, to what extent the recent (last few decades) progress on our ability to make software can actually be attributed to OOP? there are more mundane reasons, such as the unbelievable hardware progress (we have more MIPS and megabytes than sci-fi authors even dreamt of), better tools (debuggers, profilers, IDEs…), or practices (such as automated tests). Those alone make many things possible. The actual contribution of the various flavours of OOP is therefore unclear.
@Larry,
I almost want to see a language with a syntactic distinction between service objects and data objects/structs-with-utility methods to help drive that home. (Such a language may exist; I’ve just not used it.)
I think Haskell fits that description perfectly, if you think of datatypes as data objects and typeclasses as service objects.
I completely agree with you.
However I must add that I feel best in a multi paradigm environmentt. Throw in some OOP, throw in some functional style and, yes, sometimes I even throw in some old school, structured, procedural programming. I think we are lucky to have this wealth of tools at our disposal. After all, how many programs are written in Smalltalk? Or in Haskell? Thanks c++. Thanks Java. Thanks Python. (I’m sure there are more of those)
Larry: I was just responding to your statement that “Many FP principles are just restatements of OOP principles” which I interpreted as an ordering of what came first. In my day-to-day “Corporate Java” development I try to foster the use of immutable POJOs which just contain data – and various “Func” objects which only encapsulate business logic. So where you say “they’re just expressed differently.” that may have an element of truth but in OOP (Java in particular) FP principles have to be part of your class design whereas in FP languages such as Clojure, the same principles are idiomatic.
We have now multi-million programs written in C, most of them actively maintained and incredibly successful. LAPACK/BLAS is now huge and written in F77. C is regaining its #1 spot as most popular language in most rankings. If we have huge programs written in C, FORTRAN or Javascript (you call *that* OOP?) it is thanks to advances in coding practices and tooling. OOP will survive, but it has been reduced to an opportunistic way to organise data structures, and a bridge to a more functional style of programming. Go back to reading Dr Dobbs in the 80s, or any intro book to C++ from that decade. The promise, the hype. It is safe to say that *that* OOP has massively failed.
OOP may be good but C++ is certainly not, though it is the language which established and popularized OOP!
By declaring itself a super set of C, C++ has proved to be an evil parasitic creeper coiling itself around C and stifling all enhancement in C.
Today, most languages boast a far far better version of ‘switch’. Even a simple but heavily used construct has not been improved.
But for C++ (hogging all enhancements and improvements (???)) we could have hoped to see – safe/ dynamic arrays, strings and containers and also libraries (out rivaling the kind of libraries that have made Java/ J2EE so popular) as part of standard C. After all C is the language which is synonymous with utilities like Grep, Lex, Yacc and … and … Languages like Perl and PHP and even the JVM (on many platforms) are written in C.
Tie a man’s legs and attach some heavy stones and then run against him – that’s not a race!
Free C from the clutches of C++. (C++ can continue to tread its path of purity, even if unintuitive, at its own snail pace.)
And books on C++ make it a routine to deride C style pointers and the use of ‘void *’. What about the VTable – is the content homogeneous i.e. do all the function pointers have identical signature – parameters and return type? Trying to influence students that C is OK for printing “Hello World!” but not more than that!
All this is affecting the C programming community – lack of language improvements and losing young minds. I am not being fanatical about C but as (late) Ritchie put it ‘C wears well as your experience with it grows’. I can vouch for that from my own experience.
The fact that EcmaScript 6 has classes whereas the older versions don’t, says something about OOP. To me, OOP is a success.
I have to disagree.
Half of my career was spent writing massive applications in OOP languages, such as MMORPG games or major business applications. In my experience, if one carefully tracks where its time is spent while developing in OOP, it is soon evident that as application grows in size and requirements keep on changing, more and more time is devoted to restructuring rather than problem solving, such as refactoring two or more domains of code to pass data from one domain into another.
This is for me the primary fail of OOP, because this data already *does* exist in memory; the reason it is invisible at the place where I need it is because of encapsulation, the main OOP pillar. Encapsulation itself is achieved through code structure without well-defined problem solution, because problem itself keeps on changing.
OOP would work flawlessly in situations where problem is defined up front and its set in stone.
Other half of my career was spent writing imperative code (just C and “functional C++”) and while there are some other problems using this paradigm – most of questions that an OOP architect has to ask himself at the beginning and during the development are completely non-existent here. Paradigm itself doesn’t allow for such encapsulations so that data travels (= is needlessly copied) through multiple modules.
I don’t have quite enough experience writing pure functional code yet, but imperative/functional paradigm so far (6 years) seems to solve nearly all problems I ever had with OOP. I don’t think its the silver bullet, but it is by far most forgiving towards change.
Also, apropos application size – I think OOP has some effect on this, but not in the way Mr. Cook would propose. Applications grew in size because computing became mainstream. I would suggest that OOP’s effect is at the fact that it is easily understood and learned by many people, whereas clean functional paradigm requires somewhat more intimate connection with applicative maths. If one doesn’t know how to use math to solve a problem, one will have many problems expressing its problem (and solution) using FP.
I have been programming for over 30 years and have used just about every programming paradigm and language available and still actively developing.
As far as writing larger applications, that’s just not the case, in fact using OOP (C++,Java, C# etc) have introduced unneeded complexity making it harder to to manage and debug. One of the biggest issues now is just the sheer volume of unused, near duplicated, or overly abstracted code.
I would not call C++, Java, c# OOP but Object based, as OO is pure message passing, Dr Alan Kay who coined the term OO, .”
Witness some of the failures of projects moving to OOP from mainframe, c, cobol, smalltalk, lisp eg: IRS, Air Tours, Air Traffic Control, and many more. Not to mention many embedded failures after moving to JAVA from C. And as far as the functionality, it was invariable decreased because of the switch.
The Current Software Model is over! No any kind of OOP in the future! I talk about the transition to Individual paradigm (the Informational Individual!!!). In fact, this means to know the problem to solve, rather than programming. My web site give you an introduction in the future kind of thinking about information. I’m 80% ready with the new software — Universal Software Model!
The success of OOP is mainly due to the fact that for most people it is far simpler to reason in terms of objects and the operations that can be performed upon an object. This is also why finite state machines are successful, where an action upon an object in a defined state have a defined outcome.
Functional Programming and OOP are not incompatible despite what the 1000s of flame wars on the net will tell you. FP is one tool in the toolkit in the exact same manner as OOP is. If a operation (or the concept of the operation) is independent from an object on which it is performed then FP is probably the answer. Generics, OOP and FP can and often should all be applied in certain circumstances.
Languages which only allow a sub-set of these frustrate me. ECMA doesn’t let me properly encapsulate data, or even functionality. Java’s nascent support for functional paradigms has been a great addition, but the generics are still a long way short of where they could be. C++ obviously lets me use all three but template programming (when I last used it at least) is still hit and miss.
If you are a “OO programmer” or a “functional programmer” or an “imperative programmer”, well I think you are probably just limiting yourself, and in some cases I’m sure you are using the wrong tool for the job. It’s like a carpenter who only uses a hammer.
As others have stated, OOP isn’t just one thing. OOP using the SOLID principles looks very different than OOP using a top-down approach. And there’s combinations of SOLID and top-down such as IoC containers that allow top-down classes to consume SOLID classes.
It bothers me when people claim things like “OOP was supposed to fix all of our software engineering problems and it clearly hasn’t” because no one ever makes those claims. Someone is just trying to strengthen a different view point by contrasting it against a mythical extreme. It’s harder to argue against shades of gray, but that’s reality.
> But OOP has been enormously successful in allowing ordinary
> programmers to write much larger applications.
But what if OOP has done more harm than good? If OOP was not popularised then it is entirely possible that ordinary programmers would be writing even larger applications under some other paradigm.
OO would not have become so dominant if businesses didn’t see real benefits.
> OO would not have become so dominant if businesses didn’t see real benefits.
Short term benefits perhaps?
@Daniel,
EcmaScript 6 classes are syntactic sugar for prototypal inheritance, which has been in JavaScript for some time. It also introduces modules, something used in functional programming. I think they are just introducing lot’s of different concepts programmers enjoy using. I don’t know if the people behind EcmaScript are really pro or con OO or FP.
I like FP because I find it enjoyable. I find it easier to understand, at least when it is kept simple, it can get really complex. I find OO complex because it does starting looking like “spaghetti” code after a while which makes it harder to reason about. over on fsharpforfunorprofit he shows a couple diagrams of C# vs F# and there dependencies, F# is linear, C# is all over the place.
Having said that. I don’t think there is any reason to toss out one or the other. I think it is a thing more of preference. It would be nice to have some hard data. Of what I’ve seen so far it appears that FP could be “better” but I’m not entirely convinced yet.
> OO would not have become so dominant if businesses didn’t see real benefits.
OOP only became popular because of myth that it would solve all your programming problems,.
Pointy haired bosses not having a clue, saw it as business benefits .
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
If you want to see it from the flip side, then articles like this linked below are tremendous. A lengthy, but worthwhile read.
completely disagree. If without OOP, people might have adopted functional programing earlier. I don’t mean Haskell or whatnot academic things. Just plain common sense use of functions, lots functions, in modules and namespaces.
To me, OOP has harmed programing community significantly. Also it is a harm to programing education.
But, ultimately, we need science based evidence. Namely, social science here. As far as i know, few are done in this area, as it is rather academic, comparatively useless and no immediate business benefits.
I read the “expensive disaster” article a while back. I found it half a valid critique, and half fanboi ranting against something not-his-preference. 🙂 Of note, though, is that it was comparing OOP to pure FP. I don’t know anyone still defending traditional procedural code anymore, which is for the best.
Regarding it being “a thing more of preference”, there are certainly many similarities; see this presentation I given on Functional Programming in PHP:
But it’s also a question of the type of software you’re building, and the scale. Some things lend themselves better to OOP, others better to FP. See also, Norris Numbers:
I’ll defend traditional procedural code in HPC circles.
An interesting difference between OO thinking and FP thinking is the way these paradigms approach designing an architecture. OO is more of a top-down approach: Think about your problem, model domain object, implement them. For FP, a bottom-up approach comes more naturally. Think about your problem, inputs, results and implement a function that maps inputs to outputs. on the way, solve the subproblems you encounter using the same approach. FP feels more agile here to me.
The problem with OO that I encounter a lot is, that it is quite easy to put the logic into the wrong spots. At first the idea to model all worldly entities into classes is really appealing, but too soon you may see that not every object in the physical world makes a good class in your code. You might argue that this is a problem with the programmer who should have thought more careful about which objects and classes to model/write. The OO paradigm does not have any clear advice on how to do this. The Software design patterns are a clear symptom, that even experienced programmers struggle with this.
With logic distributed over classes, writing unit tests is way more difficult than in FP where you mostly prepare some input data, and check that the function evaluates to the expected result.
Object oriented programming should be presented as a way of thinking really, not just a concept of software developing. I belive the way its emphasized makes a big difference in the way it will be used.
Right now is presented as a data structure but it is more than that. If it were that simple we would have used it from the moment programming was born.
I can’t really imagine someone having the nerve (or misunderstanding of OOP’s profound impact) to make a comment like that. I can honestly say that if I hadn’t learned programming through OOP techniques then I would have either been in a different field, or I’d be a pretty lousy programmer. Sure, there are other ways to solve the same problems, but OOP solutions make the most sense to me. Just my two cents.
> I can’t really imagine someone having the nerve (or
> misunderstanding of OOP’s profound impact) to make
> a comment like that.
Scott – which comment was that in response to?
My personal experience is that the more someone understands OOP, the more likely they are to criticise it. A lower barrier to entry is great to get novices doing *something*, but most of OOP is broken and does not scale.
BTW, I’m not convinced that if you learned programming through some paradigm other than OOP that you’d not have stuck with it. Of course, this can’t be proved and so we can choose to ignore both of our opinions on the matter.
Scott
OOP makes most sense to everybody because its very easy to map concepts into objects and then, subsequently, express them using object-oriented language constructs (whether its a prototyping lang or class lang).
This is why OOP is so successful – programming is all of the sudden easy.
Hint, its not.
As soon as your problem domain starts including something that can’t be solved by writing some glue around a massive application/library stack (for example, realtime performance on modest hardware, no-crash policy, bug-free software, etc), or even when your application reaches certain size – OOP is literally a hindrance that doesn’t exist in other paradigms. This is not due to programming skills; it is due to how you’re expressing the problem.
Take Haskell as an example – its language syntax is so vastly different from imperative/OOP programming that you simply can’t express buggy code. For problem domains listed above, being able to write massive applications without keeping a gigantic state vector in your head is a blessing.
Modern OOP has nothing to do with OOP how it was taught. For example, modern OOP is dividing objects into ‘data objects’ and ‘algorithm objects’, which violates basic OOP principle that algorithm has to sit next to data with which it operates.
When you gather most of these best practices together, you see very quickly that modern OOP is just flawed procedural-imperative programming in disguise.
My comment was actually in response to the quote within the article, not a comment on the article. I didn’t mean to defend OOP as the paradigm to rule them all, just that it’s success or failure shouldn’t be determined by it’s ability to solve all of our problems (as the “young developer” from the quote seemed to imply). Of course there is no perfect paradigm out there, but I do think each has its place in certain applications/problem spaces – OOP included.
OO was something when various OO schools defined it. It was discontinuous, so adoption was slow. But, all of those OO schools failed. MS rewrote their API w/ GETs and PUTs, the idealism went out the window, but OO became continuous and subsequently got adopted rapidly. Yes, OO thinkers, the strict OO people think it failed. Then came lattices and design patterns. We’ve moved well beyond OO. | https://www.johndcook.com/blog/2015/07/31/the-success-of-oop/ | CC-MAIN-2018-17 | refinedweb | 3,856 | 62.68 |
Hello everyone,
I recently started programming AVRs with C++. Everything was ok until I had to do some testing. It seems like most AVR platform specific testing libs don't support C++ features like templates, so I went with C++ header-only lib - Catch (). Problem appeared after running it - tests with only C++ code compiled without problems, but when I tried to test AVR things it shows long list of errors.
My plan to test AVR:
-isolate setting every register to one class named Avr and create methods like set_bits, clear_bits etc
-pass this class in template like so:
template<class HW = Avr>
and use those methods in normal programming
-in testing though use other class AvrTest with mocked methods (like internal array or variable pretending to be register)
So I created stub of test scenerio and included my file which also included <avr/io.h> and compiled it with avr-g++ with c++ support. Everything failed miserably, so I concluded that it doesn't look for C++ std libs used in Catch. I added it manually and also failed. Can somebody help me with that problem? I don't know if I have to isolate AVR code more to not include <avr/io.h> at any time or what.
Here's errors log:
(command used to compile is contained in first line)
here's test suite code:
extern "C" { #include <stdint.h> } #include "lib/catch.hpp" #include "../src/adc.hpp" SCENERIO("ADC is working properly", "[ADC]") { GIVEN("A new Adc object") { WHEN("State is checked after creation") { THEN("ADC is enabled") {} THEN("ADC interrupts are enabled") {} THEN("Prescaler is correctly set") {} THEN("ADC register is adjusted to simplify usage of 8 bit data") {} } } }
Here's ADC class code:
#ifndef ADC_HPP #define ADC_HPP extern "C" { #include <avr/io.h> } #include "util/avr.hpp" template <class HW = Avr> class Adc { public: inline Adc() { // Uref = AVCC with external capacitor at AREF pin, // set let adjust of result for convienient 8bit access HW::set(ADMUX, (1 << REFS0) | (1 << ADLAR)); // ADC enable, free running mode, start first // conversion, interrupt on update, turn on // interrupts default prescaler (/2) HW::set(ADCSRA, (1 << ADEN) | (1 << ADFR) | (1 << ADSC) | (1 << ADIF) | (1 << ADIE)); } inline uint8_t get_8bit_conversion_result() const { return HW::get(ADCH); } inline void stop_ADC() const { HW::clear(ADCSRA, (1 << ADEN)); } inline void start_ADC() const { HW::update(ADCSRA, (1 << ADEN)); } }; #endif // ADC_HPP
aaand avr.hpp code:
#ifndef AVR_HPP #define AVR_HPP extern "C" { #include <avr/io.h> } class Avr { public: static inline volatile uint8_t& get(volatile uint8_t& address) { return address; } static inline void set(volatile uint8_t& address, const uint8_t value) { address = value; } static inline void clear(volatile uint8_t& address, const uint8_t value) { address &= ~value; } static inline void update(volatile uint8_t& address, const uint8_t value) { address |= value; } private: Avr() {} ~Avr() {} }; #endif // AVR_HPP
Have a good day!
EDIT: BTW avr-g++ does have libstdc++ but I imagine you mean things like std::string, std::vector, etc from the Standard Template Library?
EDIT2: This is one of the STL implementations I was thinking of:... however I know there's a page somewhere that compares ALL the available implementations and I think it had arguments for why some of the others may be "better".
EDIT3: Ah I think this was the comparison I was thinking of:...
Top
- Log in or register to post comments
Yeah, but STL doesn't solve the problem. As you may see, in error log errors aren't related to absent STL libs, but something is wrong with the floating point types. That can be a avr-g++ / g++ clash because they're using different definitions of those? Or I dunno, maybe types defined in stdint (I don't really remember name of that header, it provided uint8_t and more) are overriding standard types? I'm looking for any clue which would help resolving this issue.
Top
- Log in or register to post comments
Who added the paths to the headers of the host compiler? You?
Stefan Ernst
Top
- Log in or register to post comments
Maybe this link will help:...
Top
- Log in or register to post comments
@sternst, yes I added them to make Catch happy
@El Tanya's, so I have to do it other way around, right? Compile my tests with g++ and add libs for avr. I tried it before, but even setting internal flag (which isnt recommended TBH) didn't help much. I think this don't substitute setting -mmcu flag, there's something more, maybe linker related. I'll post errors caused by g++ later.
Edit: now I realized that compiling by g++ makes more sense, as we're testing on PC.
Top
- Log in or register to post comments
Stefan Ernst
Top
- Log in or register to post comments
Yeah, I think for your tests, you need to compile the AVR stuff for the PC and not the other way around. I can't even begin to imagine what kind of problems this will cause.
Top
- Log in or register to post comments
Okey, compiled with G++ with flag for atmega8 set. Doesn't work either, I may be wrong but I think this is connected with incompatible exceptions provided from AVR headers.
I'll probably try to create complete HAL to avoid this.
Here's log:
If somebody got any other idea, I'll appreciate it.
Top
- Log in or register to post comments
"Exceptions"??? I don't think avr-g++ supports c++ exceptions; it is one of the things that makes porting normal C++ code so frustrating.
But I'm not sure the errors you posted have anything to do with C++ exceptions, so maybe you meant something else...
I think the chances of avr-g++ being able to support something like the locale features desktop users have come to expect are ... small. No OS, no locale support.
And avr-libc has its own "time" library that is substantially different from "normal."
These are a little puzzling, because the div_t and ldiv_t structures from avr-libc look just like the ones in /usr/include...
OTOH, you really need to be sure that things from /usr do NOT get included when compiling avr code. You need the ones from ...avr/include
One of the major differences is going to be sizeof(int)
No actual "files" in avr-gcc. Limited stdio library.
sizeof(int) issue?
No OS, no global error codes.
I'm a little surprised by these, since avr-libc does have a set of chracter classification functions...
Perhaps the C++ ones are supposed to be locale-aware (and ... no locales...)
Top
- Log in or register to post comments
C and C++ standards are a moving target.
GCC has a flag to compile to a specific standard with the -std= flag.
Some of the supported -std flags are c99, c11 c++98, gnu++11, but there are more of them.
Your results may also vary with the version of the compiler you are using.
I simply use the version installed by apt on my linux box, but it is a few years old.
The most recent version vor avr-gcc seems to be the version maintained and downloadable from the Atmel / Microchip site.
I also know of a few attempts to use templates for I/O register definitions, but those are all for ARM Cortex processors.
But you might still be interested to get some Ideas.
Edit:
"Microsoft" -> "Microchip". Oops...
Doing magic with a USD 7 Logic Analyser:
Bunch of old projects with AVR's:
Top
- Log in or register to post comments
"definitions", my bad. What I tried to get is AVR definitions needed by avr/io.h and ensure everything else is using my native platform definitions (x86_64). Today came to me that int8_t for example isn't another type but typedef for char, so I can't use AVR definition for int (which is 8 or 16 bits wide) and my system's definition for int (which is likely wider). So thanks for enlightening that and TIL I guess.
Top
- Log in or register to post comments
Okey, I moved everything into abstraction using static polymorphism by templates, so far it's working, so if you or anybody is interested in this I'll post code on Github in a day or two.
I'm happy that everything is done in compile time, so size remains the same as I would use registers directly.
Top
- Log in or register to post comments
I'd like to take a look, for sure.
Top
- Log in or register to post comments
Okey, so I completed project to point where it's in usable state. It isn't finished though, but I'm working on it.
So, most interesting things:
1. I used OOP C++, it's quite efficient
2. I've written HAL which abstracts most of AVR stuff (except ISR() calls, this is implemented via awful macro)
3. It has tests in C++ which uses HAL, effectively emulating AVR (it's in WIP state, it's necessary to implement some things done by hardware by yourself)
Here's some links:
1. HAL (incomplete):
2. main file:
3. example class encapsulating AVR peripheral
4. ...and test for it
Anyway, I'm quite new here, are somewhere in forum hints for C++ on AVR except that pinned post from TFrancuz or not really?
Top
- Log in or register to post comments
You mean Microchip, of course .. ?
Top Tips:
Top
- Log in or register to post comments | https://www.avrfreaks.net/comment/2508576 | CC-MAIN-2019-18 | refinedweb | 1,576 | 70.63 |
Timer Constructor (TimerCallback)
Initializes a new instance of the Timer class with an infinite period and an infinite due time, using the newly created Timer object as the state object.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- callback
- Type: System.Threading.TimerCallback
A TimerCallback delegate representing a method to be executed.
Call this constructor when you want to use the Timer object itself as the state object. After creating the timer, use the Change method to set the interval and due time.
This constructor specifies an infinite due time before the first callback and an infinite interval between callbacks, in order to prevent the first callback from occurring before the Timer object is assigned to the state object. creates a new timer, using the timer itself as the state object. The Change method is used to start the timer. When the timer callback occurs, the state object is used to turn the timer off.
using System; using System.Threading; public class Example { public static void Main() { // Create an instance of the Example class, and start two // timers. Example ex = new Example(); ex.StartTimer(2000); ex.StartTimer(1000); Console.WriteLine("Press Enter to end the program."); Console.ReadLine(); } public void StartTimer(int dueTime) { Timer t = new Timer(new TimerCallback(TimerProc)); t.Change(dueTime, 0); } private void TimerProc(object state) { // The state object is the Timer object. Timer t = (Timer) state; t.Dispose(); Console.WriteLine("The timer callback executes."); } }
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0 | https://technet.microsoft.com/en-us/library/ms149618.aspx | CC-MAIN-2017-30 | refinedweb | 252 | 60.41 |
Hello! I'm trying to solve this problem and I've been at it for hours.
Write a method called handScore that takes an array of cards as an argument and
that adds up (and returns) the total score. You should assume that the ranks of the
cards are encoded according to the mapping in Section 11.2, with Aces encoded as
1.
I'm confused on how this array is presented, as in how can I generate a random hand?
I have a randInt method I built and I have a deckBuild method. I'll post what I have already done below.
Can someone explain this to me? Possibly step by step? I can do the coding myself, I'm just failing at problem solving right now.
package card; /** * * @author Josh */ public class Card { int suit, rank; public Card () { this.suit = 0; this.rank = 0; } public Card (int suit, int rank) { this.suit = suit; this.rank = rank; } // prints all cards public static void printCard (Card c) { String[] suits = {"Clubs", "Diamonds", "Hearts", "Spades"}; String[] ranks = {"empty", "Ace", "2", "3", "4" ,"5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"}; System.out.println (ranks[c.rank] + " of " + suits[c.suit]); } public static void printDeck (Card[] deck) { for (int i=0; i<deck.length; i++) { printCard (deck[i]); } } // constructs a deck of 52 cards public static Card[] buildDeck () { Card[] deck = new Card [52]; int index = 0; for (int suit = 0; suit <= 3; suit++) { for (int rank = 1; rank <= 13; rank++) { deck[index] = new Card (suit, rank); index++; } } return deck; // produces a random integer public static int randInt (int low, int high) { double x = Math.random() * (high - low + 1); return (int) x + low; } | https://www.daniweb.com/programming/software-development/threads/326426/counting-an-array | CC-MAIN-2018-09 | refinedweb | 280 | 83.05 |
This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.
Just to get a clearer error message, use GDB in command mode: gdb -x -nw <your program> ... (gdb) set remotebaud 9600 (gdb) target mon2000 /dev/com1 I don't know much about the mon2000 target. If it has a log facility you may try setting it on. Fernando Noah Aklilu wrote: > > Hi > I trying to get gdb (really insight 5.0) > to talk to a Mitusbishi MSA2000G01 (the m32r > evaluation board). I switched the board to monitor/ > self-debugging mode (instead of the default db32r ethernet > mode) and get the Mon2000> prompt > using a terminal emulator. When I tell gdb to > connect to the same com port using mon2000 as the > target (target mon2000 /dev/com1) it comes back with the error > listed below. > I tried other target modes such as target m32r /dev/com1 > but it simply times out. I am running gdb/insight under cygwin > 1.1.7 on an NT 4 host (and compiled it there as well). Any > comments/tips will be appreciated. > > Noah. > > -- start here > monitor_supply_register (21): bad value from monitor: 7FFFFFF0 > psw = > 000000C0 (BSM=0, BIE=0, > BC=0, SM=1, IE=1, C=0) > bpc = 00000000 > r0 = 00000000 r1 = 00000000 r2 = 00000000 r3 = 00000000 > r4 = 00000000 r5 = 00000000 r6 = 00000000 r7 = 00000000 > r8 = 00000000 r9 = 00000000 r10 = 00000000 r11 = 00000000 > r12 = 00000000 r13 = 00000000 r14 = 00000000 > spu = 009E3200 spi = 009E4200 acc = 00000000:00000000 > >. > > while executing > "gdb_cmd "set remotebaud $baud"" > (object "::.targetselection0.targetselection" method > "::TargetSelection::change_baud" body line 4) > invoked from within > "::.targetselection0.targetselection change_baud > .targetselection0.targetselection.f.lab.lf.childsite.cb 9600" > (in namespace inscope "::TargetSelection" script line 1) > invoked from within > "namespace inscope ::TargetSelection > {::.targetselection0.targetselection > change_baud} > .targetselection0.targetselection.f.lab.lf.childsite.cb 9600" > ("after" script)errorCode is NONE > --end here > > ------------------------------------------ > Noah Aklilu > > naklilu@ualberta.ca -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9 | https://www.sourceware.org/ml/gdb/2001-01/msg00035.html | CC-MAIN-2019-09 | refinedweb | 332 | 56.76 |
Hello,
I hope this is the right place to post this, I wasn’t sure if here or the motors board would be better but I think this is a programming issue.
I’m trying to create a simple program that runs a stepper motor (using a TB6600 microstep driver) continuously until interrupted by a sensor signal. Essentially, I want the motor to start running whenever I start the program, and when the program receives a low signal from the sensor, I want the motor to stop. Once the program recieves a high signal again from the sensor, I want it to start running again. I’ve tried the code below and it’s not doing anything, the motor just makes a clicking sound. Any idea what’s going on? I’ve tried so many different variations and looked at so many Accelstepper examples to try to get this to work and I can’t figure it out. I feel like it should be really simple but it’s just not clicking in my brain.
Thanks for any help!
#include <AccelStepper.h> #define MotorInterfaceType 1 #define dirPin 6 #define stepPin 3 AccelStepper stepper = AccelStepper(MotorInterfaceType, stepPin, dirPin); int IRsensor = 0; int IRsensorcall; void setup() { pinMode(IRsensor, INPUT); stepper.setMaxSpeed(2000); Serial.begin(9600); } void loop() { stepper.setSpeed(1000); stepper.move(1000); //run motor at constant speed IRsensorcall = digitalRead(IRsensor); //read sensor Serial.println(IRsensorcall); //if sensor reads 0, stop the motor. Else keep motor running. if (IRsensorcall == LOW){ stepper.move(0); delay(500); } stepper.run(); } | https://forum.arduino.cc/t/using-sensor-input-to-stop-motor-w-accelstepper-library/697180 | CC-MAIN-2022-40 | refinedweb | 255 | 56.96 |
Let's say my app is a list of many items. There's a lot of items so I don't want to include all the items in the redux state.
When a user visits me at myapp.com/item/:itemId, I want to display the selected item. Currently I make an api call in componentDidMount to fetch the item and store the response in myReduxState.selectedItem. However, this shows the user and unfinished page until the api call finishes.
Is there any way I can get around this?
The pattern I tend to follow is to have a state of
fetching being tracked in the redux state. Once the api resolves you just make sure the state is set correctly and then in your render methods use that to determine what you are rendering.
render() { if (this.state.fetching) { return <div> // put whatever you want here, maybe a loading component?</div> } return ( // put the regular content you would put for when the api call finishes and have the data you need ) }
I solved this problem by making the creating the state on the server side. I get the itemId from the url in my express route and get the details of the specific item. I use this to create the state and pass it to the front-end. | http://m.dlxedu.com/m/askdetail/3/dd7be2272fb2ca33a84b825da7bc1308.html | CC-MAIN-2018-30 | refinedweb | 219 | 81.73 |
Visual Source Safe Admin Password Reset
We used to use Visual Source Safe (VSS) 6.0 for projects, and so have some older projects that are not routinely accessed. So what happens when you forget the admin password a few years down the line?
There are various suggestions around the net, but this little tool should help: Reset VSS 6 admin password
Simply run in the Data directory of your VSS 6.0 project (where the file um.dat is located) using a command prompt, then rename the files as instructed and your admin password will become blank.
Murthy said,
March 27, 2006 @ 1:42 pm
Simply excellent! Small app but great result.
Pramela said,
July 10, 2006 @ 7:24 am
IT works.. thanks a lot
Krishna said,
January 24, 2007 @ 1:07 pm
Simply Great
PushThePramALot said,
February 2, 2007 @ 10:48 pm
phew, thanks man. This certainly saved the day today… the lead dev who maintained VSS changed the password and walked out. Works like a champ!
Jan Michael said,
May 18, 2007 @ 1:45 am
It works! Your the man!! thanks…
Vic said,
October 2, 2007 @ 8:37 am
Cool tool
thanks for covering my ass!
saguni said,
November 27, 2007 @ 3:40 am
Cool. Thanks.
Yann P. said,
January 10, 2008 @ 8:40 pm
Worked like a charm.
Thanks again for sharing it.
Pierre Andreasson said,
February 7, 2008 @ 9:54 am
Nice work! Thank you!
sanjay.ivar said,
March 20, 2008 @ 4:52 am
It’s working Thanks a lot.
and also Thanks for sharing.
Sanjay
MGH said,
May 8, 2008 @ 1:13 pm
Magic! Saved my life
Ed said,
July 7, 2008 @ 3:43 pm
Spot on. Other sites were complicated and laborious.
tony said,
July 22, 2008 @ 5:21 pm
So sweet!
Mike said,
July 28, 2008 @ 6:39 pm
Wonderful work, you have my heartfelt thanks.
Syed Muhammad Salman said,
August 1, 2008 @ 11:43 am
Thank you soo much…
Really it is great utility…
Vijay Khapekar said,
August 7, 2008 @ 7:39 am
First of all, thanks a lot.
Simply Superb. simply gr8.
Amos Devakumar said,
August 12, 2008 @ 8:53 am
Cool and great work…! Thanks a lot.
Praveen said,
September 4, 2008 @ 9:24 pm
What about the other users who are on VSS? Will they get affected?
Does it reset only the admin user password?
42 said,
September 4, 2008 @ 10:54 pm
Honestly, it’s been so long I can’t remember. To be safe, backup your whole VSS folder tree and then you can always go back.
You could create a small test project elsewhere and try it with that…
Ravi said,
September 18, 2008 @ 10:29 am
Hey Really it’s excellent
Thanks a lot
Rafael Santos said,
October 9, 2008 @ 7:26 pm
This application works very well and does not affect the others users.
By the way, the only file that’s modified is um.dat… so this is the only one you need to backup.
Hey 42, do you allow I translate this tip to pt-BR and post in my website?
There’s always someone with an old repository and a lost password…
Rafael Santos said,
October 9, 2008 @ 7:54 pm
I forgot!
Obviously I will put the credits e a link to this page!
Stephen Davis said,
October 16, 2008 @ 9:49 pm
Does this application work with VSS 2005?
42 said,
October 17, 2008 @ 1:12 pm
No, only VSS 6.0
VSS reset admin password - Mauricio Rojas Blog said,
October 21, 2008 @ 4:30 pm
[…] The tool from this page […]
M4ndybase said,
October 21, 2008 @ 4:45 pm
It’s fantastic.
Thanks a lot for sharing this with us.
[]
Bhavika said,
November 3, 2008 @ 12:31 pm
Great utility !!
Thanks !!!!
Jeetendra Prasad said,
November 9, 2008 @ 7:25 am
Thanks man. You just made my day. Keep the good work.
— Jeetendra Prasad
BurtRM said,
December 1, 2008 @ 5:18 pm
You rock!!! The little exe definitely saved the day.
Thanks!!
M4ndybase said,
December 2, 2008 @ 7:31 pm
Thanks a lot.
sridhar said,
December 3, 2008 @ 11:12 am
wonderful. great. splendid. marvelous. amazing. rocking. mind blowing.
Kalyan said,
December 30, 2008 @ 9:48 am
Simply Great
asutosha said,
January 15, 2009 @ 5:42 am
Thanks , it is aGreat Tool.
Lepi Nesha said,
February 11, 2009 @ 10:08 am
Huge thank you man. HUUUUGE!!!
Glenn said,
March 17, 2009 @ 10:44 pm
Thank you!
Aruna said,
March 31, 2009 @ 6:21 am
Thanks a lot! Great tool !
Resetando a senha de Admin no Visual Source Safe - RafaelSantos.com said,
May 29, 2009 @ 7:52 pm
[…] após uma breve “googlada” deparei-me com um blog que indicava um minúsculo programa para resetar a senha do usuário […]
Hanna said,
August 26, 2009 @ 11:53 am
Gr8 tool. Works like a charm.
Syed said,
October 7, 2009 @ 7:44 am
Simply fantastic……..Works
anthony said,
November 4, 2009 @ 10:10 pm
Simply Great…
Martin said,
January 5, 2010 @ 2:31 pm
Hi, I have the Visual SourceSafe Version 8.0 and forget the password for user admin.
do you have any soft to resete that user in this version??..
Thanks a lot!!!..
Krishna said,
January 9, 2010 @ 6:51 am
…rename the files as instructed and your admin password will become blank.
How many files would you have to rename ?
42 said,
January 12, 2010 @ 12:25 am
Nope, just for the old version. Things changed big time between now and then.
42 said,
January 12, 2010 @ 12:27 am
It’s been so long! 2 I believe – the current um.dat to back it up. The modified one to um.dat.
The tool tells you when you run it.
As always, backup everything before you start to make sure you’re safe.
Baddy said,
January 14, 2010 @ 6:50 am
Thanks man. U r simply gr8…
myths said,
February 17, 2010 @ 10:35 am
Thanks a ton.. helped me alot..
Deva said,
March 4, 2010 @ 3:11 pm
sorry boss
not working
Ansari said,
March 25, 2010 @ 8:48 am
Excellent utility
Raunak said,
April 5, 2010 @ 6:07 am
Hey buddy, thanks a lot for this sweet little tool – it saved my life!
Muhammad Azam said,
April 5, 2010 @ 6:25 am
compact solutino
Srinivas said,
June 9, 2010 @ 8:49 am
Thanks a lot. Now I can reset my VSS admin pwd.
SP said,
June 23, 2010 @ 10:49 am
very helpful , thanx a ton!!!!
Tam said,
June 30, 2010 @ 8:26 pm
THANKS! it worked great!
Simon said,
July 9, 2010 @ 2:53 pm
Thank you. Worked great on version VSS 6.0d.
marcos said,
July 19, 2010 @ 1:30 pm
Tks man! It works very well. You just forgot to say that it generates a file umfix.dat that needs to be renamed to um.dat.
Bunyamin TOPAN said,
August 17, 2010 @ 4:51 am
It worked.Thnx
Parth Gandhi said,
September 28, 2010 @ 2:13 pm
absolutely superb..
Shyam said,
October 21, 2010 @ 9:26 pm
I have version 8.0. If some body have any tool to blank the password, please let me know.
Luanne said,
October 25, 2010 @ 6:55 am
excellent utility!
thank you
Nogol Tardugno said,
November 19, 2010 @ 7:05 pm
Thanks so much! This really helped!
R said,
November 23, 2010 @ 2:48 pm
Love it 😀
Luis Ramirez said,
January 12, 2011 @ 9:15 pm
Excellent!!!
Thanks 😀 — Pura Vida!!
Recovering Visual SourceSafe (VSS) Admin Password « Low IT said,
May 16, 2011 @ 9:13 pm
[…] You can retrieve it right here: […]
Hanu said,
June 22, 2011 @ 1:36 pm
Excellent tool….. Thanks a lot
shailender said,
January 20, 2012 @ 7:37 am
thanks. it works for me.
Ram said,
January 25, 2012 @ 7:07 pm
G8!
Balaji said,
February 9, 2012 @ 1:25 pm
What a wonderful utility man. Awesome. it saved a lot of rework effort. 100 votes from me. Keep up the good work.
vjj said,
April 29, 2012 @ 2:00 pm
thanks!
Channaka said,
June 15, 2012 @ 9:42 am
Wow…Managed to recover some old source codes.
Thank for the tool.
nazli said,
September 17, 2012 @ 10:04 am
i could not understand how to use this file.i copy umfix.dat into my vss directory and delete um.dat and then rename fixum.dat to um.dat.(Without Command Prompt)
Is it right?
when i want to open vss admin i got error “Error reading from File”
And also the size of umfix.dat is 0 kb.
nazli said,
September 17, 2012 @ 10:17 am
I did it. it was great
thanks
SLL said,
December 9, 2012 @ 9:53 am
Run as Administrator. Perfect. Thank you.
Amila Perera said,
March 29, 2013 @ 11:53 am
Excellent tool….. Thanks a lot for sharing this with us.
Christian said,
April 17, 2013 @ 3:28 pm
thanks a million, we were “saved” as well by the program. Worked like a charm.
Larry said,
April 19, 2013 @ 2:44 pm
Real Forum, running exe makes me nervous?
Administrator said,
April 19, 2013 @ 9:26 pm
It is real, which is why I cleanse the spam posts that make it through the spam filters.
Mark said,
May 17, 2013 @ 11:23 pm
Thanks – works like a charm.
Vinay Dwivedi said,
June 17, 2013 @ 7:28 am
Great job..
It works ..
jerry said,
June 24, 2013 @ 3:41 pm
//c# Source code for an app to fix the um.dat
using System;
using System.IO;
namespace UmDatFixer
{
class Program
{
static void Main()
{
var fileBytes = File.ReadAllBytes(“um.dat”);
var nr = fileBytes.Length;
var i = 132;
for ( ; i nr)
{
throw new Exception(“Could not find admin password.”);
}
fileBytes[i – 2] = 0xBC;
fileBytes[i – 1] = 0x7F;
fileBytes[i + 32] = 0x90;
fileBytes[i + 33] = 0x6E;
File.WriteAllBytes(“umfix.dat”,fileBytes);
}
}
}
Roberto said,
July 24, 2013 @ 11:44 am
this tool is great! thanks a lot for saving all that time!
jp said,
September 3, 2013 @ 9:34 pm
thanks
TimB said,
September 5, 2013 @ 10:06 pm
Still works great. Easy, too. Thanks!
Ganesh said,
September 26, 2013 @ 1:18 pm
How do I rename the files??
can someone please provide a complete steps I need to do
Mike said,
October 24, 2013 @ 2:25 pm
Still works. Pulling old projects out of the way back machine.
Nilesh said,
November 19, 2013 @ 10:05 am
Excellent Tool Many thanks for sharing this tool to all the system administrator who can save there work in less time.
thanks Again !!!
Tuyen Nguyen said,
December 12, 2013 @ 7:26 pm
Thank you very much. It works for me.
Raj said,
March 31, 2014 @ 1:40 pm
Thanks a lot buddy…. It worked..!!!
Sid K said,
April 16, 2014 @ 4:41 pm
Thank you. This helped me get back into the source when 7 out of the 7 people who had access the repository left the company. Worked like a charm.. btw – I use VSS 2005..
Antonio Vasquez said,
July 3, 2014 @ 10:17 pm
Thanks works!!!! great
Rick said,
December 19, 2014 @ 8:17 pm
Still works!!!!! Thanks!!!!
Donald said,
January 6, 2015 @ 10:44 am
This saved my life. My wife was about to leave me and our 16 children, but I ran this utility and it fixed my login so she decided to stay and now we have 34 children. You are amazing.
Iqbal said,
January 6, 2015 @ 5:04 pm
Thanks a bunch… It works as promised
Elter Souza said,
February 12, 2015 @ 12:21 pm
Thanks a lot, man!
This helped me so much.
Joe said,
March 10, 2015 @ 8:24 pm
Still works like a champ!!! Had to migrate off an old VSS install on a Win2003 Server. Reinstalled on a Win2008 box; copied over the DBs, ran the utility, and……success – “admin” is back in business. THANKS so much…!!!
Nadeem Akhtar said,
March 24, 2015 @ 3:53 am
Yes, It was very simle.
Thanks. | http://not42.com/2005/06/16/visual-source-safe-admin-password-reset/ | CC-MAIN-2019-09 | refinedweb | 2,004 | 84.98 |
Whirlpool hash function. More...
#include "core/crypto.h"
#include "hash/whirlpool.h"
Go to the source code of this file.
Detailed Description
Whirlpool hash function.
Whirlpool is a hash function that operates on messages less than 2^256 bits in length, and produces a message digest of 512 bits
- Version
- 1.9.6
Definition in file whirlpool.c.
Macro Definition Documentation
◆ RHO
Definition at line 47 of file whirlpool.c.
◆ TRACE_LEVEL
Definition at line 37 of file whirlpool.c.
Function Documentation
◆ whirlpoolCompute()
Digest a message using Whirlpool.
- Parameters
-
- Returns
- Error code
Definition at line 183 of file whirlpool.c.
◆ whirlpoolFinal()
Finish the Whirlpool message digest.
- Parameters
-
Definition at line 273 of file whirlpool.c.
◆ whirlpoolInit()
Initialize Whirlpool message digest context.
- Parameters
-
Definition at line 210 of file whirlpool.c.
◆ whirlpoolProcessBlock()
Process message in 16-word blocks.
- Parameters
-
Definition at line 317 of file whirlpool.c.
◆ whirlpoolUpdate()
Update the Whirlpool context with a portion of the message being hashed.
- Parameters
-
Definition at line 234 of file whirlpool.c.
Variable Documentation
◆ whirlpoolHashAlgo
Definition at line 157 of file whirlpool.c.
◆ whirlpoolOid
Definition at line 154 of file whirlpool.c. | https://oryx-embedded.com/doc/whirlpool_8c.html | CC-MAIN-2020-34 | refinedweb | 187 | 54.39 |
Introduction
If you know of a better place in the wiki for this to go, please suggest it in the ?Comments section.
Under construction.
I have been working to set up a Soekris net5501 to act as a home router/server. My efforts are documented here. Note that this is not intended to cover any hardware issues; software only.
Contents
Contents
Requirements
Here is a list of requirements with links to the relevant sections.
- 100% Debian, no external software unless absolutely necessary
- Stock Debian kernel
?dnsmasq server, providing
- DNS, including local DNS
- DHCP server, including static IPs
Support IPv4 and IPv6 - ?Firewall
Provide local private network bridge - ?Networking
- Provide public network
Simple and robust ?firewall
- Reasonable security for the router
- Port forwarding (single, range, or all)
- Modify TOS packet header bits
?Traffic control to provide a better internet experience for multiple users/connections
- Use TOS packet header bits
Assumptions
- eth0 is WAN ethernet port, others are LAN ethernet
- wlan0 is wireless
Basic Networking
Internal network is all bridged to one subnet 192.168.5.0/24. Notice the wlan0 port is bridged also; otherwise it could have it's own section similar to br0.
/etc/network/interfaces:
# The loopback network interface auto lo iface lo inet loopback # The primary network interface (WAN) auto eth0 allow-hotplug eth0 iface eth0 inet dhcp # Network bridge (LAN) auto br0 iface br0 inet static address 192.168.5.1 netmask 255.255.255.0 network 192.168.5.0 broadcast 192.168.5.255 bridge_ports eth1 eth2 eth3 wlan0
The "allow-hotplug" stanza does not seem to work quite as well as I hoped in the case of unplugging from one device (eg. cable modem) to another. Perhaps the DHCP lease must expire?
Set up /etc/hosts to make local DNS work correctly:
Change this line:
127.0.1.1 hostname.example.org hostname
To:
192.168.5.1 hostname.example.org hostname2.example2.org hostname
hostname -s and hostname -f should both work correctly now.
dnsmasq
dnsmasq.conf... TODO
Firewall
iptables & ip6tables... TODO
UPnP
upnpd.conf... TODO
hostap
hostapd.conf... TODO
IPv6
6to4 versus Teredo... TODO
6to4
Public IPv4 address... TODO
Teredo
miredo... TODO
Traffic Control
script... TODO
Feedback is appreciated.
I'd suggest recording the installation parts in the InstallingDebianOn namespace -- PaulWise 2010-02-21 01:01:02
Thanks Paul, but I do not plan to include any hardware-specific installation information. I added a note above. -- ?green 2010-02-21 03:08:07
Contributing to InstallingDebianOn would still be appreciated, as would the hardware info that the InstallingDebianOn templates suggest to add -- PaulWise 2010-02-21 12:37:45 | https://wiki.debian.org/green/Router?action=diff&rev1=8&rev2=9 | CC-MAIN-2017-51 | refinedweb | 438 | 51.14 |
User Details
- User Since
- Dec 28 2012, 2:34 PM (396 w, 2 d)
Fri, Jul 24
Thu, Jul 23
Where does the configuration need to live? If it just needs to be a build-time configuration, that may be simpler than exposing new mallopt options.
Any callee-saved register can be used.
Rebase
Wed, Jul 22
Add a tuning setting
Tue, Jul 21
Doesn't this require a change to the parser to accept 0 in place of the linked symbol?
Thu, Jul 16
Wed, Jul 15
It is unclear to me whether removing the nounwind condition is necessary. The wording in the langref talks about "asynchronous exceptions" but only provides semantics for "exception handling schemes that are recognized by LLVM to handle asynchronous exceptions, such as SEH". Since we don't support anything like that on non-Windows. I don't believe that we need to support throwing exceptions past such functions on DWARF platforms, and the unwind info can only be used for the purpose of creating a stack trace.
May 6 2020
LGTM
May 1 2020
Apr 30 2020
The architecture may need to be different here IMHO because of subsections. Don't forget that you need to map relocations onto subsections in order to implement gc-sections, and depending on the number of subsections you have per section, that could get expensive without an intermediate data structure. On top of that you'd still need the O(M log N) at output time. To me it seemed better to pay the O(M log N) up front once and avoid the cost at gc-sections time.
Apr 22 2020
Apr 21 2020
Apr 17 2020
Apr 16 2020
LGTM
Apr 9 2020
- Replace the fuzzer with one written by mitchp and fix an overflow bug
- Move RegionInfo alignment to field to avoid alignment requirement for getErrorInfo callers
- Fix build error
Apr 8 2020
- Add fuzzer, fix bugs found using it
Apr 7 2020
Apr 6 2020
Apr 3 2020
- Address review comments
Apr 1 2020
Mar 27 2020
It looks like this change broke the sanitizer-x86_64-linux-autoconf buildbot.
/b/sanitizer-x86_64-linux-autoconf/build/llvm-project/compiler-rt/lib/tsan/rtl/tsan_clock.cpp:190:13: error: use of undeclared identifier 'dst' DCHECK_LE(dst->size_, kMaxTid); ^ 1 error generated.
Can you please take a look?
Mar 26 2020
This change broke the sanitizer-x86_64-linux bot:
Please take a look.
Mar 23 2020
Having given this some more thought, I'm still not in favour of this change even with start/stop symbols excluded, since there are other cases where enumeration of SHF_LINK_ORDER sections may be possible/desirable. To give one example, imagine that you have .init_array sections linked to the globals that they initialize (this may be possible if you can prove that the constructor has no side effects other than initializing the object). With this change we may for example have multiple .init_array sections for .bss and .data, which would need to be accounted for when computing DT_INIT_ARRAY/DT_INIT_ARRAY_SZ. There are various ways that you could deal with this sort of situation, but it seems like the simplest one would be to stick with one output section per file.
This change broke the msan buildbot:
==70358==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x5a602b2 in deleteParallelRegions /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/IPO/OpenMPOpt.cpp:127:9 #1 0x5a602b2 in (anonymous namespace)::OpenMPOpt::run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/IPO/OpenMPOpt.cpp:116:16 #2 0x5a94252 in (anonymous namespace)::OpenMPOptLegacyPass::runOnSCC(llvm::CallGraphSCC&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/IPO/OpenMPOpt.cpp:559:19 #3 0x3f53893 in RunPassOnSCC /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:139:23
Mar 20 2020
Mar 12 2020
Mar 5 2020
There is already a way to do this, with the attribute [[clang::lto_visibility_public]]. Why do you need another one?
Mar 3 2020
Mar 2 2020
Feb 24 2020
This should be fixed by rG0414c5694073de26fd33a0276c47c6adea5284cf.
Now that llvm-go has been brought back, I've reverted this change.
Feb 13 2020
LGTM
Does it make sense to write a test for this? | http://reviews.llvm.org/p/pcc/ | CC-MAIN-2020-34 | refinedweb | 707 | 52.6 |
How to define a function that is piecewise for specific independent variable values
I'm solving for the coefficients of a fourier series, where the function to be approximated is
f(x) is 0 from -pi to +pi/2, and +1 from pi/2 to pi. It then repeats over all periods. The equation for the coefficients, c_n is (1/2pi)*int_-pi^pi f(x)e^{-inx}dx.
I've solved these to be c_0 = 1/4, c_n=1,5,...=-(1+i)/n, c_n=2,6,...=2i/n, c_n=3,7,...=(1-i)/n and c_n=4,8,...=0.
Now I'd like to check my work with sage. However, I'm having trouble getting my solutions into an equation form. The integral expression is easy. I can do
from sage.symbolic.integration.integral import definite_integral from sage.symbolic.integration.integral import indefinite_integral x=var('x') n=var('n') assume(n,'integer') assume(n!=0) c=(1/(2*pi))*definite_integral(e^(-I*n*x),x,pi/2,pi) c.full_simplify()
However, I don't know how to represent the piecewise part so I can check it with
bool(c==...)
Is there a way to do this with sage piecewise definitions? Something else?
One thought is that I could check the cases separately. That is, first check the n=1,5,... case etc. However, I'm not sure how to restrict n to be this. I can restrict it to be integer, or odd but I'm not sure about this.
Also, please forgive the horrendous math formatting. I wasn't able to get my latex formatted correctly here and I don't have enough rep to post a picture. | https://ask.sagemath.org/question/51748/how-to-define-a-function-that-is-piecewise-for-specific-independent-variable-values/?sort=oldest | CC-MAIN-2021-21 | refinedweb | 280 | 69.18 |
Multithread whois client module
Budjetti $250-750 USD
We would like someone to build an apache module for linux.
This module, should make a multithread whois to many registries at the same time and in a different way for each (registry)
All the configurations must be in a .conf files, so that we will not have to write extra codes if we will need to change something or add a new tld(.com, .net etc)
Below, we are writing down the 5 ways that the whois will work
-By Epp protocol (Extensible Provisioning Protocol).Its xml files must be .conf
-By the typical way that command whois at linux, works
-By a query at a url, e.g. [url removed, login to view]
-By making a post at a url
-By the use of domain check API of [url removed, login to view]
It will return (get) 3 results which should be ready for change from us by the use of configuration files and will be: available, not available, timeout
The module must work by making a post at a specific url (e.g. [url removed, login to view]) the domains and tlds and we must get the results at our browser, e.g.
Domain [url removed, login to view] is not available
Domain [url removed, login to view] is not available
Domain [url removed, login to view] is available
9 freelanceria on tarjonnut keskimäärin 549 $ tähän työhön
g'day, I'm quite good unix C developer. p.s. Apache was wrote on C lang.
If you want to get quality product for your quality business contact me. | https://www.fi.freelancer.com/projects/perl-cgi-c-c/multithread-whois-client-module/ | CC-MAIN-2017-51 | refinedweb | 268 | 73 |
eeprom.h File ReferenceDriver for the 24xx16 and 24xx256 I2C EEPROMS (interface). More...
#include <cfg/compiler.h>
#include <kern/kfile.h>
Go to the source code of this file.
Detailed DescriptionDriver for the 24xx16 and 24xx256 I2C EEPROMS (interface).
- Version:
Definition in file eeprom.h.
Define Documentation
Macro for E2Layout offset calculation.
- Note:
- We can't just use offsetof() here because we could use non-constant expressions to access array elements.
'type' is the structure type holding eeprom layout and must be defined in user files.
Definition at line 104 of file eeprom.h.
Typedef Documentation
Function Documentation
Initialize EEPROM module.
fd is the Kfile context. type is the eeprom device we want to initialize (
- See also:
- EepromType) addr is the i2c devide address (usually pins A0, A1, A2). verify is true if you want that every write operation will be verified.
Definition at line 369 of file eeprom.c. | http://doc.bertos.org/2.0/eeprom_8h.html | crawl-003 | refinedweb | 150 | 52.87 |
iOS library that manages the state of your app’s data. Teller facilitates loading cached data and fetching fresh data so your app’s data is always up to date.
Teller works very well with MVVM and MVI design patterns (note the use of
Repository subclasses in the library). However, you do not need to use these design patterns to use it.
Read the official announcement of Teller to learn more about what it does and why to use it.
Android developer? Check out the Android version of Teller.
What is Teller?
The data used in your mobile app: user profiles, a collection of photos, list of friends, etc. all have state. Your data is in 1 of many different states:
- Being fetched for the first time (if it comes from an async network call)
- The data is empty
- Data exists in the device’s storage (cached).
- During the empty and data states, your app could also be fetching fresh data to replace the cached data on the device that is out of date.
Determining.
Why use Teller?
When creating mobile apps that cache data (such as offline-first mobile apps), it is important to show in your app’s UI the state of your cached data to the app user. Telling your app user how old data is, if your app is performing a network call, if there were any errors during network calls, if the data set is empty or not. These are all states that data can be in and notifying your user of these states helps your user trust your app and feel they are in control.
Well, keeping track of the state of your data can be complex. Querying a database is easy. Performing an network API call is easy. Updating the UI of your app is easy. But tying all of that together can be difficult. That is why Teller was created. You take care of querying data, saving data, fetching fresh data via a network call and let Teller take care of everything else.
For example: If you are building a Twitter client app that is offline-first, when the user opens your app you should be showing them a list of cached tweets so that the user has something to interact with and not a loading screen saying "Loading tweets, please wait…". When you show this list of cached tweets, you may also be performing an API network call in the background to fetch the newest tweets for your user. In the UI of your app, you should be notifying your user that your app is fetching fresh tweets or else your user may think your app is broken. Keeping your user always informed about exactly what your app is doing is a good idea to follow. Teller helps you keep track of the state of your data and facilitates keeping it up to date.
Here are the added benefits of Teller:
- Small. The only dependency at this time is RxSwift (follow this issue as I work to remove this 1 dependency and make it optional)
- Built for Swift, by Swift. Teller is written in Swift which means you can expect a nice to use API.
- Not opinionated. Teller does not care where your data is stored or how it is queried. You simply tell Teller when you’re done fetching, saving, and querying and Teller takes care of delivering it to the listeners.
- Teller works very well with MVVM and MVI design patterns (note the use of
Repositorysubclasses in the library). However, you do not need to use these design patterns to use it.
Installation
Teller is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Teller', '~> version-here'
Replace
version-here with:
as this is the latest version at this time.
Note: Teller is in early development. Even though it is used in production in my own apps, it is still early on in development as I use the library more and more, it will mature.
I plan to release the library in an alpha, beta, then stable release phase.
Stages:
Alpha (where the library is at currently):
- [ ] Create example app on how to use it.
- [X] Documentation for README created.
- [ ] Make non-RxSwift version of the library to make it even smaller and more portable.
- [ ] Documentation in form of Jazzy Apple Doc created.
- [ ] Documentation on how to use in MVVM, MVI setup and other setups as well.
- [ ] Fixup the API for the library if needed.
Beta:
- [ ] Library API has been used enough that the API does not have any huge changes planned for it.
- [X] Tests written (and passing 😉) for the library.
Stable:
- [ ] Library has been running in many production apps, developers have tried it and given feedback on it.
Getting started
The steps to get Teller up and running is pretty simple: (1) Create a
Repository subclass for your data set. (2) Add a listener to your
Repository subclass.
- The first step is where you tell Teller how to query cached data, save data to the cache, and how to fetch fresh data. You do this by creating a subclass of
LocalRepositoryor
OnlineRepository.
What type of
Repository should you use you ask? Here is a description of each:
…TL;DR…if you need to perform a network call to obtain data, use
OnlineRepository. Else,
LocalRepository.
LocalRepository is a very simple class that does not use network calls to fetch fresh data. Data is simply saved to a cache and queried. If you need to store data in
UserDefaults, for example,
LocalRepository is the perfect way to do that.
OnlineRepository is a class that saves data to a cache, queries data from the cache, and performs network calls to fetch fresh data when data expires. If you have a data set that is obtained from calling your network API, use
OnlineRepository.
Here is an example of each.
First off,
LocalRepository:
import Foundation import Teller import RxSwift import RxCocoa class GitHubUsernameDataSource: LocalRepositoryDataSource { fileprivate let userDefaultsKey = "githubuserdatasource" typealias DataType = String func saveData(data: String) { UserDefaults.standard.string(forKey: userDefaultsKey) } func observeData() -> Observable<String> { return UserDefaults.standard.rx.observe(String.self, userDefaultsKey) .map({ (value) -> String in return value! }) } func isDataEmpty(data: String) -> Bool { return data.isEmpty } } class GitHubUsernameRepository: LocalRepository<GitHubUsernameDataSource> { convenience init() { self.init(dataSource: GitHubUsernameDataSource()) } }
This is a
LocalRepository that is meant to store a
String representing a GitHub username. As you can see, this
LocalRepository uses
UserDefaults to store data. You may use whatever type of data storage that you prefer!
Now onto
OnlineRepository. Here is an example of that:
import Foundation import Teller import RxSwift import Moya class ReposRepositoryGetDataRequirements: OnlineRepositoryGetDataRequirements { /** The tag is to make each instance of OnlineRepositoryGetDataRequirements unique. The tag is used to determine how old cached data is to determine if fresh data needs to be fetched or not. If the tag matches previoiusly cached data of the same tag, the data that data was fetched will be queried and determined if it's considered too old and will fetch fresh data or not from the result of the compare. The best practice is to use the name of the OnlineRepositoryGetDataRequirements subclass and the value of any variables that are used for fetching fresh data. */ var tag: ReposRepositoryGetDataRequirements.Tag { return "ReposRepositoryGetDataRequirements_(username)" } let username: String init(username: String) { self.username = username } } // Struct used to represent the JSON data pulled from the GitHub API. // ObjectMapper is used here to map the JSON to the struct. struct Repo: Codable { var id: Int! var name: String! } class ReposRepositoryDataSource: OnlineRepositoryDataSource { typealias Cache = [Repo] typealias GetDataRequirements = ReposRepositoryGetDataRequirements typealias FetchResult = [Repo] fileprivate let cachedDataObservable: PublishSubject<[Repo]> = PublishSubject() var maxAgeOfData: Period = Period(unit: 5, component: .hour) func fetchFreshData(requirements: ReposRepositoryGetDataRequirements) -> Single<FetchResponse<[Repo]>> { // Return network call that returns a RxSwift Single. // The project Moya () is my favorite library to do this. let provider = MoyaProvider<GitHubService>() return provider.rx.request(.listRepos(user: requirements.username)) .map({ (response) -> FetchResponse<[Repo]> in let repos = try! JSONDecoder().decode([Repo].self, from: response.data) return FetchResponse.success(data: repos) }) } func saveData(_ fetchedData: [Repo]) { // Save data to CoreData, Realm, UserDefaults, File, whatever you wish here. // Then, we will trigger an update to the observeCachedData subject so that anyone observing that observable can be updated with the new repos. cachedDataObservable.on(Event<[Repo]>.next(fetchedData)) } func observeCachedData(requirements: ReposRepositoryGetDataRequirements) -> Observable<[Repo]> { // Return Observable that is observing the cached data. // Anytime that the repos model has been updated, send an update to the Observable. return cachedDataObservable.asObservable() } func isDataEmpty(_ cache: [Repo]) -> Bool { return cache.isEmpty } } class ReposRepository: OnlineRepository<ReposRepositoryDataSource> { convenience init() { self.init(dataSource: ReposRepositoryDataSource()) } }
This
OnlineRepository subclass is meant to fetch, store, and query a list of GitHub repositories for a given GitHub username. Notice how Teller will even handle errors in your network fetch calls and deliver the errors to the UI of your application for you!
Now it’s your turn. Create subclasses of
OnlineRepository and
LocalRepository for your data sets!
- The last step. Observe your data set. This is also pretty simple.
LocalRepository
let disposeBag = DisposeBag() let repository: GitHubUsernameRepository = GitHubUsernameRepository() repository .observe() .observeOn(ConcurrentDispatchQueueScheduler(qos: .background)) .subscribeOn(MainScheduler.instance) .subscribe(onNext: { (dataState: LocalDataState<GitHubUsernameDataSource.DataType>) in switch dataState.state() { case .isEmpty: // The GitHub username is empty. It has never been set before. break case .data(let username): // `username` is the GitHub username that has been set last. break } }).disposed(by: disposeBag) // Now let's say that you want to *update* the GitHub username. Anywhere in your code, you can create an instance of a GitHubUsernameRepository and save data to it. All of your observables will be notified of this change. repository.dataSource.saveData(data: "new username")
OnlineRepository
let disposeBag = DisposeBag() let repository: ReposRepository = ReposRepository() let reposDataSource = ReposRepositoryDataSource.GetDataRequirements(username: "username to get repos for") repository .observe(loadDataRequirements: reposDataSource) .observeOn(ConcurrentDispatchQueueScheduler(qos: .background)) .subscribeOn(MainScheduler.instance) .subscribe(onNext: { (dataState: OnlineDataState<[Repo]>) in switch dataState.cacheState() { case .cacheEmpty?: // Cache is empty. Repos for this specific user has been fetched before, but they do not have any for their account. break case .cacheData(let repos, let dateReposWhereFetched)?: // Here are the repos for the user! // You can figure out how old the cached data is with `dateReposWhereFetched` as it's a Date. break case .none: // the dataState has no cached state yet. This probably means that repos have never been fetched for this specific username before. break } switch dataState.firstFetchState() { case .firstFetchOfData?: // Repos have never been fetched before for the specific user. So, this state means that repos are being fetched for the very first time for this user. break case .finishedFirstFetchOfData(let errorDuringFetch)?: // Repos have been fetched for the very first time for this specific user. A `cacheState()` will also be sent to the dataState. This state does *not* mean that the fetch was successful. It simply means that it is done. // If there was an error that happened during the fetch, errorDuringFetch will be populated. break case .none: // The dataState has no first fetch state. This means that repos have been fetched before for this specific user so no first fetch is required. break } switch dataState.fetchingFreshDataState() { case .fetchingFreshCacheData?: // The cached repos for the specific user is too old and new, fresh data is being fetched right now. break case .finishedFetchingFreshCacheData(let errorDuringFetch)?: // Fresh repos have been fetched for this specific user. This state does *not* mean that the fetch was successful. It simply means that it is done. // If there was an error that happened during the fetch, errorDuringFetch will be populated. break case .none: // The dataState has no fetch state. This means that the repos cache is not too old or repos have never been fetched before. break } }) .disposed(by: disposeBag)
Done! You are using Teller! When you add a listener to your
Repository subclass, Teller kicks into gear and begins it’s work parsing your cached data and fetching fresh if needed.
Enjoy!
Extra functionality
Teller comes with extra, but optional, features you may also enjoy.
Keep app data fresh in the background
You want to make sure that the data of your app is always up-to-date. When your users open your app, it’s nice that they can jump right into some new content and not need to wait for a fetch to complete. Teller provides a simple method to sync your
Repositorys with your remote storage.
let repository: ReposRepository = ReposRepository() let reposGetDataRequirements = ReposRepositoryDataSource.GetDataRequirements(username: "username to get repos for") repository.sync(loadDataRequirements: reposGetDataRequirements, force: false) .subscribe()
Teller
OnlineRepositorys provides a
sync function.
sync will check if the cached data is too old. If cached data is too old, it will fetch fresh data and save it and if it’s not too old, it will simply ignore the request (unless
force is
true).
sync returns a
Single, so we need to subscribe to it to run the syncs.
You can use the Background app refresh feature in iOS to run
sync on a set of
OnlineRepositorys periodically.
Example app
This library does not yet have a fully functional example iOS app created. However, if you check out the directory:
Example/Teller/ you will see example code snippets that you can use to learn about how to use Teller, learn best practices, and compile inside of XCode.
Documentation
Documentation is coming shortly. This README is all of the documentation created thus far.
If you read the README and still have questions, please, create an issue with your question. I will respond with an answer and update the README docs to help others in the future.
Are you building an offline-first mobile app?
Teller is designed for developers building offline-first mobile apps. If you are someone looking to build an offline-first mobile app, also be sure to checkout Wendy-iOS (there is an Android version too). Wendy is designed to sync your device’s cached data with remote storage. Think of it like this: Teller is really good at
GET calls for your network API, Wendy is really good at
PUT, POST, DELETE network API calls. Teller pulls data, Wendy pushes data. These 2 libraries work really nicely together!
Author
- Levi Bostian – GitHub, Twitter, Website/blog
Contribute
Teller is open for pull requests. Check out the list of issues for tasks I am planning on working on. Check them out if you wish to contribute in that way.
Want to add features to Teller? Before you decide to take a bunch of time and add functionality to the library, please, [create an issue]
() stating what you wish to add. This might save you some time in case your purpose does not fit well in the use cases of Teller.
Where did the name come from?
This library is a powerful Repository. The Repository design pattern is commonly found in the MVVM and MVI patterns. A synonym of repository is bank. A bank teller is someone who manages your money at a bank and triggers transactions. So, since this library facilitates transactions, teller fits.
Credits
Header photo by Tim Evans on Unsplash
Latest podspec
{ "name": "Teller", "version": "0.1.0-alpha", "summary": "iOS library that manages your app's cached data with ease.", "description": "The data used in your mobile app: user profiles, a collection of photos, list of friends, etc. all have state. Your data is in 1 of many different states:nn* Being fetched for the first time (if it comes from an async network call)n* The data is emptyn* Data exists in the device's storage (cached).n* During the empty and data states, your app could also be fetching fresh data to replace the cached data on the device that is out of date.nnDetermining.", "homepage": "", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "Levi Bostian": "[email protected]" }, "source": { "git": "", "tag": "0.1.0-alpha" }, "social_media_url": "", "platforms": { "ios": "8.0" }, "swift_version": "4.2", "source_files": "Teller/Classes/**/*", "dependencies": { "RxSwift": [ "~> 4.0" ] } }
Fri, 05 Oct 2018 11:40:04 +0000 | https://tryexcept.com/articles/cocoapod/teller | CC-MAIN-2018-51 | refinedweb | 2,647 | 57.77 |
Task Cookbook¶
Ensuring a task is only executed one at a time¶
You can accomplish this by using a lock.
In this example we’ll be using the cache framework to set a lock that check-sum of the feed URL.
The cache key expires after some time in case something unexpected happens, and something always will…
For this reason your tasks run-time shouldn’t exceed the timeout.
Note
In order for this to work correctly you need to be using a cache
backend where the
.add operation is atomic.
memcached is known
to work well for this purpose.
from celery import task from celery.five import monotonic from celery.utils.log import get_task_logger from contextlib import contextmanager from django.core.cache import cache from hashlib import md5 from djangofeeds.models import Feed logger = get_task_logger(__name__) LOCK_EXPIRE = 60 * 10 # Lock expires in 10 minutes @contextmanager def memcache_lock(lock_id, oid): timeout_at = monotonic() + LOCK_EXPIRE - 3 # cache.add fails if the key already exists status = cache.add(lock_id, oid, LOCK_EXPIRE) try: yield status finally: # memcache delete is very slow, but we have to use it to take # advantage of using add() for atomic locking if monotonic() < timeout_at and status: # don't release the lock if we exceeded the timeout # to lessen the chance of releasing an expired lock # owned by someone else # also don't release the lock if we didn't acquire it cache.delete(lock_id) @task(bind=True) def import_feed(self, feed_url): # The cache key consists of the task name and the MD5 digest # of the feed URL. feed_url_hexdigest = md5(feed_url).hexdigest() lock_id = '{0}-lock-{1}'.format(self.name, feed_url_hexdigest) logger.debug('Importing feed: %s', feed_url) with memcache_lock(lock_id, self.app.oid) as acquired: if acquired: return Feed.objects.import_feed(feed_url).url logger.debug( 'Feed %s is already being imported by another worker', feed_url) | https://celery.readthedocs.io/en/latest/tutorials/task-cookbook.html | CC-MAIN-2019-04 | refinedweb | 304 | 57.37 |
from :
RuntimeError at /
LaTeX was not able to process the following string: 'lp' Here is the full report generated by LaTeX:
but on my localhost all fine, Im not understand whats special about string 'lp'
from :
RuntimeError at /
LaTeX was not able to process the following string: 'lp' Here is the full report generated by LaTeX:
but on my localhost all fine, Im not understand whats special about string 'lp'
At the very bottom it says:
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.
I doubt that helps, but wanted to make sure it's noted.
Someone solve that by os.environ['PATH'] = os.environ['PATH'] + ':/usr/texbin'
what should I write in path settings?
i don't think we have latex installed... what are you trying to achieve? can you share some code?
shure, im trying to achieve utf8 text in matplotlib's diagram:
import scipy import pylab import hashlib from pylab import * from pyh import * from matplotlib import rc rc('font',**{'family':'serif'}) rc('text', usetex=True) rc('text.latex',unicode=True) rc('text.latex',preamble='\usepackage[utf8]{inputenc}') rc('text.latex',preamble='\usepackage[russian]{babel}')
x = scipy.arange(len(wordsWithFrequencyList)) y = scipy.array(frequencies) f = pylab.figure() ax = f.add_axes([0.2, 0.2, 0.7, 0.7]) ax.bar(x, y, align='center') ax.set_xticks(x) ax.set_xticklabels(label_words, rotation='vertical')
f.savefig(filename) save as png
et c.
I'm not familiar with neither of those libraries - but could it be that matplotlib will rely on on some latex module that isn't installed on pythonanywhere.com? Or does matplotlib ship with its own built-in latex interpreter?
somehow matplotlib use tex, i installed packege texlive-latex-extra for run this
this i need:.
So, LaTex, dvipng, Ghostscript... Or maybe other way for utf8 fonts.
could you please install this packages
Hey there, LaTeX is on our to-do list. I've added an up-vote on your behalf. Thanks for the code example - we'll use that for our tests. I can't give any guarantees on how soon we can do it I'm afraid...
PA just keeps getting better & better!!
We've just added all the binaries from
texlive and
ghostscript to /usr/bin - let us know if this fixes the problem? | https://www.pythonanywhere.com/forums/topic/228/ | CC-MAIN-2018-43 | refinedweb | 399 | 58.99 |
Hello having some issues with my logic. I have to write a function that determines whether a given string is palindrome. I have to use multiple stacks for implementation. I have began coding and it compiles however it is not working correctly. I think the problem is within my while loop here is the code
#include <iostream> #include <stack> #include <string> #include <cctype> using namespace std; int main() { string str; stack<int> s1; stack<int> s2; cout << "This program will determine if a given string is a palindrome." <<endl; cout << "Enter a string of characters from 1-100." << endl; getline(cin, str); for(int i = 0;i<(int)s1.size();i++)s1.push(i); while(!s1.empty()) // this part reads stackOne into stackTwo. { s1.pop();//Removes the first character. //s2.push(); } if(s1 == s2) { cout << "It is a palindrome." << endl; } else cout << "It is not a palindrome." << endl; system("PAUSE"); return 0; } | https://www.daniweb.com/programming/software-development/threads/259625/palindrome-program | CC-MAIN-2018-30 | refinedweb | 152 | 68.77 |
SharpTools: HTTP, GET, POST, uploading files and cookie/session authentication in C#
SharpTools is a general tool library for C#. This release simplifies using HTTP GET, POST, uploading files and cookie persistence when writing .NET applications in C#.
Downloads for the software described here are available on the downloads page.
IMPORTANT REMINDER: You must provide a credit to myself when re-using this code in your own projects or applications, or when posting it on other sites. I have seen a number of modified clones of the source code for this project – in particular MetaWrap, FishEye @ MahApps / MahTweets and most inappropriately S. Ali Tokmen @ Google Code who took the entire codebase and simply re-marked it as his own work. You are welcome to re-use the code but you must provide a credit in the source code and a link back to this site on your web page (if re-publishing the code). Thank you.
Visual Basic Version
Espend.de have re-written SharpTools in Visual Basic, thanks for your efforts! You can find the VB version here:
SharpTools Visual Basic version @ espend.de
Introduction
Blimey. You’d think in the 21st century retrieving web pages and POSTing forms and file uploads in the .NET framework would be a quick and painless exercise. But apparently, this isn’t the case, so here’s a quick and dirty class library to do it for you.
(This code is part of a general tool library I developed called SharpTools, with lots of other features, but those haven’t been released yet)
My basic problem was:
- Login to a web site by POSTing a username and password to a form
- Upload some files via POST to a second form after logging in
First I’ll take you through how Microsoft wants you to do it, then I’ll explain how my class library works.
How HTTP requests work in .NET: A Crash Course
Include the namespace
System.Net in your code to access all the classes below.
First you create an
HttpWebRequest object with the URL you want like this:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(myUrl);
Then set the method, which for our purposes will either be GET or POST:
request.Method = "GET";
Submitting forms usually calls for using POST, fetching pages (with or without query parameters) usually calls for using GET.
If you’re POSTing a form (without uploading files) you need to set the
Content-Type HTTP header to let the web server know you’re sending POST data in the request body, like this:
request.ContentType = "application/x-www-form-urlencoded";
For submitting forms via POST, throw the request body into a string, which takes the same format as a query string in a GET request, then encode it into a byte array:
string args = @"param1=value1¶m2=value2¶m3=value3"; byte[] dataToSend = Encoding.ASCII.GetBytes(args);
Sending the request is done automatically when you ask your request object to return a response. If you’re sending a GET request, there is no request body so you can skip the following step. If you’re sending a POST request, you need to transmit the request body as follows:
request.ContentLength = dataToSend.Length; Stream st = request.GetRequestStream(); st.Write(dataToSend, 0, dataToSend.Length); st.Close();
Note this will throw a
WebException exception if there’s a problem.
Now you can retrieve the response body as follows:
HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader sr = new StreamReader(response.GetResponseStream()); string responseBodyText = sr.ReadToEnd(); sr.Close();
At this point, if all has gone well,
responseBodyText will now contain the web page or response body of the request. Again, you’ll get a
WebException if there’s a problem.
Getting the response code
Response codes like 200 (successful request or “OK”), 302 (redirection to another page or “Found”), 404 (page not found or “Not Found”) indicate what happened when you made the request. You can access the response code by querying the property
response.StatusCode.
Getting response headers
If you’re looking for a particular header, for example the Location header of a 302 redirection, you can do so like this:
string locationHeader = response.GetResponseHeader("Location");
and so on for any other headers you’d like to access.
Preventing auto-redirection
By default, .NET will follow 302 redirections automatically. Sometimes you might not want this, for example if you POST to a login form whereby you’ll be redirected to different pages depending on whether or not your login was successful. You might want to find out which page you’re being sent to first, in which case you can disable auto-redirection like this:
request.AllowAutoRedirect = false;
Adding custom headers
Sometimes you’ll want to add your own headers, for example to prevent caching. Here’s how you can do that:
request.Headers.Add("Pragma", "no-cache");
where the first argument is the header name and the second argument is the header value.
HTTP 417 Expectation failed
Whoever wrote the HTTP library code at Microsoft had the genius (ahem) idea of not POSTing form data directly on the first request, but instead to tell the web server that a request is coming, get a
100 Continue header back, then send the actual data in a second request body. This breaks Apache, which is used by the majority of web sites. To fix this, you need to add this code before you make the request:
request.ServicePoint.Expect100Continue = false;
This property was added in .NET 2.0.
How to handle cookie/session-based authentication
In general, when you login to a web site via a login form, upon successful login the browser will be sent a cookie containing a unique login ID, which is then sent back to the site on all subsequent page requests to identify yourself as the logged in user. If you don’t send the cookie back, you’ll be treated as an anonymous (non-logged in) guest.
After a successful login therefore, you need to store the cookies you receive back from the site. This can be done with the following code:
CookieCollection cookies = response.Cookies;
Then you need to supply these cookies back to the web server in all subsequent requests like this:
request.CookieContainer = new CookieContainer(); foreach (Cookie c in cookies) request.CookieContainer.Add(c);
How do I upload files?
This is where it gets rather tricky. First of all, POSTed data which includes files has to be sent with a Content-Type of
multipart/form-data, together with a so-called boundary parameter which separates each argument and file supplied in the request body into separate parts. After each part, the boundary parameter is given to signal the end of the part. The boundary parameter is also used at the start and (slightly modified) end of the entire request body.
Unlike with a regular POST request without files, each and every non-file argument must be supplied in its own part, not as a GET-style encoded string.
An example will illustrate the principle. Let’s suppose our boundary parameter is “MyBoundary” (a very bad choice; the boundary should be something that won’t appear in any of the arguments or file content). Let’s also suppose we are sending a description of the file in a separate argument called
desc and a title for it in
title. The file argument itself will be called
file.
First you’ll set the Content-Type as follows:
request.ContentType = "multipart/form-data; boundary=MyBoundary";
Now you will need to manually create the request body, which will look exactly like this:
--MyBoundary Content-Disposition: form-data; name="title" Katy in Oslo --MyBoundary Content-Disposition: form-data; name="desc" This is a picture of me in Oslo last summer. --MyBoundary Content-Disposition: form-data; name="file"; filename="C:\Documents and Settings\Katy\Desktop\SomeFile.jpg" Content-Type: application/octet-stream --MyBoundary--
The request body format is very strict and will fail unless you format it exactly as above. Specifically:
- Each boundary must start on a newline and be preceeded by two hyphens (
--).
- There must be a Content-Disposition header for each argument.
- There must be a blank line between the headers for each part and the body.
- File arguments must have a Content-Type header, and the Content-Disposition header must include a
filenameparameter otherwise the web server will consider the file argument to have been left blank.
- At the end of the request body, you must append two hyphens to the end of the last boundary.
Now you just encode the request body string and send it in the same manner as above for POSTing without files.
Summary
What a hassle eh? In summary:
- You have to create a new request object and start from scratch for every request.
- You have to encode the arguments or request body for every request.
- You have to remember to store and resend cookies before and after every request if you need to stay logged in.
- You have to remember to set the
Expect100Continueproperty for every request.
- There is no standardised way of creating all three kinds of request, you have to manually produce the request body yourself depending on the type of request you want to make.
- You can’t just send the request as text or get the response as text, you have to get the request and response streams and write/read from them, then close them afterwards, as appropriate.
- There’s alot of error checking for exceptions you have to do which I haven’t included above at all.
Pretty weak. Let’s see if we can make it any easier.
My HTTP Library
I’ve created two classes,
HTTPWorker to make requests simpler, and
MIMEPayload to automatically create the request bodies when POSTing with files. You don’t need to use this in your code though, HTTPWorker will create one automatically if you want to send files.
I won’t document all the properties and methods here, because the source code includes XML documentation which you can compile if you like. There are also examples of logging in and POSTing files included, but I will illustrate how it works here.
Things to note about my class:
- You can re-use the object for many requests. In each case, you must set the
Urlproperty first (this sets up the
Expect100Continueand
AllowAutoRedirectproperties of the HttpWebRequest object used internally), then the
Typeproperty, which determines how the request body will be created.
- Cookies will be auto-persisted unless you turn it off by setting
PersistCookiesto false, so logging in is now a fire-and-forget experience.
- POST and POST-with-files requests are now handled the same. You can add arguments with
AddValueand files with
AddFile. The request will be created according to the
Typeproperty.
- You can fetch the request and response objects at any time with the
RequestObjectand
ResponseObjectproperties if you need to query or set additional headers, change the auto-redirect flag etc.
- You don’t need to mess with streams. You can get the response text from the
ResponseTextproperty. The first time you use this after a request, it will open the response stream, read the response and cache it. On subsequent uses, it will just receive the response text from the cache.
Setting up
Do this once before any series of requests in your application. The object can persist for the lifetime of the application if you so wish.
HTTPWorker http = new HTTPWorker(); HttpWebResponse rsp = null;
GET a web page
http.Url = ""; http.Type = HTTPRequestType.Get; http.RequestObject.AllowAutoRedirect = false; // if required try { rsp = http.SendRequest(); } catch (WebException ex) { Console.WriteLine(ex.Message); return; } string webPage = rsp.ResponseText;
POSTing a form
http.Url = ""; http.Type = HTTPRequestType.Post; http.AddValue("username", username); http.AddValue("password", password); try { rsp = http.SendRequest(); } catch (WebException ex) { Console.WriteLine(ex.Message); return; } // You can now check for the response code with rsp.StatusCode to see what happened
If you posted a login form and it was successful, the cookie is now stored and will be used automatically on your next request.
POSTing a form with file uploads
This uses the example I gave above and creates the exact request body shown above, just with a different boundary (which is set automatically).
http.Url = ""; http.Type = HTTPRequestType.MultipartPost; http.RequestObject.KeepAlive = true; http.RequestObject.Headers.Add("Pragma", "no-cache"); http.AddValue("title", "Katy in Oslo"); http.AddValue("desc", "This is a picture of me in Oslo last summer."); http.AddFile("file", @"C:\Documents and Settings\Katy\Desktop\SomeFile.jpg"); try { rsp = http.SendRequest(); } catch (WebException ex) { Console.WriteLine(ex.Message); return; }
Checking if the request was successful
In most cases you’ll probably need to parse the page to check that what you intended to do was actually successful. You can do this pretty easily with regular expressions in the
System.Text.RegularExpressions namespace, or with basic status code and string functions like this:
if (rsp == null) { // The web server didn't return anything } if (rsp.StatusCode != HttpStatusCode.OK) { // There was an error } if (http.ResponseText.Contains("Login failed!")) { // The text 'Login failed!' was found on the form errorText = Regex.Replace(http.ResponseText, "^.*<h2>Login failed!</h2>.*<p>(?<error>.*)</p>.*$", "${error}", RegexOptions.Singleline); }
The principle of this is fairly simple. The regex parses the entire web page as a single line (meaning that
.* can span across newlines), looking for the error message, and captures it into a group called
error. The entire web page content is then replaced with just the error message, which is stored in
errorText. To make sure the entire web page is replaced, we must parse it all, which is done by ensuring
^.* appears at the beginning and
.*$ appears at the end. These symbols match the start of the page plus any number of characters, and any number of characters plus the end of the page respectively.
Final words
I’ve now used this library in a couple of projects and it’s made life alot simpler. I hope you find it useful too!
Share your thoughts! Note: to post source code, enclose it in [code lang=...] [/code] tags. Valid values for 'lang' are cpp, csharp, xml, javascript, php etc. To post compiler errors or other text that is best read monospaced, use 'text' as the value for lang. Cancel reply)
Thank you for your code. I tried it with a page, but it does not work until I set AllowAutoRedirect to true. Unfortunately requesting another page via get-request fails anyhow.
Do you have an idea why a) I need to set AllowAutoRedirect and b) why the get-request fails?
It might depend on the web server you are contacting. If a page request redirects (with a 302 status code), you will just get a header back with the target URL, so it also depends how you define ‘but it does not work’ 🙂
If you post a source code example we might be able to help you better 🙂
Katy. | https://katyscode.wordpress.com/2008/01/26/sharptools-http-get-post-uploading-files-and-cookiesession-authentication-in-c/ | CC-MAIN-2018-17 | refinedweb | 2,490 | 55.54 |
This is your resource to discuss support topics with your peers, and learn from each other.
07-03-2013 07:38 AM
Hi
Ineed real time data from server .I am running the server in my computer. using this command
D
cd casePad
D:\casePad>cd NewExcCasePad
D:\casePad\NewExcCasePad>LexSrvPC.exe /Demo:"LexSrvPC.raw"
D:\casePad\NewExcCasePad> i need to parse this data using phonegap android or in ios
07-05-2013 04:44 PM
1) BlackBerry here (so why ask us Droid or iOS?)
2) Parse the tree - it's not that hard unless you've got Dublin or something similar with namespace
You need to look up the reference dox for - oh - JQ would do as long as simple XML | https://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Need-Real-time-data-In-phonegap/td-p/2460429 | CC-MAIN-2017-04 | refinedweb | 123 | 70.63 |
Template:Talkpage/doc
This template can be put on talk pages and archive pages to show links automatically. Each of the boxes only appears when appropriate.
Parameters
The template doesn't require parameters, but has 4 optional named ones:
{{talkpage |archivepath= default: 'Archive' |vandalpath= default: 'vandalism' |archivedate= default: date of last revision to page |search= default: not visible }}
- archivepath If omitted the template will assume archive pages are kept at '/Archive1', '/Archive2' etc (with a capital 'A' and no spaces or leading zeros). If the archives are named differently, this parameter can be added, eg. if the archives are names '/archive 1', '/archive 2'... use:
{{talkpage|archivepath=archive }}.
- vandalpath The template checks for '/vandalism' subpages in either the article or the talk namespace, and with either an upper case or lover case 'v'. One box is shown for each page that is found, meaning if more than one vandalism page has been created by mistake, this will be shown up by the template. If the vandalism page has a different name, eg '/wandalism', use this parameter:
{{talkpage|vandalpath=wandalism}}
- archivedate The 'this is an archive' section of the template will show date of the last revision to the archive page it's placed on. This will normally be what is wanted when archive pages are created. However if you want it to show a different date, use this parameter to supply one, in y-m-d format, eg:
{{talkpage|archivedate=2007-6-25}}
- search This adds a search box for the archives under the archivelist. To activate it just type:
{{talkpage|search=yes}}
Parameters can of course be combined, eg:
{{talkpage|archivepath=archive|archivedate=2007-6-25}}
Archive List
If the regular list is getting too long, you can simply put the links into a new article called "Archive_link" (or "archivepath_link" if you changed the parameter) in the same space your archives are in. The template will detect its presence and simply link to that page instead of displaying the list.
Note: Currently, you will have to maintain this list by hand, although you could of course use the {{archivelinks dpl}} template mentioned below. We are constantly working on improving things, though, so stay tuned.
See also
If you want archive links on your talk page with a more customized look, please see the template
{{archivelinks dpl}} (or
{{archivelinks}} as a fallback)
For automatic archiving, see
{{Talkpage/Pibot}} and
{{Talkpage/PibotHidden}} | https://rationalwiki.org/wiki/Template:Talkpage/doc | CC-MAIN-2019-26 | refinedweb | 401 | 54.46 |
MMAP(2) BSD Programmer's Manual MMAP(2)
mmap - map files or devices into memory
#include <sys/types.h> #include <sys/mman.h> void * mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset);
The mmap function causes the pages starting at addr and continuing for at most len bytes to be mapped from the object described by fd, starting at byte offset offset. If offset or len is not a multiple of the pagesize, the mapped region may extend past the specified range. If addr is non-zero, it is used as a hint to the system. (As a conveni- ence to the system, the actual address of the region may differ from the address supplied.) If addr is zero, an address will be selected by the system. The actual starting address of the region is returned. A success- ful mmap deletes any previous mapping in the allocated address range. The protections (region accessibility) are specified in the prot argument by OR'ing the following values: PROT_EXEC Pages may be executed. PROT_READ Pages may be read. PROT_WRITE Pages may be written. PROT_NONE No permissions. currently be -1 indicating no name is associated with the region. MAP_FILE Mapped from a regular file or character-special device memory. (This is the default mapping type, and need not be specified.) dev- ice to which swapping should be done..
mmap() will fail if: [EACCES] The flag PROT_READ was specified as part of the prot param- eter. fd did not reference a regular or character spe- cial file. [ENOMEM] MAP_FIXED was specified and the addr parameter wasn't available. MAP_ANON was specified and insufficient memory was available.
madvise(2), mincore(2), mlock(2), mprotect(2), msync(2), munmap(2), getpagesize(3).. | http://mirbsd.mirsolutions.de/htman/sparc/man2/mmap.htm | crawl-003 | refinedweb | 290 | 58.99 |
XML::GenericJSON - for turning XML into JSON, preserving as much XMLness as possible.
my $json_string = XML::GenericJSON::string2string($xml_string);
my $json_string = XML::GenericJSON::file2string($xml_filename);
XML::GenericJSON::string2file($xml_string,$json_filename);
XML::GenericJSON::file2file($xml_filename,$json_filename);
XML::GenericJSON provides functions for turning XML into JSON. It uses LibXML to parse the XML and JSON::XS to turn a perlish data structure into JSON. The perlish data structure preserves as much XML information as possible. (In other words, an application-specific JSON filter would almost certainly produce more compact JSON.)
The module was initially developed as part of the Xcruciate project () to produce JSON output via the Xteriorize webserver. It turns the entire XML document into a DOM tree, which may not be what you want to do if your XML document is 3 buzillion lines long.
Mark Howe, <melonman@cpan.org>
None
The best way to report bugs is via the Xcruciate bugzilla site ().
Returns a JSON representation of an XML string. The second argument should be false if you want to preserve non-semantic whitespace.
Returns a JSON representation of an XML file. The second argument should be false if you want to preserve non-semantic whitespace.
Writes a JSON file based on an XML string. The third argument should be false if you want to preserve non-semantic whitespace.
Writes a JSON file based on an XML file. The third argument should be false if you want to preserve non-semantic whitespace.
The function that does the work of turning XML into a perlish data structure suitable for treatment by JSON::XS.
Makes a hash of attributes.
Makes a list of namespaces.
Makes a list of child nodes.
0.01: First upload
0.02: Get dependencies right
0.03: Get path to abstract right
0.04: ported to use Module::Build
0.05: fixed unit test
This library is distributed under BSD licence (). | http://search.cpan.org/~melonman/XML-GenericJSON-0.05/lib/XML/GenericJSON.pm | CC-MAIN-2014-42 | refinedweb | 314 | 60.41 |
#include <sys/param.h>
#include <stdio.h>
#include <fetch.h> syntax recommended generally be assumed that a stream returned by one of the fetchXGetXXX() or fetchGetXXX() functions is read-only, and that a stream returned by one of the fetchPutXXX() functions is write-only.
fetchXGetFile() and fetchGetFile() do not accept any flags.
fetchPutFile() accepts the ‘a’ (append to file) flag. If that flag is specified, the data written to the stream returned by fetchPutFile() will be appended to the previous contents of the file, instead of replacing them.
If the ‘P’ (not passive) flag is specified, an active (rather than passive) connection will be attempted.
The ‘p’ flag is supported for compatibility with earlier versions where active connections were the default. It has precedence over the ‘P’ flag, so if both are specified, fetchMakeURL will use a passive connection.
If the ‘l’ (low) flag is specified, data sockets will be allocated in the low (or default) port range instead of the high port range (see ip(4)).
If the ‘d’ "anonymous@<hostname>".
If the ‘d’ (direct) flag is specified, fetchXGetHTTP(), fetchGetHTTP() and fetchPutHTTP() will use a direct connection even if a proxy server is defined.
If the ‘i’ .. When a PEM-format key is in a separate file from the client certificate, the environment variable SSL_CLIENT_KEY_FILE can be set to point to the key file. In case the key uses a password, the user will be prompted on standard input (see PEM(3)).
By default libfetch allows TLSv1 and newer when negotiating the connecting with the remote peer. You can change this behavior by setting the SSL_ALLOW_SSL3 environment variable to allow SSLv3 and SSL_NO_TLS1, SSL_NO_TLS1_1 and SSL_NO_TLS1_2 to disable TLS 1.0, 1.1 and 1.2 respectively..
The fetchStat() functions return 0 on success and -1 on failure.
All other functions return a stream pointer which may be used to access the requested document, or NULL if an error occurred.
The following error codes are defined in <fetch.h>:
The accompanying error message includes a protocol-specific error code and message, like "File is not available (404 Not Found)"
HTTP_PROXY=
If the proxy server requires authentication, there are two options available
File Transfer Protocol, RFC959, October 1985., ,
RFC1635, How to Use Anonymous FTP, May 1994., , ,
RFC1738, Uniform Resource Locators (URL), December 1994., , ,
Hypertext Transfer Protocol -- HTTP/1.1, RFC2616, January 1999., , , , , , ,
HTTP Authentication: Basic and Digest Access Authentication, RFC2617, June 1999., , , , , , ,
This manual page was written by Dag-Erling Sm/orgrav <Mt des@FreeBSD.org> and Michael Gmelin <Mt freebsd@grem.de>..
Please direct any comments about this manual page service to Ben Bullock. Privacy policy. | https://nxmnpg.lemoda.net/3/fetchMakeURL | CC-MAIN-2020-05 | refinedweb | 437 | 57.47 |
Did you mean ‘clang’ compiler?
One of the many cool features of Google is the Did you mean phrase suggested if you fat-fingered your search keywords. Go ahead, search for the clong compiler. Google says, yeah, we think you might have meant clang compiler. Thanks Google!
While working one day with some OpenCV code (I’ll blog about that some day, when I know what I’m doing), I noticed I had mistyped
cvNamedWindow as
cvNameWindow and clang replied:
Well, isn’t that cool? Intrigued I decided to see what gcc would respond with given some typos, and then compare it to clang.
To enable a quick illustration I’m going to use
g++ and
clang++.
mathr.h
int addTwoInts(int a, int b); int addThreeInts(int a, int b, int c);
mathr.c
int addTwoInts(int a, int b) { return a + b; } int addThreeInts(int a, int b, int c) { return a + b + c; }
umath.c
#include "mathr.h" int main(void) { addTwInts(4, 5); }
Notice the
addTwInts function call. Obviously I meant
addTwoInts.
Compiling with
g++-4.8 gives
Okay,
addTwInts not declared in this scope. Since this is a really simple example I know where I went wrong. But, take a look at what
clang++ can tell me:
Nice! Yes, I did mean
addTwoInts!
Searching on Google led me to Chris Lattner’s 2010 article on Clang’s neat error recovery features, and there’s more than just the spell-checking-suggestion-engine.
Clang uses the Levenshtein distance algorithm for determining possible corrections to typos. If you notice,
addTwInts is just 1 character away (an insertion) from
addTwoInts, and Clang is able to recognize that and make the suggestion.
Of course there are limits. Substituting
addTwInts with
addInts results in:
The distance is 3 inserts from
addTwoInts and 4 inserts from
addThreeInts. What’s interesting however is that a “strong match” (not a technical term!) will boost Clang’s ability to make a suggestion. For example, you can change
addTwoInts to
addTwoInts_____ (your underscore key was stuck that day), and Clang will still make the suggestion “
use of undeclared identifier 'addTwoInts_____'; did you mean 'addTwoInts'?” Add another underscore (for a total of 6) and you are back to
use of undeclared identifier with no suggestions. To quickly calculate the Levenshtein distance of two arbitrary strings, you can try a online Levenshtein distance calculator.
I’m currently only using Clang on my Mac, and the diagnostics features work for C, C++, Objective-C, and of course, Swift. I’m definitely looking forward to using Clang on Linux where GCC has been the only game in town for decades. Of course, recognizing the rising adoption of Clang has led to significant improvements in GCC’s diagnostics. Only time will tell if GCC will remain the premier compiler on Linux systems (sorry, GNU/Linux. *smirk*). | https://dev.iachieved.it/iachievedit/did-you-mean-clang-compiler/ | CC-MAIN-2019-18 | refinedweb | 476 | 65.32 |
...one of the most highly
regarded and expertly designed C++ library projects in the
world. — Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
#include <boost/math/special_functions/owens_t.hpp>
namespace boost{ namespace math{ template <class T> calculated-result-type owens_t(T h, T a); template <class T, class Policy> calculated-result-type owens_t(T h, T a, const Policy&); }} // namespaces
Returns the Owens_t function of h and a.
The final Policy argument is optional and can be used to control the behaviour of the function: how it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.
The function
owens_t(h, a) gives the probability of the event (X
> h and 0 < Y < a * X), where X
and Y are independent standard normal random variables.
For h and a > 0, T(h,a), gives the volume of an uncorrelated bivariate normal distribution with zero means and unit variances over the area between y = ax and y = 0 and to the right of x = h.
That is the area shaded in the figure below (Owens 1956).
and is also illustrated by a 3D plot.
This function is used in the computation of the Skew
Normal Distribution. It is also used in the computation of bivariate
and multivariate normal distribution probabilities. The return type of this
function is computed using the result
type calculation rules: the result is of type
double when T is an integer type, and type
T otherwise.
Owen's original paper (page 1077) provides some additional corner cases.
T(h, 0) = 0
T(0, a) = ½π arctan(a)
T(h, 1) = ½ G(h) [1 - G(h)]
T(h, ∞) = G(|h|)
where G(h) is the univariate normal with zero mean and unit variance integral from -∞ to h.
Over the built-in types and range tested, errors are less than 10 * std::numeric_limits<RealType>::epsilon().
Test data was generated by Patefield and Tandy algorithms T1 and T4, and also the suggested reference routine T7.
atan(a)(ie cancellation),
Over the built-in types and range tested, errors are less than 10 std::numeric_limits<RealType>::epsilon().
However, that there was a whole domain (large h, small a) where it was not possible to generate any reliable test values (all the methods got rejected for one reason or another).
There are also two sets of sanity tests: spot values are computed using Wolfram Mathematica and The R Project for Statistical Computing.
The function was proposed and evaluated by Donald. B. Owen, Tables for computing bivariate normal probabilities, Ann. Math. Statist., 27, 1075-1090 (1956).
The algorithms of Patefield, M. and Tandy, D. "Fast and accurate Calculation of Owen's T-Function", Journal of Statistical Software, 5 (5), 1 - 25 (2000) are adapted for C++ with arbitrary RealType.
The Patefield-Tandy algorithm provides six methods of evalualution (T1 to T6); the best method is selected according to the values of a and h. See the original paper and the source in owens_t.hpp for details.
The Patefield-Tandy algorithm is accurate to approximately 20 decimal places, so for types with greater precision we use:
Using the above algorithm and a 100-decimal digit type, results accurate to 80 decimal places were obtained in the difficult area where a is close to 1, and greater than 95 decimal places elsewhere. | https://www.boost.org/doc/libs/1_53_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/owens_t.html | CC-MAIN-2018-30 | refinedweb | 555 | 53.41 |
- NAME
- SYNOPSIS
- DESCRIPTION
- USAGE
- TABLES
- BUGS AND LIMITATIONS
- is not of much use in and of itself. You can dump out the structure of a parsed SQL statement, but that quotation
TABLES
DBI::SQL::Nano::Statement operates on exactly one table. This table will be opened by inherit from DBI::SQL::Nano::Statement and implements the
open_table method..
BUGS AND LIMITATIONS
There are no known bugs in DBI::SQL::Nano::Statement. If you find a one and want to report, please see DBI for how to report bugs..
ACKNOWLEDGEMENTS
Tim Bunce provided the original idea for this module, helped me out of the tangled trap of namespaces, and provided help and advice all along the way. Although I wrote it from the ground up, it is based on Jochen Wiedmann's original design of SQL::Statement, so much of the credit for the API goes to him.
AUTHOR AND COPYRIGHT
This module is originally written by Jeff Zucker < jzucker AT cpan.org >. | https://metacpan.org/pod/release/TIMB/DBI-1.631/lib/DBI/SQL/Nano.pm | CC-MAIN-2015-27 | refinedweb | 162 | 60.85 |
English Idioms and Phrases: Cross the Rubicon
Meaning
To 'Cross the Rubicon' means to deliberately go past the 'point of no return' (click link for point of no return meaning) which means that something or someone has, on purpose, gone beyond a point that it is impossible turn back or return to where they started.
"When I quit my job and became a painter, I crossed the Rubicon to a poorer life"
"When I sold my house and became homeless I crossed the Rubicon into an uncertain future"
Origin
The Rubicon was a shallow River in Italy near the town of Rimini in eastern Italy (the river has been renamed Fiumicino)
In ancient Rome, generals were forbidden to bring their army into the home states of the Roman republic and the territories of Gaul and Rome were separated by the Rubicon river. If any troops crossed the Rubicon river it was considered an act of treason for which the general would be executed.
Julius Caesar was a general and was seen by the Roman senate as a threat to their control. He was asked to stand down (resign) and disband his army. He was given two choices. Do as the senate asked or cross the river and commit treason which would start a civil war.
He decided to cross the river and start a civil war that led to Julius Caesar becoming emperor of Rome in 49BC.
Apparently when started to cross he used another famous phrase 'the die is cast' (click link) and deliberately went past the 'point of no return' as if he won he would be emperor and if he lost he would die.
Similar Idioms
The die is cast, burns one's bridges, pay the piper, point of no return (click links for definition) | https://hubpages.com/education/Cross-the-Rubicon | CC-MAIN-2017-22 | refinedweb | 298 | 58.25 |
chown, fchownat - change owner and group of a file relative to directory file descriptor
#include <unistd.h>
int chown(const char *path, uid_t owner, gid_t group);
int fchownat(int fd, const char *path, uid_t owner, gid_t group,
int flag); last file status change timestamp of the file.
The fchownat() function shall be equivalent to the chown() and lchown() functions shall be identical to a call to chown() or lchown() respectively, depending on whether or not the AT_SYMLINK_NOFOLLOW bit is set in the flag argument..
- [ENOTDIR]
- The path argument is not an absolute path and fd is neither AT_FDCWD nor a file descriptor associated with a directory. POSIX.1-2008.
The purpose of the fchownat() function is to enable changing ownership of files in directories other than the current working directory without exposure to race conditions. Any part of the path of a file could be changed in parallel to a call to chown() or lchown(), resulting in unspecified behavior. By opening a file descriptor for the target directory and using the fchownat() function it can be guaranteed that the changed file is located relative to the desired directory.
None.
chmod , fpathconf , lchown
XBD <fcntl.h> , .
Austin Group Interpretation 1003.1-2001 #143 is applied.
The fchown | https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/fchownat.html | CC-MAIN-2021-39 | refinedweb | 206 | 51.38 |
alfred-py can be called from terminal via
alfred as a tool for deep-learning usage. It also provides massive utilities to boost your daily efficiency APIs, for instance, if you want draw a box with score and label, if you want logging in your python applications, if you want convert your model to TRT engine, just
import alfred, you can get whatever you want. More usage you can read instructions below.
Functions SummaryFunctions Summary
Since many new users of alfred maybe not very familiar with it, conclude functions here briefly, more details see my updates:
- Visualization, draw boxes, masks, keypoints is very simple, even 3D boxes on point cloud supported;
- Command line tools, such as view your annotation data in any format (yolo, voc, coco any one);
- Deploy, you can using alfred deploy your tensorrt models;
- DL common utils, such as torch.device() etc;
- Renders, render your 3D models.
A pic visualized from alfred:
InstallInstall
To install alfred, it is very simple:
requirements:
lxml [optional] pycocotools [optional] opencv-python [optional]
then:
sudo pip3 install alfred-py
alfred is both a lib and a tool, you can import it's APIs, or you can directly call it inside your terminal.
A glance of alfred, after you installed above package, you will have
alfred:
datamodule:
# show VOC annotations alfred data vocview -i JPEGImages/ -l Annotations/ # show coco anntations alfred data cocoview -j annotations/instance_2017.json -i images/ # show yolo annotations alfred data yoloview -i images -l labels # show detection label with txt format alfred data txtview -i images/ -l txts/ # show more of data alfred data -h # eval tools alfred data evalvoc -h
cabmodule:
# count files number of a type alfred cab count -d ./images -t jpg # split a txt file into train and test alfred cab split -f all.txt -r 0.9,0.1 -n train,val
visionmodule;
# extract video to images alfred vision extract -v video.mp4 # combine images to video alfred vision 2video -d images/
-hto see more:
usage: alfred [-h] [--version] {vision,text,scrap,cab,data} ... positional arguments: {vision,text,scrap,cab,data} vision vision related commands. text text related commands. scrap scrap related commands. cab cabinet related commands. data data related commands. optional arguments: -h, --help show this help message and exit --version, -v show version info.
inside every child module, you can call it's
-has well:
alfred text -h.
if you are on windows, you can install pycocotools via:
pip install "git+", we have made pycocotools as an dependencies since we need pycoco API.
UpdatesUpdates
alfred-py has been updating for 3 years, and it will keep going!
2050-xxx: to be continue;
2022.01.18: Now alfred support a Mesh3D visualizer server based on Open3D:
from alfred.vis.mesh3d.o3dsocket import VisOpen3DSocket def main(): server = VisOpen3DSocket() while True: server.update() if __name__ == "__main__": main()
Then, you just need setup a client, send keypoints3d to server, and it will automatically visualized out. Here is what it looks like:
2021.12.22: Now alfred supported keypoints visualization, almost all datasets supported in mmpose were also supported by alfred:
from alfred.vis.image.pose import vis_pose_result # preds are poses, which is (Bs, 17, 3) for coco body vis_pose_result(ori_image, preds, radius=5, thickness=2, show=True)
2021.12.05: You can using
alfred.deploy.tensorrtfor tensorrt inference now:
from alfred.deploy.tensorrt.common import do_inference_v2, allocate_buffers_v2, build_engine_onnx_v3 def engine_infer(engine, context, inputs, outputs, bindings, stream, test_image): # image_input, img_raw, _ = preprocess_np(test_image) image_input, img_raw, _ = preprocess_img((test_image)) print('input shape: ', image_input.shape) inputs[0].host = image_input.astype(np.float32).ravel() start = time.time() dets, labels, masks = do_inference_v2(context, bindings=bindings, inputs=inputs, outputs=outputs, stream=stream, input_tensor=image_input) img_f = 'demo/demo.jpg' with build_engine_onnx_v3(onnx_file_path=onnx_f) as engine: inputs, outputs, bindings, stream = allocate_buffers_v2(engine) # Contexts are used to perform inference. with engine.create_execution_context() as context: print(engine.get_binding_shape(0)) print(engine.get_binding_shape(1)) print(engine.get_binding_shape(2)) INPUT_SHAPE = engine.get_binding_shape(0)[-2:] print(context.get_binding_shape(0)) print(context.get_binding_shape(1)) dets, labels, masks, img_raw = engine_infer( engine, context, inputs, outputs, bindings, stream, img_f)
2021.11.13: Now I add Siren SDK support!
from functools import wraps from alfred.siren.handler import SirenClient from alfred.siren.models import ChatMessage, InvitationMessage siren = SirenClient('daybreak_account', 'password') @siren.on_received_invitation def on_received_invitation(msg: InvitationMessage): print('received invitation: ', msg.invitation) # directly agree this invitation for robots @siren.on_received_chat_message def on_received_chat_msg(msg: ChatMessage): print('got new msg: ', msg.text) siren.publish_txt_msg('I got your message O(∩_∩)O哈哈~', msg.roomId) if __name__ == '__main__': siren.loop()
Using this, you can easily setup a Chatbot. By using Siren client.
2021.06.24: Add a useful commandline tool, change your pypi source easily!!:
alfred cab changesource
And then your pypi will using aliyun by default!
2021.05.07: Upgrade Open3D instructions: Open3D>0.9.0 no longer compatible with previous alfred-py. Please upgrade Open3D, you can build Open3D from source:
git clone --recursive cd Open3D && mkdir build && cd build sudo apt install libc++abi-8-dev sudo apt install libc++-8-dev cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python3
Ubuntu 16.04 blow I tried all faild to build from source. So, please using open3d==0.9.0 for alfred-py.
2021.04.01: A unified evaluator had added. As all we know, for many users, writting Evaluation might coupled deeply with your project. But with Alfred's help, you can do evaluation in any project by simply writting 8 lines of codes, for example, if your dataset format is Yolo, then do this:
def infer_func(img_f): image = cv2.imread(img_f) results = config_dict['model'].predict_for_single_image( image, aug_pipeline=simple_widerface_val_pipeline, classification_threshold=0.89, nms_threshold=0.6, class_agnostic=True) if len(results) > 0: results = np.array(results)[:, [2, 3, 4, 5, 0, 1]] # xywh to xyxy results[:, 2] += results[:, 0] results[:, 3] += results[:, 1] return results if __name__ == '__main__': conf_thr = 0.4 iou_thr = 0.5 imgs_root = 'data/hand/images' labels_root = 'data/hand/labels' yolo_parser = YoloEvaluator(imgs_root=imgs_root, labels_root=labels_root, infer_func=infer_func) yolo_parser.eval_precisely()
Then you can get your evaluation results automatically. All recall, precision, mAP will printed out. More dataset format are on-going.
2021.03.10: New added
ImageSourceIterclass, when you want write a demo of your project which need to handle any input such as image file / folder / video file etc. You can using
ImageSourceIter:
from alfred.utils.file_io import ImageSourceIter # data_f can be image_file or image_folder or video iter = ImageSourceIter(ops.test_path) while True: itm = next(iter) if isinstance(itm, str): itm = cv2.imread(itm) # cv2.imshow('raw', itm) res = detect_for_pose(itm, det_model) cv2.imshow('res', itm) if iter.video_mode: cv2.waitKey(1) else: cv2.waitKey(0)
And then you can avoid write anything else of deal with file glob or reading video in cv. note that itm return can be a cv array or a file path.
2021.01.25: alfred now support self-defined visualization on coco format annotation (not using pycoco tools):
If your dataset in coco format but visualize wrongly pls fire a issue to me, thank u!
2020.09.27: Now, yolo and VOC can convert to each other, so that using Alfred you can:
- convert yolo2voc;
- convert voc2yolo;
- convert voc2coco;
- convert coco2voc;
By this, you can convert any labeling format of each other.
2020.09.08: After a long time past, alfred got some updates: We providing
coco2yoloability inside it. Users can run this command to convert your data to yolo format:
alfred data coco2yolo -i images/ -j annotations/val_split_2020.json
Only should provided is your image root path and your json file. And then all result will generated into
yolofolder under images or in images parent dir.
After that (you got your yolo folder), then you can visualize the conversion result to see if it correct or not:
alfred data yolovview -i images/ -l labels/
2020.07.27: After a long time past, alfred finally get some updates:
Now, you can using alfred draw Chinese charactors on image without xxxx undefined encodes.
from alfred.utils.cv_wrapper import put_cn_txt_on_img img = put_cn_txt_on_img(img, spt[-1], [points[0][0], points[0][1]-25], 1.0, (255, 255, 255))
Also, you now can merge 2 VOC datasets! This is helpful when you have 2 dataset and you want merge them into a single one.
alfred data mergevoc -h
You can see more promotes.
2020.03.08:Several new files added in alfred:
alfred.utils.file_io: Provide file io utils for common purpose alfred.dl.torch.env: Provide seed or env setup in pytorch (same API as detectron2) alfred.dl.torch.distribute: utils used for distribute training when using pytorch
2020.03.04: We have added some evaluation tool to calculate mAP for object detection model performance evaluation, it's useful and can visualize result:
this usage is also quite simple:
alfred data evalvoc -g ground-truth -d detection-results -im images
where
-gis your ground truth dir (contains xmls or txts),
-dis your detection result files dir,
-imis your images fodler. You only need save all your detected results into txts, one image one txt, and format like this:
bottle 0.14981 80 1 295 500 bus 0.12601 36 13 404 316 horse 0.12526 430 117 500 307 pottedplant 0.14585 212 78 292 118 tvmonitor 0.070565 388 89 500 196
2020.02.27: We just update a
licensemodule inside alfred, say you want apply license to your project or update license, simple:
alfred cab license -o 'MANA' -n 'YoloV3' -u 'manaai.cn'
you can found more detail usage with
alfred cab license -h
2020-02-11: open3d has changed their API. we have updated new open3d inside alfred, you can simply using latest open3d and run
python3 examples/draw_3d_pointcloud.pyyou will see this:
2020-02-10: alfred now support windows (experimental);
2020-02-01: 武汉加油! alfred fix windows pip install problem related to encoding 'gbk';
2020-01-14: Added cabinet module, also add some utils under data module;
2019-07-18: 1000 classes imagenet labelmap added. Call it from:
from alfred.vis.image.get_dataset_label_map import imagenet_labelmap # also, coco, voc, cityscapes labelmap were all added in from alfred.vis.image.get_dataset_label_map import coco_labelmap from alfred.vis.image.get_dataset_label_map import voc_labelmap from alfred.vis.image.get_dataset_label_map import cityscapes_labelmap
2019-07-13: We add a VOC check module in command line usage, you can now visualize your VOC format detection data like this:
alfred data voc_view -i ./images -l labels/
2019-05-17: We adding open3d as a lib to visual 3d point cloud in python. Now you can do some simple preparation and visual 3d box right on lidar points and show like opencv!!
You can achieve this by only using alfred-py and open3d!
example code can be seen under
examples/draw_3d_pointcloud.py. code updated with latest open3d API!.
2019-05-10: A minor updates but really useful which we called mute_tf, do you want to disable tensorflow ignoring log? simply do this!!
from alfred.dl.tf.common import mute_tf mute_tf() import tensorflow as tf
Then, the logging message were gone....
2019-05-07: Adding some protos, now you can parsing tensorflow coco labelmap by using alfred:
from alfred.protos.labelmap_pb2 import LabelMap from google.protobuf import text_format with open('coco.prototxt', 'r') as f: lm = LabelMap() lm = text_format.Merge(str(f.read()), lm) names_list = [i.display_name for i in lm.item] print(names_list)
2019-04-25: Adding KITTI fusion, now you can get projection from 3D label to image like this: we will also add more fusion utils such as for nuScene dataset.
We providing kitti fusion kitti for convert
camera link 3d pointsto image pixel, and convert
lidar link 3d pointsto image pixel. Roughly going through of APIs like this:
# convert lidar prediction to image pixel from alfred.fusion.kitti_fusion import LidarCamCalibData, \ load_pc_from_file, lidar_pts_to_cam0_frame, lidar_pt_to_cam0_frame from alfred.fusion.common import draw_3d_box, compute_3d_box_lidar_coords # consit of prediction of lidar # which is x,y,z,h,w,l,rotation_y res = [[4.481686, 5.147319, -1.0229858, 1.5728549, 3.646751, 1.5121397, 1.5486346], [-2.5172017, 5.0262384, -1.0679419, 1.6241353, 4.0445814, 1.4938312, 1.620804], [1.1783253, -2.9209857, -0.9852259, 1.5852798, 3.7360613, 1.4671413, 1.5811548]] for p in res: xyz = np.array([p[: 3]]) c2d = lidar_pt_to_cam0_frame(xyz, frame_calib) if c2d is not None: cv2.circle(img, (int(c2d[0]), int(c2d[1])), 3, (0, 255, 255), -1) hwl = np.array([p[3: 6]]) r_y = [p[6]] pts3d = compute_3d_box_lidar_coords(xyz, hwl, angles=r_y, origin=(0.5, 0.5, 0.5), axis=2) pts2d = [] for pt in pts3d[0]: coords = lidar_pt_to_cam0_frame(pt, frame_calib) if coords is not None: pts2d.append(coords[:2]) pts2d = np.array(pts2d) draw_3d_box(pts2d, img)
And you can see something like this:
note:
compute_3d_box_lidar_coordsfor lidar prediction,
compute_3d_box_cam_coordsfor KITTI label, cause KITTI label is based on camera coordinates!.
since many users ask me how to reproduces this result, you can checkout demo file under
examples/draw_3d_box.py;
2019-01-25: We just adding network visualization tool for pytorch now!! How does it look? Simply print out every layer network with output shape, I believe this is really helpful for people to visualize their models!
➜ mask_yolo3 git:(master) ✗ python3 tests.py ---------------------------------------------------------------- Layer (type) Output Shape Param # ================================================================ Conv2d-1 [-1, 64, 224, 224] 1,792 ReLU-2 [-1, 64, 224, 224] 0 ......... Linear-35 [-1, 4096] 16,781,312 ReLU-36 [-1, 4096] 0 Dropout-37 [-1, 4096] 0 Linear-38 [-1, 1000] 4,097,000 ================================================================ Total params: 138,357,544 Trainable params: 138,357,544 Non-trainable params: 0 ---------------------------------------------------------------- Input size (MB): 0.19 Forward/backward pass size (MB): 218.59 Params size (MB): 527.79 Estimated Total Size (MB): 746.57 ----------------------------------------------------------------
Ok, that is all. what you simply need to do is:
from alfred.dl.torch.model_summary import summary from alfred.dl.torch.common import device from torchvision.models import vgg16 vgg = vgg16(pretrained=True) vgg.to(device) summary(vgg, input_size=[224, 224])
Support you input (224, 224) image, you will got this output, or you can change any other size to see how output changes. (currently not support for 1 channel image)
2018-12-7: Now, we adding a extensible class for quickly write an image detection or segmentation demo.
If you want write a demo which do inference on an image or an video or right from webcam, now you can do this in standared alfred way:
class ENetDemo(ImageInferEngine): def __init__(self, f, model_path): super(ENetDemo, self).__init__(f=f) self.target_size = (512, 1024) self.model_path = model_path self.num_classes = 20 self.image_transform = transforms.Compose( [transforms.Resize(self.target_size), transforms.ToTensor()]) self._init_model() def _init_model(self): self.model = ENet(self.num_classes).to(device) checkpoint = torch.load(self.model_path) self.model.load_state_dict(checkpoint['state_dict']) print('Model loaded!') def solve_a_image(self, img): images = Variable(self.image_transform(Image.fromarray(img)).to(device).unsqueeze(0)) predictions = self.model(images) _, predictions = torch.max(predictions.data, 1) prediction = predictions.cpu().numpy()[0] - 1 return prediction def vis_result(self, img, net_out): mask_color = np.asarray(label_to_color_image(net_out, 'cityscapes'), dtype=np.uint8) frame = cv2.resize(img, (self.target_size[1], self.target_size[0])) # mask_color = cv2.resize(mask_color, (frame.shape[1], frame.shape[0])) res = cv2.addWeighted(frame, 0.5, mask_color, 0.7, 1) return res if __name__ == '__main__': v_f = '' enet_seg = ENetDemo(f=v_f, model_path='save/ENet_cityscapes_mine.pth') enet_seg.run()
After that, you can directly inference from video. This usage can be found at git repo:
The repo using alfred:
2018-11-6: I am so glad to announce that alfred 2.0 released!
😄 ⛽️ 👏 👏Let's have a quick look what have been updated:
# 2 new modules, fusion and vis from alred.fusion import fusion_utils
For the module
fusioncontains many useful sensor fusion helper functions you may use, such as project lidar point cloud onto image.
2018-08-01: Fix the video combined function not work well with sequence. Add a order algorithm to ensure video sequence right. also add some draw bbox functions into package.
can be called like this:
2018-03-16: Slightly update alfred, now we can using this tool to combine a video sequence back original video! Simply do:
# alfred binary exectuable program alfred vision 2video -d ./video_images
CapableCapable
alfred is both a library and a command line tool. It can do those things:
# extract images from video alfred vision extract -v video.mp4 # combine image sequences into a video alfred vision 2video -d /path/to/images # get faces from images alfred vision getface -d /path/contains/images/
Just try it out!!
Alfred build by Lucas Jin with
jintianiloveu, this code released under GPL-3 license. | https://libraries.io/pypi/alfred-collection | CC-MAIN-2022-40 | refinedweb | 2,747 | 50.53 |
Sorting contours from left to right and top to bottom
I need help to sort contours from left to right and top to bottom. Is there any easy code example?
asked 2014-04-10 04:11:14 -0500
updated 2020-11-30 03:25:42 -0500
I need help to sort contours from left to right and top to bottom. Is there any easy code example?
answered 2014-04-10 04:44:11 -0500
since it's std::vectors, all we need is a fitting 'less' operator, then we can just sort() it.
// mock data for demonstration: vector<vector<Point>> contours(4); contours[0].push_back(Point(3,111)); contours[0].push_back(Point(3,121)); contours[1].push_back(Point(81,13)); contours[1].push_back(Point(84,14)); contours[2].push_back(Point(33,55)); contours[2].push_back(Point(36,57)); contours[3].push_back(Point(133,25)); contours[3].push_back(Point(136,27)); for ( int i=0; i<contours.size(); i++ ) cerr << Mat(contours[i]) << endl; struct contour_sorter // 'less' for contours { bool operator ()( const vector<Point>& a, const vector<Point> & b ) { Rect ra(boundingRect(a)); Rect rb(boundingRect(b)); // scale factor for y should be larger than img.width return ( (ra.x + 1000*ra.y) < (rb.x + 1000*rb.y) ); } }; // apply it to the contours: std::sort(contours.begin(), contours.end(), contour_sorter()); for ( int i=0; i<contours.size(); i++ ) cerr << Mat(contours[i]) << endl; [3, 111; 3, 121] [81, 13; 84, 14] [33, 55; 36, 57] [133, 25; 136, 27] [81, 13; 84, 14] [133, 25; 136, 27] [33, 55; 36, 57] [3, 111; 3, 121]
Seems good. Many thanks.
hello berak,Can you please explain this code in java?
Asked: 2014-04-10 04:11:14 -0500
Seen: 12,232 times
Last updated: Apr 10 '14
intelligent sort by location countors
Area of a single pixel object in OpenCV
Which is more efficient, use contourArea() or count number of ROI non-zero pixels?
Tricky image segmentation in Python
How to extract only top-level contours?
MSER Sample in OpenCV 2.4.2 on Visual Studio 2012
Error with Contour functions in OpenCV 2.4.3
cv::findContours, unable to find contours | https://answers.opencv.org/question/31515/sorting-contours-from-left-to-right-and-top-to-bottom/ | CC-MAIN-2021-17 | refinedweb | 360 | 65.12 |
Hash Tables, Mutability, and Identity: How to Implement a Bi-Directional Hash Table in Java
Hash Tables, Mutability, and Identity: How to Implement a Bi-Directional Hash Table in Java
Mutability can affect the behavior of hash tables. Misunderstanding mutability can cause objects stored in a hash table to become irretrievable and essentially disappear.
Join the DZone community and get the full member experience.Join For Free
Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!
This article is featured in the new DZone Guide to Modern Java, Volume II. Get your free copy for more insightful articles, industry statistics, and more.
Data structures like hash tables and hash maps are essential for storing arbitrary objects and efficiently retrieving them. The object, or value, is stored in the table and associated with a key. Using the key, one can later retrieve the associated object. However, there are situations where, in addition to mapping keys to objects, one might also want to retrieve the key associated with a given object. This problem has been encountered time and again, and the solution is much trickier.
For example, we must efficiently keep track of the underlying remote objects corresponding to proxies when developing our JNBridge product. We do that by maintaining a table mapping unique keys to objects. This is straightforward to implement, using hash tables and maps available in many libraries. We also must be able to obtain an object’s unique key given the object — provided it has one. (Yes, some libraries now offer bimaps, which purport to implement this functionality, but these didn’t exist when we first needed this, so we had to implement it on our own. In addition, these bimaps don’t provide everything we need. We’ll discuss these issues later.)
Following are some helpful hints in implementing these forward/reverse map pairs.
Hashing Algorithm Requirements
Let’s first review the requirements that must be fulfilled by whatever hashing algorithm is used, and how it relates to equality. While a hashing method can be implemented by the developer, it is expected to obey a contract. The contract, in general, cannot be verified by the underlying platform, but if it is not obeyed, data structures that rely on the hashing method may not behave properly.
In Java, for example, the contract of the hashCode() method is:
For any given object, the hashCode() method must return the same value throughout execution of the application (assuming that information used by the object’s equality test also remains unchanged).
If two objects are equal according to the objects’ equality test, then they must both have the same hash code.
Connected with the hashCode() method is an equality test, which should implement an equivalence relation; that is, it must be reflexive, symmetric, and transitive. It should also be consistent: It should yield the same result throughout the execution of the application (again, assuming the information used by the equality test doesn’t change).
In addition to these contracts, Java provides guidelines for the use and implementation of hash codes, although these are not binding and may just be advisory. While guidelines for some non-Java frameworks suggest that hash codes for mutable objects should only be based on aspects of the objects that are immutable — so that the hash codes never change — in Java culture, the guidelines for implementing hashCode() are less strict, and it is quite likely that an object’s hash code can change. For example, the hash code of a hash table object can change as items are added and removed.
However, one informal guideline suggests that one should be careful using an object as a key in a hash-based collection when its hash code can change. As you’ll see, the potential mutability of hash codes is a crucial consideration when implementing reverse maps.
If an object’s hash code changes while it’s stored inside a data structure that depends on the hash code (for example, if it’s used as a key in a hash table), then the object may never be retrieved, as it will be placed in one hash bucket as it’s added to the hash table, but looked for later in another hash bucket when the hash code has changed.
Implementation Assumptions
So, what does this mean when forward/reverse map pairs must be implemented? Let’s start with some assumptions:
The forward map maps from keys to values. The keys are a particular type that one chooses in advance, and values can be any object. The value objects can be implemented by anyone, and their hash codes and equality tests may not conform to implementation guidelines — they may not even obey the required contract.
The reverse map maps from the user-provided values back to keys.
For simplicity, the user-defined object cannot be null. (Although, if necessary, this can be accommodated, too, through some additional tests.)
Keys and user-defined objects should be unique; that is, they should not be used in the tables more than once.
Since the key is under our control, a developer can use objects of any immutable class (for example, Integer or Long), and avoid the possibility that the key’s hash code changes. For the forward map, a simple hash table or hash map can be used.
The reverse map is more of a problem. As discussed above, one cannot rely on the hash code method associated with the user-provided objects that are used as keys. While some classes, particularly Java base classes, may have well-behaved hash code functions, other Java classes might not. Therefore, it’s unsafe to trust that user-defined classes will obey these rules, or that the programmers that defined them were even aware of these guidelines.
Find an Immutable Attribute
Therefore, one must come up with an attribute that every object has, that is guaranteed to never change, even when the contents of the object do change. The attribute’s value should also be well-distributed, and therefore suitable for use in hashing. One such immutable attribute is the object’s identity. When a hash table, for example, has items added to it, it’s still the same hash table, even though the computed hash code might change.
Fortunately, Java provides a hashing method based on object identity,
java.lang.System.identityHashCode(), which is guaranteed to return the same value on a given object, even if its state has changed, since it is guaranteed to use java.lang.Object’s hashCode() method, which is identity-based, even if the target class overrides that method.
Java actually provides a class,
java.util.IdentityHashMap, which uses identity hashing. The developer could have used IdentityHashMap for his reverse hash table, except that, unlike the Java Hashtable, IdentityHashMap is not synchronized, and hash tables must be thread-safe.
Creating Identity-Based Hashing
In order to write one’s own identity-based hash tables, the developer must first ensure that, no matter what object is used as the key, identity-based hashing is always used. Unfortunately, the hash methods for these classes can’t be overridden, since they’re out of the developer’s control. Instead, the key objects must be wrapped in classes that are in the developer’s control, and where he can control the way the hash values are computed. In these wrappers, the hash method simply returns the identity-based hash code of the wrapped object.
In addition, since identity-based hashing is being used, one must also use reference-based equality, so that two objects are equal if — and only if — they’re the same object, rather than simply equivalent objects. In Java, a developer must use the "==" operator, which is guaranteed to be reference equality, rather than equals(), which can be, and often is, redefined by the developer.
In Java, our identity-based wrappers look like this:
final class IdentityWrapper { private Object theObject; public IdentityWrapper(Object wrappedObject) { theObject = wrappedObject; } public boolean equals(Object obj2) { if (obj2 == null) return false; if (!(obj2 instanceof IdentityWrapper)) return false; return (theObject == ((IdentityWrapper)obj2).theObject); } public int hashCode() { return System.identityHashCode(theObject); } }
Once these wrappers have been defined, the developer has everything he needs for a reverse hash table that works correctly:
Hashtable ht = new Hashtable(); … ht.put(new IdentityWrapper(mutableUserDefinedObject), value); … mutableUserDefinedObject.modify(); … Value v = (Value) ht.get(new IdentityWrapper(mutableUserDefinedObject)); // retrieved v is the same as the value that was initially added.
If the IdentityWrapper classes are not used, the ht.get() operation is not guaranteed to retrieve the proper value. At this point, the developer has all that’s needed to implement bidirectional hash tables.
The Trouble With Other Libraries
What about other existing libraries? In particular, what about Google’s Guava library, which implements a HashBiMap class, as well as other classes implementing a BiMap interface? Why not use that, and avoid reinventing the wheel? Unfortunately, while HashBiMap implements a forward/reverse hashmap pair and makes sure that the two are always in sync, it does not use identity hashing, and will not work properly if one of the keys or values is a mutable object.
This can be seen by examining the HashBiMap source code. So, while HashBiMap solves part of the problem of implementing forward/reverse hashmap pairs, it does not address another, arguably more difficult part: the problem of storing mutable objects. The approach described here solves that issue.
In Conclusion
This piece discusses an important, but unfortunately somewhat obscure, issue in the implementation of hash tables: the way in which mutability can affect the behavior of hash tables, and the way in which misunderstanding the issue can cause objects stored in a hash table to become irretrievable and essentially disappear.
When these issues are understood, it becomes possible to implement hash tables where any object, no matter how complex or mutable, can be used as a key, and where bi-directional hash tables can be easily created.
More Java Goodness
For more insights on Jigsaw, reactive microservices, and more get your free copy of the new DZone Guide to Modern Java, Volume II!
And if you want to see other articles in the guide, check }} | https://dzone.com/articles/hash-tables-mutability-and-identity-how-to-impleme | CC-MAIN-2018-39 | refinedweb | 1,709 | 51.48 |
Hello my friends, I'm Panos and this is my first post here in CBoard Forums :D
Take a look to my C++ code:
No errors. Let's launch this:No errors. Let's launch this:Code:
#include <iostream>
#include <string>
int main()
{
std::cout << "What is your name? ";
std::string name;
std::cin >> name;
std::cout << "Hello, " << name << std::endl << "And what is yours? ";
std::cin >> name;
std::cout << "Hello, " << name << " nice to meet you too!" << std::endl;
return 0;
}
Attachment 9434
Everything work perfect. Now let's launch it again giving two names (firstname & lastname) as input.
Attachment 9435
As you can see, it doesn't prompt me to insert the second name because it uses the my lastname (Georgiadis) and treat it like this way.
Is there any way to avoid this happening ? | https://cboard.cprogramming.com/cplusplus-programming/121539-two-name-into-one-string-variable-problem-printable-thread.html | CC-MAIN-2017-51 | refinedweb | 136 | 83.25 |
In Java, threads are objects and can be created in two ways:
1. by extending the class Thread
2. by implementing the interface Runnable
In the first approach, a user-specified thread class is created by extending the class Thread and overriding its run () method. In the second approach, a thread is created by implementing the Runnable interface and overriding its run () method. In both approaches the run () method has to be overridden. Usually, the code that is to be executed by a thread is written in its run () method. The thread terminates when its run () method returns.
In Java, methods and variables are inherited by a child class from a parent class by extending the parent. By extending the class Thread, however, one can only extend or inherit from a single parent class (in this case, the class Thread is the parent class). This limitation of using extends within Java can be overcome by implementing interfaces. This is the most common way to create threads. A thread that has been created can create and start other threads.
The first method of creating a thread is simply by extending the Thread class. The Thread class is defined in the package java.lang. The class that inherits overrides the run () method of the parent
Thread for its implementation. This is done as shown in the code fragment given below. By its side a representation of the inheritance that is being implemented.
A thread can be started by applying the start () method on the thread object. The following code segment creates an object of the thread class and starts the thread object.
class Start Threadclass
{
public static void main (String args [ ])
{
……..
……..
SampleThread st = new SampleThread ();
st.start ();
…….
}
}
Here, the thread object st of the thread class SampleThread is created as
SampleThread st = new SampleThread ();
To start the thread object st, the start () method can be applied on this object as
st.start ();
When the above statement is executed, the run () method of the SampleThread class is invoked. The start () method implicitly calls the run () method. Note that the run () method can never be called directly.
Look at Program which creates a thread class ThreadExample which extends the class
Thread and overrides the method Thread.run (). The run () method of this program is where all the work of the ThreadExample class thread is done. This instance of the class is created in the ExampleT class. The start () method on this instance starts the new thread. The child thread prints the values from 0 to 5.
Program Using extends to write a single-thread program.
import java.lang.*;
class ThreadExample extends Thread
{
public ThreadExample (String name)
{
super (name);
}
public void run ()
{
System.out.println (Thread.currentThread ());
For (int i=0; i<=5; i++)
System.out.println (i);
}
}
public class ExampleT
{
public static void main (String args [ ])
{
ThreadExample t = new ThreadExample ("First");
t.start ( );
System.out.println (''This is:" + Thread.currentThread ());
}
}
The output of Program is as follows:
This is: Thread [main, 5, main]
Thread [First, 5, main]
0
1
2
3
4
5
The first line of the output shows the name of the thread (main), the priority of the thread (5) and the name of the ThreadGroup (main). In the second line, First, 5 and main are the name, priority and name of the ThreadGroup of the child thread.
The created thread does not automatically start running. To run a thread, the class that creates it must call the method start () of the Thread. The start () method then calls the run () method. When applying the start () method on a thread object, a new flow of control starts processing the program. The start () method can be invoked either from the constructor or any method in which the thread is created. Figure 6.1. shows the running of both main and child threads.
In Program the main method creates an object a thread class ThreadExample. After
executing the statement
ThreadExample t = new ThreadExample ("First");
Thread object t is in the newborn state of the thread life cycle. When a thread is in newborn state, it does not hold any system resource and the thread object is said to be empty. A thread can be started only when it is in the newborn state by calling the start () method. Calling any method other than the start () method will cause an exception IilegalThreadStateException. The start () method creates the necessary system resources to run the thread, schedules the thread to run, and calls the thread's run () method. The thread object t calls the start () method of the ThreadExample class. Thread object’s run method is defined in the ThreadExample class. After execution of t.start () statement, the thread is in the runnable state. Henceforth, both the thread object as well as main thread are in the runnable state.
Every Java applet or application is multithreaded. For instance, main itself is a thread created by extending the Thread class.
The interface Runnable is defined in the java.lang package. It has a single method-run ().
public interface Runnable
{
public abstract void run ();
}
If we want multithreading to be supported in a class that is already derived from a class other than Thread, we must implement the Runnable interface in that class.
The majority of classes created that need to be run as a thread will implement Runnable since they may be extending some other functionality from another class. Whenever the class defining run () method needs to be the sub-class of classes other than Thread, using Runnable interface is the best way of creating threads. The syntax and the inheritance structure are given below.
public class SampleThread extends
The class Thread itself implements the Runnable interface (package java.lang) as expressed in the class header:
public class Thread extends Object implements Runnable
As the Thread class implements Runnable interface, the code that controls the thread is placed in the run () method. In order to create a new thread with Runnable interface, we need to instantiate the Thread class. This thread class will have the following constructors:
public Thread (Runnable obj);
public Thread (Runnable obj, String threadname);
public Thread (ThreadGroup tg, Runnable obj, String threadname);
Here, obj is the object of the class which implements the Runnable interface, threadname is the name given to the thread and tg is the name of the ThreadGroup.
Program illustrates the creation of threads using Runnable interface.
Program Using Runnable interface to write a single-thread program.
class ThreadExample implements Runnable
{
Thread t;
public ThreadExample (String threadname)
{
t = new Thread (this, threadname);
}
public void run ()
{
System.out.println (Thread.currentThread () );
for (int i =0; i <=5; i++)
System.out.println (i);
}
}
public class ExampleT2
{
public static void main (String args [ ])
{
ThreadExample obj = new ThreadExample ("First");
Obj.t.start ( );
System.out.println ("This is:" + Thread.currentThread ());
}
}
The output of Program is as shown below.
This is: Thread [main, 5, main]
Thread [First, 5, main]
0
1
2
3
4
5
In Program, in place of the Thread class constructor parameters we passed this and First. Here this refers to the ThreadExample class on which the thread is created. Here, the abstract run () method is defined in the Runnable interface and is being implemented.
By implementing Runnable, there is greater flexibility in the creation of the class
ThreadExample.
In the above example, the opportunity to extend the ThreadExample class, if needed, still
exists.
The method of extending the Thread class is good only if the class executed as a thread does not ever need to be extended from another class.
Generally, when the execution of a program starts the thread main is started first. Child threads are started after the main thread. So it is unusual to stop the main thread before the child threads. The main thread should wait until all child threads are stopped. The join () method can be used to achieve this. The syntax of this method is as follows:
final void join () throws InterruptedException
The join () method waits until the thread on which it is called terminates. That is, the calling thread waits until the specified thread joins it. A thread (either main thread or child threads) calls a join () method when it must wait for another thread to complete its task. When the join () method is called, the current thread will simply wait until the thread it is joining with either completes its task or is not alive. A thread can be in the not alive state due to anyone of the following:
• the thread has not yet started,
• stopped by another thread,
• completion of the thread itself
The following is a simple code that uses the join () method:
try
{
t1.join ()
t2.join ();
t3.join ();
}
catch (interupptedException e)
{
}
Here t(1), t(2), t(3) are the three child threads of the main thread which are to be terminated before the main thread terminates. If we check the isAlive () on these child threads after the join () method, it will return false.
There is another form of the join () method, which has a single parameter that specifies how much time the thread has to wait. This is the following:
final void join (long milliseconds) throws InterruptedException
By default, each thread has a name. Java provides a Thread constructor to set a name to a thread. The name can be passed as a string parameter to this constructor, in the following manner:
Thread t = new Thread ("First");
Thread t = new Thread (Runnable r, "SampleThread");
The setName method of the Thread class can also be used to set the name of the thread, in the following manner:
void setName (String thread | http://ecomputernotes.com/java/multithreading/creating-threads | CC-MAIN-2020-05 | refinedweb | 1,599 | 71.75 |
.
Note
From Python 2.5 onward, it’s much more convenient to cut in at the Abstract Syntax Tree (AST) generation and compilation stage, using the ast module. ST objects created by this module are the actual output from the internal parser when created by the expr() or suite() functions, described below. The ST objects created by sequence2 st2list() or st ST ST objects.
The parser module defines functions for a few distinct purposes. The most important purposes are to create ST objects and to convert ST objects to other representations such as parse trees and compiled code objects, but there are also functions which serve to query the type of parse tree represented by an ST object.
See also
ST objects may be created from source code or from a parse tree. When creating an ST object from source, different functions are used to create the 'eval' and 'exec' forms.
The.
This function accepts a parse tree represented as a sequence and builds an internal representation if possible. If it can validate that the tree conforms to the Python grammar and all nodes are valid node types in the host version of Python, an ST object is created from the internal representation and returned to the called. If there is a problem creating the internal representation, or if the tree cannot be validated, a ParserError exception is raised. An ST object created this way should not be assumed to compile correctly; normal exceptions raised by compilation may still be initiated when the ST object is passed to compilest(). This may indicate problems not related to syntax (such as a MemoryError exception), but may also be due to constructs such as the result of parsing.
This is the same function as sequence2st(). This entry point is maintained for backward compatibility.
ST objects, regardless of the input used to create them, may be converted to parse trees represented as list- or tuple- trees, or may be compiled into executable code objects. Parse trees may be extracted with or without line numbering information.
This function accepts an ST object from the caller in st and returns a Python list representing the equivalent parse tree. The resulting list representation can be used for inspection or the creation of a new parse tree in list form. This function does not fail so long as memory is available to build the list representation. If the parse tree will only be used for inspection, st2tuple() should be used instead to reduce memory consumption and fragmentation. When the list representation is required, this function is significantly faster than retrieving a tuple representation and converting that to nested lists.
If line_info is true, line number information will be included for all terminal tokens as a third element of the list representing the token. Note that the line number provided specifies the line on which the token ends. This information is omitted if the flag is false or omitted.
This function accepts an ST object from the caller in st and returns a Python tuple representing the equivalent parse tree. Other than returning a tuple instead of a list, this function is identical to st2list().
If line_info is true, line number information will be included for all terminal tokens as a third element of the list representing the token. This information is omitted if the flag is false or omitted.
The Python byte compiler can be invoked on an ST object to produce code objects which can be used as part of a call to the built-in exec() or eval() functions. This function provides the interface to the compiler, passing the internal parse tree from st to the parser, using the source file name specified by the filename parameter. The default value supplied for filename indicates that the source was an ST object.
Compiling an ST object may result in exceptions related to compilation; an example would be a SyntaxError caused by the parse tree for del f(0): this statement is considered legal within the formal grammar for Python but is not a legal language construct. The SyntaxError raised for this condition is actually generated by the Python byte-compiler normally, which is why it can be raised at this point by the parser module. Most causes of compilation failure can be diagnosed programmatically by inspection of the parse tree.
Two functions are provided which allow an application to determine if an ST was created as an expression or a suite. Neither of these functions can be used to determine if an ST was created from source code via expr() or suite() or from a parse tree via sequence2st().
When st represents an 'eval' form, this function returns true, otherwise it returns false. This is useful, since code objects normally cannot be queried for this information using existing built-in functions. Note that the code objects created by compilest() cannot be queried like this either, and are identical to those created by the built-in compile() function. by the parsing and compilation process. These include the built in exceptions MemoryError, OverflowError, SyntaxError, and SystemError. In these cases, these exceptions carry all the meaning normally associated with them. Refer to the descriptions of each function for detailed information.
Ordered and equality comparisons are supported between ST objects. Pickling of ST objects (using the pickle module) is also supported.).
While many useful operations may take place between parsing and bytecode generation, the simplest operation is to do nothing. For this purpose, using the parser module to produce an intermediate data structure is equivalent to the code
>>> code = compile('a + 5', 'file.py', 'eval') >>> a = 5 >>> eval(code) 10
The equivalent operation using the parser module is somewhat longer, and allows the intermediate internal parse tree to be retained as an ST object:
>>> import parser >>> st = parser.expr('a + 5') >>> code = st.compile('file.py') >>> a = 5 >>> eval(code) 10
An application which needs both ST and code objects can package this code into readily available functions:
import parser def load_suite(source_string): st = parser.suite(source_string) return st, st.compile() def load_expression(source_string): st = parser.expr(source_string) return st, st.compile() | https://wingware.com/psupport/python-manual/3.3/library/parser.html | CC-MAIN-2016-18 | refinedweb | 1,021 | 52.7 |
>>> 10 * (1/0) #ZeroDivisionError: integer division or modulo by zero
>>> 4 + spam*3 #NameError: name 'spam' is not declared
>>> '2' + 2 #TypeError: cannot concatenate 'str' and 'int' objects
Here ZeroDivisionError, NameError and TypeError are name of the built-in exception that occurred.Standard exception names are built-in identifiers (not reserved keywords).
1. In Python, exceptions (also known as errors) are objects that are raised (or thrown) by
code that encounters an unexpected circumstance.
2. A raised error may be caught by a surrounding context that “handles” the exception in an appropriate fashion.
3. If Exception occurs and If uncaught, an exception causes the interpreter
to stop executing the program.
Following are list of common exception class found in python:(Image from DSA by Goodrich)
try: text = raw_input('Enter a valid input --> ') except EOFError: # Press ctrl + d print 'End of file is pressed.' except KeyboardInterrupt: # Press ctrl + c print 'Operation cancelled ..' else: #if No exception occurred, optional else block is executed print 'You entered {}'.format(text)
>>>
Enter valid input --> # ctrl+c is pressed
Operation cancelled .
>>>
Enter valid input --> test_input
You entered test_input
Notes:-
1. Normal operational code lines are placed inside try block, as in above example valid user input is
expected in try block. i.e : Watch for exception in try block.
2. Once exception occurs corresponding except block gets executed.
3. with one try block there can be N number of except block and there has to be at least one except
clause associated with every try clause.
4. We can also have an optional else clause associated with a try..except block. The else clause is executed if no exception occurs.
5. If an exception is not caught within the body of the function, the execution of the function
immediately ceases and the exception is propagated to the calling context.
Exception raising in python is carried out using raise statement with an appropriate instance
of an exception class as an argument. i.e: The error or exception that you can raise should be a class which directly or indirectly must be a derived class of the Exception class. Consider an example to understand how we can raise an exception. Find square root of an number and raise an exception when user input is negative(Square root of a negative number is imaginary value).
Open Python IDLE. Create a new file and copy following codes.
import math def sqrtC(x): if not isinstance(x, (int, float)): raise TypeError( "x must be numeric" ) elif x < 0: raise ValueError( "x cannot be negative" ) else: print 'Square root of number is %f' %math.sqrt( x ) #sqrt(input) input = int(raw_input("Enter number: ")) try: sqrtC(input) except TypeError: print 'TypeError type caught, x is not numeric!!' except ValueError: print 'ValueError type caught, Input is negative!!'
>>>
Enter number: 25
Sqaure root of number is 5.000000
>>>
Enter number: -25
ValueError type caught, Input is negative!!
Lets walk through sample output: When input is 25 , square root 5.00000 is printed and when input is negative number : -25, then ValueError exception is raised and caught in calling context.
Notes :-
Python support user defined exception.Exceptions should typically be derived from the Exception class, either directly or indirectly. Click here to know how to create user defined exception.
Clean-up actions in python is achieved using try...finally.. Let's write a sample code to understand use of finally with try statement.
def divide(x, y): try: result = x / y except ZeroDivisionError: print "division by zero!" else: print "result is", result finally: print "executing finally clause" divide(12,0) divide("12","2") #No 'TypeError' exception caught in this case.
>>>
division by zero!
executing finally clause
While when divide("12","2" ) is executed, finally block is executed before the exception is re-raised and thrown on console.
>>>
executing finally clause
Traceback (most recent call last):
File "C:/Python27/clean_finally.py", line 11, in <module>
divide1("2", "1")
File "C:/Python27/clean_finally.py", line 3, in divide1
result = x / y
TypeError: unsupported operand type(s) for /: 'str' and 'str'
Predefined Clean-up Actions in python is done using with statement. With statement guarantee that resources are closed and placed in pool right after its use, even if execution is failed.In the following code lines, after the statement is executed, the file f is always closed, even if a problem was encountered while processing the lines.
with open("myfile.txt") as f: for line in f: print line, | http://www.devinline.com/2015/04/exception-handling-in-python.html | CC-MAIN-2017-26 | refinedweb | 741 | 55.84 |
sec_id_gen_group-Generate a global group name from cell and group UUIDs.
#include <dce/secidmap.h> void sec_id_gen_group( sec_rgy_handle_t context, uuid_t *cell_idp, uuid_t *group_idp, sec_rgy_name_t global_name, sec_rgy_name_t cell_namep, sec_rgy_name_t group_namep, error_status_t *status);
Input
- context
An opaque handle bound to a registry server. Use sec_rgy_site_open() to acquire a bound handle.
- cell_idp
A pointer to the UUID of the home cell of the group whose name is in question.
- group_idp
A pointer to the UUID of the group whose name is in question.
Input/Output
- global_name
The global (full) name of the group in sec_rgy_name_t form (see
Global PGO Names).
- cell_namep
The name of the group's home cell in sec_rgy_name_t form.
- group_namep
The local (with respect to the home cell) name of the group in sec_rgy_name_t form.
Output
- status
A pointer to the completion status. On successful completion, the function returns error_status_ok. Otherwise, it returns an error.
The
sec_id_gen_group()routine generates a global name from input cell and group UUIDs. For example, given a UUID specifying the cell /.../world/hp/brazil, and a UUID specifying a group resident in that cell named writers, the routine would return the global name of that group, in this case, /.../world/hp/brazil/writers. It also returns the simple names of the cell and group, translated from the UUIDs.
The routine will not produce translations to any name for which a NULL pointer has been supplied.
- group.
- sec_rgy_server_unavailable
The DCE Registry Server is unavailable.
Functions:
sec_id_gen_name(), sec_id_parse_group(), sec_id_parse_name().
Protocols:
rsec_id_gen_name(). | http://pubs.opengroup.org/onlinepubs/9696989899/sec_id_gen_group.htm | CC-MAIN-2017-17 | refinedweb | 244 | 58.38 |
share|improve this answer answered Feb 4 '10 at 10:47 Darin Dimitrov 694k16225332389 add a comment| up vote 2 down vote Well no, that's impossible. Welcome to the All-In-One Code Framework! Interfaces provide a contract of the methods that should be in a class, without implementation. (So there's no actual logic in the interface). The choice of whether to design your functionality as an interface or an abstract class can sometimes be a difficult one.
How to justify Einstein notation manipulations without explicitly writing sums? What are the different types of inheritance ? Join them; it only takes a minute: Sign up “Cannot create an instance of an Interface” (an MvC 3 Wizard inside Orchard CMS) up vote 1 down vote favorite Based on In it, you'll get: The week's top questions and answers Important community announcements Questions that need answers see an example newsletter By subscribing, you agree to the privacy policy and terms
The purpose of an abstract class is to function as a base for subclasses. You didn't say whether you wanted a copier, television, vacuum cleaner, desk lamp, waffle maker, or anything. What are 'hacker fares' at a flight search-engine? Join them; it only takes a minute: Sign up Cannot create an instance of the abstract class or interface up vote 19 down vote favorite 5 I have a class and
Knowing that a piece of equipment is " a device with a power switch" would allow one to do some operations with it (i.e. petejohanson commented Jan 12, 2012 Agreed, I think we can leave this open in the meantime since it nicely documents the issue and current work around. Colonel Panic Registered User 10-Nov-2011 10:45 #14 Because an int isn't a string but a List implements the IEnumerable interface.The abstraction isn't apparent because it's a small bit of sample code.If Cannot Create An Instance Of An Interface Restsharp Usually, IList is initialized with a List.
Any help is greatly appreciated. IEnumerable
You should try to compile and run it. System Missingmethodexception Cannot Create An Instance Of An Interface current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. My manager said I spend too much time on Stack Exchange. Back to Forum | Previous Thread | Next Thread | Back to Top List of all thanksClose © Boards.ie 2016 Advertise Policy and Terms Contact Us Legacy site Hosting Services provided
more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed What is the text to the left of a command (as typed in a terminal) called? Cannot Create An Instance Of The Abstract Class Or Interface Net-informations.com SiteMap| About Home C# VB.NET ASP.NET AJAX .Net Framework Interview Questions About Can we create the instance for abstract classes Cannot Create An Instance Of An Interface Mvc Maybe this could be added as a future feature, to allow generic interfaces.
IList
How to tar.gz many similar-size files into multiple archives with a size limit Existence proof of Lorentz transformation from lightlike to lightlike vectors Does sputtering butter mean that water is present? so why not just say List
Webmonkey Registered User 10-Nov-2011 10:13 #5 Colonel IEnumerable
Change your code to: List
share|improve this answer edited Apr 4 at 14:38 answered Jul 7 '11 at 18:02 supercat 43.1k172108 add a comment| up vote 8 down vote IUser is the interface, you can't instantiate It basically defines a contract through which a user can interact with a collection that makes it independent of implementation. What now? You Cannot Create An Instance From The Abstract Interface Groovy share|improve this answer answered Feb 4 '10 at 10:48 Frederik Gheysels 43k772133 add a comment| up vote 5 down vote Activator.CreateInstance method invokes the default constructor to create an instance of
Colonel Panic Registered User 10-Nov-2011 10:17 #7 Webmonkeysaid: Actually C# makes exceptions to this if you read the above links. Not the answer you're looking for? Reload to refresh your session. IEnumerable is merely an interface so how can we create an object like this?
A lot of people talk about classes and code reuse, but really it's more about code maintenance. Why not use List
more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Here is the code: [Themed] public class WizardController : Controller { public ActionResult Index() { var wizard = new WizardViewModel(); wizard.Initialize(); return View(wizard); } [HttpPost] public ActionResult Index([Deserialize] WizardViewModel wizard, IStepViewModel Look at and In your case however, it seems that you have misunderstood how interfaces work. More about....
What is the simplest way to put some text at the beginning of a line and to put some text at the center of the same line? Proposed as answer by Michael Sun [MSFT]Microsoft employee, Moderator Monday, December 07, 2009 1:04 AM Marked as answer by Michael Sun [MSFT]Microsoft employee, Moderator Tuesday, December 08, 2009 3:54 AM Tuesday, if you had: public class Response : IList
Further discussion for feature changes should be done here: johnsheehan closed this Jan 19, 2012 Sign up for free to join this conversation on GitHub. All sorts of classes implement IList. Do you still need more info? You need to implement it first, then instantiate that class.
Welcome to the All-In-One Code Framework! You need to instantiate a class that implements the interface: IList... | http://hiflytech.com/cannot-create/cannot-create-an-instance-of-an-interface-ilist.html | CC-MAIN-2017-47 | refinedweb | 963 | 58.42 |
This c program generates pseudo random numbers using rand and random function(Turbo C compiler only). As the random numbers are generated by an algorithm used in a function they are pseudo random, this is the reason why pseudo word is used. Function rand() returns a pseudo random number between 0 and RAND_MAX. % 100 = 99
For a = 1000 and b = 100
a % b = 1000 % 100 = 0
In our program we print pseudo random numbers in range [0, 100]. So we calculate rand() % 100 which will return a number in [0, 99] so we add 1 to get the desired range.
#include <stdio.h> #include <stdlib.h> int main() { int c, n; printf("Ten random numbers in [1,100]\n"); for (c = 1; c <= 10; c++) { n = rand() % 100 + 1; printf("%d\n", n); } return 0; }
If you rerun this program you will get same set of numbers. To get different numbers every time you can use: srand(unisgned int seed) function, here seed is an unsigned integer. So you will need a different value of seed every time you run the program for that you can use current time which will always be different so you will get a different set of numbers. By default seed = 1 if you do not use srand function.
C programming code using random function(Turbo C compiler only)
randomize function is used to initialize random number generator. If you don't use it then you will get same random numbers each time you run the program.
#include <stdio.h> #include <conio.h> #include <stdlib.h> int main() { int n, max, num, c; printf("Enter the number of random numbers you want\n"); scanf("%d", &n); printf("Enter the maximum value of random number\n"); scanf("%d", &max); printf("%d random numbers from 0 to %d are :-\n", n, max); randomize(); for (c = 1; c <= n; c++) { num = random(max); printf("%d\n",num); } getch(); return 0; } | http://www.programmingsimplified.com/c-program-generate-random-numbers | CC-MAIN-2016-07 | refinedweb | 322 | 68.3 |
See the previous posts for this article here: Part 1, Part 2.
Before I review the projects for this article, I would like to describe the basics: a few simple steps that will give you a C# experience while programming MSXML with C++.
Step 1: Import MSXML
There are a number of ways to import com libraries in a C++ project. I think the simplest way is to add the following line in a common header (best precompiled).
#import <msxml6.dll> named_guids
This will create the headers (with extensions .tli and .tlh) that we need to access the COM objects created by MSXML. It will also automatically add them to your project. These also include other header files that we will be using later (comdef.h and comip.h)
The 6 in <msxml6.dll> stands for version 6. If you have this version installed, it should be in your path (under system32), so specifying its name is sufficient. Microsoft recommends that you use MSXML version 6 or version 3 unless you need some specific feature from another version. Choose version 6 to get the best in performance and security. Choose 3 (replace the 6 with a 3) if you want to target the broadest audience. Both versions work for the projects in these posts. You can read more about MSXML versions here.
We will be using types from the MSXML2 namespace (yes, for msxml3 and msxml6 too) so I recommend you add the following line too:
using namespace MSXML2;
The named_guids keyword will allow you to refer to guids by their names later in the code.
Step 2: Enter Smart Pointers
Simply put, a smart pointer is a C++ class that has the semantics of a pointer to another class but does not need to be released explicitly.
Smart pointers are able to achieve this due to three powerful C++ features which I will review briefly:
- Reliable object lifetime management
- Operator overloading
- Templates
C++ manages the lifetime of an object by calling the object’s destructor when it goes out of scope or after the destructor’s containing class is called. The destructor is also called if an exception is thrown from within the scope of an object or from within a nested call made from that scope. In this sense, the mechanism is reliable and ensures that class destructors can be used to release resources reliably.
C++ also supports overloading of the ‘–>’ operator. This allows an object of a class to return a pointer to an object other than itself, thereby giving it the semantics of that pointer.
The method of releasing a pointer differs from domain to domain (for instance using the ‘delete’ operator for memory, or by calling some domain specific Release function). But often, within a domain, pointers of different types can be released in the same way. It would therefore seem rather cumbersome to have to write the same smart pointer logic for each pointer type in the domain.
C++ templates allow you to write a smart pointer once as a template for many classes in a domain. STL provides classic examples of smart pointers templates with its auto_ptr and shared_ptr classes. For COM objects, Microsoft has implemented a smart pointer template called ‘_com_ptr_t’. _com_ptr_t uses the specific COM mechanisms to manage any COM object’s lifetime and can be found in comip.h which is automatically included in your code by the #import statement.
As a convenience, for many COM interfaces, Microsoft also provides a type definition (typedef) to instantiate a smart pointer type for that interface. according to the naming convention for these types, they usually have a ‘Ptr’ suffix.
Moreover, MSXML offers two sets of interfaces for many objects. The raw interfaces use the ‘good’ old COM types (like VARIANT, BSTR and HRESULT) and ‘dumb’ pointers (you know what I mean – not smart pointers). The second set of interfaces wrap the raw interfaces and are defined in terms of wrapper types that wrap raw COM types and manage their resources safely. If you only want the raw interfaces, you can add the keyword “raw_interfaces_only” after the #import statement above.
You may be asking yourself – why would I not want to import the non-raw interfaces? Why work so hard to manage resources safely, manage object lifetime, convert types safely and handle errors, if I can get it all for free? I will answer that in Part 5 when we review the SAXReader project.
Now, in order to make our C++ code look like code written in C#, we will use that second set of interfaces, and the smart pointers that are defined for them. We will also add our own type definitions to map the smart pointer types from the MSXML2 namespace to equivalent types in the System.Xml namespace.
typedef MSXML2::IXMLDOMNodePtr XmlNode;
typedef MSXML2::IXMLDOMDocument2Ptr XmlDocument;
typedef MSXML2::IXMLDOMElementPtr XmlElement;
typedef MSXML2::IXMLDOMAttributePtr XmlAttribute;
typedef MSXML2::IXMLDOMCommentPtr XmlComment;
typedef MSXML2::IXMLDOMNamedNodeMapPtr XmlNamedNodeMap;
typedef MSXML2::IXMLDOMNodeListPtr XmlNodeList;
typedef MSXML2::IXMLDOMDocumentFragmentPtr XmlDocumentFragment;
typedef MSXML2::IXMLDOMCDATASectionPtr XmlCDataSection;
typedef MSXML2::IXMLDOMProcessingInstructionPtr XmlProcessingInstruction;
typedef MSXML2::IXMLDOMSchemaCollectionPtr XmlSchemaCollection;
typedef MSXML2::IXMLDOMParseErrorPtr XmlParseError;
typedef MSXML2::IXSLProcessorPtr XslProcessor;
typedef MSXML2::IXSLTemplatePtr XslTemplate;
Feel free to remove some of these if you don’t need them or add more, similar types if you use other interfaces.
You may be asking why I explicitly specified the MSXML2 namespace in these definitions. Would it not suffice to include the ‘using’ directive from the previous step?
Well, one of the few differences between the Visual C++ 6.0 environment and that of Visual Studio 2008 with regard to MSXML is that in the latter, some of the COM smart pointers (on the left side of my typedefs) were redefined in the global namespace. As we specifically need those from the msxml2 namespace, and to avoid an ambiguity compilation error, this has to be specified explicitly. On the whole, that makes the left side pretty ugly, but this will be of no concern to you once you include the typedefs as I propose.
Step 3: Add Some Helper Classes
A CoUninitialize Helper
Applications must call CoInitialize in a thread before any other call to COM in that thread. They must also call CoUninitialize when COM is no longer needed. Forgetting to call CoUninitialize is not a problem in a single threaded application, because when the process exits any clean-up that needs to be done will be done for you. However, in multi-threaded applications, every thread that runs and exits without calling CoUninitialize generates a resource leak in your application.
Seasoned C++ programmers like us probably won’t forget to call CoUninitialize before exiting a thread, but remember, you have to make the call even if your thread exits due to an unhandled exception. Altogether, managing all cases can make your code a little messy – which is a big NO, NO 🙂
The simple solution for such problems in C++ is Resource Allocation as Initialization (RAI). RAI refers to the use of C++ object lifetime management to ensure that a resource is released automatically, as we would expect it to.
The following class does the trick. Just instantiate a local variable of this type at the beginning of the outermost block in your thread and forget about CoUninitialize.
class ComInit
{
public:
ComInit() { ::CoInitialize(NULL); }
~ComInit() { ::CoUninitialize(); }
};
An Error Handling Helper
Another aspect of COM programming that we must address is error management.
C++ supports structured error handling very well, but unfortunately, its mostly ‘do it yourself’ with COM. Most COM methods return the cryptic HRESULT which immediately causes the following problems:
- HRESULT is not an enumerated type, so providing useful information to callers and users usually requires additional steps. Yes you could stay with the FAILED(hr) macro, but is that really enough information?
- When every line contains a call to a COM function returning an HRESULT, you have only a few options:
- You can check the return code of every function adding ~3 lines for each function call, rendering your code utterly unreadable. (75% of the code deals with error handling).
- You might take your chances and ignore some of the errors. A catastrophe waiting to happen.
- You can use macros to check the return code and throw an exception, as in the MSDN code quoted in my first post in this article. Macros make code difficult to browse and debug
Well, Microsoft defines a very useful class called ‘_com_error’ in the comdef.h include file. comdef.h is automatically included in your code by the #import statement. _com_error is a very useful class to throw when an HRESULT value indicates some error. It takes an HRESULT in its constructor and provides string formatted information through the ErrorDescription method. As you probably know, some COM objects support the IErrorInfo interface which provides more detailed error information. _com_error can optionally take one of those in its constructor too and provide easy access to that information.
So? Where does that get us? COM doesn’t throw this class.
Well, first of all, _com_error is used by the _com_ptr class to manage errors that occur in the COM methods that it calls. Thus, by wrapping a COM object with a _com_ptr you create a COM object in one line and use C++ try catch syntax to handle errors in a structured way.
Second, you can use _com_error objects yourself to access more information about an HRESULT error.
But what about errors that occur in your application and are not generated by COM? Well, just for convenience, I added my own Error class that can optionally handle HRESULT errors by reusing _com_error. Nothing clever here. You can write your own class to wrap an error with an exception, but please do something, because structured exception handling is the way to go. Here is mine:
class Error
{
char m_Message[512];
public:
Error (HRESULT hr)
{
m_Message[0] = '\0';
_com_error comError (hr);
const TCHAR* message = comError.ErrorMessage();
if (message)
strncpy_s (m_Message, message, sizeof (m_Message));
m_Message[sizeof(m_Message)-1] = '\0';
}
Error (char* format, …)
{
va_list args;
va_start(args, format);
vsprintf_s(m_Message, format, args);
va_end(args);
}
Error(const Error& r)
{
strcpy_s (m_Message, r.m_Message);
}
operator char*() { return m_Message; }
};
Visual C++ 6.0 and Visual Studio 2008 Compatibility
Oh, and one last point. I used a few of the new safe CRT calls provided with Visual Studio 2008. So, for backward compatibility with Visual C++ 6.0, define the following.
#if _MSC_VER <= 1200 // Visual Studio 6
#define strncpy_s(dest, src, size) strcpy (dest, src)
#define vsprintf_s vsprintf
#define wcsncpy_s wcsncpy
#endif
In each of the C++ projects (download here) you will find my implementation of Step 1 and Step 2 in ImportMSXML.h and my implementation of Step 3 in Utils.h
In the next post(s) I will briefly describe each of the 5 project pairs (one in C# and one in C++) in more detail.
See the previous posts for this article here: Part 1, Part 2.
Stay tuned.
After much gnashing of teeth and slapping of forehead I found this article to be simply the best ever on C++ and XML usage.
I have a small problem though when compiling this for release.
I get:
Error 1 error C2665: 'strncpy_s' : none of the 2 overloads could convert all the argument types u:\projects\general\usbnotify\usbnotify\Utils.h 30 USBNotify
and it happens on the line with:
strncpy_s (m_Message, message, sizeof (m_Message));
What am I doing wrong?
Many Thanks.
Geoff
Don't sweat it fixed my own problem. Was not checking build config.
Still a great article!
Hi Geoff,
Sorry for the delay in responding.
strncpy_s is the "safe" form of strncpy provided with VS 2008.
If you are using VC 6.0 you should be using strcpy.
Please take a look in Utils.h and you will see that I defined the following:
#if _MSC_VER <= 1200 // Visual Studio 6 #define strcpy_s strcpy #define vsprintf_s vsprintf #define wcsncpy_s wcsncpy #endif Did you change that code? Which version of Visual Studio are you using? David
Thank you so much for these articles and the accompanying examples – they are exactly what I needed! I was having fits over the MSXML examples in the MSDN (goto?!), but your solution is wonderfully elegant. I particularly appreciate the way that your sample code includes both the c# and the c++ projects. You've saved my software team a lot of work this month!
(we're currently porting our software over to Vista, which involves moving a lot of data out of the registry into XML data files. The catch is that the codebase we're porting is 10+ years-worth of software, including a lot of shared code between the PC-based tools and the embedded software run by our industrial instruments, and the data we're moving is used by multiple applications in four different languages…)
Hope you continue the series – I'd love to read parts 4 and 5!
Hi David,
I used your code verbatim. The problem was in the release version of the build. I had not configured the character set to use multi-byte and therefore getting conversion errors on the parameters for strcpy_s. A noob mistake! I am using VS2008 and so in my final build have commented out the VS6 defines.
This is a superb article!
Many thanks,
Geoff
I think utils.h is broken for unicode in VS2008. There is a mix and match of TCHAR and char that causes compilation errors.
This is a superb article!
Many thanks
Duong
I'm very impressed. The article/code you provided is an excellent diving board into the deep mirky waters call COM/MSXML.
I'm currently busy developing a standard interface to xercesc/libxml2 and now you've given me the know how to include msxml.
Like all the previous posts before me have said, and I will reiterate – many thanks.
I just downloaded the samples and tried to compile them. I got an error on the use of strcpy_s in utiles.h. In some previous posts David called attention to some definitions for VS6. Specifically:
#if _MSC_VER <= 1200 // Visual Studio 6 #define strcpy_s strcpy #define vsprintf_s vsprintf #define wcsncpy_s wcsncpy #endif In the version of utils.h that I got the first define was not there and seemd to hve been replaced with: #define strncpy_s(dest, src, size) strcpy (dest, src) I added the original define back and everything compiled correctly.
Update: I have now successfully managed to create a wrapper interface class to msxml/libxml2+libxslt/xercesc+xalanc. Thanks to your code I managed to create the msxml wrapper. I can now switch my code to compile against one of the 3 xml libraries without having to change a single line of code. Excellent.
BUT: I discovered a small bug in your code. It's a memory leak.
In the file Utils.h, the StringWriter class is missing a destructor. The following code should be inserted:
~StringWriter () {
stream->Release();
}
After inserting this code, the memory leak I detected disappeared.
Hi Hans,
Great. Thanks for the comment and the bug fix.
C++ is not QUITE as elegant as C# : )
David,
I like this very much, but can i compile my target executable with /clr and use the smart pointers.
This is very new to me and I have a native C++ project that needs to be moved to managed code.
Hi Mark,
If you are moving to managed code, I would recommend you use the classes in the System.Xml namespace.
You will find excellent documentation and many examples on the net.
Let me know if you need any assistance with that,
David
David,
Thanks for your advice but I'm not entirley sure if I can do do this due to the amount of work that may be required. I am trying to do this as a refactor against a set of bug fixes under the radar as my manager (recently promoted team member) is not prepared to allocate time to this.
As Martin Fowler's Principles in Refactoring > What Do I Tell My Manager?
"Of course, many people say they are driven by quality but are more driven by schedule. In these cases I give my more controversial advice: Don't tell!"
He understands quality but is not prepared to put the time in.
Hello to every body, it's my first visit of this web site; this web site carries awesome and genuinely fine information for readers.
Thanks a bunch for sharing this with all of us you really know what you're talking about!
What's up all, here every person is sharing such experience, thus it's good
to read this web site, and I used to pay a quick visit this weblog all the time.
It's amazing to visit this site and reading the views of all colleagues regarding this paragraph, while I am also keen of getting knowledge. | http://blogs.microsoft.co.il/davids/2008/12/24/msxml-in-c-but-as-elegant-as-in-c-part-3/ | CC-MAIN-2018-09 | refinedweb | 2,809 | 62.58 |
2019 has been a big year for the .NET desktop platforms. First of all, Windows Forms and WPF were open-sourced and included in .NET Core. Originally these two platforms were supported on .NET Framework only and starting from .NET Core 3, desktop developers can also build their applications on top of .NET Core. Besides that, many new features became available for Windows Forms and WPF, such as:
- Windows Forms and WPF are now able to support a variety of new use cases including APIs for both Windows and devices as well as UWP controls through XAML Islands.
- MSIX provides a new easy way of packaging, installing, and updating desktop applications.
- App Center has added support for Windows Forms and WPF, so now developers can benefit from multiple distribution, analytics, and diagnostics services for projects.
In this article, I’ll show how you can incorporate all of those new features in your desktop applications and what benefits you will gain from those upgrades.
Why Should Desktop Developers Care About .NET Core?
With the latest version of .NET Core 3.0 released in September 2019, desktop developers have a choice for their .NET runtime. Even though .NET Framework will continue to be fully supported and updated, there are many reasons to consider .NET Core.
.NET Core is the Future for .NET
At Build 2019, Microsoft announced that all new APIs, language features, and runtime improvements will be exclusive to .NET Core in order to protect existing .NET Framework applications from breaking changes. Microsoft also talked about .NET 5 as "the one" .NET platform, coming in 2020. Behind the scenes, .NET 5 is simply the next iteration of .NET Core, so by porting an application to .NET Core, you’re preparing for the future of .NET 5.
Innovate at Your Own Pace
.NET Framework only allows a single version of the framework to be installed on each computer at any given time, and this runtime is shared by all applications that depend on .NET. If a user updates to the latest version of .NET Framework, all .NET applications on that computer will be similarly updated. Within the enterprise, this often means that the framework updates are a company-wide rollout initiated by their IT organization which usually leads to lengthy delays in updating .NET Framework.
Using .NET Core, you can control the version of .NET Core for an application. This allows you to ensure a stable runtime environment for the users.
With the ability to package a version of .NET Core along with an application, the execution environment can be custom tailored. This gives you freedom to upgrade to the latest versions of the .NET platform at your own pace without delays created by customers’ update cycles.
Smaller App Sizes with Assembly Trimming
Including the entire runtime within the installation package seems like a daunting dependency to push onto users. Fortunately, an application will likely require only a small subset of the .NET Core libraries to function. The .NET Core 3.0 SDK comes with a tool that can analyze intermediate language (IL) and trim unused assemblies, which may reduce the size of an application.
To enable this feature, add this setting in the project and publish the application as Self-Contained:
<PropertyGroup> <PublishTrimmed>true</PublishTrimmed> </PropertyGroup>
Single-File Executables
A new .NET Core feature allows you to package your application into a platform-specific, single file executable. This self-extracting archive provides a lightweight deployment package for the users.
To publish a single-file executable, set the PublishSingleFile in the project or on the command line with the dotnet publish command (please note that the line is broken only to accommodate the narrow columns in the printed magazine):
dotnet publish -r win10-x64 /p:PublishSingleFile = true
Or from a console:
< PropertyGroup > <RuntimeIdentifier> win10-x64 </ Runtime I dentifier > < Publish SingleFile > True </ Publish SingleFile > </ PropertyGroup >
Step-by-Step Migration from .NET Framework to .NET Core
You can follow along in the demo with code at this repository:. I’ll migrate a simple WPF application called Photo Store that offers photo sales. The main form of this application is shown in Figure 1.
The Photo Store application allows users to select products, edit their images, choose from a variety of printing options, and place their order. The application targets .NET Framework 4.7.2 and has a single form with embedded JPEG resource files.
Because the application is using the Path API for getting access to the pictures and the path to the executable is slightly different for .NET Core and .NET Framework, let’s make these three simple changes that will help facilitate the change between .NET Framework and .NET Core:
- Set the Build Action for all pictures to Content instead of Resource.
- Set Copy to Output Directory to Copy ifnewer.
- In the MainWindow.cs line 47 setPhotos.Path = "Photos".
Before starting the migration, it’s important to evaluate how compatible the application will be with .NET Core 3.
Estimate the Porting Cost
Microsoft’s Portability Analyzer () determines whether an application depends on APIs that aren’t supported in .NET Core. This tool provides a Portability Report, which can be seen in Figure 2.
The first tab, Portability Summary, shows the calculated compatibility score. A score of 100% in each row indicates that an application is fully compatible with .NET Core. When deficiencies belong to NuGet packages, check to see if that package supports .NET Core. Once the application has been retargeted, NuGet restore automatically pulls the correct .NET Core-compatible version of the package. When deficiencies belong to assemblies, you’ll need to refactor the code to avoid using unsupported APIs. Go to the second tab, Details, filter by assembly name to hide all NuGet packages, and walk through the list.
In this case, Photo Store has 100% compatibility so you can port it to .NET Core. Below, I provide instructions on how to do it by hand, but first I recommend trying a Try Convert, which might be able to do all of the work for you. Because project files for various applications may be very different, it’s impossible to create a silver bullet solution that covers all cases. This tool will cover the most popular cases and work just fine for the majority of the projects. If it didn’t work for you, go ahead and try to do it manually.
Porting with Try Convert
Try Convert is a global tool that tries to convert your project file from the old style to the new SDK style and updates the target framework version for your application from .NET Framework to .NET Core. You can install it from here:. Once installed, in CLI, run the command:
dotnet try-convert -p "<path to your .csproj file>"
After the tool completes the conversion, reload your files in Visual Studio. Check in the properties of your project to see if it’s now targeting .NET Core 3.0.
Porting by Hand
.NET Core requires project files to have the new SDK style. If the application was created on the .NET Framework, the project file has the old style, like the Photo Store sample. First, you need to check in the Solution Explorer to see if the project contains a packages.config file. If so, right-click on it and select Migrate packages.config to PackageReference from the context menu. This moves the dependencies from the packages.config to the project and ensures that you won’t lose them when updating to the new-style project file
Create a copy of your current .csproj file because you’ll need it in the future. After the copy is made, open the current .csproj file and replace all the content with the following code.
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework> net472 </ TargetFramework > <UseWPF>true</UseWPF> < GenerateAssemplyInfo > false </ GenerateAssemplyInfo > </ PropertyGroup > </ Project >
For Windows Forms applications, specify <UseWinForms > rather than <Use WPF> like this:
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework> net472 </ TargetFramework > <UseWinForms>true</UseWinForms> < GenerateAssemplyInfo > false </ GenerateAssemplyInfo > </ PropertyGroup > </ Project >
Note that <GenerateAssemblyInfo> should be set to false. For new projects, AssemblyInfo.cs is generated automatically by default. So, if you already have an AssemblyInfo.cs file in the project, you need to either delete the file or disable auto-generation.
To not break the project, you need to add the references and resources from the old version of the project file (that’s why you saved it) to the new project file. Copy and paste all lines related to <PackageReference>, <ProjectReference> and <Content> from the saved copy.
Save everything, build, and run. You’re still targeting .NET Framework, but your project file has the new SDK-style format. Now you’re ready for porting. Open the project file, find the property <TargetFramework>, and change the value from net472 to netcoreapp3.0.
Build and run your project. Congratulations, you ported to .NET Core 3!
Fixing Migration Errors
Errors such as "The type or namespace (…) could not be found" or "The name (…) does not exist in the current context" can often be fixed by adding a NuGet package with the corresponding library. If you can’t find the NuGet package with the library that’s missing, you might find the missing APIs in the Microsoft.Windows.Compatibility NuGet package that has ~21,000 .NET APIs from .NET Framework.
Building for Both .NET Core and .NET Framework
In cases where an application needs to be built for both .NET Framework and .NET Core, there are two common patterns that can be employed. First, for small blocks of code that need to differ between .NET Core and .NET Framework, the #if directives work with automatically defined preprocessor symbols. NETFRAMEWORK, NETCOREAPP, NETSTANDARD, and more specific symbols like NET472 can be used. are defined when targeting .NET Core and .NET Standard, respectively. (See more at).
What Doesn’t Work in .NET Core Out of the Box?
Many projects can be ported just like the example I just discussed, but there will be some applications that require more refactoring. Let’s talk about what’s not available in .NET Core and how to address those dependencies.
Configuration Changes
New .NET Core apps typically use the Microsoft.Extensions.Configuration package to load configuration settings from JSON, environment variables, or other sources. For migration purposes, the ConfigurationManager APIs are available in the System.Configuration.ConfigurationManager package (or in the Microsoft.Windows.Compatibility compatibility pack). Loading app settings, connections strings, or custom configuration sections from ConfigurationManager will work the same as before, but app config files are no longer used to configure .NET features.
.NET Core doesn’t have a machine.config file to define common configuration sections like system.diagnostics, system.net, or system.servicemodel, so an app’s config file will fail to load if it contains any of these sections.
Common features areas affected by this change are System.Diagnostics tracing and WCF client scenarios. Both of these feature areas were commonly configured using XML configuration previously and now need to be configured in code instead. To change behaviors without recompiling, consider setting up tracing and WCF types using values loaded from a Microsoft.Extensions.Configuration source or from appSettings.
The app’s config file will now be named AppName.dll.configrather than AppName.exe.config because .NET Core applications have their app code in DLLs (the .exe that is created at build-time is actually the host that starts the .NET Core runtime and loads the application from a neighboring .dll file). In most cases, this file name is unimportant because ConfigurationManager loads it automatically.
WCF Client
WCF client code that was auto generated by SvcUtil will need to be regenerated for use with .NET Core. Although many WCF client APIs are available for .NET Core, the clients generated by SvcUtil depend on XML configurations that don’t work.
There are two ways to generate a new .NET Standard-compliant WCF client. Dotnet- SvcUtil is a .NET CLI tool that can create WCF clients from the command line ().
WCF clients can also be generated with Visual Studio’s Connected Services (). Like dotnet-svcutil, this auto-generates the necessary client code in a file called Reference.cs.
Projects that generate WCF clients manually using ClientBase<T>, ChannelFactory<T>, or custom Channel/ChannelFactory implementations should continue to work. Some APIs that aren’t supported on .NET Core will need to be replaced with alternate APIs (e.g., NetNamedPipeBinding, WS-* bindings, and message-level security), but most of the WCF client surface area is available on .NET Core.
Note that WCF client APIs are supported on .NET Core, but WCF server APIs aren’t. If an app uses ServiceHost or other server-side WCF APIs to host services, that code doesn’t run on .NET Core. The community-owned Core WCF project () and alternative technologies like gRPC or ASP.NET Core can be considered.
Code Access Security
.NET Core differs from .NET Framework in that all code is loaded as fully trusted and security critical. In recent versions of the .NET Framework, Code Access Security (CAS) and Transparency attributes are no longer considered security boundaries. .NET Core further deprecates these systems.
Security-related APIs are still present in .NET Core (CAS types are in the System.Security.Permissions package), but they’re no longer necessary. Transparency attributes (SecurityCritical, SecuritySafeCritical, and SecurityTransparent) are present but have no effect. Similarly, asserting or demanding for permissions always succeeds.
Some other CAS APIs will need to be removed. Any call that previously would have restricted permissions (PermissionSet.Deny or PermissionSet.PermitOnly, for example) now throws a PlatformNotSupportedExcption to alert the user that permissions aren’t being restricted as they would have been in .NET Framework. In these cases, the CAS-related calls need to be removed and the code should be reviewed to make sure it’s ok for the scenario to run in full trust. In some cases, API overloads that took CAS-related arguments are missing in .NET Core, but they can be safely replaced with other overloads that don’t take these arguments.
If applications need to run with restricted access, security boundaries in the operating system (virtualization, containers, user accounts, or app capabilities) can be employed. APIs for interacting with OS-level security concepts (e.g., ACLs APIs) still work as before, though some methods may come from different (Windows-only) NuGet packages. is a useful tool for checking APIs (which usually maps to a NuGet package of the same name).
App Domains
An important architectural difference between .NET Framework and .NET Core is that .NET Core only has a single app domain. Applications that create app domains will need to be modified to be compatible. Most AppDomain APIs are still available in .NET Core, so querying the current domain settings or adding an unhandled exception handler should work in many cases. APIs related to creating new app domains will throw an exception.
There are a few reasons that .NET Framework apps typically create app domains:
- Running code with reduced permissions
- Enabling the loading of multiple copies of an assembly in isolation
- Making it possible to unload assemblies
Restricting permissions is no longer necessary in .NET Core as all code is run as Fully Trusted. The other scenarios can be accomplished with Assembly Load Contexts in .NET Core, logical containers that assemblies are loaded into. These allow one version of an assembly to be loaded in one context while a different version can be loaded in another (which is valuable for isolating different components in a plugin architecture). Beginning in .NET Core 3, Assembly Load Contexts (and the assemblies in them) can be unloaded. If an app is using app domains to for code isolation or to unload assemblies, consider re-working the application to use the AssemblyLoadContext type instead ().
One important difference between app domains and assembly load contexts is that unloading an app domain forced all code in the domain to stop, whereas unloading an Assembly Load Context is cooperative. The unload doesn’t happen until no threads have assemblies from the load context on their call stack and there are no live references to types from those assemblies. It’s important to make sure that the assemblies from the load context are no longer in use when attempting to unload.
Interop
If an app needs to interoperate with native components, most of the same technologies that worked on .NET Framework will work on .NET Core with minor tweaks. Platform invokes (p/invokes) are one of the easiest ways to call native functions from managed code and are the only interop technology supported cross-platform. Although Windows Forms and WPF apps will only run on Windows, libraries that may be used by other (potentially cross-platform) .NET Core apps should prefer p/invokes to communicate with native dependencies.
.NET Core apps that only target Windows can also make use of COM or C++/CLI for interop. The cl.exe compiler that ships with Visual Studio 2019 16.3 includes a new command-line option for compiling C++/CLI code for .NET Core: /clr:netcore. When linking C++/CLI binaries targeting .NET Core, it’s also necessary to include the .NET Core’s ijwhost.dll library in the linker’s libpath. Beginning with Visual Studio 2019 16.4, the ability to target .NET Core from C++/CLI projects will be supported in MSBuild and the Visual Studio IDE.
New Windows 10 APIs can be used with WinRT interop, as explained later in this article. The System.EnterpriseServices namespace is not supported on .NET Core.
Remoting
.NET Core doesn’t support remoting APIs, and usage of those APIs will need to be replaced with alternatives. Remoting has frequently been used for cross-app domain communication in the past, but because .NET Core apps only have a single, default app domain, these scenarios are no longer applicable. In other cases, remoting was used for inter-process communication (IPC). Simple IPC scenarios can be re-written using System.IO.Pipes or System.IO.MemoryMappedFiles APIs. More complex IPC interfaces or scenarios involving network communication can be handled by ASP.NET Core, socket-based communication (System.Net.Sockets), or gRPC ().
Although most remoting APIs are unavailable on .NET Core, there are a couple of specific APIs that are worth highlighting. One is System.Runtime.Remoting.Proxies.RealProxy. RealProxy is often used to create wrappers that handle cross-cutting concerns (logging, caching, etc.) for other types using aspect-oriented programming patterns. In these cases, the remoting capabilities of RealProxy aren’t needed, but the type is unavailable in .NET Core because of its remoting underpinnings. System.Reflection.DispatchProxy was added to .NET Core to fill this gap. If an app uses RealProxy to wrap objects and intercept calls to them, DispatchProxy can be used as a .NET Core-compatible replacement.
Finally, it’s worth mentioning the asynchronous programming model methods Delegate.BeginInvoke and Delegate.EndInvoke(IAsyncResult). The asynchronous programming model uses remoting in its implementation and, consequently isn’t supported on .NET Core. Calling BeginInvoke on a delegate in a .NET Core app results in a PlatformNotSupportedException. The more modern task-based asynchronous pattern (TAP) is recommended instead. If an app is using BeginInvoke, it can be updated to use tasks instead ().
Adding New Capabilities to Desktop Applications with Windows 10
In addition to all the value.NET Core brings to Windows desktop developers, it’s now easier than ever before to bring new features to applications with capabilities supported in Windows 10. Some of these new improvements include making it easier to deploy and update applications, add new UI, or access Windows 10 device and platform APIs.
MSIX Packaging
At Build 2018, Microsoft announced an update to its packaging and deployment technology for applications on Windows, MSIX. This new packaging and distribution system, based on a combination of .msi, .appx, App-V, and ClickOnce, brings a host of helpful features to build a more modern software distribution system for developers building Windows applications. Some of the features that make MSIX stand out include:
- Background application updates
- Delta package updates
- Declarative installation
- Forced updates
- Clean uninstalls
- Disk space optimization
- Streaming installs
- Device targeting
- Tamper protection
- Open sourced on GitHub ()
The most recent releases of Visual Studio make it simple to generate MSIX packages for .NET Core desktop applications. With a new project template called the Windows Application Packaging Project, you can easily configure package metadata using the package manifest designer and generate packages through the Publish > Create App Packages context menu. Where .NET Core and MSIX shine is with the deployment flexibility of .NET Core. With the Windows Application Packaging Project, MSIX, and .NET Core desktop applications, developers can create a self-contained application with no external dependencies. In other words, the .NET Core runtime is contained within the application package.
XAML Islands
In addition to streamlined deployment, desktop developers now have a way to leverage modern XAML capabilities in their existing Windows Forms and WPF applications without needing to rewrite their applications from scratch. Microsoft is bringing over a decade of UI XAML innovation to all developers on Windows via XAML Islands ().
XAML Islands instantiate an object at runtime derived from HwndHost to contain arbitrary WinUI XAML (previously known as UWP XAML). This technology can be used to host a specific, advanced control (such as the Windows 10 Maps control), or developers can replace entire forms or pages of UI with more complex compound controls. Although this technology is a great solution for .NET Core desktop developers, it’s really a tool to enable any developer on Windows to incrementally bring a modern UI to their Win32 applications.
A few examples of applications built from the ground up with XAML Islands are the new Windows Terminal () as well as PowerToys ().
The future of UI on Windows is the Windows UI Library, also known as WinUI (). Although XAML Islands is a great option for new applications today, as of this writing, it’s only supported on Windows 10 version 1903 and higher. WinUI aims to make this available to a larger audience of Windows developers by decoupling much of the UI platform from the Windows runtime and bringing support to earlier versions of Windows 10. In their public roadmap, WinUI 3.0 aims to bring support to the Creators Update of Windows 10, as well as limited support back to Windows 8.1. WinUI is also being developed on GitHub and priorities and features are directly impacted by community feedback (aka.ms/winui). You can see it in action in Figure 3.
WinRT API Access
In addition to modern distribution and UI, all .NET Windows developers can easily reference Windows 10 platform and device APIs through a NuGet package (). Adding features that take advantage of Bluetooth, GeoLocation, Cameras, and more are now just a NuGet package away. For a complete reference on the UWP namespaces available to developers, view the API browser at.
SetPoint Medical is an example of a company who leverages the best of .NET and Windows (). They wanted to bring an existing WPF application used in device manufacturing and testing forward without rewriting major portions of their application. Newer iterations of their hardware only supported Bluetooth to communicate with a PC or external device, and SetPoint was able to easily add built-in Windows Bluetooth capabilities to their existing WPF application to satisfy their requirements.
Continuously Release and Monitor Applications with the App Center
Earlier this year, App Center introduced support for WPF and Windows Forms applications, targeting both .NET Framework and .NET Core. Their aim is to help teams build better apps by bringing together services like distribution, analytics, and diagnostics all under one easy solution.
Manage Releases
One of the best ways to continuously improve an application is by getting an application into the hands of users as quickly as possible. Unfortunately, fragmented processes and tools can make managing releases timely and complicated.
App Center Distribute is a simple and easy to use a solution that allows developers to quickly release an application and manage which version your testers and end users receive. Developers can create different distribution groups and invite their users via email to easily manage your releases.
A developer can upload an application package (.msix, .msi, .msixupload, .msixbundle, .appx, .appxupload, .appxbundle, .zip) to App Center, select a distribution group, specify any release notes and users will receive an email with a link to download the app.
Monitor Application Analytics
With the App Center Analytics, developers can gather insights to better understand an application usage, growth, and trends. By simply integrating the App Center SDK, data will start flowing into the portal. Developers can also track custom events and attach properties to get a deeper understanding about the actions that users take in an application, as shown in Figure 4.
Diagnose Application Health
App Center’s Diagnostics SDK collects crash and error logs and displays them with analysis in the App Center portal. The issues are grouped and provide insights such as the number of occurrences and users, types of device affected, and events that occurred before the crash.
Getting Started with App Center
The App Center aims to empower you to do you best possible work by providing the tools, data, and insights that you need to focus on coding rather than managing processes or digging through different tools for insights.
You can get started with App Center by creating an account at.
Try .NET Core 3 and the New Desktop Features and Give Microsoft Your Feedback
Microsoft is encouraging developers to give their feedback and participate in the product development. You can send your questions to netcore3modernize@microsoft.com and submit bugs and feature requests on WinForms and WPF repositories.
Here are a few useful links:
- .NET Core installation:
- Latest updates and announcements for .NET Core:
- Porting to .NET Core guideline and video:
- WinForms repository:
- WPF repository: | https://www.codemag.com/Article/1911032/Upgrading-Windows-Desktop-Applications-with-.NET-Core-3 | CC-MAIN-2020-10 | refinedweb | 4,316 | 50.02 |
#include <cel_storage.h>
This class manages the files on the local storage.
This method opens a disk file. For AccessMode and CreationMode configuration, see AccessMode and CreationMode.
NULLif you set inThrowOnError to
falseand the function fails.
This method opens an anonymous temporary file with Read/Write access. It also supports auto deletion of the file on the close of file; you don't have to call
deleteFile call.
This method creates a DiskStorage instance based on the specified file handle.
For AccessMode and CreationMode configuration, see AccessMode and CreationMode.
This method opens a temporary file, which name is based on the input filename, with Read/Write access.
This method returns the OS File handle used internally in this instance.
Note that direct access to the handle may conflict with the operation on the DiskStorage instance and you had better use DiskStorage methods rather than the handle.
On Windows, you should firstly cast this value to HANDLE.
On UNIX OSs, you should firstly cast this value to int.
This method locks a region in an opened file.
This method blocks until it acquires the lock to the region.
You had better use DiskStorageLock method rather than directly use this method to ensure the call to unlockRegion method.
This method locks a region in an opened file.
This method fails unless it can acquire the lock to the region.
This method unlocks a region in an opened file. | https://www.cuminas.jp/sdk/classCelartem_1_1DiskStorage.html | CC-MAIN-2017-51 | refinedweb | 236 | 76.01 |
Created on 2017-11-15 12:53 by badouxn, last changed 2017-11-16 00:28 by yselivanov. This issue is now closed.
When using asyncio in combination with multiprocessing, a TypeError occur when readuntil() encounter an EOF instead of the delimiter.
readuntil return a IncompleteReadError exception which is pickled by the multiprocessing package.
The unpickling failed due to an argument being None. As noted in the following links, it fails:
The error trace is:
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib64/python3.6/multiprocessing/pool.py", line 463, in _handle_results
task = get()
File "/usr/lib64/python3.6/multiprocessing/connection.py", line 252, in recv
return _ForkingPickler.loads(r)
TypeError: __init__() missing 1 required positional argument: 'expected'
Fix proposed:
Make the "expected" parameter of the IncompleteReadError exception class optional.
This isn't so simple.
>>> from asyncio.streams import IncompleteReadError
>>> import pickle
>>> e1 = IncompleteReadError(b'abc', 10)
>>> e2 = pickle.loads(pickle.dumps(e1))
>>> print(e1)
3 bytes read on a total of 10 expected bytes
>>> print(e2)
44 bytes read on a total of None expected bytes
My first fix was indeed wrong.
Upon looking further into it, it seems to me that the problem come from the fact that the call to super is not done with the right argument.
Upon unpickling, the argument that will be passed to the __init__ is the string representation built on line 33-34.
That's why, when leaving expected as optional the number returned is 44, the length of the string.
I went looking for similar Exception class in the code base and found the MaybeEncodingError in multiprocessing/pool.py
By replacing the Error content with this one I don't have any error anymore. The message is kept identical.
'''
def __init__(self, partial, expected):
super().__init__(partial, expected)
self.partial = partial
self.expected = expected
def __str__(self):
return ("%d bytes read on a total of %r expected bytes" % (len(partial), expected))
'''
Does such a fix looks correct to you ?
Typo in the last comment. The code should be:
'''
def __init__(self, partial, expected):
super().__init__(partial, expected)
self.partial = partial
self.expected = expected
def __str__(self):
return ("%d bytes read on a total of %r expected bytes" % (len(self.partial), self.expected))
'''
> Does such a fix looks correct to you ?
No, this fix won't restore exception.args properly. I made a PR with a fix.
There is the same issue with LimitOverrunError.
I'm not sure that we should keep args the same. It affects __str__ and __repr__. badouxn overrides __str__. And the result of __repr__ currently looks like the exception constructor, but actually is not compatible with it.
>>> IncompleteReadError(b'abc', 10)
IncompleteReadError('3 bytes read on a total of 10 expected bytes',)
New changeset 43605e6bfa8d49612df4a38460d063d6ba781906 by Yury Selivanov in branch 'master':
bpo-32034: Make IncompleteReadError & LimitOverrunError pickleable #4409
New changeset f35076a002b958f991d180d6f945344cc5ab3900 by Yury Selivanov (Miss Islington (bot)) in branch '3.6':
bpo-32034: Make IncompleteReadError & LimitOverrunError pickleable GH-4409 (#4411) | https://bugs.python.org/issue32034 | CC-MAIN-2020-34 | refinedweb | 527 | 51.85 |
Home > Project Euler, python > Problem Euler #23
Problem Euler #23
novembre 14, 2012 Lascia un commento Go to comments.
python:
from math import sqrt import time ts = time.clock() def get_div(num): # 1 sec for n in xrange(1, int(sqrt(num)) + 1): if num % n == 0: yield n if num/n != num: yield num/n def get_sum(divisors): return sum([n for n in set(divisors)]) res = 0 abundant = set() for n in xrange(1, 20162): if get_sum(get_div(n)) > n: abundant.add(n) if not any((n - a in abundant) for a in abundant ): res += n print res print time.clock() - ts
Annunci
Categorie:Project Euler, python
Commenti (0) Trackbacks (0) Lascia un commento Trackback
Commenti recenti | https://bancaldo.wordpress.com/2012/11/14/problem-euler-23/ | CC-MAIN-2017-26 | refinedweb | 119 | 62.88 |
Passing Arrays In Jsp Methods
Passing Arrays In Jsp Methods
... will become
dynamic.
In this example of jsp for passing arrays in Jsp... arrays are most
commonly used arrays in java. JSP is a technology which enables us
PHP Coding Standards for Developers
set of coding standards that might be different from others. But the basic PHP
Coding Standards remains same for everyone. For example a Class name or Method...For every developer it is important to follow coding standards in order
JSP Simple Examples
JSP Simple Examples
Index 1.
Creating...
in a java. In jsp we can declare it inside the declaration directive... page.
Html tags in jsp
In this example
Java Coding Standards
Java Coding Standards
Coding conventions are the rules that a programmer should govern while
develop a program so that their source code can be read and maintain easily.
Coding
jsp coding
jsp coding what is the simple jsp code for bus ticket reservation system
passing parameters - JSP-Servlet
passing parameters hi
this is my jsp page
Reserved... No:
this is my java page for insertion
package CHB;
import
passing values - JSP-Servlet
passing values hi
this is my jsp page
Reserved By:
Conference Hall... No:
this is my java page for insertion
package CHB;
import... that the getter and setter methods are already defined in the Country class, write
java coding - JSP-Servlet
java coding how to send mail in LAN without internet using java progamme Hi Friend,
Please visit the following link:
Thanks
JSP
://
<jsp:useBean id="user.../jsp/simple-jsp-example/UseBean.shtml...how can we use beans in jsp how can we use beans in jsp
coding
coding I need the logout coding. can you please help me.
Please visit the following links:
JSP Simple Examples
;
Using
Protected Access in JSP
In java there are three types...;c:forEach> tag is a simple way to iterate
over arrays... is working exactly as for
loop works in a jsp or in java.
Date Coding - JSP-Servlet
Date Coding Hi Sir.
i am creating one web application in which date is compared with specific date.i.e,When current date is reached to particular given date then a particular action should happened.For example imagine
coding
coding how to write a code for searching a link in another jsp file?pl give the soln soon
JSP methods
JSP methods
... a
java code in the jsp page.
The code of the program is given below... declare a method and how we can used it. In this example we are making a
method
Arrays -- Examples
Java NotesArrays -- Examples
This applet shows a number of methods that use arrays. The source code for
the methods is also given below.
This applet will not display correctly unless your browser
supports Java 1.2.
Sort
Multiple Methods in Jsp
. In the jsp
we can declare methods just like as we declare methods in java classes...Multiple Methods in Jsp
... in the JSP
Scriptlets. In this example method addNum() returns sum of two numbers
jsp - JSP-Interview Questions
to embed Java code inside the JSP file. Mostly it contains the logic of the program...:
Thanks
passing value fron script to scriplet - JSP-Servlet
passing value fron script to scriplet how to pass value from Java... from the client (javaScript) to the server (java), you have to submit a form... to the loginPage.jsp page on the server.
The loginPage,jsp should something
need coding
need coding sir i need code for simple bank application in jsp please send it
sir i need the coding for simple bank application in jsp.
Please visit the following link:
Jsp Bank Application
Passing Parameter - JSP-Servlet
Passing Parameter I would like to ask how to pass a parameter from javascript section into the jsp section.It will be something like...;
answer<%; <---I'm stuck here passing the var
Introduction to the JSP Java Server Pages
source code.
Introduction to JSP
Java Server Pages or JSP... applications.
JSP
Tutorials - Introducing Java Server Pages Technology
JavaServer Pages (JSP) technology is the Java platform
passing the form values with image upload - JSP-Servlet
passing the form values with image upload Hii .
I want to get the solution for passing values with an image uploading form. I cant access... another text field to take the user input.
Form example:
1. Enter field one
Passing Parameters - JSP-Servlet
Passing Parameters Hi
I have to pass parameter like such scenario. Please help me on emergent bases. I will be grateful.
First Page... is
For more information on JSP visit to :
Passing Parameter - JSP-Servlet
Passing Parameter Hi, it'me again. Below is the set of code that I..., there's var answer. I need to pass this parameter back into the jsp part, how should i do it which means the String answer in jsp part will equal to the var answer
coding in jsp & servlet
coding in jsp & servlet plz... provide me coding of "online examination system" in jsp & servlet
Declare tag methods in jsp
Declare tag methods in jsp
JSP is a extended technology to the java servlet that
allows... methods : <%! void display() {
out.println("My JSP Page"
Passing java variables from JSP to Servlet - return null values
Passing java variables from JSP to Servlet - return null values I... the java code of my JSP.
In JSP page I did,
String msg="hello... to get java variables from JSP tp servlet?
If there is some error in my code
JSP
://
EL parser...Can you explain jsp page life cycle what is el how does el search
JSP
the following links:
Introduction to java arrays
Introduction to java arrays
...
of Arrays in Java Programming language. You will learn how the Array class... arrays. To meet this feature java
has provided an Array class which abstracts
JSP
the following link:... language , it is a simple language for accessing data, it makes it possible to easily access application data stored in JavaBeans components. The jsp expression
Methods - Example
Java NotesMethods - Example
Example
This example shows a simple method that computes the area of
a rectangle:
1. public static int computeArea... style.
The body of this simple function contains a declaration
Passing Parameters in jsp
Passing Parameters in jsp
...") %></b>
In the above example, the tag <jsp:forward> forwards... file. We are
passing the parameters using the tag <jsp:param> which contain
jsp function - JSP-Servlet
an Example
We can write functions or methods into JSP using the Declaratives tags... tags:
a simple example of JSP Functions
Method in JSP
See the given simple button Example to submit
passing data between the jsp pages ?
passing data between the jsp pages ? i developed a project... the roll number and when we press submit button on that page it moves a jsp page .on that jsp page it retrieve marks regarding the particular roll number
Passing parameters in JSP using forward.
Passing parameters in JSP using forward. If a page is forwarded to another page using jsp:forward, is it necessary that the page should be already............
Pass Parameters using jsp:forward
JSP
objects in jsp
Implicit objects in jsp are the objects... as the implicit objects. Implicit objects are used for different purposes. Our own methods (user defined methods) can't access them as they are local to the service method
JSP
the following link:
..., visit the following link: what are different implicit objects of jsp
mplicit
Passing Parameter with <jsp: include>
Passing Parameter with <jsp: include>
In this example we are going to use <jsp:include>... a
file in a jsp page. While using <jsp:param> we are adding
JSP Tutorial
.
In a JSP page a web developer can write HTML code along with the Java Code. Java... developers can insert java code directly into jsp file, due to
which the web... declaration tag fields and methods is to be declared.
JSP directives
JSP supports
Cookie methods in jsp
Cookie methods in jsp Define cookie methods in jsp ?
Cookie methods :
clone()
getComment()
getDomain()
getMaxAge()
getName()
getPath()
getSecure()
getValue()
getSecure()
getVersion
String Arrays Java
String Arrays Java
String array cannot hold numbers or vice- versa. Jsp
arrays can only store the type of data specified at the time of declaring
arrays - Java Beginners
instead of public
3. It should have set and get methods for the name properties.... It is generally considerered a risky practice to create get and set methods for an array... contents). Instead, we can control the array through properties and methods - JSP-Interview Questions
://
Thanks... are the comments in JSP(java server pages)and how many types and what are they.Thanks inadvance. Hi friend,
JSP Syntax
XML Syntax
Arrays
Java NotesArrays
Java arrays are similar to ideas in mathematics
An array... the size. For example,
// Java 1.0 style -- shorter, but can be used ONLY... arrays
Java 2 added anonymous arrays, which allow you to
create a new array->???**
}%>
Methods in Jsp - Development process
Methods in Jsp
Hi, My interviewer said we should declare & define all methods inside _jspService() method only. is it correct . Thanks Prakash Hi Friend,
Yes, all the methods should be declared and defined
how to write the coding for converting the database data for example population into any type of graph using jsp and servlets?//
jsp and servlets pls help me out how to write the coding for converting the database data for example population into any type of graph using jsp and servlet...coding for converting the database data how to write the coding
urgent - JSP-Servlet
Simple Jsp and Java Example Simple Jsp and Java Example
Comparing Arrays
Comparing Arrays : Java Util
This section show you how to determine the given arrays
are same or not. The given program illustrates you how to compare arrays
according
Example to
Store and Show only 10 values |
Disabling
Session in JSP... java script in jsp
| Create and use Custom error page in JSP
|
Custom Iterator...
and HTML tags |
Declare tag
methods in jsp |
Embed flash file in jsp
Java bean example in JSP
Java bean example in JSP
... that help in understanding
Java bean example in JSP.This code illustrates... of Java bean.
Understand with Example
In this example we want to describe you
passing values form javascript - JSP-Interview Questions
passing values form javascript please i want to pass values from javascript function to jsp code how can i do
Page object - JSP-Servlet
for more information.... that are automatically available in JSP. Implicit Objects are Java objects that the JSP... of PAGE object of implicit JSP object. If this is possible explain me about
Coding for forgot password
example which will be helpful for you to create required code in jsp...Coding for forgot password coding for forgot password
Please go through the following links:
Parameter passing from jsp page to jsp page - JSP-Servlet
Parameter passing from jsp page to jsp page Hi
I intends to pass... :
For more information on JSP visit to :
Thanks
passing values between jsp file through hyperlink in div tag
passing values between jsp file through hyperlink in div tag <...;%@ page language="java"%>
<%@ page</script>
<jsp
Arrays
Arrays Hi I need help with the following exercises.
Exercise 1: Write a Java application in which the user is prompted for the total number... of all the values as well.
Exercise 2:
Write a Java application in which you
Passing Parameters using <jsp: param>
;
In this example we are passing a parameters to a file
by using <jsp...Passing Parameters using <jsp: param>
... tag. The tag which is enclosing this tag in this example is
<jsp
JSP - JSP-Servlet
Java
Kit
HTML Tutorials
JSP Tutorials
Java Coding
JavaScript...JSP Hi! Everybody....
Is there any way to create menus in JSP
linking jsp with database using classes and methods and then access them all in to my jsp page - JSP-Servlet
linking jsp with database using classes and methods and then access them all... and methods so that i can use the reusability character of java. just... all with the help of java beans in u'r own jsp page
Passing values in ComboBox from XML file
Reference passing in java
Reference passing in java plz tell me wat d meaning of refernce in java?
for example :
Class M(){
N n;
}
Class N(){
}
wats dis meaning
Passing Parameter Values to another jsp in Query Strings
Passing Parameter Values to another jsp in Query Strings HI ALL,
I m trying to pass a variable value to another JSP using query string...
response.sendRedirect("'"+loginid
Using Beans in JSP. A brief introduction to JSP and Java Beans.
is. For
example if the JSP page uses an jsp:forward tag... by
following a few simple rules regarding method names. The Java BEAN... are the
signature methods being used in a bean. For passing parameters to a
bean
jsp usebean
; Please visit the following links: usebean i want post nt sample code but it get design wht can i
Arrays -- Multi-dimensional
Java NotesArrays -- Multi-dimensional
All arrays in Java are really linear... this.
These examples all use two-dimensional arrays,
but the same syntax and coding can...] |
| | +-----+-----+-----+-----+
+-----+
In Java two-dimensional arrays are implemented is a one-dimensional array
Introduction to java arrays
Introduction to java arrays
....
Structure of Arrays
Now lets study the structure of Arrays in java. Array... of elements to be allocated.
Lets see a simple example of an array
Introduction to Java Arrays
Introduction to Java Arrays
....
Structure of Arrays
Now lets study the structure of Arrays in java. Array... of elements to be allocated.
Lets see a simple example of an array
a numeric value nd search it plzz...
hi nick,
I hope this
coding for project
coding for project hai
how to write jsp coding for project smart accessories ......
that s to navigate to another page when you click on a tag
Passing Arguments. - Java Beginners
Passing Arguments. Hi, im new in doing this passing arguments and calling methods. Can you please see that y im not getting the answer as the question says to do.
Thanks
Question:Write a method that is passed two arguments
Hibernate JSP
In this section, you will learn about Hibernate with JSP using simple pagination example
JSP Interview : JSP Interview Questions -2
?
Answer: JavaServer Pages (JSP) technology is the Java platform... by JSP
translation?
Answer: JSP translators generate standard Java code for a JSP...
JSP Interview : JSP Interview Questions -2
Simple problem Very Urgent - JSP-Servlet
Simple problem Very Urgent Respected SDir/Madam,
I am R.ragavendran.. Thanks for your superb reply. I got the coding. But I find a simple.....
Here's the coding..
FINDEMPLOYEE.JSP:
EMPLOYEE DETAILS | http://www.roseindia.net/tutorialhelp/comment/58334 | CC-MAIN-2014-10 | refinedweb | 2,438 | 56.66 |
I'm not sure how to complete this program. I know I have to use max(), min() and pm_random_numbers() to show 7 spaces as a decimal integer. But I don't know how to show 7 random numbers on each line between 1-99 and the number of random numbers (count=6), max and min numbers.HELP!
here's what I have so far:
#include <sdio.h>
#include <stdlib.h>
int max (int a, int b);
int min (int a, int b);
void pm_random_numbers (int k);
int main (void)
{
int n;
printf ("Some random numbers will be printed.\n");
printf("How many would you like to see?";
scanf("%d", &n);
pm_random_numbers (n);
return 0;
} | http://cboard.cprogramming.com/c-programming/35091-need-c-help-please-d.html | CC-MAIN-2014-35 | refinedweb | 114 | 83.76 |
This repository started as a proof of concept that the Elm Language could be an excellent candidate as a Stellar SDK with its strong static types and excellent support for Http and Websockets.
This Repository used to host 2 things:
The Demo SPA has now been extracted to it's own package, leaving only the SDK in this repository.
The live Demo is hosted on GitHub Pages and can be found here.
To add the SDK to your existing Elm project, run
elm package install ryan-senn/stellar-elm-sdk.
The Package follows Stellar's philosophy as close as possible. The Package is split in Endpoints (to build and send requests) and Resources (responses from the Server).
The Endpoints have mandatory fields and optional fields. The mandatory fields have to be supplied to build a RequestBuilder instance. The optional fields can then be piped into the RequestBuilder, following a similar approach to Luke's excellent http-builder package or the highly successful elm-decode-pipeline package by the folks at NoRedInk.
If you wanted to query offers for an account for example, you would start by providing the mandatory fields to the requestBuilder function:
import Stellar.Endpoints.OffersForAccount as OffersForAccount requestBuilder = OffersForAccount.requestBuilder endpoint publicKey
This on itself is a valid RequestBuilder, which can be turned into a Command (Side Effect) using the send function:
cmd = OffersForAccount.requestBuilder endpoint publicKey |> OffersForAccount.send
However, you can also add any number of optional fields before turning the RequestBuilder into a Cmd:
cmd = OffersForAccount.requestBuilder endpoint publicKey |> OffersForAccount.setCursor cursor |> OffersForAccount.setLimit limit |> OffersForAccount.send
Now that the SDK is its own stand alone package hosted on the official elm () package library, I want to focus on stellar (!) documentation.
I also want to split Resource Modules in Public (exposed) and Private (internal), as there is very little reason to expose decoders, the Type Alias is enough (the Endpoint Modules use the decoders internally).
The future plans for the Demo SPA can be foud here. | https://package.frelm.org/repo/1491/1.0.2 | CC-MAIN-2020-16 | refinedweb | 331 | 55.64 |
Using SQLAlchemy with Flask to Connect to PostgreSQL
Connecting to PostgreSQL from a Flask app, and defining models.
Modern webapps are meant to be stateless. They don’t have something which needs to be remembered - a state. This is the reason why horizontal scaling, spinning up multiple instances of your app, is possible without breaking everything. The data is saved in another service, which is made to be really good at handling it and making it accessible - a database.
Let’s connect our Flask app from the previous article to the PostgreSQL database which we are able to launch in a Docker container, and start doing useful stuff instead of just emitting “Hello World”.
Our starting point is the Flask app here. Boring, right? That’s about to change.
Installing Modules
We will need a few additional Python modules in our project to talk to the PostgreSQL database. Namely the following:
flask-sqlalchemy psycopg2
If you’re on Ubuntu, you will need a few more libraries to install those with pip. They are called psycopg2, libpq-dev and python-dev.
$ sudo apt-get install psycopg2 libpq-dev python-dev
Once those are in place, we can install the Python modules with pip in the following way:
pip install flask-sqlalchemy psycopg2
Using a virtualenv is a good idea, so your development machine is not littered with all kinds of development dependencies for different projects. Also, you will not break one project by upgrading another.
Usually, you save the dependencies of a project in a requirements.txt file, so it’s easy to get it to run on a new machine eventually. The currently installed packages can be written to a file without much effort:
$ pip freeze --local > requirements.txt
That one’s for future-you to save time and be less angry :)
If you look into the file, you’ll see that not only the package names but the precise versions are saved. And not only of the packages you installed implicitly, but also dependencies. Neat! Completely reproducible from now on.
Environment Variables
Secrets are everywhere. Or at least you need to tell your app what database to connect to, and what the credentials are. Those can be hardcoded, which is considered to be in poor taste. Imagine you want to develop your app locally, and use your trusty development database with user test and password test. What happens if you want to deploy the app to a production server? You’ll want to have a proper username and a password which is an actual password. You’d need to have two different versions of the code, and that’d be messy as hell.
Luckily, you can always access “environment variables” from within programs. You just look up a value you need will be available, and use it. This way, your app does not really change nor care where it’s running. The environment tells it what it needs to know.
In Ubuntu, you can set those variables using bash. For the development environment, I usually just add them to the bin/activate of the virtualenv, which is a bash script. Just append lines like the following one to it:
export VARIABLE_NAME=value
The export means that the variable is avilable to programs being started afterwards and isn’t just available in the current bash session only.
Here are the values those variables need to have, in case you are using a Docker-based setup as described in the last post:
export POSTGRES_URL="127.0.0.1:5432" export POSTGRES_USER="postgres" export POSTGRES_PW="dbpw" export POSTGRES_DB="test"
In the simplest case, we want our app to check if they’re there. If not, we could rely on default values or complain. I like to choose the crash and burn approach, as that makes it very easy to notice if the environment is not configured correctly and fix it.
The function which is used to get the value of an environment var, and STOP EVERYTHING otherwise looks like this:
def get_env_variable(name): try: return os.environ[name] except KeyError: message = "Expected environment variable '{}' not set.".format(name) raise Exception(message) # the values of those depend on your setup POSTGRES_URL = get_env_variable("POSTGRES_URL") POSTGRES_USER = get_env_variable("POSTGRES_USER") POSTGRES_PW = get_env_variable("POSTGRES_PW") POSTGRES_DB = get_env_variable("POSTGRES_DB")
We use it to get all the vars we will need to access PostgreSQL.
Adding SQLAlchemy Superpowers
The module we’ll use to deal with data in databases is called SQLAlchemy. With it, we can define classes with data fields which we need, and get lists of those objects with queries. SQLAlchemy takes care of doing the database-busywork if you don’t feel like diving into it. It make it possible to create the right tables, get the data you need and also takes care of many more technical details.
To use it with Flask, there’s an extension to make them play together nicely. We need to import it at the top of the file.
from flask_sqlalchemy import SQLAlchemy
Now we need to tell it what to do. For this, we will use the variables from the environment and their values. We’re setting Flask configs which the extension will in turn use to configure SQLAlchemy correctly. The SQLALCHEMY_DATABASE_URI expects a very particularly formatted string, which you can see below.
We tell it what database and communication-library to use, the username, password, url and even database to connect to.
In the end we create a db variable, which points to the SQLAlchemy Extension object.
DB_URL = 'postgresql+psycopg2://{user}:{pw}@{url}/{db}'.format(user=POSTGRES_USER,pw=POSTGRES_PW,url=POSTGRES_URL,db=POSTGRES_DB) app.config['SQLALCHEMY_DATABASE_URI'] = DB_URL app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False # silence the deprecation warning db = SQLAlchemy(app)
Defining the First Model
The app will need to make logging-in with Spotify possible. That means we need to save the data somewhere. For this, we’ll define a User model with all required fields.
class User(db.Model): id = db.Column(db.Integer, primary_key=True) spotify_id = db.Column(db.String(200), unique=False, nullable=True) spotify_token = db.Column(db.String(200), unique=False, nullable=True)
It contains columns with types, specifying flags which make sense to make it possible for the database to create the right corresponding columns. The model will be used to access a database table. SQLAlchemy takes care of the necessary boilerplate by itself.
Management Commands
We hooked the new app with a way to talk to a database, which is also an abstraction layer. Now we need a way to make it create tables (as they are not there without us telling it to). This will be useful for local development, but also to bring the app online in production later on.
None of the data right now is non-disposable. That’s why we don’t really care about it being deleted completely every once in a while. This means we don’t care about backing the database up for now, nor do we care about migrations. The the users would not really notice a db-wipe, they’d just need to login with Spotify again, which happens if the token expires anyways (this happens kinda often).
Here’s how you define a management command in Flask. We Just need one single command to completely reset the PostgreSQL database. Delete (drop) everything if it’s there and create tables according to our models.
@app.cli.command('resetdb') def resetdb_command(): """Destroys and creates the database + tables.""" from sqlalchemy_utils import database_exists, create_database, drop_database if database_exists(DB_URL): print('Deleting database.') drop_database(DB_URL) if not database_exists(DB_URL): print('Creating database.') create_database(DB_URL) print('Creating tables.') db.create_all() print('Shiny!')
When in the virtualenv, we can use our new db superpowers for the first time:
SK_APP=baa/main.py flask resetdb
Shiny! Make sure that the database is running and available :)
Conclusion
Here’s a commit state which contains all the database goodness we discussed in this post, and a bit more.
The database is set and usable, we can check this by executing the management command. The app structure is kept simple - no blueprints and similar for now. We might add those if we need them eventually. Given, that it makes sense for the app or our own sanity.
But the app is STILL no more interesting than before from a user perspective - we can’t access the Spotify Web API without having user tokens. It doesn’t do much really, if you don’t know about the database connection happening. We’ll need to make it possible for users to log in. That’s up in the next article. Stay tuned! | https://vsupalov.com/flask-sqlalchemy-postgres/ | CC-MAIN-2017-39 | refinedweb | 1,432 | 64.61 |
C++ exceptions under the hood appendix III: RTTI and exceptions orthogonalityPosted: July 25, 2013 Filed under: Exceptions Leave a comment
Exception handling on C++ requires a lot of reflexion. I don’t mean the programmer should be reflecting on exception handling (though that’s probably not a bad idea), I mean that a piece of C++ code should be able to understand things about itself. This looks a lot like run-time type information, RTTI. Are they the same? If they are, does exception handling work without RTTI?
We might be able to get a clue about the difference between RTTI and exception handling by using -fno-rtti on gcc when compiling our ABI project. Let’s use the throw.cpp file:
g++ -fno-rtti -S throw.cpp -o throw.nortti.s g++ -S throw.cpp -o throw.s diff throw.s throw.nortti.s
If you try that yourself you should see there’s no difference between the RTTI and the No-RTTI version. Can we conclude then that gcc’s exception handling is done with a mechanism different to RTTI? Not yet, let’s see what happens if we try to use RTTI ourselves:
void raise() { Exception ex; typeid(ex); throw Exception(); }
If you try and compile that, gcc will complain: you can’t use typeid with -fno-rtti specified. Which makes sense. Let’s see what typeid does with a simple test:
#include <typeinfo> class Bar {}; const std::type_info& foo() { Bar bar; return typeid(bar); }
If we compile this with “g++ -O0 -S”, you will see foo compiled into something like this:
_Z3foov: .LFB19: # Prologue stuff... subl $16, %esp # Bar bar movl $_ZTI3Bar, %eax # typeid(bar) leave #
Does that look familiar? If it doesn’t, then try changing the sample code to this one:
class Bar {}; void foo() { throw Bar(); }
Compile it like “g++ -O0 -fno-rtti -S test.cpp” and see the resulting file. You should see something like this now:
_Z3foov: # Prologue stuff... # Initialize exception subl $24, %esp movl $1, (%esp) call __cxa_allocate_exception movl $0, 8(%esp) # Specify Bar as exception thrown movl $_ZTI3Bar, 4(%esp) movl %eax, (%esp) # Handle exception call __cxa_throw #
That should indeed look familiar: the class being thrown is exactly the same as the class that was used for typeid!
We can now conclude what’s going on: the implementation for exception throwing type information, which needs reflexion and relies on RTTI info for it, is exactly the same as the underlying implementation for typeid and other RTTI friends. Specifying -fno-rtti on g++ only disables the “frontend” functions for RTTI: that means you won’t be able to use typeid, and no RTTI classes will be generated… unless an exception is thrown, in which case the needed RTTI classes will be generated regardless of -fno-rtti being present (you still won’t be able to access the RTTI information of this class via typeid, though).
C++ exceptions under the hood appendix II: metaclasses and RTTI on C++Posted: June 13, 2013 Filed under: Exceptions Leave a comment
A long time ago, when we where just starting to write our mini ABI to handle exceptions without libstdc++’s help, we had to add an empty class to appease the linker:
namespace __cxxabiv1 { struct __class_type_info { virtual void foo() {} } ti; }
I mentioned this class is used to check whether a catch can handle a subtype of the exception thrown, but what does that exactly mean? Let’s change a bit our throwing functions to see what happens when we start dealing with inheritance. You may want to check the source code for these examples.
struct Derived_Exception : public Exception {}; void raise() { throw Derived_Exception(); } void catchit() { try { raise(); } catch(Exception&) { printf("Caught an Exception!\n"); } catch(Derived_Exception&) { printf("Caught a Derived_Exception!\n"); } printf("catchit handled the exception\n"); }
What should happen in this example is crystal clear: it should print “Caught an Exception”, because that catch block should be able to handle both types, Exception and Derived_Exception. Not only that, if we compile throw.cpp we’ll get a warning to let us know that the second catch is dead code:
throw.cpp: In function -F¡void catchit()¢: throw.cpp:15:7: warning: exception of type ¡Derived_Exception¢ will be caught [enabled by default] throw.cpp:13:7: warning: by earlier handler for ¡Exception¢ [enabled by default]
Luckily a warning won’t stop compilation; we can continue and try to link the resulting .o; we’ll find a linker error:
throw.o:(.rodata._ZTI17Derived_Exception[typeinfo for Derived_Exception]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
And again we start seeing __type_info errors. If we create a fake __si_class_type_info to workaround this problem we we’ll finally see our ABI breaks down when dealing with inheritance, in a rather funny way: the compiler will warn us about dead code and then we see that same code being executed by our ABI!
g++ -c -o throw.o -O0 -ggdb throw.cpp throw.cpp: In function ¡void catchit()¢: throw.cpp:15:7: warning: exception of type ¡Derived_Exception¢ will be caught [enabled by default] throw.cpp:13:7: warning: by earlier handler for ¡Exception¢ [enabled by default] gcc main.o throw.o mycppabi.o -O0 -ggdb -o app ./app begin FTW Caught a Derived_Exception! end FTW catchit handled the exception
Clearly there’s something wrong with our ABI, and it’s very easy to trace this problem back to the definition of “can_handle”, the part of the code that checks whether an exception can by caught by a catch block:
bool can_handle(const std::type_info *thrown_exception, const std::type_info *catch_type) { // If the catch has no type specifier we're dealing with a catch(...) // and we can handle this exception regardless of what it is if (not catch_type) return true; // Naive type comparisson: only check if the type name is the same // This won't work with any kind of inheritance if (thrown_exception->name() == catch_type->name()) return true; // If types don't match just don't handle the exception return false; }
Our ABI gets the std::type_info for the exception being thrown and for the type which can be handled, and then compares if the names for these types is the same. This is fine as long as no inheritance is involved, but in the example above we already found a case where an exception should be handled even though a name is not shared.
The same problem will arise when trying to catch a pointer to an exception: the names won’t match. Even more interesting, if you try and link throw.cpp but change the catch to receive a pointer instead, you’ll get a new linker error. If you fix it you should end up with something like this:
namespace __cxxabiv1 { struct __class_type_info { virtual void foo() {} } ti; struct __si_class_type_info { virtual void foo() {} } si; struct __pointer_type_info { virtual void foo() {} } ptr; }
A very interesting pattern is starting to emerge: there is a different *_type_info for each possible catch type used. In fact the compiler will generate a different structure for each throw style. For example, for these throws:
throw new Exception; throw Exception;
the compiler would generate something like:
__cxa_throw(_Struct_Type_Info__Ptr__Exception); __cxa_throw(_Struct_Type_Info__Class__Exception);
In fact, even for this simple example, the inheritance web (not tree, web) is quite complex (note that I’m kind of inventing the mangling here, it’s not what gcc uses):
All these classes are generated by the compiler to specify precisely which type is being thrown, and how. For example, if an exception of type “Ptr__Type_Info__Derived_Exception” is thrown then a catch can handle it if:
And this list is still missing lots of possibilities, but for the full list is better to check a real C++ ABI. LLVM has very clear and easy to understand ABI, you can check these details in the file “private_typeinfo.cpp”. If you check LLVM’s implementation of run time type information, you’ll soon realize why we didn’t implement this on our ABI: the amount of rules to determine whether two types are the same or not is incredibly complex.
C++.
C++ exceptions under the hood 21: a summary and some final thoughtsPosted: June 4, 2013 Filed under: Exceptions Leave a comment
After writing twenty some articles about C++ low level exception handling, it’s time for a recap and some final thoughts. What did we learn, how is an exception thrown and how is it caught?
Leaving aside the ugly details of reading the .gcc_except_table, which were probably the biggest part of these articles, we could summarize the whole process like this:
- The C++ compiler actually does rather little to handle an exception, most of the magic actually happens in libstdc++.
- There are a few things the compiler does, though. Namely:
- It creates the CFI information to unwind the stack.
- It creates something called .gcc_except_table with information about landing pads (try/catch blocks). Kind of like reflexion info.
- When we write a throw statement, the compiler will translate it into a pair of calls into libstdc++ functions that allocate the exception and then start the stack unwinding process by calling libstdc.
- When an exception is thrown at runtime __cxa_throw will be called, which will delegate the stack unwinding to libstdc.
- .gcc_except_table.
Having learned how exceptions work we are now in a position to better answer why it’s hard to write exception safe code.
Exceptions, while conceptually clean, are pretty much “spooky action at a distance”. Throwing and catching an exception involves a certain degree of reflexion (in the sense that a program must analyze itself) which is not common for C++ applications.
Even if we talk about higher level languages, throwing an exception means we cannot rely on our understanding of how a normal program execution flow should work anymore: we are used to a pretty much linear execution flow with some conditional operators branching or calling other functions. With an exception, this no longer holds true: an entity which is not the code of our application is in control of the execution, and it goes around the program executing certain blocks of code here and there without following any of the normal rules. The instruction pointer gets changed by each landing pad, the stack is unwinded in ways we can’t control and, ultimately, a lot of magic happens under the hood.
To summarize it even more: exceptions are hard simply because they break the natural flow of a program as we understand it. This does not mean they are intrinsically bad as properly used exceptions can surely lead to cleaner code, but they should always be used with care.
C++ exceptions under the hood 20: running destructors while unwindingPosted: May 28, 2013 Filed under: Exceptions Leave a comment
The mini ABI version 11 we have written last time was able to handle pretty much all the basics to handle an exception: we have an (almost working) ABI capable of throwing and catching exceptions, but it is still unable to properly run destructors. That’s quite important if we want to write exception safe code. With what we know about .gcc_except_table running destructors is a piece of cake, we only need to see a bit of assembly:
# .byte 0 # Action 2 .byte 0x1 .byte 0x7d .align 4 .long _ZTI14Fake_Exception .LLSDATT2: # Types table start
On a regular landing pad, when an action has a type index greater than 0 it means we’re seeing an index to a type tables, and we can use that to know which types the catch can handle; for a type index with a value of 0 it means we are instead seeing a cleanup block and we should run it anyway. Although the landing pad can’t handle the exception it will still be able to perform the cleanup that’s supposed to happen while unwinding. Of course the landing pad will call _Unwind_Resume when the cleanup is done and that will continue the regular stack unwinding process.
I’ve uploaded this latest and last version to my github repo, but there are some bad news: remember how we cheated by saying that a uleb128 == char? As soon as we start adding blocks to run destructors the .gcc_except_table starts to get quite big (where “big” means we have offsets over 127 bytes long) and that assumption no longer holds.
For the next version of this ABI we would have to rewrite our LSDA reading functions to read proper uleb128 code. Not a major change, but at this point we wouldn’t gain much, we have already achieved our goal: a working minimal ABI capable of handling exceptions without the help of libcxxabi.
There are parts we haven’t covered, like handling non-native exceptions, catching derived types or interoperability between compilers and linkers. Maybe some other time, in this rather long series of articles we already learned quite a bit about low level exception handling in C++.
C++ exceptions under the hood 19: getting the right catch in a landing padPosted: May 23, 2013 Filed under: Exceptions Leave a comment
19th entry about C++ exception handling: we have written a personality function that can so far, by reading the LSDA, choose the right landing pad on the right stack frame to handle a thrown exception, but it was having some difficulties finding the right catch inside a landing pad. To finally get a decently working personality function we’ll need to check all the types an exception can handle by going through all the actions table in the .gcc_except_table.
Remember the action table? Let’s check it again but this time for a try with multiple catch blocks.
#x2 .byte 0 # Action 2 .byte 0x1 .byte 0x7d .align 4 .long _ZTI9Exception .long _ZTI14Fake_Exception .LLSDATT2: # Types table start
If we intend to read the exceptions supported by the landing pad 1 in the example above (that LSDA is for the catchit function, by the way) we need to do something like this:
- Get the action offset from the call site table, 2: remember you’ll actually read the offset plus 1, so 0 means no action.
- Go to action offset 2, get type index 1. The types table is indexed in reverse order (ie we have a pointer to its end and we need to access each element by using -1 * index).
- Go to types_table[-1]; you’ll get a pointer to the type_info for Fake_Exception
- Fake_Exception is not the current exception being thrown; get the next action offset for our current action (0x7d)
- Reading 0x7d in uleb128 will actually yield -3; from the position where we read the offset move back 3 bytes to find the next action
- Read type index 2
- Get the type_info for Exception this time; it matches the current exception being thrown, so we can install the landing pad!
It sounds complicated because there’s, again, a lot of indirection for each step but you can check the full sourcecode for this project in my github repo.
In the link above you will also see a bonus: a change to the personality function to correctly detect and use catch(…) blocks. That’s an easy change once the personality functions knows how to read the types table: a type with a null pointer (ie a position in the table that instead of a valid pointer to an std::type_info holds null) represents a catch all block. This has an interesting side effect: a catch(T) will be able to handle only native (ie coming from C++) exceptions, whereas a catch(…) would catch also exceptions not thrown from within C++.
We finally know how exceptions are thrown, how the stack is unwinded, how a personality function selects the correct stack frame to handle an exception and how the right catch inside a landing pad is selected, but we still have on more problem to solve: running destructors. We’ll change our personality function to support RAII objects next time.
C++ exceptions under the hood 18: getting the right stack framePosted: May 16, 2013 Filed under: Exceptions Leave a comment
Our latest personality function knows whether it can handle an exception or not (assuming there is only one catch statement per try block and assuming no inheritance is used) but to make this knowledge useful, we have first to check if the exception we can handle matches the exception being thrown. Let’s try to do this.
Of course, we need first to know the exception type. To do this we need to save the exception type when __cxa_throw is called (this is the chance the ABI gives us to set all our custom data):
Note: You can download the full sourcecode for this project in my github repo.
void __cxa_throw(void* thrown_exception, std::type_info *tinfo, void (*dest)(void*)) { __cxa_exception *header = ((__cxa_exception *) thrown_exception - 1); // We need to save the type info in the exception header _Unwind_ will // receive, otherwise we won't be able to know it when unwinding header->exceptionType = tinfo; _Unwind_RaiseException(&header->unwindHeader); }
And now we can read the exception type in our personality function and easily check if the exception types match (the exception names are C++ strings, so doing a == is enough to check this:
// Get the type of the exception we can handle const void* catch_type_info = lsda.types_table_start[ -1 * type_index ]; const std::type_info *catch_ti = (const std::type_info *) catch_type_info; // Get the type of the original exception being thrown __cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1; std::type_info *org_ex_type = exception_header->exceptionType; printf("%s thrown, catch handles %s\n", org_ex_type->name(), catch_ti->name()); // Check if the exception being thrown is of the same type // than the exception we can handle if (org_ex_type->name() != catch_ti->name()) continue;
Check here for the full source with the new changes.
Of course there would be a problem if we add that (can you see it?). If the exception is thrown in two phases and we said in the first one we would handle it, then we can’t say on the second one we don’t want it anymore. I don’t know if _Unwind_ handles this case according to any documentation but this is most likely calling upon undefined behavior, so just saying we’ll handle everything is no longer enough.
Since we gave our personality function the ability to know if the landing pad can handle the exception being thrown we have been lying to _Unwind_ about which exceptions we can handle; even though we said we handle all of them on our ABI 9, the truth is that we didn’t know whether we would be able to handle it. That’s easy to change, we can do something like this:
_Unwind_Reason_Code __gxx_personality_v0 (...) { printf("Personality function, searching for handler\n"); // ... foreach (call site entry in lsda) { if (call site entry.not_good()) continue; // We found a landing pad for this exception; resume execution // If we are on search phase, tell _Unwind_ we can handle this one if (actions & _UA_SEARCH_PHASE) return _URC_HANDLER_FOUND; // If we are not on search phase then we are on _UA_CLEANUP_PHASE /* set everything so the landing pad can run */ return _URC_INSTALL_CONTEXT; } return _URC_CONTINUE_UNWIND; }
As usual, check the full sourcecode for this project in my github repo.
So, what would we get if we run the personality function with this change? Fail, that’s what we’d get! Remember our throwing functions? This one should catch our exception:
void catchit() { try { try_but_dont_catch(); } catch(Fake_Exception&) { printf("Caught a Fake_Exception!\n"); } catch(Exception&) { printf("Caught an Exception!\n"); } printf("catchit handled the exception\n"); }
Unfortunately, our personality function only checks for the first type the landing pad can handle. If we delete the Fake_Exception catch block and try it again, though, we’d get a different story: finally, success! Our personality function can now select the correct catch in the correct frame, provided there’s no try block with multiple catches.
Next time we’ll be further improving this.
C++ exceptions under the hood 17: reflecting on an exception type and reading .gcc_except_tablePosted: May 14, 2013 Filed under: Exceptions Leave a comment
By now we know that when an exception is thrown we can get a lot of reflexion information by reading the local data storage area AKA .gcc_except_table; reading this table we have been able to implement a personality function capable of deciding which landing pad to run when an exception is thrown. We also know how to read the action table part of the LSDA, so we should be able to modify our personality function to pick the correct catch statement inside a landing pad with multiple catches.
We left our ABI implementation last time, and dedicated some time to analyze the assembly for .gcc_except_table to discover how can we find the types a catch can handle. We found that indeed there is a part of this table that holds a list of types where this information can be found. Let’s try to read it on the cleanup phase, but first let’s remember the definition for our LSDA header:
struct LSDA_Header { uint8_t start_encoding; uint8_t type_encoding; // This is the offset, from the end of the header, to the types table uint8_t type_table_offset; };
That last field is new (for us): it’s giving us an offset into table of types. Let’s also remember the definition of each call site:
struct LSDA_CS { // Offset into function from which we could handle a throw uint8_t start; // Length of the block that might throw uint8_t len; // Landing pad uint8_t lp; // Offset into action table + 1 (0 means no action) uint8_t action; };
Check that last field, “action”. That gives us an offset into the action table. That means we can find the action for a specific CS. The trick here is that for landing pads where a catch exists, the action will hold an offset for the types table; we can then use the offset into the types table pointer, which we can get from the header. Quite a mouthful: let’s better talk code:
// Pointer to the beginning of the raw LSDA LSDA_ptr lsda = (uint8_t*)_Unwind_GetLanguageSpecificData(context); // Read LSDA headerfor the LSDA LSDA_Header header(&lsda); const LSDA_ptr types_table_start = lsda + header.type_table_offset; // Read the LSDA CS header LSDA_CS_Header cs_header(&lsda); // Calculate where the end of the LSDA CS table is const LSDA_ptr lsda_cs_table_end = lsda + cs_header.length; // Get the start of action tables const LSDA_ptr action_tbl_start = lsda_cs_table_end; // Get the first call site LSDA_CS cs(&lsda); // cs.action is the offset + 1; that way cs.action == 0 // means there is no associated entry in the action table const size_t action_offset = cs.action - 1; const LSDA_ptr action = action_tbl_start + action_offset; // For a landing pad with a catch the action table will // hold an index to a list of types int type_index = action[0]; // types_table_start actually points to the end of the table, so // we need to invert the type_index. There we'll find a ptr to // the std::type_info for the specification in our catch const void* catch_type_info = types_table_start[ -1 * type_index ]; const std::type_info *catch_ti = (const std::type_info *) catch_type_info; // If everything went OK, this should print something like Fake_Exception printf("%s\n", catch_ti->name());
The code looks complicated because there are several layers of indirection before actually reaching the struct type_info, but it’s not really doing anything complicated: it only reads the .gcc_except_table we found on the disassembly.
Printing the name of the type is already a big step in the right direction. Also, our personality function is getting a bit messy. Most of the complexity of reading the LSDA can be hidden under the rug for almost no cost at all. You can check my implementation here
Next time we’ll see if we can match our newly found type to our original exception.
C++ exceptions under the hood 16: finding the right catch in a landing padPosted: May 7, 2013 Filed under: Exceptions Leave a comment
16th chapter on our quest to implement a mini-ABI capable of handling exceptions; last time we implemented our personality function so it would be able to handle functions with more than one landing pad. We are now trying to make it recognize whether a certain landing pad can handle a specific exception, so we can use the exception specification on the catch statement.
Of course, to know whether a landing pad can handle a throw is a difficult task. Would you expect anything else? The biggest problems to overcome right now will be:
- First and foremost: how can we find the accepted types for a catch block?
- Assuming we can find the types for a catch, how can we handle a catch(…)?
- For a landing pad with multiple catch statements, how can we know all possibly catch types?
- Take the following example:
struct Base {}; struct Child : public Base {}; void foo() { throw Child; } void bar() { try { foo(); } catch(const Base&){ ... } }
Not only we’ll have to check whether the landing pad accepts the current exception, we’ll have to check if it accepts any of the current exception’s parents!
To make our work a bit easier let’s say for now we work only with landing pads that have a single catch and no inheritance exists on our program. Still, how do we find out the accepted types for a landing pad?
Turns there is a place in .gcc_except_table we haven’t analyzed yet: the action table. Let’s dissasemble our throw.cpp object and see what’s in there, right after the call site table is finished, for our “try but don’t catch” function:
Note: You can download the full sourcecode for this project in my github repo.
.LLSDACSE1: .byte 0x1 .byte 0 .align 4 .long _ZTI14Fake_Exception .LLSDATT1:
Doesn’t look like much, but there’s a promising pointer (both a proverbial and a real pointer) to something that has our exception’s name. Let’s go to the definition of _ZTI14Fake_Exception:
_ZTI14Fake_Exception: .long _ZTVN10__cxxabiv117__class_type_infoE+8 .long _ZTS14Fake_Exception .weak _ZTS9Exception .section .rodata._ZTS9Exception,"aG",@progbits,_ZTS9Exception,comdat .type _ZTS9Exception, @object .size _ZTS9Exception, 11
And we reached something very interesting. Can you recognize it? This is the std::type_info for struct Fake_Exception!
Now we know there is indeed a way to get a pointer to some kind of reflexion information for our exception. Can we programmatically find it? We’ll see next time.
C++. | http://monoinfinito.wordpress.com/category/programming/c/exceptions/ | CC-MAIN-2014-42 | refinedweb | 4,368 | 56.39 |
Section 4.5
APIs, Packages, and Javadoc.
4.5.1 Toolboxes. Microsoft Windows provides its own set of subroutines for programmers to use, and they are quite a bit different from the subroutines used on the Mac. Linux has several different GUI toolboxes for the programmer to choose from., Linux,.
4.5.2 Java's Standard Packages
Like all subroutines in Java, the routines in the standard API are grouped into classes. To provide larger-scale organization, classes in Java can be grouped into packages, which were introduced briefly in Subsection 2.6.4. You can have even higher levels of grouping, since packages can also contain other packages. In fact, the entire standard Java API is implemented in several packages. One of these, which is named "java", contains several non-GUI packages as well as the original AWT graphics user interface classes. Another package, "javax", was added in Java version 1.2 and contains the classes used by the Swing graphical user interface and other additions to the API.
A package can contain both classes and other packages. A package that is contained in another package is sometimes called a "sub-package." Both the java package and the javax package contain sub-packages. One of the sub-packages of java, for example, is called "awt". Since awt is contained within java, its full name is actually java.awt. This package contains classes that represent GUI components such as buttons and menus in the AWT, the older of the two Java GUI toolboxes, which is no longer widely used. However, java.awt also contains a number of classes that form the foundation for all GUI programming, such as the Graphics class which provides routines for drawing on the screen, the Color class which represents colors, and the Font class which represents the fonts that are used to display characters on the screen. Since these classes are contained in the package java.awt, their full names are actually java.awt.Graphics, java.awt.Color, and java.awt.Font. (I hope that by now you've gotten the hang of how this naming thing works in Java.) Similarly, javax contains a sub-package named javax.swing, which includes such classes as javax.swing.JButton, javax.swing.JMenu, and javax.swing.JFrame. The GUI classes in javax.swing, together with the foundational classes in java.awt, are all part of the API that makes it possible to program graphical user interfaces in Java.
The java package includes several other sub-packages, such as java.io, which provides facilities for input/output, java.net, which deals with network communication, and java.util, which provides a variety of "utility" classes. The most basic package is called java.lang. This package contains fundamental classes such as String, Math, Integer, and Double.
It might be helpful to look at a graphical representation of the levels of nesting in the java package, its sub-packages, the classes in those sub-packages, and the subroutines in those classes. This is not a complete picture, since it shows only a very few of the many items in each element:
The official documentation for the standard Java 5.0 API lists 165 different packages, including sub-packages, and it lists 3278 classes in these packages. Many of these are rather obscure or very specialized, but you might want to browse through the documentation to see what is available. As I write this, the documentation for the complete API can be found at
Even an expert programmer won't be familiar with the entire API, or even a majority of it. In this book, you'll only encounter several dozen classes, and those will be sufficient for writing a wide variety of programs.
4.5.3 Using Classes from Packages
Let's say that you want to use the class java.awt.Color in a program that you are writing. Like any class, java.awt.Color is a type, which means that you can use it to declare variables and parameters and to specify the return type of a function. One way to do this is to use the full name of the class as the name of the type. For example, suppose that you want to declare a variable named rectColor of type java.awt.Color. You could say:
java.awt.Color rectColor;
This is just an ordinary variable declaration of the form "type-name variable-name;". Of course, using the full name of every class can get tiresome, so Java makes it possible to avoid using the full name of a class by importing the class. If you put
import java.awt.Color;
at the beginning of a Java source code file, then, in the rest of the file, you can abbreviate the full name java.awt.Color to just the simple name of the class, Color. Note that the import line comes at the start of a file and is not inside any class. Although it is sometimes referred to as a statement, it is more properly called an import directive since it is not a statement in the usual sense. Using this import directive would allow you to say
Color rectColor;
to declare the variable. Note that the only effect of the import directive is to allow you to use simple class names instead of full "package.class" names; you aren't really importing anything substantial. If you leave out the import directive, you can still access the class -- you just have to use its full name. There is a shortcut for importing all the classes from a given package. You can import all the classes from java.awt by saying
import java.awt.*;
The "*" is a wildcard that matches every class in the package. (However, it does not match sub-packages; you cannot import the entire contents of all the sub-packages of the java package by saying import java.*.)
Some programmers think that using a wildcard in an import statement is bad style, since it can make a large number of class names available that you are not going to use and might not even know about. They think it is better to explicitly import each individual class that you want to use. In my own programming, I often use wildcards to import all the classes from the most relevant packages, and use individual imports when I am using just one or two classes from a given package.
In fact, any Java program that uses a graphical user interface is likely to use many classes from the java.awt and java.swing packages as well as from another package named java.awt.event, and I usually begin such programs with
import java.awt.*; import java.awt.event.*; import javax.swing.*;
A program that works with networking might include the line "import java.net.*;", while one that reads or writes files might use "import java.io.*;". (But when you start importing lots of packages in this way, you have to be careful about one thing: It's possible for two classes that are in different packages to have the same name. For example, both the java.awt package and the java.util package contain classes named List. If you import both java.awt.* and java.util.*, the simple name List will be ambiguous. If you try to declare a variable of type List, you will get a compiler error message about an ambiguous class name. The solution is simple: Use the full name of the class, either java.awt.List or java.util.List. Another solution, of course, is to use import to import the individual classes you need, instead of importing entire packages.);
This would come even before any import directive in that file. Furthermore, as mentioned in Subsection 2.6.4, the source code file would be placed in a folder with the same name as the package. A class that is in a package automatically has access to other classes in the same package; that is, a class doesn't have to import the package in which it is defined.
In projects that define large numbers of classes, it makes sense to organize those classes. For the purposes of this book, you need to know about packages mainly so that you will be able to import the standard packages. These packages are always available to the programs that you write. You might wonder where the standard classes are actually located. Again, that can depend to some extent on the version of Java that you are using, but in the standard Java 5.0, they are stored in jar files in a subdirectory of the main Java installation directory. A jar (or "Java archive") file is a single file that can contain many classes. Most of the standard classes can be found in a jar file named classes.jar. In fact, Java programs are generally distributed in the form of jar files, instead of as individual class files.
Although we won't be creating packages explicitly, every class is actually part of a package. If a class is not specifically placed in a package, then it is put in something called the default package, which has no name. All the examples that you see in this book are in the default package.
4.5.4 Javadoc
To use an API effectively, you need good documentation for it. The documentation for most Java APIs is prepared using a system called Javadoc. For example, this system is used to prepare the documentation for Java's standard packages. And almost everyone who creates a toolbox in Java publishes Javadoc documentation for it.
Javadoc documentation is prepared from special comments that are placed in the Java source code file. Recall that one type of Java comment begins with /* and ends with */. A Javadoc comment takes the same form, but it begins with /** rather than simply /*. You have already seen comments of this form in some of the examples in this book, such as this subroutine from Section 4.3:
/** *) { ...
Note that the Javadoc comment is placed just before the subroutine that it is commenting on. This rule is always followed. You can have Javadoc comments for subroutines, for member variables, and for classes. The Javadoc comment always immediately precedes the thing it is commenting on.
Like any comment, a Javadoc comment is ignored by the computer when the file is compiled. But there is a tool called javadoc that reads Java source code files, extracts any Javadoc comments that it finds, and creates a set of Web pages containing the comments in a nicely formatted, interlinked form. By default, javadoc will only collect information about public classes, subroutines, and member variables, but it allows the option of creating documentation for non-public things as well. If javadoc doesn't find any Javadoc comment for something, it will construct one, but the comment will contain only basic information such as the name and type of a member variable or the name, return type, and parameter list of a subroutine. This is syntactic information. To add information about semantics and pragmatics, you have to write a Javadoc comment.
As an example, you can look at the documentation Web page for TextIO by following this link: TextIO Javadoc documentation. The documentation page was created by applying the javadoc tool to the source code file, TextIO.java. If you have downloaded the on-line version of this book, the documentation can be found in the TextIO_Javadoc directory.
In a Javadoc comment, the *'s at the start of each line are optional. The javadoc tool will remove them. In addition to normal text, the comment can contain certain special codes. For one thing, the comment can contain HTML mark-up commands. HTML is the language that is used to create web pages, and Javadoc comments are meant to be shown on web pages. The javadoc tool will copy any HTML commands in the comments to the web pages that it creates. You'll learn some basic HTML in Section 6.2, but as an example, you can add <p> to indicate the start of a new paragraph. (Generally, in the absence of HTML commands, blank lines and extra spaces in the comment are ignored.)
In addition to HTML commands, Javadoc comments can include doc tags, which are processed as commands by the javadoc tool. A doc tag has a name that begins with the character @. I will only discuss three tags: @param, @return, and @throws. These tags are used in Javadoc comments for subroutines to provide information about its parameters, its return value, and the exceptions that it might throw. These tags are always placed at the end of the comment, after any description of the subroutine itself. The syntax for using them is:
@param parameter-name description-of-parameter @return description-of-return-value @throws exception-class-name description-of-exception
The descriptions can extend over several lines. The description ends at the next tag or at the end of the comment. You can include a @param tag for every parameter of the subroutine and a @throws for as many types of exception as you want to document. You should have a @return tag only for a non-void subroutine. These tags do not have to be given in any particular order.
Here is an example that doesn't do anything exciting but that does use all three types of doc tag:
/** * This subroutine computes the area of a rectangle, given its width * and its height. The length and the width should be positive numbers. * @param width the length of one side of the rectangle * @param height the length the second side of the rectangle * @return the area of the rectangle * @throws IllegalArgumentException if either the width or the height * is a negative number. */ public static double areaOfRectangle( double length, double width ) { if ( width < 0 || height < 0 ) throw new IllegalArgumentException("Sides must have positive length."); double area; area = width * height; return area; }
I will use Javadoc comments for some of my examples. I encourage you to use them in your own code, even if you don't plan to generate Web page documentation of your work, since it's a standard format that other Java programmers will be familiar with.
If you do want to create Web-page documentation, you need to run the javadoc tool. This tool is available as a command in the Java Development Kit that was discussed in Section 2.6. You can use javadoc in a command line interface similarly to the way that the javac and java commands are used. Javadoc can also be applied in the Eclipse integrated development environment that was also discussed in Section 2.6: Just right-click the class or package that you want to document in the Package Explorer, select "Export," and select "Javadoc" in the window that pops up. I won't go into any of the details here; see the documentation. | http://math.hws.edu/javanotes/c4/s5.html | crawl-001 | refinedweb | 2,492 | 63.8 |
ESR Speaking @Microsoft 100
webslacker writes "ESR's been invited to speak at Microsoft on June 21st. The question: Why? The answer: Nobody knows... " All it took was bribing him with dinner with Neil Stephenson. I think that would work for Hemos too...
Linux kids do not know what their dealing with... (Score:1)
The lack of respect shown towards MSFT is the free software community's Achilles' heel. There are a couple aspects to this crisis.
First, although there is much to ridicule about their technologies, they actually have produced good things. The interview with International GNOME support [linuxtoday.com] contains a good argument for the respect free software developers should show here. Please, I am not saying that MSFT is a good company, but that they have tons of cash, have hired plenty of smart people, and that some good technology has come out of it.
Second, and much more importantly, while the community laughs in disrespect about MSFT, they are plotting to undermine us in serious ways. Yes, it is fun to ridicule them.
:) The DOJ trial, while it has brought welcome scrutiny upon MSFT, does not really hinder most of their tactical ability. Gates' tactical brilliance is woefully underestimated by the free software community. Look for MSFT to do everthing in its power to discredit and totally annihilate the likes of RedHat. This should concern even those who do not like RedHat. After all, in the public's eye, they are strongly identified with GNU/Linux.
In short, let's please respect MSFT as the predator that it is. Know thy enemy.
They want to give him his Windows EULA refund (Score:1)
He will be talking about... (Score:3)
talking about.
ABSTRACT:
In the last nine years, the Linux
community has emonstrated a remarkable
ability to violate Brooks's Law
(``Adding more programmers to a late
project makes it later.'') and
produce extremely high-quality
software with large, loosely organized
development groups. This talk will
explain how it was done, focusing on
the central phenomenon of distributed
per review. The communications
structures and sociology that support
Linux will be analyzed in detail and
related to general phenomena in the
scaling of complex systems. Specific
prescriptions for effective development
will be elicited.
Re:Normal Company (Score:2)
Well, despite the hysterical raving of many "open source" advocates, remember that Microsoft is just a company like any other. Would it be newsworthy if ESR was invited to speak at Sun Microsystems or SGI?
As a previous poster indicated, yes, just not as newsworthy. Both Sun and SGI have already dealt with Free software and the Free software movement. Microsoft really has not, hence it is a new situation, hence it's news.
Considering ESR's public writing is often little short of slander
I think you're thinking about libel here (slander is for speech, not writing). I also think you are approaching libel here. In what way is ESR's writing criminally defamitory?
Microsoft are being extremely magnanimous by inviting him
No, they are hoping to gain something from this. Whether it's PR points, or they actually want to understand what ESR is talking about, I don't know.
I only hope that he endeavours to make it a productive meeting and doesn't engage in his customary circus act - if for no other reason than it would simply be rude to insult his hosts.
I think you're confusing ESR and RMS here. ESR's talks with companies are polite to a fault (in fact, polite to the point where I often disagree with him). RMS is the one who publically insults his hosts (generally when they deserve it).
Microsoft (Score:1)
Too bad it'll probably be their last laugh.
Hah hah!! LOL'ed (Score:1)
Re:Normal Company - yeah right. (Score:1)
>Microsoft are being extremely magnanimous (SP?) by inviting him
Yeah, that's something Microsoft are (sic) known for: being magnanimous!
Stop it man, you're killing me!
They want to annihilate him! (Score:1)
8-o
Re:Transcript (Score:1)
Interesting take on the situation (Score:1)
>> speak at Sun Microsystems or SGI?
Probably, but not nearly as newsworthy.
The reason is obvious to me -- ESR has publicly stated his contempt for Bill Gates after being brushed off by Gates some time ago.
A more reasonable comparison would be to diehard EFF members sitting down to chat with Scott "No Privacy" MacNealy, or perhaps Michael Dell speaking at Apple on the company's future...
Re:Oh, to be a fly on the wall... (Score:1)
Consciousness is not what it thinks it is
Thought exists only as an abstraction
The self does not exist
There is no spoon
Sorry.. couldn't resist
:)
Normal Company (Score:1)
Considering ESR's public writing is often little short of slander, Microsoft are being extremely magnanimous (SP?) by inviting him, I only hope that he endeavours to make it a productive meeting and doesn't engage in his customary circus act - if for no other reason than it would simply be rude to insult his hosts.
The most interesting part (Score:2)
I found this quote at the end to be the most interesting:
Another sign of Microsoft's interest in open source comes from user statistics released Monday by Linux.com. Microsoft was the leading corporate visitor to the site in the first two weeks after it opened last month, with 15,000 visits from Microsoft servers.
That's a lot of visits in a month, about 500/day. I'm not sure what consistutes a "visit" (a single hit on any page?), but it seems like Microsoft is certainly keeping an eye on us Linux people.
Actually... (Score:1)
Wasn't my fault - he just didn't know that everybody else already knew he was an idiot.
Microsoft culture, memetic ecology and speakers (Score:2)
As such, it was only a matter of time before they invited ESR or some other open-source figure onto campus. And ESR seems the obvious choice (being less zealously opposed to the basis of Microsoft's existence than RMS).
It doesn't necessarily mean that they'll be GPLing Windows 2000 or anything anytime soon. Though the increasing propagation of open-source memes in the MS environment may have an (as yet undetermined) effect.
Re:Where about all those Linux innovations? (Score:1)
Didn't start with Linux, or even UNIX. Various kernel overlay schemes were used in the '70s to help shoehorn OSes into tiny memory environments; and even though people don't think of them that way, modules really are just an overlay scheme with some hooks. In any event, I know at least Solaris 2 had a very modern, modular kernel from the git-go...
Linux is very much your father's UNIX kernel. Innovation was never the idea; Linux instead looks at the engineering of other kernels and tries to draw consensus. The workhorses of the kernel (VM, ext2) are much, much more similar to the competition than different. The one weird bit about core Linux, its scheduler, is worse in my opinion than the competition...
Conspiracy... (Score:1)
Productive? (Score:2)
Re:This gets a big fat "Duh" (Score:1)
Re:They'll hang on to Windows for dear life (Score:1)
Only Nixon could go to China (Score:1)
s/China/Microsoft/;
hmm
Re:Obvious motivation (Score:1)
Nice one.
Gee... (Score:1)
It is kind of eerie (Score:1)
David Gould
Plausable Denibility (Score:1)
Likewise (Score:1)
Christopher A. Bohn
Re:The most interesting part (Score:1)
Re:Where about all those Linux innovations? (Score:1)
AN operating system should provide, basically, memory management, device addressing, process scheduling, and pipes. The rest is garnish. UNIX gave us good working models for all of those, and Linux has properly followed that lead.
This puts it miles ahead of Microsoft, which has yet to do a reasonable job of any of the criteria mentioned above. You can do a lot worse than making a working, free copy of UNIX.
--G
Transcript (Score:3)
Um... (Score:1)
Er, lets see, MS is the largest company in their field in the world; the CEO is the richest man in the world; many _developers_ (let alone PHBs) are millionaires and won't have to work again after they quit MS; their product is a household name and everyone continues to buy it regardless of how bad it gets.
Sorry, how exactly do you define "win" here?
I say, MAKE 'EM BEG FOR IT!! (Score:1)
Hehehe
Chuck
(offtopic) (Score:1)
Re:Why is the Deliverator hanging around Redmond? (Score:1)
I can't imagine why Neal is hanging around the Microsoft campus. He lives in Seattle, but other than that I can think of no motivation for him to be there.
Up until '95, he was a die-hard Mac fan and Mac hacker. Then he had some problems with a laptop and switched to Linux. He loves UN*X, by the way, and has written a manifesto on command line interfaces. You can download it from the promotional site for his latest book. [cryptonomicon.com]
Disclaimer: I have to inform you all that my name is Jason Stephenson, and I also went to Boston University, a few years after Neal graduated.
Oh, to be a fly on the wall... (Score:1)
Methinks he will tailor the message for the audience. It would be impolitic not to.
Consciousness is not what it thinks it is
Thought exists only as an abstraction
Re:I just farted... (Score:2)
Consciousness is not what it thinks it is
Thought exists only as an abstraction
Re:trivializiation (Score:1)
You confuse the people with the company. The people who work for Microsoft are not our enemies, but the company as a whole is.
Too superlative! (Score:2)
Re:Normal Company (Score:1)
On the other hand, you have to ask yourself if, even though you personally may disklike the heavy marketing thing that many of the Linux folks do, it's not a good thing overall. After all, look where Linux is now compared to NetBSD. (It's not as if these two systems have such different capabilities.) And look where the whole idea of Open Source is because of Linux.
cjs
Re:Oh, to be a fly on the wall... (Score:1)
Oh yes, and we all know ESR would never be impolitic.
If I was him, I'd be very careful what I ate and drank there.
Re:Microsoft crushing Red Hat (Score:1)
First, IANAL. I am just a copyright/patent/trademark law enthusiast (like 90% of the rest of Slashdot)
As long as the only code in the program was yours, then no. Under US copyright law, you own the copyright and you can change the terms of your license at any time. I'm unclear as to whether you can retroactively change the terms of your license however (I would say no, since this would be breach of contract), so the ORIGINAL code should still be useable under the GPL (again, IANAL).
On the other hand: If you have incorporated ANY changes from other people into your work and they have not specifically signed the copyright over to you, then you could be sued for infringing on their copyright if you changed the license without their permission. This is why most people aren't too worried about the major projects (like the kernel) getting yanked by their developers - there are just too many of them.
maybe... (Score:1)
:)
...om, the great and
Where about all those Linux innovations? (Score:1)
For example, the non-innovative parts of IE5 are great: fast HTML rendering and other goodies. The Microsoft innovations "hanging off the side" all suck: Active Desktop, IE channels, ActiveX,
thought [offtopic...] (Score:1)
Consciousness is not what it thinks it is
Thought exists only as an abstraction
The self does not exist
The following is the translation of this sig for those of you who, like me, are struggling to find the deeper meaning of Java. Don't try this at home.
public interface Thought {
}
public class Consciousness {
private Thought think() {
return think();
}
public Thought getSelf() {
return think();
}
}
Re:GPL (Score:1)
You could very well rerelease your version 2.0 as a proprietary program. But you couldn't revoke the licenses for version 1.0 from those people that already had it.
I have a quick, very non-scholarly, and heretical explanation of the GPL here [meer.net].
Re:(offtopic) (Score:1)
If you want to get technical. 2002 is the last year of the millenium.
Our calendar (gregorian) actually didn't start until 3 A.D.
So for people who feel the need to argue about this. Don't.
Microsoft crushing Red Hat (Score:1)
I've also got a GPL-related legal question here. Let's say I release "Ryan's Kewl Installer 1.0" under the GPL, but I continue to hold the copyright for the program. A year later, I write an update for it, based on the original source. My update is released as a commercial, closed-source program.
Normally, in this situation, the copyright holder could sue the person/company infringing on the license. But in this case, I am both the copyright holder AND the person infringing on the GPL. Would the rest of the open-source community be able to take any action against me?
Ryan
Why Open Source applies to non-free software. (Score:1)
In many non-free software companies, people don't work on internal "open source" projects at all.
A lot of proprietary software is actually written by people, who don't know a thing about the other parts or hacks that their code collegues work on.
NOOOOOOOOOOOOOO!!!!! (Score:1)
Re:Oh, to be a fly on the wall... (Score:1)
Hey Rob, what are the chances of ESR posting a summary of the festivities on
/. ?
This gets a big fat "Duh" (Score:1)
Microsoft's not dumb, and they're not afraid to change course, even drastically. If Win2K is a more or less total disaster, if Linux continues on its trajectory, and if there's a biz model behind it, I could see MS doing their own Linux distribution, porting MSOffice to it (though probably *not* open sourcing MSOffice), etc. Actually, all they need to do is port Win32 over to Linux, and they have a platform "story" to tell their developers.
Actually all Microsoft needs to do is buy time to build up their services division, as IBM has done over the last few years. Right now MS is way way overreliant on the high margins associated with proprietary software development - a model that more or less can not survive in the OSS world. Services can, though; but margins on services are much lower, so MS needs to figure out a services strategy that still retains a high margin. That's not easy to do, since you can't really protect yourself against your competitors offering the same service at a lower fee (and margin).
We live in interesting times.
Brian
Re:Why is the Deliverator hanging around Redmond? (Score:1)
if its the latter then I 1up you
of couse if your his brother, then... nevermind
---------------
Chad Okere
Do not forget Greg Bear, who is equally excellent. (Score:1)
I know Stephenson has made some pro-linux remarks lately and so is in high favor around here. But don't forget that Greg Bear is awesome too.
Maybe Bear should have named Slant, "Slant Dot." I remember hearing about the book before it came out on NPR. He named it for the "slash" on the computer keyboard and even that many years ago, I smiled in my driver's seat, wondering if Greg Bear knows about "Slashdot."
bitter or sweet? (Score:1)
I have no idea what it means, but certain events like this call in to mind. So what do you say? Who'll be ingesting what from whom?
Brownshirts (Score:1)
-russ
Re:Normal Company (Score:1)
MS is looking for information to formulate it's future strategy and position itself to be a player in Linux's future. I'll bet they tape the meeting and spend weeks analyzing the conversation looking for angles.
Re:Linux kids do not know what their dealing with. (Score:1)
Why is the Deliverator hanging around Redmond? (Score:1)
seen hanging around the Micros~1 campus. Slumming?
Drugged and hypnotized? Or waiting.... just waiting.... One of his characters would be carrying an emp weapon made out of an old Amana RadarRange magnetron. Maybe that is why nothing is shipping on time. Huummmmmmmmmmmmmmmmm.
Re:unix sucks (Score:1)
Please give examples and reasons to back up your opinion...
Regarding your statement about your coworker smashing the machines, personally I think your coworker is a total dick - I mean, he could have given the machines to Goodwill, an retirement home, or heck - to the high school kids! - people who could have used them constructively.
Actually, if your coworker had half a brain he could have built a pretty good Beowulf system out of those boxes...
Re:Amusing dichotomy (Score:1)
They'll hang on to Windows for dear life (Score:1)
Even if it's so bad crashes several times a day, people will continue to use it in droves.
Your page is illegal! (Score:1)
it is a work based upon the GPL, which is a
non-free work (you can't modify and redistribute
it. So the GPL doesn't give me permission to use
your page at all.
Bill. Listen to Reason. (Score:1)
On a more serious note - those of you who follow the Spam Wars will likely remember Jim Nitchals. The term "Nitchalization" is used when an anti-spammer, rather than blindly wielding the Mallet of Doom, actually treats his or her enemy with sufficient respect that a dialogue develops, a clue is imparted and the former spammer changes his ways. It's harder work, and often fruitless, but when it works, it can work wonders.
Could I do that? Nope. I'm a mallet-swingin', all-spammers-are-subhuman-goo kinda guy all the way. But Jim wasn't. Jim realized that the best way to overcome an enemy is to make him your friend. In the face of harsh criticism and skepticism from his allies, he ended up convincing (of all people) Walt Rines and Sanford Wallace to endorse a strong anti-spam bill in Congress. I distinctly remember seeing a whole squadron of pigs flying outside my window that day.
I also have fond memories of Jim's code from my Apple ][ days, Bug Attack (real music during gameplay - a hell of an accomplishment given that the Apple's only "sound-generating" capability involved toggling whether the speaker cone between an "in" or "out" position!), Hard Hat Mack, Music Construction Set, Archon, and others.
Back to ESR, Stephenson, and Gates.
Will these presentations change the Evil Empire in a day? No. Maybe they'll change nothing at all. But the odds that they'll change things for the better is IMHO far greater than the odds that they'll change things for the worst. If there was one thing that Stephenson made clear in Snow Crash, it's that the voice of Reason doesn't have to speak with a million rounds per second. Sometimes a few well-placed words in the right ears can be far more effective.
ESR and Stephenson know this. Does their audience at Microsoft?
Then again... (Score:1)
Re:trivializiation (Score:1)
Pardon me, but, we are discussing SOFTWARE!!!
If you must BATTLE FOR A CAUSE , how about putting it in perspective and choosing a REAL problem, like abortion, or teen pregnancy, or the starving.
This babbling rhetoric is neverending.
As badly as you want 'The Matrix' to come true, it will never happen. Most PC users are AOLJunkies that can't even create a birthday card or a formatted letter, much less compile a kernel or install a non-RPM piece of software.
What would happen to this forum if MS DID lose?
If it were destoyed?
Who would be the next evil empirer?
Yep. AOL/Sun. Laughable. The cartoonishly goofy McNealy and the LOL funny AOL servers.
Yes, I KNOW I am rambling, but,oh well.
BTW, what is to be thought of RedHat going public?
Are they now the enemy too?
I mean, heck, first they dump on Rasterman, and now they strive to make money!!!
BOYCOTT RedHat!!!!!!!
ESR & Microsoft (Score:1) | https://slashdot.org/story/99/06/16/0133215/esr-speaking-microsoft | CC-MAIN-2018-09 | refinedweb | 3,451 | 72.76 |
Subject: Re: [boost] Pimpl Again?
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-05-30 19:45:05
On 31/05/2016 09:37, Vladimir Batov wrote:
> Yes, I hear you. And, yes, from a certain angle that might seem wrong...
> On the other hand, from a certain angle anything might seem wrong... :-)
> Is it a serious design flaw? I personally do not think so. More so, I
> personally see it from a different angle. Namely, I read the code below
> as "Book is declared as a pimpl; then I define the implementation of
> that pimpl-Book". Seems sensible and even natural:
>
> struct Book : public pimpl<Book>::shared {};
>
> template<> pimpl<Book>::implementation {};
>
> So, when it is simply read (rather than mechanically dissected) it does
> not seem that wrong at all... to me :-)
>
> The "boost::" prefix may or may not be explicitly present... It is up to
> coder's preferences and style.
The trouble is that the syntax you've written above is not legal C++.
In order to provide the implementation of the impl class (assuming that
pimpl is in the boost namespace), it *must* be done thusly:
// close any other namespace blocks first
namespace boost
{
template<> struct pimpl<other::ns::Book>::implementation
{
...
};
}
In particular it is *not* legal to use a boost:: prefix (or even to
leave it unprefixed in the presence of a "using namespace boost") -- you
have to put it in a namespace block. Otherwise you are declaring a new
type in a different namespace, not specialising the existing template.
This is the part that makes it feel like you're actually implementing
your class (or at least its private members, anyway) in the boost
namespace, and that feels wrong (unless you're a boost library author of
course).
(You're probably going to say that feelings are style decisions again,
which is true -- but it's still important.)
> Thank you for mentioning it. I'll hijack your prop to re-iterate that I
> very much hope we all can keep the discussion *constructive* and
> ultimately moving forward. That IMO means picking the best available
> solution... and "no solution" is not one of the choices. I am sure we'll
> never get anything that everyone likes. However, a solution is immensely
> better than no solution. IMO it's important that we get *something*
> in... The seed that the library will grow, mature, improve from. We have
> plenty of libs that went through several incompatible changes... It did
> not make them worse. It made them better. I am not sure if all those
> improvements (for everyone's benefits) were possible if those libs did
> not have the visibility, exposure and scrutiny which come with the Boost
> tag.
I agree -- but using template specialisation or not is a fundamental
design decision. It's not possible to incrementally improve it later,
only to tear it out and replace it with something different. My point
is that if we can figure out what that something different should be,
then now is the best time to make that change, before it gets users
whose code would break from changes.
Exactly what that change would look like, I'm not sure; I'm hoping that
others will provide feedback and suggestions on this point.
One possibility is that the template specialisation could just be for a
traits type that provides a typedef for the "real" implementation class.
Not sure whether that really improves anything though; it might just
make it more wordy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk | https://lists.boost.org/Archives/boost/2016/05/229967.php | CC-MAIN-2021-31 | refinedweb | 600 | 65.32 |
This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
return (new Random().nextInt(2) == 0 ? "alive" : "dead");
Quote from ElectrocutionCreeper
Amazing! Is there any chance you will will support Better Glass mod and/or Aether?
Quote from KeldonWarlord
I run a custom pack that I've been slapping together with a friend of mine- do you mind if I use the armor skins in it?
I don't distribute the pack, I'm just really picky about my textures, haha.
Quote from Sarbinger
Wow man, you really created the illusion of no 16x. It looks 32x. :smile.gif:
the only places I can tell it's 16x without counting the pixels are the mobs and paintings. :smile.gif:
Quote from xsolar66
Please animate still water though. Only thing that's missing, really!
Over 150K downloads! Hurray!
I am so sad to announce that I no longer work on this texture pack
However, there is a good news: it texture pack is now open source! You can download PSD files from the link below and do whatever you like with them.
Update: kyctarniq is volunteered to take over the pack. I 100% approve what he did so far. You can find his thread here:
Webpage and download:
For moderators:
Please do not lock this topic. I still hope someone will continue working on these textures, so this could be the place for comments and updates...
EDIT: FIRST!
Not yet. So far I've been developing for no-mod Minecraft. 1.8 update promises lots of work with the pack, so I don't think I'll have enough time to develop for mods too. We'll see.
Umm texture packs don't change mod files at all. Did you mean like different textures for them?
I don't distribute the pack, I'm just really picky about my textures, haha.
For personal use - no problem.
the only places I can tell it's 16x without counting the pixels are the mobs and paintings. :smile.gif:
My youtube
Thank you :smile.gif: This is exactly what I've been trying to achieve!
:biggrin.gif:
Please animate still water though. Only thing that's missing, really!
Creative freebuild Minecraft Server, 24/7! Anti-grief.
Hmm. I don't know what to say :smile.gif: Minecraft ignores the pack's water texture and uses its own, unless you have mods installed. I have added texture for water, and I bet it is animated, but I was unable to test it as I have non-modded version of Minecraft.
For the same reason I couldn't test clock and compass, although I have made textures for these too.
I hope Notch will fix this in the future, like he fixed foliage and grass colors.
Great work. I'm gonna have a play with it now and I'll post back later with any problems I have with it. (if there are any :tongue.gif:)
It's good though, I like it.
Does the stone seem to repeat too much to anyone else? The individual blocks are way to easily distinguished in my opinion. | https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/resource-packs/1232310-16x-1-5-1-forgotten-lands-version-1-11 | CC-MAIN-2018-43 | refinedweb | 527 | 84.68 |
go to bug id or search bugs for
Description:
------------
There is no documented array concatenation function. This is a very common function, e.g. Javascript and Ruby have the `concat` function, Python has `+` and Haskell has `++`.
The `array_merge` function () is what has be used if you want to concatenate arrays. However it is not mentioned in the documentation (not even in the comments) of that method that that is what should be used.
I propose that `array_concat` be created as an alias of `array_merge`. The concatenation of an associative array is also consistent with trying to merge the hash maps. For example this Stack Overflow question on [concatenating two dictionaries]() is marked as a duplicate of the function 'How to merge two Python dictionaries'. That is, it is consistent that hash map concatenation is the same as hash map merging.
So I believe that `array_concat` is a perfect alias for `array_merge` in terms of numeric arrays and a valid (albeit unnecessary) alias for associative arrays.
This will help almost all developers coming to PHP from other dynamic languages.
Test script:
---------------
<?php
var_dump(array_concat(array('London'), array('Calling')));
?>
Expected result:
----------------
array(2) {
[0]=>
string(6) "London"
[1]=>
string(7) "Calling"
}
Add a Patch
Add a Pull Request
This is more of a documentation issue IMO.
Some better wording on the manual pages of the array section may help out, but there's no need to further pollute the global namespace with aliases.
The first sentence of the description is (emphasis mine):
| Merges the elements of one or more arrays together so that the
| values of one are *appended* to the end of the previous one.
"Append" is, in my opinion, even clearer than "concatenate". I
don't see that the documentation could be improved here.
However, Gabriel changed this back to feature request. Are you
suggesting we should actually introduce an alias for
array_merge()?
Not suggesting anything here, my bad changing the type of the bug
Okay, closing then per my comment above. | https://bugs.php.net/bug.php?id=73576 | CC-MAIN-2022-40 | refinedweb | 332 | 63.59 |
So I know that reference variables cannot be changed.
I'm in a position where I have two different classes. Let's call them A and B. They have the same methods (the methods are called the same) they're just specified for the class.
I need a clever way of changing between which classes to instantiate.
One way could be with some boolean tests checking which option has been selected and then instantiate the corresponding class. Although I fear that this might become bulky and ugly, so I'm trying to avoid this way. There must be something more clever.
Currently I'm thinking of making a new class (e.g. C) that extends the same class as A and B.
I would then override the methods (as class A and B also do btw) and then execute the methods depending on the setting (i.e. which class A or B is selected). The methods would return the same as it would in class A or B.
Hope I'm not talking complete gibberish.
One way to do this is to use the Factory Pattern.
Partial quote from Wikipedia:
Like other creational patterns, it deals with the problem of creating objects (products) without specifying the exact class of object that will be created.
E.g.
public abstract class Base { public abstract void doSomething(); } public class A extends Base { public void doSomething() { System.out.println("A"); } } public class B extends Base { public void doSomething() { System.out.println("B"); } } public class C extends Base { public void doSomething() { System.out.println("C"); } } public interface BaseFactory { public Base createBase(int condition); } public class DefaultBaseFactory implements BaseFactory { public Base createBase(int condition) { switch (condition) { case 0 : return new A(); break; case 1: return new B(); break; case 3: return new C(); break; default: return null; break; } } }
Your explanation is confusing. But it sounds like you should extend
A and
B from a common base class (or an interface):
abstract class Base { public abstract void someMethod(); } class A extends Base { public void someMethod() { System.out.println("A"); } } class B extends Base { public void someMethod() { System.out.println("B"); } }
That means you can do something like this:
Base base; if (someCondition) { base = new A(); } else { base = new B(); } base.someMethod(); | http://www.dlxedu.com/askdetail/3/fb72c529ebe46bd3bbf1e3a654abeb91.html | CC-MAIN-2018-22 | refinedweb | 374 | 64.61 |
Join the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
I'm trying to configure bamboo to have nightly builds. My goal is that after the build, the created artifacts are copied to another folder where all my nightly builds are stored.
The structure I am aiming for is the following:
C:/Sync/.../20140622-Project xx/<all my artifacts>
Everything is in place. I have a variable containing the date, I use the 'Artifact download' task in a Deploy part, and in the path, I put my date variable which is correctly substituted.
Except for one thing, I don't find a way to update the value of my variable. I tried via a script called at the begining of my Deploy to change it (global plan variable) "set bamboo_releaseDate=20140622" but this doesn't work.
I tried to change an environment variable, and access it in bamboo in the Artifact download ${system.bamboo_releaseDate}. It gets the system variable, but if I update it, it doesn't take the change into account. The new value is only taken if I restart the service of my bamboo.
So I have more a configuration/best practice question. What should be the way to have dynamic variable ? What do you suggest ? Can I use the task mentionned above, or should I change completely ?
Thanks for your help !
Christophe
I used the solution of Shari, and it works effectively.
Thanks for your help !
Christophe
You should be able to run these commands in a step -
set TODAY=%year%%month%%day%
@echoTODAYVAR=%TODAY%>"${bamboo.pathroot}\Bamboo\xml-data\build-dir\TODAYVAR.properties"
Then run a step "Inject Bamboo Variables from file", where you reference the variable stored in the first step -
../TODAYVAR.properties
Then in a 3rd step set TODAY by doing the following -
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set year=%%c
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set month=%%a
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set day=%%b
set TODAY=%year%%month%%day%
@echoTODAYVAR=%TODAY%>"${bamboo.pathroot}\Bamboo\xml-data\build-dir\TODAYVAR.properties"
Then you can reference TODAY variable (say in your copy step) with the following -
%TODAY%_${bamboo.current.version}-${bamboo.buildNumber}
which would append the version of the app and the build number to the YYYYMMDD, i.e. 20140623_1.5.8_21
I am new to bamboo ... I have a build running but need to set up the date. Not sure why this isn't a standard feature of Bamboo by now (v6.6.3) ...
Anyway, the top commands look like Windows .BAT format, but it's not working for me as %year% and %month% and %day% are undefined ...
Are these just a placeholder for me to put the date in manually every time?
Please explain ... thanks.
I found a solution with Python to create the .properties file.
This is simpler than the solution listed above, as Python can set up the TODAY variable and write it to the properties file in one step:
#!/usr/bin/env python
import datetime
import sys
now = datetime.datetime.now()
mmddyyyy = now.strftime('%m%d%Y')
tfile = "C:/Users/Administrator/bamboo-home/xml-data/build-dir/AM-BLD-VAR/TODAYVAR.properties"
tout = open(tfile,'w')
tout.write("TODAY=%s\n" % mmddyyyy)
tout.close()
sys.exit(0)
One slight glitch I still have: the return value of the Python script is somehow always interpreted by Bamboo as -1, no matter what the actual return code.
For the moment I'm just running this step outside of Bamboo and disabling the step in the plan.
BUT! Atlassian: why not just export a DATETIME variable for us to use directly instead of all. | https://community.atlassian.com/t5/Bamboo-questions/How-to-have-dynamic-variable-in-bamboo/qaq-p/415707 | CC-MAIN-2022-05 | refinedweb | 628 | 65.93 |
Joe Schaefer wrote:
> Here are a few things I've decided to try for httpd-apreq-2.
>
> httpd-apreq-2/src/
>
> This is the core APR-based part of apreq-2. I'm refactoring
> my code a bit to pull out the httpd dependencies. For now
> the httpd-specific code will be moved somewhere into env/.
>
> httpd-apreq-2/env/
>
> This is where the real "porting" is done. Conceivably apache-1.3,
> apache-2.0, and apache-2.2 can all be independently bound to the
> apreq-2 core, as could other environments like CGI.
>
> ( Note: If the "split" doesn't work out, we can drop env/ and
> put the httpd dependencies back into src/. )
Since it's not going to be a drop-in patch anymore, the biggest trouble is
to produce the new autoconf m4 files to find apr/apr-util/apache.
Hopefully the relevant code can be ripped of mod_perl 2.0.
> So far, I'm basing the split on the following vtables:
> --------------------------------------------------
> struct apreq_request_env {
> apreq_request_t *(*make)(void *ctx);
> apr_status_t (*init)(void *ctx, apreq_parser_cfg_t *cfg);
> apr_status_t (*parse)(apreq_request_t *req);
> };
>
> struct apreq_cookie_env {
> const char *(*in)(void *ctx);
> const char *(*in2)(void *ctx);
>
> apr_status_t (*out)(void *ctx, char *c);
> apr_status_t (*out2)(void *ctx, char *c);
> };
>
> struct apreq_env {
> struct apreq_request_env r;
> struct apreq_cookie_env c;
> apr_pool_t *(*pool)(void *ctx);
> void (*log)(const char *file, int line, int level,
> apr_status_t status, void *ctx, const char *fmt, ...);
> };
> --------------------------------------------------
> With this setup, "porting apreq-2" is basically a
> matter of populating the global variable "APReq":
>
> extern struct apreq_env APReq;
Careful with globals. We are potentially running in a threaded env in 2.0.
I'd rather see a compile time resolving.
> The actual details will get spelled out in src/apreq_env.h,
> but this is *very* rough at the moment (particularly the
> apreq_request_env struct).
>
>
> httpd-apreq-2/glue/
>
> This is where the language bindings will go. The glue should
> provide interfaces for most of the stuff in src/,
> and treat the code in env/ as optional. Ideally apreq-2 ports
> will work without any coaxing, so the env/ code shouldn't
> *need* glue.
>
> For example, here's some sketchy ideas for the perl glue:
>
> conventional (modperl) APIs:
>
> Apache::Request These may need some env/ glue, since they are
> Apache::Cookie modperl-specific.
>
>
> new (abstract) APIs:
>
> APReq::Table data store (very similar to APR::Table)
>
> APReq::Cookie Apache::Cookie, without the CGI::Cookie
> semantics for cookie-value encoding
>
> APReq::Request Apache::Request without Apache as its base class.
> For modperl, APReq::Request will probably need to
> use delegation, not inheritance ( similar to DBI )
> to get at the Apache->request methods.
> Programs that use APReq:: modules should be
> maximally portable to other environments.
>
> The XS for the new modules should be environment-agnostic, so code
> that uses only these modules should be portable to other environments
> (well, that's my theory :-).
>
> <issue type="bikeshed">
> Oh yeah, are there any preferences on the capitalization of apreq for the
> perl-module namespace? I'm using APReq here and there now, and I much
> prefer it over "ApReq". Another alternative is APREQ, which would be
> ok with me.
> </issue>
I'm -0 on APReq as it's too similar to APR. Both APREQ and ApReq are fine
with me. AR sounds cool too, but that won't map well into apreq_.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker mod_perl Guide --->
mailto:stas@stason.org | http://mail-archives.apache.org/mod_mbox/httpd-apreq-dev/200301.mbox/%3C3E263611.7010601@stason.org%3E | CC-MAIN-2017-39 | refinedweb | 565 | 63.8 |
- Type:
Improvement
- Status: Open (View Workflow)
- Priority:
Minor
- Resolution: Unresolved
- Component/s: git-plugin
- Labels:None
- Environment:Windows 32, 64 - All versions
Git plugin 3.5.0
Jenkins minimum version 1.625.3
- Similar Issues:
Git auto discover branches should be able to respect included refspecs so that it can discover branches not located in refs/heads/* an example would be refs/pull-requests/*/merge. When this is implemented, the multistage pipeline will be well on its way to be able to automatically detect and build pull requests or other manually "described" branches in refpsecs
- is related to
JENKINS-51134 GitSCMTelescope should support DiscoverOtherRefsTrait
- Open
The GitHub branch source, Bitbucket branch source, and in the gitea plugin seem to already provide support for pull requests. The Jenkins project itself relies on them as part of ci.jenkins.io. Can you explain further what you're seeking that is not already available?
Im using multibranch pipeline with auto discover branches. It only discovers branches in /refs/heads/* as far as i can tell it doesn't have options for git hub et.al. plugins. And pull requests are in /refs/pull-requests which are ignored. Before recent releases of git and git-client pligins i was able to use refspecs to "map" /refs/* to /refs/heads/* "namespace" which no longer works because of an optimisation of now using remote-ls to list branches and the git plugin sets "wantsbranches" which git-client uses to git ls-remote -h which ignores anything outside of /refs/heads i.e non standard branches. And because its remote theres nothing i can do locally to have those branches listed. From my initial investigations it looks like that both the git and git-client plugins would need changes tto provide the functionality that i want while still keepinng the optimisations recently intoduced.
I am working with VSTS and Jenkins.
Since Multibranch Pipeline Jobs cannot detect branches outside refs/heads, I have to create an extra Pipeline Job which fetches refs/pull/* for verifying VSTS' pull-requests.
This issue is fixed with 3.9.0, there is a new option called "Discover other refs".
Thanks!
Oh sorry, just noticed that "RESOLVED" would be more appropriate...
I closed the Issue overzealously.
The Multibranch pipeline actually detects the branch, but building them does not succeed.
I get this message:
ERROR: Could not determine exact tip revision of pull/2212/merge; falling back to nondeterministic checkout
In the end, the correct commit is checked out but as soon as the actual pipeline script is executed on a node, the job fails with java.nio.file.NoSuchFileException. The Dockerfile cannot be found, which makes sense, because there is absolutetly nothing created on the slave (not even a workdir is being created).
Related improvement request ticket JENKINS-45989 | https://issues.jenkins-ci.org/browse/JENKINS-45990?focusedCommentId=338239&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel | CC-MAIN-2020-10 | refinedweb | 466 | 52.7 |
csOBB Class Reference
[Geometry utilities]
Oriented bounding box (OBB). More...
#include <csgeom/obb.h>
Detailed Description
Oriented bounding box (OBB).
This is basically a csBox3 with a matrix to rotate it.
Definition at line 42 of file obb.h.
Constructor & Destructor Documentation
Construct an OBB from the three given vectors.
This will setup the orientation. dir1 are the two vertices furthest appart. dir2 is the two vertices after moving them to the plane perpendicular to dir1 and dir3 is the cross of dir1 and dir2.
Member Function Documentation
Get the diameter of this OBB.
Given the table of vertices find a csOBB that matches this table.
This is a faster version that FindOBBAccurate() but it is less accurate.
Return every corner of this bounding box from 0 to 7.
This contrasts with Min() and Max() because those are only the min and max corners. Corner 0 = xyz, 1 = xyZ, 2 = xYz, 3 = xYZ, 4 = Xyz, 5 = XyZ, 6 = XYz, 7 = XYZ. Use CS_BOX_CORNER_xyz etc. defines. CS_BOX_CENTER3 also works.
Reimplemented from csBox3.
Get the volume of this OBB.
The documentation for this class was generated from the following file:
Generated for Crystal Space 2.1 by doxygen 1.6.1 | http://www.crystalspace3d.org/docs/online/api/classcsOBB.html | CC-MAIN-2014-10 | refinedweb | 199 | 61.63 |
Xamarin.Studio, during synchronization with the iOS project in xCode, something goes wrong and duplicate view controller classes are placed into the root of the project. In my case I have a folder called "ViewControllers" where all my view controllers reside ([Project Root]/ViewControllers/). This can be very annoying because if you have a ton of view controllers it will duplicate every one of them.
This also happened in MonoTouch/MonoDevelop previously.
The only way to remedy the problem is to manually go and delete all the duplicates. Incidentally, the duplicates don't have the same code behind, rather they are just a class sub. This causes a ton of compile errors so I have to manually delete them.
Created attachment 3501 [details]
Shows how the view controllers are normally
Created attachment 3502 [details]
Shows view controllers scattered into the root after sync with XCode
Note this may happen after trying to remove a duplicate or misnamed property on the XCode side, but I am not sure since it seems so random.
I happened again this morning. I did delete several old controllers this morning and I received several "Communication errors" with Xamarin Studio while trying to interface with XCode. This is also a Storyboard project if that helps.
Since this happens on other machines, my gut feeling is that this is not an install related issue. My other gut feeling is that this might be due to nesting of folders, then the folders don't get pushed to Xcode properly, so Xamarin throws them into the root of the project. Just some theories at this point, nothing solid to go on.
Created attachment 3510 [details]
Here is the massive amount of errors it generates
This only gets worse as the project gets bigger.
Here is an example of the stub it generates behind the Bogus View Controllers.
// This file has been autogenerated from parsing an Objective-C header file added in Xcode.
using System;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace iECDDatasource
{
public partial class MenuViewController : UIViewController
{
public MenuViewController (IntPtr handle) : base (handle)
{
}
}
}
Created attachment 3511 [details]
Error List
So here are the actual compile errors which as you would expect just tell me the controllers are already defined elsewhere.
The stub classes are generated based on header files that it finds in the Xcode project when it can't find the corresponding C# classes in the MonoTouch project.
It will also generate class stubs for classes defined in the storyboard files.
Can you walk me through what you did exactly? I need to know:
1. when did you delete the c# classes? before opening Xcode? or after?
2. were there header files for the deleted classes in the Xcode project?
3. are there any references to these classes in the storyboard files?
1. I would have to say after but I can't be entirely sure. One of the problems is that you don't know anything bad happened until you go to compile.
2. I deleted from Xamarin Studio, and the existing xcode window was open but I did not check to see if the files were in the xcode project. There is also the possibility this is happening when I delete the .xib files from Xamarin studio. I do this because it is a storyboard project.
3. The view controllers in the storyboard do reference these files but they referrence the view controllers nested in the "View Controllers" folder in Xamarin Studio. In other words, I select the view controller in the drop down in Xcode for each view controller in the storyboard. Remember that these bogus controllers are all actual controllers but they are copies.
So it sounds like that for whatever reason X-Studio is not walking the folders to see if there are already viewcontrollers with those names and that those names are found in xcode under the same "groups" In other words it should never replicate back from XCode what doesn't exist in Xamarin first.
When it syncs classes back from Xcode, it doesn't walk the folder tree of the MonoTouch project looking for files of the same name (because it can't rely on that). What it does is use the type system (the same one used for "Go To Definition", etc) to check if the class exists in the C# project, and, if not, creates a new stub.
Anyway, #2 is my biggest suspect right now. I don't think we aggressively sync back to Xcode when files are deleted. I think there's another bug report about that... so this is probably the cause.
IOW, I suspect this is the scenario:
You launch Xcode on a .xib or storyboard, switch back to Xamarin Studio and then delete some classes before switching back to Xcode again. If Xamarin Studio didn't delete the .h files for the classes that got deleted, then you'll still have them in the Xcode project...
When you switch back to Xamarin Studio again, it'll find those .h files and not be able to map them to any existing C# classes (because you deleted them) and so it'll think they are new and generate C# stubs for them.
Anyway, this is just a theory at this point.
This might be relevent but here are the steps I take to create view
controllers.
1. Right Click on the folder I want the controllers in (Xamarin Studio)
2. Select "Add New File"
3. Specify the name of the controller and add it.
4. Delete the .xib file that is generated automatically (sometimes it errors
out here or doesn't delete the .xib at all)
5. An instance of XCode may or may not be running at this time.
6. Double click on my MainStoryBoard.storyboard file in Xamarin Studio
7. Find the already created View Controller in my storyboard within XCode.
8. Click on the View Controller in XCode
9. Go to the "Properties" docked to the right side of the XCode window.
10. Find my new ViewController created in step 3 above and select it in the
custom class drop down.
11. Navigate back to Xamarin studio and the two environments sync.
Other things that may happen here...
I might name the new controller something bad so I delete and recreate it
Jeff, one thing more to note here. It isn't just the deleted files that show up in the root of my project. It is about every controller in my project that is copied to the root of my Xamarin project.
So as the project grows it only gets worse.
Ah, thanks for clarifying that.
Matt,
When you rename your classes in Xamarin Studio, are you editing the .designer.cs file that goes along with it to update the [Register] attribute? If not, I think that's the problem...
When you edit your .storyboard in Xcode and select a class you want to use, you are probably typing the name of the class you want (but for which no classes in Xamarin Studio are registered as), and so when you switch back to Xamarin Studio, it detects that none of your classes are registered as "PendingRTMViewController" so creates one.
We should probably make sure you don't already have a class named the same, but we've been using the name given in the [Register] attribute because that's the name that gets registered with the Objective-C runtime and is therefore the one that gets used by the storyboard.
I've committed a fix to the logic that parses through .storyboard files when syncing back from Xcode to double-check that a class by that name doesn't already exist with the wrong [Register] attribute. If it does exist, Xamarin Studio will now prompt the user to see if they would like to update the [Register] attribute (and updates it for them if they say "Yes").
I've uploaded a custom build with my fixes (no QA has been done) that you are free to try out:
This bug remains a problem and is not fixed. Synchronization errors still occur on a fairly regular basis.
The latest problem related with synchronization, in addition to the above, is some files vanish from the project and have to be manually added back in. This has caused me to b embarrassed in meetings twice from runtime failures because the xib files had mysteriously been removed from the project.
Additionally, and at random times, images will vanish from the project and have to be re-added.
I think that Xamarin Studio 4.0.5 will fix the removed files issues - someone else reported that issue and I fixed it for him.
I've also made more fixes related to your original bug that made it into 4.0.5.
Any chance you could test it out?
The error happened yesterday and it prompted me with the new messagebox. I answered the message box telling it to keep my current view controllers, but this appeared to break the synchronization badly. Now when I add a button or view to the view controller in XCode, the new control is not synched back to to Xamarin Studio.
I tried to close both environments and reopen but this did not fix the issue. Right now I have to manually add the controls on the xamarin side. This is in version 4.0.5 using storyboards.
I hate to whine but this is really causing me some serious headaches.
Next time this happens, can you get me the Xcode4Sync.log file from ~/Library/Logs/XamarinStudio-4.0/? Thanks.
I'll try to paste any synch errors I get to this ticket.
Created attachment 4043 [details]
Sync Error 5-30-2013
I have no logs for Xamarin in /Libarary/Logs/
The dialog screenshot suggests a bug in the Types database for your project. I'll have Mike look into this.
The logs aren't in /Library/Logs, they are in ~/Library/Logs (~ means your home directory).
So probably something like /Users/matt/Library/Logs/XamarinStudio-4.0/Xcode4Sync.log
Created attachment 4044 [details]
Error Log 5-3002013
Created attachment 4045 [details]
Another log from 5-30
awesome, thanks matt
Mike: it seems the problem is that the DOM we get from the TypeSystemService is incomplete or something. Can you look into this? Our users keep running into this issue.
Jeff: If you can give me a reproduction case.
The type system service listens to:
project.FileAddedToProject event - if you add something ensure that this is running.
If you modify a file (rewrite it) - you need to issue a FileService.FileChanged event.
When both is done the type system service should work.
If you need immediately a new compilation you need to manually reparse the file with TypeSystemService.ParseFile (fileName) - that'll block the current thread but will update the project content.
Unfortunately I don't have a reproduction case and myself have never been able to reproduce this.
The Xcode syncing code never does anything to inhibit emissions of FileAddedToProject, so that's not the problem.
The Xcode syncing logic also calls FileService.FileChanged() on all files that are changed when syncing back from Xcode.
We never manually parse any C# files, we just ask the TypeSystemService for the current state.
ok, found some places where the Xcode syncing code didn't call FileService.NotifyFileChanged() where it maybe should have.
It happened again this morning but this time when adding a new image to the root of the project. I put a screenshot and debug file above. I am using alpha version 4.1.3
Created attachment 4063 [details]
Failed when adding an image to the root.
Created attachment 4064 [details]
Log file showing error when adding a .png file to the root of my project
The only way you are probably going to recreate this, is to create a very large and diverse project which would typically be found in enterprise business apps. Once you do this, you need to make sure you are only using xCode with storyboards. At that point you might have a chance to make it happen. I think just looking at the code is a hail Mary attempt at finding the solution. It happens to me about twice a week.
Hi Matt,
Could you give this a try?
That's a 4.0.x release with the fixes I've implemented for this bug. I'm not sure if my patches have been merged into the 4.1.x branch yet, but I'll merge them up if they aren't. | https://xamarin.github.io/bugzilla-archives/10/10737/bug.html | CC-MAIN-2019-43 | refinedweb | 2,098 | 73.37 |
1 2 NEWS 3 ==== 4 5 This file gives a brief overview of the major changes between each OpenSSL 6 release. For more details please read the CHANGES file. 7 8 Major changes between OpenSSL 1.0.2p and OpenSSL 1.0.2q [20 Nov 2018] 9 10 o Microarchitecture timing vulnerability in ECC scalar multiplication (CVE-2018-5407) 11 o Timing vulnerability in DSA signature generation (CVE-2018-0734) 12 13 Major changes between OpenSSL 1.0.2o and OpenSSL 1.0.2p [14 Aug 2018] 14 15 o Client DoS due to large DH parameter (CVE-2018-0732) 16 o Cache timing vulnerability in RSA Key Generation (CVE-2018-0737) 17 18 Major changes between OpenSSL 1.0.2n and OpenSSL 1.0.2o [27 Mar 2018] 19 20 o Constructed ASN.1 types with a recursive definition could exceed the 21 stack (CVE-2018-0739) 22 23 Major changes between OpenSSL 1.0.2m and OpenSSL 1.0.2n [7 Dec 2017] 24 25 o Read/write after SSL object in error state (CVE-2017-3737) 26 o rsaz_1024_mul_avx2 overflow bug on x86_64 (CVE-2017-3738) 27 28 Major changes between OpenSSL 1.0.2l and OpenSSL 1.0.2m [2 Nov 2017] 29 30 o bn_sqrx8x_internal carry bug on x86_64 (CVE-2017-3736) 31 o Malformed X.509 IPAddressFamily could cause OOB read (CVE-2017-3735) 32 33 Major changes between OpenSSL 1.0.2k and OpenSSL 1.0.2l [25 May 2017] 34 35 o config now recognises 64-bit mingw and chooses mingw64 instead of mingw 36 37 Major changes between OpenSSL 1.0.2j and OpenSSL 1.0.2k [26 Jan 2017] 38 39 o Truncated packet could crash via OOB read (CVE-2017-3731) 40 o BN_mod_exp may produce incorrect results on x86_64 (CVE-2017-3732) 41 o Montgomery multiplication may produce incorrect results (CVE-2016-7055) 42 43 Major changes between OpenSSL 1.0.2i and OpenSSL 1.0.2j [26 Sep 2016] 44 45 o Missing CRL sanity check (CVE-2016-7052) 46 47 Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] 48 49 o OCSP Status Request extension unbounded memory growth (CVE-2016-6304) 50 o SWEET32 Mitigation (CVE-2016-2183) 51 o OOB write in MDC2_Update() (CVE-2016-6303) 52 o Malformed SHA512 ticket DoS (CVE-2016-6302) 53 o OOB write in BN_bn2dec() (CVE-2016-2182) 54 o OOB read in TS_OBJ_print_bio() (CVE-2016-2180) 55 o Pointer arithmetic undefined behaviour (CVE-2016-2177) 56 o Constant time flag not preserved in DSA signing (CVE-2016-2178) 57 o DTLS buffered message DoS (CVE-2016-2179) 58 o DTLS replay protection DoS (CVE-2016-2181) 59 o Certificate message OOB reads (CVE-2016-6306) 60 61 Major changes between OpenSSL 1.0.2g and OpenSSL 1.0.2h [3 May 2016] 62 63 o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107) 64 o Fix EVP_EncodeUpdate overflow (CVE-2016-2105) 65 o Fix EVP_EncryptUpdate overflow (CVE-2016-2106) 66 o Prevent ASN.1 BIO excessive memory allocation (CVE-2016-2109) 67 o EBCDIC overread (CVE-2016-2176) 68 o Modify behavior of ALPN to invoke callback after SNI/servername 69 callback, such that updates to the SSL_CTX affect ALPN. 70 o Remove LOW from the DEFAULT cipher list. This removes singles DES from 71 the default. 72 o Only remove the SSLv2 methods with the no-ssl2-method option. 73 74 Major changes between OpenSSL 1.0.2f and OpenSSL 1.0.2g [1 Mar 2016] 75 76 o Disable weak ciphers in SSLv3 and up in default builds of OpenSSL. 77 o Disable SSLv2 default build, default negotiation and weak ciphers 78 (CVE-2016-0800) 79 o Fix a double-free in DSA code (CVE-2016-0705) 80 o Disable SRP fake user seed to address a server memory leak 81 (CVE-2016-0798) 82 o Fix BN_hex2bn/BN_dec2bn NULL pointer deref/heap corruption 83 (CVE-2016-0797) 84 o Fix memory issues in BIO_*printf functions (CVE-2016-0799) 85 o Fix side channel attack on modular exponentiation (CVE-2016-0702) 86 87 Major changes between OpenSSL 1.0.2e and OpenSSL 1.0.2f [28 Jan 2016] 88 89 o DH small subgroups (CVE-2016-0701) 90 o SSLv2 doesn't block disabled ciphers (CVE-2015-3197) 91 92 Major changes between OpenSSL 1.0.2d and OpenSSL 1.0.2e [3 Dec 2015] 93 94 o BN_mod_exp may produce incorrect results on x86_64 (CVE-2015-3193) 95 o Certificate verify crash with missing PSS parameter (CVE-2015-3194) 96 o X509_ATTRIBUTE memory leak (CVE-2015-3195) 97 o Rewrite EVP_DecodeUpdate (base64 decoding) to fix several bugs 98 o In DSA_generate_parameters_ex, if the provided seed is too short, 99 return an error 100 101 Major changes between OpenSSL 1.0.2c and OpenSSL 1.0.2d [9 Jul 2015] 102 103 o Alternate chains certificate forgery (CVE-2015-1793) 104 o Race condition handling PSK identify hint (CVE-2015-3196) 105 106 Major changes between OpenSSL 1.0.2b and OpenSSL 1.0.2c [12 Jun 2015] 107 108 o Fix HMAC ABI incompatibility 109 110 Major changes between OpenSSL 1.0.2a and OpenSSL 1.0.2b [11 Jun 2015] 111 112 o Malformed ECParameters causes infinite loop (CVE-2015-1788) 113 o Exploitable out-of-bounds read in X509_cmp_time (CVE-2015-1789) 114 o PKCS7 crash with missing EnvelopedContent (CVE-2015-1790) 115 o CMS verify infinite loop with unknown hash function (CVE-2015-1792) 116 o Race condition handling NewSessionTicket (CVE-2015-1791) 117 118 Major changes between OpenSSL 1.0.2 and OpenSSL 1.0.2a [19 Mar 2015] 119 120 o OpenSSL 1.0.2 ClientHello sigalgs DoS fix (CVE-2015-0291) 121 o Multiblock corrupted pointer fix (CVE-2015-0290) 122 o Segmentation fault in DTLSv1_listen fix (CVE-2015-0207) 123 o Segmentation fault in ASN1_TYPE_cmp fix (CVE-2015-0286) 124 o Segmentation fault for invalid PSS parameters fix (CVE-2015-0208) 125 o ASN.1 structure reuse memory corruption fix (CVE-2015-0287) 126 o PKCS7 NULL pointer dereferences fix (CVE-2015-0289) 127 o DoS via reachable assert in SSLv2 servers fix (CVE-2015-0293) 128 o Empty CKE with client auth and DHE fix (CVE-2015-1787) 129 o Handshake with unseeded PRNG fix (CVE-2015-0285) 130 o Use After Free following d2i_ECPrivatekey error fix (CVE-2015-0209) 131 o X509_to_X509_REQ NULL pointer deref fix (CVE-2015-0288) 132 o Removed the export ciphers from the DEFAULT ciphers 133 134 Major changes between OpenSSL 1.0.1l and OpenSSL 1.0.2 [22 Jan 2015]: 135 136 o Suite B support for TLS 1.2 and DTLS 1.2 137 o Support for DTLS 1.2 138 o TLS automatic EC curve selection. 139 o API to set TLS supported signature algorithms and curves 140 o SSL_CONF configuration API. 141 o TLS Brainpool support. 142 o ALPN support. 143 o CMS support for RSA-PSS, RSA-OAEP, ECDH and X9.42 DH. 144 145 Major changes between OpenSSL 1.0.1k and OpenSSL 1.0.1l [15 Jan 2015] 146 147 o Build fixes for the Windows and OpenVMS platforms 148 149 Major changes between OpenSSL 1.0.1j and OpenSSL 1.0.1k [8 Jan 2015] 150 151 o Fix for CVE-2014-3571 152 o Fix for CVE-2015-0206 153 o Fix for CVE-2014-3569 154 o Fix for CVE-2014-3572 155 o Fix for CVE-2015-0204 156 o Fix for CVE-2015-0205 157 o Fix for CVE-2014-8275 158 o Fix for CVE-2014-3570 159 160 Major changes between OpenSSL 1.0.1i and OpenSSL 1.0.1j [15 Oct 2014] 161 162 o Fix for CVE-2014-3513 163 o Fix for CVE-2014-3567 164 o Mitigation for CVE-2014-3566 (SSL protocol vulnerability) 165 o Fix for CVE-2014-3568 166 167 Major changes between OpenSSL 1.0.1h and OpenSSL 1.0.1i [6 Aug 2014] 168 169 o Fix for CVE-2014-3512 170 o Fix for CVE-2014-3511 171 o Fix for CVE-2014-3510 172 o Fix for CVE-2014-3507 173 o Fix for CVE-2014-3506 174 o Fix for CVE-2014-3505 175 o Fix for CVE-2014-3509 176 o Fix for CVE-2014-5139 177 o Fix for CVE-2014-3508 178 179 Major changes between OpenSSL 1.0.1g and OpenSSL 1.0.1h [5 Jun 2014] 180 181 o Fix for CVE-2014-0224 182 o Fix for CVE-2014-0221 183 o Fix for CVE-2014-0198 184 o Fix for CVE-2014-0195 185 o Fix for CVE-2014-3470 186 o Fix for CVE-2010-5298 187 188 Major changes between OpenSSL 1.0.1f and OpenSSL 1.0.1g [7 Apr 2014] 189 190 o Fix for CVE-2014-0160 191 o Add TLS padding extension workaround for broken servers. 192 o Fix for CVE-2014-0076 193 194 Major changes between OpenSSL 1.0.1e and OpenSSL 1.0.1f [6 Jan 2014] 195 196 o Don't include gmt_unix_time in TLS server and client random values 197 o Fix for TLS record tampering bug CVE-2013-4353 198 o Fix for TLS version checking bug CVE-2013-6449 199 o Fix for DTLS retransmission bug CVE-2013-6450 200 201 Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e [11 Feb 2013]: 202 203 o Corrected fix for CVE-2013-0169 204 205 Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d [4 Feb 2013]: 206 207 o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version. 208 o Include the fips configuration module. 209 o Fix OCSP bad key DoS attack CVE-2013-0166 210 o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 211 o Fix for TLS AESNI record handling flaw CVE-2012-2686 212 213 Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c [10 May 2012]: 214 215 o Fix TLS/DTLS record length checking bug CVE-2012-2333 216 o Don't attempt to use non-FIPS composite ciphers in FIPS mode. 217 218 Major changes between OpenSSL 1.0.1a and OpenSSL 1.0.1b [26 Apr 2012]: 219 220 o Fix compilation error on non-x86 platforms. 221 o Make FIPS capable OpenSSL ciphers work in non-FIPS mode. 222 o Fix SSL_OP_NO_TLSv1_1 clash with SSL_OP_ALL in OpenSSL 1.0.0 223 224 Major changes between OpenSSL 1.0.1 and OpenSSL 1.0.1a [19 Apr 2012]: 225 226 o Fix for ASN1 overflow bug CVE-2012-2110 227 o Workarounds for some servers that hang on long client hellos. 228 o Fix SEGV in AES code. 229 230 Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.1 [14 Mar 2012]: 231 232 o TLS/DTLS heartbeat support. 233 o SCTP support. 234 o RFC 5705 TLS key material exporter. 235 o RFC 5764 DTLS-SRTP negotiation. 236 o Next Protocol Negotiation. 237 o PSS signatures in certificates, requests and CRLs. 238 o Support for password based recipient info for CMS. 239 o Support TLS v1.2 and TLS v1.1. 240 o Preliminary FIPS capability for unvalidated 2.0 FIPS module. 241 o SRP support. 242 243 Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h [12 Mar 2012]: 244 245 o Fix for CMS/PKCS#7 MMA CVE-2012-0884 246 o Corrected fix for CVE-2011-4619 247 o Various DTLS fixes. 248 249 Major changes between OpenSSL 1.0.0f and OpenSSL 1.0.0g [18 Jan 2012]: 250 251 o Fix for DTLS DoS issue CVE-2012-0050 252 253 Major changes between OpenSSL 1.0.0e and OpenSSL 1.0.0f [4 Jan 2012]: 254 255 o Fix for DTLS plaintext recovery attack CVE-2011-4108 256 o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 257 o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 258 o Check parameters are not NULL in GOST ENGINE CVE-2012-0027 259 o Check for malformed RFC3779 data CVE-2011-4577 260 261 Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e [6 Sep 2011]: 262 263 o Fix for CRL vulnerability issue CVE-2011-3207 264 o Fix for ECDH crashes CVE-2011-3210 265 o Protection against EC timing attacks. 266 o Support ECDH ciphersuites for certificates using SHA2 algorithms. 267 o Various DTLS fixes. 268 269 Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d [8 Feb 2011]: 270 271 o Fix for security issue CVE-2011-0014 272 273 Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c [2 Dec 2010]: 274 275 o Fix for security issue CVE-2010-4180 276 o Fix for CVE-2010-4252 277 o Fix mishandling of absent EC point format extension. 278 o Fix various platform compilation issues. 279 o Corrected fix for security issue CVE-2010-3864. 280 281 Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b [16 Nov 2010]: 282 283 o Fix for security issue CVE-2010-3864. 284 o Fix for CVE-2010-2939 285 o Fix WIN32 build system for GOST ENGINE. 286 287 Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a [1 Jun 2010]: 288 289 o Fix for security issue CVE-2010-1633. 290 o GOST MAC and CFB fixes. 291 292 Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0 [29 Mar 2010]: 293 294 o RFC3280 path validation: sufficient to process PKITS tests. 295 o Integrated support for PVK files and keyblobs. 296 o Change default private key format to PKCS#8. 297 o CMS support: able to process all examples in RFC4134 298 o Streaming ASN1 encode support for PKCS#7 and CMS. 299 o Multiple signer and signer add support for PKCS#7 and CMS. 300 o ASN1 printing support. 301 o Whirlpool hash algorithm added. 302 o RFC3161 time stamp support. 303 o New generalised public key API supporting ENGINE based algorithms. 304 o New generalised public key API utilities. 305 o New ENGINE supporting GOST algorithms. 306 o SSL/TLS GOST ciphersuite support. 307 o PKCS#7 and CMS GOST support. 308 o RFC4279 PSK ciphersuite support. 309 o Supported points format extension for ECC ciphersuites. 310 o ecdsa-with-SHA224/256/384/512 signature types. 311 o dsa-with-SHA224 and dsa-with-SHA256 signature types. 312 o Opaque PRF Input TLS extension support. 313 o Updated time routines to avoid OS limitations. 314 315 Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n [24 Mar 2010]: 316 317 o CFB cipher definition fixes. 318 o Fix security issues CVE-2010-0740 and CVE-2010-0433. 319 320 Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m [25 Feb 2010]: 321 322 o Cipher definition fixes. 323 o Workaround for slow RAND_poll() on some WIN32 versions. 324 o Remove MD2 from algorithm tables. 325 o SPKAC handling fixes. 326 o Support for RFC5746 TLS renegotiation extension. 327 o Compression memory leak fixed. 328 o Compression session resumption fixed. 329 o Ticket and SNI coexistence fixes. 330 o Many fixes to DTLS handling. 331 332 Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l [5 Nov 2009]: 333 334 o Temporary work around for CVE-2009-3555: disable renegotiation. 335 336 Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k [25 Mar 2009]: 337 338 o Fix various build issues. 339 o Fix security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789) 340 341 Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j [7 Jan 2009]: 342 343 o Fix security issue (CVE-2008-5077) 344 o Merge FIPS 140-2 branch code. 345 346 Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h [28 May 2008]: 347 348 o CryptoAPI ENGINE support. 349 o Various precautionary measures. 350 o Fix for bugs affecting certificate request creation. 351 o Support for local machine keyset attribute in PKCS#12 files. 352 353 Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g [19 Oct 2007]: 354 355 o Backport of CMS functionality to 0.9.8. 356 o Fixes for bugs introduced with 0.9.8f. 357 358 Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f [11 Oct 2007]: 359 360 o Add gcc 4.2 support. 361 o Add support for AES and SSE2 assembly lanugauge optimization 362 for VC++ build. 363 o Support for RFC4507bis and server name extensions if explicitly 364 selected at compile time. 365 o DTLS improvements. 366 o RFC4507bis support. 367 o TLS Extensions support. 368 369 Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e [23 Feb 2007]: 370 371 o Various ciphersuite selection fixes. 372 o RFC3779 support. 373 374 Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d [28 Sep 2006]: 375 376 o Introduce limits to prevent malicious key DoS (CVE-2006-2940) 377 o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) 378 o Changes to ciphersuite selection algorithm 379 380 Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c [5 Sep 2006]: 381 382 o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 383 o New cipher Camellia 384 385 Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b [4 May 2006]: 386 387 o Cipher string fixes. 388 o Fixes for VC++ 2005. 389 o Updated ECC cipher suite support. 390 o New functions EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free(). 391 o Zlib compression usage fixes. 392 o Built in dynamic engine compilation support on Win32. 393 o Fixes auto dynamic engine loading in Win32. 394 395 Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a [11 Oct 2005]: 396 397 o Fix potential SSL 2.0 rollback, CVE-2005-2969 398 o Extended Windows CE support 399 400 Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8 [5 Jul 2005]: 401 402 o Major work on the BIGNUM library for higher efficiency and to 403 make operations more streamlined and less contradictory. This 404 is the result of a major audit of the BIGNUM library. 405 o Addition of BIGNUM functions for fields GF(2^m) and NIST 406 curves, to support the Elliptic Crypto functions. 407 o Major work on Elliptic Crypto; ECDH and ECDSA added, including 408 the use through EVP, X509 and ENGINE. 409 o New ASN.1 mini-compiler that's usable through the OpenSSL 410 configuration file. 411 o Added support for ASN.1 indefinite length constructed encoding. 412 o New PKCS#12 'medium level' API to manipulate PKCS#12 files. 413 o Complete rework of shared library construction and linking 414 programs with shared or static libraries, through a separate 415 Makefile.shared. 416 o Rework of the passing of parameters from one Makefile to another. 417 o Changed ENGINE framework to load dynamic engine modules 418 automatically from specifically given directories. 419 o New structure and ASN.1 functions for CertificatePair. 420 o Changed the ZLIB compression method to be stateful. 421 o Changed the key-generation and primality testing "progress" 422 mechanism to take a structure that contains the ticker 423 function and an argument. 424 o New engine module: GMP (performs private key exponentiation). 425 o New engine module: VIA PadLOck ACE extension in VIA C3 426 Nehemiah processors. 427 o Added support for IPv6 addresses in certificate extensions. 428 See RFC 1884, section 2.2. 429 o Added support for certificate policy mappings, policy 430 constraints and name constraints. 431 o Added support for multi-valued AVAs in the OpenSSL 432 configuration file. 433 o Added support for multiple certificates with the same subject 434 in the 'openssl ca' index file. 435 o Make it possible to create self-signed certificates using 436 'openssl ca -selfsign'. 437 o Make it possible to generate a serial number file with 438 'openssl ca -create_serial'. 439 o New binary search functions with extended functionality. 440 o New BUF functions. 441 o New STORE structure and library to provide an interface to all 442 sorts of data repositories. Supports storage of public and 443 private keys, certificates, CRLs, numbers and arbitrary blobs. 444 This library is unfortunately unfinished and unused withing 445 OpenSSL. 446 o New control functions for the error stack. 447 o Changed the PKCS#7 library to support one-pass S/MIME 448 processing. 449 o Added the possibility to compile without old deprecated 450 functionality with the OPENSSL_NO_DEPRECATED macro or the 451 'no-deprecated' argument to the config and Configure scripts. 452 o Constification of all ASN.1 conversion functions, and other 453 affected functions. 454 o Improved platform support for PowerPC. 455 o New FIPS 180-2 algorithms (SHA-224, -256, -384 and -512). 456 o New X509_VERIFY_PARAM structure to support parametrisation 457 of X.509 path validation. 458 o Major overhaul of RC4 performance on Intel P4, IA-64 and 459 AMD64. 460 o Changed the Configure script to have some algorithms disabled 461 by default. Those can be explicitely enabled with the new 462 argument form 'enable-xxx'. 463 o Change the default digest in 'openssl' commands from MD5 to 464 SHA-1. 465 o Added support for DTLS. 466 o New BIGNUM blinding. 467 o Added support for the RSA-PSS encryption scheme 468 o Added support for the RSA X.931 padding. 469 o Added support for BSD sockets on NetWare. 470 o Added support for files larger than 2GB. 471 o Added initial support for Win64. 472 o Added alternate pkg-config files. 473 474 Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m [23 Feb 2007]: 475 476 o FIPS 1.1.1 module linking. 477 o Various ciphersuite selection fixes. 478 479 Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l [28 Sep 2006]: 480 481 o Introduce limits to prevent malicious key DoS (CVE-2006-2940) 482 o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343) 483 484 Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k [5 Sep 2006]: 485 486 o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339 487 488 Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j [4 May 2006]: 489 490 o Visual C++ 2005 fixes. 491 o Update Windows build system for FIPS. 492 493 Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i [14 Oct 2005]: 494 495 o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build. 496 497 Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h [11 Oct 2005]: 498 499 o Fix SSL 2.0 Rollback, CVE-2005-2969 500 o Allow use of fixed-length exponent on DSA signing 501 o Default fixed-window RSA, DSA, DH private-key operations 502 503 Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g [11 Apr 2005]: 504 505 o More compilation issues fixed. 506 o Adaptation to more modern Kerberos API. 507 o Enhanced or corrected configuration for Solaris64, Mingw and Cygwin. 508 o Enhanced x86_64 assembler BIGNUM module. 509 o More constification. 510 o Added processing of proxy certificates (RFC 3820). 511 512 Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f [22 Mar 2005]: 513 514 o Several compilation issues fixed. 515 o Many memory allocation failure checks added. 516 o Improved comparison of X509 Name type. 517 o Mandatory basic checks on certificates. 518 o Performance improvements. 519 520 Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e [25 Oct 2004]: 521 522 o Fix race condition in CRL checking code. 523 o Fixes to PKCS#7 (S/MIME) code. 524 525 Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d [17 Mar 2004]: 526 527 o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug 528 o Security: Fix null-pointer assignment in do_change_cipher_spec() 529 o Allow multiple active certificates with same subject in CA index 530 o Multiple X509 verification fixes 531 o Speed up HMAC and other operations 532 533 Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c [30 Sep 2003]: 534 535 o Security: fix various ASN1 parsing bugs. 536 o New -ignore_err option to OCSP utility. 537 o Various interop and bug fixes in S/MIME code. 538 o SSL/TLS protocol fix for unrequested client certificates. 539 540 Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b [10 Apr 2003]: 541 542 o Security: counter the Klima-Pokorny-Rosa extension of 543 Bleichbacher's attack 544 o Security: make RSA blinding default. 545 o Configuration: Irix fixes, AIX fixes, better mingw support. 546 o Support for new platforms: linux-ia64-ecc. 547 o Build: shared library support fixes. 548 o ASN.1: treat domainComponent correctly. 549 o Documentation: fixes and additions. 550 551 Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a [19 Feb 2003]: 552 553 o Security: Important security related bugfixes. 554 o Enhanced compatibility with MIT Kerberos. 555 o Can be built without the ENGINE framework. 556 o IA32 assembler enhancements. 557 o Support for new platforms: FreeBSD/IA64 and FreeBSD/Sparc64. 558 o Configuration: the no-err option now works properly. 559 o SSL/TLS: now handles manual certificate chain building. 560 o SSL/TLS: certain session ID malfunctions corrected. 561 562 Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7 [30 Dec 2002]: 563 564 o New library section OCSP. 565 o Complete rewrite of ASN1 code. 566 o CRL checking in verify code and openssl utility. 567 o Extension copying in 'ca' utility. 568 o Flexible display options in 'ca' utility. 569 o Provisional support for international characters with UTF8. 570 o Support for external crypto devices ('engine') is no longer 571 a separate distribution. 572 o New elliptic curve library section. 573 o New AES (Rijndael) library section. 574 o Support for new platforms: Windows CE, Tandem OSS, A/UX, AIX 64-bit, 575 Linux x86_64, Linux 64-bit on Sparc v9 576 o Extended support for some platforms: VxWorks 577 o Enhanced support for shared libraries. 578 o Now only builds PIC code when shared library support is requested. 579 o Support for pkg-config. 580 o Lots of new manuals. 581 o Makes symbolic links to or copies of manuals to cover all described 582 functions. 583 o Change DES API to clean up the namespace (some applications link also 584 against libdes providing similar functions having the same name). 585 Provide macros for backward compatibility (will be removed in the 586 future). 587 o Unify handling of cryptographic algorithms (software and engine) 588 to be available via EVP routines for asymmetric and symmetric ciphers. 589 o NCONF: new configuration handling routines. 590 o Change API to use more 'const' modifiers to improve error checking 591 and help optimizers. 592 o Finally remove references to RSAref. 593 o Reworked parts of the BIGNUM code. 594 o Support for new engines: Broadcom ubsec, Accelerated Encryption 595 Processing, IBM 4758. 596 o A few new engines added in the demos area. 597 o Extended and corrected OID (object identifier) table. 598 o PRNG: query at more locations for a random device, automatic query for 599 EGD style random sources at several locations. 600 o SSL/TLS: allow optional cipher choice according to server's preference. 601 o SSL/TLS: allow server to explicitly set new session ids. 602 o SSL/TLS: support Kerberos cipher suites (RFC2712). 603 Only supports MIT Kerberos for now. 604 o SSL/TLS: allow more precise control of renegotiations and sessions. 605 o SSL/TLS: add callback to retrieve SSL/TLS messages. 606 o SSL/TLS: support AES cipher suites (RFC3268). 607 608 Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k [30 Sep 2003]: 609 610 o Security: fix various ASN1 parsing bugs. 611 o SSL/TLS protocol fix for unrequested client certificates. 612 613 Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j [10 Apr 2003]: 614 615 o Security: counter the Klima-Pokorny-Rosa extension of 616 Bleichbacher's attack 617 o Security: make RSA blinding default. 618 o Build: shared library support fixes. 619 620 Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i [19 Feb 2003]: 621 622 o Important security related bugfixes. 623 624 Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h [5 Dec 2002]: 625 626 o New configuration targets for Tandem OSS and A/UX. 627 o New OIDs for Microsoft attributes. 628 o Better handling of SSL session caching. 629 o Better comparison of distinguished names. 630 o Better handling of shared libraries in a mixed GNU/non-GNU environment. 631 o Support assembler code with Borland C. 632 o Fixes for length problems. 633 o Fixes for uninitialised variables. 634 o Fixes for memory leaks, some unusual crashes and some race conditions. 635 o Fixes for smaller building problems. 636 o Updates of manuals, FAQ and other instructive documents. 637 638 Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g [9 Aug 2002]: 639 640 o Important building fixes on Unix. 641 642 Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f [8 Aug 2002]: 643 644 o Various important bugfixes. 645 646 Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e [30 Jul 2002]: 647 648 o Important security related bugfixes. 649 o Various SSL/TLS library bugfixes. 650 651 Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d [9 May 2002]: 652 653 o Various SSL/TLS library bugfixes. 654 o Fix DH parameter generation for 'non-standard' generators. 655 656 Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c [21 Dec 2001]: 657 658 o Various SSL/TLS library bugfixes. 659 o BIGNUM library fixes. 660 o RSA OAEP and random number generation fixes. 661 o Object identifiers corrected and added. 662 o Add assembler BN routines for IA64. 663 o Add support for OS/390 Unix, UnixWare with gcc, OpenUNIX 8, 664 MIPS Linux; shared library support for Irix, HP-UX. 665 o Add crypto accelerator support for AEP, Baltimore SureWare, 666 Broadcom and Cryptographic Appliance's keyserver 667 [in 0.9.6c-engine release]. 668 669 Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b [9 Jul 2001]: 670 671 o Security fix: PRNG improvements. 672 o Security fix: RSA OAEP check. 673 o Security fix: Reinsert and fix countermeasure to Bleichbacher's 674 attack. 675 o MIPS bug fix in BIGNUM. 676 o Bug fix in "openssl enc". 677 o Bug fix in X.509 printing routine. 678 o Bug fix in DSA verification routine and DSA S/MIME verification. 679 o Bug fix to make PRNG thread-safe. 680 o Bug fix in RAND_file_name(). 681 o Bug fix in compatibility mode trust settings. 682 o Bug fix in blowfish EVP. 683 o Increase default size for BIO buffering filter. 684 o Compatibility fixes in some scripts. 685 686 Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a [5 Apr 2001]: 687 688 o Security fix: change behavior of OpenSSL to avoid using 689 environment variables when running as root. 690 o Security fix: check the result of RSA-CRT to reduce the 691 possibility of deducing the private key from an incorrectly 692 calculated signature. 693 o Security fix: prevent Bleichenbacher's DSA attack. 694 o Security fix: Zero the premaster secret after deriving the 695 master secret in DH ciphersuites. 696 o Reimplement SSL_peek(), which had various problems. 697 o Compatibility fix: the function des_encrypt() renamed to 698 des_encrypt1() to avoid clashes with some Unixen libc. 699 o Bug fixes for Win32, HP/UX and Irix. 700 o Bug fixes in BIGNUM, SSL, PKCS#7, PKCS#12, X.509, CONF and 701 memory checking routines. 702 o Bug fixes for RSA operations in threaded environments. 703 o Bug fixes in misc. openssl applications. 704 o Remove a few potential memory leaks. 705 o Add tighter checks of BIGNUM routines. 706 o Shared library support has been reworked for generality. 707 o More documentation. 708 o New function BN_rand_range(). 709 o Add "-rand" option to openssl s_client and s_server. 710 711 Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6 [10 Oct 2000]: 712 713 o Some documentation for BIO and SSL libraries. 714 o Enhanced chain verification using key identifiers. 715 o New sign and verify options to 'dgst' application. 716 o Support for DER and PEM encoded messages in 'smime' application. 717 o New 'rsautl' application, low level RSA utility. 718 o MD4 now included. 719 o Bugfix for SSL rollback padding check. 720 o Support for external crypto devices [1]. 721 o Enhanced EVP interface. 722 723 [1] The support for external crypto devices is currently a separate 724 distribution. See the file README.ENGINE. 725 726 Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a [1 Apr 2000]: 727 728 o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8 729 o Shared library support for HPUX and Solaris-gcc 730 o Support of Linux/IA64 731 o Assembler support for Mingw32 732 o New 'rand' application 733 o New way to check for existence of algorithms from scripts 734 735 Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5 [25 May 2000]: 736 737 o S/MIME support in new 'smime' command 738 o Documentation for the OpenSSL command line application 739 o Automation of 'req' application 740 o Fixes to make s_client, s_server work under Windows 741 o Support for multiple fieldnames in SPKACs 742 o New SPKAC command line utilty and associated library functions 743 o Options to allow passwords to be obtained from various sources 744 o New public key PEM format and options to handle it 745 o Many other fixes and enhancements to command line utilities 746 o Usable certificate chain verification 747 o Certificate purpose checking 748 o Certificate trust settings 749 o Support of authority information access extension 750 o Extensions in certificate requests 751 o Simplified X509 name and attribute routines 752 o Initial (incomplete) support for international character sets 753 o New DH_METHOD, DSA_METHOD and enhanced RSA_METHOD 754 o Read only memory BIOs and simplified creation function 755 o TLS/SSL protocol bugfixes: Accept TLS 'client hello' in SSL 3.0 756 record; allow fragmentation and interleaving of handshake and other 757 data 758 o TLS/SSL code now "tolerates" MS SGC 759 o Work around for Netscape client certificate hang bug 760 o RSA_NULL option that removes RSA patent code but keeps other 761 RSA functionality 762 o Memory leak detection now allows applications to add extra information 763 via a per-thread stack 764 o PRNG robustness improved 765 o EGD support 766 o BIGNUM library bug fixes 767 o Faster DSA parameter generation 768 o Enhanced support for Alpha Linux 769 o Experimental MacOS support 770 771 Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4 [9 Aug 1999]: 772 773 o Transparent support for PKCS#8 format private keys: these are used 774 by several software packages and are more secure than the standard 775 form 776 o PKCS#5 v2.0 implementation 777 o Password callbacks have a new void * argument for application data 778 o Avoid various memory leaks 779 o New pipe-like BIO that allows using the SSL library when actual I/O 780 must be handled by the application (BIO pair) 781 782 Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3 [24 May 1999]: 783 o Lots of enhancements and cleanups to the Configuration mechanism 784 o RSA OEAP related fixes 785 o Added `openssl ca -revoke' option for revoking a certificate 786 o Source cleanups: const correctness, type-safe stacks and ASN.1 SETs 787 o Source tree cleanups: removed lots of obsolete files 788 o Thawte SXNet, certificate policies and CRL distribution points 789 extension support 790 o Preliminary (experimental) S/MIME support 791 o Support for ASN.1 UTF8String and VisibleString 792 o Full integration of PKCS#12 code 793 o Sparc assembler bignum implementation, optimized hash functions 794 o Option to disable selected ciphers 795 796 Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b [22 Mar 1999]: 797 o Fixed a security hole related to session resumption 798 o Fixed RSA encryption routines for the p < q case 799 o "ALL" in cipher lists now means "everything except NULL ciphers" 800 o Support for Triple-DES CBCM cipher 801 o Support of Optimal Asymmetric Encryption Padding (OAEP) for RSA 802 o First support for new TLSv1 ciphers 803 o Added a few new BIOs (syslog BIO, reliable BIO) 804 o Extended support for DSA certificate/keys. 805 o Extended support for Certificate Signing Requests (CSR) 806 o Initial support for X.509v3 extensions 807 o Extended support for compression inside the SSL record layer 808 o Overhauled Win32 builds 809 o Cleanups and fixes to the Big Number (BN) library 810 o Support for ASN.1 GeneralizedTime 811 o Splitted ASN.1 SETs from SEQUENCEs 812 o ASN1 and PEM support for Netscape Certificate Sequences 813 o Overhauled Perl interface 814 o Lots of source tree cleanups. 815 o Lots of memory leak fixes. 816 o Lots of bug fixes. 817 818 Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c [23 Dec 1998]: 819 o Integration of the popular NO_RSA/NO_DSA patches 820 o Initial support for compression inside the SSL record layer 821 o Added BIO proxy and filtering functionality 822 o Extended Big Number (BN) library 823 o Added RIPE MD160 message digest 824 o Addeed support for RC2/64bit cipher 825 o Extended ASN.1 parser routines 826 o Adjustations of the source tree for CVS 827 o Support for various new platforms 828 | https://fossies.org/linux/openssl/NEWS | CC-MAIN-2018-51 | refinedweb | 6,487 | 68.06 |
Hi, I would like to get the price of database and add "$" in front of the price.
The price data type is number and the field name is "Price".
The code are below:
import wixData from 'wix-data';
$w.onReady(function () {
let price_text = $w("#dataset1").getCurrentItemIndex().Price; $w('text5').text = "$" + price_text; });
The log is
TypeError: Cannot ead propetty 'Price' of null
The problem is most likely that the dataset is not yet ready and therefore no item is returned. You should use the dataset onReady() function. Something like this:
Also note the following:
You need to use the field key (price) and not the field name (Price).
An element ID uses a hashtag. It is #text5 and not text5.
Good luck,
Yisrael | https://www.wix.com/corvid/forum/community-discussion/cannot-get-the-value-of-database | CC-MAIN-2020-05 | refinedweb | 122 | 76.82 |
686 -C dit vs. -7" do Oh'- Oh' coach dies before big game/Page 1B U 4Dem drop election c halleng he ar0 f4te)cavasingly defeated him in absentee tion. eCO, unt0 would db ## board. votes' while Leven won in Jarrett said he thought a recoun h toB said thev were horri- votes cast on Election Dav was routine and he didn't realize tha MIKE WRIGHT mwright@chronicleonline.com Chronicle Bernie Leven and the county Democratic Party backed off fast Friday on a challenge of the Nov. 11 election results after learning that it meant questioning the integrity of three respected elected officials. Leven said he withdrew his petition for a recount of absentee ballots and touch-screen votes from the county commission District 4 election, which he lost to: Republican John Thrumston by about 1,599 votes. Leven on Thursday filed in circuit court a petition to sue the Citrus County Canvassing Board in hopes of getting the recount. But Friday: Leven and Citrus County Democrat Chairman Mike Jarrett said they didn't understand that'state laws allow election-result challenges when a plaintiff shows fraud, misconduct or corruption on fled to learn that by filing the No-party affiliation candidate petition, they cast a negative Steve Hasel finished third. light on the'characters of can- Democrats met Wednesday vassing board members night and kicked around the Supervisor of Elections Susan idea of seeking a recount of Gill, County Judge Mark Yer- Bernie the absentee votes and those man and county Commis- Leven who used touch screens on sioner Vicki Phillips. lost to John Election Day to vote. "I'm going to drop it," Leven Thrumston in Someone suggested the said. "You have to accuse commission party could get a recount by three very good people of race. paying the elections office fraud and that is not right." $255. Jarrett said Friday he Leven noted that Thrumston sound- doesn't recall who made that sugges- It it it involved a lawsuit against the can- vassing board until reading stories in Friday's newspaper. "We didn't know there was a statute that said we had to challenge Susan Gill's integrity, or we wouldn't have done it," he said. Leven said he didn't feel right about the recount, but he went along with party wishes. "I was. coerced into doing what Please see ELECTION/Page 4A Bridge stretching to early finish ' {t iLM Il AM Btks. Buam 5 0. AMA AMA MATTHEW BECK/Cnronicle This aerial view shows the progress of the Gospel Island Bridge construction. Work could finish by February, according to the Department of Transportation. 'The sooner, the better,' say residents of Gospel Island and Pritchard Island in Inverness DAVE PIEKLIK dpieklik@chronicleonline.com Chronicle Even without Hilbert Staton don- ning a hard hat and pounding in pil- ings, work to replace the Gospel Island Bridge could possibly finish months ahead of schedule. Department of Transportation spokeswoman Kris Carson said work is slightly ahead of schedule and could finish by February, three months earlier than planned. That's great news for Staton, whose property is next to the site. "The quicker the better," he said Wednesday. '"I'd go out there and help them if I could." Work to replace the 55-year-old bridge, which was put on a state list of bridges deemed structurally defi- cient, began Aug. 14. The new bridge will be slightly higher than the origi- nal bridge to allow more boat traffic to pass beneath and travel between Big and Little Lake Henderson. Carson said work has been going well so far, and there have been no complaints. Leware Construction Please see BRIDGE/Page 4A 4- > .. .......- Fighting for the homeless a crusade for one local woman TERRY WITT terrywitt@chronicleonline.com Chronicle Mary Ehresman fights for the underdog, she says. It's her word for the home- less. Ehresman began helping the 'homeless in April. That's when ;ajnan in her church raised his hand during a worship service :to say' he knew of a woman in desperate conditions. The woman was living in a .X Annie's Mailbox ... 8C W Movies . . . . . 9C !e Comics ......... 9C Crossword . . : 8C Editorial ........ 12A Horoscope . . . 9C Obituaries ........ 6A Stocks ...... .. 10A Three Sections 6 IIII4578!2002I 5 storm-damaged mobile home when Ehresman paid her a visit A tree had fallen on the structure. The 57-year-old woman had no running water, electricity, no income and was physically unable to work, Ehresman said. Ehresman said she is contin- uing to work and pray for the woman, but the experience of finding a fellow human being in such deplorable conditions Please see CRUSADE/Page 5A Sending along a little bit of Christmas Volunteers send care packages to local soldiers stationed in Iraq./3A HOW TO HELP * Local churches are being asked to take up a collection Sunday in recognition of "Am I My Brother's Keeper Day." Coordinator Mary, Ehresman has asked churches to send the donations to First Assembly of God, RO. Box 367, 5735 W. Gulf-to-Lake Highway, Crystal River, FL 34423. * Donations will be divided equally between - CASA, Sanctuary Mission and The Path. Funds will be kept in Citrus County and can only be used for the needs of the homeless with the goal of adding beds or housing. Rocking to a new rhythm Youth attendance surges with 'Link,' Gulf to Lake Church's ministry for teens./1C Crystal River couplefacing homelessness TERRY WITT terrywitt@chronicleonline.com Chronicle Judie Salmans' voice broke. She wiped away tears. She knows she and husband Eddy could be homeless next month. The very thought of living out of their car, or in the woods, is too much to bear. "It weakens the spirit. I have so On the cutting edge Learn about different types of knives and how to properly sharpen them./Sunday much hopelessness," she said. Catastrophic medical expenses for the couple have left them broke and living in a small rented mobile home near Crystal River She receives Social Security dis- ability payments, but the $1,300 monthly payment is not enough to cover the cost of their combined pre- scriptions, let alone food and rent. Please see COUPLE/Page 4A Election dispute continues In state * A recount in Sarasota is one of the most closely watched congres- sional races./3A * Inverness city clerk on the mend./3A * Hospice of Citrus County honored by state./8A i. z L. * - E E 0 0 '' '' 2 A J ar, JFURAY, INVrn0rrN4nrw 1 vuu lE RNsC NH I 9 ame 0 Saddle up, head out CHERI HARRIS charris@chronicleonline.com Chronicle a 0 Whether you like your extreme sports Western-style or you take a more laid-back approach, this weekend's events should fit like a bull rider's glove. S* Watch the bulls and broncs kick up their heels as cowboys hang on for dear Life during the 11th, annual PRCA Citrus Stampede Rbdeo6. * S_ Gates open at 5:30 p.m. today and per- formance starts at 7:30 p.m. at the Citrus County Fairgrounds, 3600 S. Florida Ave., Inverness. Tickets are $15 at the gate for adults and $5 at the gate for children ages 4 to 12; children age 3 and younger are admitted free. Folks also can mosey over at 10:30 a.m. to the rodeo ring to watch more action dur- S- ing the "slack," which is not part of the rodeo performance, but it is part of the PRCA competition. Admission to the "slack" is free, but the fairgrounds will be closed. U The Citrus County Craft Council will -- - 0-* 0 0 m --a -a 0 - 0-* 0 - *0 0 * S a -a. C we *C 0 C S O W 4b -ft W- -- -"p 0. -a M- 0 'Avail host its 17th annual Winter Wonderland Craft Show from 9 a.m. until 3 p.m. today at the National Guard Armory, 8551 W. Venable Street, Crystal River. About 85 craft vendors will have their work for sale. Each crafter will donate an item from his or her work to be raffled every half-hour. Admission to the show is free and the show will benefit Humanitarians of Florida-Citrus County. Those attending the show are asked to bring canned or dry cat food for Humanitarians. There also will be a toy drop for new unwrapped toys for disadvantaged chil- dren in Citrus County. Ladies of the West Citrus Elks will host their annual Arts and Crafts Show from 9 a.m. to 3 p.m. today at the Elks Lodge on Grover Cleveland Boulevard in Homosassa. Admission and parking are free. In addition to plenty of craft vendors, there also will be a bake sale and other food and beverages for sale. St. John the Baptist Youth Group is sponsoring an Art Auction today in Father Stegeman Hall at St. John the Baptist Catholic Church on U.S. 41 and the corner of Mar 489-3166. The University of Florida Choir is coming to town for a free concert Sunday as part of Shepherd of the Hills Episcopal Church in Lecanto's Light Shine program. The performance starts at 3 p.m. at Curtis Peterson Auditorium in Lecanto. There is still time to scratch the "Seven Year Itch." The comedy continues on stage this weekend at Playhouse 19. Show times are 8 p.m. today and 2 p.m. Sunday. Tickets are $15. The theater is at 865 N. Suncoast Blvd., Crystal River. For information, call 563-1333. 1 -o m no *m a - am 4 rm C L~ *b I I ,&;406q 404m ~ me0 00"aem D0 tommm do 41bo ql- -- 4mm- in-o 4b..0 o 10 -qo a. _ I w-a -- -w q0m q -* am --woab-dD- M -a w 0 . -41W 41W S 6 map .__.b__ _ -aam _Syndicated Content -- lable from Commercial News Providers" r o M M --p , ~--~-0--- M Mb_ 0 0 q 0 0 -.-- f 0 - l_ mom . qm.N w 0 * mwww 4b- m- 0 *0- m -a a -bn-ma qw .0 00 . - 0 -- - 0.- a ,.wu SW 'V *6~ -a ~. 0 * ~ - 0'W ? 0a a 00 0 -4 a omom m d -.w ___ simp0 -ow 4a- ME 4 a Jdbes body guadsaredej SCopyrighted Material -- I -swa - La4 ha O. m -6* .m 9t aw PO Crmsus COUNTY (FL) CHRONICLE 2A SvruRDAY.\* NOVFMBnc 18.20 ENTERTAINMENT --A- m -. - ow _0p . -4-10 f 4b - -p -meo 4m -mmap o-a bq awAM ftf mm-b ~ 4- do- S-do a0mb 4WD 41M am p 0= *0-l -40 0 -M -db -- Gbm-a 0 -of 40M ftbl O0 .11M 4w- 4 0 0u w -om -.f 0 aw q- qmmw w0 44900 .w0 a a 41w ft a a G . -NR0m4b *tm qu*mw 0 u - -* am 4D swft op now so lb 3A SATURDAY NOVEMBER 18, 2006 CBrrll; COUNT Q X w w W w M - ,"Copyrighted Material - Syndicated Content Available from Commercial News Providers"- - e Volunteers make it a wrap DRIN ..Lar- i =CrLoniunile Barbara Mills, far left, and her volunteers pack Christmas boxes Thursday night to send to soldiers in Iraq. She collected more than $8,000 to buy items for the troops. Mothers ofsoldiers stationed in Iraq and friends send gifts abroad CRISTY LOFTIS cloftis@chronicleonline.com Chronicle It may be a little early to start wrap- ping up Christmas gifts, but, for Barbara Mills, now is a necessity. After all, she's inserts, cooling bandanas, eye drops, shampoo, lip balm and, of course, candy canes are being sent along with phone cards for the Adopt a Soldier project. "Sometimes, I just sit down and cry, I get so overwhelmed with what people do," Mills said. Mills' son, Kevin Mills, 26, is serving VIEW VIDEO ONLINE Exclusive video was shot Thursday night of the assembly of care packages for military members from the local area serving in Iraq. The Chronicle camera captured the moment at the home of Barbara Mills of Crystal River as numerous volunteers eagerly packaged touches of home into boxes bound for our troops. To view the video, go to and click on the "Special Report" graphic. in the Navy. Fellow volunteer Windy Stillwell's son, Clark Stillwell, 22, is serving in the Army. With finding a way to cheer up active troops in mind, the women collected more than $8,000 in cash along with boxes of gifts and supplies from busi- nesses. Thursday night, Mills' house turned into an assembly line as volunteers worked to pack gifts and supplies to be shipped overseas. Local elementary schoolchildren made Christmas cards to add to the gifts, Mills said. The first batch of gifts went into the mail Friday, so they'll make it in time to troops in the field. The next group will be mailed Dec. 1 and will go to troops who have quicker access to mail service in Iraq, Mills said. People can still donate to the Adopt a Soldier program through the end of the month. The Hernando VFW 4252 is col- lecting money for the group. Checks may be made out to the Hernando VFW 4252 and sent to PO. Box 1046, Inverness, FL 34451. To donate supplies or for more information, call Mills at 422-6236. Recent aerial survey notes 214 manatees Special to the Chronicle :Staff from the Crystal River National Wildlife Refuge con- ducted an aerial survey of manatees Wednesday A total of 214 manatees was counted along the survey route, stretching from the Cross Florida Barge Canal, near Inglis, south to the Homosassa River. Included along this route are the Crystal River, Kings Bay, Salt River arid the Homosassa River, which includes the Blue Waters. *Florida manatees are on the move seeking warm-water sites to spend the winter. That means boaters must be cau- tious about looking out for the state's official marine mammal and for changing speed zones on waterways, according to the ON THE NET Visit manatee. Florida Fish and Wildlife Conservation Commission (FWC). Manatees generally start traveling to warm water when the air temperature drops below 50 degrees or when the water temperature dips to 68 degrees, the FWC advises. The' commission changes seasonal speed zone signs in mid- November on many waterways to accommodate manatee migration. Boaters should scan the water near or in front of the boat looking for swirls resem- bling a large footprint, a repet- itive line of half-moon swirls, a mud trail, a snout or fluke (tail) breaking the water's surface. Kipp Frohlich, leader of FWC's Imperiled Species Management Section, said boaters can help manatees have a safe migration: Stay in marked channels. Wear polarized sunglasses to improve vision. Obey posted boat speed zones. Use poles, paddles or trolling motors when close to manatees. Have someone help scan the water when under way. "If you think you see a mana- tee, give it plenty of room because it may not be alone. It may have a calf or be traveling with other manatees," Frohlich said. Boat speeds in Citrus County have changed as follows: Sept. 1 to Feb. 28: 25 mph - Lower (western) portions of the Withlacoochee River and Bennetts Creek. Sept. 1 to March 31: 25 mph - Lower (western) portions of the Chassahowitzka River. Sept 1 to April 30: Idle speed or slow speed por- tions of Kings Bay Oct. 1 to April 30: Slow speed Portions of the Homosassa River between the Salt River and Trade Winds Marina and southern portion of Halls River. Nov. 15 to April 30: Slow speed -All waters in the vicin- ity of the Florida Power Corp. effluent canal. Nov. 15 to March 31: No entry-Within the Blue Waters area of the upper Homosassa River near Homosassa Springs Wildlife State Park. clerk on the mend .- Debbie Davis in injury recovery DAVE PIEKLIK dpieklik@ chronicleonline.com Chronicle Two months after being seri- - o - ously injured in a bike acci- dent, Inverness City Clerk Debbie Davis is cruising down the road to recovery. Davis has returned to her office on a part-time basis as she contin- ues to recover from the Sept. 4 crash that left her with head injuries and facial frac- tures. She has been working two to three days a week for about a month, and last week she sat through the first coun- Debbie Davis Inverness city clerk was injured in bike accident Sept. 4 cil meeting since she was injured. Though Davis still experi- ences fatigue and other effects, most other visible effects of the crash, like her scars, are start- ing to fade. Now, she said, she's happy just to be back working. "I was very fortunate that I came 'out OK," Davis said Monday morning while sitting in her office. 1' Davis was critically injured while riding her bike Labor Day morning with City Manager Frank DiGiovanni on the Withlacoochee State Trail, near Eden Drive. She bumped DiGiovanni's back tire, getting thrown over the handlebars of her road bike onto the pave- ment Davis, who wasn't wearing a helmet, lost consciousness and was bleeding from the head. A passerby called 911, and after being treated by paramedics at the scene, she was flown by helicopter to St. Joseph's Hospital in Tampa. She spent several days in the hospital's Intensive Care Unit in critical condition, with doc- tors and friends unsure if she would survive. Davis said she still can't remember the crash, though she remembers heading out that morning. However, Davis said she wants to get back on a bike, though she will have to get past her two teenage sons. They removed the tires from her bike, she said, in an effort to keep her from riding. When she does start biking again, Davis said she now will wear a helmet "I just want to stress the importance of wearing a hel- met," she said. For some of her coworkers, having Davis back so soon is being called "a miracle." "It's great to see her smiling face," said administrative staff assistant Trish Nicholas. "Considering how close she was to death, that's absolutely amazing." Last week, DiGiovanni men- tioned Davis' return in front of a large audience gathered for the city council's regular meet- ing. Davis was treated to a standing ovation from the crowd, many of whom left get- well messages through an information line the city set up immediately after her crash. Davis was touched by the gesture, saying she's never been given a standing ovation before. The crash has changed a lot for Davis, with one difference, she said, being the way she views things. "It just makes you appreci- ate life in general," she said. "Every single day, every single moment is precious even more." I I '&,I -A Harvest" series. Our Lady of Grace Food Pantry offers food on the third Tuesday each month. Christian Kitchen serves a meal on the fourth Tuesday each month. However, because of the holiday season, both services will be offered Dec. 19. a County BRIEFS Teenagers arrested at local schools Two teenagers were arrested at Citrus County schools Nov. 10 in separate incidents at Crystal River High School and Citrus Springs Middle School, according to the Citrus County Sheriffs Office. The teenagers' names are being withheld because of their ages. A 15-year-old Crystal River High girl was arrested after fight- ing in the cafeteria and being loud and disruptive in the guid- ance department while talking with the deputy. According to an arrest report, the girl was charged with affray and disrup- tion of an educational institution. She was later released to her parents. The other girl involved in the fight received a Teen Court cita- tion and was released to her mother. A 14-year-old boy was arrest- ed from Citrus Springs Middle School the same day on a charge of assault/battery on a specified official or employee. According to an arrest report, the 14-year-old boy was leaving an after-school dance when he began yelling at an assistant principal, pushed him and swung his arms at the school official. The 14-year-old was arrested and later released to his par- ents. Voters advised about Homosassa ballots The last day to request an absentee ballot for the Homo- sassa Special Water District Election is 5 p.m. Wednesday, Nov. 29. This election, on Tuesday, Dec. 5, will be limited to only registered voters who reside within boundaries of the Homosassa Special Water District and within the areas pro- posed for annexation. The Web site is to view maps of the existing areas. For more information, call the Supervisor of Elections Office at 341-6740. Homosassa may get new development An unnamed concern recently had a pre-application meeting with the county's planning staff to discuss the requirements for commercial development on U.S. 19 across from the Wal- Mart Store. The development would include a three-story, 75-room hotel, a drive-through bank and a retail strip of around 15,000 square feet. The buildings would be built on the site of an old mobile home park, according to county Planner Joe Hochadel. He said the conceptual site plan had no details about what hotel, bank or stores might be involved and the representative for the developer needed the county's requirements, such as setbacks, impact fees and procedures for the application process. Since the land is a planned development overlay, Hochadel said, the developer would have to either change the master plan, or do away with the over- lay and go back to the general commercial designation under the overlay. He said the next step would be up to the potential developer to begin the process. From staff reports Corrections A news note on Page 2C of Tuesday's edition contained an error. The price of pneumonia vaccinations at B&W Rexall in Inverness is $45. SA news note on Page 6C of Friday's edition incorrectly listed ticket prices for "The Christmas Camera" play at the Art Center Theatre. The cost is $8 for adults and $5 for children. Call 746-7606. A mistake was made in the "Where to get food" list pub- lished with the recent "Scant - - 4p ,at CITRUS COUNTY (FL) CHRONICLE For the RECORD Citrus County Sheriff DUI arrests Thomas Leo McCarthy, 36, 751 Forest Hill, Hemando, at 10:26 p.m. Thursday on charges of driving under the influence and possession of 20 grams or less of marijuana. Bond was set at $1,500. Fred Douglas McKinnon III, 46, 7610 Blanding 121, at 2:48 a.m. Friday on charges of driving under the influence, driving with a sus- pended/revoked license, display/ possess a canceled/revoked/sus- pended/fictitious/altered license and violating restrictions on his driver license. Bond was set at $2,000. Other arrests Charles Wesley Mewborn Jr., 19, 5459 S. Bob White, Homosassa, at 5:35 p.m. Thursday on charges of possession of 20 grams or less of marijuana and possession of drug paraphernalia. Bond was set at $2,000. Robert Richard Fremer, 53, homeless, at 6:50 p.m. Thursday on a charge of petit theft. ELECTION Continued from Page 1A turns out to be a very bad deci- sion," he said. Republicans, meanwhile, quickly organized a counter- offensive Friday afternoon with a gathering of support out- side the law office of party chairman Bill Grant. BRIDGE Continued from Page 1A Company of Leesburg was offered the $3.2-million con- tract to do the work While the contract expires May 2, Carson said the contrac- tor is "shooting for" Feb. 9 to have the work completed. She said there is a $200,000 bonus if work is done by that date, with it decreasing $2,500 a day every day after that ON THE NET Go to the Web site and click on the link to Daily Reports, then Arrest Reports. Bond was set at $500. Karri Michell Conley, 33, P.O. Box 405, Hemando, at 10:14 p.m. Thursday on a charge of possession of a controlled substance. Bond was set at $5,000. Louis Eduardo Bueno, 27, 4623 Wydham, Orlando, at 7:03 a.m. Friday on a charge of not hav- ing a valid driver license. Bond was set at $150. Monica Lynn Fisher, 42, 5450 S. Mildred Terrace, at 9:52 p.m. Thursday on a charge of battery on a person 65 years old or older. According to an arrest report, a 67-year-old man said Fisher came to his house to pick up some things and they got in an argument and she hit him in the face. Fisher said their argument escalated into a struggle and she was thrown to the ground, Earlier, Grant bristled when told that Democrats never intended to challenge the results, but simply wanted to make sure the touch screen machines counted votes prop- erly "I find that comment to be intellectually disingenuous," Grant said. "The only reason for a recount is to change the results of the election. Whether John wins by one vote "It's a nice incentive," Carson said of getting work fin- ished sooner. Workers were at the site this week driving bridge columns into the lakebed and laying down rock bedding to protect the bridge from erosion. Carson said work on the bed- ding is about 80 percent com- plete. Work could fluctuate a little from bad weather, Carson said, which could change the com- pletion date. Though Staton is happy right according to the report. She said the man also pointed a gun at her. The deputy noted that Fisher's state- ments about what happened were inconsistent and deemed her the aggressor, according to the report. Fisher was being held without bond. Crystal River Police Arrests William R. Wiles, 59, of an unknown address, at 5:22 p.m. Thursday on a charge of possession of drug paraphernalia. Bond was set at $500. Ronnie Grady, 47, 525 N.E. Crystal, Crystal River, at 7:44 p.m. Thursday on a charge of resisting/ob- structing an officer without violence. Bond was set at $500. Florida Highway Patrol DUI arrest RogerAlan Deckard, 36, 2280 S. Hall, Homosassa, at 2:32 a.m. Friday on a charge of driving under the influence. Bond was set at $500. or 2,000, he will be the commis- sioner." Grant also said top Dem- ocrats deserve any criticism they receive from the episode. "The milk has been spilled and now you can't put it back in the bottle," he said. Jarrett acknowledged the incident is embarrassing to the party. "We," he said, "have egg on our faces." now, that hasn't always been the case. He had wanted a tem- porary bridge erected while the old bridge was replaced to keep residents on Gospel Island from having to drive to the other side of the island - about 8 1/2 miles to State Road 44 in order to get back to town. The DOT rejected the plan for a temporary bridge after saving it was too costly Staton acknowledged the extra drive is still an inconven- ience, but added, "I guess you have to ... what do they say, suf- fer for the greater good." Other residents, like Al Grubman, voiced concern the detour could put lives at risk by extending the time it took emergency response crews to respond to calls. The county commission voted in June to COUPLE Continued from Page 1A Judie has been hospitalized a dozen times in the past year. She has had three heart attacks and doctors have inserted five medical devices known as "stents" to keep diseased arter- ies open. Her backbone is as fragile as a dry cracker, and she is await- ing critical back surgery. Medicare Part D will pay $2,250, but she falls into what is known as the doughnut hole. After Medicare pays its share, she will be responsible for $3,000 of out-of-pocket expenses before Medicare kicks in again, according to Judy Bescher of A+ Healthcare Specialists, who is attempting to assist the cou- ple. The Salmans are in their 50s. Eddy also is a heart attack vic- tim and recently suffered a stroke that rendered him unable to work The couple does not qualify for food stamps and there are no programs to pay their rent Churches helped pay a portion of the rent for November, but they have no money to pay December's rent They are like many who find themselves homeless. Their cir- cumstances left them unable to pay for the basic necessities of life food and shelter And there are no homeless pro- grams for those who still have a roof over their head. The Salmans' only hope is Bescher and her supervisor, Linda Pursley. Bescher and Pursley know the Salmans are living at the edge of homelessness and they know Judie must soon have sur- gery, but they also realize the couple has hit a brick wall as far as finding assistance. It was Bescher who loaned Eddy her personal cell phone to make a two-hour call for a recent Social Security benefits interview. If Eddy can qualify for Social Security disability, which could take months, he and his wife will be in better shape finan- cially. But that will take time. "This is what happens to well-intentioned people be- Gospel Island volunteer fire station to assist with calls. Grubman, of Pritchard Island, said Wednesday there have been "nuisance prob- lems" with the bridge, includ- ing drive time, saying the rea- son he and his wife moved there was because it was close SO YOU.KNOW 1 Judie and Eddy Salmans can be contacted through' Judy Bescher and Linda Pursley at A+ Healthcare Specialists at 564-2700 in Crystal River. Sit cause of circumstances" Bescher said. Pursley said the Salmans fit the profile of those who oftfn fall through the government safety net "It's the 50-year-old group with health problems that we find there is nothing out there for them," she said. to everything. However, he sa4 his main concern with tt*e bridge project has always been emergency response. Talking about the possibility work on the bridge could efii early, Grubman added, "Eve*y day sooner that they get it done has the potential to save lives." C I T R U Sr .- C 0 U N T Y and time-consuming to build. station a paramedic at the t 1I .H E , -," C nFlorida's Best Community Newspaper Serving Florida's Best Community -Thisd' el in Crystal Glen For Sal! - '"c"Fdbruar- 2007 To start your subscription: Wll- ,, ALR Call now for home delivery by our carriers: .1l'I Citrus County: (352) 563-5655 Marion County: 1-888-852-2340 - CONIST.U. CT.IO.PI N.C or visit us on the Web at' ', ,9- .html to subscribe. 1' 13 wks.: $34.00* 6 mos.: $59.50* 1 year: $105.00* | s "*Plus 6 FlorIda sales tax , Si For home delivery by mail: .. 6. .. .... ..' In Rorida: $59.00 for 13 weeks Elsewhere in U.S.: $69.00 for 13 weeks , WHEELER CONSTRUCTION INC. PO, Box310, Hwy.44West, lnvemess, FL 34451-0310 (352) 726-0973 To contact us regarding your service: .563-5655 Call for redelivery: 6 to 11 a.m. Monday through Friday 1a .44 Duiiko N 162. Cryst t lilrial larl Priuil 22x84 Standard Size. Not valid with any other offer. Prim Includes Installation and tax. Affordably upgrade your EXISTING entryway in about an hour with an EntryPoint door transformation! Matching Sidelights Transoms and Sc nlage lo,' care alsoavailable visit our .h'Owroom ard pick he perfect doorglass for your home' Perry's Custom Glass & Doors 352-726-6125 2780 N. Florida Ave. (Hernmdo Plazai Hernando FL F dowcrest office 4 N. Meadowcrest B tal River, FL 34429 Where to find us: Inverness office |(/,, 'loud Carmoi.ale 4 " S'M.oweAT ilvd. 106 W. Main St., SW SECOND CLASS PERMIT #114280 Affordable Elegance Affinity, Imperial, Laurel, & Pi Only $499 princess -*4NV'RDY NVMERIs tu fC i W.:-', -... :' "-., -i ' TERRY WITT/Chrorn'c", Eddy Salmans and his wife, Judie (right) could be homeless soor. Linda Pursley and Judy Bescher of A+ Healthcare Specialists s.y' the Salmans have run out of options. They have little income and catastrophic medical bills. -Vertica's Wood Blinds Shutters, Shades Crystal Pleat Silhouette Sxn iRnAv NovrtmnER 18. 2006 A I w CITRU~ COUNTY (FL) CHRONWI.B SATURDAY, NOVIIMBHR 18, 2006 5A 'CRUSADE Continued from Page 1A was a life-changing event. Ehresman has begun a personal crusade to raise awareness of the homeless and improve their living conditions. She wants others to realize the breadth and depth of the problem in Citrus County and the need to band together for a solution. .: "There's nothing out there for Housingg" she said Friday after !,renting a room for a homeless ;woman and her two teen-age sons at a Crystal River motel. "I .have done nothing but put a -Band-Aid on it" The Citrus County Commis- "ion has declared Sunday as "'Am I My Brother's Keeper Day." Ehresman said she wrote a letter to more than 200 local churches on Oct 12 asking them to take up a special collection tomorrow for three organiza- tions that provide assistance to the homeless in Citrus County The money can be used only for new beds to shelter the homeless, not for administra- lion. Churches are being asked 'to send the money to Ehres- man's church the First As- 1pembly of God in Crystal River. Ehresman said the church will 'distribute the money to the CASA shelter, the Sanctuary ,XIission and The Path. ,, Ehresman is not alone in the fight for the homeless, but she may be the most vocal. She calls herself the mouth of those who have no voice. She disagrees wvith official estimates that the county has 500 homeless people &on any given day. She said the woods are full of the homeless. She said people are sleeping in cars, in tents, garages anywhere they can get out of the elements. The esti- mate is far too low, she said. Housing in short supply The 500 number estimate resulted from a Point in Time Survey taken two years ago, according to Barbara Wheeler, executive director of the Coalition for the Homeless. The survey counted the homeless in the county. However, she said it's difficult to count noses when many of the homeless are hid- den from view. "It's not like they want you to know they are out there," she said. She agrees with Ehresman that housing for the homeless is in short supply She said there are programs that provide food for the homeless, and there are a couple of emergency shelters, but there are no shelters for families. The local shelters are currently full, and the Salvation Army emergency shelter in Ocala has reached capacity and is no longer accepting Citrus County homeless. "We are getting to the point where we don't have solutions for those people," she said. Wheeler said one of the biggest needs is a transitional shelter for the homeless that can give them more than a night or two under a roof, but can assist them in getting back on their feet and finding a job. She said federal funding is available to build such a shelter, but a local agency or organiza- tion would have to act as the sponsor, and, thus far, no one has come forward. Wheeler said many of the homeless in Citrus County live with family and friends as long as they can. It's called doubling- up. But Ehresman said those people eventually have to leave their borrowed homes when their benefactors can no longer keep them or, in some cases, when landlords find out and evict them. Homeless children Rich Hilgert, student servic- es director for the Citrus County School District, said 394 students currently fit the defi- nition of homeless in Citrus County. Hilgert said the students fit the general definition of home- less under the McKinney-Vento Homeless Assistance Act. It means they lack a fixed, regular and adequate night residence or their primary nighttime home is: A privately or publicly operated shelter, welfare ho- tels, congregate shelters or transitional housing for the mentally ill. An institution that provides a temporary residence for indi- viduals who are to be institu- tionalized. A public or private place not designed for, or ordinarily used as a regular sleeping accommodation for human beings (such as the woods or a car). If a child falls under one of these categories, he or she may be eligible for food, clothing and other services. Hilgert said the school district tries to con- nect children with services. The goal is to get them enrolled in school. Their identities remain confidential. However, Hilgert acknowl- edges there may be homeless children in the Citrus County community who are not regis- tered with the schools, and the school district knows nothing about them. Hayes Motel Many of Citrus County's homeless eventually find their way to the Hayes Motel in Crystal River owned by New Life Ministries. Assistant Manager Leslie Johnson said many churches provide funding to house homeless people at the motel on a temporary basis. She said Friday was busy, with one homeless family of seven seek- ing shelter at the motel. Johnson said when she goes out at night to check the grounds, she often sees out- lines of people in the woods near the motel. '"At night, I walk the parking lot to see that everything is OK, and you can see shadows in the woods as people are setting up for the night," she said. "It's a shame, it really is." The Spot Joseph A. Vissicchio, founder of The Spot, a Chris- tian-based Lecanto organiza- tion that focuses on helping youths build better lives, said there are many reasons why children become homeless. He said it's difficult to count them, and he said "quite a few" live in the woods. "It's a hard number to get a handle on. It's the kids whose parents went to jail, or the kids whose parents were evicted; or there is violence in the home and they can't go home," he said. "They don't want to go to a foster home, they don't want to do that, so they run away," he said. He said some of them are in school, and the schools don't know they are homeless. Vissicchio said The Spot began a program last year to feed homeless and hungry youths in a park behind Copeland Park in Crystal River for five days leading to Christmas. "It was cold last Christmas. There were kids with no shoes, just shorts and T-shirts, and at 10 o'clock on Christmas Eve, there were no parents around," he said. "I'm not saying they were all homeless, but there is a problem." Resource Center There are no experts in Citrus County on the subject of homelessness, but Ginger West, executive director of the Family Resource Center, is often described as having con- siderable knowledge about the subject. The center has a food pantry and often provides food for the homeless, and tries to connect them with services, but it is not a shelter. "It's fairly common," West said of homelessness in Citrus County. "We have a lot of what I call the couch homeless. They are living with friends and fam- ily," she said. But West said it sometimes leads to three families living in a single-family home. West said there are a couple of emergency shelters in the county, but none are for fami- lies. She said the county needs a shelter for families. West said some organizations in Citrus County receive Federal Emergency Management Grants to help the homeless. She said the resource center received $4,000 this year and helped 21 families. In some of those cases, she said it was a matter of providing housing for a night or two until a paycheck arrived. Finding help Rue Boggs, who was left homeless by Hurricane Katrina, found shelter Friday night for her and her two teenage sons at the Hayes Motel, but she had no idea what she would do after that Ehresman paid for a two-night stay Boggs, who prefers to call herself displaced, said she has found very little assistance in Citrus County. She said the county needs a transitional shelter to help people like her, who have worked all their lives, but have fallen on bad times, to get back on their feet She said she had been work- ing in St Petersburg and was featured in a newspaper story about her recovery as a Katrina victim. But she said her car broke down, her foot was injured, and one thing led to another. Soon, she had no home and no way to put food on the table. Boggs said she was told a Citrus County man would be willing to take in her family Things didn't work out as they were represented. She said law enforcement helped remove her from the man's home. But now she finds herself homeless in Citrus County, a place with few resources for the home- less. "It's just one thing after another. Here, they'll give you some food, and then it's 'get out of my face'," she said. . "Copyrighted Material - - Syndicated Content - a- .-~ - - a - -a. a - - a - -'Available from Commercial News Providers" Op a a lw -doa - - -- Mon- dop a-qo -a a- --a -G- lo-M a. 4 - ..= ao .0 - a -- -a - a - - - a - -- a- - -a -a a a - Go .dam - a. -W qw -. .0 - - -4o -a - - a a- a -'low * a - -. a - -- a a-a -.0a - -. --.. M I 1N1GOLF' ARMES04 HOURS Friday 3-9 Saturday 12-9 Sunday 12-6 Additional hours for Birthday's & Groups Come Join The Fun - 8763 Hwy. 44 E. (Next to the Eagles) Inverness I I 352-726-2024 OC 0.. .. -0 lw4--.00 - - 41ba..-- q a - a.-a ~ 41b m 4-- 41b - - -Now a - ..q - - - - - 0~ - - - a a- -~ a -a - -a-~ a.- - a w a a- - - .m - -- - 41 -40 - Re d homes Quality Homes at Affordable Prices Visit our website at ww.reedhomes.net 2006 Beverly Hills Holiday Parade Saturday, Dec. 2, 10am Sponsored by Kiwanis club of Central Ridge ~ Crystal River THEME "CHILDREN OF THE WORLD" Parade begins at 10am, Line up at 8:30am (Melbourne off Beverly Hills Blvd.) Name of organization Description of Entry Approx, total length of entry Contact person Mailing Address Phone no, email Judge category (check one only) Best Business Entry __Best Religious Entry Best Youth Entry B__ est Club Entry All eligible for BEST Overall Entry Judging based on elements of theme, color, excitement & creativity of the entry, Mall this form and $10 entry fee to Kiwanis Club of Central Ridge ~ Crystal River, P.O. Box 640986, Beverly Hills FL 34464-0986 MORE INFORMATION: Barry Schwartz ENTRY DEADLINE: Nov. 27 352 795-4780 bschwartzalwol,net OFFICE USE ONLY: Payment Inf: Date/Entrv # C- Move Into Your New Home Now! New Homes Available For Immediate Occupancy Visit Our Model In Crystal Glen I "ebih 'oWsts with preferred lender on a Reed home and Land package. Preferred Lender Beverly Love: (352) 861-6112 Crystal Glen Model & Sales Center Hours: Mon, Wed-Sat 10am-5pm Sun lam-5pm 1-866-581-7333 (352) 572-5107 | 1105 S. Glen Meadow Loop, Lecanto, FL 34461 b.. aM - wo. IC& O Buy 1 Get 1 Round of VMini-Golf Differ Expires Soon! w~ou thilfialkinr.4 SxrURDAY, NOVvMBV.R 18, 2006 GA Crraus CouNTY (FL s -- - Q Q Q 4b-o -.4"-m ------ ;9TI 7 CITRUS COUNTY (FL) CHRONICLE 6A Svruiu3AY, Nov . .i. ., 1 2 nn Ivhwetyof -~- ~- I1Ib4 on& adham- o-adm w h -"Copyrighted Material .- Syndicated Content -Available from Commercial News Providers" - -. - - -0 - JM- --,W '4W- - a a - - a 0 - - .~ - Vance Barry, 48 BEVERLY HILLS Vance Mitchell Barry, 48, Beverly Hills, died Tuesday, Nov. 14, 2006. Mr. Barry was born in Miami. A memorial service will be held in Malakoff, Texas, at a later date. Survivors include his moth- er, Margy Jeter of Ocklawaha; his companion, Diane Piechocki of Beverly Hills; daughter, Margy Piechocki of Beverly Hills; brothers, David Barry of Stockton, Calif., Ernest Swindle of Lawton, Okla., John Barry and Jay Barry both of Florida; sister, Teresa Rice of White House, Texas; and numerous nieces, nephews and cousins. Beyers Funeral Home, Lady Lake. Eileen Hespeler, 82 HOMOSASSA Eileen Frances Hespeler, 82, Homosassa, died Friday, Nov. 17, 2006, at Citrus Memorial Health System Hospice Unit in Inverness. She was born Feb. 2, 1924, in Brooklyn, N.Y, to Alfred and Josephine Wittmer and moved to this area 24 years ago. Mrs. Hespeler retired from Lindenhurst, L.I., N.Y. School District, where she worked in the school lunchroom. She was a volunteer with the New Port Richey Park Commission- Green Key Beach with more than 1,000 hours of service. She enjoyed cooking and sewing. Survivors include her hus- band of 60 years, Carl Hespeler of Homosassa; two sons, Donald Hespeler and wife Nancy of Homosassa and Thomas Hespeler and wife Kathy of Lindenhurst, L.I., N.Y; and 10 grandchildren. Private cremation arrange- ments under the direction of Strickland Funeral Home, Crystal River Darlene Leeser, 62 KEWANNA, IND. Darlene E. (Williams) Leeser, 62, Kewanna, Ind., died Tuesday, Nov. 14, 2006, in Chicago, Heights, Ill. She was born April 11, 1944, in Long Branch, N.J. She loved dog grooming, paints and crafting, and was a devout Christian. Her daughter, Deborah Brower, preceded her in death. Survivors include her hus- band, Ronald Leeser of Homosassa; children, Arthur Brower and wife Elissa of Lady Lake, Ronald Leeser and wife Terry of Lake Panasoffkee and Deborah Craig and husband Bryon of Homosassa; 11 grand- children; and three great- grandchildren. Services were held in Chicago Heights, Ill., under the direction of Panozzo Bros. Funeral Home. Terri Link, 46 COVINGTON, GA. Terri Lynn (Hudgins) Link, 46, Covington, Ga., died at her home Wednesday, Nov. 15,2006, following an extended ill- ness. , She was pre- ceded in death 4 ' by her brother, .,y Alan Hudgins i . of Gainesville. . Survivors include her Terri Link husband, Drew R. Link of Covington, Ga.; mother and stepfather, Mary Ann and Carl Cox of Lecanto; father and stepmother, Robert and Jean Hudgins of Lakeland; sister, Tiffany Hudgins of Lakeland; and her stepbrothers and their families, Frank Cox of Keystone Heights and Benny Cox of Melrose. Milam Funeral and Cremation, Gainesville. Gerald Peck, 67 CRYSTAL RIVER Gerald W Peck, 67, Crystal .River, died Monday, Nov. 13, 2006, at his home under the care of his family and Hospice of Citrus County. He was born Jan. 22, 1939, in Battle Creek, Mich., to Melvin A. and Doris A. (Parker) Peck He moved to this area in July 1983 from Margate. Mr. Peck was a retired diesel mechanic and an Army veter- an. Survivors include his wife, Gail J. Peck of Crystal River; two daughters, Doris Banks of C E.. 2W Funeral Home With Crematory CHARLES WARD View: Mon. 1pm Serv: Mon. 2pm Chapel Burial: Lake Lindsey Cemetery BETTY ANDERSON Serv: Sat. 2pm Chapel RUBY BEASLEY View: Sat. 5pm-7pm Inverness Church of God Serv: Sat. 7pm Burial: Mon. 10AM Florida Nat'l Cemetery MURIEL BECKERDITE Serv: Sat. 11/25 10am Chapel 684539 726-8323 Hernando and Kim Parrott of West Palm Beach; two sons, Gerald Peck Jr. of Fort Lauderdale and John R. Tennessee; four sisters, Jacqueline Hendrix of Reddic k , Patricia Burke Gerald of Fort Peck Lauderdale, Joyce Freeman of Kaz, Turkey and JoAnn Allan of San Francisco, Calif.; and two grandchildren. Brown Funeral Home and Crematory, Crystal River. James Shaw, 84 HERNANDO James A. Shaw, 84, Hernando, died Thursday, Nov. 16, 2006, in Lecanto. Born Aug. 27, 1922, in Atlanta, Ga., to Andrew S. and Mary (Tweedell) Shaw, he moved to this area in 1984 from Miami. Mr. Shaw was employed by Eastern Airlines in the mainte- nance department He was a member of the International Association of Machinists and, Aerospace Workers and Smokers Rights of Florida. His wife, Margaret Shaw, preceded him in death in November of 1989. Survivors include one son, James A. Shaw Jr. of Collins, Ga.; two daughters, Elizabeth Lee and husband Richard of Citrus Springs and Vicki Lynn Merrick of Miami; and six grandchildren. Hooper Funeral Home, Inverness. Irene Wehde, 90 DUN NELLON Irene N. Bergman Wehde, 90, Dunnellon, died Thursday, Nov. 16, 2006, at Crystal River Health & Rehab in Crystal River. Born Sept. 27, 1916, in F i e 1 d Township, - Minn., to Gus :7 and Mary Sh e , Carlson, she moved to this Irene area in 1963 Wehde from Cole Ray, Minn. Mrs. Wehde retired from North West Bell Telephone as a PBX operator in Cole Ray, Minn. She was a member of the Citrus County Art League and worked with oils, watercolors and pastels. She enjoyed play- ing the piano and organ. She was baptized in the Unitarian Church. She was preceded in death by two sisters, Ily Lindell and Ellen Lumoka; and one broth- er, Eino Nurmi. Survivors include her hus- band, Albert Wehde- of Dunnellon; son, Mervin Bergman of Prairie Farm, Wis.; daughter, Joanne Bergman of Angora, Minn.; nine grandchil- dren; nine great-grandchil- dren; and one great-great- grandchild. Private cremation arrange- ments under the direction of Strickland Funeral Home, Crystal River. Click on- line.com to view archived local obituaries. Funeral NOTICES Terri Lynn (Hudgins) Link Visitation will be held from 2 to 4 p.m. Sunday, Nov. 19, 2006, at Milam Funeral Home in Gainesville. Funeral services will be conducted at 11 a.m. Monday, Nov. 20,2006, at Milam Funeral Home, 311 S. Main St., Gainesville. Interment services will follow at Forest Meadows Central Cemetery. In lieu of flowers, donations may be made to support ACC research by contributing to the ATAC fund, c/o TGen, 400 N. 5th St, Suite 1650, Phoenix, AZ 85004. Please indicate that your gift is for the Terri Link Memorial Fund. Deaths ELSEWHERE Yuri Levada SOCIOLOGIST MOSCOW Yuri Levada, a pioneering sociologist who was shut out of his profession in Soviet times but came back to track public opinion as Russia .made the transition from com- munism, died Thursday of a heart attack, his colleague Leonid Sedov said. He was 76. Levada, considered one of the founders of Soviet sociology, began his career under Soviet leader Nikita S. Khrushchev, whose political "thaw" allowed him to carry out the first public opinion surveys. He was ousted from his job at Moscow State University in 1969, banned from having his work published and barred from leaving the country for what Communist Party authorities condemned as "ide- ological mistakes in lectures." In 1988, as Soviet leader. Mikhail S. Gorbachev's glasnost campaign swept the country,. Levada joined the first inde- pendent public opinion survey firm in the Soviet Union, which provided snapshots of Russians' attitudes to the biggest questions of the day as well as to their own, lives. He took the helm in 1992. Surveys conducted by Levada's:, center showed strong public: support for President Vladimir: Putin but also critical attitudes in Russian society toward the wars in Chechnya and other Kremlin policy. Harold White FORMER PRIEST DENVER Harold Robert White, a former Catholic priest at the center of clergy sexual abuse; allegations in Colorado, died" Tuesday of a heart attack, his' lawyer Douglas Tisdale said. He was 73. More than two dozen lawsuits were filed against the, Archdiocese of Denver over its handling of White. Most alleged: the church knew he was accused; of sexually abusing young menw but failed to take steps to protect. them. Other suits made similar alle-' gations about the archdiocese's handling of another priest, the Rev Leonard Abercrombie, who died in 1994. The archdiocese has not pub- licly commented on the lawsuits but has offered mediation with' undisclosed cash settlements to, people who claim they were sex-' ually abused by priests in Colorado. wevn- ling 0 =I- M , Solar Lights & More 690-9664*1-800-347-9664 4 Solar Pool Heating 4 Solar Attic Fans | Tubular Skylights 4 Solar Water Heating November 18th & 19th Hours: 10 am 4 pm LOCATED AT: CITRUS COUNTY BUILDERS ASSOCIATION PLEASE CALL 746-9028 FOR DIRECTIONS apetr A Lot to Be Thankful For In-Stock Carpet 5 Colors Available Next Day Installation Installed with pad...................$13.99 sq. yd. Designer Berber Inst. w/pad....$1 2.99 sq. yd. Ceramic Tile...........990 sq. ft. Cash-N-Carry THANKSGIVING SPECIALS - Beveled Laminate 25 Year Guarantee Installed w/underlayment (10 colors)......$4.29* sq. ft. Laminate Lifetime Structural Warranty - Installed w/underlayment (3 colors)...........$3.59* sq. ft. .,,,d. *Trim Extra You can walk 1 mile along an average highway in the United States and see about 1,400 pieces of litter. Litter is a costly problem. City, County and State Highway Departments spend millions of dollars, and many man hours each year cleaning up litter... Money and time that could be used for more needed services..... Let's Work Together to Make A Difference in Our Community ADOPT-A-HIGHWAY TODAY! Call Citrus County Solid Waste Management 527-7670 TDD Telephone 527-5303 E-mail: landfillinfo@bocc.citrus.fl.us a - - ~ - a - -a - Obituaries FAMILY CARE GIVER: SERVICES AND RESOURCE SEMINAR November 29th 9:30am to 11:00am Crystal River Health and Rehab 136 Northeast 12th Ave., Crystal River (352) 795-5044 Crystal River Health and Rehab with Hospice of Citrus County, invites the Family Home Care Giver to be our guest, have a social time and learn about the free services available to you in Citrus County. Speakers include: Bobbie Sharp, Senior Care Services Supervisor of Citrus County Resource Center; Sandra Benko of Hospice of Citrus County and Jerry Fisher of the Alzheimer Association. Refreshments will be provided. 693124 M-MER 6, ZUU I r-qr- a qm* b odm . ams SNl 'rDmxy, NOVIMIWHJ 18, 2006 7A NNW~ Lu ~L 44- S,~A ret- : jVO t IrI-t :4 1 1 1i11:4 "" Special discounts and F .options on select homes purchased during the grand opening. Maronda Homes 4qp f sww maronda4 (wcom Directions: North on S.R. 491 (S. Lecanto Hwy.) to W. Roosevelt Blvd. East to public library. Model center is behind library. (352) 527-6461. CIRS COiUNTY~(FT) CHROIC~vLE 7 .. .. .- The Heart and Soul of Rock .Roll he"ear an 9o/ofi~ok *Rol - 6 -R-k, !61 Aw ''' 8A SATURDAY NOVEMBER 1 8, 2006 '- ft -' I.( ', .: q." .,Tr News NOTES 4-H rodeo continues today in Inverness The 11th annual PRCA "Citrus Stampede Rodeo" will continue today at the Citrus County Fairgrounds in Invemess. Gates open at 5:30 p.m. with the action starting at 7:30. Proceeds from the event benefit Citrus County 4-H. For information, call 564-4525 or visit the Web site at. Youth group to stage art auction St. John the Baptist Youth Group will sponsor an art auc- tion today in Father Stegeman Hall at St. John the Baptist Catholic Church on U.S. 41 and corner (352) 489-3166. CMUG offers Excel class today Citrus Macintosh Users Group will offer a class about .Microsoft Excel, taught by mem- ber Dave Williams, from 1 to 5 p.m. today at the Crystal Oaks clubhouse. The cost is $10 for individual members, $15 for member fami- lies and $20 for nonmembers. For information and to register for the class, call Ed Romans at 527-6522 or e-mail edro- mans@mindspring.com. CMUG will not meet in November. Because of the holi- days and schedule conflicts, the next meeting will be at 7 p.m. Saturday, Dec. 16, not the nor- mal fourth Friday. There will be an informal question-and-answer session at 6:30. Bill Dean, vice president for technical, will present a pro- gram about favorite Web sites. Visitors are welcome to the meeting. For information about CMUG call or e-mail Curt Herrin, presi- dent, at 341-5555 or curtisher- rin@mac.com. Annual food giveaway is today Church Without Walls of Inverness Ministries will have its annual Thanksgiving Foodbox Giveaway from 9 a.m. until sup- plies run out today at Super Wal-Mart in Inverness. Bring proof of Citrus County residency a picture ID or driv- ers license. One foodbox allowed per family. For more information, call the church at 344-2425. Public invited to herb, garden show Heritage Village in Crystal River on Citrus Avenue will host an Herb and Garden Show from 9 a.m. to 3 p.m. today. This outside show will high- light native and garden plants, plus locally grown herbs and ments, locally grown orchids and violets, special antique roses and a landscaping gar- dener. A master gardener will also visit with his bluebird houses. There will also be special enter- tainment. Flea market, craft show set for today Bubba's Fun & Feather on Lake Rousseau, 10930 S.E. 201 St., Inglis, will host a Flea Market and Craft Show starting at 8 a.m. today. Cookoutat 11 a.m. to 2 p.m. will offer chicken, hamburgers and hot dogs. "Kiddyoke" begins at 2 p.m.; there will be drawing prizes for children who sing. Families are welcome. There will be drawings for a work truck and motorcycle. Proceeds will be used for a firehouse for South Levy County. For information, call Barbara at (352) 447-1066. Exhibit celebrates holidays Museum features efforts Special to the Chronicle A beautiful new exhibit opens Wednesday at the Historic 1912 Courthouse in Inverness. This first-time event is a display of trees and decorations arranged by organiza- tions, clubs and businesses from around the county. Participants in this display include Great American Realty, Inverness Garden Club, Ritzy Rags & Glitzy Jewels Etc., Rotary Club, Citrus Tire, Earnest Mail, Special to the Chronicle Hospice of Citrus County Public Relations Manager Joseph Foster, left, shares a laugh with County Commissioner Gary Bartell, as November is declared National Hospice Month in Citrus County at the Citrus County Board of County Commissioners meeting Nov. 8. Hospice of Citrus County 9 honored Special to the Chronicle Hospice of Citrus County recently received national recognition for promoting advanced care planning and advocating dignified care for the elderly and physically challenged. Hospice of Citrus County Chief Executive Officer Anthony J. Palumbo joined Florida Gov. Jeb Bush at the state capital as Hospice of Citrus County was com- mended as a Pacesetter for its role as a leader in distrib- uting the nonprofit organiza- tion Aging with Dignity's advanced directive tool, Five Wishes. "It is a great honor to be recognized in Tallahassee," Palumbo said. "Through our promotion of Five Wishes, we are proud to help make it easier for members of our community to make impor- tant end-of-life decisions before a health crisis aris- es." Gov. Bush said, "The suc- of many county groups Cornerstone Baptist Church, Take Stock in Children, Clerk of Courts Relay for Life Team, Lions Club, Humane Society, Citrus United Basket, Arnold and Mary-Ann Virgilio, Santa Barbara Style, Pet Animal Wellness, Artistic Style, Interior Decorating Den, and the Inverness Olde Towne Association. Many of the trees and decorations will have donation boxes nearby to benefit var- ious charities. The exhibit compliments the display of trees around Courthouse Square, a tradi- Care with dignity November declared National Hospice/Palliative Care Month * WHAT: Holidays exhibit at Old Courthouse Heritage Museum. *'WHEN: Opens Wednesday. Museum open from 10 a.m. to 4 p.m. Monday through Friday. . WHERE: Historic 1912 Courthouse, downtown Inverness. GET INFO: Call Laurie Diestler at 341-6429. tion in its 12th year. The Old Courthouse Heritage Museum is open from 10 a.m. to 4 p.m. Monday through Friday. Call Laurie Diestler at 341-6429. Special to the Chronicle Hospice of Citrus County Chief Executive Officer Anthony Palumbo, right, is congratulated by Crystal River Mayor Ronald Kitchen, as November is official- ly declared National Hospice Month in Citrus County at the City Council meeting Nov. 13. STAN PIET, Martineer Imagery/Special to the Chronicle Hospice of Citrus County was honored recently in Tallahassee for promoting advanced care planning and advocating dignified care for the elderly and physically challenged. From left are: Anthony Palumbo, Hospice of Citrus County; Nancy Dohn, Haven Hospice; Gov. Jeb Bush; Florence Crawford, AIDS Healthcare Foundation/Positive Healthcare; Sue Deakin, Hospice of Palm Beach County; and Paul Malley, president of Aging with Dignity. cess of Five Wishes shows that people want to talk about care at the end of life in terms that are meaningful and relatable." Hospice of Citrus County is available to present Five Wishes. To schedule a pres- entation at your business, civic group, organization or place of worship, call Jonathan Beard at 527-2020. Complimentary copies of Five Wishes are available upon request Established in 1983 and licensed in 1986, Hospice of Citrus County is a not-for- profit organization which provides comprehensive and compassionate end-of-life services and grief support to more than 1,000 Citrus County patients and families annually. By demonstrating compliance with the Joint Commission on Accred- itation of Healthcare Organ- ization's (JCAHO) national standards for health care quality and safety, Hospice of Citrus County has earned the JCAHO Gold Seal of Approval. For information about the many services that Hospice of Citrus County offers, call 527-2020 or visit the Web at Mommy's diapered diva makes debut This morning I headed to Publix to grab some last-minute items for the weekend. I know that with four shows of "The Secret River" going on, it will leave little time to grocery shop for necessities, or even cook and clean like I everfind the time for that. This morning I grabbed ' bagels, muffins, bananas and diapers. I definitely cannot get through the weekend without breakfast or diapers for Emmy. Everything else can wait. I know what you're thinking - she's still buying diapers? Oh yes, and there's no end in the Shalyn foreseeable future. FU In fact, I've even resorted to bribery. Every time Emmy goes PL potty on the toilet, she gets one "tandy" what everyone else in the free world calls an M&M. Emmy also gets two "tandies" for leaving a little something more in the potty, but we won't go down that dirty road. We even got her the toilet that plays a lit- tle song after you "flush" it. I] Jn At It's a cute little guitar beat, then my recorded voice comes on and says "Bye- bye pee-pee. Yea, Emmy!" -Since we've used it so much, the song and voice are slowly fading. My voice sounds more and more like a man as the batteries fade and I come closer to the realization that I'll be sending a kindergart- ner to school in Pull-ups. I know, I exaggerate, but I can- not help it. It's shocking to me that her performance debut will be this weekend in the show - in diapers. She's a little angleworm, fully Barker equipped with the cutest cos- LL tume you've ever seen and a Mason jar to come out of. ATE I don't know why I thought my daughter would be potty trained before she made her stage debut we are talking about the same kid that said "5, 6, 7, 8" before she counted from 1 through 4. If only she'd learn everything as quickly as she learned how to stand in the spot- light the little ham! Watching her at the dress rehearsal last * WHAT: "The Secret River," a ballet. * WHEN: 2 and 7 p.m. today; 2 p.m. Sunday. WHERE: Dunnellon Middle School. TICKETS: $10 each. weekend brought tears to my eyes. Maybe after the show, I'll bring home the spotlight and shine it on her in the bathroom. Regardless, I hope you all come see my diapered diva in "The Secret River" this weekend at Dunnellon Middle School. Call (352) 489-6756 for tickets, which include a program and a complimentary jar of M&Ms in the restroom. Yes, I am exaggerating again. Programs cost extra. Shalyn Barker resides with her husband, Patrick, and daughter, Emmy, in the Beverly Hills area. All three are lifelong residents of Citrus County. She can be reached at citrusamom@yahoo.com. I - L..-I J able in the right parking field -i next to the garage area. Our mission is to assist the needy. The pantry is open to those who truly qualify for this program. No vouchers or finan- cial aid are given. Call Anna at' 527-2381 or Maria at 746-3117, * Submit information at least two weeks before the event. N Submit material at Chronicle offices in Inverness or Crystal 0 News notes tend to run one week prior to the date of an * Early submission of timely material is appreciated, but River; by fax at 563-3280; or by e-mail to community@ event. Publication on a specific day cannot be guaranteed. multiple publications cannot be guaranteed. chronicleonline.com. N Expect notes to run no more than twice. I News NOTE Parrot Heads plI food drive today, The Parrot Heads of CitruV County will conduct a food d.f to help assist the Daystar Life', Center food bank. The drive will begin at 7 p.m. today at Cravings on the Water restau-' rant and tiki bar, at the Best , Western Resort in Crystal River. Bring canned or dried goods. This event will be part of the phlock'in (social time) the Parrot Heads have every month. Live: music and prize giveaways are on tap for the evening. Those who can't stay for the fun are welcome to pull into the parking lot and drop off their food dona- tions someone will be on hand to assist. All cash donations collected that evening will be used to pu[- chase turkeys for the 102.7 FM radio station's drive to help fami- lies in need for the holidays. I The Parrot Heads are a not-I for-profit club that "parties with b purpose." Members have fun raising money for charities and' families in need of help, and working with programs to help the environment. For more information about the group, visit- sofcitrus.org. VFW to host nine-ball tourney Veterans of Foreign Wars Post 7991 of Dunnellon will host its first nine-ball pool touma- ment. The public is invited to participate. This is an "anyone-can-play' tournament. Young players anc women players are welcome. Register at the post or by calling Ron Audette at (352) 489-8428. Since this is the post's first tour- nament, all registered players and the tournament committee' will meet at 2 p.m. Sunday at the post home to discuss tour- nament rules and prize payout. SPoinsettia sale 1 benefits Pirate band The Crystal River High School Band is offering five- to: seven-large-bloom poinsettia plants to complement homes or offices this holiday season. The cost per 15- to 18-inch plant is $9 and they will be deli - ered in a red, green or gold sleeve. Delivery of the plants will be the week of Dec. 1. The plants will last through the holi- day season with proper care,r! and complete care instructions: are included. Orders are tax deductible ani must be placed by Monday to ensure delivery. Call Marcie Peterson at 382-0342. Make checks payable to FOTPB (Friends of the Pirate Band) and mail to: Friends of the Pirate Band, P.O. Box 14, Crystal River, FL 34423. Audubon Society to meet Monday Citrus County Audubon Society will meet at 7 p.m. Monday at West Citrus Community Center, 8940 W. Veterans Drive, Homosassa,to hear member Don Wilson sharp his knowledge and experience i in "hunting" wildlife with a digital camera. The meeting will begin with , brief updates about local envi- I ronmental issues and reports on a bird of the month and a bird- friendly plant of the month.,i The center is one block west of U.S. 19, about 1.5 miles south of Ozello Trail or 2 miles north of central Homosassa , Springs. Call Jim Bierly at 382-i 3365. Food pantry to ; be open Tuesday Our Lady of Grace Catholic Church Food Pantry will be open from 9 to 10 a.m. Tuesday. The Food Pantry is at 6 Roosevelt Blvd., Beverly Hills. '* Food will be distributed on tHe right side of the parish office - garage area. Parking is avail- "I --I /:/ . 1 . v^; vi ^;, RNF -.! :7. I SATURDAY, NOVEMBER 18, 2006 9A Come and Shop BonWorth For all Your Holiday SSavings! 20o -40% off SSelect Merchandise -; Come in and get a sneak peak at Spring 2007 AMERICAS BEST 9.99 PANTS Springs Plaza, 3916 South Suncoast Blvd Homosassa, FL 34448 (352)621-0155 Western Way Shopping Center . 12987 Cortez Boulevard SBrooksville, FL 34613 (352) 597-8264 S.Hernando West Plaza,1416 Pinehurst Dr Spring Hill, FL 34606 (352) 666-5930 Inverness Regional Mall 1488 US Hwy 41 N,Inverness, FL 34450 Al (352)341-1591. com 687653 CITRUS COUNTY (FL) CHRONICLE STOCKS XLUA SvI'URDuAY, N UVIcM II8 O, 2006 TH ARKTI RVE MOST ACTIVE ($1 OR MORE) Name Vol (00) Last Chg Lucent 567231 2.62 +.01 Pfizer 475548 27.21 +.45 TlmeWam 335293 20.43 +.10 PeabdyE s 322915 42.00 +1.07 GenElec 286311 36.25 +.29 GAINERS ($2 OR MORE) Name Last Chg %Chg EnterraEg 10.00 +1.27 +14.5 USSteel 70.57 +6.00 +9.3 SallyBty n 7.86 +.56 +7.7 ScottshRe 6.83 +.49 +7.7 Metrogas 3.66 +.26 +7.6 LOSERS (S2 OR MORE) Name Last Chg %Chg Allilmag 6.28 -.56 -8.2 AnnTaylr 36.57 -3.11 -7.8 MedcoHith 48,45 -3.21 -6.2 Wendyss 33.53 -2.23 -6.2 WestlkChm 33.23 -2.06 -5.8 DIARY Advanced Declined Unchanged Total issues New Highs New Lows Volume 1,545 1,728 160 3,433 161 10 2.716,105.260 MOST ACTIVE $1 OR MOREa) Name Vol (00) Last Chg SPDR 532211 140.42 +.04 IShR2Knya 306174 78,59 -.05 SP Engy 248965 57.10 +.47 OIISvHT 131257 136,85 +1,09 SemiHTr 114565 35.28 -.16 GAINERS ($2 OR MORE) Name Last Chg %Chg Jinpan 18.15 +4,65 +34.4 Sfco 5.95 +.95 +19.0 Bamwell 21.42 +2.45 +12.9 RegeneRx 2.96 +.32 +12.1 BellInd 3.50 +.37 +11.8 LOSERS ($2 OR MORE) Name Last Chg %Chg NatLampn 2.26 -.35 -13.4 BirchMt g 2.52 -.38 -13.1 PolyMet gn 2.90 -.25 -7.9 Metalline n 3.20 -.25 -7.2 Metretek 14.80 -1.00 -6.3 DIARY Advanced Declined Unchanged Total Issues New Highs New Lows Volume 490 543 89 1,122 62 19 302,540,723 MOST ACTIVE ($1 OR MORE) Name Vol (00) Lest Chg NasdIOOTr 895233 44.30 Intel 560161 22.10 -.23 SunMIcro 501011 5.47 +.03 Microsoft 452563 29.40 -.07 Cisco 434586 26.93 -.22 GAINERS ($2 OR MORE) Name Last Chg %Chg HrvyEIcrs 2.74 +.78 +39.7 AdvMag 57.00 +13.10 +29.8 Mamma 2.24 +,38 +20.4 LibBellNJ 7.77 +1.27 +19.5 ConorMd 32.68 +5.16 +18.8 LOSERS ($2 OR MORE) Name Last Chg %Chg OceanB 2.70 -.89 -24.7 CTI Inds 5.27 -1.21 -18.7 UtRetail 16.23 -3.53 -17.9 DitechNet 7.38 -1.41 -16.0 CitzFnCp 4.69 -.81 -14.7 DIARY Advanced Declined Unchanged Total Issues New Highs New Lows Volume 1,273 1,740 170 3,183 125 35 1,752,706,575 Here are the 825 most active stocks on ins New York Stock Exchange, 765 most active on the Naadaq National Market aend 11 most active on the American Stock Exchange. Stocks In bold are worth at least 55 and changed 5 percent or more in price. Uflriining for 50 most active on NYSE and Nasdaaq ... 10. 'b.. Stock Foolnotes: cc -PE greater than 9G ola -Issue nas been called for redempilon ly Pe PE m C company da -New 52-week low do LOSS in leet 12 mos ea o Company formerly listed 7 w 2aM i on The American Ecnhanges Emerging Company Marketplace g Dividends and earn. ,, ; .I inge in Canadian dollars n temporary vAmpt from Neaeaq capital and surplus lining .0S. * SualiaillOfn n 6Stoc ksa a ne a issue In meI las i year Tnh 52-week high and low liguraes are only from Ine beginning of trading p Prefreerd sruoc l issue pr Preferences pp * Hoidaer owes instaiimente of purchase price q Ciosea-end mulual lund no PE calcuiBt- ad rn Right to buy securely at a speciiea price e Stock neas spill y at least 20 percent .. u. cg within moe see6 ear wli Traaea will be seiea when me Stock Ia I Sua wd wear a-i. a* ; uM -1 2 tributea. v Warrant allowing a purerhase ofe a ilock. Ni 652-week nigh un Unit,, .. ,- . r , including more man one security vi Company in bankruptcy or recelveranip or Deing ,.'*'. 5 ., rearganizead under e Dankruptcy law Appears In front of me name J .. Dividend Footnotel: a Etra dklidends were paid Dut aie not Included D Annual ra re Plus Taock 0 Liquideing odiidend a Amouni deolarea or paid In IBM 12 months I - Currert annual rale. wnion was inoreasea by most reer, dividend announcement I Sum of diailanas paid aear stock spic no regular rlae I Sumr of diaidenoa paid Inis year o 'I.'M ft ,Cho Most recent dividend wee omine or deferred K Declared or pida ifiS year a cumulatiae 2. a -* issue win adividenda in arrears m- Curreni annual rate. whioh weas decreased by most a .'10 dml , recent divicend announcement p inilial dividend annual rate not known yield no .; a .. - shown r Declared or paid in precealng 12 months plus alock dividend I Paid in saock L h app a cure: Sthe Associated Press. Sales figures are unofficial. STOCKS OF LOCAL INTEREST YTD Name DIv YId PE Last Chg %Chg AT&T Inc 1.33 BkofAm 2.24 BellSouth 1.16 CapCtyBk .65 Citlgrp 1.96 Disney .27 EKodak .50 ExxonMbl 1.28 FPL Grp 1.50 FlaRock .60 FordM .25 GenElec 1.00 GnMotr 1.00 HomeDp .90 Intel .40 IBM 1.20 Lowes s .20 +.80 +35.6 -.05 +18.9 +1.16 +60.8 ... +2.1 +.14 +4.7 -.12 +37.4 +.19 +15.8 +.41 +30.1 +.27 +26.8 -,87 -11.4 -.14 +15.2 +.29 +3.4 -.16 +82.1 +.47 -5.4 -.23 -11.5 +.34 +14.1 -.23 -8.6 YTD Name Div YId PE Last Chg %Chq 1. 1n1ids .1 00 .15- 2.0. McDnlds 1,00 Microsoft .40 Motorola .20 Penney .72 ProgrssEn 2.42 RegionsFn1,.40 SearsHIdgs SprintNex .10 TimeWarn .22 UniFirst .15 VerizonCmi.62 Wachovia 2.24 WalMart .67 Walgrn .31 +.15 +24.0 -.07 +12.4 -.23 -.9 -1.53 +44.1 -.01 +7.7 -.03 +8.4 +3.72 +49.7 +.11 -4.4 +.10 +17.1 -.02 +28.5 +.10 +19.7 ... +4.1 -.41 +1.5 -.72 -5.1 52-Week Net % YTD 52-wk High Low Name Last Chg Chg % Chg % Chg 12,325,91 10,652.27 Dow Jones Industrials 12,342.56 +36.74 +.30 +15,16 +14.64 5,013.67 3,979.39 Dow Jones Transportation 4,847.72 -33.85 -.69 +15.53 +17.08 454.39 380.97 Dow Jones Utilities 449.96 +.43 +.10 +11.07 +13.49 8,923.67 7,489.74 NYSE Composite 8,897.17 +2.69 +.03 +14.74 +16.54 2,046.65 1,078.14 Amex Index 1,996.66 -.11 -.01 +13.51 +17.29 2,453.35 2,012.78 Nasdaq Composite 2,445.86 -3.20 -.13 +10.91 +9.82 1,403.76 1,219.29 S&P500 1,401.20 +1.44 +.10 +12.25 +12.25 794.18 649.92 Russell 2000 788.47 -2.28 -.29 +17.12 +17.29 14,127.91 12,249.90 DJ Wilshire 5000 14,098.12 +7.17 +.05 +12.63 +12.83 NW R STA DIv Name Last Chg .09e ABBLtd 15.76 -.15 1.00 ACE Ltd 57.80 +.07 .60 ACM Inco 8.07 -.01 AESCorp 22.38 +.03 .641 AFLAC 44.47 +.01 ... AGCO 30.70 -.49 1.48 AGLRes 37.93 +.05 ... AK Steel 14.65 +.67 ... AMR 32,32 -.62 .90e ASA Ltd 58.11 -.64 133 AT&Tlnc 3320 +80 1.75 AT&T 2041 25.27 +.06 .09r AUMOptron 13.05 1.75e AXA 38.35 -.33 1.18 AbtLab 47.67 +.18 .70 AberFit 71.09 -1.58 .35f Accentures 35.15 +.15.18 .90e AdamsEx 13.64 +.07 .30 Adesa 26.66 +.19 .24 AdvAuto 36.07 +.09 .. AdvMOpt 38.77 +.05 ... AMD 21.45 -,29 2.40 AdvEngyn 11.98 +.57 .44 Advo 29.02 +.37 ... Aerops 28.49 -.80 .04f Aetnas 41.27 -.15 ... AfCmpSi 750.08 +.61 ... AgereSys 17.97 -.41 2.06t Agilent 33.75 +.10 .03 Agniog 37.59 +.33 .. Ahold 9.97 -.01 ... ArTran 13.03 +.10 ... AlbertoCnu21.43 +1.43 .501 Alten 46.74 +.44 .21e Alcatel 13.50 -.08 .60 Alcoa 28.27 -.04 ... AlgEAgy 43.93 -.56 .40 AllegTch 78.65 +2.07 .40 Allergan 112.50 +1.76 1.45 Allete 46.42 -.14 ... AianOne u6.10 +.12 .95 AIlWrid2 13.52 +.02 3.56e AlliBem 77.76 -.02 Ai.. dWaste 12.90 -.18 1.40 Allstate 64.48 +.20 .50 Altel 56.84 +.14 .18 Anphanra 23.10 +.01 3.44 Altida u85.01 +1.44 1.35e AmBev 46.90 -.47 .72 AmbacF 85.32 -.22 ... Amdocs 37.92 -.86 2.54 Ameren 53.80 +.39 .81e AMovilL 43.17 -.43 1.561 AEP 41.41 -.01 .60 AmExp u59.84 +.27 .76'm AFndRT 11.56 -.02 .66 AmIntGDNf 7205 -31 .72 AmStand 46.06 -.61 .96 AmSIP3 u12.02 +.06 ... AmTower6f 37.62 -.08 ... Amnedt 25.36 -.17 2.32 Amerigas 31.95 +.42 .44 Amedprise 53.41 -.21 .201 AmeriBrgs 46.97 -.40 .36 Anadarks 46.83 +.31 .64 AnalogDev 33.67 -.14 .40e AnglogldA 42.57 +.09 1.18 Anheusr 46.89 -.18 ... ATaylr 38.57 -3.11 .48e Annaly 13.76 +.01 .60 AonCorp 35.31 -.03 .601 Apache 65.49 +1.44 .461 AquaAmrn 24.25 -.38 ... Aquila 4.60 .24 ArchCs 33.15 +.14 .40 ArchDan 34.36 -1.06 1.74 ArchstoSm 56.98 -.43 .40 AwvMerit u17.67 -.19 1.10a Ashland u66.56 +1.01 .. AssistLiv n 7.65 +.20 .68 AsdEstat 14.86 -.19 1.41e AstraZen 57.58 -.65 1.28f ATMOS 32.62 +.39 ... AutoNatn 20.49 -.16 .921 AutoData 49.65 -.13 ... Avaya 13.01 -.03 ... Avnet 25.68 +.02 .70 Avon u33.67 -.17 1.68 BB&TCp 43.77 -.15 .74e BHPBilLt 40.21 +.12 .20 BJSvcs 31.75 +.29 ... BMCSfit 32.75 +.15 2.30e BP PLC 66.38 -.24 2.241 BRT 29.69 -.31 .52 BakrHu 68.50 -.67 .40 BallCp 42,00 +.05 1.77e BcoBrad s 37.97 +,09 .76e Bncoltau 33.94 +.10 224 BkofAm u5485 -05 .88 BkNY 35.86 +.09 .72a Banta 52.16 +.19 .60 BamesNbl 39,14-1.26 BarrPhm 49.52 +.01 .22 BarickG 28,.46 .52 BauschLIf 48.61 -.47 .5Me Baxter 46.12 -.02 2.16 BaytexEgn 18.31 +.48 .40 BeazrHm 44.07 -.82 .86 BectDck 71.24 -.14 1.16 BellSouth 43,57 +1.10 .50 Belo 1851 -.09 ... BemaGold 4.97 -.04 .40f BestBuy 55.00 -.01 .. BigLots 22.33 -.77 1.16 BioMedR 29.41 -.52 1.52 BlackD 88.06 -.96 1.32 BIkHillsCp 35.42 +.04 .45a BIkFL08 14.23 .54f BlockHR 23.88 +.10 ... Blkbstr 4.75 -.09 .58e BlueChp 6.02 -.08 1.60f BdwekPpl 29.65 1.20 Boeing u89.52 +.81 .. Bombay 1.31 +.02 .40 Borders 23.22 -.76 .. BostBeer 35.09 -.36 2.72 BostProp 108.62 -.95 ... BostonSci 16.23 -.07 1.12 BrMySq 24.80 +.14 .60 Brunswick 32.65 +.19 .64 BungeLt 66.03 -.15 1.00 BudNSF 76.46 -.37 .16 CAlnc 22.45 -.24 ... CBRBliss 31.70 -.28 .80 CBS Bn 29.80 +.02 2.16 CHEngy 52.90 +.33 .10 CIGNA 121.49 +.58 .80 CrTGp 52.13 +.11 ... CMSEng 15.25 +.05 .48 CSSInds 33.10 +.17 .40 CSXs 36.38 -.90 .15 CVSCp 29.07 -.54 10.00e CablvNYs 27.84 -.05 .16 CabotO&G u58.90 +1.80 ... Calgon 5.10 -.20 .28 CallGolf 14.89 +.01 .16 Camecogs 32.78 +1.18 ... Camerons 52.75 +.17 .80 CampSp 37.55 -.17 .30 CdnNRsg 50.29 -.08 2.76 Caneticgn 14.13, +.80 .11 CapOne 75.50 -.10 126 CapMpfB 13.23 -05 .36 CardnlHIth 62.67 -.72 .40 CaremkRx 47.57-1.05 1.10f Carnival 49.86 -.04 1.20 Caterpillar 60.94 -.43 .16 Celanese 20.88 +.41 ,67e Cemexs 32.07 +.04 .60 CenterPnt 16.00 -.17 .16 Centex 53.93 +.70 .25 CntryTel 41.55 +.15 Cerdian 24.78 -.57 ChmpE 9.33 +.08 .01 Checkpnt 19.45 -.04 .20 Chemtura 9.64 -.06 .24 ChesEng 32.51 +.39 2.08 Chevron 69.10 +.55 2.52 ChiMerc u535.00--5.05 ... Chicos 24.45 -.37 Chipoden 59.88 +1.11 .30i Chiquita 14.04 -.42 1.00 Chubbs 52.20 -.39 1.31e ChungTel 19.10 -.35 .16 Cimarex 35.39 +.43 ... CinBell 4.61 +.01 .161 CircCity 24.18 -.39 1.96 Citgrp 50.80 +.14 1.00 CitzComm 14.03 -.01 .40a ClairesSIrs 29.52 -.43 .75 ClearChan 35.22 -.14 .50 ClevCliffss 43.15 +1.54 1.24f Clorox 65.41 +.08 ... Coach 42.04 -.30 .24 CocaCE 20.23 -.09 1.24 CocaCI 47.26 +.12 ... Coer 5.02 +.05 1.28 ColgPal u66.01 +.36 .68 ColBgp 24.44 -.04 .54a Collntln 8,33 +.02 .48 CmcBNJ 35.22 -.16 .24 CmrdMis 27.31 +.55 ComScop 31.52 -.48 CmtyHIt 33.91 +.55 .54a CVRDs 26.05 -.16 .54e CVRDpls 22.20 -.08 Compsci 51.70 -.06 .72 CoAgra 25.22 -.12 1,44 ConocPhil 6270 +,43 .28 ConsolEs 34.15 +.43 2.30 ConEd 47.99 +.08 ConstellA 27.89 -.16 1.51 ConstellEn 66.39 -.18 C.. ArB 42.49 -.38 Cnvrgys u24.52 +.65 .42 CooperTire 13.83 +.17 Coming 2121 -40 .29e CoisGr u18.91 +1.23 .60 CntwdFn 40.26 -.47 ... CovantaH 20.45 +.20 ..CoventryH 45.58 +.05 CrwnCstle 34.55 +.35 ... CrownHold 20.55 +.04 1.36 CullenFr 55.46 +.79 .. CypSem 17.17 -.09 .78 DNPSelct 10.95 +.07 1.00 DPL 28.10 +.15 .60 DRHorton 25.10 +.15 2.06 DTE u46.95 +.14 1.82e DaimlrC 60.60 -1.37 .46f Darden 40.78 -.27. DaVita 53.24 +.15 1.56 Deere 90.36 +.94 ... Denbury 28.15 +.49 .45 DevonE 69.96 +1.08 .50a DiaOffs 74.67 +.94 .. DicksSprt 55.56 -.23 .16 Dillards 35.80 -.29 DirecTV 21.76 +.21 .27f Disney 3294 -12 .06e DrReddys 15.90 -.55 .20 DollarG 15.17 -.12 2.76 DomRes 80.88 +.48 1.04 DonlleyRR 35.39 +.10 .06j DoralRnd 4.44 -.16 .74 Dover 50.05 -.18 1.50 DowChm 41.18 -.27 1.00 DowJns 36.00 ... DrmwksA 29.27 +.76 1.48 DuPont 47.26 -.37 1.28 DukeEgy 31.70 +.20 1.90 DukeRty u41.10 +31 1.00 Dugqight 20.17 -.08 ... Dynegy 6.10 +.06 ETrade 23.85 -.11 ... EMCCD 1272 -12 .24 EOG Res 68.30 +2.37 1.76 EastChm 60.17 -.44 .50 EKodak 27.09 +.19 1.56 Eaton 75.60 +.07 1.08 Edsonint 46.70 +.19 .16 EIPasoCp 13.73 +.16 Elan 14.74 +.03 .20 EDS 27.24 -.06 .20 ElkCorp 36.05 +.09 2.00 Embarqn 51.11 +.19 2.101 EmrsnE 88.15 -.37 1.28 EmpDist 24.10 -.18 3.70 EnbrEPtrs 49.69 -.06 .40 EnCana 49.98 +.75 2.98e Endesa 46.23 -.04- 5.04 Enerplsg 42.17 +1.31 ... EnPro 35.00 -.19 .10 ENSCO 49.49 +.58 2.16 Entergy 89.35 +.16 1.44 EnterraEg 10.00 +1.27 .921 Eqtyinn 16.15 1.32 EqOffPT 44.72 -.13 1.77 EqtyRsd 50.57 -.48 .50f EsteeLdr 41.04 +.17+ .. ExcoResn 14.00 1.60 Exelton 58.59 +.09 1.28 ExxonMbl 73.08 +41 FMCTch 57.76 -.71 1.50 FPLGrp 52.68 +.27 ... FairchldS 16.50 -.38 .42 FamDIr 28.45 -.18 1.04 FannieMif 58.14 -.92 .36 FedExCp 117.44 -.70 .24 FedSignl 16.34 -.02 .51 FedrOSs 42.57 +.58 2.00 Ferrellgs 23.15 +.02 .58 Ferroi 20.62 -.12 .20a FidNInfo 41.88 +.14 .24 FirstDatas 25.11 +,47 4.12e FstRnFd 18.10 -.09 1.60 RTrFid 18.06 +.10 1.80 FirstEngy 58,64 +.02 .60 RaRock 43.45 -.87 .80 Fluor 83.89 -.31 .501 FootLockr 23,27 -M64 251 FordM 869 -,14 3.25 FordCpfIS 37.00 -.20 4.80e FrdgCCTg 20.87 +31 ForestLab 47.85 +.10 ForestOlls 33.62 +.21 1.56 FortuneBr 81.17 +,47 .48 FrankRes 108.50 -.35 1.88 FredMac 68.00 -.59 1.25a FMCG 57.40 +1.24 .. Freescale 39.84 ... FreescB u39.84 +.04 .20m FdedBR 7.21 -.09 .12 FrontOils 29.56 +.77 .84 GATX 45.76 -.24 .80f GabelliET u9.35 +.03 .72 GabUtl 9.42 +.04 ... GamreStp 51.74 -.53 1.24 Gannett 59.87 -.10 .32 Gap 1981 +.01 Gateway 1.91 +.07 ... Genentch 81.87 +1.15 .92 GenDyns 73.91 -1.03 1.00 GenBeec 36.25 +.29 1.64 GnGrthPrp 48.34 -.06 1.40 GenMills 56.51 +.74 1.00 GnMotr 35.37 -.16 .36f Genworth 33.33 -.02 .32 GaGulf 21.17 -.55 .69e Gerdaus 15.00 -.02 1.74e GlaxoSKIn 52.00 +.03 .90 GlobaiSFe 54.682 +.48 .46e GolUnhass a 30.01 +.32 .23e GoIdFLtd 16.73 -.04 .18 Golderc Q 26.26 -.04 1.40 GoldmanSul95.04 -1.68 .80 Goodrich 44.93 -.03 .GoodrPet 39.56 +.23 ... Goodyear 18.00 -.41 GrantPrde 40.91 +1.01 1.66 GtPlainEn 32,37 -.22 1.12 GMP 33.72 -.07 ..Griffon 23.77 -.06 .16e GTelevsas 24.54 -.27 .75e GuangRy 25.44 -.11 .68 HCAInc 50.97 +.03 .84 HRPTPrp 11.71 -.09 3.80e HSBC 94.59 +.20 .30 Hallbtns 32.60 +,09 .95e HanJS 14.45 +,19 .47 HanPtDiv 8.92 -.16 .58 HanPtDv2 11.22 +,05 Hanesbrd n 24.00 -.04 .301 Hanoverlns 48.20 +.12 1,92e Hanson 71.64 +.16 .84 HarleyD u73.34 +.64 HarmonyG 14.83 -.09 1.60 HarrahE 75.86 -.23 2.00f1 HartfdFn 88,42 +.42 4.56 HarvstEng 23.81 +.79 .48 Hasbro 26.83 -.08 1.24 HawaliEl 27.06 +.01 1:70 HtthCrPr 32.67 +.15 2.56 HItCrREIT 39.60 -.27 .24 HItMgt 20.02 +.20 2.64 HIthcrFlity 39.07 -.03 .. HeaBthNet 43.83 +.16 ... HedaM 6.32 +.11 1.40 Heinz 43.94 -.01 ... HelixEn 29.90 +.05 ... HellnTel u13.62 +.11 .18 HelmPays 24.94 -.31 1.08 Hershey 52.74 -.20 Hertzn u15.66 -.06 .40 Hesss 46.04 +.73 .32 HewletlP 39.77 -.36 1.70 HighwdPrp 37.65 -.02 .16 Hilton 30.90 -.06 .90f HomeD 38.28 +.47 .91 HonAllnti 42.94 -.38 ... Hospira 32.80 +.29 2.96 HospPT 49.46 +.24 .80f HostHots 23.95 -.05 HovnanE 32.00 +.08 .. Humans 53.37 -1.71 .07 lAMGIdg 8.94 -.13 .36e ICICIBk 38.07 -.98 .12 IMSHIth 28.65 -.29 .58e iShBrazil 43.18 -.09 .36e IShHK u15.39 +.13 .06e iShJaopan 13.41 -.12 .29e iShSing 10.68 +.05 1.25e iShChin25 93.48 +.58 .87e iShDJTel 28.41 +.15 2.66e iShREst 81.20 -.10 3.08 IStar 45.10 +.09 1.20 Idacorp 39.53 -.16 ... Idearcwi 26.25 -.05 .84 TWs 47.07 -.16 .56 Imaton 45.53 -.18 .. Infineon 12.67 +.30 .72 IngerRd 38.40 -.12 ... IntcntlEx u101.20 +6.60 1.20 IBM u93.81 +.34 ,. IntlCoaln 4.69 -.06 .521 IntlGame u45.07 +,58 1.00 IntPap 32.84 -.17 ., IntRect 40.50 -.63 .20 ISE 50.77 +.99 Interpublic 11.92 -.01 SInvTech 39.55 +1.30 .. IronMtn 44.32 -.19 1,36 JPMorgCh 4766 -,19 .28 Jabil 28.75 -.37 .04 JanusCap 20.47 +.16 ... Jarden 36.99 +.24 1.50 JohnJn 6724 +.71 1.32f JohnsnCU 84.99 -.40 .56f JonesApp 33.75 -.05 1.00 KB Home 49.07 +.26 KBRIncn u21.95 +1.20 1.02e KTCorp u24.52 +.57 .48 Kaydon 41.34 -.34 1.16 Kellogg 50.15 +.14 .64 Kellwood 30.12 -.02 1.38 Keycorp 36.89 -.32 1,86 KeySpan 40.79 +.02 1.96 KimbClk 66.52 +.22 3.24 KindME 47.06 +.61 3.50 KndMorg 104.99 -.17 ... KnelicC 34.50 -.30 .. KingPhrm 16.40 +.25 Kinross g 11.47 -.01 Kohls 73.27 +.07 1.001 Kraf 35.45 -.15 .,. KrspKrmIf 10.14 -.06 .26 Kroger 22.17 -.06 ... L-1Ident 16.59 +.33 .10e LLERy 3.33 -.02 LSI Log 10.94 +.39 1.44 LTCPrp 26.45 -.25 .48 LaZBoy 12.80 -.34 ... LabCp 69.60 -.29 1.40 Lacede 36.65 -.23 .. LVSands 90.65 -.41 .84 LeggMason 97.70 +1.77 .68 LeggPlat 24.35 -.09 .48 LehmnBrs 76.13. +.20 .64 LennarA 49.34 -.06 .. Lexmark 66.82 -.37 .59e LbtyASG 5.27 -.04 1.60 UlilyBi 54.55 -.01 .60 Limited 30.80 -.39 1.58f UncNat 65.18 -.44 .26 Undsay 33.63 -.58 SUonsGtg u11.47 +.05 1.401 LockhdM 89.15 -.33 .25 Loewss 39.41 -.12 .60 LaPac 20.25 -.34 .20 Lowess 30.48 -.23 ,, Lucent 2,62 +01 .90 Lyondell 24,62 -.24 2.40 M&TBk 121.55 -.63 1.24 MBIA 67.13 +.03 ,54 MDURess 25.99 +.13 .. MEMC 36.31 -1.03 .47 MCR 8.45 +.03 ... MGMMir 47.86 -.10 .03e Madeco 10.85 +.45 1.52 Magnalg 74.62 -.12 .801 Manulligs 33.43 -.16 1.60 Marathon 88.99 +2.12 .25 MarintAs 45.26 +.17 .68 MarshM 32.09 -.12 ... MStewrt 21.85 -.01 MarvelE 27.98 -.1.1 .88 Masco 28.97 +.47 .16 MasseyEn 24.72 +.48 .36 MasterCd n 94.79 +.27 MateriaSdci 11.65 -.30 .65f Mattel 23.66 -.14 .. McDermils 48.29 +1.00 1.00f McDnlds 41.82 +.15 .73 McGrwH 65.34 +.08 .24 McKesson 49.55 -1.17 McAfee If 28.41 -.25 .92 MeadWvsco 29.01 -.03 MedcoHIth 48.45 -3.21 .44 Medtmic 48.71 -.10 .88 MellonFnc u39.86 +.27 .20 MensW 38.48 +1.48 1.52 Merck 45.06 +.41 .. MeridGld 26.81 -.13 1.00 MesillLyn 90.87 -.21 .59f1 Metie 58.98 -.06 .. MicronT 14.57 -.17 2.38 MidAApt 60.60 -.98 Midas 22.06 -.11 .. Milacron .83 Millipore 68.53 +67 1.13j MillsCpf 19.98 -.13 .. Mndrayn 21.36 +1.22 Mirantn 28.95 +.21 .06e MitsuUFJ 12.08 -.11 .50 MittalSi 40.39 -.48 ... MobileTel 42.99 -.72 ,201 MonayGrm 31.84 -.17 .40 Monsantos 46.80 -.59 1.08 MorgStan 79.12 +.44 2.44e MSEmMkt 27.83 -.29 .. Mosaic 20.94 -.16 .20 Motorola 22,38 -23 .601 MurphO 49.51 +.62 .24 ManLab 20.87 -.12 .. NCRCp 44.25 +.01 .. NRGEgy 53.79 -.10 NYMEX n 132.99 ... NYSE Gpn 93.72 -.06 .. Naborss 30.56 +.26 1.56 NatlCity 36,97 -.39 1.20 NatFuGas 37.73 -.50 2.54e NatGrid 68.56 -2.04 .. NOilVarco 60.30 +.61 .16f NatSemi 24.92 -.17 .. Navteq 33.57 +.96 .21a NewAm 2.32 +.04 1.52f NJ Rscs 52.30 -.13 1.00 NYCmtyB 16.38 +.03 .70 NYTimes 24.55 -.08 .84 NewellRub 29.15 -.06 ... NewfldExp 46A41 +2.77 .40 NewmtM 44.20 -.04 NwpkRs If 6.57 -.19 .12e NewsCpA 21.27 -.15 .10e NewsCpB 22.09 -.10 .20 Nexengs 51.47 -.55 .92 NiSource 23.88 +.02 1.86 Nicor 49.28 +.08 1.48f NikeB 95.58 +.35 .. 99 Cents f 11.61 -.25 .16 NobleCorp 71.85 +1.95 .30 NobleEn 49.15 +.13 .46e NokidaCp 19.93 -.11 .42 Nordstrm 48.08 +.16 .72 NorflkSo 51.09 -.15 ... NortelNtIf 2.07 +.01 1.00 NoFrkBc 27.90 .75 NoestUt u27.04 +.07 1.20 NorthropG 67.11 -.54 1.361 NStarRit 14.98 +.03 .89e Novartis 58.29 +.07 1.301 NSTAR 34.67 -.34 .40a Nucors 57.11 +1.92 .69 NvFL 13.80 -.04 .74 NvIMO 14.63 -.03 1.36f OGEEngy 39.35 -.26 .56f OMICp 23.40 +.51 .88 OcciPets 47.49 +.28 .. OffcDpt 41.95 -.07 .80 Olin 16.81 -.76 3.88f ONEOKPt 61.00 +.25 ... OreSl 58.96 +2.11 .40 OshkoshT 47.92 +.82 .. OwensCn 29.19 -.05 .. Owenslll 18.00 +.02 1.32 PG&ECp 45.43 -.50 .88 PNMRes 30.47 -23 1.92 PPG 65.63-3.52 1.10 PPLCorp 34.15 -.02 Pactiv u33.67 +.16 .. ParkDri 9.17 +.08 .. PaylShoe 28.07 -.12 .24 PeabdyEs 4200+107 3.00 Pengrthg 17.15 +.65 1.60f PennVawi 25.35 +.43 4.08 PennWstgn 29.13 +.59 .72 Penney 80.10 -1.53 .27 PepBoy 13.01 +.20 1.04 PepcoHold 25.64 -.02 1.20 PepsiCo 62.28 +.48 .50 PepsiAmer 20.34 +.09 1.51e Prmian 16.39 +.15 4.75e PetrbrsA 80.53 -.60 2.02e Petrobrs 89.30 +.06 .96 Ptizer 27.21 +.45 .801 PhelpsDs 95.02 +.14 .15 PhlVH 47.24 -.73 .96 PiedNG 27.87 -.10 .30j Pier1 7.10 -.11 .78 PimcoStrat 11.02 +.11 .261 PioNtrl 41.17 +.91 1.28 PitnyBw 47.52 -.10 ... PlainsEx 43.68 +.98 1.60 PlumCrk 35.53 -.01 ,30 PogoPd 47.56 +.70 1.80 PostPrp 45.98 -.57 1.00 Praxair u63.24 +.04 .12 PrecCastptu74,83 +.69 3.72 Precril 24.83 +.95 Pridelntl 29.06 +.81 3.00 Primewg 20.44 +.47 1,24 ProctGam 63.86 +,34 2,42 ProgrssEn 47.28 -.01 .04 ProgCps 23.03 -08 .28 ProsStHiln 3.23 -.01 1.44 ProvETg 10.80 +.44 .951 Prudenti 81.54 -.61 2.28 PSEG 65.25 -.29 1.00 PugetEngy 24.25 +.06 .16 PulteH 31.11 +.05 ,38a PHYM 7,21 .49a PIGM 9.90 +.04 .36 PPraT 6.33 +.02 ... Qimodan 15.85 -.12 .56f Quanexs 35.70 +.63 .40 QstDiag 53.36 -.20 .94 Questar 81.41 +.65 ... QkslvRes 37.83 +1.56 ... Quiksllvr 14.26 -.45 .. QwestCm 7.93 -.17 .70f RPM 20.10 -.19 .. RTI IntM 69.01 +1.26 .25 RadioShk 18.27 +.15 .. RailAmn 15.87 +.02 ... Ralcorp 51.24 -.05 .08 RangeRss 27.65 +35 .32 RJamesFs 33.02 -.27 1.88 Rayonier 40.58 -.43 .96 Raytheon 50.37 -.06 .40 ReaderDig u16.89 +.19 .. Realogyn 26.99 +.67 1.51 RItylnco 26.73 -.09 1.70 Recksn u48.20 +.20 1.40 RegionsFn 37.03 -.03 ... ReliantEn 13.40 -.10 .74e Repsol 35.14 +.18 ... ResMed u49.50 +.50 ... RetailVent 17.02 +.09 .. Revson 1.59 3.00f ReynAms 65.26 +.38 ... RteAld 4.64 -.06 .32 RobtHalf 38.84 +.41 1.16f RockwAut 63.68 -1.26 1.32 RoHaas 53,05 -.28 .40a Rowan 34.44 +.22 .60 RylCarb 43.60 +.36 2.45e RoyDShlIA 70.39 +,52 1.69e Royce 22.07 -.07 1.47 RoycepfB 24.22 .20 Ryerson 21.15 -.12 .48 Ryland 48.49 +.18 .. SAICn 19.77 -.31 1.68 SCANA 41.50 +.11 1.02e SKTIcm 26.48 +.51 1.00 SLM Cp 47.59 -21 .12e STMicro 18.17 -.28 .23 Safeway 30.64 -.02 .64 StJUoe 54.00 +.01 .. StJude 35.88 +.08 1.04 StPaulTrav 52.12 +.31 8.00e Sakss 20.21 +.04 ... Saleslorce 41.72 -.25 ... SallyBtyn u7.86 +.56 3.35e SJuanB 38.44 +.36 .96e Sanofi 42.46 .40 SaraLee 16.65 +.25 2.00a SaxonCp 13.97 +.19 .22 SchergPI 21.98 +.12 .50 Schimbs 63.32 +67 1.93e ScotPwrn 57.03 +.13 20 ScottlshRe 6.83 +.49 .401 SeagateT 25.35 +.01 .64f Sensient 23.42 +.08 .121 ServiceCp 9.52 -.08 1.00 Shewin 62.43 -.24 3.64e SiderNac 29.90-1.40 ... SierraHSs d31.95 +.26 SierrPac u16.10 +.07 ... SilvWhtg 10.82 -.12 3.04 SimonProp 95.45 -.24 .. SixFlags 5.70 -.12 .68 SmithAO 36.69 -.63 .32 Smithlni 40.02 1.12 Smucker 46.80 -.50 I.. Solectn 3.46 -.05 .22e SonyCp 40.79 +.85 .40 Sothebys 31.08 -.18 .90 SoJerind 32.55 -.11 1.55 SouthnCo 36.18 +.05 5.13e SthnCopps 50.30 -.28 .02 SwstAirt 15.83 -.13 ... SwnEngys.38.30 +.97 .32b Sovrgnscp 24.99 -.02 .Specterds 8.456 -.33 .10 SprintNex 2026 +.11 I NA DAQ ATIO ALM R EI Div Name Last Chg .. ACMoore 21.93 -.46 ADCTeIr 13.63 -.27 ASMLHId 24.83 +.34 .. ATMI Inc 32.92 -.90 ATPO&G 45.49 +.70 .. ATSMed 2.06 .. AVIBio 3.82 -.02 .. Aastrom 1.47 -.01 .. AccHme 31.45 -.66 .. Acergy 19.51 +.11 ... AcordaThn 17.55 +1.53 .. Actvisn 16.28 -.32 .. Adaptec 4.60 .., AdobeSy 4145 -40 .. AdolorCp 7.72 .36 Adtran 23.60 -.21 .. AdvEnv 1.60 -.06 .. AdvLfSci 2.91 -.01 .. AdvMag u57.00+13.10 .85 Advanta 39.41 -.56 1.02 AdvantB 43.00 -.81 .. Aeroflex 12.18 -.22 .. Affymetrix 26.60 +.67 AirspanNet 3.11 +.10 .. AkamaiT 49.25 +.05 1.52e Akzo 56.69 -.44 .60a Aldila 16.00 -.01 ... Alexion u45.40 +.35 .. Alfacell 1.72 +.03 ...AlignTech 12.95 ..Alkerm 16.28 +.01 ... Al[dHlthcr 2.15 ..AlosTera 5.97 +.22 ... AllotCmn d13.00 -.81 ...Allscripts 26.10 -.17 .. AlteraCof 2051 -.10 Amazon 4255 -29 .. Amedisy 41.51 -.78 .16 AmBcpNJ 12.22 -.01 .. AmerBioh .93 +.02 3.52f AmCapStr 44.07 -.03 .45 AEagleO 47.33 -.49 ..AmerMed 17.38 -.02 .40 APwCnv 30.50 .. Amaen 72.51 +.07 AmkorT I 9.67 -.02 .. Amylin 43.45 -1.14 Anadigc u9.44 +.24 .40 Anlogic 53.54 +.56 Analysts 1.88 +,06 .. AnlySurh .56 +.02 .. Andrew 9.70 -.15 Anglotch g 8.32 -.23 .98e AngloAms 22.90 -.20 Anys 48,04 -2.51 ApolVoGIf 35.36 +.48 1.881 Apollolnv 22.97 +.17 I AoDleCf 85.85 +.24 .20f Appebees 23.96 -.35 AppldDigl 2,04 -.04 ApIdlnov 3.16 +.04 .20 ApldMatl 18.12 +.14 AMCCItf 3.29 -.05 ,. aQuantive 22.81 -.15 ,, ArenaPhm 14.79 +.23 ,, AriadP 8.60 +.10 .60 ArkBeet 40.20 -.76 .05e AmHId 6.59 +.01 .. ArraySo U13.37 +.11 Ardle 12.44 -.13 ArtTech 2.45 -.09 .. AspenTo 10.41 -.01 SAprevag 17.73 +.23 1.16 AssodBano 33,66 -,10 ,, AsystTchlH 6.67 -.18 Athrno 12,85 -.05 Atheros 22,.0 -.80 ,, Atmellf 6.65 +.09 ,. Audvox 13.74 +.02 ... Autodeskif 40.811 +3, .. Auxlllum u17.43 +,.9 ,. Avaneg 201 -.03 AvanlrPre 3.08 +.23 AvIclSys 6.01 -.17 ... AvidTch 38.93 -1.18 ... AvoctCp 37.97 -.26 ... Aware 5.53 -.02 .. Axcelis 6.58 -.06 .. BE Aero 27.00 -.69 BEASysif 1312 +01 .. Baidu.comu109.76 +2.36 .. BallardPw 7.59 -.29 .02 BnkUtd 26.91 +.11 .. Bankrate 36.36 -1.61 .. BeacnRfs 21.44 -.25 .25 BeasleyB 6.97 +,02 .20 BebeStrs 23.50 -.38 .. BedBath 40.53 -.57 ... BellMic 7.13 -.03 SBiogenldc u50.79 +.84 BoMarin 17.56 +,01 .30e Biomet 38.38 -.21 Biopure .73 .28 Blckbaud 27.16 -.61 .56f BobEvn 34.17 -.12 ... Bookham 4.00 ... Borland 5.25 +.03 .. BrigExp 8.23 -.05 Brightpnts 12.44 -.26 Brdromsll 34.99 -.06 .. Broadwing 14.99 -.11 BrodeCm 7.98 +.18 ... BrooksAuto 14.34 +.06 .20 Bucyruss 45.30 -.27 .40 BldgMats 26.04 -.02 .. BusnObj 38.25 -.14 C.. -COR 9.84 -.25 .56f CBRLGrp 45.05 +.06 ... CDCCpA 7.53 -.17 .521 CDWCorp 70.03 -.64 .52 CH Robins 43.59 -.46 ... CMGI 1.39 +.01 .CNETIf 8.67 -.10 .. CSG Sys 27.56 -.21 .. CTIInds u5.27 -1.21 .. CVThera 12.50 -.12 ... Cadence 18.70 -.13 ... CdnSoarn 15.22 -.23 .65 CapCtyBk 35.00 .. CpsinTrb 1.36 -.04 ... Captaris 7.14 +.06 ... CareerEd 25.97 -.14 .. CashSys 6.39 -.11 .. CasualMal 13.50 -.35 ... Celkenes u56.27 +.47 ...CellGens 4.57 +.11 ... Celihera 1,68 +.12 .. CentAI 37.27 -.25 .. Cephin 78.15 +.95 Ceradynelf 52.30 -.46 CerusCp 8.23 +.31 .40 Chaparral I44.45+2.98 C... arRsee 28.44 +.43 CnrmSh 14.11 +.09 CnariCm 2.58 -,07 Crai Semi 8.30 +.12 Cattem 46.40 -.36 CnkPoint 22.27 -.13 CrikFree 38.90 +.14 Cisecakelf 28.20 -,34 .. ClIdPlcIl 66.29 -1.30 ...CilnAuto 9.85 -.09 ...ClnaBAKn 7,99 +.04 ...ClnaMed 26,76 +1.25 CilnaTDvlI 8.15 +.28 ... Clndex u22.09 +2.62 CnIpMOS 5,73 +.03 .50 CirchilD 40,90 -.03 SCenaCpi 24.85 +.17 1.34 CnRn 45,.39 -.32 .35f Cntas 43.47 -.16 CiphBIo 1.10 +.08 Cirrus 7.10 -.09 e. Cisco 2693 -22 ... COTrends 44.70 +1,98 ,. CitrixSy 30.44 +,28 CeanH 44.45 -,28 CogeniC U16.53 +.19 Cogent 12.52 CogTech u80.10 -,14 Coginog u41.09 +.86 ColdwtrCs 30.25 +.24 ... Comarco 10.25 +.15 ... Comcast 4029 -.08 ... Comcsp 40.08 +.06 ... CmTouchh 1.10 +.05 1.56 CompsBc 56.84 -.08 .... CompCrd 36.77 +.07 ... Compuwre 8.63 +.05 ... ComtchGr 16.36 +.63 ... Comversif 1888 +.28 ... ConcrdCm h .70 +.04 ... ConcCm 1.84 +.05 Conexant 2.17 -.06 ... Conmed 22.87 -.15 ... Connetics u17.31 +.07 .. ConorMd u32.68 +5.16 ... CornthC 12.23 -.01 1.00 CorusBks 23.21 -.25 .. Cosilnc 5.02' -.18 .. CostPlus 12.03 -1.37 .52 Costco 53.40 -.02 ... CredSys 3.83 -.03 .. CreeInc 20.78 -.24 .. Crocsn 46.49 +.82 .. CrssCtryHI 20.69 -.47 .26e Crip.coms 56.00 ... CubistPh 21.95 +.04 ... Curis 1.74 -.12 .. Cyberonclf 21.58 +.79 .. Cymer 48.23 -.36 .. CytRx 1.78 +.04 .. Cytogen 2.60 -.02 Cytyc 26.26 -.07 DG Fastrs 11.84 -.16 DRDGOLD d1.15 -.01 .20 DadeBeh 37.93 -.07 .061 Daklmicss 33.62 +.06 ... Danka 1.63 -.08 .. decdGenet 4.97 -.06 ... Delllncif 25.02 -.08 ... DtaPtr 26.83 -.02 ... Dndreon 4.69 -.07 Dennys 4.59 -.01 .161 Dentsplys 32.20 +.20 Depomed d3.74 -.12 .. Dgilntl 13.90 -.04 DigRiver u59.50 -.76 ... DiscHokidA 15.72 +.03 ... DiscvLabs 2.23 -.02 ... DistEnSy 3.40 -.19 DitechNet 7.38 -1.41 .. DIvXn 27.22 -.75 .. DobsonCm 8,55 +.03 .O DllrTree 31.53 -.47 ... DressBns 21.80 -.19 .15 DynMat 30,06 +.40 .. Dynavax 7.68 +1.10 ... e-Futuren 33.80 -.55 eSa 33,74 +.43 .101 ECITel 7.79 -.04 EGLI nc 34.30 -.47 ., EPMed 1.29 +.01 ,, eRearch 6.57 +.15 ,, ESSTech 1.19 -.01 E. EZEM 16.46 -.64 2.04f EagleBulk 16.31 -.03 ... EagleTetn 185,02 -1.29 .ErthUnk 6.71 -.09 .20 EstWetBcp 36.61 -.60 ... EhoStar 36.29 -.06 ... EdBauern 9.24 +.04 .201 EduDv 6.92 +,23 .. 8x8 In h 1.82 -,04 .. ElecSI 19.96 -,69 ... Elctrgls 2.89 -.06 EledArA 8 58.65 +.09 ., EFII 24.88 +,15 ,, EmbroTo 7.18 -.40 Emore 5.00 -.05 Emdeon 11.70 -.04 ... EmsTch 6.08 +.25 4.00e EmmleC 12.42 -.20 EmplreRat 6.99 -.13 .02p EnoorW 23.32 -.86 ,. EncyaleP 5.87 -.05 EndoPhrm 29.23 -.26 .. EngyConv 37.70 -.84 Entegris 10.56 +.04 ... EnzonPhar 8.35 +.06 .60e EricsnTI 39.32 -.40 ... EssexCp 23.54 ... EvgrSIr 8.53 Exelixis 9.26 +.44 ... Expedia 17.60 +.29 .22 Expdinlls 46.65-1.03 ... Explor 12.88 ... ExpScripts 67.66 -2.38 ... ExtNetwII 4.06 -.02 ... F5Netwlf 71.81 -.20 FLIRSys 33.00 -.27 .40 Fastenals 37.41 -.87 ... RberTowrn d5.76 -.15 1.81e Reldlnv .5.58 +.06 1.60 FifthThird 40.79 -.12 ... Finisar 3.86 -.03 .48 FstNiagara 14.85 -.10 ... FstSolarn 24.74 1.16 FstMerit 24.32 +.14 ... Fiserv 52.53 -.41 ... Rexim 11.61 -.13 .. FocusEnh 1.63 -.03 ... FocusMda 61.73 +3.30 Fonar .28 -.01 ... FormFac 39,62 -.75 ... FosterWh 50.54 +1.28 ... Foundry f 13.65 -.32 ... FuelCell 7.00 -.14 .59b FultonFnd 16.55 -.01 ..Ftnnrmdia h .09 ... GMarketn u24.28 +1.67 .. GTCSio 1.16 +.05 .50 Garmins 50.13 -.37 ... Gemstar 3.23 -.03 ... GenBiotc 2.13 +.03 .. GenesMcr 10.65 -.16 .. Genta .77 +.01 .381 Gentex 17.19 -.16 ... Genzyme 67.76 +1,43 ... GeronCp 8.75 +.06 .. GigaMed 10.29 -.12 .. GileadSci 69.43 +1.15 .. Globlind 13.31 +.11 ... GoIdKist 19.01 +.06 ... Google 498.79 +2.89 ... Gymbree 44.32 -.26 1.00 HMNFn 33.53 -.50 ... HainCelest 28.90 -.57 .. HandhEntn 4.80 -.08 .. HansenMnd12.79 +.59 .. Hansen s 27.39 -.54 1.10 HarbrFL 45,08 -.43 ... Harmonic 8.35 ... Hardelnt 5.44 +.07 ... HrvyElors 2.74 +.78 ...HthExt 21.70 -.34 ... Healthwys 44,45 +.44 ... HScheln 51.33 +.32 ... HercOffsh 31.22 -1.28 ... HIbbett 32.81 +3.19 ., HImaxTon 4,82 -.03 .. HollisEden 5.82 -.15 ., Hologloe 46.67 +1.75 Home Inns n 30,77 +,28 ., HomeSol 5.36 -.07 ., HoriznOffnd15.28 +.33 HotToplo 12.74 -.30 ,, HoustWC n 24.01 -.33 .30 HudsClty 13.58 -.06 I. HumGen 13.07 -,28 .32 HunUB 22.19 -,31 1,00 HuntBnk 24.78 -,06 ,. Hurrayl 7.20 -.08 Hydrll 70.24 +.77 HyperSols 37.69 -.30 AC Inter 33.84 -.06 ... ICOS 32,39 +.04 Illumlna 40.33 -.01 ... ImaxCp 3,45 -.02 ... mclone 33,28 -.16 ... Immucrs 27.06 -.19 ... InPhonlc 11.89 +.37 ... Incyte 5.36 +.14 ... Indusnt 3.73 .. Informant 12.50 -.10 .53e Infosys 55.07 -1.22 .. InnerWkn 16.72 +.04 .. Insmed 1.43 +.04 .. IntgDv 16.48 +.02 .40 Intel 22.10 -.23 InterDig 33.07 +.05 InterMune 22.24 +.11 IntrNAPrs 18,16 +.12 InUtDisWk 6,49 -.04 .08f InUSpdw 53.94 +.35 .24f Intersil. 25.30 Interwovn 13.75 -.30 .. Intuits 32.46 -2.35 ... IntSurg 95.79 +,99 .09 InvFnSv 40.54 -.34 ... Invitrogn 57.30 +.13 .. IRISInt 8.86 .. Irvine 1.94 -.45 .. Isis 10.82 +.32 .. Isonicsh .60 .. Itron 49.44 -.50 .. IvanhoeEn 1.39 +.05 ... JDSUnlrs 18.33 +.98 .22 JackHe ry 22.67 -.02 ... JamesRiv d9.25 -.28 ..JetBlues 14.58 -.24 .60 JoyGlbs 42.26 +.17 JnrNtwIf 20.31 +.31 ... Jupitrmed 6.26 +.06 .48 KLA Tnc If 51.69 +.64 Kanbay 28.59 -.01 .Keryxslo 14.10 +.25 KnghtCap 18.16 +.07 Komag 39.66 -.64 KopinCp 3.67 +.07 ... KosPhar 77.52 +.05 .Krons 36.61 +.08 Kulicke 8.36 -.11 Kyphon 35.31 -.17 LKQCps 24.33 -.20 .52f LSI Inds 17.36 -.17 LTX 4.97 -.22 LamRsch 54.34 -.09 LamarAdv 59.10 +.61 .12 Landstar 46.97 -.58 ... Lattice 6.69 LawsnSft 7.82 -.08 Level3 519 -,14 ... LexGntx 3.99 +01 UbGIobA 27.29 -.23 UbMIntAn 22.86 +.02 Ufecell 23.57 -.73 UfePtH 33.89 +,39 ,25 UfLeimeBr 18.99 +.11 UgandPhn 11.41 +.09 Uncare 36.25 +.40 .60 UnearTch 33.35 -,36 .. nktone 6.24 +.33 LoJack 15.30 -.21 LodgEnt 23.99 +.28 SLogtech 28.61 +.04 LookSmart 4.74 -.01 Lumera 7.67 +.10 1.68 MCGCap 19,06 +.10 1.391 MOE 34.10 -.67 -, MGIPhr 19.54 +.16 ,, MIPSTech 8,.60 +.04 .,, MKS Inst 21.00 -.39 .,, MRVCm 3.25 -.10 ,, MSCSfwrn 12,99 -.09 .441 MTS 36,61 -.73 ... Macrvon 28.95 -,18 Mamma 2.24 +.38 .02p MarchxB 14.09 -.58 ... Martek 26.60 +1.681 ,, MaivelfTall 1905 -57 ... Mattson 9.78 -.13 .62 Maxlm f 32.78 -,09 .. MaxwIlT 16.10 ... McDataA 5.67 +.10 .. MedCath 24.60 +.57 Medlmun 33.19 +.02 MedarexI 13.84 +.13 .. MediaSc u6.15 +.12 ... MedAct 30.81 -.15 ... MediCo 26.93 +.19 ... MedisTech 22.34 -.67 ... MentGr 17.65 -.01 1.12 MercBkshs 45.05 +.01 .. MergeTech 6.34 -.28 ... MesaAir 8.73 -.41 ... MetalStm 2.25 +.25 .. Metrolog 18.00 -.05 ... Micrel 11.93 -.09 1.00f1 Microchp 34.65 -.08 .. MlcroSeml 20.35 -1.49 401 Microsoft 2940 -.07 ... Micivlsn 2.63 -.08 .. Micrus u18.84 +1.19 ... MillPhar 11.52 +.12 Millicomint 54.49 +.04 Mindspeed 1.79 -.01 Misonix 4.08 +.09 .. MobltyElec 3.28 +.11 .30 Molex 33.48 -.18 ... MnstrWwIf 46.72 -.55 MorgHtln 14.42 +.14 .. Move Inc 5.45 +.03 .. MovileGal 2.79 -.03 .. systems 35.92 +.35 Myogen 52.47 MyriadGn u30.04 +.06 NABIB 7.07 +.06 .. NETgear 25.46 -1.55 ... NGAS Rs 7.52 -.04 ... NICInc 4.68 -.01 .. NllHIdgs 64.33 -.39 .. NPS Phm 4.72 .081 NTLInch 25.38 +1.26 ... NVECorp 40.74 -.46 .18e Nasd100Tr 44,30 Nasdaq 36.57 +.09 Nastech 19.28 -.34 .. NatAIH 12.50 -.07 .. NektarTh 16.19 +.19 NessTech u15.53 +.53 NetlUEPS 25.11 +.09 NetLogic 22.28 -.18 Neteases 16.14 +.14 ... Neix 28.92 -.35 Nelopia n 6.84 -.01 NetwkAp 39.96 NeurMtrx 16.49 -.18 ... Neurochg u20.63 +1.36 Neurcrine 9.64 -.42 .. NRvrPh s 49.69 -.06 NobltyH 27.25 -.01 1.00f NorTrst 57.97 -.21 SNthfldLb 13.02 -.16 ,. NvtIWrde 9.33 -.27 .. Novavax 5.30 +.09 .. Novell If 6.30 -09 .. Novlus 30.73 -.28 .. NuHoriz 12.40 -.70 .. NuanoeCm 10,60 +.19 .. NutriSys 65.00 -.59 Nuvelo 19.89 -.30 Nvldiaself 3632 +,10 .. OSIPhrm 37.54 -.05 .. OceanB 2,70 -.89 .. OdysseyHltdl2.22 -.12 OmnIlVn 17.63 -.55 ... OmrixBlon u28,88 +.87 ... OnAsslgn 11.50 +.17 OnSmcnd 6.11 -.10 .. OnyxPh 18.02 -.30 OpenTV 2.47 -.13 OpnwvSy 8.85 +.09 Opsware u9.88 +.14 .20 optXprs 29.49 +.67 Oracle u1946 +36 OraSure 8.27 +.10 Orboammn 7.65 +.05 .. OrlgInAg 12.37 +1.34 Orthfx 43.44 +.26 Orthlog 1.30 -.01 1.15 OtterTall 30.69 -.12 Overstk 14.36 +51 ... PDLBio 22.75 +.39 ... PFChng 39.37 -.99 .. PLXTch 14.64 -.16 ... PMCSra 7.80 -.14 PSSWdd u20.87 +.11 .30 PW Eagle 34.30 -1.04 .80 Paccars u66.72 +1.55 PacEthan 17.86 -.21 ... PacSunwr 18.92 -.09 .. PacliNet 6.20 +.12 .. Palmlnes 15.87 -.09 .. PanAStN 22.44 +.07 PaneraBrd 61.58 -.24 Pantry 48.04 +1.01 PapaJohns 31.78 -.26 ParPet 20.32 +.35 P.. armTcrs 19.81 +.19 Patterson 32.73 -.12 .32 PattUTI 25.12 +.56 .84f Paychex 40.46 +.35 Pemstar 4.12 -.11 Penwest 17.76 -.15 1.00 PeopBCT 44.70 -.12 .. PeopleSup u21.85 +.19 .. PrSeTch 27.53 +.04 .. Peregrine 1.31 -.02 Pericom 11.79 -.10 .181 Perrigo 17.26 +.01 ... Petrohawk 12.30 +.29 ... PetroDev 41.75 -.35 .12 PetsMarl 29.23 -.65 .10 PhrmPdts 31.60 +12 ... PhnxTc 4.65 -.20 PhotoMdx 1.10 -.01 ... Photrln 15.12 -.32 ... PhysnsFn d17.72 -.13 ... Pxwrks 2.67 -.06 .. Plexus 26.19 -.46 .. PointTher d.92 -.10 .. Polycom 28.44 -.50 .64 Popular 18.04 +.06 ... PortlPlay 13.32 -.01 ... Power-One 7.55 -.22 ... Powrwav 6.45 -.15 ... Pozen 15.04 +.13 ... Prestek 6.12 .56 PriceTR s 44.92 -.90 ... priceline 39.76 -.09 ProgPh 29.24 +.16 .. pSivida 1.94 -.01 .. PsycSols u36.29 -.33 QIAGEN 15.05 +.02 O. QLT 8.72 +.05 ., QlaoXing 14.11 -.24 Qloglcs 22.01 +.21 .48 Qualcom 37.63 -17 a. QulSye 39,61 -.14 SQuestSfltl 16.71 +,25 .84 QulntMad 10.27 -.14 .. RCN 30.14 +,14 RFMIkD 7.53 -07 ,. Racky 35,94 -1.08 SROneD 7.20 +.07 ,,, Rambusf 2112 -60 Rand old 21.75 +.48 Raresp 34.22 +.73 .36 Ravenind 27.97 -1.33 .. RealNwk 11.55 -.17 .. RedHat 16.67 -.12 RedRobln 35.86 -.01 Redback 16.50 -.05 .. Regenm 23.65 -.07 Renovis 3.42 -.06 RentACt 29.08 +.01 .44b RepBcp 13,84 -.02 ... RchMotn 133.61 -.58 .. Respiron 35.27 -.25 RestHrd 8.69 +.21 ... RghtNow 16,62 -.06 ... Riverbed n 29,30 +.48 .24 RossStrs 30,41 -.54 Rolech 1.52 -.04 .26f RoyGId 28.45 +.03 .. Ryaneir u76.90 +.77 SAFLINKh .13 -.01 ... SBACom 28.00 -.01 SGXPhmn 2.85 +.08 SVBFnGp 48.10 -.46 1.20 Safeco 61.02 +.42 SanDisk 47.14 +.45 Sanrnlna 3.80 -41 ... Sapient 5.54 +.04 .. SavienPh u10.49 +.44 .07 Schnizer 39.52 +.27 SchoolSp 37.20 -.59 .20f Schwab .18.56 +.04 ScielePh 23.73 +.57 SciGames 29.32 -.06 Scopusn 4,10 +.52 SearsHdgs 172.98 +3.72 SecureCmp 6.65 -.11 SelCmfrts 21.31 -.39 .88 Selctin 55.92 +.17 ... Semtechil 13.25 -.22 Senracor 54.69 +222 Sequenmrs u5.14 +.20 Shanda 16.66 -.30 .19e Shire 59.83 -.43 ShufflMstif 31.03 -.46 SiRFTch 31.45 -.33 ... SigaTech h 3.76 -.19 ... SigmaDglf 22.52 +.06 .84 SigmAl 77.08 -.15 .. Siicnlmg 12.47 +.05 SilcnLab 34.08 -.09 ... SST 4.54 -.01 .25r Slcnware u7.30 +.04 .SilStdg 25.37 +.20 ... SmplTch 9.13 -.02 Sina 28.32 -.56 .501 Sinclair 9.52 -.12 Sirenza 8.21 +.25 .., SiriusS 405 -.06 SimaThera u12.79 +.02 .92 SkyFnd 25.20 +.07 .12 SkyWest 25.98 -.25 SkywksSol 6.82 -.22 .. SmartMn u11.35 +.81 SmithWes 12.75 -.64 SmurfStne 10.78 -.29 Sohu.cm 25.00 -.05 Solexa 12.99 +.20 ... SoncCps 23.68 -.31 SonicFdy 3.90 -.06 Sonus 5.45 +.18 .36 SouMoBc 14.87 Srcelntfnk 9.07 -.22 SpanBdcst 3.96 -.02 SpansionAn 13.77 +.02 .22 Staples 26.65 -.16 StarScen 3.91 -.01 .. Starbucke 37.42 -2.01 ., STATS Chp 7.20 +.38 .801 StDyna 60.09 +2.79 25a StelnMrt 15.58 +.08 .. StemCells 3.29 +.02 SunMicro 547 +03 .. SunPower 36.91 -,95 .. SuperGen 5.14 -.12 .. Suprtex 46.05 +.83 SurModic d34.49 +2.48 1.00f Su Bnc u27.30 +.26 Swftm 27.82 -.04 Sycamore 3.72 -.03 Symantec 2066 -09 Symetric 8.87 -.03 .40 Synagro 4.54 -.04 Synaptlcs 29.26 -.34 .. synos 22.78 -.20 Synovis 8.40 -.05 .SynIaxBd 8.43 -.04 ..SntrCp 2.95 -.05 6.00e T Ameritr 16.57 +.04 ... THQ 30.42 -.58 ... TVIA Inc d,85 +.04 ... TakeTwo 17.65 +.03 ... TaleoA 12.85 +1.08 ., TASER 9.02 -.05 TechData 40,39 -.35 ., Tekelao 186.40 +.49 .. TeleTech 22,63 +.02 ... Telikinc 18.17 +.23 ... Telabs 11.43 -.06 ... TesseraT 37.58 -.27 .. TetraTc 17.85 -.13 .31e TevaPhim 31.18 -.07 .. TexRdhsA 14.67 -.08 .. The9Ltd 27.23 -1.13 .. Thrmogn 5.01 +.03 ... TlrdWve u4.95 +.14 ... 3Com 5.01 +.02 ... ThrshldPh 2.61 -.12 TibccSft 9.20 +.03 TWTele 18.51 -.19 TiVoInc 6.29 -.03 TractSupp 49.75 -.20 TmsactnSy 35.61 +1.45 Tmsmeta 1.23 -.04 .. Travelzoo 33.03 -.91 TridMics 20.92 +.43 .. TdmbleN 47.75 -.80 Trimeris 11.78 +.29 TriQuint 4.63 -.15 .. TrumpEnt 21.21 -1.09 .64 TrstNY 11.43 -.03 .881 Trustmk 32.82 -.21 .80f TuesMm 17.82 -.21 .. TurboCh 14.86 +.39 Tweeter 2.48 +.10 24/7RealM 7.98 -.30 UALn 40.45 -1.05 .12 UCBHHId 17.31 -.30 ... USCncrt 6.30 -.08 ,50e USGbobal 43.85 -.66 ... US LEC 8.40 -.37 .06f UTiWrlds 28.05 +.08 ... UTStrm 9.58 -.16 ... UndArmrn 46.55 +.30 ... UtdNIF 36.74 -.34 UtRetall 16.23 -3.53 US Enr 4.73 +.04 UtdSurg 25.97 -.15 UtdThrp 58.91 +.68 .11 UnivFor 47.70 -.39 .. UrbanOut 22.39 -.61 VASfwr 4.84 -.05 VaueClick 22.11 ... VandaPhn 14.88 +.83 ... VarianSs 40.86 -.04 ... Vasogen gh .39 -.02 ... Verigyn 16.94 -.03 ... Verisgn 23.34 -.16 .. VertxPh 44,50 -.16 ... VonPhm 1.62 +.20 .. VMroPhrm 13.51 +.20 Vtlimgs 30.74 -.96 ,, Voterra 17.60 -.09 WJComm 2.01 -.01 .. Wamaco 25.31 -.08 ... WamerChn 13.57 +.04 ., WebSlde 13.03 -1,36 ,. WebEx 38.04 +.93 webMelh 7.49 -.10 .18 WemerEnt 19.44 -.19 WetSeal 6.26 +.10 .72f WholeFds 49.40 -.06 WindRvr 11.61 -.14 WrissFac 2.38 -.06 6,00 Wynn 94,13 -.62 XMSat 1469 +.36 .. XOMA 2.38 +.03 XenoPort 27,05 +.05 .36 XIIInx 27.48 -73 YRCWwde 41.93 -,41 .. Yahoo 2691 +27 ZebraT 35,50 -.98 .. ZhoneTch 1.48 -.03 1,56f1 ZonBcp 79.37 -.48 Z.. xCorp 1.27 -.14 ... ZollMed 50.49 -2.57 .. Zoran 15.48 +.04 ., Zumlez 28.10 -.39 .16 StdPac 24.27 +.09 .84 Standex 29.50 -.65 1.20 Stan1Wk 51.17 -.68 ... StarwdHifn 61.78 -.10 .80 StateStr 63.87 -.51 1.15 StatonCas 69,03 -.94 .201 Steris 26.62 +.28 ... StIlwtrM 11.93 -.17 ... sTGold 61.78 +.47 .111 Styker 52.22 -.05 .. SturmRug 10.53 +.28 2.65 SubPpne 36.93 -.15 2.52 SunCmts 32.84 -.73 .32 Suncorg 75.62 +.09 1.00 Sunoco 64.72 +.99 Suntech n 27.00 +.45 2.44 SunTrst u82.06 +1.08 .. SupEnrgy 30.00 -.08 .. Sybase 24.22 -.02 .02 SymbIT 14.85 -.02 .76f Sysco 35.18 -.17 .92 TCFFncl 26.14 +.14 .88 TDBknorth 30.35 -.02 .76 TECO 16.97 +.06 .28 TJX 29.24 -.56 1.73f TXUCps 57.28 +.15 .39r TaiwSemi 9.98 -.03 .52 Talbots 25.18 -.50 .15 TalismEgs 15.53 -.15 .48 Target 58.22 -.33 .95e TelNorL 15.44 -.07 2.23e TebcNZ 23.89 -.10 .71e TelMexL 26.76 -.04 1.00 Templelin 39.40 -.85 .60e Tenariss 42.96 -.59 .. TenetHIth 7.26 -.07 2.70 Teppco 38.43 +.35 .. Teradyn 14.24 -.05 Terexs 55.92 +.23 Terra u9.91 +.05 1.92e TerraNitro 29.20 +.50 .40 Tesoro 66.06 +.08 TetraTs 24.69 -.18 .16 Texinst 30.04 -.22 Theragen 3.18 -.01 .. ThermoRs 44.14 +.39 .. ThmBet 53.68 -.10 1.84 3MCo 81.40 +1.11 .60 Tdwtr 52.38 +1.10 .40 Tiffany 36.54 -.50 .22 TimeWam u20.43 +.10 .64 Timken 30.38 -.45 ... TanMts 28.49 -.07 .. Todco 35.99 -.86 .60 ToddShp 17.20 -.08 TollBros 29.89 +.18 .91e TorchEn 7.30 -.16 .52 Trohmrk 63.88 -.01 1.92f TorDBkg 59.14 -.18 2.22e Total SAs 70.19 +.23 .28 TotalSys u25.74 +.03 .. Transocn 73.39 +.83 .16 Tredgar 19.59 -.28 .28 TdCont u21.98 +.04 ... TriadH 38.95 +.67 .72 Tribune 32.25 -.06 .4r Turkcell 13.30 -.20 .40 Tycolntl 30.15 -.18 .16 Tyson 15.37 +.02 1.73 UILHolds 43.07 -.10 ,, USAIrwy 59.45 -1.16 ... USEC 11.93 +.26 .. USG 51.83 -.17 .15 UniFirst u39.95 -.02 1.20 UnlonPac 91.35 -.64 Unisys 6.94 -.08 1.25 UDomR 31.22 -.24 .06r UtdMicro 3.22 -.04 1.52 UPSB 79.13 +.55 1.32 USBancrp 33.91 -.06 .81 USSteel 70,57 +6. 1.06 UtrdTech 66.09 -.67 .03f Utdihth If 47.25 -.37 ... Univision 35.44 +.09 .30 UnumProv 20.98 -.02 .23j ValeantPh 16.71 -.27 .32 ValeroE 5286 +.37 VarianMed 50.52 -.58 1.26f Vectren 28.36 +.26 Venocon 17.00 ..VenrDC 76.05 -.09 1.62 VerizonCm 36.04 +10 ... ViacomBn 39.31 +.10 Vishay 13.10 -.27 .. Vsteon 8.59 -.01 ... VvoPart 3.83 -.02 1.15e Vodafone 26.23 -.15 3.40f Vomado 117.00 -.90 WCICmts 18.76 -.21 .18 Wabash 14.16 -.01 2.24 Wachovia 55.01 .67 WalMart 4750 -.41 .31 Wa*im 42,00 -.72 .16 Walterind 43.38 +.93 2.12f WAMut 43.23 -.27 .88 WsteMInc 38.21 -.25 WatsnPh 25.17 -.11 ... Weathflnts 40.97 +.44 1.86 WeinRIt 45.18 -.14 .08 Wellmn 3.27 -.12 ... WellPoint 72.92 -.39 1.12 WellsFoos 36.27 -.23 .68 Wendyss 33.53 -2.23 1.00 WestarEn 26.14 -.02 1.04 WAEMInc2 12.87 +.05 .54 WstAMgdHi 6.28 -.01 .66a WAstTIP2 11.52 +.02 W. DigiUH 20.45 -.20 .. WstnUnn 22.68 -.44 .16 WestlkChm 33.23 -2.06 .08m WestwOne 6.78 +.02 2.40 Weyerh 63.86 -.78 1.72 Whrlpl 86.50 -1.83 1.34e WilmCS 12.21 +.21 .36 WmsCos 26.71 +.3 S.40., WmsSon 30.90 -.80 1.00 Windstmn 13.81 +.12 .40 Winnbgo 34.74 -.06 .92 WscEn 46.59 -.03 .68 Worthgt 17.96 +.2 1.02 Wrileys 51.85 -.40 1.041 Wyeth 49.87 +.10 .. Wyndham n 30.74 '+.0 .30b XTOEngy 47.18 +1.67 .89 XcelEngy u22.63 +.12 .. Xerox 17.14 +.02 .50 YankCdl u33.93 -.02 .60 YumBids 62.00 -.84 American Stock Exchange listings can be found on the next page. T o R &.3008 1.3039 Brazil 2.1630 2.1550 Britain 1.8940 1.8882 Canada 1.1466 1.1421 China 7.8765 7.8738 Euro .7803 .7815 Honq Konq 7.7872 7.7862 Hunqary 201.37 201.13 India 44.725 44.841 Indnsla 9174.31 9174.31 Israel 4.3160 4.3110 Japan 117.84 118.19 Jordan .7087 .7085 Malaysia 3.6525 3.6545 Mexico 10.9400 10.8962 Pakistan 60.87 60.76 Poland 2.97 2.96 Russia 26.6581 26.6788 Singapore 1.5569 1.5586 Slovak Rep 27.81 27.81 So. Africa 7.2647 7.2615 So. Korea 938.97 938.09 Sweden 7.0849 7.0730 Switzerlnd 1.2454 1.2479 Taiwan 32.94 32.97 1 U.A.E. 3.6732 3.6730.96 4.97 6-month 4.95 4.96 5-year 4.60 4.57 10-year 4.60 4.59 30-year 4.69 4.70 FUTURES Exch Contract Settle Chg' Lt Sweet Crude NYMX Jan 07 58.97 +.40 Corn CBOT Dec 06 355V4 +33/4 Wheat CBOT Mar07 494 +5 Soybeans CBOT Jan07 6601/2 +4 Cattle CME Feb 07 90.22 -.52 Pork Bellies CME Feb07 92.62 +1.62, Sugar (world) NYBT Mar 07 11.35 -.18 Orange Juice NYBT Jan 07 199.55 -5.45 SPOT Yesterday Pvs Day Gold (troy oz., spot) $621.50 $628.40 Silver (troy oz., spot) $12.779 $13.077 Copper (pound) 53.U525 53.U775 , 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. CITRUS COUNTY (FL) CHRONICLE 2 _ fA 1 Ql '? I SATURDAY. NOVEMBER 18, 2006 1.A CITRUS COUNTY (FL) CHRONICLE SI UAmixed 4-wk ame NAV Chg %Rtn aIM Investments A: tBasValAp37.65 -.06 +2.8 IChariAp 15.26 +.01 +2.5 Const p 26.09 -.08 +1.8 .HYdAp 4.47 ... +1.9 IlntlGrow 28.39 -.07 +2.6 MuBp 8.12 +01 +1.1 SelEqty r 20.65 -.01 +2.0 AIM Investments B: CapDvBt 18.43 -.02 +3.8 AIM Investor CI: Energy 43.71 +.37 +2.5 SummilPp 12.88 +.01 +1.9 Utilities 16.45 +.05 +2.0 Advance Capital I: Balancp 19.21 +.02 +2.8 Retlnc 9.74 +.03 +1.6 Alger Funds B: SmCapGr 15.92 ... +4.2 AlllanceBern A: BalanAp 18.27 +.04 +2.2 GlbTchA p64.48 -.05 +3.6 IntlValAp 22.53 -.08 +1.8 SmCpGrA26.76 -.06 +5.1 AllianceBern Adv: LgCpGrAd 21.27 -.01 +3.2 AllianceBern B: CorpBdBp 11.91 +.05 +1.8 GIbTchB 157.63 -.04 +3.6 GrowthB 125.62 +.01 +4.5 jSCpGrB 22.29 -.05 +5.0 iUSGovtBp6.83 +.01 +0.9 'AllianceBern C: SSCpGrC 22.36 -.05 +5.0 Allilanz Funds C: GrowthCt21.11 +.02 +2.9 TargetCt 18.60 +23 +5.4 Amer Beacon Plan: LgCpPIn 23.09 +.02 +2.1 Amer Century Adv: EqGropn25.93 +.01 +1.5 Amer Century Inv: Balanced n17.17 +.03 +1.4 Eqlncn 9.07 +.01 +2.4 FLMuBndn10.68+.01 +0.7 Growth n 22.40 -.02 +2.3 Heritageln16.26 -.01 +4.6 flncGron 33.94 +.02 +2.0 SIlntDiscrn17.53 -.08 +4.0 IntlGroln 11.93 -.03 +2.6 iUfleScin 5.27 ... -1.3 NewOpp r n6.55 -.02 +3.3 OneChAgn12.80-.01 +2.3 :RealEstl n32.67 -.12 +0.7 ,.Selectln 36.93 -.10 +3.0 ; Ultran 29.23 -.08 +2.7 LUtiln 15.93 +.01 +1.9 Valuelnvno8.02 ... +3.1 American Funds A: SAmcpAp 20.65 -.02 +2.7 "AMutlAp 29.68 +.02 +2.4 -BalAp' 19.34 +.02 +2.0 ;BondAp 13.36 +.03 +1.3 'CapWAp 19.13 +.05 +2.1 CaplBAp 60.66 +.05 +2.3 CapWGA p 42.34-.03 +2.8 ,EupacAp47.74 -.13 +1.7 iFdlnvAp 40.83 +.01 +1.9 \GwthAp 33.95 -.02 +2.8 cHITrAp 12.56 ... +1.8 alncoAp 20.51 +.03 +1.9 IntBdAp 13.44 +.02 +0.8 ICAAp 35.44 +.04 +1.9 'NEcoAp 26.31 +.01 +3.8 0NPerAp 33.13 -.03 +2.5 'NwWddA 48.95 -.18 +4.5 rSmCpAp41.89 -.04 +4.2 'TxExAp 12.57 +.01 +1.0 rWshAp 35.27 +.05 +1.9 American Funds B: CBalBt 19.27 +.03 +2.0 CaplBBt 60.66 +.05 +2.2 ICpWGrBt42.12 -.03 +2.7 QGrwthBt 32.74 -.01 +2.7 'incoBt 20.40 +.03 +1.8 \ICABt 35.26 +.03 +1.8 -WashBt 35.05 +.05 +1.9 Ardel Mutual Fds: Apprec 48.00 -.08 +4.1 WAriel 51.14 -.08.+3.6 Artisan Funds: 'Intl 29.92 -.12 +1.1 BMidCap 33.96 +.03 +5.3 MidCapVal 21.27+.01 +4.8 Baron Funds: I Asset 63.84 -.11 +4.6 HGrowth 51.95 -.22 +6.1 cSmCap 25.69 -.12 +4.8 Bernstein Fds: IntDur 13.17 +.03 +1.2 DivlMu 14.03 +.01 +0.6 eTxMglntV28.40 -.13 +1.2 FlntVal2 28.25 -.12 +0.9 BlackRock A: -AuroraA 37.82 +.01 +3.4 ;BaViAp 33.42 +.07 +3.0 6GAIAlAr 18.02 +.01 +1.6 -HiYlnvA 8.05 +.01 +1.7 ..Legacy 15.19 -.01 +2.0 BlackRock B&C: ,' r.1:11 +1,5 BlackRock Insu: *BaV-l .33.61 +.08 +3.0 GIbAllocr 18.08 ... +1.6 Bramwell Funds: .Gr.:..,r. v, '7 .03 +3.1 Bmsndyrire Fd,: Bmdywn n34.21 +.05 +2.8 Ifrinson FundsY: HIYldlYn 7.08 ... +0.7 itGM Funds: i CapDv n 30.25 +.06 -0.7 Focusn 37.00 -.10 +0.2 Mull n 28.99 -.03 +1.6 L Calamos Funds: -Gr&lncAp 31.50 ... +2.4 GnrwthAp 54.10 -.04 +2.4 GrowthCt51.21 -.04 +2.4 Calvert Group: incop 16.85 +.05 +1.2 IntlEqAp 25.21 -.15 +2.3 Munlnt 10.70 +.01 +0.8 SocialAp 30.46 +.05 +1.9 SocBdp 15.92 +.04 +1.1 SocEqAp 38.89 -.07 +2.3 TxFLt 10.42 ... +0.4 I TxFLgp 16.67 +.03 +1.2 TxF VT 15.78 +.02 +0.9 Causeway IntI: Institutnl r nl9.93 -.05 +3.5 Clipper 95.07 +.08 +4.0 Cohen & Steers: RItyShrs 93.09 -.33 +0.2 Columbia Class A: -Acom t 31.02 -.08 +3.6 I olumbla Class Z: I *AcomZ 31.78 -.09 +3.7 SAcomlntZ 40.94 -.12 +2.8 I lntVIZ 26.04 -.03 +3.6 Credit Sulsse ABCD: -ValueAl 22.40 +.06 +2.9 DWS Scudder CI A: CommAp23.19 -.04 +4.5 DrHiRA 50.42 +.13 +2.0 DWS Scudder Cl S: -CapGrthr 50.88 +.06 +2.5 -CorPslnc 12.74 +.04 +1.4 -EmMkin 12.25 ... +2.2 EmMkGr r26.57 -.11 +5.2, EuroEq 37.67 -.05 +3.0 GNMAS 14.77 +.04 +1.2 -GIbBdS r 9.68 +.03 +1.5 GIbOpp 45.60 -.19 +2.8 GIblThem37.93 -.13 +3.3 Gold&Prc23.17 -.17 +4.3 -GrolncS 24.15 +.01 +2.3 HIYIdTx 13.02 +.01 +0.9 IntTxAMT11.18 +.01 +0.6 IntlFdS 60.14 -.13 +1.8 LgCoGro 27.14 +.03 +2.5 LatAmrEq 59.61 -.31 +3.9 -MgdMuniS9.20 +.01 +0.8 MATFS 14.34 +.02 +0.9 PacOpps r 20.56 +.02 +6.0 ShtTmBdS9.95 +.01 +0.3 Davis Funds A: -NYVenA 37.97 +.03 +3.2 Davis Funds B: NYVenB 36.17 +02 +3.2 Davis Funds C &Y: NYVenY 38.46 +.03 +3.2 NWYVenC 36.41 +.03 +3.2 Delaware Invest A: vTrendAp 21.65 -.05 +5.0 TxUSAp 11.68 +.02 +1.3 Delaware Invest B: rDelchB 3.38 +.01 +1.7 nSOlGrBt 24.85 +.28 +6.5 Dimensional Fds: EmMktV 30.13 -.15 +5.2 [nlSmVan20.98 -.01 +2.6 -USLgCon41.23 +.05 +2.6 USLgVan25.39 -.01 +2.8 US Micro n16.88 -.07 +2.9 US Small n22.54 -.06 +3.5 US SmVa 31.65 -.11 +3.7 IntlSmCon18.84-.03 +2.7 EmgMktn24.63 -.12 +4.4 IntVan 22.34 -.03 +2.9 -TM USSV27.45 -.12 +3.2 DFARIEn32.16 -.10 +0.4 odge&Cox: 'Balanced 89.16 +.08 +1.6 Income 12.66 +.02 +1.3 IntlStk 42.25 +.01 +2.6 Stock 156.74 +.04 +1.7 Dreyfus: 'Aprec 45.13 +.12 +2.6 Discp 38.15 +.09 +2.9 Dreyf 11.39 +.02 +3.0 Dr500ln t 41.31 +.04 +2.5 EmgLd 44.66 -.15 +3.5 -FLIntr 13.02 +.01 +0.7 InsMutn 17.99 +.03 +1.2 Dreyfus Founders: GrowthB 11.78 +.02 +4.2 GrwthFp 12.47 +.02 +4.3 Dreyfus Premier: CoreEqAt 16.78 +.05 +2.5 CorVIvp 35.13 +.10 +2.5 LtdHYdA p7.29 ... +1.4 SlValAr 33.47 +.05 +3.1 TxMgGCt 17.86 +.05 +2.4 TchGroA 25.09 -.09 +3.7 Eaton Vance Cl A: ChinaAp 20.66 ... +7.2 LAMTFMBI111.12 +.02 +1.9 'GrwthA 9.00 +.02 +7.7 InBosA 6.50 ... +1.5 LgCpVal 21.02 +.05 +1.6 NallMun 11.93 +.02 +1.9 SpEqtA 13.53 -.02 +5.0 TradGvA 7.19 +.01 +0.5 Eaton Vance Cl B: FLMBt 11.15 +.01 +1.0 HIthSBtI 12.24 +.09 +0.4 NatlMBt 11.93 +.02 +1.8 Eaton Vance CI C: GovtCp 7.18 +.01 +0.5 NaulMCt 11.93 +.02 +1.8 Evergreen A: AstAllp 15.14 ... +1.1 Evergreen B: DvrBdBt 14.43 +.04 +1.5 MuBdBt 7.57 +.01 +1.2 Evergreen C: AstAIICt 14.63 -.01 +1.1 Evergreen I: CorBdl 10.46 +.03 +1.3 SIMunil 9.95 +.01 +0.6 Excelsior Funds: Energy 25.89 +.20 +4.5 HiYeld p 4.66 ... +2.0 ValRestr 51.73 -.06 +4.0 FPA Funds: NwInc 10.90 +.01 +0.6 Fairholme 28.45 +.04 +1.3 Federated A: AmLdrA e 23.94-2.43 +2.8 MidGrStA 37.05 -.06 +3.9 KaufmAp 5.57 +.01 +5.2 MuSecA 10.72 +.01 +1.0 Federated B: StrlncB 8.82 +.01 +1.5 Federated Instl: Kaufmnn 5.57 +.01 +5.0 Fidelity Adv Foc T: EnergyT 40.57 +.41 +4.4 HItCarT 22.77 +.07 -0.5 Fidelity Advisor A: DivnlAr 23.44 -.13 +0.6 Fidelity Advisor I: DivIntln 23.80 -.13 +0.5 EqGri n 55.09 -.06 +2.4 EqlnI[n 32.58 +.03 +2.6 IntBdIn 10.87 +.03 +1.1 Fidelity Advisor T: BalancT 17.24 +.02 +2.2 DivIntTp 23.19 -.12 +0.6 DivGrTp 13.55 +.02 +1.9 DynCATp 18.12 -.04 +3.5 EqGrTp 51.89 -.06 +2.3 EqInT 32.16 +.02 +2.6 GrOppT 35.06 +.13 +5.3 HilnAdTp 10.49 -.02 +4.5 IntBdT 10.85 +.03 +1.0 MidCpTp 26.09 -.01,+5.2 MulncTp 13.03 +.02 +1.1 OvrseaT 22.28 -.05 +1.6 STFiT 9.43 +.01 +0.6 Fidelity Freedom: FF2010n 14.99 +.01 +2.0 FF2015n 12.43 +.01 +2.1 FF2020 n 15.89 ... +2.3 FF2025 n 12.99 ... +2.4 FF2030 n 16.39 ... +2.6 FF2040n 9.66 -.01 +2.5 Fidelity Invest: AggrGrrn19.34 ... +5.5 AMgr50n 16.95 +.01 +1.8 AMgr7 n 16.40 ... +2.0 AMgr2rn13.26 +.01 +1.3 Balancn 19.53 +.03 +2.2 BlueChGrn44.52+.01 +1.9 CAMunn12.46 +.02 +1.1 Canada n 49,00 -.21 +2.0 CapApn 28.19 -.07 +3.6 Cplncrn 8.82 ... +2.2 ChinaRg n23.78 +.07 +4.0 CngSn 463.13 +.86 +1.5 CTMunrnn11.44 +.01 +0.9 Contra n 70.39 ... +3.0 CnvSc n 24.78 -.01 +2.9 Destll n 13.42 +.02 +2.9 DisEqn 31.16 ... +1.3 DivIntln 38.02 -.12 +2.2 DivStkOn15.52 ... +2.6 DivGth n 31.78 +.06 +1.9 EmrMkkn 22.67 -.16 +4.6 Eqlncn 60.17 +.07 +2.5 EQ011in 25.07 -.02 +1.0 ECapAp 28.06 -.04 +3.7 Europe 43.18 -.15 +2.5 Exch n 322.98 +.73 +2.8 Export n 23.07 -.01 +3.4 Fideln 35.56 ... +2.1 Fifty rn 22.73 +.05 +2.8 FIRRateHirn9.94 ... +0.5 FL Murn 11.50 +.01 +1.0 FrlnOnen29.58 +.02 +2.5 GNMAn 10.79 +.03 +1.2 GovtInc 10.08 +.03 +1.2 GroCon 69.81 +.11 +5.3 Grolncn 31.17 +.07 +3.6 Gmolnclln 11.15 +.01 +2.8 Highlncrn 9.01 -.01 +1.6 Indepn n 21.84 +.07 +2.5 IntBdn 10.30 +.02 +1.0 IntGov n 10.03 +.03 +0.9 In0Discn 37.12 -.08 +2.1 lntlSCprn28.91 -.08 +0.9 InvGBn 7.42 +.02 +1.3 .l'r.,an n Iii -.07 -3.6, .i:,,',.,T,,, i;81 -.07 -4.9 LatAmnn 4226 -.25 +3.3 LevCoStk n28.83 +.03 +3.8 LowPrn 42.66 -.13 +3.6 Magelln n91.76 -.08 +1.8 MDMurn10.92 +.02 +1.1 MAMunn11.99 +.02 +1.2 MI Munn 11.92 +.02 +1.1 MidCap n 29.58 -.06 +1.9 MN Mun n11.46 +.01 +0.9 MtgSecn 11.08 +.03 +1.3 Munilncn 12.90 +.01 +1.1 NJMunrn11.59 +.01 +1.1 NwMkt r n15.06 ... +1.4 NwMill n 39.33 -.01 +3.9 NY Mun n12.89 +.02 +1.2 OTCn 41.90 -.02 +6.1 Oh Munn 11.74 +.02 +1.1 Ovrsean 47.47 -.19 +1.9 PcBasn 27.73 -.01 +2.2 PAMun rnO.83 +.01 +0.9 Puritn n 20.07 +.03 +2.1 RealE n 35.95 -.12 -0.1 StlntMu n 10.21 +.01 +0.4 STBFn 8.88 +.01 +0.7 SmCaplnd n22.80-.05 +4.0 SmlCpS r n19.24-.10 +3.7 SEAsia n 26.83 +.07 +5.4 StkSlcn 27.84 +.01 +2.8 Stratlncn 10.67 +.02 +1.5 StrReRtr 10.18 +.02 +1.0 TotalBd n 10.49 +.02 +1.3 Trend n 64.07 +.06 +2.2 USBI n 10.91 +.04 +1.4 UWlityn 18.23 +.09 +0.6 ValStrat n35.32.-01 +3.7 Value n 85.90 -.12 +3.4 Wrldwn 22.16 -.03 +2.2 Fidelity Selects: Air n 49.26 -.38 +6.8 BaRnldking n 38.59 -.13 +1.2 Blotchn 68.65 +.54. +5.0 Brokrn 78.87 -.28 +4.4 Chem n 73.13 -.40 +3.8 ComEquip n20.39-.10 +0.7 Compn 39.21 -.10 +4.1 ConDisn 28.10 -.13 +1.8 ConStap n58.76 +.05 +2.4 CstHon 47.28 +.05 +4.8 DfAern 84.40 -.15 +4.6 Electrn 45.21 -.28 +7.0 Enrgy n 49.65 +.52 +4.4 EngSvn 68.13 +.54 +5.1 Envirn 17.50 -.11 +1.2 FinSvn 126.75 -.29 +2.6 Goldrn 35.04 -.07 +5.4 Health n 128.71 +.19 -1.7 HomFn 55.29 -.36 +3.1 Insurn 74.16 -.05 +3.3 Leisrn 86.45 -.40 +4.6 Material n48.60 -.05 +2.1 MedDIn 49.39 -.53 -4.4 MdEqSysn24.22+.07 +0.2 Multmd n 49.60 +.03 +4.0 NtGasn 39.59 +.65 +4.3 Paper n 31.77 -.21 +2.6 Pharmn 10.84 +.06 -2.1 Retail n 55.10 -.28 +1.7 Softwrn 66.62 +26 +0.2 Techn 69.31 -.12 +0.0 Telcm n 46.75 +.02 -0.8 Transn 51.83 -.41 +3.7 UtilGrn 54.47 +.03 +2.2 Wireless n 6.82 +.01 +1.0 Fidelity Spartan: Eqldxlnvn49.70 +.05 +2.6 5001nxlnx r n97.64+.10 +2.6 Fidelity Spau Adv: EqldxAd n49.71 +.05 +2.6 500Adrn97.65 +.10 +2.6 First Eagle: GIbA 49.20 +.03 +2.8 OverseasA27.18+.02 +2.7 First Investors A BIChpAp 23.46 +.03 +2.4 GloblAp 7.46 -.02 +2.5 GovtAp 10.75 +.02 +1.1 GrolnAp 15.56 -.01 +3.0 IncoAp 3.05 ... +1.5 InvGrAp 9.55 +.02 +1.4 MATFAp11.84 +.01 +0.8 MITFAp 12.33 +.01 +1.0 MidCpAp 28.90 -.01 +3.6 NJTFAp 12.94 +.01 +1.0 NYTFAp 14.38 +.01 +0.8 PATFAp 12.97 +.01 +1.0 SpSitAp 23.75 -.04 +5.0 TxExAp 9.95 +.01 +0.9 TolRtAp 15.16 +.01 +2.3 ValueB p 7.80 ... +2.8 Firsthand Funds: GIbTech 4.42 ... +7.5 TechVal 36.69 -.05 +6.3 Frankrremp Frnk A: AGEAp 2.12 ... +1.6 AdJUS p 8.88 ... +0.5 ALTFAp 11.51 +.03 +1.1 AZTFAp 11.14 +.02 +1.3 Ballnvp 70.77 +.02 +3.0 CallnsA p 12.74 +.02 +1.2 CAIntAp11.56 +.01 +0.8 CalTFA p 7.36 ... +0.9 CapGrA 12.05 ... +3.0 COTFAp 12.08 +.03 +1.3 CTTFAp 11.12 +.01 +1.0 CvtScAp 17.49 +.01 +2.6 DblTFA 12.02 +.01 +1.1 DynTchA 27.10 +.02 +3.1 EqlncAp 22.97 +.01 +2.3 I HW o EA TE UTUL UN TBLSI Here are Ine 1,000 biggest mutual tunds listed on Nasdaq. Tables show ihe tuna name. sell price or Net Asset Value (NAV) and dally nei change. as well as one total return figure as follows Tues: 4-w total return (%) Wed: 12-mo total return i'') Thu: 3-yr cumulative total return (4.) Fri: 5 yr cumulative total return F(.i Name: Name of mutual fund ana family. NAV: Net as5se value Chg: Net change in price ol NAV Total return: Percent change inr. NAV for the trme period snown w.In 3Jividens35 re rivesled if period longer than I year. return is cumula- live Daia bazed on NMWs reponrea to Lpper by 6 p rm Eastern Footnotes: e Ex-capilal gains slrDuinon I Previous day's quote n No-load lurid p Fund acwsels used to pay distribution cosis r - Redemplion lee or cortingeni deferred sales load may apply s - Stock aividerna or opiil I BoIh p and r x Ex-cash dividend NA - No intrnmalnon available NE Daia in question NN Fund does nol w.sh 10 iD tracked NS Fund did not exisi ai start date. Source: Lipper, Inc. and The Associated Press Fedlntp 11.48 +.01 +1.0 FedTFAp 12.18 +.01 +1.1 FLTFAp 11.94 +.01 +1.0 FoundAp 14.30 +.01 +2.4 GATFAp 12.18 +.02 +1.4 GoldPrM A 30.65 -.21 +2.7 GrwthAp 41.82 -.02 +3.6 HYTFAp 11.01 +.01 +1.3 IncomA p 2.65 +.01 +2.0 InsTFAp 12.33 +.01 +1.0 NYITFp 10.94 +.01 +0.8 LATFAp 11.60 +.02 +1.1 LMGvScA 9.91 +.02 +0.8 MDTFAp 11.82 +.02 +1.3 MATFAp 11.96 +.01 +1.1 MITFAp 12.27 +.01 +0.9 MNInsA 12.16 +.02 +1.0 MOTFAp 12.35 +.02 +1.2 NJTFAp 12.20 +.02 +1.2 NYInsAp 11.63 +.01 +1.2 NYTFAp 11.85 +.01 +1.0 NCTFAp 12.37 +.02 +12 OhiolAp 12.63 +.02 +1.2 ORTFAp 11.91 +.01 +1.0 PATFAp 10.46 +.01 +1.2 ReEScA p 29.42 -.04 +2.3 RisDvAp 38.11 -.03 +3.0 SMCpGrA 40.73 -.12 +4.5 USGovAp 6.45 +.02 +1.2 UtilsAp 13.83 +.02 +2.6 VATFAp 11.85 +.01 +1.0 Frank/Tmp Frnk Adv: IncmeAd 2.64 +.01 +2.0 Frank/Temp Frnk B: IncomB1 p 2.65 ... +2.0 IncomeBt 2.64 ... +1.9 Frank/Temp Frnk C: FoundAl p 14.06 +.02 +2.3 IncomCt 2.67 +.01 +2.3 Frank/Temp Mtl A&B: DiscA 30.23 -.07 +2.1 QualfdA t22.59 ... +2.4 SharesA 26.98 -.03 +2.2 Frank/Temp Temp A: DvMktA p 27.76 -.21 +4.4 ForgnAp 13.31 -.04 +1.8 GIBdAp 10.93 -.01 +1.7 GrwthAp 25.18 -.01 +3.0 intxEMp 19.05 -.08 +1.8 WorldAp 19.28 -.03 +2.7 Frank/Temp Tmp Adv: GrthAv 25.21 -.01 +3.0 Frankrr/Temp Tmp B&C: DevMktC 27.09 -.20 +4.3 ForgnCp 13.11 -.03 +1.8 GrwthC p 24.54 -.01 +2.9 GE Elfun S&S: S&Slnc 11.17 +.02 +1.2 S&S PM 49.62 +.04 +2.9 GMO Trust III: EmMkr 22.40 -.13 +5.5 For 18.52 -.03 +2.1 IntlntrVI 35.60 -.07 +1.2 GMO Trust IV: EmrMkl 22.36 -.12 +5.5 Foreign 18.53 -.03 +2.1 IntllntrV1 35.60 -.06 +1.2 USQualEq21.85+.05 -0.4 GMO Trust VI: EmngMkts r 22.37-.13 +5.5 USCoreEq 15.05 -.01 +1.2 Gabelll Funds: Asset 49.09 -.01 +3.4 Gartmore Fds D: Bond 9.60 +.03 +1.3 GvtBdD 10.19 +.03 +1.0 GrowthD 7.59 -.01 +4.0 NationwD 20.93 -.02 +2.5 TxFr r 10.49 .,.+0.7 Gartmore Fds InstI: S&P5001ns 12.02+.01 +2.6 Gateway Funds: Gateway 27.15 +.05 +1.2 Goldman Sachs A: " GrIncA 30.61 +.01 +2.8 HYMuAp11.59 +.02 +1.2 MdCVA p 39.94 -.06 +3.2 SmCapA 47.67 -.05 +3.0 Goldman Sachs Inst: HYMuni 11.59 +.01 +1.1 Harbor Funds: Bond 11.80 +.04 +1.2 CapApinst 33.42 -.04 +2.7 Intl r 61.27 -.15 +2.8 Hartford Fds A: AdvrsA p 16.97 +.04 +3.1 CpAppAp37.18 -.07 +2.1 DivGthA p 20.47 +.04 +2.6 SmlCoA p 20.45 -.05 +4.2 Hartford Fds C: CapApC 133.85 -.07 +2.0 Hartford HLS IA : CapApp 57.57 -.11 +2.2 Div&Gr 24.07 +.05 +2.7 Advisers 24.69 +.06 +3.1 Stock 55.56 +.10 +3.9 TotRetBd 11.70 +.03 +1.4 Hartford HLS IB : CapApp p 57.17 -.10 +2.2 Hennessy Funds: CorGrow 21.14 ... +2.0 CorGroll 31.34 -.10 +1.4 HollBalFd n16.85 +.06 +2.1 Hotchkls & Wiley: LgCpVIA p 25.78 -.04 +2.5 MidCpVal32.42 -.01 +4.3 HussmnStrGre 15.66-.45 - 0.5 ICON Fds: Energy 33.96 +.32 +4.3 Hhthcare 17.90 -.01 -1.6 ISI Funds: NoAm p 7.40 +.02 +1.4 IXIS Advisor CI A: TarEqty 10.90 ... +2.3 Ivy Funds: GINatRsAp31.44 ... +3.0 JPMorgan A Class: MCpVal p 26.61 -.04 +2.0 JPMorgan Select: IntEq n 37.73 -.08 +0.9 JPMorgan Sel CIs: IntmTFBd n10.68+.01 +0.8 IntrdAmer n27.74 +.02 +1.7 Janus: Balanced 24.42 +.02 +2.4 Contrarian 18.03 -.08 +4.7 CoreEq 25.92 +.07 +2.7 Enterpr 46.98 +.03 +4.6 FedTE 7.03 +.01 +0.9 FixBnd n 9.44 +.02 +1.3 Fund 28.06 -.02 +2.7 GI LiUfeSci r n20.25+.13 -1.1 GrTech r 12.73 -.05 +5.8 Grlnc 38.23 -.04 +3.5 Mercury 24.67 -.01 +2.8 MdCpVal 25.51 -.01 +3.5 Olympus 33.50 ... 0.0 Orion 9.70 -.02 +4.6 Overseas r44.09 -.07 +6.9 ShTmBd 2.88 ... +0.3 Twenty 54.30 +.08 +4.3 Ventur 68.63 -.10 +6.4 WrddWr 49.60 -.09 +5.7 JennisonDryden A: BlendA 19.72 ... +2.9 HiYldAp 5.79 ... +1.6 InsuredA 10.87 +.01 +1.3 UtilityA 16.96 ... +2.9 JennlsonDryden B: GrowthB 15.02 -.02 +2.5 Hi[ldBt 5.78 ... +1.6 InsuredB 10.89 +.02 +1.3 John Hancock A: BondAp 14.88 +.04 +1.4 ClassicVl p28.33-.06 +1.1 StrlnAp 6.81 +01 +1.1 John Hancock B: StrlncB 6.81 +01 +1.0 John Hancock Cl : LSAggr 15.04 -.04 +2.7 LSBalanc 15.03 -.01 +2.3 LSGrwth 15.51 -.02 +2.4 Julius Baer Funds: IntlEql r 44.90 -.13 +3.4 IntlEqA 43.99 -.12 +3.4 KeelSmCp p 25.67-01 +3.8 LSWalEqn19.34 ... +2.9 Legg Mason: Fd OpporTrt 18.51 +.08 +6.3 Splnv p 43.49 +.05 +4.7 ValTrp 71.87 +.07 +5.5 Legg Mason Instl: ValTrinst 79.83 +.09 +5.6 Legg Mason Ptrs A: AgGrAp115.65 +.31 +1.7 ApprAp 16.15 +.01 +3.0 HlincAt 6.86 ... +1.9 InAICGAp 15.03 -.14 +2.4 LgCpGAp24.12 +.04 +4.9 Legg Mason Ptrs B: CaplncBtl18.10 ... +1.7 LgCpGBt 122.52 +.04 +4.8 Legg Mason Ptrs 1: Grinc 1 17.49 -.02 +2.2 Longleaf Partners: Partners 34.99 -.06 +3.1 Inll 18.54 -.08 +2.2 SmCap 30.38 -.06 +2.1 Loomis Sayles: LSBondl 14.45 +02 +1.8 LSBondR 14.40 +01 +1.8 StrlncA 14.81 +.01 +1.5 Lord Abbett A: AffilAp 15.95 +.01 +1.1 BdDebAp 7.97 ... +1.7 GlIncA p 6.84 +.02 +1.6 MidCpAp 24.01 -.04 +4.4 MFS Funds A: MITA 20.79 +.02 +3.0 MIGA 13.85 ... +3.2 GrOpA 9.51 ... +3.5 HllnA 3.89 ... +1.9 IntNwDA 28.08 -.17 +2.8 MFLA 10.17 +.01 +1.0 TotRA 16.60 +.04 +2.2 ValueA 27.14 +.04 +3.0 MFS Funds B: MIGB 12.58 ... +3.1 GvScB 9.45 +.02 +1.0 HilnB 3.90 ... +1.8 MulnB 8.62 ... +0.8 TotRB 16.59 +.04 +2.1 MainStay Funds A: HiYldBA 6.46 ... +2.5 MainStay Funds B: CapApB 1t 29.99 -.02 +1.8 ConvBt 14.75 +.01 +2.8 GovtBt 8.21 +.02 +1.1 HYIdBBt 6.42 ... +2.5 IntlEqB 16.07 +.02 +3.0 SmCGB p 15.74 -.04 +3.1 TotRtB t 20.08 +.02 +1.8 Mairs & Power: Growth 78.08 +.04 +2.1 Managers Funds: SpclEq n 96.44 -.05 +3.2 Marsico Funds: Focusp 19.20 -.07 +2.5 Grow p 19.70 -.09 +2.7 Matthews Asian: PacTiger 23.10 -.04 +4.2 Mellon Funds: IntlFd 18.52 -.05 +1.3 Midas Funds: Midas Fd 3.99 ... +5.8 Monetta Funds: Monettan12.84 ... +3.6 Morgan Stanley A: DavGthA 30.33 +.04 +2.4 Morgan Stanley B: GIbDivB 16.52 ... +2.2 StratB 21.17 +.08 +2.6 MorganStanley Inst: GIValEqAn20.61 ... +2.3- IntlEqn 23.93 -.08 +1.5 Muhlenk 85.81 +.16 +3.1 Under Funds A: IntemtA 20.56 -.09 +7.6 Mutual Series: BeacnZR 17.75 -.01 +2.3 DiscZ 30.58 -.08 +2.1 QualfdZ 22.76 ... +2.4 SharesZ 27.21 -.03 +2.2 Neuberger&Berm Inv: Focus 36.52 -.19 +1.9 Geneslnst49.80 +.20 +3.3 Intl r 25.40 -.09 +3.4 Partner 30.67 +.05 +3.9 Neuberger&Berm Tm: Genesis 51.78 +.21 +3.3 Nicholas Group: Hilnc n 2.15 ... +1.7 Nichn 61.83 -.04 +2.3 Northern Funds: SmCpldxn12.40-.03 +3.5 Technlyn 12.41 -.04 +3.8 Nuveen Cl R: InMunR 10.85 +.01 +1.0 Oak Assoc Fds: , WhltOkSG n32.72-.11 +4.8 Oakmark Funds I: Eqtylncrn27.17 +.02 +1.8 Globalln 28.38 -.05 +3.4 InImprn 28.10 -.08 +2.5 Oakmark r n47.33-.01 +3.4 Selectrn 37.27 -.09 +4.9 DiOld Mutual Adv iI: Tc&ComZn12.91+.01 +5.0 Oppenheimer A: AMTFMu 10.33 +.02 +1.6 AMTFrNY 13.32 +.02 +1.7 CAMuniAp 11.75+.01 +1.7 CapApAp46.40 -.02 +4.1 CaplncAp 13.01 +.04 +2.8 ChmplncA p 9.47 +.01 +1.6 DvMktA p 42.08 -.25 +4.4 Discp 46.73 -.11 +3.3 EquityA 11.54 -.02 +3.2 GlobAp 76.44 -.11 +3.7 GIbOppA 41.57 -.23 +2.5 Goldp 30.48 -.04 +5.1 IntBdAp 5.94 +.01 +2.3 LtdTmMu 15.95 +.01 +0.8 MnStFdA 42.09 +.02 +2.3 MnStOAp 15.28 ... +2.3 MSSCAp 23.56 -.06 +3.5 MidCapA 19.07 -.09 +2.2 PAMuniAp 13.05+.02 +1.5 StrInAp 4.25 ... +1.6 USGvp 9.49 +.02 +1.2 Oppenheimer B: AMTFMu 10.29 +.01 +1.5 AMTFrNY 13.33 +.02 +1.6 CpIncBt 12.86 +.04 +2.8 ChmplncB t 9.46 +.01 +1.5 EqutnyB 10.99 -.02 +3.1 SItncBt 4.27 +.01 +1.5 Oppenheim Quest: QBalA 19.20 +.02 +2.5 Oppenheimer Roch: LIdNYAp 3.41 ... +0.9 RoMuAp18.85 +.02 +1.5 RcNtMuA 12.85 +.01 +1.8 PIMCO Admin PIMS: TotRtAd 10.48 +.04 +1.4 PIMCO InstlI PIMS: AliAsset 12.95 +.03 +1.9 ComodRR 14.48 +.08 +1.5 DevLcMk r 10.74 ... +1.7 FIlncr 10.53 ... +0.9 HiYId 9.86 ... +2.1 LowDu 9.95 +.03 +0.7 RealRet 11.42 +.04 +3.2 RealRtnl 10.86 +.03 +1.3 ToIRt 10.48 +.04 +1.4 PIMCO Funds A: ReaIRtAp 10.86 +.03 +1.3 TotRtA 10.48 +.04 +1.4 PIMCO Funds C: TolRtCt 10.48 +.04 +1.3 PIMCO Funds D: TRInp 10.48 +.04 +1.4 PhoenixFunds A: BalanA 15.96 +.02 +2.0 CapGrA 15.91 -.01 +1.7 IntlA 13.49 -.04 +1.5 Pioneer Funds A: BalanAp 10.39 ... 0.0 BondAp 9.13 +.02 +1.2 EqlncA p 34.07 +.06 +2.1 EurSelEqA 40.26-.07 +2.4 GrwthAp 13.70 -.01 +1.9 IntlValA 23.38 -.09 +0.8 MdCpGrA 16.65 -.02 +4.7 MdCVAp 26.04 -.03 +4.1 PionFdAp50.45 -.03 +1.8 TxFreAp 11.78 +.01 +1.2 ValueAp 19.49 +.07 +2.3 Pioneer Funds B: HiYIdBt 11.31 ... +2.3 MdCpVB 22.60 -.03 +4.0 Pioneer Funds C: HiYIdCI 11.41 ... +2.3 Price Funds: Balance n21.33 ... +1.9 BIChip n 35.49 -.04 +3.5 CABondn11.08 +.01 +1.0 CapApp n22.62 +.03 +2.5 DivGro n 25.48 ... +2.6 EmEurp 30,93 -.23 +1.2 Eqlncn 29,85 +.05 +3.1 Eqlndexn37.69 +.04 +2.6 Europen 21.26 -.11 +4.1 FLIntm 10.76 ... NA GNMAn 9.40 +.01 +1.1 Growth n 31.83 -.06 +3.4 Gr&ln n 22.74 ... +3.9 HlthScin 27.19 +05 +0.8 HiYield n 7.00 ... +1.4 ForEqn 19.56 -.16 +1.8 IntlBond n 9.59 +.02 +2.1 IntDis n 49.38 -.20 +2.9 IntlStkn 16.59 -.13 +1.8 Japan n 10.73 -.07 -3.9 LatAmn 34.92 -.19 +3.9 MDShrtn 5.13 ... +0.2 MIdCapn 57.90 -.03 +3.5 MCepVal n27.45 -.05 +3.7 NAmern 34.51 -.01 +4.8 NAsian 14.60 +01 +6.8 New Era n46.61 +.06 +3.8 NHorizn 34.08 -.03 +2,7 NInc n 8.94 +.02 +1.4 NYBondn11.40 +.01 +1.0 PSIncn 15.98 +.01 +2.0 RealEst n 24.99 -.07 +0.9 R2020n 17.59 -.01 +2.7 SciTecn 21.36 -.03 +7.6 ShtBd n 4.69 +.01 +0.7 SmCpStk n37.16 -.11 +3.6 SmCapVal n42.62-.09 +3.5 SpecGrn 20.70 -.04 +3.1 SpecInn 12.16 +.01 +1.6 TFIncn 10.08 +.01 +1.1 TxFrHn 12.16 +.01 +1.3 TFIntm 11.15 ... NA TxFrSI n 5.35 +.01 +0.6 USTIntn 5.28 +.02 +1.2 USTLgn 11.62 +.06 +2.4 VABondn11.70 +.01 +1.1 Value n 27.53 +.01 +3.2 Putnam Funds A: AmGvAp 8.87 +.02 +1.1 AZTE 9.23 +.01 +0.8 ClscEqAp 14.67 ... +3.1 Convp 19.26 ... +1.9 DiscGr 20.39 ... +3.2 DvrInAp 9.97 +.01 +1.1 EqInAp 19.35 +.02 +3.0 EuEq 29.00 -.13 +3.4 FLTxA 9.20 +.01 +0.9 GeoAp 19.48 +.01 +2.0 GIGvAp 12.13 +.02 +1.3 GIbEqtyp 10.82 +.03 +2.9 GrInA p 22.25 +.02 +3.2 HIthA p 63.64 +.19 -1.9 HiYdA p 8.03 ... +1.6 HYAdAp 6.20 ... +1.5 IncrmAp 6.74 +.02 +1.1 IntlEqp 31.75 -.05 +1.9 IntGrlnp 16.24 -.02 +1.4 InvAp 15.14 -.02 +3.8 MITxp 9.04 +.01 +0.9 MNTxp 9.02 +.01 +0.8 NJTxAp 9.29 +.01 +0.9 NwOpAp 49.16 -.06 +2.5 OTCAp 8.95 ... +3.1 PATE 9.15 +.01 +0.9 TxExAp 8.80 +.01 +0.8 TFInAp 14.94 +.02 +0.9 TFHYA 13.13 +.01 +0.9 USGvAp 13.06 +.02 +1.0 UtilAp 13.05 +.05 +2.7 VstaAp 11.26 -.01 +3.2 VoyAp 18.31 -.01 +3.7 Putnam Funds B: CapAprt 20.94 -.02 +3.8 CIscEqBt 14.52 ... +3.0 DiscGr 18.65 -.01 +3.2 DvdInBt 9.89 +.01 +1.0 EqInct 19.18 +.02 +3.0 EuEq 27.90 -.13 +3.3 FLTxBt 9.20 +.01 +0.9 GeoBt 19.28 +.01 +2.0 GIIncBt 12.08 +.02 +1.3 GIbEqt 9.83 +.02 +2.8 GINtRst 30.50 +.12 +3.6 GrInBt 21.92 +.02 +3.2 HIthBt 56.99 +.17 -2.0 HiYIdBt 8.00 +.01 +1.7 HYAdBt 6.12 ... +1.5 Inm 1Bt 6.70 +.02 +1.2 IntGrInt 15.90 -.03 +1.3 InllNopt 15.04 -.01 +1.4 InvBt 13.84 -.02 +3.7 NJTxBt1 9.28 +.01 +0.9 NwOpBt 43.79 -.06 +2.5 NwValp 20.03 +.02 +3.0 NYTxBt 8.68 +.01 +0.8 OTCBt 7.84 ... +3.0 TxExBt 8.81 +.01 +0.8 TFHYBtI 13.15 +.01 +0.8 TFInBt 14.96 +.02 +0.8 USGvBI 13.00 +.03 +1.0, UtilBt1 12.97 .+.04 +2.6. VistaBt 9.74 -.02 +3.1 VoyBt 15.91 -.01 +3.6 RS Funds: CoreEqA 37.07 +.09 +3.1 IntGrA 17.49 -.10 +1.0 RSMRsp 34.48 +.21 +0.2 Value 27.75 +.03 +3.1 Rainier Inv Mgt: SmMCap 37.77 +.03 +4.6 RiverSource A: DEI 13.79 +.03 +2.9 DvOppA 8.74 +.02 +2.6 Growth 31.41 +.17 +2.9 HiYdTEA 4.42 ... +1.0 LgCpEq p 5.95 +.02 +2.8 Royce Funds: LwPrSkSv r 17.98-.08 +3.1 MicroCapl 18.74 -.03 +3.7 PennMulir 12.27 -.05 +4.2 Premied r 18.21 -.08 +3.5 TotRLtl r 14.18 -.03 +3.2. Russell Funds S: DivEqS 50.19 -.02 +2.9 IntlSecS 80.27 -26 +2.0 QuantEqS 42.55 -.03 +1.9 Rydex Advisor: OTCn 11.44 -.01 +5.4 SEI Portfolios: CoreFxAnlO.34 +.03 +1.4 IntlEqAn 14.71 -.07 +1.7 LgCGroAn21.08 -.02 +3.2 LgCValAn24.69 +.05 +2.7 STI Classic: CpAppAp 12.73 ... +2.1 CpAppCp11.92 +.01 +2.1 LCpVIEqA 15.19 +.02 +2.9 QuGrStkCOt 25.03+.01 +2.2 TxSnGr p 26.98 +.01 +2.4 Salomon Brothers: BalancBp 13.99 +.02 +1.8 Opport 58.90 -.07 +1.9 Schwab Funds: 1000lnvr 41.16 +.03 +2.7 0lSOSel 4,1.20 +.03 +2.7 S&P Inv 21.86 +.02 +2.5 S&PSeal 21.95 +.02 +2.5 SmCplnv 26.65 -.06 +3.6 YIdPISSI 9.68 ... 40.5 Selected Funds: AmShD 45.53 +.03 +3.5 AmShSp 45.41 +.03 +3.4 Sellgman Group: ComunAt33.06 -.10 +4.7 FrontrAt 13.19 -.04 +6.0 FrontrDt 11.24 -.03 +5.9 GIbSmA 16.55 -.02 +1.1 GIbTchA 16.02 -.01 +4.5 HYdBA p 3.37 ... +1.9 Sentinel Group: ComS Ap 33.86 +.03 +2.6 Sequoia n167.76-1.04 +0.5 Sit Funds: LrgCpGr 40.36 +.02 +2.9 SoundSh 41.58 -.04 +2.1 St FarmAssoc: Gwlh 56.99 +.01 +2.3 Stratton Funds: DMdend 40.40 -.11 -0.6 Multi-Cap43.83 +.13 +1.9 SmCap 48.81 -.18 +3.5 SunAmerica Funds: USGvBt 9.29 +.03 +1.5 SunAmerica Focus: FLgCpAp18.17 -.06 +2.6 TCW Funds: SelEqtyl 19.63 +.02 +4.2 TIAA-CREF Funds: BdPlus 10.12 +.02 +1.3 Eqlndex 10.20 ... +2.7 GroInc 14.51 +.01 +3.0 GroEq 10.16 -.02 +3.4 HiYldBd 9.24 +.01 +1.7 InllEq 14.61 -.06 +2.0 MgdAic 12.34 ... +2.4 ShtTrBd 10.35 +.02 +0.8 SocChEq 10.93 ... +2.5 TxExBd 10.83 +.01 +1.1 Tamarack Funds: EntSmCp33.50 -.39 +1.9 Value 43.22 +.03 +1.9 Templeton Instil: EmMSp 22.62 -.16 +4.5 ForEqS 27.19 -.09 +3.7 Third Avenue Fds: Intr 23.55 -.08 +0.3 RIEsIVI r 36.71 -.06 +3.3 Value 60.76 +.02 +1.4 Thornburg Fds: IntValA pe 27.06 -.74 +2.0 Thrlvent Fds A: HiYld 5.13 ... +1.8 Income 8.61 +.02 +1.4 LgCpStk 29.06 +.02 +1.9 TA IDEX A: JanGrowp25.86 ... 0.0 GCGIobp 29.74 -.09 +2.5 TrCHYB p 9.25 ... +1.7 TAFIxInp 9.42 +.03 +1.8 Turner Funds: SmlCpGr n28.90 -.01 +4.5 Tweedy Browne: GlobVal 30.53 -.05 +2.3 UBS Funds Cl A: GlobAllot 14.99 +.01 +2.2 UMB Scout Funds: World 32.52 +.01 +3,2 S*0 ~.o 5.1 ha ~ .v .u~ .5 5 4 - 5 ha .1St C+o. n...w.v S.a.P -- ~ a... .he.h..ah. .~aa *.~ d. .s.~ .15 .q. .,i* ~1 ~ a.- ha 5 .0t o *.O US Global Investors: AJLAm 29.02 -.06 +4.7 GIbRs 16.40 ... +2.6 GIdShr 15.23 -.05 +5.3 USChina 9.57 +.01 +6.0 WIdPrcMn 28.92 -.13 +6.8 USAA Group: AgvGt 32.45 -.14 +2.4 CABd 11.25 +.02 +1.4 CmstStr 28.69 -.03 +2.2 GNMA 9.54 +.03 +1.2 GrTxStr 15.20 +.02 +1.7 Growth 15.12 -.03 +2.6 Gr&lnc 19.92 +.01 +3.1 IncStk 17.45 +.02 +1.9 Inco 12.18 +.03 +1.2 Intl 28.56 -.04 +1.7 NYBd 12.06 +.01 +1.1 PrecMM 27.60 -.11 +4.6 SciTech 11.67 -.03 +4.4 ShtTBnd 8.87 +.01 +0.7 SmCpStk 15.65 -.03 +3.8 TxElt 13.25 +.02 +1.1 TxELT 14.16 +.02 +1.4 TxESh 10.62 ... +0.5 VABd 11.68 +.01 +1.2 WIdGr 21.59 +.01 +2.5 VALIC: MdCpldx 25.07 -.03 +3.3 Stkldx 37.63 +.04 +2.5 Value Line Fd: Lev Gt n 24.33 ... +2.9 Van Kamp Funds A: CATFAp 18.64 +.01 +1.1 CmstAp 19.32 +.01 +1.3 CpBdAp 6.60 +.02 +1.6 . EqlncAp 9.31 +.01 +2.1 Exch 416.12 +1.10 +2.4 GrInAp 22.73 +.02 +2.5 HarbAp 15.58 ... +2.2 HiYIdA 10.65 ... +1.6 HYMuAp11.21 +.01 +1.3 InTFAp 18.65 +.02 +1.1 MunlAp 14.89 +.02 +1.1 PATFAp 17.52 +.01 +1.1 StlrGrwth 42.60 -.05 +3.5 StrMunlnc 13.69 +.02 +1.3 US MtgeA 13.45 +.02 +1.0 UtilAp 21.57 +.03 +2.1 Van Kamp Funds B: CmstBt 19.31 +.01 +1.3 EnterpBt 12.65 -.05 +1.7 EqlncBt 9.15 +.01 +2.0 HYMuBt 11.21 +.01 +1.2 MulB 14.87 +.02 +1.1 PATFBt 17.47 +.01 +1.1 StrGwth 36.06 -.04 +3.4 StrMunlnc 13.68 +.02 +1.3 USMtge 13.39 +.02 +0.8 UITiB 21.48 +.03 +2.0 Vanguard Admiral: CpOpAdl n89.81 -.03 +4.5 Energyn121.51 +.56 +3.7 ExplAdmiln76.87 -.10 +3.3 ExtdAdm n38.89-.05 +3.7 500Admln129.40+.14 +2.6 GNMAAdn10.23+.02 +1.2 HthCrn 62.51 +.07-2.3 HiYldCpn 6.20 ... +1.7 InlProAd n23.39 +.06 +1.4 ITBdAdml n10.28+.03 +1.6 IntGrAdm n80.12-.29 +1.8 ITAdm n 13.37 +.01 +1.0 ITGrAdmn9.72 +.03 +1.4 LtdTrAd n 10.72 ... +0.4 MCpAdmln89.96 ... +3.4 MuHYAdm n 0.92+.01 +1.1 PrmCap r n76.62 -.12 +2.8 ReitAdm r n106.95-.38 +0.4 STsyAdml n0l.31+.02 +0.6 STBdAdml n9.91 +.02 +0.7 ShtTrAd n 15.57 ... +0.3 STIGrAdnIO.56 +.01 +0.7 SmCAdm n32.88 -.08.+3.5 TxMCap r n67.73 +.06 +2.7 TtlBAdml n10.02 +.03 +1.4 TStkAdl n33.81 +.02 +2.8 WellslAdm n54.36+.15 +1.6 WelltnAdm n57.87+.11 +1.9 Windsor n66.95 -.08 +4.1 WdsdlAdn63.18 +.09 +1.7 Vanguard Fds: AssetAn 28.68 +.03 +2.5 CALTn 11.80 +.02 +1.2 CapOpp n38.84 -.02'+4.5 Convrtn 14.77 ... +1.9 DivdGron 14.32 +.01 +2.1 Energy 64.67 +.30 +3.7 Eqlnc n 26.30 +.03 +2.5 Explrn 82.45 -.10 +3.3 FLLTn 11.68 +.01 +1.2 GNMAn 10.23 +.02 +1.2 GlobEqn 23.32 -.01 +2.9 Grolncn 35.54 +.04 +1.7 GrthEqn 11.11 ... +4.2 HYCorp n 6.20 ... +1.7 HNhCren148.02 +.17 -2.3 InflaPron 11.91 +.03 +1.4 InglExplrn21.86 -.04 +3.0 InllGrn 25.14 -.09 +1.8 IntlValn 42.21 -.14 +1.6 rITGrade n 9.72 +.03 +1.4 llTsryn 10.82 +.03 +1.3 ULfeConn 16.61 +.02 +1.8 UleGron 23.73 +.01 +2.5 Ufelncn 14.08 +.03 +1.6 ifeModn 20.38 +.03 +2.3 LTIGraden9.37 +.04 +3.2 LTTsryn 11.26 +.06 +2.4 Morgn 19.49 -.01 +3.2 MuHYn 10.92 +.01 +1.1 MulnsLg n12.69 +.02 +1.1 Mulntn 13.37 +.01 +1.0 MuLtd n 10.72 ... +0.4 MuLongn11.35 +.02 +1.3 MuShrtn 15.57 ... +0.3 NJLTn 11.96 +.02 +1.5 NYLTn 11.37 +.02 +1.4 OHLTrEn12.06 +.02 +1.2 PALTn 11.42 +.02 +1.3 PrecMls r n29.13-.24 +0.2 Prmcprn 73.74 -.11 +2.8 SelValu r n22.19 -.02 +4.3 STARn 21.33 +.01 +2.3 STIGrade n10.56 +.01 +0.7 STFedn 10.29 +.01 +0.6 StratEq n 24.74 -.06 +3.3 TgtRe2025 n13.10+.01 +2.4 TgtRe2015 n12.58+.01 +2.2 TgtRe2035 n13.86+.01 +2.6 USGron 18.26 +.01 +3.1 USValuen15.10 +.01 +1.5 Wellslyn 22.44 +.07 +1.6 Welltn n 33.50 +.07 +1.9 Wndsrn 19.84 -.02 +4.1 Wndsll n 35.58 +.06 +1.7 Vanguard Idx Fds: SO n 129.38 +.14 +2.6 Balanced n21.34 +.03 +2.2 DevMktn 12.28 -.03 +1.9 EMdkn 22.88 -.13 +4.8 Europe n 35.45 -.09 +3.4 Extend n 38.82 -.06 +3.7 Growth n 29.79 -.02 +3.2 ITBndn 10.28 +.03 +1.5 LgCaplxn25.19 +.03 +2.7 MidCapn 19.81 ... +3.4 Pacific n 11.94 -.02 -1.2 REITrn 25.06 -.09 +0.4 SmCap n 32.85 -.08 +3.5 SmlCpVIn17.18 -.05 +3.2 STBnd n 9.91 +.02 +0.7 TotBnd n 10.02 +.03 +1.4 Totllnll n 17.15 -.05 +2.4 TolSwkn 33.80 +.02 +2.8 Value n 26.05 +.07 +2.2 Vanguard Instl Fds: Ballnstn 21.35 +.03 +2.3 DvMkllnst n12.18-.03 +1.9 Eurnlnst n35.52 -.09 +3.4 Extln n 38.91 -.05 +3.7 Insildxn 128,39 +.13 +2.6 InsPIn 128.40 +.13 +2.6 TotiBdldxn50.54 +.13 +1.4 InsTStPlus n30.44+.01 +2.8 MidCplst n19.89 ... +3.4 SCInstan 32.91 -.08 +3.5 TBIstn 10.02 +.03 +1.4 TStnstn 33.81 +.02 +2.8 Vantagepoint Fds: Growth 9.58 ... +4.4 Victory Funds: DvsStAe 17.98 +.02 +5.6 Waddell & Reed Adv: CorelnvA 7.09 ... +2.9 Wasatch: SmCpGr 39.74 -.13 +4.0 Weltz Funds: Value 41.18 -.11 +3.8 Wells Fargo Adv: CmStkZ 24.77 -.04 +3.5 SCApValZ p 33.40+.06+2.4 Western Asset: CorePlus 10.59 +.03 +1.8 Core 11.38 +.04 +1.9 William Blair N: IntlGthN 29.32 -.08 +2.3 - __ 0 GNP S-- S "Copyrighted Material Syndicated Content - Available from Commercial News Providers" - - -- . --doom do- ddhmp- -., 4 o0 , -a - S.~ - S *.* -~ -~-~ ft :-I41b S - - - ~ 0 - - U - - -0 --..w - - 0- * - - a - Business HIGHLIGHT Sillicone-gel implant them. The action opens the implants to ban lifted- The Food and Drug much wider use by women seeking Administration approved the to reconstruct or augment their WASHINGTON The govern- implants made by Inamed Corp. breasts. Since 1992, the silicone ment ended a 14-year virtual ban now part of Allergan Inc. and implants had been available only on silicone-gel breast implants Mentor Corp., the two California as part of research studies. Friday despite lingering safety con- companies said. They first went on the market in cerns, making the devices avail- FDA planned a teleconference 1962, before the FDA required able to tens of thousands ofe late Friday to announce a product proof that all medical devices be women who have clamored for approval, safe and effective. In A World Full Of Look-Alike Homes, There's One ... .. .. .R. er __ .&. ,: Y_ ,r.IW 352-873-2411 Located in Publix Plaza on S.R. 200 next to Paddock Mall Ocala FLt-CR-COS7203 --ss *0% down to qualified landowners. "Price subject to change without notice. Drawings may show options not included in base price. 2006 America's Home Place, Inc. S& Crafts Festival Historic Downtown Inverness Saturday December 9 L 9-4 p.m. Showcasing a variety of arts & crafts and handmade items perfect for holiday gift giving along with food & beverage vendors. After the Christmas parade be sure to get your free photo with Santa, provided by Walgreen's. Photos taken from 2 4 pm. For more information call 726-3913 or email parks @ cityofinvernessonline.com l 168 asrmwhmno~eonN-cm a I AMERICAN STOCKXANGE I .42 AbdAsPac 6.14 -.02 1.39 EvglncAdv 14.15 -.03 1.18e iSR2KVnya 80.17 ... ... ilsandsgn 4.16 +.01 .42f AdmRsc 32.07 -.33 1.05 FTrVLDv 17.60 -.02 .26e iSR2KG nya 79.61 +.07 ... On2Tech .89 +.03 .AmOriBio 10.00 -.25 .43 FlaPUIl 13.89 +.02 .77e iShR2Knva 78.59 -.05 PacRim 1.00 -.04 ApolloGg .35 +.01 ... Friendly 11.50 +1.11 ... Mergent 23.65 -1.05 .PeCopg 3.29 -.13 ... BioSante 1.67 +.10 ... FrontrDg 9.01 +.36 ... IntIgSysh 2.56 +.12 2.57e PhmHTr 77.35 +.65 ... BirchMtq d2.52 -.38 ... GasooEnrigy 2.44 -.03 ... InterOilg 21.80 +.15 ... PionDril 13.32 -.01 ... BodisenBlo 5.02 +.24 ... GoldStrg 3.03 +.07 ... Invemnss u40.30 +.89 .11e PwSWtrn 18.30 BootsCts 1.99 +.01 ... GrtBasGg 1.94 -.01 ... JedOilg 3.09 +.14 ... ProUIIQQQn91.60 -.20 CdnSEng 1.93 -.02 GreyWolf 699 +09 .24 JInpan u18.15 +4.65 PrUShQQQ n5177 +06 .. CanArgo 1.39 -.01 ... GpoSimec 18.99 -.46 ... LadThalFn 1.20 -.11 ... Prvena 2.91 -.01 .01 CFCdag 9.01 -.04 Harken .55 -.01 ... LundinMn d33.10 -.46 QuadMd 2.96 -.04 .. CheniereEn 28.55 +.24 .15e iSCannya 24.99 -.03 MadCatzg .53 ... ... Onstakeg .23 -.01 .36 ComSyslf 9.54 -.01 .48e iShMexnya 47.60 -.10 ... MktVGoldn 37.35 +.03 ... Rentech 3.85 +.03 1.04 ComerStrt 7.34 -.40 1.00e iShSP100cbo65.44 +.12 ... Merrimac 10.08 +.10 2.85e RetalHT 9963 -26 C. ovadCm 1.27 -.03 4.67e iShLeAgBd 100.32 +.26 ... Metretek 14.80 -1.00 .. RioNarcg 2.26 Crystallxa 308 +07 99e iShEmMkt 10699 -12 ... MetroHlth u2.89 +.08 .33e SemiHTr 35.28 -16 230e DJIADiam 12326 +.22 4.12e iSh20TB 89.95 +.51 ... Miramar 4.55 -.05 ... SemotusSh .19 +.01 .76 EVInMu2 15.30 +03 3.52e iSh7-10TB 83.09 +.30 ... NDragon 1.63 -.12 233e SPDR 14042 +04 EldorGIkg 4.95 +,10 3.26e iSh1-3TB 80.15 +.10 ... NAPallg 8.51 -.06 1.49e SPMid 14740 -25 .54e EllswIhFd 8.20 -.05 1 11e iShEAFE 7117 -21 NOriong 393 +08 78e SPMatus 3383 -15 .20a EmpireRs 9.70 -.24 .06e iShGSTch 52.04 -.13 NthotMg 283 -03 .43e SPHIthC 33.22 +.10 .. Endvrlnt 2.25 +.05 ... iShNqBo 81.85 +.66 ... NovaDel 1.65 +.15 .50e SPCnSt 2589 +.04 ... EnNthg d.68 -.05 1.64e iSRIKV nya 80.91 +.15 ... NovaGldg 16.06 ... .31 SPConsum 38.11 -.07 .EvgmEnya 10.15 +.14 .52e iSR1KGnya55.19 -.03 95e OilSvHT 13685 +109 .67e SPEnv 57.10 +.47 .77e SPFnd 36.00 -.27 .54e SPInds 35.40 +.02 .19e SPTech 23.64 +.04 1.07e SPUtFl u3604 +04 ... Stonepath .20 .15e sTHomen 35.72 -.06 .01p sT Retail n 41.29 -.39 .. TanzRyg 6.35 -.22 .. Taseko 2.20 -.07 1.35e TelcHTr 33.51 +.33 TransGIb 5.22 +.41 TmsmrEx 2.89 +.03 UltraPtg 50.18 +27 USOilFdn d5094 +35 Uranerzn u3.19 +.23 Viragenh .27 +.02 Viragenun .27 WstmlndIf 22.97 -.17 WidePntn 2.49 -.16 .04 Yamanacq 1055 -.35 _ BUSINESS _ __ - dp - * - - -,,Gmm 12A - "Let us not be a generation recorded in future histories as destroying the irreplaceable inheritance of life formed through eons past." Charles A. Lindbergh Jr. SATURDAY NOVEMBER 18, 2006 CITRUS COUNTY CHRONICLE WHERE ARE WE GOING? Change should cause EDC to reassess aim A s Citrus County Economic Development Council leaders prepare for the February departure of Execu- tive Director Brett Wattles, they are assessing options to bolster the efforts of the EDC. Specifically, they are consider- ing a partnership with govern- ment funded Citrus-Levy-Marion THE I Workforce Development. Econ That's a logical Develo consideration, Cou since CLM Work- force Development OUR OF is able to provide Avo training in areas 'here-we- potential employers scene may have a need for, should they choose YOUR OPII to locate operations chronicleor in Citrus County. comment at It's also a logical Chronicle consideration because CLM could help pay the cost of a new, full-time executiz director. While the relationship is wor- thy of consideration, EDC lead- ers would be wise to analyze the successes of CLM to ensure they're getting what they're bar- gaining for. Moreover, and perhaps more importantly, EDC leaders need to rethink and restate their mis- sion. Minimal headway has been No time to enjoy 01 Let's face reality ... The great majority of Americans will never get to enjoy the beauty of this great country. Why? Because we have to work our butts off to make ends meet. Only the fat-cat CA-- politicians and the rich get 5 to enjoy America. Let's 563- face reality; it's a fact. Lurking officer Why is it every time you drive through Meadowcrest you happen across a sheriff's deputy waiting for someone to roll through a stop sign? Thanks to all I'm calling in reference to the Vineyard Church gathering on Saturday for the homeless, the vet- erans and the needy. I would like to tell them what a wonderful job they did helping everybody out who was in need with the dona- tions and food and clothing and help for hearing. The music was wonderful and the food was great. They'd done a wonderful, beautiful job and we'd just like to thank them. We don't know each individ- ual name of who put it on and everything, but we'd like to thank everybody who was involved. God bless them. Out of control Our carpets and blinds are filthy, with dust blowing into our back porch constantly, mud everywhere after it rains, a broken driveway, a track hoe stuck in the middle of our road for five days, sprinkler system's gone in several places, phone and waterlines cut several times, no mail delivery or access to our road for days at a time, and still no word of when this will all end. It's obvious that this county has absolutely no control over this contractor. b II I ( made in luring new, high-paying industries to Citrus County. Greater success has been real- ized in working with existing businesses but even those achievements have not been overwhelming. Business owners who support the EDC through occupational license fees need to SSUE: make their wishes known, too. History omic has shown the EDC pment and similar coun- ncil. cils before it have a way of losing trac- 'INION: tion and straying d a from the course. go-again' That course, how- ario. ever, is not an easy one. Lack of an VION: Go to interstate in the line.com to county and lack of bout today's industrial parks editorial with water and sewer service great- ly limit the likelihood of major coups for the EDC. To make things more difficult, thousands of counties across the U.S. com- pete for a handful of opportuni- ties to land high-paying employ- ers in the clean, light industry realm. The partnership with CLM Workforce Development may be a step in the right direction - but we need to determine which direction we're going in. ? Cameras on poles There are cameras mounted on poles at vari- ous intersections in the s county. For example: Annapolis and (County Road) 486, Citrus Hills Boulevard and (C.R.) 486, and Forest Ridge Boulevard 0579 and (C.R.) 486. I would like 0579 to know why these cameras are on the poles and what their purpose will be. Neighborhood eyesore I'm calling the Chronicle in regard to the article Nov. 7 about the brawl in Citrus Springs regarding 11 to 13 teenagers. This house has become a real eyesore in Citrus Springs.-There are numerous cars parked all over the road and there are teenagers and the kids hang out at this house every day. Why doesn't code enforcement do something about them parking all over the lawn and also the debris all over the house? This place is becoming a real eye- sore for Citrus Springs. Somebody, please do something about it. In the doghouse I guess Sugarmill Woods Country Club is going to the dogs. Poor management of the club, poor serv- ice in the club, the prices are too high. That must be why they built the dog pen in the beautiful lobby. Start trial It's time that we get this John Couey issue off of dead center. Ric Howard, I applaud him for what he's doing. I think it's time we get this thing done and over and moved for- ward and quit paying taxpayers' money for such silliness. Pollution cause This is regarding the "Hard road ahead" editorial. The Florida Department of Transportation did- n't create the polluted storm-water runoff; you and I did. A (.. - e - C- lb. .41b. . - - - .e S - - 0 - - - - - -~ S. o *- - T- ---"Copyrighted Material ila-: f1 Syndicated Content w -P d 'Available from Commercial News Providers" Cm- a - - 0-. .0- - q - -0 ~- S... -.0 - '~ - to - - 4 L,- 1 uS n to Efforts appreciated I would like to congratulate John Thrumston on his recent victory in the District 4 County Commission race, and commend Steve "Peanuts" Hasel for the effort he put forth. I would like to thank the more than 300 people, Democrats, Republicans and NPA's, who worked both actively and behind the scenes on my cam- paign. Although we fell a few percent short of our goal, their efforts should not go unmentioned. Karen S. went door to door on my behalf. Many people have done this for their candidates in the past However, Karen is on oxygen, and confined to a motorized wheelchair. Her undaunted effort is remarkable as well as heartwarming. Jim W has been a good friend of mine for well over a decade. He led our business-to-business team, was a member of our sign team, and did all the cooking at three fundraisers. After a divorce last year, he sold his house in Virginia, and moved to Citrus County to help me with my campaign. Darlene R., and her son Mike, spent countless hours assembling signs. She also led the Friday Night team ses- sions at my house each week, and spent her weekends passing out liter- ature. Darlene works two jobs. Much of the work she did was after working third shift as a nurse, getting little or no sleep. It has been said that politics brings out the best and worst in people. I have seen this firsthand. But the posi- tive experiences, and the friendships I have made, will last a lifetime. Thank you, Team Leven, for believing in me, sacrificing for our cause, and exceeding the expectations of many. Your efforts have given me much more than you will ever know, and much more than I could ever express. Bernie Leven Citrus Springsoonline.com. Brother's keeper On Sunday, Nov. 19, churches all over the county will take up a collec- tion for Am I My Brother's Keeper Day. Residents who do not attend churches More will mail donations letters for this day. This day has been PAGE 18A set aside by Proclamation as "Am I My Brother's Keeper Day" by the Citrus County Board of Commissioners and the col- lection of funds will be mailed to First Assembly of God, P 0. Box 367, Crystal River, FL, 34423. All the funds will be dispersed equally to three shelters: CASA (domestic violence shelter), Sanctuary Mission and The Path. First Assembly of God is acting as a collection point and will not take any of the funds for administration. Funds will be distributed in the name of the churches and/or residents who donate to Am I My Brother's Keeper Day. One hundred percent will be distrib- uted to these shelters and there will be a stipulation that these funds will e Editor be kept in Citrus County and utilized for the homeless with the goal of adding additional beds and/or hous- ing. They may also be used only to service the needs of their residents, but not for administrative expenses. Our community is rapidly growing, and with that growth community needs become greater, but the main priority that seems to concern all Citrus County is the lack of affordable housing for low-income families and the homeless. There are only three shelters in this county with 36 beds. It clearly does not meet the need. There is very little space for mothers with children and no space for couples or families. Limited government funding and grants assist but clearly sufficient funding is not there. Therefore, I am asking all residents to count your blessings. Only by the grace of God do you have a roof over your head. According to the Bible, Matthew 25:34-39, "we are to feed the;- hungry, give drink to the thirsty, pro- vide shelter for strangers, provide clothing for the naked, visit the sick and visit the prisons." Mary I. Ehresman; Am I My Brother's Keeper! Coordinator Marines' physical On Oct 10, the Fakhoury Chiropractic Clinic of Crystal River provided 11 Young Marines of the Nature Coast Young Marines their required annual physical. The Nature Coast Young Marines would like to thank Dr. Andrew Jones, Dr. Kevin Hoffman and Therapist Dee Fries for their generosity of time and skills that will enabled these 11 Young Marines to continue their service to the Drug Reduction Program provid- ed by the Young Marines. Thank you Semper Fi! Chris Knudsen, executive officer Nature Coast Young Marines. goodbye to Rumdeld .--.a e a - S.-.- S a - - - - qb k O - 0- 91m 4.--5 t- -- o I Floft ar CITRUS COUNTY (FL) CHRONICLE oAlUDtAY, N .VEMIVIRI ,-, ,O IHado d section cteds ama "Copyrighted Material Syndicated Content Available from* Commercial News Providers" - a Azrxx* repd hoAda ctwr b% -I- M 6L * .-. - - - a e - = - a - .r - S a - .* - * a *~- - ~ - r ~ - - - ~ - - a. - ~ .- - co-oo-0 .w -- mm - ___________o Sm ft - 400 am* - a - * S = - * a.-~ -,~.- -- * .-~-q * *. .- a .- - a - -~ -~ - a ~. - - - -.MO. .M a a -low 0 a- --Now -. -~- -~ 4b CURTIS PETERSON AUDITORIUM 4PM 90+ min. show $12 U35240UU0 426 7PM- 2 hour+ show- $14 Both shows $19 866-8844- 91 (+6% tax, parking fee) OR BUY TICKETS AT DONUTOWN Just past Kmart on Rt. 41, Inverness HARRY'S 2 LITTLE BAKERS 4001 N. Lecanto Hwy., Beverly Hills CRYSTAL RIVER MUSIC North side of Rt. 44, near Crystal River and Dunnellon 800897 693943 )LMIA .q~ll TRAv N~r,nr. R 2or, --q - Ab,," r I- aa. Nation & World %m ft s 1m I & am s a w M O- O -m="soo& 4oflw tom aAmlo 44m d~b am Of * ~ - a a- *a. a - a a a -a - ~ - a a -~ - = -a a-a. - Ow-a a a - * a aa - - a a - qba a m W ft -a 41M- -Now q- ao *- q- 41b a a m* -RO. -1 a ft- 4 - -.0p 41. - a a a. a a a - -41b 41b. - 40 -- -mo- -.No 41 a 4b qb- in- - f a a - a -e W -. a-mmNmm ft- w - ---N lob 40M .0 .1- a-p me 6 -a. -amm- a. gap qa a w- 411 (i"o rei tn Id Co pyg 1hted&Mater SSyndicated Content Available from CommerciaINews Ma -.- o a a -- - d n b4 a .- In Ala"ka8 whak~s fr a opm40 %MM- 40mm m* o go .: LOM 40 o * 40 04b-b M =~~0 4-ef ONO a vial -4m ,aa- m 40 m -g am sw -f bof Aia 40 ala.0 o SAlma- -MRa a. a s- AD 40- -Am. o- a 4b -N ma AND- Am.. A- - dl- .0 - -AM.- 4b 4b --No -f 4m am-- - -- - a- .-~ GNP a - -. - 4w 461 - a40 ONO a- --No -af a - ~ a -a Amm -I buA * a a - - a --a a - S. a - - a.= a-a. a. a -a - - a- * -a - -~ -a - a.-- - a- - -- -a 41..- a -lh - ft. -dM * a ~a-.4b - - -- -o. 4D - a.- - a- - a-a a *AR - - 70m= ~~fw m &At ? 1% ~wmw m - * -_ _ P a.. ...- * -anw- a--. N N qbw 6 -=. a- .=.B o a0bo 41b--a- - -~ aS - a a- -- a a - a a.- -a a. a a- - - a - a-- a - - - - .a - - a ~ a - * -a - - a- - --S ~- a.- - * -a a. a a a - a- - a -a a - - a-a a a a a- - al a a a a--. a ~- -a S. a - a a a.-. -- - a - a B - a 0 5 - - a - - a - -aMI- 0 -I*m oow 4 - - -41. a a - amom a -~ a- lb. a- ~ ~ ~ ~ 4 -41-W___ a- -aao- - a-awpm O f o ql CITRS COUN'IY (FL) CHRONICI.I ID 1: mm-n I Receive a Receive up to a $500 Healthy Climate 16 Air Cleaner Instant Discount** with purchase of a qualifying Lennox" variable speed furnace or air handler. ---Ni ----- I--i Ni-- II II - I with purchase of a qualifying Lennox Home Comfort System. Toll Free 877-489-9686 Crystal River 352-795-9685 Dunnellon 352-489-9686 12345 ;all Now For The Best Price! LENNIX HOME COMFORT SYSTEMS Offer Expires 11/3012006 qualifying purchase. S:to l:ooI:s CFC057025 - - I I 4 I'. 14 . '4 I' 14 Sjvri ii-ii ky NovVRfv --a 18, 2006 G $LSA ISA SAUIUmAY, Novr CIrus CouNTY (FL) CHRONICLE iMBER 18, 2UU1 Who knew? Roasting a turkey doesn't have to be an all-day affair. Log on to for more recipes and ideas. a For an 8-12 Ib turkey (6-8 servings), preheat oven; prepare turkey (following package instructions); and begin to roast about 3.5 hours before you would like to serve. About 20 minutes before your turkey is done roasting, begin preparing green beans. ..A..' _-- ,, '',' .. . . . , ,: ? ^ .:, -l:. '^ i = :."r, .. -..',_- k' ^*^ ^ : "-. . . . . . . . . ... . ..,. ,-: ,,-., - . . -ix ;;n .:...-... ... ,*,. ^:_. ^. ,-.. .- ...: ;_" '.." .'-^ ^ .: .. '.' ; ";T. t.' ^, -.. ." , .. .: ":' -- ;', W. M4 Fresh Green Beans...............1.29b It's a snap to make a delicious side dish with velvety beauties like fresh green beans. Remember to cook them just until tender; they should remain bright greeo. Before cooking, wash them thoroughly in clear; cool water and trim or snap the tips. Green beans are low in calories and carbs-a delightful addition to your Thanksgiving feast. SAVE UP TO .20 LB Potato Rolls, 12-Count..............1.79 18-oz pkg., We bake our potato rolls fresh daily in the Publix Bakery so they have. a.delicious, nch flavor andisoft, dense texture. Enjoy them just the way they are.or warm them in the oven. They're perfect for your Thanksgiving dinner. SAVE UP TO .30 Robert Mondavi Woodbridge Chardonnay Wine................... 9.99 A great wine-and-food.combirntiroeiate ri el wine and i,,-- food taste better. 'Choose from Syrah, Cabemet Sauvignon, Pinot Grigio, Zinfandel, or Merlot, 1.5-L bot. Here's to a feast with family and friends! SAVE UP TO 1.00 Mushrooms ................ ..... .......... Whole or Sliced, High in Riboflavin and a Good Source of Niacin, 12 or 16-oz pkg. SAVE UP TO .98 ON 2 .2FO4.00 Gourmet Green Beans Prep and Cook. 35 minutes (Makes 6-8 servings). 2 lbs fresh green beans (rinsed and snapped, if desired) C 1 (12-oz) package fresh pre-sliced.white mushrooms (rinsed) 3/4 cup water 3 tablespoons garlic butter 2 teaspoons seasoned salt 1 Place beans, mushrooms, and water in microwave- safe bowl. Cover and microwave on HIGH for 16-20 : minutes, stir ihg'onie; drori'il crirsp'feh'der?:' "-' -' ' 2. Preheat large saut6 pan on medium-high 2-3 minutes. Place butter in pah; swirl to coat. 3. Drain beans and mushrooms; add to pan. Sprinkle with seasoned salt. Reduce heat to medium; cover and cook 6-8 minutes, stirring occasionally, or until , desired tenderness. Serve. Heinz Home Style Gravy .............. ... ,. ........... .99 Assorted Varieties, 12-oz jar SAVE UP TO .40 Swanson Broth .............................. 4FOR2.00 Assorted Varieties, 14-oz can SAVE UP TO 1.56 ON 4 Land 0 Lakes Sweet Cream Butter......................... FOR4.00 Salted, Light Salted, or Unsalted Sweet, 4-sticks, 16-oz box SAVE UP TO 1.98 ON 2 Carving the turkey is easy with these expert tips. Log on to for details and even more helpful hints. ay, November 23. e're takingg thiayoff so our ociate s hseritimewith their ies add ese wil.l.be open .lar s ;.-,. 6ed-I esdayj Sober; 22 and lridy, Novemnber 24. S ?. " . ''% i A, d -: '' ,I, ,' .' 0 '..'..'" , . .*** ,. fte (l',- a .'1 knife tip to cut through the joint, separating the thigh from the backbone. Hold each drumstick by the tip, resting the larger ends on the cutting board. Slice parallel to the bones until all meat is sliced. I Q >nnA : Ew .( *t ~pg~rp~:1Jpeh :' ',vT,. SATURDAY, NOVEMBER 18, 2006 17A CITRUS COIIN'TY (FL) Cn CONICLEI While green beans microwave, take 10 minutes to prepare sweet potatoes and begin to boil. A1 ; Remove your turkey from the oven when' your meat thermometer-inserted into the thickest part of inner thigh (not touching bone)--reaches 180QF and, if stuffed, temperature in the center of stuffing reaches 165"F. a After you've removed your turkey, let it stand for 15-30 minutes before carving, and use the residual heat in the oven to warm dinner rolls. Also, take 15-30 minutes to complete green beans and sweet potatoes; prepare stuffing (following package instructions); and carve turkey. Serve. 0 With help from Publix, your wishfor an effortless holiday can come true. F+**,.. ~j ..rrom medI planning to 00toking ahd carving, we promise a simple yet sp feast thateeyonwill be tha kful for-especially the chef.. ..: -' . ' '.+ * ,'_^^ ', . Ow .:n~l~ ig esml e 1. * Publix Frozen Turkey...............6911b We have a wide variety of sizes of young, broad-breasted, USDA-inspeeted, Grade A fi-ozeturkeys so. you. can,, .... ,. choose the one perfect for your gathering. Remember to remove the giblets from inside and follow our easy carving tips, below. SAVE UP TO .30 LB *IV Pumpkin Pie, 8-Inch............. 26.00 24-oz size, Our smooth pumpkin pie filling is made .. fromm a freshcrop of pumpkins and just the right spices. Baked in the Publix Bakery until the crust is flaky and golden, just add a dollop of whipped cream and be ready to serve everyone seconds. SAVE UP TO 2.38 ON 2 I:, Cool Whip Whipped Topping................. 2FOR2.00 Assorted Varieties, 8-oz bowl . SURPRISINGLY LOW PRICE . Advantage Buy Ocean Spray Cranberry Sauce .99 ..Cranberry auce....................................99 Jelilea or v~i;,ue Berry, 16-oz can i SAVE UP TO .48 Pepperidge Farm Stuffing.................. ........... .. 2FOR4.00 Assorted Varieties, 14 or 16-oz bag (Limit four deals on selected advertised varieties.) SAVE UP TO 1.00 ON 2 Whether we're cooking or offering advice, we're experts at creating meals. If your wish is to enjoy a delicious, complete meal that you can simply heda and serve, order a Publix Deli Holiday Dinner-proudly featuring Boar's Head meats. For details, visit or pick up a Publix Deli Holiday Dinners brochure from your local store. Sweet Potatoes............... .. .491b Thanks to their fluffy texture and delightful flavor, . sweet potatoes are a sublime'Thanksgiving tradition. And they are excellent sources-of Vitamin C and *- Vitamin A. Cold can damage them, so don't refrigerate, but store in a cool, dry place-like your pantry-before whipping them out in time for turkey. SAVE UP TO .40 LB Treat your guests to this delightfuli_ version of traditional taste--a " yourself to less time in the kitchen ' Stovetop Sweet Potatoes 4 ." ^ Prep and Cook: 30 minutes (Makes 6-8 servings) 5 fresh large sweet potatoes (rinsed) 2 (14-ounce) cans chicken broth 1/4 cup butter salt and pepper, to taste 1 tablespoon cinnamon sugar (optional) 1. Peel sweet potatoes; slice into quarters and then cut into 1-inch chunks 2 Place in large saute pan; add broth. Cover and bring to boil on high. 3 Reduce heat to medium-high, cook 12-15 minutes, stirring occasionally, or until tender. 4. Drain potatoes and return to pan; stir in butter and sprinkle with cinnamon sugar. Serve. Make a deep horizontal cut int6 the beast meat just above the wihg. * , *< '.d r, ; .:.- t : Frcm the outer top edge of each breast, continue to slice from the top down to the horizontal cut made dunng the previous step. Repeat steps 4-5 on the other side. Remove wings by cutting through the joints where the wing bones, and backbone mree. Publix, # prone's u blix .co m /ads Prices effective Thursday, November 16 through Wednesday, November 22, 2006. Only in the Following Counties: Hillsborough, Pinellas, Pasco, Lake, Hernando, Citrus, Sumter, Polk, Highlands, Osceola, Lee, Collier, Manatee, Sarasota and Charlotte. Quantity Rights Reserved b"9"POYP~IT~---~-"-- rm~knlbl~poru~r~------ I ISA SAUDY OEBR1,20 IIO IRSCUT F)Qio Too few recruits After Vietnam, when the mil- itary was in disarray, it vowed never to let that happen again. In the last quarter of that war, the soldiers were putting "UUUU" on their helmet liners - an abbreviation for "the unwilling, led by the unquali- fied, doing the unnecessary for the ungrateful." The Army began fiscal year 2006 short 7,000 recruits, plus fewer delayed-enlistment com- mitments in the pipeline. Desperately, the Army low- ered its standards and raised bonuses. Previously prohibited tattoos on the hands or back of the neck are overlooked; gang member tattoos are also over- looked. Felons and even pris- oners are given waivers. Recruiters are actively looking for and pursuing ex-convicts. Previously unacceptable Neo- Nazi, skinhead gangs and racist militia members are showing up in the Army. After McVeigh, these types were weeded out of the military High school dropouts and those who have scored lower on the AFQT test are now enlisted. The lack of education and personal back- ground that would formerly preclude their enlistment is now deemed acceptable. Recently, in Oregon, an autistic youth who had been in special education classes his entire life was deemed worthy of enlist- ment until his family went to the press. In another case, they enlisted a man fresh out of a stay in a psychiatric hospital. Age is no barrier; enlistees can now be just short of 42 years. The Army brought back 14,000-plus from the Individual Ready Reserve. The Marines are calling up their IRR. Imagine an aged 50-plus out-of- shape lawyer from the IRR sent to war in Iraq! The Navy Reserve is being raided, too, and active duty sailors are sent to fight in Iraq; sailors do not get real intensive training for land warfare. Impressionable teens are so pressured that principals have asked the recruiters to ease up and parents have called a halt to them. Standards for promotion have been lowered, they are called "rubber-stamped." It should be interesting to see just what kind of a military we end up with this time. Meanwhile, civilians are donating for helmet liners and armor, and needed VA funding is not enacted. Marilyn J. Day Beverly Hills How wages work Again, the minimum wage has come along as a topic in the Chronicle. I have discussed this in past letters to the editor I will address it again for those who say phrases like "living wage." The minimum wage is for people starting out, the young inexperienced, the people who never got the skills or educa- tion to advance (this being their own fault), and those who have made bad choices in life. I, as a diehard Republican, believe that my or your work skills and ability should deter- mine the wages, not a politi- cian, especially one who is pandering to the hearts of peo- ple or to the attitudes of those who think the government should control and pay for everything. Why not question the morals of those who don't show up to work like they should, show up under the influence or do the bare minimum. But instead we question the morals of busi- nesses that struggle to stay competitive, because suppos- edly "all business is evil." I wonder: Do Democrats pay their employees more than Republicans? Instead of asking why employers don't pay more, why not ask what the employ- ees' part is in making the busi- ness more profitable. (Note: I don't condone any- one who pays under-the-table or pays illegals to keep from paying the proper wages.) In our house, we have two teenagers (male and female). He makes $7.50 an hour. She goes to school and does part- time work, and makes $6.75 an hour. Even though he makes. $7.50, he will eventually make more as he proves his skills or he will move on to better-pay- ing jobs. She is going to high school, working and going to trade school to get a skill. She will end up making more an hour than I, and have a skill that is marketable or that she can eventually start her own business with. This is the truth about minimum wage and what we Republicans believe in! That is why I vote Republican. Jimmie T. Smith Inverness Set an example Former Rep. Mark Foley's childhood experiences with a Catholic priest emphasizes the need for developmental processes of positive psycho- sexual development, as well as the negations involved in unhealthy experiences. Many in the mental health field recognize that a person's first sexual experience can be fixated on, and may condition sexual experiences the rest of one's life. Like all basic drives, sex is a strong factor in behavior, and requires understanding and structure, and acceptance of responsibility for actions. Back in the '40s and '50s, there was a movement called free love, and postulated that if people acted out sexual fan- tasies without restraints that there would be less personal and legal problems in our soci- ety. Obviously, this is untrue. Just as there is a need for parents and others to structure a child's maturation in regards to developing understanding of other behavioral systems such as moral values, so there is a definite need for psychosexual development, beginning in infancy and continuing for the rest of a person's life. Factors to be dealt with would include appreciation for one's body, for physical con- tacts with others, physical and psychological fixations, and certainly an acceptance that all personal and interpersonal actions have definitive results which might be either good or bad, and that personal respon- sibility needs to be taken for all sexual experiences. If Foley's allegations about being seduced by his priest is true, then this might very well have been the activity that trig- gered this man's developmen- tal structure and influenced him to perpetrate unhealthy sexual activity with many ado- lescents. The minimizing of such things as nudity, pornographic pictures, movies, e-mails, sexu- al conversations, inappropri- ate sexual activities of any kind, and a lack of respect for opposite sex members, etc., is totally unrealistic and detri- mental to the well-being of any child and any adult Parents take on substantial responsibility in bringing a child into this world, and then developing them into healthy and productive members of society. The best way to do this is by parents setting an exam- ple in all personal heterosexu- al activity. William C. Young Crystal River 'Rabidly partisan' Re: Douglas Cohn and Eleanor Clift Oct. 13 and Oct. 15. The above "Washington Merry-go-Round" columnists make no pretense of being nonpartisan; instead, the writ- ers are rabidly partisan! These two, are slavish spokespersons for the Drive-by-Media, dedi- cated full time to the bashing of a great American president, George W Bush. The country would be so much safer if only the Dem- ocrats and their willing accom- plices, the Drive-by-Media, loved America as much as they hate President Bush and what he represents. The Drive-by-Media is head- ed by the New York Times, Boston Globe, Washington Post, St Petersburg Times, Citrus County Chronicle, etc. What would be the accom- plishments of a perfect presi- dent? Among others: Success in war against ter- ror: 2,800 plus dead in New York in 2001. No attacks on Continental United States since! The battlefield is over- seas, in our present World War HI. Not on the soil of the USA! Lower taxes: Everybody takes home a bigger paycheck! Full employment: 3 per- cent unemployment rate in Florida; 4.6 percent unem- ployment rate nationally! Letters to the EDITOR Gasoline prices at an all- time low: Gasoline was avail- able in Macon, Ga., last week for $1.90 for regular! Low interest rates for home loans: Home buyers enjoy attractive rates in order to buy or build! General prosperity: The economy is booming. Com- munities struggle to deal with the growth! Sanctions against North Korea: U.N. Security Council voted unanimously to impose punishing sanctions on North Korea! The secular-progressive agenda is being thwarted by the God-fearing middle class, voting to retain the traditional America inspired by a perfect president, George W Bush. God bless America! Dennis Lown Crystal River Going on Vacation? Make a Donation With just one phone call to The Citrus County Chronicle, you can donate the credit for "stopped" papers while you're away to Citrus County Students. Your donationhelps. -* 9N C _ Make No Payments Until January 2007! Only valid on retail purchase prices. With approved credit. ..... .... 2007 VOLVO$23,498 S40 2.4 I SAVE: $2,687 Automatic, Power Windows, Power Locks CD Player, Volvo "On Call" Road Assist 2007 VOLVO 29,876 S60 2.5T SAVE: $4,794 Automatic, Leather, Sunroof, CD Player, 0Volvo "On Call" Road Assist 2007 VOLVO 37,945 XC90 SAVE: $5,280 All new 3.2 Engine, 7-Passenger, Leather, Sunroof *EPA HWY Miles, 2007 XC70: Not responsible for typographical error or omissions. Vehicles depicted may not be actual vehicle advertised. Offers expire date of publication. 2000 Lincoln 2004 TOYOTA 2004 CHRYSLER 2004 CHRYSLER 2003 VW 2005 TOYOTA 2004 VW Continental Matrix PT Cruiser Pacifica Passat Camry Beetle Convertible $7,999 $12,996 ,,13,998 $13,998 $13,999 $14,698 $14,999 2004 MAZDA Tribute $14,999 Ocala 4150 North HIghw, ^VOLVO^ ^ Not responsible for typographical error or omissions. Offers with approved credit See dealer for details. Offers expire date of p 2004 VOLVO 2005 NISSAN 2004ACURA 2006 PONTIAC XC90 Quest TL 3.2 Solstice $22,599 $22,599 $24,999 $26,655 2004 LEXUS RX330 $27,999 2006 LEXUS ES330 $32,599 HUE ELCTONOFPE-WND E ICE '0CKAND A FEEA AA PLS*MMBESHP IT EVER USE CAR U C ASE !3 e .aerfromltedtal Better off dead What a great country thesis - sometimes! A man murders a police officer and his dog, shoots another police officer and then runs away and hides in the woods. He is found and shot and killed and the family would like someone to investigate the incident because he was shot many, many times. What a shame that is! He should have been wound- ed, had a three-month trial, convicted of murder and spent 25 years on death row (which costs us taxpayers $30,000 per year per person). That would have been more receptive to his family because he was basically a good person. The world is better off this way Leroy W. Loveland Homosassa CaTKus CouNTY (FL) Ci-momcu~ 18A SA1.uRDAY, NOVEMDER 18, 2006 OPINION ^-U SATURDAY NOVEMBER 18, 2006 a NHL/NBA results./2B 9 College football./3B H NASCAR./3B * Golf results./4B * College basketball./5B * High school soccer./6B Sports BRIEFS Hurricane girls sink Selleview, 35-16 e Citrus girls basketball ta picked up its first win of the season and also got off to a ,good start in District 4A-6 with a .35-16 win over Belleview Friday night. Senior forward Rachel Fults led the Hurricanes with 14 points and Citrus coach Eli Jackson lauded her perform- ance aRachel showed a lot of ... gol ship," said Ja4json. "She kept us in it wpen it was still close." llFhe Hurricanes, now 1-2 o-thall and 1-0 in district, held a cant 15-8 lead at halftime, bj, ulled away for a double- dit victory over the Rattlers (0-2, 0-1)., . -Shanley Lawler contributed 5 points for Citrus, who resume plays 7:30p.m. Tuesday at hone against Dunnellon. Crystal River blasts West Port, 5-0 The Crystal River boys soc- cer team remained undefeated with a 5-0 win Friday at West Port. Richard Wilson scored twice for thePirates (3-0-1) and MAh hew Zarek, Nick Becker and Chris Fleming aadpd goal "We struck half," Crysti Cal~pway s adjustment kigspread balls just st net." t Crystal FR at 7,30 p.m em all ... &AI' "Copyrighted Material Syndicated Content Available from Commercial News Providers" Belleview strikes late against Citrus Rattlers 'goal provides 2-1 win over Hurricanes C.J. RISK cjrisak@chronicleonline.com Chronicle s. Five days left until ggled in the first Thanksgiving and already the al River coach Mike top three girls soccer tea ms in aid. "We made some District 4A-6 have clashed. s at halftime. The The one to emerge on top of i the ball out and the these early-season skirmishes arted going in the was Belleview, which used a goal scored in the final two iver hosts Lecanto minutes by Jenna Bach meyer river hosts Lecanto to edge host Citrus 2-1 Friday !. Monday. in a match every bit as com- I 4 W petitiveeas the score indicates Still, it's Belleview whieh went unbeaten in its first trip - through the two district final- ists from a year ago. The Rattlers beat Lecanto 3- 0, with the Panthers and Hurricanes then playing to a 3-3 draw a week ago. "That was big." said Belleview coach Gary Lefebvre. "We knew it would be a three-horse race in the m district and this game was as close as you could get. We just got a nice play here at the end and got it in." It was, as Le fe bvre described it, T that close. Each _side get- really ste ting chances to break it up in the open only to be thwarted. half. Belleview got on the board first, Che 'scoring on a Citrus g penalty kick 14 minutes into the match. Ali Shaw was taken down in the box by a Citrus defender and converted the PK to make it 1- 0. The Rattlers had two other strong scoring chances in the first half, but Hurricane keeper Kelsey Keating rose to the occasion on both. The second half showed a Citrus' Amber Jordan, right, fights Belleview's Kasie Cheney (22) for possession of the ball Friday night. change in attitude by Citrus. "The girls really stepped it up in the second half," said' Hurricane coach Charlie Gatto, his team now 3-2-1 overall, 3-1-1 in the district. We r e he girls rebuilding, we're trying to epped it get as much experience as Second possible." "For these kids, they're a young team arlie Gatto and a young iris soccer coach team makes mistakes. But I'm really very happy with their play tonight." It took Citrus just 90 sec- onds to even the match in the second half. It started with an attack from midfield through the Belleview defense, with Amber Jordan gaining pos- session of the ball for the Canes 30 yards out. Jordan slipped a pass through to Paige Verity, a freshman, and her shot got past Belleview keeper Katelyn Parlin to make it 1-1. That's the way it remained until those final fateful min- utes. With less than two min- utes left, Tori Sisto sent the ball into Bachmeyer, who managed to turn inside and keep the Citrus defender on the outside. Bachmeyer's shot got through Keating and the Rattlers had their win- ning margin. Asked if there was some- thing that gave his team the edge in this match, Lefebvre could not find anything spe- cific. "This game was just so close," he reiterated. Gatto would not disagree. "That was a great game," the Citrus coach said. Whatever the final reviews on the ability displayed, there's no argument that the district's early-season race is definitely in Belleview's con- trol. Illini women's soccer can't host NCAAs, head to FSU CHAMPAIGN, Ill. Illinois'first NCAA tournament seed in program history earned its women's soccer team an opportunity to host post- season play. But a year-old NCAA policy against the use of American Indian imagery in sport means the No. 3- seeded Illini (16-7-0, 8-2-0 Big Ten) will spend the entire tournament on the road, including a Sunday trip to visit Florida State (16-3-4, 5-2-3 ACC). "I think any time, in any sport, there's a home field advantage," Illinois coach Janet Rayfield said this week. "I think it was, from the beginning, something we knew was out of our control. We said we still wanted to be a top-12 team, even if that doesn't mean that we can play at home." In August 2005, the NCAA passed a policy prohibiting schools with American Indian imagery it con- sidered "hostile and abusive". Lecanto boys blast Dunnellon ALAN FESTO afesto@chronicleonline.com Chronicle The Lecanto boys' soccer team jumped out early on the Dunnellon Tigers and never looked back Propelled by two goals by Michael Burnett, the Panthers rolled to a 5-0 victory Friday night in Lecanto. "I think we did a lot of good things," Lecanto coach Doug Warren said. "I think we stayed focused during the first half and everyone worked hard." Burnett got the Panthers' first goal just five minutes into the match by powering a shot from 15 yards out to the left corner of the net for the 1-0 lead. Lecanto's second goal came two minutes later on a cross by junior Ryan Chapman. Noah Heinz got his head on the cross and barely squeezed it under the cross bar for the two-goal advantage. Burnett got his second goal of the first half on a feed from Derrick Smith. Burnett was one-on-one with the keeper and easily tapped it into the back of net "He's a, good player, he's quick, he has good ball skills," Warren said. "We rely on him to get us some goals and get us up and down the field." With the Panthers up 3-0, the Tigers dropped an extra man back on defense to stop the bleeding until the end of the half. However, just when things couldn't get any worse for Dunnellon, Smith was award- ed a penalty kick with just min- utes left in the half. Smith drilled it past the Tigers' keep- er to put his team up 4-0. T.J. East entered the second half as Dunnellon's keeper and kept the Panthers at bay, but not for long. Please see LECANTO/Page 6B Florida mnri plavini Mc 1w plentvon how Anaua "Copyrighted Material Syndicated Content mtar mae iftmrw a Miami Available from Commercial.News Providers" * 41 4w.......... 04 ~iI~p~aa~,sg~l~~ ...l. I X -"*qp a )O~TI off m - - a Im VI - *0 I. A0 a -.mo b -* 0 CO a - - mw 4- -lo -a aftlaw ONIM . .4m 4 4 -a d b lb 0 0opq - - -- d f 10 as tmm 0 % 0 * 40INW t im mp4 b 0 d l m e QUMI db-MO 1__am d_ a mo 0 1b w -e4 40 -Mb sa fomba D 1= lip 40 m um=, JlINI- -s,- w an- a n =m 044 :-Copyrng hte -Syndicated n c- 4- q *m 0R ua - go -.q pa-0 40 4w 0a-4w * -a- d Material .Content VAvailab le from Commercial News Providers"' =' e-a a" "" __- - 5- a *a- 0.~ a -~ - - - a _ a a - a. B - a a -~ ~- * a - a~ ~ a- S -00. 4w - a - - w a-f ob4M.- maam a a a - - a- ~ a -m 4b- -a a a - *a- a a * -OW 6 a. a S a- -. S S a - a a a * 0 ~ -~ - a~ - a - * a- - - S - S a- ~= - 0-a- - a a - - 05 - a -~ a -a - C - - a- - 0 * m Gomm& low 4 a Sam0 D o41 -a a - -a ~- a - * 5 B a - - a- - m a - a - -- --a a -5 ~ -0 p * - B a a 4-a a b 4fa a 0o a ~ Ba - wM ~m - ____ a mum -b 0 m * 0 * a - 0-~ a S - a - B - 00 - S - S * a - a qb b q Q - dom- - -t * o e 0 ;46 6 ~ a a a. -a -~ a ~ a. a. a.. a- a-- - al - a - a. a. - ~a. -a. -a a.- a. a. a. - a sos' legacyV ___r 0AN h P 4&V- am a ~. a - a-a.. ~a ~- - -a - -a a. - - Gb. - a a. C a -a -. * -a.. -a a a. .a ~a- - a. .49 a a. - -a. - a * a. a. a.. - a-SIR- - - a.0 - a. - a.. = -a * a. lo S : as Od M M a 1 QWa- qolka. a4m 400 a. AD 4= MUD4D a 04ft a. 4b dm m41 4M4 S o* a .a6 a. a - a. .. - a a a a. a a do do --om a aw- a a - 4000-0 a t ab a "a 0 mmmamw oam 4w 41 .a.d a.N a a. a - -Copyrighted .Material -- 'Y Syndicated Contenti.- Available from Commercial News Prov -Available from Commercial News Prov a -a - a. -a a a. a.. a a a. a- a a 406 - 4 * . 0* b- moba.40 -9om am 0 . 'Nmb0 w --p *Ago qb --a a- ow--me a am a -am. m ab al al swm% q a. la - -- -fa s-ldm 0h- a. a4 a - am&a a0.--q soel sb- a. mp - a a a. ap-Ma- ap- fomm -- m-OW a -now- q* 4w qa- 0 6 0 a ---40 -. a - a ~- a a-a a - -a- ~.- a. a. a00.-p b m-4am-- a.. a.- C.. a ~-a. a ~ a a. - - S aa a.- a.- - - a. a~ a-. a. -a- - ~ -a-a. .a. - ma-- a.- - -a a- a - - a. ** - - a.- a. a a. a.. a ___ * a. a a. a. - -a. * - a. a. a a a. a- a a. - aa. a. a C a a a ~ - a- - -0 a - a. a a. - a 0 O f a - * a a a- * -a- -- - ---a - -a -~ a. a a. ~ -a. - a- a a - - aa - aa - a a. - a - a. a a. a - a - a -~ a. -a - a...a. .d dm -b. 4w 4w- a GNP ~-oow- - am- 4a - - a. - a- m- .MW -4WD ..M- 4w - - a. -a a- * a. a a. a a. - a - a. a a a C a- a.- a a a- a. a. a- - a. - - a. 4. a. a - 0~s~ * a. a - b - 6 O - a. - 4 - - a - - a = a - - - - - -S -~ - a.~ C a. -- - a~. a. - - - a * - * a a. a - a - a.. - a a. a a- a. a - a. S a - - a- a a - 0Q - ** m a . O~- 0 - a a. * a - - w a- a .a a - - a. a - a- a. a- a * O o *S - -a a b a a a -1 a a.dm -M Aba. qup 4=00 a. - - a.- - aAft 0 a 40 aw-M.a4 pob.% -4ft a. a. if- a- a a. . * - a a - a. a. a a. a a a. a- * aa. a. - a a a. a - -. - aa - a.- - a 0 a a a a a a. --a a a.- - a - a. a a.- - a - -a - - a. - a -. - * a a. - - a. - a w o 0 L Q 4 o O e a ft o 6 -~UI 4B SArURDA CITRUS COUNTY (FL) CHRONI(I.E Y, NOVEMBER 1, 2006UUO GOLF Japan Tour-Dunlop Phoenix Leading Scores Friday At Phoenix Country Club Miyazaki, Japan Purse: $1.7 million Yardage: 6,901, Par: 70 Second Round Tiger Woods, US 67-65 132 P. Harrington, Ireland 67-66 133 Ian Poulter, England 70-64 134 S. Katayama, Japan 65-70 135 Justin Rose, England, 73-63 136 G. Frndz-Castano, Sp 66-72 138 Satoru Hirota, Japan 67-71 138 Scott Laycock, Australia 70-68 138 Wei Tze-yeh, Taiwan 72-67 139 Hisayuki Sasaki, Japan 67-72 139 K. Fukabori, Japan 68-71 139 Hideki Kase, Japan 70-69 139 Shigeru Nonaka, Japan 71-68 139 Tomohiro Kondo, Japan 71-68 139 Toshimitsu Izawa, Japan 67-72 139 Takuya Taniguchi, Japan 70-69 139 Koumei Oda, Japan 71-68 139 Shiv Kapur, India 70-70 140 Toru Taniguchi, Japan 72-68 140 Azuma Yano, Japan 70-70 140 K. Nakagawa, Japan 73-67 140 LPGA ADT Championship Friday At Trump International Golf Club West Palm Beach Purse: $1.55 million Yardage: 6,514, Par: 72 Second Round (x-won sudden-death playoff; players who failed to qualify earn $8,000) Ai Miyazato 68-69 137 -7 Julieta Granada 70-69 139 -5 Natalie Gulbis 70-70 140 -4 Karrie Webb i 69-71 140 -4 Wendy Ward 71-70 141 -3 II Mi Chung 69-73 142 -2 Paula Creamer 71-71 142 -2 Se Ri Pak 71-71 142 -2 Diana D'Alessio 72-71 143 -1 Jeong Jang 74-69 143 -1 Mi Hyun Kim 70-73 143 -1 Hee-Won Han 73-71 144 E Cristie Kerr 73-71 144 E x-Juli Inkster 73-72 145 +1 x-Lorena Ochoa 75-70 145 +1 x-Morgan Pressel 71-74 145 +1 Failed to Qualify Pat Hurst 72-73 145 +1 Brittany Lang 75-70 145 +1 Jee Young Lee 72-73 145 +1 Annika Sorenstam 74-72 146 +2 Lorie Kane 78-69 147 +3 Angela Stanford 74-73 147 +3 Brittany Lincicome 76-72 148 +4 Sophie Gustafson 73-76 149 +5 Stacy Prammanasudh 76-73 149 +5 Maria Hjorth 74-76 150 +6 Sun Young Yoo 79-72 151 +7 Meena Lee 76-76 152 +8 Candle Kung 77-76 153 +9 Seon-Hwa Lee 77-76 153 +9 SungAhYim 81-72 153 +9 Sherri Steinhauer 76-84 160 +16 Champions Q-School Friday At TPC Eagle Trace Coral Springs. Purse: $200,000 Yardage: 6,961, Par: 72 Third Round Boonchu Ruangkit 65-72-66 203 -13 Robert Thompson 70-67-71 208 -8 Perry Arthur 72-70-67 209 -7 Rod Spittle 67-71-71 209 -7 Doug LaCrosse 69-73-68 210 -6 Ray Stewart 74-68-69 211 -5 John McGough 71-69-71 211 -5 Graham Banister 68-72-72 212 -4 Harry Taylor 72-75-66 213 -3 Greg Hickman 70-71-72 213 -3 Bruce Vaughan 74-70-70 214 -2 Jerry Impellittiere 68-74-72 214 -2 Darrell Kestner 73-69-72 214 -2 Mike San Filippo 71-73-71 215 -1 Mike Blackburn 72-72-71 215 -1 John Ross 73-70-73 216 E Reed Hughes 74-75-68 217 +1 James Blair 71-74-72 217 +1 Frank Shikle 69-76-72 217 +1 Sebastian Franco 75-69-73 217 +1 Jon Fiedler 70-74-73 217 +1 Jim Sobb 73-71-73 217 +1 John Mazza 75-72-71 218 +2 Wayne Wright 73-74-71 218 +2 Mike Goodes 74-73-71 218 +2 Jim Chancey 76-74-68 218 +2 Mitchell Adams 70-75-73 218 +2 Don Reese 78-75-65 218 +2 David Thore 74-74-71 219 +3 Buddy Harston 75-73-71 219 +3 Steve Thomas 72-78-69 219 +3 Dave Narveson 76-69-74 219 +3 Adam Adams 74-72-73 219 +3 Steve Schwartzer 77-73-69 219 +3 Michael Turner 71-72-76 219 +3 Graham Gunn 71-72-76 219 +3 Roy Vucinich 74-74-72 220 +4 Mike Lawrence 75-72-73 220 +4 Jon Chaffee 78-69-73 220 +4 Rick R. DeWitt 71-78-71 220 +4 Tim Conley 74-75-71 220 +4 Jesse W. Allen 77-72-71 220 +4 Lindy Miller 71-74-75 220 +4 On the AIRWAVES TODAY'S SPORTS AUTO RACING 6 p.m. (ESPN2) NHRA Drag Racing Lucas Oil Sportsman Series. From Pomona, Calif. (Taped) (CC) 7 p.m. (TNT) NASCAR Racing Busch Series Ford 300. From Homestead-Miami Speedway in Homestead. (Live) (CC) BASEBALL 7 p.m. (47 FAM) Baseball Hawaii Winter League: Waikiki Beach Boys at Honolulu Sharks. (Taped) BASKETBALL 4 p.m. (ESPN2) College Basketball Wichita State at George Mason. (Live) 7 p.m. (FSNFL) College Basketball UT-Chattanooga at Florida. (Live) (SUN) NBA Basketball Charlotte Bobcats at Orlando Magic. From the TD Waterhouse Centre in Orlando. (Live) 7:30 p.m. (VERSUS) College Basketball California at San Diego State. (Live) BOXING 9 p.m. (IND1) Boxing Erik Morales vs. Manny Pacquiao. Erik Morales takes on Manny Pacquiao. From Las Vegas. (Live) (CC) FOOTBALL 12 p.m. (28 ABC) College Football Connecticut at Syracuse. (Live) (ESPN) College Football Maryland at Boston College. (Live) (ESPN2) College Football Michigan State at Penn State. (Live) (FSNFL) College Football Oklahoma at Baylor. (Live) (WGN) College Football Yale at Harvard. (Live) (CC) 12:30 p.m. (38 MNT) (51 FOX) College Football Tennessee at Vanderbilt. (Live) 2:30 p.m. (2 NBC) (8 NBC) College Football Army at Notre Dame. (Live) (CC) 3:30 p.m. (6 CBS) (10 CBS) College Football Auburn at Alabama. (Live) (CC) 3:30 p.m. (9 ABC) (20 ABC) (28 ABC) College Football Michigan at Ohio State. (Live) (CC) 3:30 p.m. (FSNFL) College Football Kansas State at Kansas. (Live) 3:30 p.m. (VERSUS) College Football San Diego State at Texas Christian. (Live) 7 p.m. (ESPN2) College Football Virginia Tech at Wake Forest. (Live) (CC) 7:45 p.m. (ESPN) College Football Rutgers at Cincinnati. (Live) (CC) 8 p.m. (9 ABC) (20 ABC) (28 ABC) College Football California at USC. (Live) (CC) 9 p.m. (FSNFL) College Football Washington at Washington State. (Live) (Joined in Progress) 10:15 p.m. (FSNFL) College Football UCLA at Arizona State. (Live) GOLF 2 p.m. (GOLF) LPGA Golf ADT Championship Third Round. From West Palm Beach. (Live) (CC) 9:30 p.m. (GOLF) Golf Dunlop Phoenix Open Third Round. (Same-day Tape) 1 a.m. (GOLF) European PGA Golf UBS Hong Kong Open - Final Round. From Hong Kong. (Live) TENNIS 10 p.m. (ESPN2) ATP Tennis Masters Cup Semifinals. From Shanghai, China. (Same-day Tape) (CC) Kevin King Chris Starkjohann Jim Prusia Jose Rivero Doug Johnson Gregg Jones Rqn Stelten D id Thompson Nevin Sutcliffe Bill Loeffler Jerry Tucker Victor Tortorici Joe Stansberry Gordon Brand Mark Peel Delroy Cambridge Randy Nichols Nick Job Pat McDonald Rick Rhoden Kip P. Byrne Jack Spradlin Michael O'Conner Tom Costello III Stan Stopa TR. Jones Ken Kellaney Brian Sharrock Bob Cameron Gary Trivisonno Mark Gurnow Frank Apodaca Bob Ralston Cary Hungate Paul Parajeckas Mo Guttman Ron Kilby James M. Becker Jack Jackson Glen Jevne Jimmy Hill 72-71-77 -220 +4 73-77-71 221 +5 74-71-76 -221 +5 72-72-77 221 +5 76-72-74 222 +6 72-76-74 222 +6 77-70-75 222 +6 73-74-75 222 +6 76-72-74 222 +6 73-74-75 222 +6 73-73-76 222 +6 74-72-76 222 +6 77-73-72 222 +6 74-78-70 222 +6 77-71-75 223 +7 76-73-74 223 +7 72-74-77 223 +7 73-72-78 223 +7 74-77-72 223 +7 75-78-70 223 +7 77-71-76 224 +8 73-75-76 224 +8 72-78-74 224 +8 75-76-73 224 +8 76-74-75 225 +9 76-77-72 225 +9 76-78-71 225 +9 80-71-75 226+10 79-72-75 226+10 75-77-74 226+10 76-77-73 226+10 76-75-76 -227+11 78-74-76 228+12 77-75-77 229+13 78-76-75 229+13 83-72-74 229+13 79-76-74 229+13 77-76-77 230+14 79-76-75 230+14 75-73-83 -231+15 79-73-83 235+19 BASKETBALL Thursday's College Basketball Scores EAST Binghamton 74, Niagara 66 Towson 69, Samford 62 SOUTH Bethune-Cookman 67, Florida Tech 59 Campbell 83, Coastal Carolina 63 Charleston Southern 72, The Citadel 63 Duke 75, UNC Greensboro 48 Florida 90, Jacksonville 61 Georgia Tech 103, Georgia St. 74 Memphis 111, Jackson St. 69 Murray St. 73, Belhaven 72 Savannah St. 68, Savannah Art 35 Southern Miss. 77, Tenn.-Martin 67 Wofford 96, Union, Ky. 84 MIDWEST Idaho 74, S. Dakota St. 66 Missouri 89, Lipscomb 69 SOUTHWEST Arkansas St. 64, Bowling Green 54 Oklahoma 74, Liberty 48 Texas A&M-Corpus Christi 90, Texas Coll. 53 UTEP 80, UC Davis 76 FAR WEST San Diego 74, Point Loma 51 South Carolina 80, Southern Cal 74, OT TOURNAMENT 2K Sports College Hoops Classic Semifinals Maryland 92, St. John's 60 Michigan St. 63, Texas 61 BP Top of the World Classic First Round Troy 84, Rhode Island 78 Weber St. 71, Alaska 66, OT College Basketball Schedule All Times EST Today EAST CenConn St. at New Hampshire, Noon Hartford at Army, 1 p.m. Rider at Boston U., 1 p.m. Mount St. Mary's, Md. at La Salle, 1 p.m. Fairleigh Dickinson at Seton Hall, 1 p.m. Colgate at Dartmouth, 2 p.m. Hofstra at Manhattan, 2 p.m. Oakland, Mich. vs. Northeastern, 2 p.m. Drexel at Vermont, 2 p.m. Siena at Holy Cross, 3 p.m. Maine at St. Francis, NY, 4 p.m. Canisius at West Virginia, 4 p.m. Massachusetts at Pittsburgh, 5 p.m. CenArk vs. Mississippi, 5:30 p.m. N.C.-Asheville at Duquesne, 7 p.m. Valparaiso at Niagara, 7 p.m. Florida Gulf Coast at Penn, 7 p.m. Brown at Providence, 7:30 p.m. Fairfield vs. UConn, 8 p.m. Lock Haven at St. Francis, Pa., 8 p.m. SOUTH Northwestern St. at Louisville, Noon UMBC at Hampton, 1 p.m. LA College at McNeese St., 2 p.m. Alabama St. at Southern Miss., 3 p.m. Wichita St. at George Mason, 4 p.m. Valdosta St. at Georgia, 4 p.m. Wagner at Md.-Eastern Shore, 4 p.m. Chattanooga at Florida, 7 p.m. Emory at Mercer, 7 p.m. Winthrop at Mississippi St., 7 p.m. ECarolina at UNC-Greensboro, 7 p.m. Stetson at UCF, 7:30 p.m. Wofford at Jacksonville St., 8 p.m. William Carey at SE Louisiana, 8 p.m. Charleston Southern at Tulane, 8 p.m. Paul Quinn at Alabama A&M, 8:30 p.m. MIDWEST E. Michigan at Marquette, 2 p.m. Cleveland St. at Evansville, 6 p.m. III.-Springfield at Butler, 7 p.m. Belmont at IUPUI, 7 p.m. Detroit at Kent St., 7 p.m. Miami vs. Buffalo in Ind., 8 p.m. Tennessee Tech at Kansas St., 8 p.m. Creighton at Nebraska, 8:05 p.m. SOUTHWEST Monmouth, N.J. at Houston, 3 p.m. Stephen F.Austin at Arkansas, 3:05 p.m. Texas St. at Texas-Pan American, 5 p.m. Lyon at Arkansas St., 5:05 p.m. Lamar vs. Saint Louis in Texas, 5:30 p.m. Dayton at SMU, 8 p.m. Texas-Arlington at TCU, 8 p.m. Louisiana Tech at Texas A&M, 8 p.m. North Texas at Rice, 8:05 p.m. Ark.-Little Rock at Tulsa, 8:05 p.m. FAR WEST Saint Mary's, Calif. at USC, 3 p.m. Portland St. at Arizona St., 4 p.m. MontSt.-Northern at ColoSt., 3:05 p.m. Pepperdine at CS Northridge, 5 p.m. Hope Int. at UC Riverside, 7 p.m. California at San Diego St., 7:30 p.m. Air Force at Colorado, 9 p.m. UAB at Wyoming, 9 p.m. Great Falls at Utah Valley St., 9:05 p.m. Idaho St. at BYU, 9:30 p.m. S. Utah at Boise St., 9:35 p.m. Utah at Santa Clara, 10 p.m. Lewis-ClarkSt at EWash, 10:05 p.m. Ark.-Pine Bluff at Nevada, 10:05 p.m. TOURNAMENTS BP Top of the World Classic At Fairbanks, Alaska Semifinals Weber St. vs. Troy, 4 or 9:30 p.m. Utah St.-Centenary winner vs. SE Missouri-Drake winner, Mid Consolation Bracket Alaska vs. Rhode Island, 4 or 9:30 p.m. Utah St.-Centenary loser vs. SE Missouri-Drake loser, 6:30 p.m. FIU Tip-off Classic At Miami Third Place, 7 p.m. Championship, 9 p.m. Paradise Jam At St. Thomas, Virgin Islands Consolation Bracket Alabama-Middle Tennessee loser vs. Toledo-Iowa loser, 6 p.m. Xavier-Va. Commonwealth loser vs. Villnva-Coll. of Charleston loser, 8:30 p.m. Sunday EAST UMass vs. N'eastern PA, 2 p.m. St. Thomas Aquinas at Rutgers, 2 p.m. Bucknell at Saint Joseph's, 2 p.m. Navy at Stony Brook, 2 p.m. Sacred Heart at Lehigh, 3:30 p.m. Florida Atlantic at Marist, 4 p.m. Oakland, Mich. at Pittsburgh, 5 p.m. CenArk vs. Fairfield at Hartford, 5:30 p.m. Old Dominion at Georgetown, 6 p.m. Mississippi vs. UConn at Hartford, 8 p.m. SOUTH Gardner-Webb at North Carolina, 1 p.m. Concordia, N.Y. at North Florida, 1 p.m. Wright St. at Coastal Carolina, 2 p.m. Winston-Salem at Georgia St., 2 p.m. ETSU at Auburn, 3 p.m. Lipscomb at South Carolina, 3 p.m. Morgan St. at Virginia, 3 p.m. Tennessee St. at W. Kentucky, 3 p.m. Louisiana-Monroe at LSU, 4 p.m. Southeastern, Fla. at SavnnhSt, 4 p.m. Coppin St. at Tennessee, 4 p.m. New Orleans at Florida St., 5 p.m. MIDWEST Prairie View at Ball St., Noon Tiffin at Akron, 2 p.m. Furman at Bowling Green, 2 p.m. Miami vs. Cleveland St. at Ind., 2 p.m. Chicago St. at Indiana, 2 p.m. Norfolk St. at Iowa St., 2 p.m. Davidson at Missouri, 2 p.m. Yale at Ohio, 3 p.m. Ill.-Chicago at Bradley, 3:05 p.m. Murray St. at S. Illinois, 3:05 p.m. Buffalo at Evansville, 4 p.m. Indiana St. at IPFW, 4 p.m. The Citadel at Notre Dame, 4 p.m. Delaware St. at Missouri St., 4:05 p.m. Florida A&M at Illinois, 5 p.m. Southern U. at Wisconsin, 5 p.m. Wis.-Milwaukee at N. Iowa, 5:05 p.m. UMKC at Cent. Michigan, 6 p.m. Slippery Rock at Y'ngstownSt, 7:05 p.m. Towson at Kansas, 8 p.m. SOUTHWEST Lamar vs. LATech at Texas, 4 p.m. Sam Houston St. at Oklahoma St., 4 p.m. Saint Louis at Texas A&M, 6:30 p.m. FAR WEST N. Colorado at Denver, 3 p.m. New Mexico St. at Arizona, 4 p.m. Sacramento St. at Washington, 4 p.m. UC Davis at Portland, 5 p.m. CSBkrsfld at LoyMarymount, 6:05 p.m. Montana St. at Idaho, 7 p.m. Texas-San Antonio at Gonzaga, 8 p.m. Oregon St. at Hawaii, 10:05 p.m. TOURNAMENTS BP Top of the World Classic At Fairbanks, Alaska Seventh Place, 2, 4:30 or 7:30 p.m. Fifth Place, 2, 4:30 or 7:30 p.m. Third Place, 4:30 or 7:30 p.m. Championship, 10 p.m. Paradise Jam At St. Thomas, Virgin Islands Semifinals Alabama-Middle Tennessee winner vs. Toledo-Iowa winner, 6 p.m. Xavier-Va. Commonwealth winner vs. Vllnva-Coll. of Chrleston winner, 8:30 p.m. ON THIS DAYvlri Broncos passes for 445 yards and two touchdowns in a 42-34 loss against th Kansas City Chiefs. 1978 Vanderbilt's Frank Mordica rush- es for 321 yards and five touchdowns in a 41-27 victory over Air Force. Mordica scores on runs of 48, 30, 6, 70 and 77 yards. 1990 Monica Seles captures the first five-set women's match since 1901, defeat- ing Gabriela Sabatini 6-4, 5-7, 3-6, 6-4, 6-2 in the final of the Virginia Slim Championships. i 1995 Iowa State's Troy Davis becomes the fifth player in NCAA Division I-A to rus$ for 2,000 yards, reaching that plateau in. a 45-31 loss to Missouri. 1995 Alex Van Dyke sets an NCAA record for most yards receiving in a season, catching 13 passes for 314 yards-as Nevada beats San Jose State 45-28. Van Dyke raises his total to 1,874 yards, sur- passing. Friday's Sports Transactions . BASEBALL American League BOSTON RED SOX-Agreed to terris with INF Alex Cora on a two-year contract. DETROIT TIGERS-Agreed to tennis with RHP Craig Dingman, LHP Tim Byrdak, LHP Vic Darensbourg, C Steve Torrealba, INF Mike Hessman, INF Kevin Hooper and OF Jackson Melian on minor league contracts. V OAKLAND ATHLETICS-Named Bob Geren manager. TEXAS RANGERS-Agreed to terms with RHP Franklyn German, INF Ramon Vazquez, LHP Matt Merricks and INIF David Matranga on minor league con- tracts. TORONTO BLUE JAYS-Agreed, to terms with DH Frank Thomas on a tw - year contract. National League CHICAGO CUBS-Announced the res- ignation of Sharon Pannozzo, director, of media relations, effective Dec. 31. NEW YORK METS-Agreed to terms with INF Damion Easley on a one-year contract. _t' PHILADELPHIA PHILLIES-Agreed- to terms with INF Wes Helms on a two-year contract. FOOTBALL National Football League BUFFALO BILLS-Signed TE Brad Cieslak from the practice squad. SOCCER Major League Soccer ' FC DALLAS-Acquired M-D Adrian Serioux and a 2007 MLS SuperDraft pick from Toronto FC for M Ronnie O'Brien. COLLEGE NCAA-Declared Charlotte freshman men's basketball C Phil Jones ineligible-." GEORGIA-Reinstated men's basket- ball F Takais Brown. Categorlos Bast Overall $100 and cover of festival special section K-2nd Grade 1at $25 2nd and 3d placo awards 3rd-5th Grado 1at $25 a,. .Isr. Gade Judging Criteria Judging will be based on the entries' creativity, artistic presentation, and the Impact of the message presented. All entries must be received at the Citrus Chronicle's Meadowcrest office by 4:00pm, Friday, December 8, 2006. All entries become property of the Citrus County Chronicle. I Name School Grade Age-I ------------------------------- -- ------- -- --- I I SPORTS .y,~~ NOEBE ->nn.og f - %\v 4 AMT 0 J - 0 w- -- - a Q il 4 q mm - mdopdm4 41 4b41 000ab - jeb se~ lb mm * ftm1 a I -m Amp -f - 4w a - a Gio - * a 0 - * a -OR. w AW .lo a a d 4w W -*- 4w- Ab qN Aa -"Copyrighted Material- Syndicated Content.-- - -- -c a = 0- W aG - a. - a - a - * a ~ m ~. Available from Commercial News Providers" 0 - -a Wa 40-a 4b- ft- - amw ___ 0 - d-~ *6 a - -a - * ___ -a - a - a - a a a a a a a ___ -a - - - a - a *wldi a- - - a. - a. a - a - ___ a - a. -- w-a - a a - -a 0 a- a a - a - S ~ - * ~,. Q. - - a - a 4 -1 - 0 - - a 0 - - a - a ~ a GN- 4 * a .a.. a. a * a *.- a * a - -a. - -D 0l do- a 41 a - d 4 w ip w -p 4m o S a S -a a S 0~ a- - S * -a *0 'I- -00 - -a a - a mi mommu --ft o o - 0 w o Q - A . o o o m 4 ab alt AACm m pm L ~1)11 GB SAUURDA.Y, NO~'FMBER 18, 2006 SPORTS CuRus COLJNfl' (FL) CHRONICLE West Port blanks Pirates MICHAEL SHELTON For the Chronicle Fresh off its first win of the season, Crystal River's upstart girls soccer team was quickly brought down to earth. Ocala West Port invaded Pirate Stadium and left with a 3-0 victory Friday night in a measure of payback for the Wolfpack. "Last year this team blew us out 8-0 and we had no discipline," West Port's first year head coach Chris Dunham said. "Now their coaches are saying they can't believe how much we've turned this thing around." The Pirates (1-4, 1-3 District 4A-6) were coming off an 8-0 win over North Marion on Tuesday, but the injury bug bit them once again. Senior midfielder Ashton O'Sheen fell victim to a sliding tackle on the left wing outside the West Port box late halfway through the second half and had to be taken out on a cart. "Her hip might be out of place and she will be taken to the emergency room tonight," Crystal River coach Bill Reyes said. Junior defender Megan Miljure was also absent due to sickness, but senior midfielder Cailin McGhan returned to the lineup and earned a free kick in the 26th minute. Junior forward Kayleigh Pollert also played despite a bad ankle. But the Wolfpack (3-3, 2-1) struck just two minutes into the game after Yuri Palhof fouled Natalie Martin just out- side the box. Martin's ensuing free kick went off the top of the crossbar, but Mackenzie Hallahan headed in the rebound I West Port. Martin added the other two goa including one from just outside the t of the box in the 16th minute. The Pirates had opportunities of th own, managing nine shots on goal, b were also hesitant to take shots at tim They also struggled with ball conti against the'aggressive Wolfpack. "There's a lot of minor details have to work on," Reyes said. "We ha to communicate better and outhus opponents but the other skills will ta time." Sophomore Brittany Dehoff h seven saves in goal for the Pirates wh Lilly Rymer countered with nine I West Port. Crystal River returns to acti Monday against county rival Lecanto. ro sentenced in UF death -- - re. . aCopyrighted Material- ~ I" .- Syndicated Content Available from Commercial News Provider S- - _ Panthers tame Dunnellon, 3-0 op STEVE MCGUNNIGLE For the Chronicle eir ut Dunnellon girls soccer coach es. Ron East knows he has his rol work cut out for him, and that it all starts from the back of the we field on up. So it was a step in ve the right direction for the tle Tigers when they hosted ke Lecanto, who promptly put on an offensive clinic and tested ad Dunnellon's defensive forti- ile tude for the duration of the for game. The Panthers defeated the on Tigers 3-0 at Ned Love Field in Dunnellon Friday night, with the third score coming in the final minute of the game, as Lecanto maintained complete h control of possession and out- shot Dunnellon 26-2. But both coaches pointed to an aggres- sive, though young, Tigers defense to keep the score respectable. Said Lecanto coach Kevin Towne,"I don't think we played our best game, but I think that's a tribute to Dunnellon playing a great game. Their goalie palyed a spectacular game, and their defense played tough." Lecanto's Natalie Burnett scored twice, on assists from Lena Ramirez in the first half and Denice Aleman just prior to the final whistle. Maggie Mueller's goal less than two S minutes into the second half, assisted by Burnett, gave Lecanto a 2-0 lead. Burnett controlled possession up the right side of the field into the _ attacking zone, and found Mueller cutting to the middle. Mueller patiently danced around Tiger defenders within the penalty box before sending a low shot into the left corner. But that was all the Panthers (3-1-2, 3-1-1 in District 4A-6) could muster until Burnett's second score at the end, as Dunnellon (1-3-0, 1-2-0) fought off the brunt of 16 Lecanto shots on goal in the second half. Beyond their defensive end, however, the Tigers were stifled. Said East, "(Midfielder) Kasey Fagan was very, very strong in the middle. She was lacking a little help and didn't have the angles to pass the ball around, so a lot of times she had to hold onto the ball and make space for herself." Dunnellon freshman goal- keeper Whitney Mast came up big with 17 saves and some smart play coming out of the box as needed, to help the Tigers' cause. "This is her first year playing in goal, and she's doing a tremendous job", said East. "She still has to work on some fundamentals, but she's got great reflexes." Lecanto's first score caime'hi the 13th minute, as Burnett lay in waiting on the right wing, going unnoticed while Ramirez set up the offense up top. Ramirez led a pass through to Burnett, who drib- bled deep into the box and fired to the open left side of the net against a drawn-out Mast Burnett's goal in the closing moments came off a long feed from Aleman in the defensive end, as Burnett again approached the box untouched and scored easily. - i -- - LECANTO Continued from Page 1B With 22 minutes remain- ing in the game Lecanto forward Troy Deem lined up for a corner kick that found its way to the front of the, net... Tanner Summers, got just enough of the ball to get it to Tyler Deem who put it way from point blank range. Five minutes later, East was given a red card for unsportsmanlike conduct, leaving the Tigers a man down for the remainder of the match. With the game out of hand Warren was concerned about the way his team was begin- ning to perform. 'People start trying to do things that they don't normal- ly do," Warren said. "We just try and keep the focused on playing the game we want them to play." Lecanto began ripping shot after shot at the Dunnellonl keeper but all came up empty. The inability of Warren's team to finish when they get the chance is a con- stant concern. "We just can't seem to find the back of the net at times," Warren said. Lecanto will be back in action Monday night at 7:30 p.m. at Crystal River. UL WALK ON SPECIAL Greens Fee 1:00 pmrt $7f+ to close + tax nj ,, o S'2o T OB sjvruRDAY, NovrMBEI;R 18j, 2006 SPORTS Ca-Rus CoLjNiy (FL) CHRONICEE J- I E V E N T - - a - dp dib C SATURDAY NOVEMBER I 8, 2006 w n, cmnoncleonlne CJ.T. Nancy Kennedy GRACE NOTES WALTER CARLSON/Chronicle Members of Link Ministries usually begin their service with a song and prayer service. Link Ministries is associated with the Gulf to Lake Church. Senior pastor Lloyd Bertine credits youth minister Jeff Hall with doubling the number of youths involved In the youth ministry to about 240. Youths make the 'Link' Minister uses pop culture to draw teens KHUONG PHAN kphan@chronicleonline.com Chronicle When Lloyd Bertine, senior pas- tor of Gulf to Lake Church in Crystal River, thinks about his personal experience growing up in church youth groups, he doesn't exactly sing their praises. "I didn't want to go as a kid," he said. "It was so boring." Well, Bertine certainly doesn't have to worry about boring the teens in his congregation now. Gulf to Lake's student ministry program, titled "Link," focuses on youths from sixth to 12th grade and delivers the word of God on Sunday nights in booming surround sound and with the help of hip-hop dancers. "It's really fun with the music, the fog machine and everything," sev- enth-grader Nick Edmonds said. The new programming of the stu- dent ministry began when the church realized it had a problem, Due to an increase in Gulf to Lake's children's ministries taking much more space, the church's teen- based student ministries needed a place to go. Bertine said that when the issue was posed to parishioners, every- one answered in force and they were able in January to procure an approximately 14,000-square-foot space directly across the street from the church. But that wasn't quite enough. Instead of relying on part-time staff for the student ministry as it had in the past, the church in June landed 32-year-old Jeff Hall, an energetic, passionate full-time youth pastor. "I've been in this for 28 years and I've never seen a youth pastor like him," Bertine said. "He has a heart for kids. He loves them." Bertine credits Hall with dou- bling Gulf to Lake's student min- istry to its current number of 240. Typically, Sunday Link services have about 100 youths in atten- dance. "I just marvel at it," Bertine said. "I just sit in the back and I just think, 'This is the way it ought to be."' In August, Hall launched Link and transformed the space into more of a hangout The facility now boasts a game room, cafe, worship center that is like a concert venue and the facility will soon have a dance studio, which will be run by Hall's wife, Shannon. "It's fun coming here every Sunday," Wes Lanier, a Crystal River High School junior something fun, safe and on the weekends." With the high-tech eqi such as sound and lig computers and video pro. teams Bertine estimate church has spent appI $50,000. He believes that well spent "We just want to get t we can," Bertine said. " so many pressures that with on the outside. We w them a safe place where hear about morals and character in a setting them on, with the loud fog machine, the games and everything else. We j reach kids." We want to give them a safe place where they can hear about morals and values and character ... The Rev. Lloyd Bertine senior pastor of Gulf to Lake Church Outreach. isa topic that Hall hit r, said. "It's on over and over again during his clean to do interview for this story. "It's kind of a group that's left out uipment there," he said of the teens in the ,ht boards, program. "They expect the school jection sys- system to take care of them or they es that the just kind of grow up on their own. It roximately gives us an opportunity at an age it's money where they're really searching and looking for a direction for what hem while they're going to do to help them, They have encourage them and just be a posi- they deal tive influence." rant to give The mission of the ministry is to e they can "link" these kids to Jesus. To drive values and the point home, Hall even gives his that turns students a keepsake chain link music, the every week to remind them of com- s, the food mitments that they have made. ust want to Please see LINK/Page 7C Special EVENTS Come sale away There will be a churchwide and neighborhood yard sale from 8 a.m. to 2 p.m. today at Victory Baptist Church, 5040 Shady Acres Drive, Inverness. Baked goods will also be sold. Find items for the Christmas gift-giving season at the annual yard sale from 8 am. to 3 p.m. today at Vineyard Christian Fellowship, 960 S. U.S. 41, Inverness. Call 726-1480. The Joy Circle of Yankeetown Evangelical Community Church will have a yard and bake sale at 8 a.m. today. The church is 1.7 miles west of the lightatat U.S. 19 and StateRoad 40. The United Methodist Women and the United Methodist Men of Floral City United Methodist Church will host a "used treas- ures" sale from 8:30 a.m. to noon today in Hilton Hall. The church is at 8478 E. Marvin St. Call 344- 1771 for information. Parsons Memorial Presbyterian Church will have its annual fall yard and bake sale fundraiser from 8:30 a.m. to 2:30 p.m. today in the fellowship hall, 5850 Riverside Drive, Yankeetown. The Holidaze Crafters of Hernando United Methodist Church will continue their fall craft sale from 9 a.m. to 5 p.m. today.. Items donated are tax deductible. The store is accepting donations of household goods, clothing and small appliances. Pick-up is available.. Gobble turkey Kingdom Empowerment Church is hosting a "King's Table" Thanksgiving basket giveaway today at the corner of State Road 44 and N.E. 5th Avenue in Crystal River. Two hundred family-sized baskets "stuffed" with turkeys and canned foods to complete a tradi- tional Thanksgiving meal will be given away. To make a donation, call Outreach Director Kendal Martin at 563-5327. The Christian Kitchen will serve its next meal at noon Tuesday in the Parish Life Center of Our Lady of Grace Church, 6 Roosevelt Boulevard, Beverly Hills. Doors will open at 11:45 a.m. To make or cancel reservations, call the parish office at 746-2144. Food is prepared based on reservations. Free-will donations are accepted. N A community Thanksgiving Day meal is offered from 11:30 a.m. to 2 p.m. Thursday at New Beginnings Fellowship, 2577 N. Florida Ave. (U.S. 41), Hemando. For transportation, call 613-1162. The dinner is free. Vineyard Christian Fellowship will serve a free Thanksgiving Day lunch at noon. Come give thanks with new people and have a home-cooked meal. Volunteers are needed. Call 726- 1480. The church is at 960 S. U.S. 41, Invemess. Unity Church of Citrus County will host its annual Thanksgiving Day celebration din- ner at 1 p.m. Thursday. All are wel- come. Call 746-1270 to sign up and bring a dish to compliment the traditional turkey which will be pro- vided by the activities team. Victory Baptist Church will sponsor a free Thanksgiving Day turkey dinner with all the trimmings at 1 p.m. Thursday. Everyone is invited. The church is at 5040 Shady Acres Drive, Inverness. Directions: Go north on U.S. 41 to Sportsman's Point Road, turn right and follow the signs, Reservations required; call 726-9719. There is no charge and no offering will be taken. St. Anne's Episcopal Church will serve a Thanksgiving dinner to those in need from 11:30 a.m. to 1 p.m. Saturday, Nov. 25. Foodbox giveaway Church Without Walls of Inverness Ministries will have its annual Thanksgiving foodbox give- away today at Super Wal-Mart in Inverness. One foodbox will be given per family from 9 a.m. until supplies run out. Bring proof of Citrus County residency, picture ID or driver's license. Call the church at 344-2425. Please see EVENTS/Page 6C Hungry for some answers As my friend Tara and I sat in a Thai restau- rant, the irony was not lost on either of us. Tara heads the mercy min- istry at our church and her "baby" is the Harvest pro- gram that provides food for those in need. We met to talk about feeding the hungry - as we stuffed ourselves with pad thai noodles. In this week's Chronicle, we ran a series of stories for a project we called Scant Harvest about the big prob- lem of hunger in our com- munity. We, the well-fed, writing about who? I'm speaking for myself here, but I don't know any hungry people personally That bothers me, and that's one of the things Tara and I talked about When she first took this job, she thought of the poor much like I still do as projects. Let's give them our cast-off cans of beets and green beans so we can feel good about ourselves. I hate 'thinking like that, but the more I hang with Tara the more I feel my heart changing. She is mov- ing toward loving and valu- ing them aspeople, notprojects, Please see GRACE/Page 6C Judi Siegal JUDI'S JOURNAL Giving thanks - from a Jewish view ewish people, it seems, are very fond of four- letter words. They appear to spring up every- where, peppering our speech, spicing up our litur- gy and even our sacred writ- ings. We seem to take them very much for granted, and they have become an accus- tomed part of our lifestyle. One word in particular comes to mind, for it has per- sisted throughout Jewish life and it bears mention, as it is most appropriate for this season of the year. The term I refer to is the Hebrew "todah," (a four-let- ter word in Hebrew nota- tion) which means "thank you." For the Jew, thanking the creator is as natural as wak- ing up in the morning, for Please see RELIGION/Page 6C 3s. .LIBERTY ANTHEM PURSUIT. VILLAGE CADILLAC TOYOTA 2431 Sunceat Blvd, Us Hwy 19 *Homosasa, FL 34448 352-628-5100 ....:Plw kl-hrlh imm l ,gi /p.glL^ ^^ ^ ^ B 2006 CADILLAC EXECUTIVE - rT Calendar ofEVENTS "' leAt "Oh, I couldn't possibly eat dessert. Well, maybe I could." Iewilller~e egtr want to serve each sice with a dollop of fresh whipped cream, oze yogurt" Or even a slice of great cheddar cheese. Mmmmmm. RESISTANCE IS FUTILE. Open the oven, and out wafts a warm cloud of sweet cinnamon, It's time for pie. Wholesome, authentic, and utterly irresistible Pubiix Bakery Apple Raisin Walnut P. REALLY, TRULY TASTYe What should an apple raisin walnut pie be made of? Of course: fresh apples, sweet raisins, and rich walnuts. There's just no need for artificial colors and flavors here: Mother Nature made the ingredients perfectly delicious. English walnuts. - The raisins and nuts both come from California, where the Mediterranean climate yields ideal results. THE WRAPPING IS PART OF THE to appreciate our restraint. AS EASY AS PIE. To enjoy this marvelous masterpiece, you won't need to peel apples, chop walnuts, or roll dough. Just come see us at the Publix Bakery. P U B L I X edstabshecd 1957 686873 ' 2C SArURDAY, NOVEMBER 18, 2u00 CITRUS COUNTY (FL) CHRONICLE 8, -- SAFIURDAY, NOVEMBER 18, 2006 3C Places of worship that offer love, peace and harmony to all. ICome on over to "His" house, your spirits will be lifted!!! I SERVICING THE COMMUNITIES OF CRYSTAL RIVER AND HOMOSASSA THE SALVATION* AR CnCITRUS COUNTY CORPS. SUNDAY: Sunday School 10 A.M. Morning Worship Hour 11 A.M. TUESDAY: Home League 11:45 A.M. WEDNESDAY: Bible Study 12:00 NOON Captain John Fuller Grace Bible Church Sunday 9:30AM..............Sunday School 11:00 AM..............Worship 6:00 PM............... Evening Service 7:00 PM................Youth Group Nursery Provided Monday 6:15-8:15 PM......Awana Wednesday 7:00 PM................Bible Study & Prayer Meeting 1A mi.offUS.19 6382 W. Green Acres St. Homosassa Pastor Ray Herriman 679162 628-5631 Nature's Independent Church Located past the guard shack at Nature's Resort, Halls River Road, Homosassa Sunday Morning Service h 10:30am S Thurs.Night Prayer & Bible Study 7:00pm r Preacher: Tom "Tex" Evans : (352) 628-9562 . :Fzzzzzzzzzz Special Event or Weekly Services Please Call Kathy at 563-3209 For Information On Your Religious Advertising Children's Church & Nursery Provided Let's get back to the cross! He's coming soon! HOMOSASSA 0I = St. Timothy West S.. St. Benedict Catholic Church U.S. 19 at Ozello Rd. |---- M---- Vigil: 5:00pm Sun.: 8:30 & 10:30am DAILY MASSES Mon. Fri.: 8:00am HOLY DAYS As Announced CONFESSION Sat.: 3:30 4:30pm S. 795-4479 MOUNT OLIVE MISSIONARY BAPTIST Daniel G. Savage IlII CHURCH Pastor Sunday Services 4 Sunday School 9:30 A.M. * Morning Service 11:00 A.M. * Wed. Prayer Meeting & Bible Study................. 12:00 Noon & 6:30 P.M. "The Church in the Heart of the Community N with a Heart for the Community" 2105 N. Georgia Rd., PO | Box 327 .. | Crystal River, FL 34423: j Chur.:n Phone I i (352) 563-1577 ST. THOMAS CATHOLIC CHURCH rving Southwest Citrus County MASSES:. turday 4:30 P.M. nday 8:00 A.M. 10:30 A.M. U.S. 19 '/ mile South of West Cardinal St., Homosassa -I~ii S& Presbyterian re'" Certified "Child Safe" Environments BM Crystal E Special Event or Weekly Services Please Call Kathy at 563-3209 For Information On Your Religious Advertising) I0.-*m0 Pastors Dave & Susie Sininger * Powerful Praise & Worship * Nursery & "Kids Church" * Youth Program * Food Pantry * SHARE Florida Host Site Sunday 10:30am & 6:30pm Wednesday 7pm 795-LIFE (5433) .org Of etStaePakRod JutNrhO0rytlRvrMi CRYSTAL RIVER UNITED METHODIST M i .j CHURCH 4801 N. Citrus SL a = 2 Ave. M S (2 miles north of US 19) Sunday Worship g 8:00 Early Communion | I 9:30 a.m. Praise & | Worship 11:00 a.m. Traditional Worship I Sunday School for E All Ages S9:30 & 11: 00a.m. S Nursery Available at all Services SE SYouth Fellowship E. 4:30 p.m. | Kid's Club |E UL 4:30 p.m. h0 | Rev. David Gill ,L 0E. Senior Pastor A Stephen Ministry - Provider U 795-3148 . E N ViTmi l[lua ml mm a ma:l;|:l:ll:ll:[i:[ll i GULF-TO- LAKE CHURCH (SBC) ReV & Mrs. Bertinc "Exciting & Contagious Worship" Sunday 8:00, 9:30 and 11:00 am Adult Worship Kid's Worship - (Worship just for Kids) 5:30 pm Evening Activities: Adult Bible Studies Teen Program (Grades 6-12) Kids Connection (3 yr. old 5th Grade) 795807 7916 255 SE Hwy. 19 Crystal River, FL 34429 (Between Checker's & Cody's Rest.) (352) 563-KEC7 (5327) kchurch7@tambayErC eom 2c7 com Al Hopkins I Senior Pastor 6a5632 SFirst Assembly of God Come One Come All!!! Service Times: Sunday School 9:00 a.m. Morning Worship 10:00 a.m. Wednesday Bible. Study "7:00 p.m. Richard Hart seniorPastor Bapist Church ohapte fir Oill gncnertns : Special Event or Weekly Services Please Call Kathy at 563-3209 For Information On Your Religious Advertising CITRUS COUNTY (FL) CHRONIC I I I -- -- aq I- IIPaPIIIl R Christian Fellowsh 40 SATURDAY, NOVEMBER 18, 2006 .-,v.- .1 Places of worship that offer love, peace and harmony to all. Come on over to "His" house, your spirits will be lifted! ! SERVICING THE COMMUNITIES OF INVERNESS i PRIMERA IGLESIA ) NHISPANA DE CITRUS COUNTY, AsambleasFde Pihrero, Pastor 1370 N. Croft Ave. Inverness, FL 34451 Tel6fono: (352) 341-1711 INVERNESS CHURCH OF GOD Rev.Larry Powers j Senior Pastor Sunday Services: Traditional Service.............8:30AM Sunday School ...................9:30 AM Contemporary Service.....10:30 AM Evening Service.................6:00 PM Wednesday Night Adult Classes.....................7:00 PM Boys and Girls Brigade......7:00 PM Teens 7:15M P Im 1:00 PM ,3,10 352-726-4033 WHERE EVERYBODY IS OMEBUUODY. T Junior Branson I (352) 341-2884 ; S Hwy. 44 E @ N Washington Ave., Inverness U 0 Sunday Services: Traditional in Sanctuary 0 8:00 AM 11:00 AM * 0 Contemporary . in Fellowship Hall U 9:30 AM * 11:00 AM Service Broadcast live on WRZN am 720 N Sunday School for All Ages U 9:30 AM0 Nursery Provided 0 Fellowship & Youth Group m 6:00 PM 0 24-Hour Prayer Line m 563-3639 U SWeb Site: " Church Office 637-0770 " Pastors: Craig Davies & 0 Dustin Sedlak The Little House Fellowship e AMBUES OF GD0 W First Assembly of God 4201 So. Pleasant Grove Rd. (Hwy. 581 So.) Inverness, FL 34452 INVERNESS CHURCH OF CHRIST 352-637-6400 5148 Live Oak Lane SUNDAY 10:00 AM 11:00 AM WEDNESDAY 7:00 PM Come Worship With Us Leon Jennings, Evangelist BOWLING LIVE OAK LANE ALLEY K MART W HWY 44 E HWY. 44 VINEYARD CHRISTIAN FELLOWSHIP Pastor: Kevin & Ruth Ballard Sunday Schedule: Coffee & Donuts 9:00 AM Sunday Celebration............1.......,10:00 AM Kids Club 10:30 AM Weekly Schedule: Fellowship Dinner ...............6....." AWANA Prayer Meeting 4:30 pm 5:45 pm 6:00 pm Adult Choir 7:00 pm Nursery Provided 123 S. Seminole 726-1252 ICHRISTIAN Iipe Kids Preschool & Daycare 1T old- Pre K 4 Before & After School Care Mon-Fri 6:30 A.M. 6:00 P M. I Two miles from Hwy. 44 on the corner of Croft & Harley 2728 Harley St., Inverness FL N APPLEBEE'S ABC PGR ELEMENTARY PLEASANT GROVE RD. CHURCH OF CHRIST s S! a /l~ CITRUS COUNTY (FL) CHRONICLE 'Methodist Church of Inverness 3896 S. Pleasant Grove Rd. S Inverness, FL 34452 | (2 mi. so. of AppleNESDAY 6:15 PM Bible Studies & Connection Groups for everyone A ........ A ( ) I ) *.6 Places of worship that offer love, peace and harmony to all. Come on over to "His" house, your spirits will be lifted!!! ! SERVICING THE COMMUNITIES OF BEVERLY HILLS, HERNANDO, HOMOSASSA SPRINGS, INVERNESS, AND LECANTO K'HILAH SHALOM A congregation of both Jew and non-Jew serving and worshipping Adonal together. Rabbi Kyle Moline Rabitzen Dawn Heron Village 701 White Blvd. Inverness Call Linda 6 i for Information "795-236 Meets biweekly on Saturday 11:00am Lakes Regional Library in Inverness For information call (352) 861-1903 or graycek@earthlink.net B41 Ray King IGLESIA HISPANA CASA DE ORACION M7,, "Donde la Palabra de o "'h Dios es el lenguaje del SEspiritu Santo" Escuela Dominical.. 9:30 AM Martes .9:30 AM Mi d-rcoles...................7:00 PM Dr. Teddy Aponte & Hayi Aponte, Pastores 3220 N. Carl G. Rose Hwy. (200) Hernando 352-341-5100 HERNANDO Methodist Martes .9:30 AM Church "A place of new beginnings" 2125 E.Norvel BryantHwy.(SR486) For information call (352) 726-7245 Visit our website at *ernandoumc.net Sunday School 8:45 AM FellowsBryanthip 9:30 AM Worship Service 10:00 AM Ministries and Activities for all Ages. Reverend Lois Barnum, Pastor g A friendly church where Christ is exalted!ll Sunday School Morning Worship Evening Service 9:00 A.M. 10:15 A.M. 6:00 P.M. L Bible Study & Prayer 7:00 P.M. Awana 6:45 8:15 P.M. ITeens 6:30 8:30 P.M. 7f0eberlp Wls Community c)burct 82 Civic Circle, Beverly Hills, FL 352-746-3620 Rev. Stewart Jamison III, Pastor Where Christ is Proclaimed BEGIGNINGS fIELLOWSHIP PASTORS JEFT AilND PAMI BURKE * Renewal/Charismatic Theology * Contemporary Praise and Worship 10:30 AM Sunday Worship (nursery provided) Sunday 6 PM Youth Service Midweek Service 7 PM 72-83 o Beverly Hills Marple Leis.III Pa' i.. . 4951 ,VN. Lecanto Hhwy. Bcavcrlyt Hills,FL Located at the intersection of Hwy. 491 iLecanto HAy.) and Forest Ridge Blvd. Service Times Sunday Bible Study 9:00 A.M. Morning Worship 10:15A i ast "Magn iyhK sin VIGIL MASSES: 4:00 P.M. & 6:00 P.M. SUNDAY MASSES: 8:00 AM & 10:30 A.M. SPANISH MASS: 12:30 P.M. CONFESSIONS: 2:30 P.M. to 3:30 P.M. Sat. orBy Appointment ***** *** WEEKDAY MASSES: 8:00 A.M. 6 Roosevelt Blvd., Beverly Hills S746-2144 1 Block East of S.R. 491) VLA1 JJ UNITARIAN UNIVERSALISTS Oak Tree Plaza 2149 Hwy. 486, Lecanto (1 Mile East of Hwy. 491) SUNDAY SERVICES 10:30 A.M. RESPECTING INDIVIDUAL BELIEFS ALL ARE WELCOME 746-9202 ~ Real Life Chriatian Church Real Life Christian Church invites you to come worship with us. "Lose the religion... find a relationship" Worship & Celebration at 10:30 AM Quality childcare is provided. RLCC temporarily uses the SSeventh Day Adventist Church Located at 1880 - eneIESI A new Christian gathering Coffee & Muffins 9:30 AM Worship Celebration & Children's Program 10:00 AM 2389 W. Norvell Bryant Hwy (State Rd. 486) Lecanto Pastor Brian Baggs Authentic Love Relevant Failh Embracing Community * Call 1352) 464-4686 for more info '' 935 S. Crystal Glen Dr. Lecanto ' SCrystal Glen Subdivision H 44 just E. o 490 ,? 527-3325 . S l I, Pastor Rev. Frederick W. Schielke Website: I.( \\10 (IIt R( II OI C(IRIS o0 o 0000 A & 00 ao '0 0a 0 00 00 o 00o 00 0 -m C OCI Awana September May Sunday Eves. From 5-7 PM Our purpose: To honor the Savior by shepherding people into a meaningful relationship with God Byron Hendry, Pastor (352) 527-9900 baptistchurch.org 1 746-61 l! ~ I -. --J ~-.-- '-C1~CL- C- b _~_L~ I _*_~L---Lal~--Lla.~--I-_-----------) FAITH BAPTIST CHURCH Homosassa Springs Re% \Vm. LaiVerle Coat- SUNDAY SCHOOL: 9:45 am WORSHIP: 11 am & 6 pm WEDNESDAY SERVICE: 7 pm Wed.- Sep.- May Keys For Kids 6:30-8pm Independent & Fundamental On Spartan 1/2 mile from U.S. , 19 off Cardinal 628-4793 A | am Worship Celebration Choir/ Special Music / Children Sunday Night 6 pm Worship Celebration *Children/s. GROVER CLEVELAND GREEN ACRES Location: US 19 At Green Acres Street South of Homosassa Springs SChristian Education 9:30am [ Contemporary Service 10:30am [ Wednesday Services 7:00pm (nursery provided) Ftile5 s n | SpiA ~ed "N9c(,;,Wer T at GodA, -Lbve" Unity Chumh of Citrus 2628 IV WOO(IlliCIA/ Belfelly I MIS StIndall Service 10:30CIIII 746-1270 C mRnNV F 1 200 EVENTS Continued from Page 1C Friends to meet Chavurah Shabbat (Friends of the Sabbath) will meet 10 a.m. today. New members are welcome. Services are in English and Hebrew and are concluded with the traditional Shabbat Kiddish. There is a discussion period after the service followed by lunch at a restaurant. Call 746-1182 or 746-9756. Art auctioned St. John the Baptist Youth Group will sponsor an art auction today. Wine and hours d'oeuvres are included in ticket price. Credit cards will be accept- ed. Tickets are available at the church office. Call Maureen at (352) 489-3166.. Anniversary marked Fort Cooper Baptist Church will celebrate its 50th anniversary at the 9:30 a.m. service Sunday in the church auditorium. There will be special music and recognition of those who have helped with this ministry in the past or present. The special guest speaker will be Jim Philamlee. Call the church office at 726-0707. 'Messiah' presented The Citrus Community Concert Choir announces its fourth annual presentation of G. F. Handel's ora- torio, "The Messiah." This year's Christmas season offering will be performed with an orchestra, a first for the choir. Performances will be at 2 p.m. - Sunday, Dec. 3, and 7:30 p.m. Friday, Dec. 8, at Faith Lutheran Church, 935 S. Crystal Glen Drive, Lecanto; and 7:30 p.m. Tuesday, Dec. 5, at First Lutheran Church, 1900 State Road 44 West, Inverness. Admission is $8 at the door. Children 12 and younger will be admitted free. Call 628-6452. Concerts slated The following Sunday Sampler concerts will be presented at 2:30 p.m. at the Dunnellon Lions Club: Dec. 3 -A holiday and birth- day party.' Jan. 14 Patchwork, an all- girl group from Gainesville. Call (352) 489-2181 or (352) 489-3766. Singing tree First Baptist Church of Crystal River will present a Christmas spectacular featuring the giant Singing Christmas Tree Dec. 3 to 10. The Singing Christmas Tree will be presented at 4 p.m. Sunday, Dec. 3, at 7 p.m. Dec. 6, 8 and 9, and 2:30 and 7 p.m. Dec. 10. at the church. For tickets, visit or call the church at 795-3367. Christians unite The next prayer and praise serv- ice of Christians United in Christ is at 7:30 p.m. Tuesday, Dec. 5, at Please see EVENTS/Page 7C GRACE Continued from Page lC which is what we're supposed to do. They're not supposed to be "the poor," but Joe and Lisa and Mrs. Appleton and Jane who sings like Whitney Houston. Tara and I kicked around the question: By giving people food, does that really help them? On the one hand, some peo- ple have nothing to eat, and not the way you and I open the fridge and stare at the jars and containers and pans of leftover lasagna and lament, "There's nothing to eat!" I'm talking about those whose stomachs hurt, who open the fridge and stare at a bare light bulb and nothing else and have no idea what to do to quiet the cries of their hungry children in the next room. That's hunger. That's nothing to eat I said to Tara, "How can we not feed people?" She agreed. We must. But there's another side to it. Does giving bags of food to the same people week after weekcreate a dependen- cy on our charity? With each handout, do we perpetuate the problem? Do we harm the peo- ple we're trying to help? Do they lose pieces of themselves, of their sense of self-worth and self-reliance with each bag of groceries? But they're hungry... Tara told me about her new hero, Shane Claiborne, who has abandoned himself to identifying arid living with and loving the poor and hungry in a community in Philadelphia. called the Simple Way. Like a commune, everyone shares with everyone else. Frankly, I think it's weird, but there's something inside of Tara that is drawn to that kind of wild living living wildly for the JOURNAL Continued from Page 1C indeed, the Modeh Ani, the morning prayer, expresses this very idea.. Throughout the day, the traditional Jew will utter thanks for food, life, health, family, even bodily functions. Being able to perform ritual duties and acts of charity, called mitzvot, are accompa- nied by blessings of gratitude. A simple act such as eating a piece of bread becomes holy and special when accompa- nied by a "thank you." Many of the Jewish expres- sions of thankfulness have their origins in the Torah and in the Book of Psalms. A well- known example of the former is the phrase that one should "eat and be satisfied and give thanks to the Lord." Noah, at the end of the flood, gives thanks to God for the dry land and for having survived the deluge. And Abraham, who sacrifices a ram in lieu of his son, is, no doubt, grateful for the privilege. Some of the most beautiful expressions of thanksgiving appear in Psalms. "Oh give thanks unto the Lord for his mercy endures forever" is a common line that runs through the compilation of 150 reli- gious poems. Many of these prayers of praise and thanks- giving are included in the litur- good of others and the glory of God. In Claiborne's book, "The Irresistible Revolution," he gives away all the royalties earned from the sale of it! he says, "Writing a check makes us feel good and can fool us into thinking 'that we have loved the poor. But seeing the squat houses and tent cities and hungry children will trans- form our lives. Then we will be stirred to imagine the econom- ics of rebirth and to hunger for the end of poverty." I want to end poverty and hunger and homelesneness, and I asked Tara what I could do. She suggested I buy a turkey for a Harvest family for Thanksgiving. OK, I did that. Now what? Claiborne has a different, deeper,answer. Jesus said the poor and hungry will always be with us, among us, in our midst. Claiborne says they will cease being "the poor" when they become our friends. He says that when we "fall in love with people across class lines," sharing comes natural- ly We begin to love them as we love ourselves, as Jesus said we must Poverty and hunger primarily result from a break- down in relationships. That sounds too simplistic and pie-in-the-sky utopian and I can't imagine how that will work or even if it's possible. It would mean changing people's hearts it would mean chang- ing my heart. It's so much easier to open my wallet, buy a turkey and go- out to lunch.. com. gy as a collection entitled the Hallel, which is recited on Passover, Sukkot, Chanukah and other festivals. At this special time of the year, let us pause and give thanks for the many blessings that are ours as residents of Florida. Let us take the time to smell the roses, glory in the hibiscus and generally breathe the cooler air that the season offers. Let us share with our neighbors and remember the less fortunate among us. May we live our respective faiths in their true spirit by helping oth- ers, regardless of race or creed. May all our endeavors support those who promote peace. This Thanksgiving Day, Jews throughout America will sit down to traditional holiday fare. Many of them will feel a special pride because our American holiday of Thanksgiving is based on the. Biblical holiday of Sukkot, the harvest festival, observed just last month. May your holiday be filled with the warmth of friends and family and may we all gather in love and peace. Happy Thanksgiving! Is Judi Siegal is a retired teacher and Jewish educator. She lives in Ocala with her husband, Phil. She can be reached at niejudis@yahoo.com. VACATIONING? * Remember to take photos during the trip, to submit to the Dream Vacation Photo Contest. Adlovaship Come and ged the oy Located at the corner of Hwy. 491 and Roosevelt Blvd. in Beverly Hills Morning Worship. .10:30am Wednesday Service..6:30pm RZik Nelseon &.,eirWsa rDmrs oea 1 3'5'2S~sk RAC'EC 4Roa;d Old Flr " , S but what -L, )it does. ,CHRIST LUTHERAN | CHURCH- LCMS | "A CHURCH THAT , IS A FAMILY" I SUNDAY SERVICES I9:45 A.M. Sunday School rII & Bible Class 8:30 A.M. 11:00 A.M. Morning Worship PASTOR RICHARD DRANKWALTER Nursery Available 796-8331 475 North Ave. West, Brooksville i; (on North Ave. East of 98 N.) Hope Evangelical Lutheran Church ELCA 9425 N. Citrus Springs Blvd. CitrusSprings SUNDAY Sunday School 9:15 Am Worship 8:00 AM & 10:45 AM Communion Eiery Sunday PASTOR- JAMIES C.SCHERF Information: 489-5511 Mission Possible MINISTRIES V. David Lucas, Jr. Senior Pastor 9921 N. Deltona Boulevard S (352)489-3886 | Sundays I Sunday School 9:30 am (English/Spanish) Worship 10:30 am Hungry for God Service ................6 pm 1st Sunday of month (Nursery Care & Children's Church Provided) | Wednesday | Youth Group, Bible Study & Kid's Programs 7 pm '(Nursery Care Provided) Friday | Spanish Worship Service.... ........7pm ARMS OF MERCY FOOD PANTRY 1st & 3rd Tuesday of the month. 8:00 am-11:00 am SCrystal | Special Event or Weekly Services Please Call Kathy at 563-3209 for Advertising Information 687695 352-754-9505 First Baptist Church Lifting Up Jesus Rev. Michael Thompson,Pastor 8545 Magnolia S726-4296 Sunday Schedule 8:00 AM Contemporary Service 9:30 AM Sunday School 10:45 AM Traditional Worship 7:00 PM Worship Wednesday 7:00 PM Music, Youth, Fellowship A warm, friendly Church Nursery Available I 9220 N. Citrus Springs Blvd. Citrus Springs, Florida 34433 Dr. Jeff Timm SUNDAY 10:00 AM Worship Service WEDNESDAY 7:00 PM Bible Study 489-1260 Ft. Cooper c SBaptti Chu rcy Teens' Programt Adult Prayer Meet 7:00 PM 7:00 PM 7:00 PM Dave Maddox Pastor (352) 726-0707 4 Places of worship that offer love, peace and harmony to all. Cone on over to "His" house, vottr spirits It.'ill be lifted!!! ! SERVICING THE COMMUNITIES OF BROOKSVILLE, CITRUS SPRINGS, DUNNELLON, FLORAL CITY, AND CITRUS COUNTY CITRUS COUNTY (FL) CHRONICLE- RELIGION MBER 18 2006 SC SA.rUUt)AY, NOVi-- SArURDAY, NOVEMBER 18, 2006 7C LCRUS CoUNJY (FL) fLMUPV1LLE EVENTS Continued from Page 6C. All Christians are invited. Directions from Dunnellon: On U.S. 41, go west from the traffic light in the center of town. The church is on the right, on State Road 40 West. Call Jerry or Marlene Rubino at (352) 489-4934. Raffle for kids The FFRA (Families and Friends of Retarded Adults) is will have a $1 raffle for a 21 multispeed Huffy bicycle or a char-broil barbecue grill, for the benefit of the mentally challenged "kids" of Citrus County. Tickets may be purchased by calling Dave Deso at 634-2528 (cell). Raffle tickets are one for $1, seven for $5, 15 for $10 and 35 for $20 and the drawing will be at the monthly meeting of the' FFRA at 11 a.m. Friday Dec. 8, at the Key Center, 5521 W. Buster Whitton Way, Lecanto. All proceeds will go toward the training of the kids and the enhancement of the FFRA pro- gram. FFRA is a 501c3 organization formed in 1997 by a small group of parents whose children are devel- opmentally disabled and the grow- ing concern for the short and long term welfare, safety, and quality of life for retarded adults living in the greater Citrus County area. The group has since grown to approxi- mately 200 members. Meetings are on the second Friday monthly at the above-men- tioned address. Refreshments are served during social time at 9, business discussions start at 9:30, and the educational portion starts at-10 a.m. when a guest speaker addresses the group on related topics. Meetings are open to the public. Call Ron Phillips, president, at 382-7819.. SThe Dec. 15 flick is "Topsy Turvy," a story about the,lives of Gilbert and Sullivan. Call (352) 465-5646. Conference coming up Citrus Missionary Baptist Church will host a Bible confer- ence Dec. 15-17. Sessions will be at 6:30 p.m. Friday, 9:30 a.m. and 2 p.m. Saturday and 9:30 a.m. Sunday. Fourteen ministers from dix. Recital slated The Ivory League Music Club, iLnder the direction of Whitney Lozier, will present a Christmas recital at 7 p.m. Saturday, Dec. 16, at Cornerstone Baptist Church. the public is welcome. Call 341- 2838. : Band to perform ; First Baptist Church of Crystal Liver will host the Citrus Community Concert Band from 7 tp 8 p.m. Tuesday, Dec. 19, in victory Hall at the church on Citrus Avenue. The 60-member band has a large repertoire of special and traditional Christmas music. The community is invited. LINK Continued from Page lC When it comes to sermons, Hall uses humor and flexes his knowledge of such contempo- rary things as the popular web- site myspace.com. "We don't try to be them," he said. "We don't try to be on their level, but we try to under- stand their level." i In addition to delivering ser- mons, Hall has developed other programming, such as ihe aforementioned dance feam, a band and even a drama team. If kids aren't necessarily interested in being on stage, Hall has found a way to get them turned on to things behind it, like working the tights or sound system. ; "I found that if you meet the ieeds and interests of kids they' will become one," Hall said. Refreshments will be served. Admission is free: Donations used to purchase music are accepted. The band is made up of volun- teers, many of whom played with well-known "big bands." Don Rowe, a retired bandmaster, is director.. Traveling evangelist Brian O'Connell will talk about the cross bearers, a group of men and women from various churches in Citrus County who are soldiers of the cross against all odds. Prepare for season Vineyard Christian Fellowship, 960 S. U.S. 41, Inverness, is preparing for the Thanksgiving and Christmas seasons. Call 726-1480 for more information.: The food pantry will be open from 12:30 to 1:30 p.m. Thanksgiving Day. Reservations are required for the free dinner play, "A Cosmic Country Christmas," to be present- ed at 7 p.m. Saturday through Wednesday, Dec. 2 to 6. Karaoke Cafe6 will be open Friday, Dec. 15. Admission is $5. Services Hear bluegrass The come-as-you-are worship service at 5 p.m. today at St. Timothy Lutheran Church will feature bluegrass music. Pastor Bradford's sermon Sunday is "Holding Fast in Faith." Worship services are at 7:30, 8:30 and 11 a.m. Holy Communion is offered. The women of the church will participate at all three services as readers, ushers and greeters for the "Thankoffering" that is distrib- uted through the Florida-Bahamas Synod. Celebrate Eucharist Shepherd of the Hills Episcopal Church in Lecanto will celebrate the 24th Sunday after Pentecost with Holy Eucharist services at 6 p.m. today and 8 and 10 a.m. Sunday. The office,is closed Thursday and Friday for Thanksgiving. JOY trip today The JOY (Just Older Youth) group of St. Margaret's Episcopal Church will take a trip to Ocala today to hear the singing group CFCC's presentation of "Get Out the Vote." - The congregation will celebrate St. Margaret's Day at the 8 and 10:30 a.m. services Sunday, hon- oring the church's patron saint with a bagpiper playing Scottish tunes at both services. The church's community Thanksgiving service at 10 a.m. Thursday will be followed by Thanksgiving dinner for the whole community at noon. The church is at 114 N. Osceola Ave., Inverness. Call 726-3153. Times change "It's about investing in the stu- dent. Yes, we're about Jesus, and yes, we want them to get saved, but it's about investing in them. It's about saying, 'We're here for you and we care about you."' With the inventive activities, the Halls are gaining new fans every day. Crystal River senior Melissa Blackstone admitted that she went to church regu- larly but wasn't involved in the youth group. A friend con- vinced her to come out and now she can be found on Link's dance team. "Jeff is an awesome pastor," she said. "He and Shannon are very uplifting and they want to get kids closer to Christ. I love it here." Hall wants to expand Link's reach as much as he can, and believes that while having rock music blasting and fog machines rolling may seem a bit strange to people accus- "Change Your Clocks," with text from Mark 13: 26. There is a Holy Communion service at 6 p.m. the first and the third Saturday monthly. The next service is Dec. 2. The church is at 935 S. Crystal Glen Drive in the Crystal Glen Subdivision in Lecanto. The Rev. Frederick W. Schielke is the pastor. Call 527-3325. Be confident Good Shepherd Lutheran Church invites the public to Sunday worship services at 8:30 and 10:30 a.m. Pastor Ohsiek's sermon title is, "Be Confident in God." Fellowship follows both serv- ices. Hearing devices, large-print music and cassette tapes of the service are available free of charge. A nursery attendant is pro- vided for children 3 and younger. Sunday school classes begin at 8:30 a.m. All children in the com- munity are invited. There will be a Thanksgiving worship service at 7 p.m. Tuesday.. Prayers for all First Baptist Church of Hernando begins services at 9:30 a.m. with prayer for all Sunday school classes in the fellowship hall followed by. the morning serv- ice at 11. Play rehearsal is at 4:30 p.m. Choir rehearsal is at 5 p.m. followed by the evening service at 6. Practice for the Christmas play is at 4:30 p.m. Sunday and 6:30 p.m. Friday. Tuesday is visitation day for members. The Wednesday evening prayer meeting is at 6 p.m. in the fellow- ship hall. Members meet at 10 a.m. Thursday at the New Horizon Assisted Living facility. The church is at 3790 E. Parsons Point Road. Call 726- 6734. Invitation issued Grace Bible Fellowship, at 4979 E. Arbor St., Inverness, invites everyone to worship servic- es at 10 a.m. Sunday and 7 p.m. Wednesday. The BusyBees continue their garage sale today at 3988 E. Byrd St. All proceeds will go to helping the less fortunate in Citrus County. Series continues First Christian Church of Inverness invites everyone to Sunday worship services at 10:15 a.m. and 6 p.m. Senior Minister Todd Langdon will continue his series, "The ABC's of Giving," with this week's sermon titled, "Consecration.". tomed to more traditional ,church services, he can use these tools to stimulate and encourage young people toward a closer relationship with God and the Bible. "We want to create an atmos- i Cursillo Ultreya is at 6 p.m. today at Shepherd of the Hills. Bring a dish to share. The annual ecumenical Thanksgiving service is at 7 p.m. Wednesday at St. Benedict Catholic Church. Don't go astray Floral City United Methodist Church invites everyone to wor- ship Sunday mornings at 10:30. The Rev. Steven Riddle will bring the message titled "Do Not Be Led Astray By Others." Sunday school classes meet at 9 a.m. A Bible study group meets at 10 a.m. Tuesday in Burkett Hall. The Wednesday evening prayer meeting is at 7 in the sanctuary. An exercise group for the com- munity meets from 10 to 11 a.m. Wednesday in Hilton Hall. The church is at 8478 E. Marvin St. Call 344-1771. Youths sell goodies The Action Youth Group of Peace Lutheran Church, Dunnellon, will host a bake sale fol- lowing the 10:30 a.m. worship service Sunday. Bible study and Sunday school classes are at 9 a.m. The church is on U.S. 41,4 miles north of Dunnellon. Kettleman to speak The Nature Coast Unitarian Universalist Fellowship, 2149 W. Norvell Bryant Highway (County Road 486), invites everyone to hear Patricia Kettleman speak at 10:30 a.m. Sunday. Refreshments and discussion with the speaker will follow the service. Call (352) 465-5646 or visit. Give thanks, praise Due to the Thanksgiving holiday, Faith Baptist Church will not have its regular Wednesday evening praye'service. Instead, there will be a service of thanks and praise at 7 p.m. Tuesday. Sunday school classes begin at 9:45 a.m. Worship services are at 11 a.m. and 6 p.m. The regular Wednesday Bible study and prayer meeting will resume at 7 p.m. Nov. 29.. Think positive "What Were You Thinking?" is the question Pastor Hershel Mercer will ask, contrasting nega- tive thinking with the mind of Christ, at the 11 a.m. worship hour Saturday at Inverness Seventh- day Adventist Church. "Tell It to Jesus" will be the musical feature. Sabbath school classes begin at 9:10 a.m. with Esther Barker pre- siding. "The Man Abram" is the topic of discussion in the 10 a.m. Bible study classes. Following morning services, all are invited to a vegetarian buffet. Vespers bless- ings begin at 5 p.m. with Bill Hawkes. The Health Food Store opens at 6 p.m. Health food is available for pur- chase from 9 a.m. to noon Wednesday and at 7 Wednesday night after the prayer meeting. The Thrift Shop offers fall bargains and community service from 9 a.m. tol p.m. "Spanish Is for Fun" meets at 6 p.m. Monday. Click for the new Hope & Comfort page. The church is 4.5 miles east of Inverness, 1 block inside Eden SGardens off State Road 44. Call 726-9311. Announcements Share talents Musicians for a contemporary church plant are needed to be part of a core group forming to reach phei'e where they think, 'This is cool to me,"' he said. "We want them to know that God is cool. Regular church does a great job, but this isn't about sitting and singing a hymn or two. This is about fun and say- S FORT COOPER 1 SBAPTIST CHURCH is Celebrating Our 50th Homecoming 4 Sunday. November 1911 9:30am Noon .- Guest Speaker: Jim Pilamlee ' We are located at - 4222 S. Florida A e.. Inverness. FL - ~1' families in Citrus County. A vision group is forming to plant a new church in Citrus County. Those interested in sharing their god-given talents may call 560- 7342. Singles to meet Gulf-to-Lake singles meet from 6:30 to 8:30 p.m. Thursday at the church annex in Meadowcrest. They have a coffeehouse the last Thursday monthly. Free church music Longtime music minister Larry Neff, from the Hernando Church of the Nazarene, is retiring and has church music, chorus books, sheet music, choir books, etc., he would like to give away. Call Larry Neff at the church office at 726- 6144. November and December. The coffeehouse. AW Our Lady of Grace Catholic Church's food pantry will be open from 9 to 10 a.m. Tuesday at 6 Roosevelt Blvd. Food will be dis- tributed on the right side of the parish office garage area. Parking is available in the right parking field next to the garage area. The pantry. is open to those who qualify for this program. No vouchers or financial aid is given. min- istry,.Providence House, to help ing it's fun to serve God. We want to keep them pumped up all the time." Link is open from 5 to 7 p.m. Sunday. Service starts at 6 p.m. in the Gulf to Lake Ministry Complex on Hemando Park on Railroad Way. The church serves a hot meal and provides fel- lowship.: New Beginnings Fellowship, U.S. 41 North, next to Ace Hardware, in Hernando - Distribution and sign-up is from 8 to 10 a.m. today. Additional sign-up is from 4 to 6 p.m. Tuesday, Nov. 28, and 10 a.m. to noon Saturday, Dec. 2. - Call Jo at 563-5848. Road 44 next to SunTrust Bank in Meadowcrest in Crystal River. For information on Link, call Gulf to Lake Church at 795- 8077 or visit- lake.com/youth/. November 19-21 with Paul & Vonda Hodge Come be saved Sunday at 10:30 am & 6 pm heaed led an Monday & Tuesday at 7 pm set free by the ..................................... awesome power of God! Mission Possible Ministries (352) 489-3886 9921 N. Dettona Blvd. Citrus Springs, Ft 34434 41 to Citrus Springs (between Holder & Dunnetlon) enter main entrance then right onto Deltona Blvd. summonwar....w.neraleai#iftti . i,^jy.,st 1-- .- fr,,, 1 r a m 4. loi i 40. 5 I 4w 1% db %r -A~lt4L pw v O' W 16 4 & 4 0 .A A AL rr- AN ASMri"- ov b p I-- O* ..O.0 w-.*-- -, o n %. y nd ed & v. aial7rm Ci *00 :. ..,CopyrighteduF m *C -, -'- " Aalal foSyndicagtedFCc -Available from,,Commercial & j vy LA - ~w ~- up -0 - 40=01- V1ater'iaI - nt -t 0 4b. -a m ~. - ~m - ~- m ~ w ~ .~ -a - -7 A AL- .vv one S 0 S S 0 0* a on0 m *-lo qpmm ma News Providers" --OEM S -- a -a S.- mob- w _ ** * * 00 . 0 * 0 * 0* * * * * 0 * 0* * IL ;-:A- 0- ILWr I 0 0 * * * 0~~-~ - - a _ IF-- Ialt miom- m b d D~i ~ 2o -~ -a -.~ -a 'a - a.. 0- - - a - - a - * a -a - -e S S ~- 0-.- C - - a * - - S 0--- - 0- - -- ~ a- - ' a a a -- -a ~ m - ~ ~ ~ ~ -~ 0d. ~ .p-a S. - 'Now- S I II w a. - - 0- -- - -a - -e * - - S - la ILL **0- - v - -l .** 4mm 0-- - S -a 0-- - 0- - .t1. le-ft " --,,Now 0 - a...-4-M - -. alow - 0 5 a- 0" - ~ S ~- - - = S S *.- a a- - w S *~ 5- -- - --0- - 0 - a 0- - a 0--- a.. a 0- - *, p I ~II S - = - I a -a * 0- -S - a 5 0 - - 0- - - a- - ft -a a * - 0 --a.- - *0* * ** **0 * * * 0-- - 0- -- s - 4 ,, -, 0 . Q - qt -% a *.* - do w * -wm 4 It 9 , ' 4; - ^A *Ibbd v ^^^r 0- 0 0 * 0 * S ~- a - me -~ -~ - - a ~ -~ IT ^1. ab~,P T -~ - 1p~qmma C pI~ 'lb 4. la - C^f klnl^- o ip .,D 4 a 0* - ~- - a -. 4 ,t1~ I *-.-* ~, "Copyrighted Material - 4-Syndicated Content * Available from Commercial News, Providers". 00 .- ^.- "' -* y,,j * nr __^ 9 m^\ .<^- 0 i4b 40%; . A. --~ - e~ * 21W 9^ oba a S 41W 0d 4 L.' I*ow es . -04= obb 4* Lb %p~ 'S 9 4d ml W&d.' 0.0 I a.l qlmeqlp M- fodhmo 4wm Nw % %- - AP m - - __ a. -0 - - a - ~ - 0 0 * - 0~ 0 -a - 0 00 0.0 ~. -a - a. 0 a. - a. a. 0.-- 00 a 9 ~'- *0 a. a. - C e - 0 * e a - 0 *-~ * - 0 0 ~- -a. ~- 0 ~ - a. - a. a. -a. - -- - a. 0~-~ a. ~0 0~ a. - 4 -Im 0 do 0 daft- * a. o -a ~0~ a. -- a. - 0* a. - ~*o a - - a a. - ~- 0 0 - - a 0 -~ 0 - 0 - - a. - 0 o S - 0 - ~ a - a- -- - 00 a. - MOM- w *0* 0o I a 0 ~ . ot J % do' 41P k dm I 0 * -0 0 S 'a a 111111116.- dow ma 4mq - iLL~ 4mb ft do 4p a as 6..-T .4 I qoop4fto 40" qmmb %now OAP 4040ff. doo YHrC~ ~V~SL ma1, 2m6C SSF DSCusOUY(F)CONI. To place an ad, call 563-59661 Classifieds In Print and Online All The Time I 6 5l e e: (888) 852-2340 1 E a declassified Si I 'si ww cronileonlne*cm S. *. 0 .e. S~. -6'S es S.. -1 hoicl Our family of newspapers reaches .more than 1 70,000 readers in Citrus, Nlarion,- .L . --Sumter, Levy, Dixie anadt Gilchrest counties. SCitrus County Chronicle The Visitor . Homosassa Beacon Inverness Pioneer * Crystal River Current S- umter County nimes * Wlliston Pioneer Sun-News South Marlon Citizen * Riverland News Riverland Shopper * Chlefland Citizen TrI-County Bulletin The best way to reach the growing Nature Coast market is through our award-winning, growing newspapers. 1624 Nrorth MelOadowcrest Boulevard Crystal Riv-er, FL 34429 (352) 563-6363 ww chrn cleon e co n It's Never Too Late, CR/Homo, area, young 63 SWF, active, adven- turous, retired profes- sional, seeks marriage minded, healthy, NS, free spirit, 60'ish gentle- man, who enjoys nature, being outdoors, RV camping, travel, saltwater activities, sun- sets and more. Make me smile by calling (352) 586-7098 LETS SMELL.THE ROSES TOGETHER Seeking attractive Lady 40-55 who enjoys dining out & weekend trips out of town. Looking to share quality times together & wants the nicer things In life. Call 228-1579 Recelot 24' POOL Above Ground (352) 563-1465 + CASH PAID + For JUNK Unwanted Cars & Trucks (352) 860-2545 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 Hunting dog. (352) 212-8346 FREE GROUP COUNSELING Depression/ Anxiety (352) 637-3196 or 628-3831 FREE REMOVAL OF Mowers, motorcycles, RV's,Cars. ATV's, jet skis, 3 wheelers, 628-2084 FREE REMOVAL of unwanted househid & garage sale items. Call (352) 726-9500 HUMAIVNI: AUrElllY OF INVERNESS Have 7 Medium to big- ger dogs who are look- ing for a home, Basseft Elleenwv Metal Storage Cabinet Gas Stove, Above ground pool ladder, at the curb 6350 W. PATRIOT ST HOMOSASSA, PLYWOOD STAND UP .SANTA (352) 465-1262 PUPPIES free to good home 2 brindle mixed 8 weeks old 628-9204 ROTTWEILER Male, 8 yrs. old, very ., rr., .ir.g can't Ioke. Ail t.e put to sleep If no one takes him. Adult Home 352-628-4500/422-6792 Side by side refrig. freezer. Runs but needs work. (352) 746-2991 ** NOW OPEN ** Sweet corn @ BELLAMY GROVES 1.5 miles E. on Eden Dr. In Inverness Greens & Other Vegetables (352)726-6378 LUSI UIUW Lost 3 mini dachshunds In Hernando area. If found please call 352- 465 2580 REWARDII for the return of my catll all black, F, xtra toes,bev hills area 352 560 7087 Heartbrokenll Women's Wallet, red, cream design, had lots of cash, Sugarmill Restaurant on 19, Reward (813) 205-1928 PITBULL Brindle/Wht. Holyoaks Ter. (off 488/Dunn.) 11/13 352-726-1006/795-3260 C= I 2 FEMALE LABS Spayed, microchipped, current shots, adoption donation requested. Human Society of Inverness. Call Dan at (352) 628-5224 Divorces *Name Change I ChildSupport S *Wils I WeComeToYou 4 *CHRONICLE. INV. OFFICE 106 W. MAIN ST. Courthouse Sq. next to Angelo's Pizzeria Mon-Fri 8:30a-5p Closed for Lunch 2om-3pm HUMANE SOCIETY OF INVERNESS SHOT CLINIC Saturday From 2-3 *DOG PACKAGE Rabies Shot, Parvo & Distemper, Micro Chip including registration, $35. CAT PACKAGE Rabies & Feline 5, Micro Chip Including registration, $35. This Saturday Only Free Nall Cllppingi Bow Wow Boutique In Crystal River 5625 Hwy 44, Crystal River., 352-795-1684 All Proceeds go to the Humane Society of Invern .I~ U *.oooe KITTENS KITTENS KITTENS Medium, Short Hair, Bluepoint Siamese, Whites, Tuxedos & Hemmingways. All spayed or neu- tered & Shots. Sponsored by Humane Society BowWow Boutique 5625 HWY 44 Crystal River 352-795-1684 -p= -- -== -- q REAL ESTATE CAREER I Sales Lic. Class I $249. Start 11/28/06 | I CITRUS REAL ESTATE I SCHOOL, INC. (352)795-0060 S/W Wanted, around 50 who will not change her mind and wont a new boy friend or want chil- dren. I want to be your only Man. Kids in my former ife were mean to me. So I do not care about them. I'am black with a wide chest, I will love you, kiss you and Mention that I am a 301b Spaniel Mlx. My Name Is Charlee and I need a home. Call me. (352) 795-1684 Need help rehoming a pet call us Adoptive homes available for small dogs FRESH KEYWEST JUMBO SHRIMP 13-15ct. $5/lb Boats unloading dally Is it time for your annual mammogram? FR 52-795-4770 M FRESH KEYWEST JUMBO If getting a mammogram isn't on your priority list, consider this: Research has proven that SHRIMP 13-15ct, $5/lb a regular mammogram is the best way to detect breast cancer when it's most treatable. So in 32 Boats unloading daily the inlikelv chance theor, i a nrhloblem ou ca n don znmhin nn,,t Tf, '.. An ao me1i- If u 352-795-4770 40 . ~ ....c.. a.... asse.s..n..s*.352-79cr.-4770 cucs LI 1Iey CM er sap oi yo cniosmung aou i. i you re q or olaer, talk to your doctor about getting a mammogram. And contact us for a free information kit. Hope.Pro9r..s%, Answers.111 -8 00-ACS -2345 1 w w w .cancer.org I WANTED: ROOM FOR WORKING FEMALE In Homosassa area, Smoker, works late nights. Wants to pay $25-$30 per week (352) 621-4607 0 'opyrighted Material Syndicated Content Available from Commercial News Providers" i a% FERO: GARDEN SIDE Bldg. F, Tandem 4/2, Level E $5,000; Pat 746-4646/Jan 613-0189 UNDER CONSTRUCTION SAVE $4,200 NOWI Fountain's Mem Park, Crypt for 2,below market value, moving (352) 422-0648 BOOKKEEPER P/T. Exp. w/ bookkeeping & payroll Please send resume to Citrus County Chronicle Blind Box 1226P 1624 N. Meadowcrest Blvd. Crystal River, FI 34429 JOBS GALORE!!! EMPLOYMENT.NET P/T ASSISTANT Comp. exp. Some Real Estate bckgrnd helpful. Fax to: 352-795-1720 P/T SECRETARY M-F12:30-3:30. Must have knowledge of County & excellent phone manners. Call (352) 527-6661 Fax: (352) 527-6662 Between 12:30-3:30. M a. LII The NEW Ranch Fitness Center & Spa Is seeking certified key personnel fora world-class fitness center, spa & salon scheduled to open December, Applications are being accepted for certified Personal Trainers Group Fitness Instructors Massage Therapists, Nail Technicians, Estheticians, Hair Stylists, Spa Attendants, Laundry Attendants and Front Desk staff. Email resume to: nlchelle neuman@ oaliorm or Fax resume to: 352-854-9491. On-site Interviews will be held at a Job Fair on Friday, December Ist, 12 pm- 6 pm and Saturday, December 2nd, 10 am 4 pm at Circle Square Commons, Master the Possibilities Education Center, 8415 SW 80th Street, Ocala HAIR STYLIST F/T. HR or up to 60% Comm. Pd. vac, Call Sue 352-628-0630 P/T HOUSEKEEPER Crystal River area. 352-795-6077/302-5797 ge . of Citrus County a Skilled Facility has openings for: 3-11 & 11-7 CNA's Great Start Pay! *Shlft differential "Bonuses *Tuition Reimbursement 401 K tcypret avantegrouo.com Iour world first. Even,' Day Classifieds BEHAVIOR ASST. 1 yr. exp. in Medical field or working with dev. dlabled. Must have CPR, first aid, HIV; Behavior Asst. Cert. (352) 314-0500 CERT. MED. ASST. Office exp., resume: . 204S. Apopka Ave. . Inverness FL. 34452, COME GROW WITH US! HOSPICE Join our team of caring professionals Accounting Manager Full Time Reports directly to the CFO to Insure accuracy and reconciliation of accounts payable, accounts receivable, billing, payroll and general ledger. - Responsible for budgeting, monthly tinanclals and year - end close. Supervises accounting department. BA degree preferred 1+ year healthcare - experience preferred, 1 + year supervisory experience required Knowledge Medicare/Medicaid billing. Proficiency In Word and Excel software required Excellent organizational, Interpersonal, telephone, documentation and communication skills Ability to use sound judgment and Integrity to handle " the confidentiality of employee and organization Information Apply Today Telephone: 352.527.2020 Fax: 352.527.9366 fthacher@hospiceof citruscourt}Ygr9 Hospice of Citrus County P.O. Box 641270 Beverly Hills, Fl 34464 hospiceofcitrus dwf/eoe -DI BER 18 2006 ALUC; SAI'U~il~tt,-. NOVEMLM DECLASSIFIED Cimuvs CoUNTY(FL) CHRONIC4~ C= .g,.. Event m Ticket IT Sciey', SATURDAY, NOVEMBER 18, 2006 11C F-I ,07Rus CouNTYl(FL) CHRONCLE CNA Full time w/ benefits, For busy medical office. Fax resume to 352-563-2512 F/T NURSES 3-11 Shift Avante at inverness is currently ,, accepting applications for -a full time Full Charge Nurse for our 3-11 Shift. Avante offers excellent wages and benefits including shift differential and bonuses. Please apply at: 304 S. Citrus Ave. Inverness or fax resume to: 352-637-0333 or you can email a resume to: tcgretQ avantegroup com EARN AS YOU LEARN CNA Test Prep/CPR Continuing Education 341-2311/Cell 422-3656 FT & PRN OTR & COTA OPENINGS at Diamond Ridge Health & Rehabilitation Center Dynamic and growing program. Competitive salary & benefits. Call Beth Snyder, Rehab Dir. 352-746-9500 HOUSEKEEPING SUPERVISOR Skilled Nursing facility seeks an experienced supervisor to run the day to day operations of the Housekeeping and Laundry Departments. Must have management and scheduling skills, be trained in environmental & infection control and operation of laundry equipment practices & procedures. Please mall resume to Citrus County Chronicle Blind Box 1225M 1624 N. Meadowcrest Blvd. Crystal River Fl 34429 HELP NEEDED FOR BUSY MEDICAL PRACTICE Fax: (352) 746-2236 LPN NEW WAGE SCALE. Seeking outgoing, energetic individual. Apply at: BARRINGTON PLACE (352) 746-2273 CILASSI[F]IEIDS LPN NEEDED Please send resume to P.O. Box 3087 Homosassa Springs, FL 34447 MEDICAL ASSISTANT Needed for busy family practice. P/T. F/T or PRN, Fax resume to: 352-795-5950 r Nurse F/T 3-11 I -I Shift differential. Bonuses abundant. Highest paid in Citrus County Join our team, I Cypress Cove Care Center 700 SE 8th Ave. Crystal River & mm1 mm mnm m i I Crare NURSES PRN FT CNA'S 3-11 Come join our great team and see what we can I do for youl We offer excellent pay and benefits. Call or come by and speak with Hannah Mand at 3325 W. Jerwayne Lane, Lecanto FL 34461. (352) 746-4434 EOE DFWP I I A/C Tune up w/ Free permanent filter + termite/Pest Control Insp. w/ Free Termite monitors. Only $44.95 for both.(352) 628-5700 caco36870 26 YRS EXP. Tree Service I-r r. ruiTiC ir-d., IrT .'7, I -. .:.r.r-El : L I 0183997 (352) 726-1875 A TREE SURGEON Uc.&lns. Exp'd friendly *serv. Lowest rates 4ree estimates.352-860-1452 AFFORDABLE, I HAULING CLEANUP, I PROMPT SERVICE Trash, Trees, Brush, Appl. Furn, Const, I | Debris & Garages | S 352-697-1126 All Tractor & Dirt Service 'Land Clearing, Tree Ser. SHauling, Bushhogging SDriveways 302-6955 ALPINE TRACTOR Land Clearing, Tree Ser. ' Hauling, Bushhogging ;Driveways 352-220-8723 iCOLEMAN TREE SERVICE ,Removal & trim. Lic. Ins. . FREE EST. Lowest rates 'guaranteed! 344-1102 DOUBLE J STUMP GRINDING, Mowing, Hauling,Cleanup, Mulch, Dirt. 302-8852 D's Landscape & Expert Tree Svce Personalized I design. Cleanups & !Bobcat work. Fill/rock & Sod: 352-563-0272. M&C Bob Cat Service I Tree & brush removal, land clearing. Free est. (352) 400-5340 R WRIGHT TREE SERVICE, Street removal, stump Sgrind, trim, Ilns.& Lic #0256879 352-341-6827 STUMPS FOR LE$$ . "Quote so cheap you won't believe It!" (352) 476-9730 STree Trimming, land Clearing, clean- ups. STractor Service Con- Screte slabs & masonry. #CBC059346 302-8999 Piano Lessons In my home. S.Call (352) 746-1305 To schedule your 1st lesson which is free Your World ej a'r49e4444e - Cu1~oNicI.E Clo..sftdsi MKisA1 BlaCKDira UiglTal design Computer Repair. On-site is Hourly, Pick-Up Is Flat Rate. Call usl 352-795-0484 CQMP PROBLEMS? No matter what I fix it In the comfort of your own home. In home repairs, training, upgrades & installation. LAN & wireless. (352) 795-2289 COMPUTERl TECH MEDICS Hardware & Software Internet Specialists (352) 628-6688 Cooter Computers Inc. Repair, Upgrades, Virus & Malicious software removal (352) 476-8954 CARPET FACTORY Direct Restretch,clean, repair Vinyl, Tile, Wood, (352) 341-0909 Shop at home REPAIR SPECIALIST Restretch Installation Call for Fast Service C & R SERVICES Sr. Discount 586-1722 v. Cing. Free est. 628-2900 BEB Painting & Handyman Inc.AII & ODD JOBS. 30 yrs J. Hupchick Lic./Ins. (Q52) 726-9998 Salazar Pqinting Int/Ext Roof/driveway & office cleaning Lic & Ins. (352) 61,n.0n 352.-249. 114 work 2 full coats.25 yrs. Exp. Exc. Ref. Lic#001721/ Ins. (352) 795-6533 WALLPAPERING Sr. Disc. available. Lic. (352) 746-7948 AVERAGE HOME PROF.CLEANED Twice per mo. $80 Supplies & Equip. Inc. Joe (352) 628-15 Mona's.Cleaning Residential cleaning Uc 99990257310 (352) 560-7632 or 400-3478 PROFESSIONAL CLEANING SERVICE Owner/Operated Bonded, Lic. & Insur. \Wi dean your home or office. S527-6674 Home 563-3554 Bus. Salazar Painting Int/Ext Roof/driveway & office cleaning Lic & Ins. (352) 601-5050 352-249-1147 West Coast Cleaning Co. Home Cleaning, Low rates, Free est,. Lic/ Ins. (352) 628-0993 The Window Man Free Est., Com./resldential, new construction Lic. &itlons/REMODELING New construction Bathrooms/Kitchens Lic. & Ins. CBC 058484 (352) 344-1620 Bergman Custom Int. Design &.Build. Drywall Framing, Tile, Kitchens & Baths. CBC058263 35 yrs exp 352-344-1952 Call Tacumsa Contracting for quality additions, remodels & repairs. Free Estimates CBC125, Lic PICARD'S PRESSURE CLEANING & PAINTING Roofs w/no pressure, houses.driveways. 25 yrs exp. Lic./Ins. 341-3300 "A BETTER CHOICE" For Home Improvement lie & Ins. Free Estimates BRIAN (352) 637-1637 #1 A+TECHNOLOGIES AFFORDABLE I HAULING CLEANUP, I PROMPT SERVICE | STrash, Trees, Brush, Appl. Furn, Const, I I Debris & Garages | 352-697-1126 L --- ml A# 1 L&L HOUSEHOLD REPAIRS. No job too small 7days wk. LUc #3008. (352) 341-1440 Andrew Joehl Handyman. General Maintenance/Repairs Pressure & cleaning. Lawns, gutters. No Job too small Reliable. Ins 0256271 352-465-9201 CCR SERVICES All repairs & main servlces.Llc,0257615/lns. (352) 6284282 Visa/MC CITRUS ELECTRIC All electrical work. Uc & ins ER13013233 352-527-7414/220-8171 Electrical Service Calls Licensed & Ins. Caomp. #EC0001303 352-726-7337/302-2366 FULL ELECTRIC SERVICE Remodeling, Lighting, New Instafll Lic. & Insur. #2767(352) 257-2276 All of Citrus Hauling/ Moving items delivered, clean ups,Everythlng from A to Z 628-6790 F AFFORDABLE, I HAULING CLEANUP, I PROMPT SERVICE Trash, Trees, Brush, I Appl. Furn, Const, I I Debris & Garages | Furn. Moving/Hauling 352-7264 201-1470 Uc.99990000005 Bo's (352) 628-4391 IRRIGATION- New Systems & Repairs. Ins. Lc. 3000.nn003/nn-233-358 MYRICK'S MARINE Const Docks Built & Repaired Lic #2564 / Ins. (352) 341-4152 RIP RAP SEAWALLS & CONCRETE WORK Lic#2699 & Insured. (352)795-7085/302-0206 All Tractor & Dirt Service Land Clearing, Tree Ser. Hauling, Bushhogging Driveways 302-6955 ALPINE TRACTOR Land Clearing, Tree Ser. Hauling, Bushhogging Driveways 352-220-8723 Benny Dve's Concrete Concrete Work All types! Uc. & Insured. RX1677. (352) 628-3337 BIANCHI CONCRETE Driveway-Patio- Walks. Concrete Specialists. Llc#2579 /Ins. 746-1004 CONCRETE WORK. SIDEWALKS, patios, driveways, slabs. Free. estimates. Lic. #2000. Ins. 795-4798. KEN DYES CONCRETE SRV. Serving Citrus Cty 30 yrs. llc Uc. & Ins. CBC 058484 (352) 344-1620 AFFORDABLE, I HAULING CLEANUP, I | PROMPT SERVICE | STrash Trees Brush Appl. Furn, Const, I SDebris & Garages | 352-697-1126 Beautify Your Bathroom completee Remodeling. American Plumbing, LIc.cfc 033820 795-4177 Bergman Custom Int. Design & Build. Drywall Framing, Tile, Kitchens & Baths. CBC058263 35 yrs exp 352-344-1952 W. F. GILLESPIE Room Additions, New Home Construction, Baths & Kitchens St. Lic. CRC 1327902 (352)465-2177 Bergman Custom Int. Design & Build. Drywall Framing, Tile, Kitchens & Baths. CBC058263 35 yrs exp 352-344-1952 REPAIRS, Wall & ceiling sprays. Int/Ext Painting LIc/Ins 73490247757 352-220-4845 FILL, ROCK, CLAY, ETC. All types of Dirt Service Call Mike 352-564-1411 Mobile 239-470-0572 All Tractor & Dirt Service Land Clearing, Tree Ser. Hauling, Bushhogging Driveways 302-6955 ALPINE TRACTOR Land Clearing, Tree Ser. Hauling, Bushhogging Driveways 352-220-8723 BUSHHOGGING, Rock, dirt, tree, trash, drive- ways. Call Sam Johnson (352) 628-4743 D&C TRUCK & TRACTOR SERVICE, INC. Landclearing, Hauling & Grading. Fill Dirt, Rock, Top Soil & Mulch. Uc. lns. TURTLE ACRES BUSHHOG SERVICE No lob too small Lic. Accepting Credit Cards (352) 422-2114 D's Landscape & Expert Tree Svce Personalized design. Cleanups & Bobcat work. Fill/rock & Sod: 352-563-0272 RAM Landscaping Specializing In Pruning. Call Me (352) 637-6588 SSOD SOD SOD- BANG'S LANDSCAPING B'S LAWN LAKE Senior Discount Free est., Cuffing, Trim, Mulching(352) 400-5923 Complete YARD CAREII Mulch, Trim, Plant, Press. Wash & Hauling John Hall Lawn Maint, Uc + Ins. (352) 344-2429 DOUBLE J STUMP GRINDING, Mowing, Hauling,Cleanup, Mulch, Dirt. 302-8852 POOL BOY SERVICES Total Pool Care Acrylic Decking u 352-464-3967 POOL LEAKING?? Pool Leak Detection Since 1964 352-302-9963/357-5058 POOL LINERS!, $70, delivered (352) 344-1604 WATER PUMP SERVICE & Repairs on all makes & models. 3442928. An- ytime, 344-2556, Rich- ard REPAIRS: Alum. & Steel Small Jobs OK - Crystal River (352) 302-6726 Donna's Errand Service Groceries, banking, P.O., misc. References 352-563-6680/220-9161 MR CITRUS COUNTY REALTY ALAN NUSSO 3.9% Listings INVESTORS BUYERS AGENT BUSINESS BROKER (352) 422-6956 ANUSSO.COM RAIN UAINR K 6" Seamless Gutter 7" Commercial Copper & Aluminum Best Job Lic. & Ins. 352-860-0714 S ALL EXTERIOR I ALUMINUM I Quality Price! 6" Seamless Gutters I Lic & ins 621-0881 = Lm mmmnm ALUMINUM- SidJin .S ,'il k F.c...S, im nn .R:,.R.l..c rs.CC jr,,i- I Screen Rooms, Decks, Windows, Doors, Additions WHAT'S MISSING? Your ad! Don't miss outi Call for more information. 563-3209 Improve the efficiency of your A/C & REDUCE the MOLD & MILDEW with our special preventative spray treatment j l" OCall 220-9260 I I O M IN J.L.A. Superior Maintenance Residential & Commercial Interior/Exterior Cleaning & Painting Power Washing Lawn Care Windows Gutters Home Repairs Reasonable & Reliable um. 270-3551 Lic. & Insured P/T MEDICAL RECEPTIONIST Medical exp. pref'd. Fax resume to:489-5786 SURGICAL PHYSICIAN'S ASSISTANT Surgical PA, either exp. or Interested in learning. Surgical exp. helpful but not required. Assisting in the OR, dally rounds & office hours. Enthusiasm & a strong work ethic required. We offer competitive pay and exc. benefit package. Fax resume to 352-694-1717antegrouo.comI. 2'tCopyr1ghedMaerflal Syndicaid Cop1en1 AYVe from Qommero~ W~ Po~es abrnelat CmEI1dcar7 87272 CITRUS COUNTY (FL) CHRONICLE 'Copyrighted Material =: Sydicated Contenti " Available from Commercial News Providers" r a w *NOW HIRING* Join Coldwell Banker Next Generation Realty & $$$ Earn while you learn $$$ Hiring newly Licensed Real Estate Associates Call today to jump start your career In Real Estatell Call Summer today (352) 382-2700 (352) 424-1706 * Administrative Support With clerical exp. Full or Part time. Salaried 24k-29k per year. For Interview call (352) 397-4234 EXP'D REAL ESTATE AGENTS WANTED United Country Pulsar Realty Bob (352) 637-3010 RealEstael REAL ESTATE CAREER I Sales LIc. Class I I $249. Start 11/28/06 CITRUS REAL ESTATE I SCHOOL, INC. (352)795-0060 A Sporting Health Club is seeking experienced and motivated Massage Therapist on self employed basis. To apply call (352) 563-2249, S'Proven ability to effectively coordi- nate multiple projects across different departments and business units on deadline. SA working knowledge of audio, video, Flash, Go ULive, and content management systems preferred Essential Functions: 'Maintain the dally content of the site .Identify and prioritize untapped online content opportunities that exist in the local and area markets. Please mall your resume to: J. Burchell 1146 Dartmouth Terr Inverness, Fl 34452 Bartenders/Servers Apply in person Seagrass Pub & Grill 10386 W. Halls River Rd BAKERY HELP & PKG & DELIVERY EARLY MORNINGS Apply Monday Friday before 10am at 211 N. Pine Ave., Inv. *BARTENDERS *COOKS *SERVERS *MGMT STAFF Exp. preferred. High volume environment. COACH'S Pub&Eaterv 114 W. Main St., Inv. 11582 N. Williams St., Dunnellon EOE EXP. SERVERS Banquet experience a plus. Apply In person INVERNESS Golf & Country Club (352) 726-2583 F/T or P/T WAITER & WAITRESS NEEDED Apply In the office at: Seven Rivers Country Club 7395 W Pinebrook St., Crystal River EOE / Drug Free Q,( Lecanto 746-6611 EOE, DFWP New Restaurant CLAW DADDYS RAW BAR & GRILL Now Hiring ALL POSITIONS Apply In Person 1601 SE Hwy 1.9 Krash n Karry Plaza MC DONALD'S IN CRYSTAL RIVER ALL SHIFTS Apply in Store NOW HIRING EXP. BREAKFAST COOKS Top Pay & benefits. Crystal River and Inverness locations. Cockadoodles Cafe (352) 637-0335 NOW HIRING EXP. BREAKFAST COOKS Top Pay & benefits. Crystal River and Inverness locations. Cockadoodles Cafe (352) 637-0335 NOW HIRING PREP COOKS LINE COOKS & WAIT STAFF Experienced Only Apply within. Peck's Old Port Cove 139 N. Ozello Trail Crystal River. PT PREP, PIZZA, PANTRY COOK DISHWASHER & Delivery Persons Apply In person Wed Sat. Sugarmill Woods Country Club at 1 Douglas Street Homosassa RIVERSIDE INN Fine Dining Exp. Formally December PANTRY CHEF $11 an hour Hiring Immediately 352-447-3451 George Do you enjoy solving problems? Have a background in sales? Want to work part time? You wodd work te affer- early evenings talking to customers to Iv-tved zI sales of news- pqjer subscriptions. Sound like something you'd like to do? Call 563-3256 and speak to Kathle Stewart. qualified o employee?' This area's #1 em ploy men t source! C ........t FW MONTHS OF RECORD BREAKING GROWTH..... Have brought us to one conclusion.... We need to add one more salesperson to our staff. Are you good enough to Join the best sales team In the area? WXCV/WXOF Is looking for the perfect fit to add to our group. Must be media savvy and a strategic thinker. If you think you are good enough to Join the best please emall your cov- er letter and resume to staff@cltrus95radlo comr New Home/ Real Estate Sales Professionals SanderSon Bay Fine Homes Established Citrus County Builder looking for Sales Professionals to be part of a growing team. Salary plus commission and benefits. Real Estate license, positive attitude and excellent work ethics a must, Opportunities to manage Sugarmill Woods model. Position also available In Pine Ridge. E-mail Resume to dbosworth sandersonbav cornm , All Information Is confidential. LN stk#s3338o Auto, Loadedl F-- EXP'D OUTSIDE SALES 352-628-0916/476-5885 PHONE REPS NEEDED Set your own hours Set your own pay rate Exp. preferred Call 352-628-0254 r REALSTATE CAREER Sales Lic. Class I * $249. Start 11/28/06 I CITRUS REAL ESTATE I SCHOOL, INC. I (352)795-0060 IIIIIIJ Retail Sales Supervisors A growing company, seeks motivated individuals, to join our Management Team. We offer benefits, employee purchase discount and unlimited opportunity for advancement. INLAND OCEAN SURF SHO Paddock Mall Ocala Please fax resume to 352-873-4356 attn: Dawn Bechtel EOE Your World i '06 VIBE SAVE $7,000 $14,887 '06 MONTANA SV6 WW SAVE '14,000 Leather, Entertainment Center, RearA/C, Power 7,788 Windows & Locks, Tilt, Cruise, CD '06 PONTIAC GRAND PRIX SAVE *9,000 $14,877 Stk#334010 Power Windows, Locks, Cruise, Tilt & CD '04 KIA RIO Very Clean, Low Miles, Great on Gas, Stk#7K080A '03 PONTIAC VIBE Low Cost, Low Gas, Low Miles, Very Clean, Stk#6E314A '02 PONTIAC FIREBIRD Leather, T-Tops, Chrome Wheels, Nice Ride, Stk#333840 '05 CHRYSLER PACIFICA Don't Miss This One, SUV With Class, Low Miles, Stk#7M046A '05 DODGE GRAND CARAVAN Sto N' Go, Great Condition, RearA/C, Stk#334130 '05 FORD FOCUS ZX4-SE Very Clean, CD, Low Cost Ride, Stk#333600A '02 HONDA CIVIC 4DR Real Sharp, Very Clean, . Low Miles Power Options, Stk#6R505A '06 DODGE STRATUS SXT CD, Power Options, Real Low Miles, Very Clean, Stk#334180 '06 CHRYSLER TOWN & COUNTRY Sto N' Go, Real Clean, CD, All the Van You Need, Stk#334250 '03 FORD MUSTANG Low Miles, Very Clean, Sport Wheels, Stk#333460A '05 BUICK LeSABRE Bench Seat, All the Toys, Luxury Ride, stk#333960 '06 NISSAN SENTRA Very Clean, Power Options, Low Miles, Stk#334320 '05 CHRYSLER PT CRUISER CONV. '06 CHEVY 2500 EXPRESS VAN Great for Transport, Like New, Stk#334290 SALES/CASHIER F/T or P/T, flexible schedule. Great jobi Great pay. Call for Interview. Wildwood Location. (352) 572-2452 AUTO DETAILERS Port Richey, Brooksville, Inverness, & Crystal River Area Dri. Uc & background check req'd DFWP (352) 302-2863-Fri DFWP/EOE CONSTRUCTION SUPERINTENDENT Must possess strong organizational abilities, strong framing background mandatory, full benefit package, company vehicle. Send or Fax resume to: Len Kelley, Rusaw Homes, Fax 352-746-0694, or mail to P.O. Box 640340 Beverly Hills, FL 34464 CLASSIFIED Carpenters /Sheeters Medal frame exp. a plus, tools & trans. req. (352) 238-6808 EXP. GRANITE INSTALLER Hourly wage based on exp. Full Company benefits. Lots of over, time. Apply at LEVERETTE HOME DESIGN CENTER 2648 NW 6th St. Ocala Fl., 34475 (352) 620-2055 RR~ 1. e Kt F6ld" first. 0 very ) a, CQRONUif claimirwai AUTO PAINT-TAPE P/T or F/T, Exp'd, must have D.L. 352-613-4532 EXP'D PLUMBERS & HELPERS Drivers Uc./Tools Req'd. (352) 637-5117 MASONS TENDERS I Experienced Rough Tubset Trim If not don't apolv 621-7705 * TOWER HAND Starting at $9.00/hr Bldg Communication Towers. Travel, Good Pay & Benefits. OTa DFWP. Valid Driver's License. Steady Work. Will Train 352-694-8017 Mon-Fri F/T & P/T 2nd shift positions working 2:30-10:00pm now available. Flexible schedule w/ vacation pay, profit sharing and BC/BS w/$10 monthly co-pay for FT positions. Safety bonus pay and 401K for all positions. Casual dress code. Duties include med pass, first aid, charting and training residents in self-med and health care skills. M: '06 PONTIAC G6 SAVE ag $9,000 .... ' S14,388 , '06 GTO SAVE *7,000 $28,394 ;, Locks, Cruise, Tilt & CD Auto, Loadedl '06 YUKON DENALI XL SAVE *11,000 *59,688 '05 PONTIAC VIBE Low Gas, Low Cost, Very Clean, Low Miles, Stk#333410 '05 FORD TAURUS SCS Leather, Loaded Q larlk qwv^ '05 TOYOTA COROLLA Like New, Great Miles, Low Cost, Very Clean, Stk#333790A '02 CHEVY TAHOE LT Leather, Sunroof, Real Clean, Memory & Heated Seats, All the SUV, Stk#6K406H '06 MERCURY MOUNTAINEER PREMIER Lots of SUV, Leather, 5K Miles,,fTTr? DVD, All the Extras, Stk#7M004A '04 CHEVY VENTURE LS Silver, Ext., Very Low Miles, Super Clean, Must See, Power Seats & Sliding Doors, Stk#6R496A '05 PONTIAC VIBE The Fun Car, Great Gas Miles, Very Clean, W WW Stk#6A648A W '06 CHEVY UPLANDER '04 JEEP GRAND CHEROKEE '05 GMC DENALI All the SUV You'll Need, All the Toys, Stk#7M018A SLOW CREDIT, NO CREDIT, BAD CREDIT CALL JOE AT (888) 4-980892 MOBILIT Cm BonWorth (Ladles wear factory outlet) Inverness Regional Mall 1488 US Hwy 41N, Inverness FI Is looking for *F/T MANAGER Must be available days, nights, and weekends. Flexible hours are a necessity. We offer competitive wages, benefits (F/T) and generous employee discount. EOE Apply at store location or email csr@bonworth.com or Call 1-877-472-1537 for Pauleete ext. 305 Retirees are encouraged to apply. AWNING HELP Exp. awning person familiar w/fabric, Installation, alum. welding a plus. 352-302-1343 BAKERY HELP & PKG & DELIVERY EARLY MORNINGS Apply Monday Friday before 10am at 211 N. Pine Ave., Inv. BUDDY'S HOME FURNISHINGS Is currently seeking a Delivery Driver/ Account Manager Trainee. Good people skills. (352) 344-0050 or Apply In person at 1534 N. Hwy. 41, Inverness. EOEDFWP SATURDAY, NOVEMBER 18, 2006 13C I r er"rm S" .iATOT PROTECION fc-PfACKAG E'' 10 Years/lO00,000 mile limited powertrain. warranty1 5 years/60,000 mile limited basic warranty' 5 years/100,000 mile limited anti-perforation warranty1 5 years/60,000 mile 24-hour roadside assistance'12 1 year/12,000 mile tire & roadside hazard protection'2 '.% PT I *y ra.,r ,Tll.dI ik~ h.. : .: 1 *'i ncii. r iL g pon il9-.lran a ba.:] bI. w-,,T-,r,re, Air waraite are IIInlild See dealer Ior deItail, orgo ',! .'..T| ;J-r.,.ur r.:, i.,1..r ,3,' : onad r ) lr a d pruce rno, (ae cir. ie plindE rydeid by Kia M rlrs Ameria, Inc Kl 0 s ------- ------ ,-, ----- ------ CITRIus (CoIn' (FT) CHRoNiC.rE ::i v i T $I "I CITRUS COUNTY (FL) CHRONICiE 14C SATURDAY, NOVEMBER 18, 2006 CASA IS HIRING P/T position Wed & Thurs. 7p-7a, $8hr. Must be able to case-plan and communicate professionally with victims of domestic violence. Applications on site @ 112 N. Pine Ave. Inverness, FL 34451 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 DRIVER/HEAVY EQUIPMENT OPERATOR NEEDED Relief Driver for Porta toilet route, roll off route, heavy equip- ment operator. Fax Resume To: 352-568-0110 Dunnellon-Helper For All Aspects of Flooring Installation. (352) 489-4444 LINE PRODUCTION FOOD PROCESSING FT must be able to lift 25lbs & be able to stand thru shift. For more Info contact CustomeSer Service at 866- 628-0032 toll free or 352-628-0037 PHONE REPS NEEDED Set your own Hoursl Set yaur own payratel Call 352-628-0187 The Sumter County Health Department has an opening for a Health Support Technician Florida CNA licensure required. Bilingual English/Spanish a plus. Must be a team player and able to multi task. Exp. with weighing, measuring on-line at: Refer to requisitiaon number 64000378. Only State of Florida Applications will be accepted - EO/AA/VP Emplayer. EO/AA/VP Employer. JOBS GALOREIII EMPLOYMENT.NET REAL ESTATE CAREER | Sales Lic. Class I I $249.Start 11/28/06 CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060 WE BUY HOUSES Ca$h........Fast I 352-637-2973 1Ihomesold.com CASHIER PT Recent exo only Nights & wknds. 352-527-9013 P/T FURNITURE DELIVERY DRIVER & ASSEMBLER Must be 21 yr old. Exc. Driving record. Dependable worker. Apply in person Crystal River Mall Florida Hearth & Home. RESTAURANT HELP NEEDED Approx. 25-30 hrs. wk., hrly. rate, tips, and golf benefits Apply In person @ Citrus Springs Golf & Country Club 8690 N. Goltvlew Dr. 352-489-5045 Directions THE PERFECT PART TIME JOB Contract advertising sales position. Set your own hours, days. Fun jobi Must have sales experience, be organized and self-motivated. Local, established publishing company needs you. Send your resume to: dckamlid chronicleoline corn Or Fax to: 352-564-2935 PSYCH NURSE LifeStream Behavioral Center located in L es- burg, FL is looking for a RNto work in our Inpa- tient Hospital. Musthave an active FL license. Apply 515 W. Main St. Leesburq DFWP/EOE REAL ESTATE CAREER S Sales Lic. Class I 1 $249. Start 11/28/06 CITRUS REAL ESTATE I P SCHOOL, INC. SUBSTANCE ABUSE THERAPIST MA degree, preferred exp. in Substance Abuse or CAP. Apply LifeStream Behavioral Center 515 W. Main Street Leesburg, Great Benefits DFWP/EOE GREAT INVESTMENTII Upscale deli. Prime demographics area S260K Serious i- S16 495 Many Sizes Avail. We Custom Build We Are The Factory Fl. Engineered Plans Meets or Exceeds Florida Wind Code METAL STRUCTURES LLC.COM 1-866-624-9100 metalstructuresllc corn Your World . I ONICI, I 20x21x7 2cg, (1) 16x7 Sectional rollup (1) entry dr, (1) Indow Concrete slab w/ footers $8,949.00 1-877-880-5808 We are state licensed Contractor Uc. #CGC347 I General c= Help I WE MOVE SHEDS 352-637-6607 Antique Sale-Owner retiring. Great buys for dealers or collectors. Vintage gold, silver, costume & indian jewerly. Unens, furn., porcelans, pottery, sterling, etc. Shop full of beautiful things at rock bottom prices. Sale starts 11/16 Open 10-5 Mon-Sat 212 N. Main St. Bushnell. (352) 568-1753/793-2720 no credit cards. Do You Have An Antique Collection? Please consider showing it @ Grumbles House Antique Collection Show Sat., Jan. 27th Nancy (352)208-6789 *" oilorive Your world first. Ever' Day CliRp NiCLE Classifieds "LIVE AUCTIONS" For Upcoming Auctions 1-800-542-3877 MAYTAG WRINGER & TUB, $200 JAPANESE RIFLE $200 (352) 637-6031 ow-i- DOLLSII Orig. new porcelain Works of Art by prominent doll artist Faith Wick, entire 1980's collection. Offered at give-away price. Dealers Only! (352) 527-1143 A/C & HEAT PUMP SYSTEMS. 13th SEER & UP. New Units at Wholesale Prices -- 2 Ton $780.00 - 2-/2 ton $814.00 -- 3 Ton $882.00 *Installation kits; *Prof. Installation; *Pool Heat Pumps Also Available Free Deliveryl Call 746-4394 Bus Drivers PT DRUG FREE WORKPLACE Apply within the HR Dept. 130 Heights Ave., Inverness, Florida 352-341-4633 or Online at keytrainingcenter.org (TDD: 1-800-545-1833 ext. 347) 69325*EOE* 653255 STORE HOURS 4040 SW i-STORE HOURS R00 COLLEGE RD MON-FRI 8:30-8PM44 WEST OF 1-75 SATURDAY 8:30-7PM LIBERTY AND THE PURSUIT" SUNDAY NOON-5PM D l E SERVICE HOURS M-F 7:30-6PM I r6- As SATURDAY8-5PM All prices plus tax, tag & dealer fea of '698.50. Vehicle in stock but subject to prior sale. This offering Is valid date of publication only and supersedes all previous offerings. Pictures for illustration purposes only. All payments W.A.C. Based on 72 months @ 7.9% A.P.R. CLA .dQ[Nk-. (7) DRYERS & (1)WASHER $60/EA. (352) 628-4321 after 12 ABC Briscoe Appliance Front Load Washer, et c Sales Service & Parts. (352) 344-2928 ALL APPLIANCES All in Stock, Full Warr. Stainless Wk Specials. Buy/Sell 352-464-4321 APPLIANCE CENTER Used Refrigerators, Stoves, Washers, Dryers. NEW AND USED PARTS Driver Vent Cleaning Visa, M/C.,A/E. Checks 352-795-8882 COMM. REFRIGERATOR Kenmore, 20 cu. ft., No freezer. Used 1 yr. Exc. Cond.$295 (352) 794-5099 FREEZER GE Upright, 1 year, 4 yrs. guarantee left. $275, (352) 382-7680 FRIGIDAIRE BIk. Fridg e X Side w/water & ice/dr. $325 KENMORE STOVE Self cleaning BIk, Elec. $325 352-795-9537/586-9259 Y ur" ,wdrtld first. t ErerO Dct CIlik()NICI.E C;., --a.r Elec. Stove 4 yrs. old, self clean, white, $75 (352) 726-6075 Frigidaire Chest Type Freezer, medium size. Exc. condition. $175. 352-860-2854, call 9am-2p.m KENMORE WASHER $199 KENMORE DRYER $149. (352) 563-0425 Refrigerator $125. Stove, like new $350. (352) 586-8201 Refrigerator, Kitchenaide bottom freezer. 21 cubic ft. almond. Excel. cond. $500. (352) 746-1360 SHARP MICRO-HOOD BIk, Good Cond. $125 352-795-9537/586-9259 UPRIGHT FREEZER 18 cu.ft. Kenmore $125.00 (352) 746-6010 UPRIGHT FREEZER Kenmore frostless up- right freezer, $150.00. Excellent working con- dition. 352-746-9109 WASHER & DRYER, like new $285/set, satisfac- tion guar. Free del. & set-up 352-754-1754 Dishwasher $50. Good condition (352) 746-3192 Hon Metal Desk, $100 2 waiting room chairs, $20 each. OBO (352) 637-5480/ 385-400-2211 OFFICE SET-UP Light Oak Exec. Desk, Computer Desk, Chair, Latteral Files (2), Book- case, Computer w/all- in-one printer. $1,000 firm (352) 220-8310 130 Asst. Sawzall Blades $100 takesall. (352) 746-7023 ..k AIR PRO Air Compress4 4HP, 50' hose, $175/obo (352) 344-1948, leave message. Alum. ladder, folding 16FT, like new, $75 - Tow bar, like new, $50 (352) 726-6075 Craftsman, Socket, crescent wrenches, pli- ers, hammers, etc. 50 or more pieces. $150. (352) 795-0640 Makita Battery 3 3/8, Cordless Saw w/2, chargers extra battery $20. Sears Battery Screw Gun $25. (352) 697-1200 4 CITRUS COUNTY (FL) CHRONICLE - uElie] "'ilwaukee Sawzall, $30. Makita Sawzall, $35. Makita Sawzall, $50. (352) 697-1200 New Hobart ARC Welder 240 volts with carry cart gloves, mask. rods, all accessories cost $900 sell $400 (352) 634-0432 Standard Lock Jig $30. Makita Power Plainer $45. (352) 697-1200 Wet Saw used 1 hr., 8" blade r.ei Arbor type, pd. .- $300. take $200. '. (352)621-7989 '" (407) 766-0961 32" RCA TV 2 years old, $175. (352) 586-8986, between 4 & 7 pm Bose Radio & Cassette player. Full size. Incredible sound. $325. OBO (352) 746-4565 Sony DVD Home Theatre System. 850 Watts, surround sound, 5 speakers + sub woofer. Excel. cond. Used 1 wk. Asking $250. OBO (352) 503-4136 16' Pine Fence Board, .550@; Cherry lumber, 2.00/tt. Rough sawn, ir dried, 352-212-4122 Craftsman 14" gas haln saw. Sharpened ,nd adjusted. $60.00 S Bath vanity top, formica w/sink, 3 31 "x22" $25.00 ". (352) 795-6736 -Drled Walnut Lumber 160 bd. ft., plalned, 3/4 x 8'. $250. aba Roto Tiller, MPD, used twice $200. ,.. (352) 637-6952 : INTERIOR/EXTERIOR DOORS. .HUGE INVENTORY OF OAK CABINETS. ,VANITIES: Oak & Birch LL IN STOCK.Floral City (352) 637-6500 *.New MAPLE CABINETS j(2) 30" LX 35"H X 24"D In box org. $1,000. ,. Asking $300. ,* (352) 527-8549 ,: REBAR *, 120 linear ft. $35. (352) 527-8549 -U "'98 Windows Computer ,'* w/ printer, many i.' odds n ends first $150. (352) 746-3977 blackbird Digital Design -% COMPUTER REPAIR ., On-site Is Hourly, Pick-Up Is Flat Rate. '-Call usl 352-795-0484 ,.-DELL PENTIUM III PC 256RAM, WIn2000, 0' Office 2000. $110 e.: (352) 245-4632 -'DIESTLER COMPUTERS r i.,ferr.el :er.l,.e tie.' & 'je .,i,,rern: parr: &. . pdaac. , i:a '.,, SICord 637-5469 ." -U k2 matching light beige PJpholstered WingBak 'Chatrs. $75.00 each s (352) 382-5883 2 North Hickory WLMatching Wingback * Chairs. Exc. cond. : $150 ea. (352) 637-2863 $ 5 PC. Oak Entertainment center .w/lights, 81"WX82"H, ,- holds up to 42" TV, liIke new, $500/ obo; l. (352)344-4836 6 PC. Solid Wood SPine Bedroom Set. ,Can be Full or Queen Excellent cond. $500/ obo; (352) 344-4836 ':6' FUTON (New) 3'-Blk steel frame, extra -" thick padding. Drk -" green. $190 ((352) 563-1418 Iv. mess. c- ADJUSTABLE BED '"VFu. Sz. Temperpedic; "'V/ibrates; Barely Usedl I- Guest Bed ,New $2,600/Sell $800 .aobo (352) 533-3145 BASSETT SECTIONAL v'Wlth queen sleeper & : ottoman, earth tone print, $275 obo, 5, (352) 344-3948 Beautiful Art Picture ($.100.00 Key West Lamp r- $30.00 Homosassa S(352)621-6959 '" BED $Qu Box Springs, Matt. & i Frame. Ext. clean $99 KIOVESEAT (Pastel) $30 t352) 795-2706 Iv. mess. Bedroom Set, 7 pc. queen $600. Dining Rm Set, solid oak, w/ 4 chairs, seats 10 comfortably $500. (352) 527-8638 BEDS + BEDS + BEDS The factory outlet storel For TOP National Brands Fr.50%/70% off Retail Twin $119 +* Full $159 Queen $199 / King $249 Please call 795-6006 COMPUTER ARMOIRE armoire and chair like new $200.00 628-9266 after cell# 476-5453 COMPUTER DESK 72"H X 49"W X 23" Deep Desk $20; BOOKCASE $5 (352) 628-4115 COMPUTER DESK Inci cor unit, $125; desk chair $25; Scanner $40; Almost new Compact Refr $75; 352-382-0439 COMPUTER DESK w/Office Chair $60; PVC PATIO CHAIRS Reclining w/ottoman $100 (352) 628-3995 COUCH Small $25 TWIN BED $35 (352) 637-5103 Dining Rm. Ste. Trestle Table & 4 chrs. w/ cap- tain also 2 pc. lited chi- na, llte Oak Kane's Price $1,900 sacrifice $900 obo(352) 291-2082 Cell (352) 634-3783 Dining Room Set 6 chairs. Black, acrylic $200.OBO (352) 302-7725 Dining Room Set, formal, 6 chairs /2 arm, exc cond, solid cherry wood, triple china closet, $1200. Freezer. Sears, Kenmore, $150. (352) 502-2982 Dining Table & chairs & china hutch $150. (352) 344-1823 Dining Table, chrome/ glass, 38 x 72 ext. 92". 6 Skirted chairs. $500. Antique oak table. 34" square. Ext. 58" 4 chairs. $400.00 (352) 563-5380 Furniture for Sale Sofa Bed $250. Dining Room Set. $500. 352-586-8201 HANDSON GOV'T ISSUE STEEL DESK Wood grain top, tan sides $65 (352) 344-4883 WE BUY ESTATES * CASH PAID, Fine Furn. Antiques & Collectibles (954) 854-2364 Large Recliner, green, top of the line $275. (352) 344-3439 LIV RM FURN Sofa and Loveseat. Exc. Cond. $400. Ent. Center & Accent Tbhis $75.00. 352-382-7647 Living Room & DR SETS Contp. Pastel Couch/ Loveseat; w/Glass Top End Tables & Match: Coffee Table, Exc. $400; 4 Wicker Barrel DR SET Chairs w/Brown cushions & tinted glass top on wicker base. VG $250 (352)795-3196' 'Living Room/LANAI SET White, rataan w/light pastel FL couch & loveseat w/cushlons & glass end & coffee tables w/Ig FL lamps. VG $500(352) 795-3196 LOVESEAT Tan w/pillows $100 (352) 382-5055 Lt. Green upholstered swivel rocker & 1 gold chair $50 ea. Inverness (352) 341-4777 Lt. Rattan Sofa & Love seat, $500. Lazy Boy Rocker Recliner $60. Inverness (352) 341-4777 MODEL HOME FURNITURE Whole house package at below wholesale. No separation. New cond & very stylish. Contact builder at 352-302-9761 Oak Entertainment Center, w/ lights, 6'x6'/2' $40 FULL SIZE BED $40 (352) 637-5103 Queen Sleeper Sofa (neutral) matching loveseat w/ middle drawer $350. 2 framed Southwestern Prints $150. & $100. (352) 382-3494 SECTIONAL SOFA w/qu. sleeper, neutral Pd $1,300/Sell $700 Exc, Cond. (352) 746-3757 Single Bed 6 mos. Old Serta Boxspring, mattress & Frame,; $100. (352) 637-0203 Sleeper Sofa 100. (352) 382-4581 SOFA BED Qu. Sz., Dark Green, Like Newl $300 (352) 341-6996 SOFA, leather, light brown, very comforta- ble, great condition. $200. Advent Legacy Speakers, $100/obo (352) 344-1531 SOFA/FUTON Like New $150; BUNK BEDS Pine, can be split $120 (352) 564-1454 Sterns & Foster Kingsize mattress & boxspring, like new, $800 obo (352) 726-4764 The Path's Graduates, Single Mothers, Needs your furniture. Dining tables, dressers & beds are needed. Call (352) 746-9084 Tredle Sewing Machine, (white) w/ attachments & books $100. Brass King Sz. headboard $35. (352) 637-5171 MR CITRUS COUNTY REALTY 15.5 HP 42" Murray Ride on with Bag catcher and trailer, 4 yrs. old runs good $400. (352) 634-0432 CHAINSAW Homellte 14" gas. Used twice $75 firm. 352-795-3812, 352-422-4873 CRAFTSMAN 17HP Kohler Engine, Riding Lawnmower w/bagger, $800; CRAFTSMAN Lawn edger, $50. (352) 860-2854,' 9a-2p ELECTRIC LAWNMOWER 13" MTD rear bagger. $75. (352) 746-6010 FREE REMOVAL OF Mowers, motorcycles, RV's, Cars. ATV's, Jet skis, 3 wheelers, 628-2084 MTD Riding Mower 14.5 HP, 42" cut w/ steel dump trailer, runs great, $400. obo (352) 302-2063 Murray 40" 13.5 Hp riding mower $350.00 Homellte 16" chain saw .$50.00 (352).465-8162 RIDING LAWN MOWER, John Deere, 14hp, w/ bagger, $1200. (352) 344-8902 TORO MOWER 8HP, 25" cut, runs good, $100 (3521637-3333^ MEXICAN PETUNIAS 1 Dz. Gigantic Plants In 1 Gal. Pots $30 Hg. Rootball. Blooms all summer. (352)344-4883 Bev. Hills/Oakridge Sat. & Sun. 8-? Moving Salell 6120 N. Misty Oak Ter. BEVERLY HILLS Fri. & Sat. 9-? Furniture 212 W. Thistle PI. BEVERLY HILLS MOVING SALE Fri. & Sat. 8-? 47 S Desoto St. BEVERLY HILLS Moving Tag Sale Fri & Sat. 9am-2pm Furn, Decorating Accessories, Xmas Decor, Dog cage, golf clubs. Great Buyslll 319 S. Tyler St. Beverly Hills Sat, 8-4. Lots of Xmas Deco. Misc Hshid Items 75 SJ Kellner Blvd. BEVERLY HILLS Sat. 11/18, 9a until MOVING SALE Household & misc, Items. Motor bike. 402 S Jefferson St. BEVERLY HILLS SATURDAY NOV. 18, 9-3 golf Items, mens clothes gift Items, Avon, misc., 439 W. Blueflax Ct. off Forest. Ridge * *AT**lTENTION*** FORMER NEWSPAPER CARRIERS '. T S4563-3282 687000 mim Beverly Hills Sat. Nov. 18, pwr. tools pressure washer bunk bed, 48 Bev. Hills Blvd. Brentwood Cit Hills Everything Goesilll Fri. & Sat. 17 &18, 8am 2442 N. Brentwood CIr. BROOKSVILLE "Market on Main St. Sat. Nov. 18. 9am-2pm Betwn Broad & Liberty (352)797-9330 INVERNESS FLEA MARKET CC Fairgrounds Invites The Public SATURDAY ONLY $4.00 Outside $6.00 ~ Inside 7am til ? For Info Call 726-2993 Cit. Hills/Hernando Fri. & Sat. 8:30-4:00 Xmas Items, Etc. 1084 E Cleveland St CITRUS SPRINGS 2 family yard sale Sat. 8am-? Baby items, household misc. etc. 8163 Tiny Lily Dr CITRUS SPRINGS Sat, Sun. 8-3 HUGE MOVING SALE, 7320 N Tranquil Dr. CITRUS SPRINGS Sat. 8-? Computer parts tools, antiques, misc 8094 N Hillview Cir CRYSTAL RIVER Fri. & Sat. 8:30am-till Something for everyone Off Kingsbay Dr, 2 blks. behind Suntrust, 1520 SE Pinwheel Dr. CRYSTAL RIVER Fri. & Sat. 9-3 Baby/Kids, Furn., Toys, Lots of Stuffl 1923 SE 3rd Ct. CRYSTAL RIVER Mon. & Tues. 8-2 Tools, H.H. Items, turn., hand knitted Items 329 N E 10th St Crystal River Sat. & Sun. 18 & 19, 9am 8089 W. Pine Bluff St. 3 pc. enter, center, band saw, freezer, met- al trunks, end & coffee tables, beds w/ qn. matt, and lots of misc. CRYSTAL RIVER Sat. & Sun. 9-5pm 8156 W. Woodbury Ct. Couch, bed, washer, desk, microwave, TV stand, many odds & ends, Questions? (715) 897-0190 CRYSTAL RIVER Sat. & Sun. Nov. 18 & 19 Huge 2 Fam. Yard Sale on Lake Rosau. off 488 CRYSTAL RIVER Sat. Sun 8-3. 2 Family Yard/Craft Sale. Deer stand, toys, clothing, Christmas items; jewelry 12029 W.Checkerberry DUNNELLON Fri. & Sat. 9-4, Books, etc 5355 W Blade Lane Floral City Sat. Nov. 18, 10-4 No early birds. 12252 E. Deer Lane E. on 48 out of Floral city, 2 ml. to trails end rd. 4 ml, to canal, follow signs Old tools/furniture org. paintings/frames FLORAL CITY Used Treasures Sale. Floral City United Methodist Church, Sat. , ,Nov. 18,8:30a-Nooh . FRESH KEYWEST JUMBO SHRIMP 13-15ct. $5/lb Boats unloading daily 352-795-4770 * -U4 arg HERNANDO CAN'T TAKE ITI MOVING SALE Sat. Nov 18 8am-4pm Garden, marine & household 3930 E Laguna Loop HERNANDO Sat. & Sun. 8-? Furn, baby Items, toys, tools, books, jewelry, clothes Too much to list 4320 E. Lake Park Dr. (off of 200) HOLDER THE SISTERS ANNUAL HUGE GARAGE SALE 7119 N Croton Pt., 491, Quail Run, Fri. & Sat. 8am-4pm, Collectibles, Deco, Hshl., John Deer garden trir., fiberglass wicker patio set, good clean Items, lots of misc Home Town Rummage Sale Bring your treasures free of charge open to pub- lic please call Mr. Red to set up a spot, spots are limited, HURRYI (352) 726-4009 Deadline Nov. 25 HOMOSASSA Moving Sale. Sat. & Sun, 8am-3pm Riverhaven 11860 W. Fisherman Ln HOMOSASSA MOVING SALE? Fri. & Sat. Only 8-1pm 3253 S. Alabama HOMOSASSA Sat. 7-4 & Sun.8-12 Freezer, exc. clothing, Pro-Line Boat, fishing poles & tackle, Boat hrdwr, toys, Pampered Chef. Too much to list of H.H. Itemsl ' 2071 S. Rock Crusher HOMOSASSA Saturday Nov. 18, 7- ? 7614 RADIANCE LANE Follow signs from Quick Save Store on 490 Collectibles, Pepsi, Coke & Elvis glasses & bottles, Bavarian china misc. old glassware, doll collections Precious Moments, train sets, old picture frames, old pot belly stove, tools & . lots morel Homosassa Springs Moving Sale Sat. Nov. 18, 9-5, Furn, triple chi- na hutch, matching ta- ble, 6 chairs, office stuff, yard tools for parts, Free Rottweiller; Everything must gol Make offer 5229 W Rochelle St. INGLIS Sat. & Sun. Nov. 18, 19 8a-? (352) 447-2986 22 Palm Pt. Dr. INVERNESS 3 Family Fri. & Sat. 8-2 7606 Broyhill Pl. INVERNESS Amazing Sale Sat. 9-3 Appls, Yard equip,truck cap, clothes, riding mwrs. etc 9220E Point 0 Woods Dr INVERNESS Fri & Sat. 8am-lpm 4 Family Yard Sale Baby Items, electronics, tools & kitchen Cabinets 201 W. Inverness Blvd. INVERNESS Fri. Sat. 8-3. Spa, Furn, exercise eq, HH misc. 3472 S Winding Path INVERNESS G & C Sat. 8-5. Furn, dishes, TOO MUCH to Ustli 8812 E Cresco Ln. INVERNESS , Garage Sale. Fri. & Sat. 9am-? Piano, juke box, pinball machine.Corner of A~nity & Apopka -Ume INVERNESS Sat. 8-1, furn, appli, etc, 1231 N Nashua Ter RAINBOW SPRINGS Fri. & Sat. 8-? Moving Salel Golf clubs, turn., "PRECIOUS Things" 10083 SW 190th Ct. INVERNESS Huge Multi Family Sale Sat 8am-2pm Shady Acres Dr. INVERNESS Moving Sale Living Room Set: Sofa, 2 chairs, 3 tables, $500. Dining Room Set- Table, 4 chairs, china cabinet, $450. Treadmill. Nordic Track, $150. Patio Furn & other household items. (352) 860-1229 INVERNESS Moving Sale. Fri. Sat. & Sun 8a-? 2906 Monroe St., off Independence INVERNESS Sat. & Sun 8-5 No E.B.s Dissolved Business! 3860 E. Kirk St. INVERNESS Sat. 7am-3pm Lots of Beauty Supplies 1760 S. Mooring Dr. INVERNESS Sat. 8:30-? Multi-Family 3910 E WIlma St. INVERNESS Sat. Misc. urn., go cart, tools, household, etc, 3464 E. Carey Place INVERNESS Sat. only 8am-5pm Lrg. bird cages, hot dog cart, lots of collectibles salt & pepper shakers, cook books, signs & more. Dealer's Welcomell 5065 E. Trish St INVERNESS Trash to Treasure Sale 219 N. Citrus. Fri. & Sat. some furniture, some- , thing for everyone LECANTO Fri. Sat. 8-4, Tools, Furn. 3.5 Merc, F-150 top, etc. 1739N Squirrel Tree Ave. 'LECANTO Saturday MORNING 8am Household items Too many things to list THE PATH 1729 W Gulf to Lake MOVIE GALLERY Weekend Sidewalk Sale Friday & Saturday HOMOSASSA CRYSTAL RIVER INVERNESS BEVERLY HILLS DUNNELLON 5 for $10.00 (select VHS) Special Events PINE RIDGE Moving Sale Fri & Sat left on Oakmont, Right on N Nakoma Dr. PINE RIDGE Sat., Nov. 18th 9-2 Tools, fishing, H.H., etc. 2681 W. Elm Blossom St. RIVER HAVEN Hot Items, Huge fishing tackle collect,, Harley Davldson, clothes, jack- ets, accessories. Lots of new home furnishing, art, & unique items. Sat. & Sun. 9 to 5pm 12062 W. Marlin Ct. (352) 621-6959 elect, mini keyboard, still In box $50. brother sewing mach., 15 stitches $65. Inverness (352) 341-4777 Elephant Collection from around the world, over 50 pieces $200 firm (352) 563-0022 Fedders AC & Heat Win- dow Unit, 24,000 btu cool, & 18,000 btu heat cost $700. sell $400 Triple dresser & hutch 'mirror, all wood $125. (352) 726-3093 FOOTBALL TABLE Exc. Cond. $75; WORLD BOOK Ency. Exc. Cond. $25 (352) 344-232.1 FRESH KEYWEST JUMBO SHRIMP 13-15ct. $5/lb Boats unloading daily i 352-795-4770 " Futon, extra mattress & covers $100. Window 53W x 36L $45. (352) 795-7362 Gas Grill with tank $60,00 Couch 6' wood frame w/ matching chair $45.00 (352) 446-6329 GENERATOR Briggs & Stratton Wheelhouse 5550 watts, 8550 surge watts; Under warranty $600 (352) 527-9929 MAPLE SEWING machine cabinet with Athena 2000 sewing machine, lots of extras, $75 (352) 344-4784 MOVING BOXES 50+ (15) Wardrobe, (15) Picture, (20) DIshpacks; Lots of paper & wrap $125/all (352) 746-3330 NEW TRUCK TIRES A/T DEFINITE 31" X_16" W/ROAD WARRANTY. COST: $535 SELL: $325 CALL 352-284-8110 Patio Pet Door fits patio sliding door 773/4" to 82" In height. Pet door opening 8" x 11" for pet up to 18" at the shoulders and up to 40lbs. Petsafe cost $194.99 Sell for $100. (352) 637-5177 Leave name/number Power-Train Generator 8500 Watts 13HP contractor series Elec. start runs good $350. (352) 634-0432 RECLINING CHAIR & A HALF, Like new, $200; 2 PLASTIC PATIO LOUNGES w/cushlons, $25 each. (352) 746-1767 SOD- ALL VARIETIES cut outs & new homes. Installed & Rolled (352) 637-5825 SOD. AL. VARIETIES Bahia, $80 pallet, St Augustine, $150 pallet. Install & Del. Avail. 352-302-3363 SPACE HEATER Rinnai, Exc Cond. $100; AIR CONDITION Hampton Bay Window Unit. $35 (352) 344-2321 STAINLESS STEEL KITCHEN SINK, new In box, 22x33, $100 (352) 563-1176 after 6pm Weight Distributation Bars Hitch, shank, ball, spring bars & chains, 10,000 lb. capacity tow bars, complete set-up $225 795-8001 212-5292 CLASSIFIED * BURN BARRELS * $10 Each Call Mon-Fri 8-5 860-2545 CAKE DECORATING SUPPLIES Tips, Chocolate molds New DOLLS, TOYS, Old bottles, Antlq., drill press, tools, furniture. **Great Stu ** (352) 489-2833 2 End Tables, & sofa table, matching set, nice, $100. Luggage set, $150. (352) 533-3055 (352) 476-2930 14 TRIPLE HEAD vending machines, brand new, removable containers, Hunter green & gold $2,100 st Mortgage For Sale Owner occupied property, 10% return. Call Fred Farnsworth, same address & phone last 33 yrs. 352-726-9369 8' GLASS DOORS w/Track $125 Sharp MICROWAVE Carousel $25. Exc Cond. (352) 344-2321 Bose Radio & Cassette player. Full size. Incredible sound. $295. OBO (352) 746-4565 CHAIN SAW Gas-$50 Boy Scout CAMPING ITEMS $30/set (352) 628-7688 CHRISTMAS TREE Ig beautiful tree 7 ft. $50.00 352-400-1372 CRAFT & BAKE SALE Nov. 19, from 1-6pm at the clubhouse of Stonebrook Mobile Estates, Stonebrook Dr. Homosassa Double Recliner/ Loveseat, $65. Nautilus upper Body Builder reduced price $50. (352) 795-7764 AJ, U-3Au LUvErMviDI WHEELCHAIR, like new, $169; SEWING MACHINE, Brother XL 3100, like new. $89. (352) 344-0255 6 Ton Equip. Trailer, $2700, 46" Concrete Finish machine, $900; Other hand tools & saws. (352) 637-5109 (352) 344-0705 MOVING SALE Double sided sectional greeting card racks w/drawers $500 OBO. Metal Utility shelving $25 ea. Glass cubicle displays w/connectors $300 OBO. Connors Office Supply 726-1601 Electric Wheelchair, almost new $500. Electric Hospital Bed, $100. (352) 503-5125 Extra HDHosptial Bed, 4501b. capacity, up- graded mattress, $400; (352) 637-0203 HANDI-CAPPED SCOOTER LIFT (Freedom) Great Shape Cost $1,200/Sell $300 abo (352) 621-0537 PORTABLE SCOOTER Brand Newi Never used Interchangeable colors New $800/Sell $500 obo (352) 533-3145 SPRING AIR ADJUSTABLE BED, full size, hand control operation Excellent Condition (352) 527-1057 r-IRmia 26" Bicycle built for 2, almost new. Will sell for $100.00 (352) 637-1727 8-FOOT SLATE POOL TABLE W/ball return & acc., excellent condition $250.00 586-7964 5-9pm Bass Fishing Rod $10.00 Bass Fishing Reel $20.00 Homosassa (352) 621-6959 BROWNING 12 GA. Auto, 3" Mag w/ ventilated rib. $650; WEATHERERBY Mark V, 30-06 w/Weatherby 3X9 supreme scope. Synthetic stock. $600 (352) 795-9390 CLUB CAR Excel. cond, split wind- shield, rain enclosure. Locking glove boxes, lights, horn, mirrors, under seat storage & charger $2,750. (352) 400-4945 Fishing Rod and Reel Saltwater Penn $80.00 Salt Water Lure $2.00 Homosassa (352) 621-6959 FRESH KEYWEST JUMBO SHRIMP 13-15ct. $5/lb Boats unloading daily i 352-795-4770 i Gandy Regulation Pool Table, leather drop pockets, you will move. will need need new felt, $750. (352) 726-9251 Golf Clubs 21 Irons & woods $25 (352) 527-8625 GOLF CLUBS Spaulding Executive 3-9 Irons, Pitching Wedge, 1-3-5 woods; Includes Bag $150 (352) 527-9929 Custom Golf Carts Included Camo & Many Colors & Styles HUFFY 26" Man's & Woman's bicycles, like new. $75 each or $100/pair Call to see (352) 637-3059 Pool Table $150. (352) 533-3055 (352) 476-2930 THOMPSON/CENTER Muzzle Loader, .50 calibur, Percussion, nice handcarved stock gd. cond. $300. (352) 344-0085 FR 18, 2006 15C Crossbow Exercise Ma- chine 2401b resistance (Uke Bowflex) $485. Electric Treadmill $145. (352) 637-5171 EXERCISE BIKE ProForm Whirlwind. Never used. $200 352-382-0439 TREADMILL Cadence 2100. Pulse monitor, extras, like new, $50 (352) 628-5404 Treadmill, like new, needs small adjustment $29.99 (352) 344-1907 or 563-4169 FT" Classified Ad Sales Rep - Excellent Sales Opportunity! Help increase market share of classified and retail advertising. Receive incoming calls and prospect for new customers. Exceptional customer service and sales skills required. FT Ad Designer -Great opportunity to layout and create advertising for a daily or weekly paper. Work with a team of Sales Reps and Ad Coordinators to produce successftil advertising for our customers. Excellent benefits package. Must have layout and design skills and ability to work at a fast pace in a production environment. For consideration, apply NOW! PT Contract Ad Sales Rep - Set own hours, Sales experience a must, Commnission-based salary FT Advertising Sales Rep. - Focus ohn zoned editions to sell print., advertising space. Service established customers and prospect for new advertisers. College degree or at least 2 years sales., experience. Reliable transportation required to make sales calls. Successful applicants must pass pre- employmnet drug screen. We o r n p t t f t a i u q i 9I Stop in to fill out an application at: Citrus County Chronicle S., ~1624 N. Meadowcrest Blvd. SC I T R U S .C 0 U N T Y. L3 Crystal'River, FL 34429 or mail to:hr@chronicleonline.com C H kOI L or fax: 352-564-2935 ;, ". cEOE BALDWIN HAMILTON STUDIO UPRIGHT PIANO Walnut w/storage bnch, great for piano student or teacher, $1,500(352) 746-7232 ELECTRIC PIANO Yamaha mint cond. $5,000 (352) 344-1973 ELECTRONIC ORGAN/ PIANO, LOWREY Model G200, walnut w/bench, music cartridges & sheet music. $200 OBO (352) 341-2091 GUITAR Black Peabey Raptor w/amp. Perfect Cond. $200 (352) 382-5055 PA MIXER 8 Channel Yamaha (2) 15" speakers w/horns & stands. $375 (352) 465-2709 PIANO, UPRIGHT Wurlitzer, w/bench Good Cond. $500 (352) 746-5550 Iv. mess. PLAYER PIANO Sm. 39" H; plays w/peddle or electric. w/rolls $1,500 firm (352) 382-3839 eo..BRAND NEW BOFLEX EXTREME II Paid $1850 for all Sell for $1400 OBO (352) 422-2234 CITRUS COUNTY (FL) CHRONICLE 160 SATURDAY, NOVEMBER 18, 2006 S. S *S*1 TAURUS M92 9mm SS., 6 hi-cap mags., as new, with box, $450 firm (352) 344-4614 WE BUY GUNS On site Gun Smithing (352) 726-5238 WILDLIFE TRACKING SYSTEM 4 Collars $1,000 (352) 621-7503 746-1152 eves 15' ENCLOSED PACE Tandem axle w/rear & side drs. $1900 (352) 795-4770 Approx. 41/'X9' HANDMADE WOODEN UTILITY TRAILER $200. (352) 726-4748 BUY, SELL, TRADE, PARTS, REPAIRS, CUST. BUILD Moved to 6532 W Gulf to Lake Hwy. Crys. Rvr Enclosed 5x8 2005 trailer, like new, $1350. (352) 637-4707 Utility & Enclosed Trailers From 4x6 to 8.5x24 IN STOCK! Utility Trailer Good Condition Asking $275. (352) 637-1894 UTILITY TRAILER, Clean, exc. cond. $450., must see. (352) 795-4770 m WE BUY ESTATES * CASH PAID, Fine Furn. Antiques & Collectibles (954) 854-2364 Wanted Garden Shed, used, minimum 8' x 10' max. 10' x 12', In reason- able shape & price (352) 360-2164 WANTED TO BUY SCHWIN AIRDYNE, Exercise Bike (352) 637-3277 a WE BUY US COINS & CURRENCY (352\ AOA.nA77 NOTICE Pets for Sale In the State of Florida per stature 828.29 all dogs or cats offered for sale are required to be at least 8 weeks of age with a health certificate per Florida Statute. 2 yr. old male snauzer looking for a mate. Please call Kim (352) 697-3096 Chihuahua, Yorkie, Maltese, poodles, mixed poodles, Doxie, Pugs, & Puggles. (352) 369-5517 DESERT LIZARDS 2.splnv tailed desert llizards vpr .. ,. it. r,:mrg Tame great pets w/ cage $250.00 abo 352-400-5272 Guinea Pigs, Silkys & Teddy's, $35.ea (352) 201-2666 HUMANE SOCIETY OF INVERNESS SHOT CLINIC Saturday From 2-3 *-DOG PACKAGE Rabies Shot, Parvo & Distemper, Micro Chip Including registration, $35. CAT PACKAGE Rabies & Feline 5, Micro Chip including registration, $35. This Saturday Only Free Nail Clippingi Bow Wow Boutique In Crystal River 5625 Hwy 44, Crystal River. 352-795-1684 All Proceeds go to the Humane Society of Inverness Humane Society of Inverness offers Low Cost Spay & Neuter Service In our Mobile Clilnic. Soaved $25 Dog Neutered & Soaved start at $35 Low cost shot clinic Tues, Weds & Thurs 12pm-4pm (352) 563-2370 MINI DACHS, CKC Reg, 8wks, 1 yr old male, AKC & CKC. (352) 637-3296 L RAKEETS $25 pr. oven Breeders Cockatiels $20 ea. Ferrets $25., Guinea Pigs 1 male Ifemale $20. ea w/ cage. (352) 746-4848 PITBULL PUPPIES (7) Parents on Premises $200-$400 Avail. 12/6 (352) 563-1999 THE PET CHARMER Custom Pet sitting In your home. (352) 746-4848 West Highland White Terrier Pups, 8 wks, AKC, 2 M/2F. $500. (352) 489-7659 PINE RIDGE/DUNNELLON New Barn 12x12 Stall for Rent. Full board, $275.mo(352) 422-2078 1/1 Furn or Unfurn 1/1 Furn, computer & scr.rm, carport No pets/ SmokIng (352) 628-4441 BEVERLY HILLS 1 BR, IBA fully furnished, includes all utilities & basic cable, sec. dep. and ref. req. No pets., starting at $155 wkly Call (352) 465-7233 Crystal Riv & Hernando Rent/Sale 1&2br, turn/ unf. 1st, last & sec. No pets. (352) 795-5410 CRYSTAL RIVER 1 BR Travel Trir., free electric, Satellite, fncd, no pets, no smoking $125. wk. $250. dep 352-563-1465 CRYSTAL RIVER Ranch Setting. 3/2, DW 2 porches, fenced on 40 acres, gardeners & horse lovers welcome. $700.mo (352) 795-0963 FLORAL CITY (2) 2/2 $600/mo. (1) 2/1 $550/mo. (1) 1/1 $450/mo. 1st/last/sec. (352) 476-3948 FLORAL CITY 1/1 Clean, No pets. Bkgrnd check. $400/mo Off Trails End Rd Ist/last/ $200 sec(352) 726-6197 HERNANDO 2/1, W&D, $125/wk, $450 sec. dep. 352-464-0718 HOMOSASSA 3/2 Beautiful clean, I acr. $775.mo. (352)382-3675 HWY 488 3/2 Xtra clean, crprt, shed, Fl. rm. Quiet, $700/ma. No pets (352) 795-6970 INVERNESS Lakefront 55+ Park. Fishing piers, affordable living 1 or 2 BR, Screen porches, appliances. Leeson's 352-637-4170 Rent to Own 3/2 DW on 1/2 acre, bad credit OK $122K $750 per mo. (321) 331-6793 1961, 32x8, good dry storage or hunting camp. you move to your lot. $1000. (352) 208-5959 2002,4 bedroom, DW, You pull, $37,000.OBO (352) 860-0911 3/2DW CinnamonRidge Caged inground pool, Apple paved drive, car- port, metal roof, shed, clean, well maint. $75,000 (352) 270-3578 '72, DW 2/2, full Igth Carport, sun room Completely furnished $38,000. In Very Nice Park (352) 628-9493 AMERICAN HOMES South Energy Homes of Merrit 352-628-0041front.com REDUCED NEWLY RENOVATED MOBILE HOMES, on acreage, Zero Down, Zero closing. No credit, slow credit, bad credit welcome. 877-289-5888 3 BR DW, On main Canal, Floral City, $65,500 (352) 637-1238 3/2 ON DOUBLE LOT Snrm, srcnd prch. furn. 1991, & Lot $47,000 Call 4 Details (352) 794-0321 2/1 Scrn. Room, 1/3 acre fenced, workshop, W/D, frldge, very pvt. $40,000. cash or $46,900. @ 10% down & 10% owner finance. (352) 637-0475 2/2 DW, on 1 ACRE Crystal Acres. dbl carpt large shed, RV canopy, $79,000. (352) 795-9344 3/2, Large Doublewide Remodeled on 2 lots by Dunnellon. Deeded River access $73,500. Owner financing or disc for cash 352) 726-9369 3/2 DOUBLEWIDE remodeled V-Acre city water. Lecanto area. $69,500 obo 726-9369 3/2 SPLIT PLAN DW Lecanto; V acre fenced; new flooring, paint, appliances, AC $95,000. 352-220-3422 3/2/1 on 4.76 ACRES 1,782sf., 2 out buildings, Many extras Must see! $179,900 Michael Harris Florida Realty & Auction (352)563-0199 3/2 DOUBLEWIDE, fenced, very secluded, 1-1/4 acre, inground pool, Jacuzzi gazebo, 2 Irg. work shops, meticu- lously landscaped, all new laminate flooring, carpet & tile, exc. cond $145,000 (352) 726-9724 4/2 Refurbished 1/3 ac. New roof, CHA, hot water heater, flooring. Dry-wall finish. $91,500 (352) 476-7780 4/3 on > 4.5 ACRES 2000 sf, crpt & Shed. Off W. Ft. Island Trail Fish pond. $190K $10K toward closing (352) 563-9886 5/2/3crpt 1.2 ACRES Newer carpet, nice apple. ,shed. $114,900 (352) 464-0833 2.41 ac. w/FL Rm. & scrnd patio Cry. River (954) 415-5548 A MUST SEE! New 3/2 on 1/2 acre. Great location, the best construction, too many options to list. Seller motivated, $2,000 down, $587.47 per ma. Call for more info 352-621-9181 CRYSTAL RIVER 2/1 12 X 56 w/10x20 att. & enc. addition. Newly painted & upgraded. Furn. on beautiful 1/2 ac. crnr lot. $46,000 (352) 795-3196 FSBO SW, FLORAL CITY On Lake Tsala Apopka Immac. cond. 2/1, must sell! Moving to Colorado. $125,000 Call (352) 476-6324 rson. Ca 352- 1-9182 HOMOSASSA, 2/2, Irg addition, carport, 1/2 acre, nice neighborhood, needs a little TLC, $39,500. $5,000 Down or discount for cash. (352) 212-2055 far more details 352-621-9181 STARTER HOME Beautiful, renovated, ,2BR 1BA 1992 MH 1/4+/- acre. New appliances, carpet, cabinets ++I $63,900 1.888.727.3557 95 Sler 32' 1/1, A/C, 8x24 scmrn. porch, storage bldg., ready to move in. $16,000. 527-8374 14x40, On River, 1BR/1BA, Fla. rm. w/vinyl windows, patio, furnished., $14,000 negotiable. (304) 771-2116, cell 2/1-1/2 14x52 Screen room, fully furnished, nice 55+ Park. Floral City $22,000 (352) 860-0345 2/2 Part. Furn. Lg. LR, nice kit. w/lots of cbnts. Laundry rm, 2 walk-in closets, 2 porches, 2 carports, Ig. shed. Nice frnt. & bk. yrds. 55+ Prk, (352) 527-3935 2/2/CRPT.14 x 56 SW Scmnd prch, fully turn. Nice 55+ Park. $22,900 352-795-3911 5% COMMISSION Let Me Sell Your Home Call Jim (352) 422-2187, F.M.H.S CRYSTAL RIVER VILLAGE Fully furnished, 2/2 dollhouse, must see. Larae double caroort. Must Seel. 2005 DW, 3Bdrm, 2Bath, large porch, many up grades. Lots of amenities, Gated Community $92,500. (352) 382-1939 Home (727) 207-2455 Cell FOREST VIEW ESTATES 1985 Palm Harbor Great Location, Move-in ready, camp. turn. 2/2 DW, wheelchr. acc. New sod & sprklr. $69,999. (352) 563-6428 (352) 563-1297 Fresh Water Canal 2/2 w/carport, new roof, deck, knettico water filter, storage, Canal to Inv. Lakes FISHERMAN'S RETREAT A STEAL @59,9k BRING ALL OFFERS Bob Spauldlng 302-9006 Keller Williams Realty FSBO 2003 Palm Harbor 2/2, all appliances, 1280sf. exc. cond. Reas. Lot rent In 55+ Pk CRYSTAL RIVER. $88,000. 352-228-9764 IMPERIAL GARDENS 55+ 2 OWN YOUR LOT Beautiful 55+, 3/2, DW, C/P, scrn. par., like new, off 486, Hernando, Lasbrlsas, $92,000. (352) 726-3707 Stonebrook 55+ 2/1, 2 encl, sunrooms, CHA, Lg. utility, Ig. lot. $19,500. OBO 628-5838 W. SUMTER CO. 12 X 50 SW, 1/1, 10X24 room add.; roof over & 2 sheds. Nicly landscpd; water access; nice prk Price reduced to $7,500 (352) 793-4602 STONEBROOK 55+ 2/2 on Ik. w/deck, new carpet, scrnd prch, Ig. shed. $50,000 (352) 302-7701 WALDEN WOODS 55+ Upscale Comm. Beautiful 28X56 Home 3/2/carport, 28X10 scrn'd & encl.I lanai, -E Cabins Travel Trailers & RV Sites Furnished Big Oaks River Resort (352) 447-5333 D - MU4 =1" h ,I r-:w CRYSTAL RIVER 3BR/1BA, laundry......$600 2BR/1BA house..........$575 BEVERLY HILLS 3BR/2BA, fenced ....... $775 2BR/2BA1 HERNANDO 3/2/2 New home Canterbury Lake Est, $1,200 INVERNESS 2/1/1 Pool...................$600 Call today we will fax or email full list of furnished & unfurnished rentals :--ACTION- COSuSMNaMeli aunsrm Hr.) Marie E. Hager Broker.Reaw1or-Propery Manager 3279 S. Suncoast Bvd., Homosassa, FL (352) 621-4780 1-800-795-6855 Rentals1 @lnflonline.net Chassahowitzkao 3/2 Wtrft MH $850 2/2 Wtrlff MH, $600 2/1 Scrn rm, $600 HQ0gnghgss 3/2 MH /2 Ac, $700 High Pain 55+ FURN. $1100grouo. $550/mo. Camper utliL nc, $300/mo.& up No pets 352-447-2240/302-3982 Crystal Palms Apts. 1 & 2 Bdrm Easy Terms. Crystal River. 564-0882 CRYSTAL RIVER 1 & 2 Bdrm & Studio Mayo Dr. Apt. Lost Lake Apt. (352)795-2626 CRYSTAL RIVER 2/I/2, C/H/A, like new $625/mo+lst, last, sec. Senior. Discount 838 5th Ave. NE 727-455-8998/341-2955 CRYSTAL RIVER Move- In Special 2/1 $500. (352) 263-6321 FOREST VIEW APTS. 2 Bedroom. $650. mao. Lecanto (352) 795-1795 HERNANDO 2/1, very clean $550 +1st, last & sec 352-527-0033 or Iv. msg. HOMOSASSA 1/1 Clean, quiet, NO pets. $350 w/H20 563-2114 HOMOSASSA 2 BR, Carport, newly remodeled, tiled., $550/ mo. 1st last, sec. No smoking/pets 212-0888/628-0545 INVERNESS 1/1 & 2/1 Clean, quiet area $400 & $500+ 1st, last, sec. 352-464-4440 INVERNESS 2/1, large eat in kitch., no pets, $700 1st, last, sec. 746-6148 697-0970 "jI N Crystal Palms Apts. 1 & 2 Bdrm Easy Terms. Crystal River. 564-0882 CRYSTAL RIVER 2/1/2, CRYSTAL RIVER across from post office, I000 sq ft. $900 + tax mo. Lease/ option available. Realtor/owner 352-422-7925 HOMOSASSA Commercial. 3941 S. Sunny Terr. Corner of Grover Cleveland Blvd. 2 acre lot, fully fenced w/ 1600sf house, 2 or3 bed Rm, 13/4 bath, block ranch, zoned G & C, $215,000 (603) 529-1995 HOMOSASSA Retail or Serv.Comm. 1,600 sf (352) 628-3098 INVERNESS 4 offices/Business suite, approx. 1,000 sq.ft. 425 S. Croft Ave., (352) 341-0500 CITRUS HILLS 2/2/1 I Fully turn. Villa, Sec. dep 352-527-7173 CRYSTAL RIVER 2/2 1100sqft. HUGE. Lndry rm/Store rm Sec. cameras/PETS OK! $650mo. 1st/Sec. 352-586-2973 or 352-586-9686 12/2/1 No rear neighbors. New paint & carpet. Buy or Rent to Own. $127,900 1,352-978-0986 INVERNESS TWNHS Waterfront, with or with- out furniture, Communi- ty pool & boat dock, $825 mo. (352) 400-0731 PRITCHARD ISLAND 3/2/1, $850. mo + utill- 'ties no smoking/pets (352) 637-2342 CITRUS SPRINGS 2/2 Lg. New, All appli+ W&D $650/mo.(352)746-7990 CRYSTAL RIVER 1 & 2 Bdrm & Studio, Mayo Dr. Apt. Lost Lake Apt. (352)795-2626 CRYSTAL RIVER 2/1 Very Nice, with W/D h.upCHA, wtr/garbage incl $550 mo, HURRYII 352-228-7033/465-2797 INVERNESS 1/1 Cute & clean, spacious C/H/A, country setting, Nice $595 352-726-1909 INVERNESS 2/1 Crprt. Yard, redecorat- ed. $875+ deposits. 478-456-5254 INVERNESS 2/2/1 Newer, nice, quiet $750/mo.,1 yr. Is, (352) 527-9733 LECANTO 2/1l/2 Modern, Kitch. equip., W/D hookup, C/HA/no pets, $595 352-344-8313 CRYSTALRIVER LANDINGS.COM 8 IBR Suites (352) 795-1795 GOSPEL ISLAND, $190wk. $400 dep. Citrus Cty. Realty Sew. (352) 726-5050 HERNANDO 1/1 completely furn. $500 moves you in. 352-465-0871 HERNANDO 1/1 Cute Cottage w/views. $550 ma. 631-334-8444 Alliance Realty Jocelvnne St. 4/2/2 $1000 New Cit. Spmgs Laurel Ridge RelfgrcLD. 3/3/2, on golf crs. w/ lawn maint, Inc. $1200 Beverly Hills Ekagy 2+/1/1 $650 D.g sS.t.2/1CP $650 352-249-4433 ask for Joanna or Will AVAILABLE RENTALS Nov. 18, 2006 SUGARMILL WOODS 4/2/2 *Brand New Home' $1350 *Move-in Special* CITRUS SPRINGS 3/2/2 Brand New Home $900 2/2/2 Brand New Home $800 CRYSTAL RIVER 2/2 WF Condo $900 BEVERLY HILLS 2/1 Home screen porch $700. 2/2/1 Furn Villa $975 55+ Community Seasonal Rentals Available Century 21 Nature Coast (352) 795-0021 BEVERLY HILLS 2/1 Remodeled; $750/mo. + /st/lost/sec. 13 E. Golden St. (352) 302-9351 BEVERLY HILLS 2/1/1 Must see. $750/mo. + Onr/Agt 352-228-3731 CITRUS SPRGS 4/2/2 No crdit chk $1,195/mo. + dep. 352-746-1636 FLORAL CITY 1/1 $500/mo. 1st/last/sec. No pets. (352) 860-2953 2/2.5 Villa, pool/boat priv. $750. 2/1/CP, CHA. $650. 352-746-3944 INVERNESS 3/2/2 NEW HOME. No smoking/no pets. $850 mo.+sec. 352-726-1419 INVERNESS HOMES *.~-.=2 like new TERRA VISTA *,3/2/2, new w/ pool .2/2/2 Part. Furn. CRYSTAL RIVER *I/2/3 New Executive DUNNELLON .1/1 Low Rent per month Pre-Approval BPG HOMES 1-877-274-5599 CITRUS COUNTY REALTY SERVICES * Residential * Commercial SVacant Land Sales Property Management " Weekly/Monthly " Banquet Facilities * Seasonal Rentals * Efficiencies SRemodeling * Handyman Services (352) 726-5050 ccrserviceshome RENT TO OWN No credit check 112W Sugarmaple B.H. 2420 W Jonquil, Cry Sp. 321-206-9473 visit jademisslon.com SMW New 2/2/2 Villa, apple, W/D $1,000 (617) 201-3521 LECANTO Partial furn 3/2/2 home. Crystal Oaks. $1,125.mo Call for details & appt. (352) 341-1928 $ $$$ $$ $$$$ $ Need Help buying a Home? I Can Helpi Creative Financing. 0 Down Plans/ Bad Credit Programs Avail. (352) 613-3391 2/2/2 Carport, almost 1 acre. Rent to ovn/ rent $850./mo. (352) 637-2141 Beautiful 2005 home, 3BR, 81 2BA, 2 car. gar. Rent $800/2/1 + Carport + FL Rm. New: bath, tile, carpet in BRappl. 9 N. Filmore $700/mo. 1st/lost/sec. (352) 249-3228 BEVERLY HILLS 2/1/V/1, poss 3rd, $695. cul-de-sac 465-8103 BEVERLY HILLS 185 Osceola 3/2/1 36 S Washington 2/2/1 305S Lincoln 3/2 10.Tlr3/1, 5LN DeSoto 3/1 very large. 352-476-5235 BEVERLY HILLS 2 51 Bev. Hills Blvd. 2/1 Fla. rm, CHA, $675/mo 1st, Ist sec 352-586-0478 BEVERLY HILLS 2/1.5/1 Car Garage 78 S. Washington St. $675./mo 1st, last, Sec. (352) 637-2973 BEVERLY HILLS 2/1/1 No Pets! Clean $675/mo. 6 S. Monroe 212-3997 BEVERLY HILLS 2/2/1 202 S Harrison St. Rent $750./m 865-933-7582 BEVERLY HILLS Houses for Rent, $650. 1st, Ist, sec. No Pets. (352) 697-2493 BRENTWOOD At Citrus HIlls, 2/2/2, completely renovated, Amenities cIn: pool & fitness center, golf $950mo.(304) 376-4962 CITRUS HILLS Unfurnished Homes & Furnished Condos mrntal1om Greenbriar Rentals, Inc. (352) 746-5921 Citrus Hills 3/2/2 New. Fam. rm. luxurious, 2703 tot. sq. ft. $1400/ mo. Call Avanzlnl Realty Inc. 344-1145 CITRUS HILLS 3/2/2 w/pool. $1,100; Pets or children OK 352-860-1245/527-6893 CITRUS HILLS/POOL 671 Olympia, 3/2/2, 1 Acre, $1,175. 563-4169 CITRUS SPRGS 3/2/2 New, W/D, Pet friendly, $925/mo.352-812-1414 -"Ret:Hose CITRUS SPRGS 4/2/2 No credit chk $1,195/mo. + dep. 352-746-1636 CITRUS SPRGS 4/3/3 New Builder's Model $1,400/mo. 8202 Empire FOREST RIDGE 3/2/2 Pool, $1100/mo. 421 Blueflax NO DOGS Either property Ls. Option/Poss. Ownr. Fin. (352) 697-1907 Citrus Springs 3/2/1 Lg. Fam. Rm. w/ Fire- place, scrn. porch, utility shed $850/mo. $600. sec. dep. 9555 N. Courtlandt Dr (352) 465-5543 .".- *' : * Citrus Springs 4/2/2 $1000.00 Please Call: (352) 341-3330 For more info. or visit the web at: citrusvillages Citrus Springs Brand New Home. Rent to Own. Low Down $995/mo with rent credit. (407) 227-2821 Citrus Springs Brand New Home. Rent to Own. Low Down $995/mo with rent credit. (407) 227-2821 CITRUS SPRINGS Newer 3/2, $850mo. (352) 422-1482 CITRUS SPRINGS Rent2 Own New Homes Limited offerl 5 Remain Move In Now! Down payment w/tax return. Martin (352) 895-2231 CRYS. RIVER 3/1/ 2 Newly refurbished $800 +1st Ist sec 352-634-0366 Crystal River 3/2 +office, CHA, new tile, carpet, paint, big yard $780./mo 1st, last, sec. 352-637-2973 CRYSTAL RIVER 3/2/2crpt, W/D, 149 SE Paradise Pt Rd $900/mo 1st/last/sec. Inc. Utli. 6 mos. min. 795-8029 Dunnellon 2/2 w/Ig. Family room w/FP. Lots of storage & river access. 2/1.5 Ig. living room, has Rainbow Riv- er access, boat ramp, swimming & picnic area. For more info. Call Sue Rossi (352) 812-4534 Owner/Agent FLORAL CITY 2/2/2, Tarawood, 55+ $800. month, Annual Judy B Spake, LLC Shawn (727) 204-5912 FLORAL CITY Beautiful 3/2/2-V/2 w/ fireplace on 2 gorgeous wooded acres, $895, (941)928-4235 Hern./Cant. Lks Est. 3/2/2 Lease w/opt. Clubhouse amenities. $1,250 (508)558-9790 HOMOSASSA Like new 3/2 DW on fenced acre. 10X28 deck. 10X20 FI. rm. $950/mo. 352-628-0731. cam Gospel Island, 2/1/1, Sw/caged Inground pool, Pool serve. provid- ed, Fl. Rm., quiet, clean, No pets, $850. 352-344-8313 INVERNESS pool. 3/2/2, spac, Ig. prop. Golf course Ioc. $750./mo no pets. 908-322-6529 INVERNESS 2/1, caged pool, Fla. rm, like new, no pets, no smoking close to Walmart, $950 mo. (352) 344-1411 INVERNESS 2/2/2 Wtrftnt. On l ac. 7 Lakes Subdiv. Nice quiet area $850/m+ util, 1st. 0st. sec Avail 1/1 352-344-2590 INVERNESS 3/2, $700 1st, last, sec. (352) 422-6893 INVERNESS 3/2/2, Large home w/ fenced back yard, scrn. porch, eat in kit. & for- mal din. rm. kit. equip. great neighborhood. No pets,/smoking $950. (352) 344-8313 INVERNESS Brand New 3/2/2, $795 (352) 212-5812 INVERNESS IGCC. 3/2/2 Great rm w/office, CLEAN $1050/mo (352)860-0444 N. CIT. HILLS PRES New 3/2/2, $825 mo. (352) 212-5812 OAK VILLAGE SO. Near New 4/2/2. $199,900 or $1,200/mo. Lease purchase avail. (813) 781-1341 SUGARMILL WOODS 2/2/1 Villa $625 New 4/2/2 $1050 New 4/2/2 3300LA, Gourmet kit. $1375 Gd. Ref. Low deposit River ULinks Realty 628-1616/800-488-5184 Sugarmill Woods 15 Boxleaf Court Clean 3/4/3 FR $1250 mo. incl. pool & yard serv. (888) 217-3629 (239) 253-0517 SUGARMILL WOODS 3/2/2 crnr lot on golf course, FP, scm porch, $1 .100/mo+lst & last, Incis lawn care, 1-yr lease (352) 586-7632 YANKEETOWN 2/1 W/D, NQ fPE, $700/mo. 1st/last/S300 sec. Wtr. & grbg. Incl. 352-543-9251 'IEDS. PPOAL RTUNITY OPPORTUNITY "'44 1 Real Estate for Sale D CKS MOVINdG0 (352) 621-1220 moving.com CRYS. RIVER 3/2/2 Furn., Sprg & Dock, Util. $2,500mo. 352-258-6000 CRYSTAL RIVER 1/1 Comp. turn. wtrfrnt condo $1,000/mo, incl. all util. or SALE $191,000 352-302-9504 CRYSTAL RIVER 3/2 1500sq.ft. MOL. Totally refurbished. Long float- ing dock/ deep water/ Gulf access Boat Owner's Dream. No smoking/pets. Avail. Dec. first/last. $975 352-5 6-7321 CRYSTAL RIVER 3/2 well kept DW w/50' of deep water dockage in Montezuma Waterway $950/mo.352-854-2511 CRYSTAL RIVER Large, new 3/2/2, pool-jacuzzi, dock, FP, office. Close to 3 Sister's Spring.$1800. mo. (352) 650-0820 FLORAL CITY 2/1, SFH, water front, $850. (202) 415-9604 Hwy 200 Co. Line 3/2 DW $800/mo. (352) 344-5234 INVERNESS 2/2 Private 3/4 acre lot. Lakefront. Large lanai, 2,200 sq. ft. $1,500/mo. (352) 362-3435 1-3 STUNNING NEW CIT. SPRGS HOMES FOR RENT Poss. 4 BR/den, 2,458 tot. sf. Rents starting at $995/mo. 352-854-7170 Chassahowitzka 3/2 Wtrft MH $850 2/2 Wtrfft MH, $600 Beverly Hills 2/1 Scrn rm, $600 Homosasas 3/2 MH 1/2 Ac, $700 High Point 55+ FURN. $1100 Chassahowitzka Realty (352) 382-1000 CITRUS SPRGS 4/3/3 New Builder's Model $1 400/mo. 8202 Empire FOREST RIDGE 3/2/2 Pool, $1100/mo. 421 Blueflax NO DOGS Either property! Ls. OptionlPoss. Ownr. Fin. (352) 697-1907 CITRUS SPRINGS Rent2 Own New Homes Limited offer 5 Remain Move In Now! Down payment w/tax return. Martin (352) 895-2231 Hern./Cant. Lks Est. 3/2/2 Lease w/opt, Clubhouse amenities. $1,250 (508)558-9790 C" HOMOSASSA Clean, turn. room in mobile; full use of kitch. $90Wk 352-628-9412 HOMOSASSA Room & Bath $400. mo. Call for Privileges (352) 422-2187 HOMOSASSA Room & Bath wLextras $400mo. (352) 4213-0614 Camp. furn. wtrfrnt condo $1,000/mo, incl. all util. or SALE $191,000 352-302-9504 DUNNELLON 1/1, Avail Nov-May, $750mo. All utilites & direct TV included, No smoking/pet (352) 795-1838 (906) 458-6279 FLORAL CITY AREA Double wide, 2/2 w/ carport, turn, Country Setting, $950mo includes Electric & Satellite. (352) 400-1661 RENTAL HOMES NEEDED Citrus Cty. RealtyServ. (352) 726-5050 Crystal River Kings Bay Furn. 1/1 Apt. Sleeps 4. Dock cinc. SUGARMILL WOODS NEW MODEL HOME 3177 TOTS/F 3/2 +DEN Upgraded Kitchen w/granite Auction Held On Site 123 PINE ST. SAT DEC 9 @1 1 AM Preview Dec. 3rd 1-4 Preview Day of Sale From 10AM Into sheet on site Flyer On Web Site Heritage Auctioneers cam DAVID PETRANTONI 727-638-7879 Riverfront Acreage Bid Absolute Over $1,530.20 email taxsale@att.net Owner, 727-580-3884 "-1off Ar * Mercedes Homes Open House Sun Nov 19th 1-4pm Brand new inventory home Aggressively priced to sell Under $200k /90't LVst Longli 2270 Wavecrest Dr. Citrus Springs 4/2/2 2234 sq ft living, 2686 sq ft total Call (352) 527-9003 for more info Sat. & Sun. 11-3 620 S. Marlene Pt. Inverness 3/2 Riverfrnt FSBO Price Reduced for Quick Sale!! $198,000 (954)591-1654 SAT. 10-4, SUN. 10-2 800 VIRGINIS RD. CITRUS SPRINGS (near El Diablo) 3/2/2/2, tile, Corian. SS appliances, many upgrades. A Must Seel $249,000 352-228-1448 SATURDAY 10-2 5830 S Dovers Pt Homosassa 2/1/1 Bath in garage, Jacuzzi, fam. rm w/FP Private quiet area!!l You'll Fall in love with this one!! $159,900 Spotted Dog Real Estate (352) 628-9191 Sun. Ipm-4pm Pine Ridge 4/2 pool home on private I-acre lot, new laminate flooring, granite counter top & apple. Pine Ridge Blvd., right on Bronco, left on Witchita, left on Paw- nee, right on Durango Coldwell Banker Ellison Realty, Call Mike Parker (352) 209-6022 r---4 REAL ESTATE CAREER Sales Uc. Class I $249. Start 11/28/06 I ~ I CITRUS REAL ESTATE L SCHOOL, INC. (352)795-0060 MR CITRUS COUNTY REALTY ALAN NUSSO 3.9% Listings INVESTORS BUYERS AGENT BUSINESS BROKER (352) 422-6956 ANUSSO.COMI-4 Preview Day of Sale From 10:30am Info Sheet on Site Flyer On Web Site Heritage Auctioneerscom DAVID PETRANTONI 727-638-7879 1.14 a< : Tel HOMOSASSA FOR SALE BY ABSOLUTE NO MINIMUM NO RESERVE AUCTION EVERYONE WELCOME (near El Diablo) 3/2/V2/2, tile, Corian, SS appliances, many upgrades. A Must Seel $249,000 352-228-1448 3.9%/2.9% Full Service Listing Why Pay More??? No Hidden Fees 25+Yrs. Experience Call & Compare $150+Milllion SOLDIII Please Call for Details, Listings & Home Market Analysis RON & KARNA NEIIZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. C'-=j Home CA3 Loans $$$$$$$$$$$ Need Help buying a Home? I Can Helpl Creative Financing. O Down Plans/ Bad Credit Programs Avail. (352) 613-3391 ACROPOLIS MORTGAGE *Good Credit *Bad Credit/No Credit *Reduce your Pymnts *Purchase/ Refinance *Fast Closings Free Call 888-443-4733 F MONEY TO LEND ! Private Investor, I Hard Equity. No Credit, No up Front SFees, Real Estate Collateral Call Steve , (352) 503-3320 (352) 540-1523 Need a mortgage & banks won't help?. Self-employed, all credit Issues Bankruptcy OK. Associate Mortgage 352-344-0571. cam FLORAL CITY 4,000 SF New, insul. metal, on 1 ac. Industrial + Office $390K Terrl Harfman CROSSLAND Realty (352)726-6644 HOMOSASSA Commercial. 3941 S. Sunny Terr. Corner of - Groover Cleveland Blvd. 2 acre lot, fully, fenced w/ 1600sft,' house, 2 or3 bed Rm;, 13/4 bath, block ranch; zoned G & C, $215,000 (603) 529-1995 -Ur 4 Plex apt. 2/1.5 bath in: Ocala. Rental area. $269,000. (352)257-9591 (561) 714-5820 GREAT INVESTMENT 3/1, Duplex. 1900 sq. ft.' Live in 1 SideI Rent the other! $145,000 Seller pays up to $6000 in closing costs! (561)723-3730 1258 W. Bridge Drive $125,000. Beautiful home on large corner lot. 1704 sq. ft. Call for- appt. 352-422-2973' 2/2/1 w/POOL, FI. Rm scrnd prch, near G.C. OWNER MOTIVATED!!- $169,000 (352) 465-0721 3/2/1, 1346 sf. GEMI Great ConditionI Motivated! $159,900'. Fre F, P.;,i-I Fr dr, I-)l . B.:-,r,n, ,-n,-,.:.., EXIT Reany (352)527-1112 3/2/2 NEW CONSTRUCT Ascot 3 Model, 1,995 sA', Inc. Landscape & sprkjr., $214,900 Greg Youngeqf Coldwell Banker, 1st Cll.. (352) 220-9188 3/2/2 Ready Feb.'07,' 1.25 acres 3,269 sq. ft-.' Upgrades $329K 352-746-9613 3/2/2, 1 YEAR OLD, upgrades, owner motivated $169,000.,. Financing Avail. 352-302-0810 352-628-6800 4/2 lanai, Inground heated pool, in-law ., suite, open area, all.: apple. stay. Enclosed'. dbl. garage, privacy'*" fence, great schools. $229,000. (352)489-163, BUILDER QWNER New 3/2/2$169,900. Save Thousands, Builder Pays Closing', Call (352) 302-0910, CITRUS SPRINGS: Rent2 Own New Homes Limited offers 5 Remain' Move In Now! Down, payment w/tax returrj. www L2PFlorido.com,, Martin (352) 895-223 NEW 3/2/2 - 3 to choose from! $2000 CASH TO BUYERl-i 100% Financing AvailJ' Good or Bad credit.., $165,000 -$185,000 -, (772) 201-6904 NEW HOMES, 3/2/2 1 Tile baths, nice area' j Several floor Plans. i $180,000. to $230,ooo: (352) 400-0230. Nicole Gasiorek 352-422-2920" More than just Real Estatel Office 352-726-5050 ccrserlces home SAT. 10-4, SUN. 10-2 800 VIRGINIS Drive' CITRUS SPRINGS' CImus COUNTY (FL) CHRONICLE ,' Need a mortgage & banks won't help? Self-employed, all credit Issues Bankruptcy OK. Associate Mortgage S 352-344-0571 i. comr, rkit. cab, bath, firs, tile & L.carpet, elect. 200 amp S front & back doors paint in & out ceiling fans & lights $104,500. (352) 746-2925 Cell (508) 942-4505 3/2/Crprt. on 1/2ac- $124,900. Call Kelly (847) 812-3061 A MUST SEEI 2/11/2/, AHS Warranty New roof, thermal windows, carpet. All redonell $116,900. (352) 746-7886 ( 6 Least Expensive 2/2 w/ garage In Beverly hills. Owner will pay $3500. ,: closing cost.$119,500. -www floridarealtyand auction.com (352) 563-01. Updated 2/1V2/1, quiet . area. New: paint, floor- ing, appliances, lights, fans, air handler. Sprklr Sys., roof.2 scrn prches. Fl. Rm. shed, $118,000. 511 S Barbour St. 352-527-8176; 212-1981 2/2/2 Carport, almost I acre. Rent to own/ rent $850./mo. (352) 637-2141 2/2/2 POOL HOME 3/4 ac., +2 car detach. gar., newer roof, new carpet, tile. $225,000 Myrna Wolf, C21 Alliance 352-249-4433 Bonnie Peterson Realtor Your Satisfaction Is my Future (352) 794-0888 (352) 586-6921 Exit Realty Leaders of Crystal River GREEN ACRES 1997 3/2/1, Block Home /2 Acre, Totally Remodeled $115,000. (352) 422-3697. 3/2-'/2/2 OAKS GOLF COURSE Model home, Sec., Intercom, pool, bright open plan, $309,000. Also lot, $159,000 (352) 746-3217 or (770) 834-1967 Lecanto Homes I More than just Real Estate! Office 352-726-5050 ccrservices home CITRUS CcN-rY turn. & appil's. $297,500. Call (230). ILLNESS FORCES SALE 2/2/2 Atwell Model on prime corner lot in the New Avalon Sub.i 1,204 sq. ft. LA.Quallty built steel-reinforced concrete block construction! Exceeds EPA Energy Star standards & building code requirements! Many upgrades. Lawn maintenance, club amenities, and lifestyle activities incl. with monthly membership. One homeowner must be age 55 or older. Staffed security gate operations! Lowest priced new home In OTOW! Reduced to $172,000 352-527-7873 Citrus HIlls Home Currently under construction. Available for occupancy in 45 days. 3 bed, 2 bath, 2 car garage, 2025 Sq. Ft. living, 2688 total Sq. Ft. 2285 Celina St. For Information call: Winkel Construction LLC (352) 860-0606 Nicole Gasiorek 3M-A99-999n2 Moving By Owner 2/2/2 Bostonian Villa, Ocala, 1630 Sq. ft., gated adult comm., al club ameni- ties, super clean unit. Priced to sell $138,000 (352) 291-2082 Cell (352) 634-3783 Arbor Lakes, 2/2/2 Den, Great Rm, gated com- munity, outside maint., Community pool, tennis, etc. $205,000 352-464-2866 726-7637 558 N Morris Ave 3/2/2 Split Plan, priv. fence, sprnlr, sys. Well insulated, like new. Built 2005, $169,900. 352-344-0551/650-1232 3013 S Country Club Dr. 3/2/2 Split plan,fam rm, sunporch. I2ac crnr. lot. $198,000 (352) 341-3941 or (239) 209-1963 2/2/1 $ BELOW APPR.$ 1,215 sf., Fncd yrd. w/ orange trees. $129,900 John Malsel III, Exit Realty Leaders (352) 794-0888 split plan. Close to downtown, boat ramp & Trail, scr. lanai, privacy fence, sprinkler syst., like new, built '04 $165,000 (352) 726-5275 3/2/2 on ACREAGE Many upgrades! Perfect to grow in tol $314,900 Jenny Morellt RE/MAX Realty One, Inv. (352)637-6200 2/2/2 1 OWNER, 2,136SF 719 Poplar St. Asking $160,000 make valid offer. (352) 560-7605 3/2/2, Neat As A PinI 1720 S.F. + Additional RV parking. Bonus rm. $227,000 John Holloway RE/MAX Realty One, Inv. (352) 637-6200 I 01CKSOVN FlaMLSonline.com Fixer Upper and Foreclosure Info Available call John P. Maisel III (352) 302-5351. GOSPEL ISLAND 3/2/2, new roof 7/06, new laminated liv. &dln. Irg. eat-in kit... new tile floor, & paint In/out, $149,900 726-1875 Great Buy 3/2/2, split plan, new tile-carpet, Jacuzzi tubs, complete- ly update 2286 sq. ft. on 112 x 120 corner lot. $138,000. 352-422-2973 HISTORIC DISTRICT Circa 1920, 2bdrm. frame home. C/H/A, Fireplace, detached arage, 120X150 corner 154,9000 352-726-2628 Parsley Real Estate Inc. HOME FOR SALE On Your Lot, $110,900. 3/2/1 w/ Laundry Atkinson Construction 352-637-4138 Uc.# CBC059685 IMMACULATE 3/2/2 418 Hiawatha Ave Inside Indry, Lg. lot. $179,900 (352) 527-9268 Inverness Highlands So. $129,000 3/2/2, Fam. rm. split plan. upgraded kitchen & bath, minor TLC (352) 344-1907 ** REDUCED** GOLDCREST, 6/31//22'2, 7 Lakes Subdivision Caged Pool, Gas FP, Den, 3,624 sf. $329,000. below appraisal. need to relocated, (352) 201-1265 MOORINGS WATERVIEW Villa End Unit 3/2/1 EMODELED Motivated. $139,900 (352)256-1695 FlaMLSonline.com Fixer Upper and Foreclosure Info Available call John P. Maisel III (352) 302-5351 CIASSIFIEDS V- MOTIVATED SELLER 2/2/1 Highlands Home Borders Holden Park Oversized lot, wood floors, Ig. shed $129,900 Lv. Mess (352) 726-0643 Save $10,000 Deal Directly w/ Owner 2/2/2 Ranch, walk in closet, wood burning fire place, storm windows, In ground self cleaning caged pool, sprinkler system, garden shed, fenced back yard, fruit trees, extra lot, 5 min to town, 1/2 a block to trail, $139,000. (352) 344-5225 SELL YOUR HOME! Place a Chronicle Classified ad 6 lines, 30 days $49.95* Call 726-1441 563-5966 Non-Refundable Private Party Only ': 5 p- -,,iddltJI rjtll nr.i tSc.nome Pesriclhon: ra, apol', FLORAL CITY Charming lake house 2/1/1 home on quiet, private lake.$245,000. bvowner.com (ID#20604873) (352) 341-4996 ID# TPA62724 Duplex in gd. cond. New roof, upgraded, $118,900. 813-763-3129 HANDYMAN SPECIAL. My loss your gain. Call for details. $95,000. (352) 302-8266 CRYSTAL MANOR * * 3/2/2 * New Home Many upgrades 2,640 sq ft on 1.25 ac $259,900 *Make. com Spring Run 3/2 Spilt plan triple carport hot tub, lots of closets & & storage. completely renovated. Ig. workshop w/ elec. & A/C $179,000. (352) 613-0455. *GREAT LOCATION 1 3/1/1 Block home. Low Co. taxes, CHA, heavily treed; pro-landscaped. Just shy of 1/2 ac $125K (352) 795-4139 Tastefully Done By Owner 2 Story Log Cabin attached 1BR apt. w/kit 1 ac. 28X40 garage, Reduced to $214,900. (352) 447-3044 3/2/1 CBS, All appli- ances newly renovated 8524 W. Kippling $107,000. (352) 795-1569 (352) 212-1827 3/2/2 NEW Block Home Deed Rest., close to amenities. Contract fell through Take advantage & save thousands Free 42" HD TV. 0 Down WAC $129,500 Imperial R.E. Realtors Welcome Call William Pritchard, Realtor (727) 271-0196 Auctioneers.com DAVID PETRANTONI 727-638-7879 i43 tr 3/2/2, 1,652 sf. 1 1/2 yrs. old. Landscaped lot, scrnd front porch. Fncd yrd, Ig. crnr. lot. Quick sale price $135,500 352-503-3054 5/3, DW, On 1/2 Acre Built 2005, Fireplace, upgraded appliances, nice neighborhood $120,000. obo, Sellers motivated 352-586-6688,586-1040 A STEAL OF A DEAL 3/2 Built '99, 2.6 ac.99K. 2/1'/2o0n /2ac.53K Exclusive Buyer Agncy 352-634-1764 DICK OVN SATLRIB.. ?, 'nv.A I 6, 'I.06 Relocation Forces Salel By Owner 3/2 Split, 3/2/2, 2000 sf., lived In 8 26' x 12' scrn. lanai, mos., 1/4 ac. $155,000. Appt. only. w/priv.fnc. (352) 465-6420 -rea Loasln!1ome Great Location! Homes only, boat/RV parking, upgrades, etc.$245K 352-302-2915/503-3643 SASSER OAKS 2/2/1, New paint, $775. mo, $136,900. lease opt. (352) 628-7449 2/2/2 $159,900 or $900/mo. CT thru-out, vaulted ceilings, pond in atrium 352-382-5740 2/2/2 plus family room, heated pool, treed, private cul-de-Sac location. Furniture?, $174,500. (352) 382-0433 BY OWNER, under oak canopy, 2/2/2, ftam. & liv., 32 x 17 scrn. lanai, Be in a golf community for only $189,900 352-476-3528, 476-4147 Open Floor Plan 1556 liv great location in town $179,900., 8201 Ox-eye Place. 352-302-0733, After hrs. (32)52) 7-7067 Peggy Mixon List with me & get free home warranty. No transaction fees! (352) 586-9072 .**-*r-Z l- Nature Coast PRICED TO SELL RIverhaven 80 ft. water frontage, dock w/ lift. 2500 ft ranch with 3 bed,3bth. Screened in lanai with inground pool. only $779,000. 773-968-9189 REDUCED TO $109,900 Like new 3/2 DW on fenced acre. 10X28 deck. 10X20 Fl. rm. New roof, many extras. 5051 Grand Circle Ter. 352-628-0731 GREAT 2/2/2+ HOME 1850 sf. Priced to Sell! $160,000 OBO Well maintained! (352)382-5186 (931)808-6657 HOMOSASSA FOR SALE BY ABSOLUTE NO MINIMUM NO RESERVE AUCTION EVERYONE WELCOME SUGARMILL WOODS NEW MODEL HOME 3177 TOT S/F 3/2 +DEN Upgraded Kitchen w/granite Auction Held On Site 123 PINE ST. SAT DEC 9 @1 1AM Preview Dec. 3rd 1-4 Preview Day of Sale From 10 AM Info sheet on site Flyer On Web Site Auctioneers.com DAVID PETRANTONI 727-638-7879 NEW 2/2/2 VILLA w/window treatments. Pest, lawn, & water incl. sm. pets. ok $925- $975. 352-592-9811/382-4044 Owner Finance No Banks Needed S/2/2 + Den. $189,000. Move in Now! Immaculate! 15 Asters Court. 561-352-5653 (352) 584-5983 Royal Coachman Home 3/2/2-1/2 Caged Pool Ig. master bath, Vaulted & tray Ceilings, tile roof. $249,900. (352) 503-3477 or 613-0594 Bonnie Peterson Realtor Your Satisfaction is my Futurel (352) 794-0888 (352) 586-6921 Exit Realty Leaders of Crystal River CITRUS COUNTY (FL) CHRONICLE- Loaded, Full Power, 5 Speed, Automatic Dual Zone .::. Air, AM/FM/Cass/CD w/9 Speakers, Alloy Wheels, ': ABS & More. SiEVERll TO CHOOSE FROM! IN STOCK NOW! _________ **''; 5 Speed Automatic, Front & Rear Air Conditioning, 7-Passenger, Full Power, AM/FM/CD, Dual Sliding Doors, Front Wheel Drive & More. ORI A 5 Speed, Automatic, Air, Doouble Cab, Tilt Wheel, Power Windows/ Locks/Mirrors, ABS, AM/FM/Cass./CD, Cruise, 4 DR, 6 Cyl, 2 WD, Keyless Entry & More. 4 Door Double Cab, V8, Automatic, Air, Power Windows & Locks, AM/FM/CD w/6 Speakers, Power Vertical Rear Window, ABS, 2 WD., & More. 2431 SUNCOAST BLVDA SlHOMOSASSA, FL 13 352-628-4 ENDS 11/20/06. ALL PRICES INCLUDE $398.50 DEALER FEE. PRICESIDISCO O00212 ALL PICTURES ARE FOR ILLUSTRATIVE PURPOSES'O O9)1 -l 1U" . .. : . ... .. -. .. . . ....... . 18C SAITIRDAY, PION -4 '4 I I VEBR 0 ZV rE ER 1 8.20nn6 ( I 1 Cars Make The Best 7 Yr./100,000 Mile Limited Power Train Warrantyt 7 Yr./Unlimited Mileage Roadside Assistancet tFrom January 1st of the Model Year. V Toll-Free Call For Service 24 Hours A Day V 160 Point Quality Assurance Inspection 200 MRCMZMA AD fm cMXZDw ^ LIBERTY.ANDTHEPURSUIT? 2007 CADILLAC ESCALADE LOW MILEAGE LEASE EXAMPLE PER MONTH* ( TOYOTA moving forward * *Example based on survey. MSRP $57,815. For qualified leasees. No security deposit required. Tax, tilte, license & dealer fees extra. mileage charge of $.25 per mile over 32,500 miles. Springs Spring Hill Hwy, 50 Brooksville JNTSINET OF ALL FACTORY REBATES/INCENTIVES & FACTORY VALUE PACKAGE DISCOUNTS.*39 MONTHS, PAYMENT PLUS TAX, $2199 DUE AT INCEPTION, NO SECURITY DEPOSIT REQUIRED. SILYWITH APPROVED CREDIT. 200% OF THE VEHICLE PURCHASE IS WITH APPROVED CREDIT, 760+ BEACON SCORE REQUIRED & AMOUNT ADDED TO TRADE-IN VALUE. IIII_ I ..... . ..... .... ..-.__ ... .. .. .... ._ _l _"..,. r ,] :- Z .. .. . .... . .. - S IWY 19 1448 5100 eeOYOTA ;; ' I260T MM PARK A VE 46-t- 1$1312881 2ne qAI-[Tn-,Ay oi lAS 1.A00 'A'S PRE- STORE I I PpJ ,J ll II * 11I I L1A ( The Best New Cars Make The Best Used Cars! t/6Yr. /100,000 Mile Limited Power Train Warranty t b i/Toll-Free Call For /6 Yr./Unlimited Mileage Roadside Assistance t ;/160 Point Quality t From the original date of first use when sold as a new vehicle. Service 24 Hours A Day Assurance Inspection 111!1 ~~~~ :II'I'I -1H ITTA iif' tI: P]t'NI" JI 1*I *I['I /F-'02 CHEVY CAVALIER\ /"01 TOYOTA COROLLA LE /7'04 BUICK LESADBE CUSTOMr\ AM WAS i AM/FM/CD/, Full Power, Cruise, Alloy Wheels, AM/FM/CD, Full Power. Cruise, Stk #F2265A tyless Entry, Stk #F2214A AM/FM/CD, Full Power, Cruise, Stk#F2008A M AM/FMCUU, Ulil Power, cruise, keyless Entry, Stk #GO520A 03 MAZDA B3000 XCAB DUALSPT SAM/FM/Cass/CD, Full Power, Cruise, Bedliner, Alloy Wheels, Keyless Entry, Stk#P1844 /OnS CHEVYW COLORADO XCAB' AM/FM/CD, Air Conditioning, Stk#P1841 I !I loyWheelsJ '(03 JEEP WRANGLER 4X4 In'" I Mr R AM/FM/CD, Cruise, Running Boa shtiFOrO1 R , Alloy Wheels, - AM/FM/Cass, Full Power, Stk#P1826 #F1911A '06 TOYOTA COROLLA LE\ F '03 TOYOTA RAV4 \ aM18, 397' se7 S,455 AM/FM/CD, Full Power, Cruise, Stk#GO470A '06 OYOTA COROLLA Lg AM/FM/CD, Full Power, Cruise, Stk#P1835 M*N AM/IMI/ass/GD, Full Power, Uruise, StKIP1U4. ( '04 TOYOTA RAV4 \ Ia-dimtUL 1 \ 104 TOYOTA COROLLA S T*': -- PS m 7.-S,1 J9 I SAM/FM/CD, Full Power, Cruise, Running Boards, Bedliner, Alloy Wheels, Stk#F2229B S'O05 TOYOTA CAMRY \ AM/FM/CD, Full Power, Power Seats, Cruise, Keyless Entry, Stk#GO400M J /05 CHEVY SILVERADO L\ AM/FM/CD, Full Power, Cruise, Alloy Wheels, Stk AM/FM/Cass/CD, Full Power, Cruise, Chrome #G0536A Wheels, StkP1834 /-l606 TOYOTA (CAMRY IN g9 18,99i "8,995 AM/FM/CD, Full Power, Dual Power Seats, Cruise, AM/FM/Cass/CD Full Power, Cruise, Alloy Wheels Leather, Bedliner, Alloy Wheels, Keyless Entry,#P1849 Keyless Entry, Stk#P1823 Stk#P1849 11 "TOYOT I0 0 T AI LOCATION:1 1/2 MILE EAST OF PADDOCK MALL 1719 SW College Rd Ocala 732g-f e L p 1 FACTORY REBAI ES OR CASH BACK" ALL DISCOUNTS TAKEN FROM MSRP. SIGN & DRIVE OFFER HAS CREDIT AND EQUITY QUALIFYING GUIDELINE. .- - -lllii.il-,,I, -*i ,,*", ril*,lli. ,,WT,.ll il H n i-11.-i I V ;- - .-,-g -TS3 .- -" -;r .- _ CITRUS COUNTY (FL) CHRONICLE c jC %j NIUIPY IOEBU cz v ~ APF_- me mulftor 1000% a MMM LE M9%Wf.-- _ HHM19 MR www. c a rfa x c o nn -- --- ---;- o r_- ,.I I I J 4 k94,7 ON 9k I SATURDAY NOVEMBER 18. 2006 21C CtSM L lc= Hornes^ OAK VILLAGE SO. Near New 4/2/2, $199,900 or $1,200/mo. Lease purchase avail. (813) 781-1341 SWEETWATER POOL ';HOME IN THE ENCLAVE '.model home condition 2746 Sq, ft., see it @ owners.com. ID#AMA299 $375,000. 352-382-3879. "NO BULL!" Just Straight Talk "The Market Is not DADI2 Sellers lets talk." Deb Infantine (352) 302-8046 EXIT REALTY LEADERS "Top Producer" $139,000 NEW 2/2 .25 AC lot. 6 ml. N. of Crystal River, off N, Citrus Ave.352-634-4408 ,Beautifull Cape Cod in ', Crystal River 5 Bed 2 1/2 Bath 2 Car 'Garage F.P. Over 2,800 SSq. Ft. on 1/2Acre. SCall (352) 746-5918 NEW HOMES BUILT NO DOWN PAYMENT Must have good credit Call to Qualify 352-637-4138 CBC059685 CITRUS COUNTY REALTY SERVICES Residential Commercial Vacant Land Sales Property Management Weekly/Monthly Banquet Facilities Seasonal Rentals Efficiencies Remodeling Handyman Services (352) 726-5050 ccrservices home stead.com Over 3,000 Homes and Properties listed at homefront.com --- --- q SREL ESTATE CAREER SSales Lic. Class I $249. Start 11/28/06 I CITRUS REAL ESTATE I SCHOOL, INC. (352)795-0060 REDUCED FOR QUICK SALE! FINANCE AVAILABLE New 2300sq ft. Customer home 3bd, 3b, 2-car garage, UPGRADES Kitchen, ceramic, closets, carpet, lania, landscaping, J.tub, sprinkler, large wooded lot. EXTRASI SACRIFICE $189,900 BPG Homes 1-877-274-5599 RENT TO OWN No credit check 112W Sugarmaple B.H. 2420 W Jonquil, Crs. Sp. 321-206-9473 visit lademission.com , Call Me ' PHYLLIS STRICKLAND >: (352) 613-3503 Keller Williams Realty '. Citrus Springs Brand New Home. Rent to Own. Low Down $995/mo with rent ,credit. (407) 227-2821 " Citrus Springs 'grand New Home. Rent 1; to Own. Low Down $995/mo with rent credit. (407) 227-2821 K HOME FOR SALE FOn Your Lot, $110,900. ' 3/2/1, w/ Laundry iAtkinson Construction 352-637-4138 r, Lic.# CBC059685 SLIgarmill o Woods I MOORINGS WATERVIEW Villa End Unit 3/2/1 EMODELED. Motivated. 139,900 (352)256-1695 Pelican Cove Well maintained 2/1.5 Condo, w/ all appli- ances, 1 car carport pool, tennis, & club house, low fees, $184,900. 352-454-7169 Ocala's Choice Realty SUGARMILL 2/2 Vaulted Clgs, unique enclosed porch. Most furniture, appliances, w&d stay. Carport & storage. $159,900. 352-302-1791 TERRA VISTA BRAND NEW VILLA 1203W Diamond Shr Lp Includes premium lot, upgrades, new turn. & appli's. $297,500. Call (230) 988-1980 GREAT INVESTMENT 3/1, Duplex. 1900 sq. ft. Live In 1 Sidel Rent the other $145,000 Seller pays up to $6000 in closing costsll (561)723-3730 CITRUS HILLS 3/2/2 Over 2,000 sq,. ft,. villa, View of Terra Vista G.C. $379,900 Jim Zilligen Franklin Realty Consult. (352) 746-7512 Over 3,000 Homes and Properties listed at homefront.com N.C. LOG CABIN New Cabin Shell on secluded mountain site. $89,900. 828-247-9966 NYLAND Upstate NY Acrage 50,32,20,15,12, 10,5 Hunting, Views, Pond, Seclusion 25 Minutes from 186. Call Robert at (607) 761-4625 3/2/2 Completely Remodeled Interior Duval lsl.9230 E Kenosha Ct. Floral City. $385,000 (352)341-4064 CiT~us couNivn (FL) CHRONvcLE over ,s,uuu Homes and Properties listed at homefront.com PRICE REDUCEDII Lg. 2/1 on dbl canal lot to Inverness chain. Oak kit. MOVE IN condition $119,000 steals iftl 10119 Bass Cir. (727) 492-1442 RON EGNOT 352-287-9219 Professional Service Guar. Performance 1st Choice Realty SPRINGFED LAKEFRONT Fireplace, tile & wood floors, new roof, AC, paint, carpet, sprnkirs. Landscaping, 1 ac mol $259,000 352-726-2628 . Parsley Real Estate Inc. INVESTOR wants to buy a home in local area. Any location, any condition. Can pay cash & close quickly. (352) 726-9369. WE BUY HOUSES Ca$h........Fast ! 352-637-2973 1homesold.com WOULD YOU LIKE TO GET CASH FOR YOUR NOTE? (352) 228-7823i 2/2/1 Laundry room, office/ bedroom. Deep canal. Closest to main river, Scmrn, porch, sea wall, floating dock. Waterfront treasure. Asking $450,000. (352)795-0678/563-1327 Alex Choto Fine Homes, Acreage, Waterfront, Commercial (352) 628-0968 FloridaRealtvand Auction.com Florida Realty & Auction, Inc. Beautiful Pine RIdgel 5.99 corner ac. Nice homes on similar surr. properties. $299K (352)621-3471 BY OWNER 5 Acres Well & Septic 30 X 60' slab; Impact fees pd. for 2 units. Can be divided. $139,000 (352) 795-1243 CITRUS SPRINGS 2 lots total 150 x 235 (approx) $44,000 For Both (352) 746-1636 INVERNESS LOTS kHglbanods- George St. Lots 9-12 (80X1 15) $22K (2)jy_.Ac.- Parkview & Leona Lot 36 (75X135) $22K; Morgan St. Lot 40 (75X135) $22K; Indian Wds. Lot 32 $34K (149X101) Well & Elec. Cvoy Immaculate, lakefront Inv. 3/2 CBS, office, dock, deck, boathouse $319,900 352-726-6075 INVERNESS Alrboater's Dreaml FSB0160' Waterfront at WITH. RIVER 3/2 oni/3 ac. Lg deck/dock. Great house Super location Mln. frm town )IrV irftil 7l i m 3 Lots Rainbow Estates 75x140 at $10,000 ea. Salt River 2 Island Lots $4,000 ea 352-601-4582 5 Undeveloped Acres, Commercial MDR down town Floral City $248K obo, 702-556-2452 unneon fI 2/2 Ac. Lot From $75K to $62k obo (352) 563-2722 Riverfront Acreage Bid Absolute Over $1,530.20 email taxsale@att.net Owner, 727-580-3884 UNIQUE 5 ACRES in Pine Ridge on priv. road, fenced, backs up to Horse tris. $275,000 352-585-2048/326-5088 #2769 E Marcia, Celina Hills 1/2 acre. $38000 #11470 Condor, Citrus Springs, crnr. lot $24,900 Lot 11 CITRUS SPRINGS 1/2 ac. Great location 6024 N. Bedsrow Blvd. $31,000 (352)613-9274 Beautiful 120x120 city water available. $26,900 Inverness Horizon Realty 212-5222 Beautiful Pine Ridgel 5.99 corner ac. Nice homes on similar surr. properties. $299K (352) 621-3471 BUY 2 GET 1 FREE Before prices go upl finance.com (352) 447-4663 Citrus Hills lAcre Motivated $42,000.obo (352) 422-3697 CITRUS HILLS GOLF COURSE HOME SITE /2, Hall PI. 2 Lots, 4/10 mi to Golf Crs., $34,000 each OBO (352) 465-6622 CRYSTAL RIVER 110'x85' Crnr, homes only, water access; cleared & surv. $49,900 352-564-9223 INVERNESS TWO 12 ACRE LOTS' Baymeadows Beautiful, live oaks, underground utilities, deed res., Agents welcome, $65,000. ea Call (352) 637-5234 Over 3,000 Homes and Properties Michael Harris listed at Fine Homes, ' Acreage, Waterfront, - Commercial homefront.com (352) 220-0801 SFloridaRealtyand Auctioncom Sflo~ida Realty 5Hm & Auction, Inc< Over 3,000 Homes and Properties listed at homefront.com Michele Rose Over 3,000 REALTOR Homes and "Simply Put- Properties I'll Work Harder" listed at 352-212-5097 thorn@atlantic.net Craven Realty, Inc. homefront.com 352-726-1515 SNeed a mortgage & banks won't help? SSelf-employed, c Frl all credit Issues 3 BR, 2 BATH, Fla. rm., , Bankruptcy OK. Whispering Pines Park, Associate Mortgage many upgrades, 352-3-0571 $119,500. Inverness *. 1903 SlIverwood St. cam (352) 341-4030 'A, / ' I *4 F I, ' ,LI '. -' ," / "/ *~l ,.*/ . ,f- i ,-* c.1 : , ~--c' .. I T s- u a c t O 1N- T Y Ci IR)ONIcli CCh-pNICLiJ, - ^k. "~~.0 (352) 563-5966... '-' ,. ':" 5 ,j " .:. J'. ,-.!>: . . IF 1 ,' , J;: I. '1 '/ I 1 V I'~ */ - . -1.'* -:~. _ _/__ lc= Boats LOTS BELOW MARKET Multi-CC Locations Call 561.909.7917 MUST SELLII 4 LOTS CITRUS SPRINGS 8149 N. Merrimac Wy, Unit 18, 0.26 Ac. $16K 8115 N. Merrimac Wy, Unit 18, 0.26 Ac. $16K 8127 N. Merrimac cornm Riverfront Acreage Bid Absolute Over $1,530.20 email taxsale@att.net Owner, 727-580-3884 Tennessee 60 min. SE of Nashville. 124+ acres prime land. Mountain views. Paved road. Gas, elec, telephone & water at road. Ponds, timber, fenced and cross fenced. Only $4,000 per acre. Will sell 94+ acres by Itself. (863) 221-8134 TENNESSEE/38+ ACRES 40 min. SE of Nashville Water tap+ 4br soil area, priv. dry, paved rd. 10+ac. cleared. $195,900 (352) 613-4532 BUY 2 GET 1 FREE Before prices go up! www floridalandowner finance.com (352) 447-4663 CRYSTAL RIVER Woodland Est. 3 Lots, Deep water canal w/sea-wall, survey & soils done.$359,900 ea (561)358-0562 INDIAN WATERS Close to CR river. Sagamon St. $250,000. Terms (352) 795-9339 , r-I INGLIS- Deep Water Canal Lot. No bridges to gulf, 61 Nottingham $158k, (808) 214-4296 Riverfront Acreage Bid Absolute Over $1,530.20 email taxsale@att.net Owner, 727-580-3884 BOAT TRAILER 1998. galv. for 18-20' boat, sngl axel, new t Ires, spindlers & bear- ings. Exc. Cond. $1,075 (352) 628-4162 GATOR TAIL OB Surface Drive, 35 hp w/elec. trim & reverse, camo, NEW. Carolina Skiff & Pert. Trir., 2007. Boat, Mtr. & Trlr. $11,000; Motor only $5,000 (407) 908-0434 NEW MARINE PARTS Seats, glass hard tops, gaiv. trailer frames, springs, axles, fenders + much morel!!l AT WHOLESALE PRICES 352-527-3555 2 YAMAHA Ski jets, with trailers, $1,700 ea or both for $3,000 (352) 637-3376 SEADOO 96 & 97 GTX 3- seaters dbitrailer. as-is $4,000. for both (352) 637-2973 Yamaha Hydroturf Jet Ski w/ trailer, excel cond. $2,500. (352) 422-7450 1989 18' Aloha Pontoon. All alum. deck. '89 28hp Johnson. Compl. serviced 6/06 depth finder, live well, full cover, CG Equip. Veryvery clean$3350. 1992 18' Tracker Pontoon '92 60hp High Thrust Johnson Compl. serviced & tuned., pwr. trim & tilt. New depth finder, new live well pump, new lights, trolling motor. Hand held GPS, stereo, binimi top, Very Clean! $4350 Tandem axle Alum Pontoon tri. fits 18-24' Excel cond. $750. (352) 344-4447/212-5179 15' AIRBOAT 500 Caddy, Stainless rig- ging, Pwr. Shft. prop, Polymer, trir, SS mufflers. $10,500. (352) 795-6056 15' X 62" ALUM JON Side console ped seats *18HP 4-stroke remote ctrl elect start *Galv roll bunk Trir $2,700 (503) 730-2212 ChuckTomberlin Fine Homes, Acreage, Waterfront, Commercial (352) 795-1182 FloridaRealtyand Auction.com Florida Realty & Auction, Inc. CRYSTAL RIVER 1/1 Comp. turn. wtrfrnt condo $1,000/mo, ncli. all until. or SALE $191,000 352-302-9504 Crystal River 125' 3/2 Close to Crackers. New seawall & dock. 1233 NW 5th Terr. $399,000. Firm (352) 291-2690 FOR SALE BY OWNER Inverness, $389,000 Pool, Dock, 3/2 Tsala Apopka Lake chain. UpgradesI (352) 344-0534 Usa VanDeboe Broker (R)/Owner See all of the listings In Citrus County at realtvlnc.com CLASSIFIED 16' ALUM. STARCRAFT W/55 HP Evinrude, new Pwrhead, freshwtr. used. Clean, runs great, $1500. (352) 795-4770 16' CAROLINA SKIFF '98, '99 30hp merc. gps, fish finder, cd player, plus more. trier w/ new axel, leafsprings, cou- pler, winch, jack, lights, wheels, tires. $2800 obo (352) 400-1853 16' JON BOAT 20 hp. Jet Foot. Runs Exc. $3,500 obo (352) 634-2516 19' OFFSHORE 1988, w/'98, 115 hp, Mariner OB + EZ load trailer. $2,000 (352) 795-2801 ACTION CRAFT BAY RUNNER 18', Flats boat, 1990, Very good Cond. 140 hp. Suzuki OB 1987. HD trir. 1992. Like new! $5,975 obo. 634-4793 AIRBOAT 15' Hoffman Rvrmstr hull, 225 grd. pwr eng,6 new jugs w/trir; Exc. cond. $6,500 (352)746-4450 AIRBOAT '98 Rivermaster, 16', rod lockers, 170GPU 3blade carbon, seats 4, Galv. trir. Gd. beginners boat. $6,500. (352) 341-4949 AREAS LARGEST SELECTION OF PONTOONS & DECK BOATS Crystal River Marine (352) 795-2597 Bass Boat 17ft. Procraft, 90HP.PT &T, trolling motor & trailer, $3,500.obo (352) 341-1734 BASS TRACKER 185 Like new! 2004, 30 hrs. on water. 18' Special Edition. 60 hp mtr. w/trlr. $11,900 (352) 746-1126 BASS TRACKER 2006, 175, 60 hp Merc, Extras! Low hrs. $12,000 (352) 560-7168 Cajun Bass Boat '78, 16ft., boat & trailer in good shape, 1972, 65H Evinrude-needs work $1,500. 422-3493 CAROLINA SKIFF 2001,21', flats boat, w/ trailer, 90hp Tiahatsu, pulling platform w/ push pole, GPS, depth, finder, $7500.0BO. (352) 344-1948 L/M Cris Craft 23ft., I/O, w/ brand new 350 Chevy engine, cud- dy cab, runs beautiful, (352) 621-1207 CUSTOM BUILT 20' Fishing machine, must sell due to heath problems, $6500 OBO. (352) 628-2649 i . ............ . ........ 4 ........... *h-sx,~~~ .) r, Boston whaler 13' w/ 40hp Johnson. Runs great. With Trl. $2500, (352) 621-0848 DECK/PARTY BOAT '24', FG Hull, 115 evinrude, w/ trailer, $12,500. (352) 726-3053 Fiesta 18ft. Pontoon 30HP mercury, elect, trolling motor, live well etc. $2,600. (352) 560-3195 FRESH KEYWEST JUMBO SHRIMP 13-15ct, $5/lb Boats unloading daily 352-795-4770 GHEENEE '02, 15ft 4in, 4HP, merc. & trailer, runs great $2,200. obo 352-344-0166, after 5p Glassbottom '05 17V2 ft. Key Largo, bay boat w/ 70HP Yamaha custom t-top, boarding ladder, VHF Radio, Garmin 198C GPS, sounder combo, w/ shorelande'r alum. trir. $15,000. (352) 628-6543 Cell (407) 722-1630 web: dmakevy tampabay rr corn GLASSSTREAM '87,21' Cubby-cabin w/200 h.p.Mercury $1,800OB0 (352) 613-4779 '06 BLOWOUT! 16' Pontoon Fishing Boat With 50HP Yamaha Motor! $12,495 *Coast Guard Equipment Included LARSON 19', Open fishing boat, $100. (352) 564-1564 Monarch Jon Boat 15'11", 25HP Johnson elec. st. eng. Like new, 7V/2Hp Johnson, swivel seat. (352) 382-2137 NEW DUSKIE 23-'/2FT, loaded with options, Incl. full camp- er top, 225HP Evinrude, full warranty. Tandem trailer, $77,000 new My loss your gain, $45,000 (352) 527-3555 WE NEED BOATS!! Selling them as fast as they come in! SOLD at NO FEE Pacemaker 32' 'c-ean g:.rig ,acril Can be live aboard f-un, aoIle, rin ..'trower .:. i C1 .n 5 ,.. CL.ir, t.:.p ' Dual conTrols. 2 new eng. Heat/Air Too much to list. $20,500. Or trade for motor home. (352) 795-7994 POLAR 19', 1999 65 hp mtr, trlr incl. Lots of extras Great for fishing! $4,500 OBO (352) 212-4719-52-.23'49 PRO LINE 25 walk 97 225 mercy 650 hrs, t-top, gps, vhf, depth, alum dual axle trir. $ extrs exc shape $23K Iv msg 628-7387 RENKEN 1988. Walk Around, 170 I/O, trailer, $2,8000BO. (352) 634-5499 ROBALO 19' Center console, 200 Suzuki OB, T-Top, Rocket Launcher, gal. trlr., Runs Great Crys River $3,995 Cell (727) 344-6217 AAA BOAT DONATIONS Tax Deductible @ appraised value when donated to a 43 year old non-reporting 501-C-3 Charity. Maritime Ministries (352) 795-9621 SEAPRO 21FT 1999 150 Yamaha mtr, tandum trailer, depth finder, trolling mtr, ma- rine radio, am/fm, bimini top. good cond, mtr needs some work. $9900.00 352-748-5005 THREE RIVERS MARINE --41-; Let Us Sell your Clean used boat. No Fees. (352) 563-5510 WELLCRAFT '96, 19FT, Eclipse V-6 Mercruiser, I/O, cuddy cabin,traller,great cond $6,400 (352) 726-4490 -S V '1=OK V '00 GULFSTREAM Voyager. Low Miles! Great Shape! $66,725 Jim (352) 266-0850 A WHEEL OF A DEAL 5 lines for only $35.95!* *2 weeks in the *2 weeks Onlinel *Featured in Tues. "Wheels" SectionI Call Today (352) 726-1441 or (352) 563-5966 For aeralls. *$5 per additional lineJ S:.-r,, Pe rc.liic.r;, r i, -pp', 1 " AMERICAN DREAM 1999, 40FT, 21K miles, furnished, ready to roll, $125,000. Call for details (352) 341-5555 Fleetwood 1988 26', Class C, In very good cond. Rear twin beds, low miles. $5900. (352) 62110848 FLEETWOOD, 2001 iiC.go "rr.:... :.p)ci 3 11 . J11, 24 i-L --r. H~.) -- T orces -ai- ..',iJ ; - (352)860-192 I RV DONATIONS Trailers, Motor Homes Tax Deductible @ appraised value when donated to a 43 year old non-reporting 501-C-3 Charity. Maritime Ministries (352) 795-9621 Search 100's of Local Autos Online at wheels.com (;tiH}>N J OVERLAND '89 38' 460 Ford, Gas, 69K all options, Needs some work, $13,500/obo (352) 287-9659 SOUTHWIND 28ft, AC, generator, runs great, $3,500. obo Dave (352) 427-0373 USED RV SALE 1-75 & 40 (352) 867-7313 Winnebago Chlefon, 1989,55k miles, $7000. OBO (352) 447-5684/ (863) 532-9876 WINNEBAGO 2002 27' CLASS A, 49K, ALL OPTIONS, EXC COND, ASKING $37,500 352-637-4281 '02 CHEROKEE 30' Sips 8. Loaded! Exc Cond. Crystal River. $6,500 obo. SCELL(727),344-621.7 '06 32ft Travel TrIr Widow Must SeIll loaded, extra clean $19,900. Take older camper In trade, (352) 399-1400 '06 STARWOOD 29' TT New ConditionI SAVE $$$ Jim (352) 266-0850 '36' TRAILER W/20x10 FI. rm, perm. fully furn. set- up in camp ground, new refrig, sink, cab, Sips 7, Inv. area. $5,000 (352) 697-1447 5TH WHEEL HITCH (Reese 15K Slide) 4 mos. old; used twice $400 obo (352) 621-0537 '94 Wilderness 28' Fifth wheel, excellent cond. no leaks clan $6,800 (352) 628-4657 '96 BOUNDER Low Miles! Don't miss this onel Jim (352) 266-0850 '99 CARDINAL 28' FW Was $16,500 NOW $13,995 Jim (352) 266-0850 COACHMAN, '94, 5th wheel, 29FT, loaded, Irg. slide out,' . stand up bedrm $7,500 (352) 634-4237 OACHMEN, TRAILER 1994 Catalina, 34', Full bath, stove/oven, microwave, central AC/heat, fridge, awn- ings, newer tires, rear bedroom, lots of room. Ready to towl $5500. 352-228-1660 COLEMAN 1999, Clipper popup, sips 6, heat, A/C, stove, Fridge, port a potty, TV cable ready, $5,000. (352) 344-1526 after 6pm FOUR WINDS '99, 26ft.travel trailer, full bath, kitchen, micro- ,,- o. .e r BP T "" 3. nirl, ele.: hin r-.-e rhcr, S-000 628-5477 GULFSTREAMY 2005, 29', CHA, prvt. BR & BA; full fridge, Many extras $8,000 (352) 447-4425 Inglls SANDPIPER 30' '00, 5th Wheel. Super. slide, Exc. Cotnd. $10K firm See @ Encore Travel Park, Crystal River (407)908-1181 2002,36' Fifth Wheel, triple slide, 2 AC units, auto jacks, awnings over slides, corlan countertops. 2001 DODGE RAM 3500 dually diesel. 16,000 lb. hitch. $43,000/both (850) 276-3768 $ SLarry's Auto Sales Hwy 19 S. Crystal River Since 1973 564-8333 SHORTAGE AC, All pwr. CD, Tilt, Auto, AM/FM $6,995 #H1173A (352) 628-3533 JOHNSONS' PONTIAC '02 PONTIAC AZTEC A/C, All Pwr, Cruise, AM/FM CD ABS #M50603 $8,995 (352) 628-3533 JOHNSONS' PONTIAC '03 CADILLAC CTS -While DiaAond AiC All Pwr, ABS leather, Alloy wheels, $19,995 (352) 628-3533 JOHNSONS' PONTIAC '03 DODGE NEON SXT 61,447 ml. AC, All pwr. CC,TIIt, aly.'whis, air bags, CD plyr. $7,995 #H 1172. (352) 628-3533 JOHNSONS' PONTIAC '03 FORD FOCUS ZX3 SVT 34',723mL. AC, All pwr. CC,TIIt, aly. whis, CD plyr. AM/FM $8,995 #H 1178..(352) 628-3533 JOHNSONS' PONTIAC '04 SUZUKI VERONA LX ONLY 676ml. Auto, AC., PW, PD, am/fm, st, CD, Cruise, $13,985 #S4090 (352) 628-3533 JOIHNSONS' PONTIAC CrTnus COUNTY (FL) CHRONICLE WILDERNESS 1993, 28', new awning new pwr conv,, new carpet, exc cond, $5700 OBO. (352) 382-2272 1989 TOYOTA FORERUNNER, 6cyl, 4WD, blown motor, $500/obo; 1997 ISUZU RODEO, blown motor, $500/ obo. (352) 628-0308 BED LID FOR 2005 TOYOTA TUNDRA 4 door truck, water tight, 8 mo. old, exc. cond., $725. (352) 637-4493 Hard Top for Mazda, Miata, like new, white, $1,000. (352) 447-0102 TIRES (4) 275-60-17 Continental Tires $100 (352) 229-6006 TIRES/RIMS 12.50/38/15 Super Swamper SX. 15 X 8 Pro c:.,-.p ..h.e l: Ford 5 luJ 'V 1":11"1 1 hin: Will separate. $1,300 352-621-7503/746-1152 Truck Cap. for 6' bed, red $75. (352) 726-8328 Wheels, American Racing Chrome Python 16x8 8 lug. $500.00 '03- 17" Avalanch wheels with oversized tires, Like new $500.00 S(352) 634-1584 - ehcle -9:;h Wante BUICK LASABRE 2001, silver, beautiful cond, 16K, $13000. (352) 628-5537 Cadilac DeVille 1984, runs but needs work.lnterlor/body good cond. Needs tires. $500.00 (352) 628-1631 CHEVROLET 1991 Camaro Z28,con- vertible, 305. auto., A/C. nice top, new ti-. res, dally driver, $3,850 (352)464-1226 CHEVROLET 2005, MONTE CARLO Auto, Stock# 062990B 11 0Q'5 Cit,'U, 'ao (352) 564-8668 -- Chvrotet '86, Caprice Classic .:-ne o...r.i r 8 0 ,i .:.:l. AC, runs very well, needs paint $1,500 cash/ obo (352) 489-1888 CHEVROLET COBALT LS 2005, 25K miles, 5 spd. Stock # El 1848A $12,995 Citrus Kla (352) 564-8668 CHEVY CAMARO 1996, 110,000,500 Needs radiator and head gasket. $1,000 abo (352) 563-6508 CHEVY CAMARO 1996, low miles, CD player, good tires. Good Cond. $3,500 obo (352) 284-1341 i PRORODEO. m~L i 1 Nov. 17418,2006 7:30 p.m. Citrus County Fairgrounds Inverness, FL FRIDAY NIGHT'S PERFORMANCE Join the western industry to 'I raise awareness and funds for the fight against breast cancer Everyone is 1`o T encouraged to wear pink A4n, pl4 to signify your support bright house SP -r .c 0 / LOUIE LOTT HOMEW U2 R. Mn Cw.Nia o S TICKET LOCATIONS. Crystal Dodge Hwy. 44 West Inverness Crystal Dodge Hwy. 19 S. Homosassa All proceeds benefit SunTrust -All Citrus County Locations CItrus County 4-H Citrus Co. 4-H Office Hwy. 491 Lecanto Citrus Co. Fair Office Hwy. 41 S. Inverness Feed & Western Outlet Hwy. 41 N. Inverness ServiceMaster of Citrus Co. Hwy. 19 N. Crystal River Southern Traditions Hwy, 41 S. Inverness Easy Livin' Furniture Hwy. 44 W. Lecanto Country Feed & Supply Grover Cleveland Blvd. Homosassa IC CU C * '04 SUZUKI VERONA LX ONLY 831ml. Auto, AC, PW, PD, am/fm, st, CD, Cruise, $13,985 #S4101 (352) 628-3533 JOHNSONS' PONTIAC '04 SUZUKI XL-7 EX ONLY 179mi. Auto, AC, All pwr, am/fm, st, CD, Cruise, $20,660 #S4056 (352) 628-3533 JOHNSONS' PONTIAC '04 SUZUKI XL-7 EX ONLY 243ml. Auto, AC, All pwr, am/fm, st, CD, Cruise, $18,744. #S4007 (352) 628-3533 JOHNSONS' PONTIAC '95 CADILLAC ELDORADO ETC A/C, All Pwr, ABS leather, (Real Clean) $5,995 (352) 628-3533 JOHNSONS' PONTIAC B1197 (352) 628-3533 JOHNSONS' PONTIAC A WHEEL OF A DEAL 5 lines for only $35.951* *2 weeks In the Chroniciel *2 weeks Onllnel *Featured In Tues. "Wheels" Sectlonl Call Today (352) 726-1441 or (352) 563-5966 For details. '$5 per additional line Some Restrictions May Apply ACURA TSX 2006 10,000ml. Exceptional car Load- ed dark gray $25,000 352-302-7864 AUTOMOBILE DONATIONS Tax Deductible @ appraised value when donated to a 43 year old non-reporting 50 1-C-3 Charity. Maritime Ministries (352) 795-9621 BI AE CONIGMET SA 697-1716 LINCOLN TWN CAR '03, Cartier, 4 dr., 27,000 mi., under factory warr., gar. kept. $19,800. 352-302-5063/564-1140 MAZDA 626 1999, $2,500 (352) 726-8379, leave message and I will call back MERCEDES 82 300D, '82 300TD, '83 240D. Need work. All for $1,200 OBO (352) 527-9258 MERCEDES BENZ AMG, '92, 134K, Alpine Stereo, all serv. records. Mint condl $5,900/neg. (352) 489-5443 MITSUBISHI ECLIPSE GS 2003, Rear Spoiler, auto, sunroof $11,995 Stock # 6146507A Cit. Klo (352) 564-8668 OLDSMOBILE 2000, Silhouette Stock # 6081263A $7,995 Citrus Kla (352) 564-8668 CORVETTE 1987 Perfect for Christmas gift. 93K miles, $7000. (352) 257-1720 Corvette '98, Coupe, loaded, auto., 12CD Bose, 78k ml., gray w/ gray int $17,500. must sell (352) 212-0843 Corvette conv. 92, red w/ white int. & top 34k orig. miles. $17,000. (352) 527-3273 CROWN VICTORIA 2000, good cond. Police Interceptor 89K $4,190 OBO (352) 465-8314 DAEWOO LANOS 2001, 54K, auto Stock # 344310A $4,995 Citrus Kla (352) 564-8668 DODGE '95 Neon, 4 cyl., GAS MISERI depend., $2,500 obo 352-637-4787/257-9446 FORD 1995,WINDSTAR LX Exc. Shape. Comp. Service Rec. Avail. $3,400 (352) 527-2408 FORD '93, T-BIrd, LX, V6, project car $400. obo (352) 634-1057 FORD AEROSTAR '90, Mini van low miles, new tires, well kept. $1,500 080 (352) 341-0455 FORD ESCORT 1984,5 spd. Runs Good I $600 (352) 447-8072 FORD FUSION SEL 2006, Like NEWI 4 Dr. Auto, Leather Stock # 5606245A $18,995 Citrus Kia (352) 564-8668 FORD MUSTANG '92 Teal w/white top, convertible, bik/grey Int cloth seats, remote mirrors, AC, 4 cyl. 48,127 ml. AM/FM cass. tinted PW new radiator. Ask- Ing $4,700, 352-422-0746 FORD TAURUS SES '02, 4dr, wht. load- ed, 10K, like new $7500. Car Is In SMW (813) 230-0478 FORD THUNDERBIRD 2003, This is basically a new carll 2,045 miles Stock # 6053876 $25,995 Citrus Kia (352) 564-8668 GEO Metro Chevy 1992, orig. miles 60,840 good cond. $1000. (352) 382-4685 HONDA 1997, Civic, STD, 5spd, 30mpg, white, new tires, runs great, 100K $4550. (352) 287-9189 after 3pm HONDA 1997, Odyssey, 4 cycle, 1 owner, exc cond, (352) 489-6466 HONDA 2004, ACCORD EX San Marino Red, 240 hp, 25,818 miles. Full pwr, anti-theft immob., mn. rf, leather, 6 disc, CD, 4 wheel disc. brakes w/electronic brake distrlb. A beauty Always garagedl Immaculatel $18,500 No dealer please" (352) 637-6482 HONDA ACCORD 2005, Automatic, Leather, Sunroof Stock # 039439A $18,995 Citrus Kia (352) 564-8668 Honda Civic EX 2 dr., 2001,87k, like new cond. $7500. (352) 795-2347 HONDA CR-V 2001 $10,900, one owner, red, 43K mi. mint cond. Like new, loaded. 352- 795-8692 HYUNDAI 2006, Elantra Stock # P243145 $13,995 Citrus Kia (352) 564-8668 JAGUAR '92, Sovereign, XJ6 4DR, eng. excel., cond., sport shift, trans., mn. rf., air, Ithr Int., chr. whis,la (352) 564-8668 KIA '97,56k ml., 4 DR. beautiful, new tires & battery, cold air $475. (352) 344-0671 LINCOLN '90 Continental, $500., needs work,. ISUZI '87. Parts, $100. (352) 637-0649 LINCOLN COUGAR 1999, Good Cond. Needs work. $2,000 (352) 258-0132 LINCOLN LS '05, 21k, Leather, load- ed, $24,260. Excellent condition, still smells new. 573-690-9269 LINCOLN MARKVIII 1995, loaded. Exc. cond. $4,300/obo (352) 527-6553 LINCOLN Town Car 1997, Executive Series, Loaded, 65K, Exc Cond., Leather int. $6,250 (352) 726-5890 Lincoln Towncar 1997, excel. cond. $5000. OBO (352) 637-6532 / 1968 Volkswagon Camper Van, loaded, fridge, tv, etc, runs and looks new. $6000.00 (352) 795-5285 CORVAIR VAN 1961, Rare collectible. Good solid body, runs & drives. $2,000 (352) 586-9663 Mustang '68, V8, Auto, In a basket $2,500. (352) 628-1207 PONTIAC 1985 Trans Am, T-top, auto, freshly rebuilt 350 cu" 750 Holley. Recent -frame on restoration. Lots of extras. Over $12,000 Invested. Must sell $6,500 firm. (352) 586-9663 Pymouth '41, Business Coupe, all original runs & looks beautiful, (352) 621-1207 TOYOTA CELICA 1985, GTS Convertible, 300 made, 4 cyl, auto, AC, mtr runs great. $1,800(352)464-1226 A WHEEL OF A DEAL 5 lines for only $35.951" *2 weeks in the Chronlclel *2 weeks QOnlinel *Featured In Tues. "Whees" Sectionl Call Today (352) 726-1441 or (352) 563-5966 For details. *$5 per additional line Some Restrictions May Apply Chevy '84, shortbed, mint condition, show truck $7,800. (352) 287-6511 CHEVY 2000, S-10 Pick Up Stock # 6024753B $8,995 Citrus Kia (352) 564-8668 Citrus Kia Chevy Silverado '02, Auto, AC, Sport whis, new tires, $7995. Wooten's Auto Corp (352) 637-7117 DODGE '04. Dakota SLT, club cab, excel, cond, $13,800. (352) 341-5029 DODGE DAKOTA '96 89K, PS, AC, stereo, 6cyl, auto, runs great, lots of new parts. Black. Asking $4995 Call 352-284-8110 FORD 1976 W/cap, new brakes/ tires, runs very good asking, $1300/obo (352) 346-1958 PONTIAC 1976 Trans Am, needs work, motor & transm. in good shape, mostly orig. parts, $800 obo (352) 212-0446 PONTIAC 2000 Bonneville SLE, leather, moonroof, 17" wheels, dual exhaust, mint cond,, 93K, $6,200 (352) 302-5003 PONTIAC 2002, Grand Prix Stock # 6053337A $8,995 Citrus Kia (352) 564-8668 PONTIAC GR. AM 1993, ice cold air, runs perfectly, $1000. (352) 795-5533 (352) 795-0996 PONTIAC Grand Am 2004, V-6, Auto, Dual Exhaust Stock # 5595774A $9,995 Citrus Kia (352) 564-8668 Porsche 99, Baxter, 53k, cherry cond., $19,900. (352) 489-8168 Search 100's of Local Autos Online at wheels.com TOYOTA CAMRY LE '97, Great carl New tires & battery. 4 cyl, 4 dr., auto, all pwr, tilt, cruise, alarm w/auto start. Exc. Cond. 94K, $4,000 abo (352) 527-8885 TOYOTA CAMRY XLE '97 Exc. Cond/All pwr. grgd Lthr, Gold $5,500 OBO (352) 422-5685 TOYOTA COROLLA 1992 LE, 4 dr. sedan, Lt. Blue; drives good. In good cond. $1,800 (352) 464-0433 TOYOTA COROLLA LE 2004, Automatic Stock # 7260515A $12,995 Citrus Kia (352) 564-8668 Your Donation of A Vehicle Supports Single, Homeless Mothers & Is Tax Deductible Donate your vehicle TO THE PATH (Rescue Mission for Men Women & Children) at (352) 527-6500 '05 PONTIAC MONTANA SV6,18,103ml. Aly whis, air, CC CD/DVD plyr. ABS, air bags, $17,995. B 1188 (352) 628-3533 JOHNSONS' PONTIAC I BUICK 2003, CXL Rendezvous, 28K, loaded, 2 tone palnt,Must See & Drive, $12,800. (352) 344-3485 CHEVROLET '98, Tahoe, all power, 91K ml., tow pkg., exc. cond. $7,800 .(352) 637-2481 CHEVROLET BLAZER 2001, Leather, Auto Stock # 5076179A $9,995 Citrus Kia (352) 564-8668 CHEVY 2001, Tahoe, 4x4, 4 dr, loaded, nice rims & tires. $16,500. (352) 795-9001 CHEVY SUBURBAN 1999,126,000, new trans, radiator, tires, brakes 3rd seat & hitch. $4,500 352-726-4178/464-0062 FORD ESCAPE XLS 2002, V-6, Auto Stock # 594231A Cute SUVI $9,995 Cit. KIa (352)564-8668 FORD EXPEDITION XLT 2001, Triton V-8 Stock # P348260A $11,995 Citrus Kia (352) 564-8668 GMC JIMMY 1995, Pwr everything, tinted windows. Runs great! Must Seel $3,000 obo 352-400-5348 HONDA PASSPORT EX 2002, 51K, Auto Stock#335736A $10,995 Citrus Kia (352) 564-8668 IMMACULATE '03 CHEVY BLAZER 47000mi, $14,000 OBO, Like new inside and out, Cold A/C, Good Mileage, Plenty of space, 4.6L V6. Call Keith: 352-400-2746 JEEP GRAND CHEROKEE 2004, Laredo, Leather, Auto Stock # 599160A $14,995 Citrus Kia (352) 564-8668 KIA 2000 SPORTAGE 120K mi. $5000 EXT.CLN. WITH TLR. HTH. (352) 465-3361 KIA 2006, SORRENTO LX Stock #P602402 $17,995 Citrus Kia (352) 564-8668 KIA SORENTO 2004, Reese Hitch Stock # 5640521A $13,995 Citrus Kla (352) 564-8668 Search 100's of Local Autos Online at wheels.com TOYOTA RUNNER 1999, Clean truck, 96K, new tires, AM/FM/CD $6,000 OBO (352) 5A-191n A WHEEL OF A DEAL 5 lines for only $35.951* *2 weeks In the *2 weeks Qnllnel SFeatured in Tues. "Wheels" Sectloni Call Today (352) 726-1441 or (352) 563-5966 For details. '$5 per additional line Some Restrictions May Apply DODGE DAKOTA SLT 2004, Automatic Stock # 5634163A $13,995 Citrus Kia (352) 564-8668 FORD '97, Ranger, w/ tool box, 4Cyl. stick, $1,800. (352) 726-6407 FORD F150 2000,107,000 miles, $5,000, Lariat Pkg., Leather, Quad Cab, V-8 Triton, 398-5242 Ford F 150 4 door 2004,t45k miles, burg., new tires. $16,500, See at Michael's Flooring (352) 302-9835 Ford F150 '83 351 Windsor eng. auto. Super Cab, $2000/obo. (352)637-6532/ 697-1716 FORD RANGER 1993, 6cyl., standard, new tires, $2,000 obo (352) 464-0665 GMC 2000, Sierra, Ext Cab, 4x4, very clean, Gar. kept. $12,500. (352) 613-5776 GMC SIERRA 1995, long box, V-8, auto, tow pkg. 119K ml. $3,300 obo (352) 447-4145 MOVING TRUCK '88 GMC 24' Box 148K ml, 5spd, Asking $3500 (352) 465-7979 NISSAN 1988 4x4, $2A400 (352) 637-2029 NISSAN 2004, Frontier, King Cab, 4 cycle, A/C, $8500. (352) 447-4005 NISSAN '96, Pick Up, Cold air, Runs great, Must seel $4,000. firm (352) 228-3406 Search 100's of Local Autos Online at wheels.com TOYOTA '01, Tacoma, SR5, ext. cab, auto, fiberglass cap, 54K, $10,900. (352) 382-3494 TOYOTA '06, Tacoma, Prerunner acc. cab, SR5, V6, alloy wheels, low ml. $21,900. (352) 560-7168 TOYOTA TACOMA '05 38k, A/C, PS, Cruise, AM/FM/CD, $11,900. 352-228-2608. CHEVROLET T988, 3/4 tn. work van, AC, 305 eng, Sony sound; Runs Good I $2,000 422-7304 Chevrolet 1994, Beauville, 3/4 ton Van, it has everything, good cond. $4,600. (352) 344-5973 CHRYSLER 2002 Town & Country 40K miles. Auto Stock # 081573A $11,995 Citrus Kia (352) 564-8668 CHRYSLER 2002 Town & Country Leather, Auto Stock # 6084458A $10,995 Citrus Kia (352) 564-8668 DODGE Near NEWI 2006, Grand Caravan 6,644 miles, auto Stock #6028692A $20,995 Citrus Kia (352) 564-8668 FORD WINDSTAR 2000, Leather, Auto Stock # 326175A $7,995 Citrus Kia Citrus Kia (352) 564-8668 Search 100's of Local Autos Online at wheels.com MR CITRUS COUNTY REALTY- '< ALAN NUSSO 3.9% Listings SnvrsT/-,- 2 KAWASAKI 3 wheelers, 110 cc $350 165cc $250. Both run (352) 637-3333 ARCTIC CAT 400 2002,2x4, great shape,$2495. (352) 795-9229 ATV + ATC USED PARTS Buy-Sell-Trade ATV, ATC, Go-carts 12-5pm Dave's USA (352) 628-2084 KAWASAKI 300 Just serviced; Many new parts $1,650 abo 352-302-3523/628-3924 POLARIS 2004 Predator 500, mint cond., must see! $3,000 obo (352) 586-1248 YAHAMA Raptor 660 2003, $3A95 Cash or Credit Card ONLY Perfect Christmas Glftl Stock # 306589A Cit. Kia (352) 564-8668 Yamaha Special Edition Raptor 350, Like new. $4250.00 (352) 726-8707 A WHEEL OF A DEAL 5 lines for only $35.95!* *2 weeks in the .2 weeks Qnllnel *Featured In Tues. "Wheels" Sectfonl Call Today (352) 726-1441 or (352) 563-5966 For details. '$5 per additional line Some Restrictions Mayv Annlv FORD 2005, F150 Super crew, FX4, 17K ml, loaded, Ithr, pwr roof, $28,500. OBO. (352) 637-2973 HYUNDAI Santa Fe 2004, 4 X 4, V-6, Auto Very Sportyl $11,995 Stock # P632693 Cit. Kla (352) 564-8668 Search 100's of Local Autos Online at wheels.com TOYOTA TACOMA '00, SR-5 Ext. Cab, V-6, 103,000 ml., big tires, Good Cond. $14,500 (352) 563-1378 225-1118 SACRN - MANDESE WHITE . CONSTRUCTION PUBLIC NOTICE PUBLIC NOTICE *'* Advertisement for Invlf - tion to Bid: Mande'se White Construction. Inc..js the Construction Mar- ager for the CITRUS COUNTY HEALTH DEPART- MENT NEW DENTAL CLINIC. They will be accepting bids for all trades due No- vember 28, 2006. All setb- contractors MUST submit a bidder qualification form.. Contact ', Christy Gugllelmoni at 352-332-9272. Published one (1) tIme In the Citrus County Chrori- cle on November 18, 2006 . 224-1125 SACRN : PACK-N-STACK " PUBUC NOTICE Pursuant to FLA STAT 83.806 Notice is Hereby Given that on 12/2/06-at 11:00 a.m., -at PACK-N-STACK Mini Stor- age, 7208 W. Grover Cleveland Blvd:, Homosassa, FL 34446, the Miscellaneous Personal Property contents of yokir storage shall be sold for past due rent and fees owed by the tenant: UNIT 97 TEANNA YOST 5362 S. ALICE PT HOMOSASSA, FL 34446 UNIT 93 DIANA BOGGS 3249 S. MICHIGAN HOMOSASSA, FL 34448 Published two (2) times In the Citrus County Chroni- cle, November 18 and 25, 2006. 223-1118 SACRN PUBLIC NOTICE NOTICE OF PUBLIC SALE: ADVANCED TOWING gives N6o twice of Foreclosure of Lien and Intent to sell these vehl-' cles on 12/01/2006, 8:00 a.m., at 4875 Hwy 41 S., Inve-' ness, FL 34450, pursuant to subsection 713.78 of the Flor- ida Statutes. ADVANCED TOWING reserves the right to accept or reject any and/or all bids, IFMCU12T8LUA35523 1990 FORD 1FTCR14T7JPB10064 1988 FORD 1G4CU53L7M1644143 1991 BUICK JT2AE82E E3048313 1984 TOYOTA Published one (1) time In the Citrus County Chronicle, November 10, 2006. c--- Electric Scooter, 500 watts, like new. $125.00 " (352) 344-1728 HARLEY '03, FXST, excel. cond. 33k ml., $9,800 obo . (317) 372-2009 HARLEY DAVIDSON, '03, XL 1200 Sportster- All Screaming Eagles:; Must see. $8500/obo' (352) 563-0924 Harley Davidson 06, FXDB1, StreetBob,. Black, 1900 miles, extras, just serviced. 1 $13,650. 220-2324 HARLEY DAVIDSON, 1998 Heritage Softail"l Classic; 18K, garage.. kept. Exc Cond. Extras' w/trlr. $14,500 352-563-5082/302-7792 HARLEY DAVIDSON, 2000, Electra Glide, BIk; 30K, Exc. Cond. $11,000 OBO Garage kept -, w/cover (352)628-0589' HARLEY DAVIDSON 2002 DYNA " 8096, 11000 Lots of -7 Chrome, Corban seat, Really nice bike. 352-563-6508 -. HARLEY DAVIDSON -' 2005, Sportster 883 Low, Sierra Red Pearl, 1,50n' miles, Fact. warr. & ., alarm. Lots of extras! -, $7,000 before 9 p.m. (352) 726-0980 , Harley Davidson Ladlei Leather Jacket-small:" $50.00 Harley Davidson Ladles Shirt- small $10.00 ". Homosassa 621-6959 - Harley Davidson Men's' leather Jacket XXL -. new $100.00 Harley Davidson Helmet $50.00 Homosassa 621-6959. HERITAGE '99 SOFT TAIL CLASSIC 13kmi. $17,000 (352) 563-5133 HONDA 02, Shadow 750, sharl looking bike, low miles, saddle bags, windshield, racing -. bars. $3950 firm (352) 344-0084 Honda Of ' Crystal River . 06 TRX 350 TM ATV % NEW $3799.00 05 650 Suz. Cruiser $3599.00 04 VT 600 Honda . Shadow $3999.00 ,. 01 TRX 400EX $1,599.00 352-795-4832 HONDA SHADOW 2007, 1100, Dyna Jet,' Cobra Pipes, wind- , shield, saddlebags, Nice bikel $11,000 0 (352) 564-7928 after 7:. HONDA Shadow 600, like new: 3,000ml, garaged, .; $3,000. (352) 447-010? KAWASAKI :-' '92, Voyager 12-XII, Fult0 dress, 1100CC, 39K. SPowerful, big bikel' S$3.995 (352)344-4883: KAWASAKI KLR65O- '04, Great Condltionl' $4,000 -O (352) 795-8073 Search 100's of; Local Autos Online at- wheels.com Yamaha . '97, Virago 750, 10K,.- flawless, all access., garaged. Nicest you'Pl. ever seel $2,900. OBO.,' (352) 527-3673 - SATURDAY, NOVEMBER 18, 2006 23C IBRAND]NEWk200J- iMC. EVERY 2007 NOW COMES WITH A 100,000 MILE WARRANTY! ~ei I II t I ; II III' I:J il' L I I i lI IY HI t I 'l ,P 1 * OUTPERFORMS COMPETITOR'S LIMITED SLIP DIFFERENTIAL * STABILITRAKTM HANDLES ON ALL SURFACES * SEE SIERRA'S STRENGTH IN TOWING/TRAILERING EAGLEBUICKGMC.C OM 49k miles, leather, power drivers 12k, CD, paw, PI seat, alloy wheels. so mAn* s$1A , cruise, bug shield 7k, sunroof, homelin 900* *R20, d windows.' I* ss, bug mi lsc, a% floor, I OT Ouyihfll, l i splay, Onl S inted windows, loaded I seu ann* I r, CD & Limited, 31k mi, Ilhr, heated & pwr seals, Onsar i t :.*IS,095' -'a 40k miles, CD, brown/tan top, green &tan seats, cold AC. SA 01 * 35K mi, Itrr, chronme Wnil, LU & cnvertabie, BK miles, leatner, U, cnrome 1 ;K miles, uv, power wina cass, woodgrain, onstar. wheels, power windows & locks, cold AC tinted windows, spoiler 814,300* *15.995* *10,995* =0UM I iS LIUDRI E ICL MIu m IC N UYiPo L suu u 414Sm PMKE PARK AVE < Blm iM Top,lealherwoodgrain,pwr Only 37,000 miles, 5aii,tilediries, W ,dilo, Woedgrain,CD, bugvents, 30kmies,lr,woodg*n, Woodgrain,CO,cruiseli Leal imecmassCOiom 43klilis t OlsOstirwgsie |therCDpw SLEASEr seats, homeink,cassette, loaded Heds, CDcasspedda tinteedai ow, stepup lar OnsharCDtape polished alu hs, spoiler psilipr, l s ll, wooigraiii, CDh lli 'k seas *7.995 *'8.900' '8.995 '9.500" '9.700 9,950' N.950' s9,aS '9,950* t39 month closed end lease. $1600 down plus tax, tag, title $ 399.50 dealer fee. 10,000 mi/yr, $.20/mi for overage. See dealer for details. Pre-owned vehicles are plus tax and title,. 1275 S. Suncoast Blvd.. Homosassa. FL 34446 352-795-6800 1-888-745-2599 Mon-Fri: 8:30-8 Sat: 8:30-6 Sun: 11-3 "-tE WE ARE PROFESSIONAL GRADE BMND PIEC ISIO ~2~ -- I 1 U'- C, 'cl L , V. I s i WANvAf,'v I Lou & cassene. 11"L. " 0'" ndos 8kml o 24C,, sATURDAY, 1NOVEMBEIR 18O, 20u0O - .i COACH KERWIN BBELL < 2003 CAMRY $10,900 2005 RAM *15,900 2003 ALTIMA $12,900 2001 CIVIC 7,900O 2003 FRONTIER $8,900 2004 ARMADA *20,900 CITRUS COUNTY (FL) CHRONICLE ANIL Wip. T $16,900 2004 TITAN $14,900 2002 EXPLORER 11,900 2005 FOCUS $9,900 2005 CARAVAN $14,900 2005 TOWN & COUNTRY $16,900 2005 GRAND MARQUIS i-- ' $13,900 2005 DURANGO $15,900 $13,900 2004 ACCORD $13,900 2003 PATHFINDER $16,900 2003 SENTRA oj 439 $7.900 2005 EXPEDITION $19,900 2001 GRAND CHEROKEE $12,900 2006 TAHOE *24,900 ,o C ALA NISSAN 2200 SR LA200 (352)622-4111 (800)342-3008 ALL INVENTORY PRE-TITLED AND SUBJECT TO AVAILABILITY. ALL PRICES PLUS TAX, TAG AND '195 DEALER FEE. PRICES SHOWN WITH '1,000 CASH OR TRADE 6B9 113 EQUITY. PICTURES FOR ILLUSTRATION PURPOSES ONLY. *6 YRS. @ 7.9% APR, W.A.C. I A6 A IT'S FREE! FIND OUT EXACTLY WHAT YOUR CAR IS WORTH, NO MATTER WHERE YOU PLAN TO BUY! CALL THE INSTANT APPRAISAL LINE 800-342-.3008 2005 MUSTANG 2003 MAXIMA 2004 F-150 PE29 . ... 1. 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/00686 | CC-MAIN-2017-30 | refinedweb | 72,864 | 78.65 |
This article discusses the infamous IDisposable pattern and offers a way to avoid it.
In .NET, the Common Language Runtime (CLR, for short) manages the memory for you. However, most of the other resources should be managed by the programmer. This is usually done by implementing the class' finalizer and/or by implementing the IDisposable interface. More on it can be found in the following MSDN articles:
IDisposable
and also in following The Code Project articles:
To sum it up, Microsoft provides four models for an object:
IDisposable.Dispose
To simplify the life of the C# programmer, they included the using statement that makes code dealing with disposable objects cleaner.
using
To me, it is obvious that the Finalizable model is unacceptable for real world applications. They live in shared multi-user environments. Imagine that your finalizable object holds, for instance, a file handle for an unknown period of time. A user starts your application and works, another user starts another instance of the application but gets an error message because the file is blocked by the first one.
Disposable objects and objects that implement the Both model are better, but I have problems with them. It is not always clear if the object is disposable. Did you know that System.Drawing.Drawing2d.Matrix objects are disposable? I found this out only when I discovered a memory leak in a program of mine. But the worst thing is that I sometimes forget to use the using statement, and this is the real problem!
System.Drawing.Drawing2d.Matrix
A bad thing is that too many objects in the BCL are disposable. In fact, most UI objects are. No wonder many people consider the System.Windows.Forms namespace evil. A good thing about the UI library from the upcoming Windows Vista is that the System.Windows namespace is managed and does not contain disposable objects.
System.Windows.Forms
System.Windows
Can we, developers, avoid using IDisposable and finalizers while continuing to use legacy code, platform invoke, and COM interop? I'm not sure if it is possible in 100% of cases, but let me show you an example of how it can be done. The idea is to "shadow" all managed data structures in managed classes and group all interop calls in a couple of (huge) methods. This example provides an ability for .NET programs to deal with shell links, also known as shortcuts.
The Windows Shell is a program that interacts with users and lets them run programs, copy files, and perform some routine tasks. The default Shell for Windows is the Windows Explorer, but it can be any other program like the Program Manager, LiteStep, or even cmd.exe.
Windows Explorer's executable file, explorer.exe, is actually a host for the Shell. Most of the Shell code resides in a big dynamically loaded library named shell32.dll, which is also a COM in-process server.
The Shell works with co-called shell items. A shell item can be a file, a network connection, a printer. Items group to folders. A folder can be a file folder, in which case it contains only file items, or a virtual folder, in which case it may contain non-file items. A file item can be a file, a file folder, or a shell link.
A link is a file system entity that refers to another file. Unix-like systems have symbolic links, special directory entries that function as links. Windows 95, where shell links first appeared, used a modification of the old MS-DOS FAT file system. This filesystem never had anything like symbolc links, so Microsoft decided to use files with the *.LNK extension as links. Though the NTFS filesystem has always been supporting hard-links (files with multiple names), and nowadays supports true symbolic links, the Shell still uses LNK files as links. Because it is the Shell, not the filesystem, that provides facilities to manage links, we call LNK files shell links.
A good Windows application should work with shell links transparently. And because we all want our .NET applications to also be good Windows applications, we need somehow to deal with shell links.
From the developer's point of view, a shell link is a COM object that implements IShellLink, IPersistFile, and some other interfaces. An LNK file is a persistent (serialized) representation of such an object.
IShellLink
IPersistFile
IPersistFile is an old OLE2 interface, and is nothing in particular. On the contrary, IShellLink is a very unusual beast.
First of all, it is not a single interface; it's actually two separate interfaces. Remember, in Win16 times, we had only one version of each API function, but while creating Windows NT, Microsoft decided to split each function that dealt with strings in two versions: ones with an A postfix for "narrow" or ANSI text, and ones with a W postfix for "wide" or UNICODE (actually, it is UTF-16 now, but in 1993, it was true UNICODE) text. However, for the 32-bit version of the OLE2 subsystem, the designers made a wise decision to use only UNICODE strings to avoid duplication of COM interfaces.
But later, developers of Windows 95, for some reason, violated this rule and defined for the new Shell, some COM-compatible interfaces that worked with ANSI strings. One of such interfaces is the interface with GUID {000214EE-0000-0000-C000-000000000046}, known as the original IShellLink. The original shell link object implements the IPersistFile interface anyway, and why they made such a mistake, sorry, decision, is above my understanding.
The developers of Windows NT 4.0 Shell realized this problem, and fixed it by renaming IShellLink to IShellLinkA and introducing a new interface with the GUID {000214F9-0000-0000-C000-000000000046}. This interface is a copy of IShellLinkA; its name obviously is IShellLinkW and the only difference between them is that the latter works with UNICODE strings.
IShellLinkA
IShellLinkW
The funniest thing is that if you work with shell links on NT-based Operating Systems (I faced it on Windows 2000), the COM object sometimes wants you to use the IShellLinkA interface. I.e., if you create a shell link object and query for IShellLinkW, this call sometimes fails, but a subsequent query for IShellLinkA succeeds. What circumstances lead to that is also above my knowledge.
All right, let's write a class that interops with the shell and gives us the ability to work with shell links from managed code.
You can find many implementations of the shell link object on the Internet, or even here on The Code Project. However, they all use similar scenarios:
I.e., these objects implement the Both model and hold the reference to the COM object while active. I am going to show you how to avoid it and make the shell link object fully managed, at least most of its lifetime.
The IShellLink interface implements a number of GetXXX/SetXXX methods we can consider as "properties". It also has a "true" method, Resolve, to verify if the file the link points to is still available, and to fix the link, if not. Object persistence is implemented through the IPersistFile interface. So our ShellLink object is going to have a set of public properties that correspond to the GetXXX/SetXXX methods and the two methods - Load and Save. The code does not cover the full shell link functionality. I have omitted the IShellLink.GetIDList method because it works with non-file items, and also omitted the IShellLink.SetRelativePath method and left its implementation to you.
GetXXX/SetXXX
Resolve
ShellLink
Load
Save
IShellLink.GetIDList
IShellLink.SetRelativePath
Let's begin from the Arguments property:
Arguments
private string arguments;
public string Arguments
{
get
{
return arguments;
}
set
{
arguments = Str(value);
}
}
The only interesting point here is the call to the Str() function in the property's setter. This is a helper function that returns a String.Empty object if it receives a null reference. Actually, I use here the Null Object Design Pattern.
Str()
String.Empty
private static string Str(string str)
{
return (null == str) ? String.Empty : str;
}
The same way, I define the Description, Path, and WorkingDirectory properties. I also define the non-string property named Hotkey:
Description
Path
WorkingDirectory
Hotkey
private short hotkey;
public short Hotkey
{
get
{
return hotkey;
}
set
{
hotkey = value;
}
}
According to MSDN's IShellLink.GetHotKey method description, the hot key is a 16-bit value that consists of a virtual key code in the low-order byte and a set of modifier flags in the high-order byte. Ideally, I should have created a class or a structure to simplify this combination, but didn't want to waste my time. It should be easy, and you can do it yourself.
IShellLink.GetHotKey
There's also a ShowCmd property I have defined like this:
ShowCmd
private ShowCommand showCmd;
public ShowCommand ShowCmd
{
get
{
return showCmd;
}
set
{
showCmd = value;
}
}
The ShowCommand enumeration is defined as:
ShowCommand
public enum ShowCommand: int
{
ShowNormal = 1,
ShowMaximized = 3,
ShowMinimized = 7
}
and its values correspond to the respective SW_xxx constants from the Platform SDK header file winuser.h.
SW_xxx
The most interesting things are the IconPath and IconIndex properties. From the shell link COM object point of view, there are two methods: GetIconLocation and SetIconLocation. And the icon location consists of a path to the file that contains the icon and the icon's index in the file's resource. The icon index is equal 0 for files with a *.ICO extension.
IconPath
IconIndex
GetIconLocation
SetIconLocation
I have implemented these two properties much the same way as the rest, but treat them a bit differently.
Now, let's see the Load method implementation. The idea is to perform all the interop calls inside this method as an atomic transaction so you can work with the shell link object just like you work with strings, never bothering to call Dispose or worrying to have memory leaks.
Dispose
First, let me declare the GUID of the shell link COM object:
private static readonly Guid CLSID_ShellLink =
new Guid("00021401-0000-0000-C000-000000000046");
Now the code that uses this GUID (comments omitted for brevity):
[SecurityPermission(SecurityAction.Demand, UnmanagedCode=true)]
public void Load(string linkFileName)
{
if(null == linkFileName)
throw new ArgumentNullException("linkFileName",
"A name of the link file cannot be null");
if(!File.Exists(linkFileName))
throw new FileNotFoundException("Link not found", linkFileName);
new FileIOPermission(FileIOPermissionAccess.Read |
FileIOPermissionAccess.PathDiscovery, linkFileName).Demand();
object sl = null;
try
{
Type slType = Type.GetTypeFromCLSID(CLSID_ShellLink);
sl = Activator.CreateInstance(slType);
IPersistFile pf = sl as IPersistFile;
pf.Load(linkFileName, 0);
int showCmd;
StringBuilder builder = new StringBuilder(INFOTIPSIZE);
IShellLinkW shellLinkW = sl as IShellLinkW;
if(null == shellLinkW)
{
IShellLinkA shellLinkA = sl as IShellLinkA;
if(null == shellLinkA)
ThrowInvalidComObjectException();
shellLinkA.GetArguments(builder, builder.Capacity);
this.arguments = builder.ToString();
shellLinkA.GetDescription(builder, builder.Capacity);
this.description = builder.ToString();
shellLinkA.GetHotkey(out this.hotkey);
shellLinkA.GetIconLocation(builder, builder.Capacity, out this.iconIndex);
this.iconPath = builder.ToString();
Win32FindDataA wfd;
shellLinkA.GetPath(builder, builder.Capacity, out wfd, SLGP_UNCPRIORITY);
this.path = builder.ToString();
shellLinkA.GetShowCmd(out showCmd);
shellLinkA.GetWorkingDirectory(builder, builder.Capacity);
this.workingDirectory = builder.ToString();
}
else
{
shellLinkW.GetArguments(builder, builder.Capacity);
this.arguments = builder.ToString();
shellLinkW.GetDescription(builder, builder.Capacity);
this.description = builder.ToString();
shellLinkW.GetHotkey(out this.hotkey);
shellLinkW.GetIconLocation(builder, builder.Capacity, out this.iconIndex);
this.iconPath = builder.ToString();
Win32FindDataW wfd;
shellLinkW.GetPath(builder, builder.Capacity, out wfd, SLGP_UNCPRIORITY);
this.path = builder.ToString();
shellLinkW.GetShowCmd(out showCmd);
shellLinkW.GetWorkingDirectory(builder, builder.Capacity);
this.workingDirectory = builder.ToString();
}
this.showCmd = (ShowCommand)showCmd;
}
finally
{
if(null != sl)
Marshal.ReleaseComObject(sl);
}
GC.KeepAlive(this);
}
The method demands execution of unmanaged code using the SecurityPermissionAttribute class. Note that the ability to call unmanaged code is also being requested at the assembly level, so the sample code won't work in a partially trusted environment, even in a LocalIntranet security zone.
SecurityPermissionAttribute
First we check the parameters - if we received null instead of a file name and if the link file really exists. Then we demand ability to read the shell link file. I perform these security checks because CLR won't do it for me as it does for BCL classes, and the end user would get a COM exception instead of a security exception.
null
Then, I instantiate the shell link COM object. I do it inside a try/finally block, so even if some code fails, the COM object will be released. Then I query for the IPersistFile interface that is defined in the code later.
try/finally
I prepare a couple of variables for later use, the most notable is the builder. It's going to be used as the buffer for strings. Its size, the constant INFOTIPSIZE, is taken from the Platform SDK, and declared as:
INFOTIPSIZE
private const int INFOTIPSIZE = 1024;
Note that in theory, the buffer of this size may not be enough because MSDN states that UNICODE Win32 API functions that perform file operations can operate with file paths as long as 32000 characters (). So far, I have never seen file names like that.
Now the most interesting part. I first query the shell link COM object for the IShellLinkW interface. If the query fails, I request the IShellLinkA interface. If both queries fail, I am (or better say, the end user is) in real trouble and throw an exception. If one of the interfaces is available, I call the proper GetXXX methods and fill the private fields with the returned values. This is actually the work that the interop should have done and it does for "normal" COM objects.
GetXXX
Both branches of the code look identical; all the difference is in the way the marshaler passes the strings and Win32FindDataX structures between managed and unmanaged code. And these structures are actually versions of the WIN32_FIND_DATA structure. I don't need the values from them, so I define the structures like this (the ANSI version):
Win32FindDataX
WIN32_FIND_DATA
[StructLayoutAttribute(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
internal struct Win32FindDataA
{
private uint dwFileAttributes;
private FILETIME ftCreationTime;
private FILETIME ftLastAccessTime;
private FILETIME ftLastWriteTime;
private uint nFileSizeHigh;
private uint nFileSizeLow;
private uint dwReserved0;
private uint dwReserved1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=260)]
private string cFileName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=14)]
private string cAlternateFileName;
}
Declaring the fields private makes the Assembly Analyser and FxCop happy.
private
After getting the values from the COM object, I translate the ShowCmd property value and release the COM object. The last note is a call to GC.KeepAlive. I do it to guard the shell link object from being garbage collected during the call to the Load method.
GC.KeepAlive
The Save method is implemented using the same technique.
I also provide a static method of the ShellLink class that checks if the file with the given name is a shell link or not:
[SecurityPermission(SecurityAction.Demand, UnmanagedCode=true)]
public static bool IsShellLink(string filePath)
{
if(null == filePath)
throw new ArgumentNullException(filePath, A name of the file cannot be null);
if(!File.Exists(filePath))
throw new FileNotFoundException(Cannot check file that doesn't exist, filePath);
new FileIOPermission(FileIOPermissionAccess.Read |
FileIOPermissionAccess.PathDiscovery, filePath).Demand();
SHFileInfo sfi = new SHFileInfo();
SHGetFileInfo(filePath, 0, out sfi, Marshal.SizeOf(sfi), SHGFI_ATTRIBUTES);
return SFGAO_LINK == (sfi.Attributes & SFGAO_LINK);
}
At the end of the ShellLink class source code, I put a region with all interop declarations and definitions. Though FxCop insists on using a separate class named NativeMethods, I believe it's overkill for a sample.
NativeMethods
Now the ShellLink object becomes a simple managed object. I don't have to worry about IDisposable, using statements, and finalizers. And I believe that my code works a little bit faster than IDisposable-based versions because all interop calls are made in a single batch, the COM object gets released immediately, and doesn't consume precious unmanaged memory.
So when you deal with legacy code, try to stick with the rules:
The less classes that implement IDisposable, the better the world is.
The code accompanying the article is provided as is, and considered to be public domain. Use it at your own risk. If you find an error, please drop me an e-mail.
The code that illustrates the article is developed using the freeware Open Source #Develop IDE () so the package contains a #Develop combine.
I have also provided a nant.build file. To use it, you should have NAnt 0.85 with NUnit 2.2 and NDoc 1.3.1 installed. The build file makes four subprojects: Pvax.Shell.dll that contains the ShellLink class, Pvax.Shell.Tests.dll that contains a couple of unit tests, and two test projects - resolve.exe, a console application, and LinkView.exe, a Windows Forms application. It also runs the unit tests and builds the documentation file Pvax.Shell.chm.
You can also build the debug version of the main library and both test applications using a build.bat file. Thanks to Lutz Roeder () for his CommandBar sample library that contains the build.bat that "inspired" me on writing my own.
Sorry guys, I have no Visual Studio, so I cannot provide you with a solution file. You probably can build it yourself; just create four subprojects and add the proper source files there. I know there is a NUnit add-on for VS, so you should be able to run the tests from the IDE.
#Develop's Assembly Analyzer and FxCop say that the assembly Pvax.Shell.dll should be strong named and that the Pvax.Shell namespace contains too little types; the latter also says a lot about imperative security. Don't bother, it's just a sample.
Pvax. | http://www.codeproject.com/Articles/11368/Avoiding-IDisposable-while-still-working-with-unma?fid=209092&df=90&mpp=10&sort=Position&spc=None&tid=1202528 | CC-MAIN-2014-42 | refinedweb | 2,919 | 55.95 |
Example Ember.js + Django + Django Rest Framework single-page application
Ember.js is one of JavaScript frameworks for creating interactive
single page web applications. Pages may change but the browser doesn't reload the page. This framework has some similarities with Django and can be good pick to start with such frontend applications for Django developers with some JavaScript knowledge.
In this article I'll show you an example Django + Django Rest Framework + Ember.js application. Classical posts and categories done in Ember and in Django for comparison.
Ember.js + DRF + Django Application
If you are new to Ember.js you should read my previous article which describes the basics (and shows an ember application with Tastypie backend). In this article I'll go staright to the application code.
So now I'll go through a simple application that has posts assiged to a category. Whole django project with the ember code can be found on github. Grab it, run it, modify it as you see fit. There are two applications:
blog with the classical Django implementation and
eblog with ember frontend, DRF API backend and Django.
Single page applications need a single page so in Django we just need a basic view that renders a given template:
from django.views.generic import TemplateView class EmberView(TemplateView): template_name = 'eblog/blog.html' ember_view = EmberView.as_view()
That blog.html template has some vendor and our JS files hooked:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="{% static 'vendor/handlebars-v1.3.0.js' %}"></script> <script src="{% static 'vendor/ember.js' %}"></script> <script src="{% static 'vendor/ember-data.js' %}"></script> <script src="{% static 'vendor/ember-data-django-rest-adapter.js' %}"></script> <script src="{% static 'vendor/moment-with-locales.js' %}"></script> <script src="{% static 'application/app.js' %}"></script> <script src="{% static 'application/helpers.js' %}"></script> <script src="{% static 'application/router.js' %}"></script> <script src="{% static 'application/routes.js' %}"></script> <script src="{% static 'application/controllers.js' %}"></script> <script src="{% static 'application/models.js' %}"></script> <script src="{% static 'application/views.js' %}"></script>
We have jquery, handlebars templates library, ember and django rest framework adapter for ember as well as our application files. Ember applications divide to parts so I places each in separate file:
- app.js: App initialization code.
- helpers.js: sometimes we may need template helpers.
- router.js: URL routing here.
- routes.js: page business logic here.
- controllers.js: custom controllers for pages.
- models.js: models for data available over the REST API.
- views.js: custom views for use in templates.
Let us start with standard app initialization in app.js (can have more options and code):
window.Blog = Ember.Application.create();
Where
Blog is the
application name used in every other file.
Now we can write models for our Django models which have posts and categories:
(function(Blog, $, undefined ) { Blog.ApplicationAdapter = DS.DjangoRESTAdapter.extend({ namespace: "api" }); Blog.Category = DS.Model.extend({ name: DS.attr('string'), slug: DS.attr('string') }); Blog.Post = DS.Model.extend({ title: DS.attr('string'), slug: DS.attr('string'), text: DS.attr('string'), category: DS.belongsTo('category', {async: true}), posted_date: DS.attr('date') }); }(window.Blog, jQuery));
ApplicationAdapter is the DRF adapter configuration for ember. Usually every REST generation backend needs an adapter for ember so that all features are supported (like filtering, relation handling, batch fetching etc.). In case of DRF we have ember-django-adapter.
Blog.Category and Blog.Post are ember models that match Django models exposed via the REST API by DRF. DS.attr can take one argument stating field type. It's optional, but for non string or not null fields it's required for correct handling.
We have models that will call the DRF API, which is made by serializers and two views: CategorySetView and PostSetView.
So now we can start with base ember template. In the blog.html template there are JS inserts of handlebars templates used by ember.
body.handlebars is the base template used by ember and the other templates are for our pages:
<script type="text/x-handlebars"> {% include "eblog/body.handlebars" %} </script> <script type="text/x-handlebars" data- {% include "eblog/posts.handlebars" %} </script> <script type="text/x-handlebars" data- {% include "eblog/posts.handlebars" %} </script> <script type="text/x-handlebars" data- {% include "eblog/post.handlebars" %} </script>
Template name passed in
data-template-name is used to populate names fo controllers, views, route and so on. For
posts we will get PostsController, PostsView etc. A page within ember application doesn't have to have custom views or controllers as ember will use built in defaults if nothing custom is provided.
So let us look at the body.handlebars:
{% verbatim %} <div class="blog-app"> <h1>{{#link-to "posts"}}Example Blog{{/link-to}}</h1> <nav> {{#each category in categoriesClassic version</a> </footer>
Handlebars use similar syntax to Django templates so we have to use
verbatim tag to prevent Django from parsing handlebars templates. The
link-to tag is used to make links to pages within ember. The
outlet tag defines a place in which child templates will be inserted - so in our case all other three. There is also category list iteration and linking every category to a page (that should show posts only from that category).
The
each iterator has an extra
itemController which allows us to assign a custom controller for every iterated element. From our controller we have a
isActive property which will set CSS class to
current if true (STATEMENT:ON_TRUE:ON_FALSE).
Now let check our router - URLs within our application:
(function(Blog, $, undefined) { Blog.Router.map(function() { this.route('posts'); this.route('categoryPosts', {path: 'category/:id'}); this.route('post', {path: 'posts/:id'}); }); if (window.history && window.history.pushState) { Blog.Router.reopen({ location: 'history' }); } }(window.Blog, jQuery));
We have three pages linked/defied with
this.route. In case of
categoryPosts which uses a category ID we pass that as a dynamic part of the URL, where
id is our variable name. Similar for
post. Ember also supports nesting pages and some other implementation of this example could have
categoryPost.
There is also
Blog.Router.reopen snipped that changes how URLs are generated. If the browser supports push state the links will look normally like
/posts/. If not default mode will be used that is based on hash
#/posts/. You can copy/past this snippet in your app too if you want better looking urls for most browsers (except older IE).
In
routes we have page business logic:
(function(Blog, $, undefined ) { Blog.IndexRoute = Ember.Route.extend({ redirect: function() { this.transitionTo('posts'); } }); Blog.PostsRoute = Ember.Route.extend({ model: function() { return this.get('store').find('post'); } }); Blog.CategoryPostsRoute = Ember.Route.extend({ model: function(params) { return this.get('store').find('post', {'category': params.id }); } }); Blog.PostRoute = Ember.Route.extend({ model: function(params) { return this.get('store').find('post', params.id); } }); }(window.Blog, jQuery));
IndexRoute is the rout for the root of the application and can be used to direct to one of our pages that will serve as the first page. Other routes are for our pages. In
PostsRoute we fetch all posts while for
CategoryPostsRoute we filter posts by category id.
params.id is the variable name from the URL mapping. And in the end for
PostRoute we fetch a post by given ID.
The
posts page should list all posts so in
posts.handlebars we iterate fetched content:
{% verbatim %} {{#each post in content}} <h2>{{#link-to "post" post.id}}{{post.title}}{{/link-to}}</h2> <blockquote> {{{post.text}}} <p>{{date post.posted_date}}, {{post.category.name}}</p> </blockquote> {{else}} <p>No posts.</p> {{/each}} {% endverbatim %}
Data fetched by route will be under
content. Note that ember is asynchronous. The page gets displayed while the data is being fetched and when it's fetched it gets displayed. In this simple example it doesn't change much over Django version but in more advanced applications it will be clearly visible and ember applications will be build differently than django ones.
The
date tag is a custom handlebars helper that formats date with moment.js library.
So let us look at the controllers:
(function(Blog, $, undefined ) { Blog.ApplicationController = Ember.ObjectController.extend({ categories: function() { return this.get('store').find('category'); }.property(), makeCurrentPathGlobal: function() { Blog.set('currentPath', this.get('currentPath')); }.observes('currentPath') }); Blog.PostController = Ember.ObjectController.extend({ isPython: function() { var title = this.get('content.title').toLowerCase(); var category = this.get('content.category.name'); if (category) { category = category.toLowerCase(); return title.indexOf('python') != -1 || category.indexOf('python') != -1; } }.property('content.title', 'content.category.name') }); Blog.CategoryController = Ember.ObjectController.extend({ needs: ["post"], isActive: function() { var path = Blog.get('currentPath'); return path == 'post' && this.get('content.id') == this.get('controllers.post.content.category.id'); }.property('content.id', 'controllers.post.content.category.id', 'Blog.currentPath') }); }(window.Blog, jQuery));
ApplicationController is the root controller which is visible in the base template. We fetch categories in it so that the template may list them. There is also a small hack assigning current path to a global application variable. Sometimes is needed to have that path in an IF statement but it should be avoided if possible - to avoid high number of value recalculations.
categories are marked as
property and such properties are key element of ember applications. A property will calculate its value only when it is used and when variable on which it depends change. In case of category list there is no dependencies so it will never recalculate, but as it is used in a template it will calculate once and return the result.
The
observes type of functions are reactions to an event. They calculate every time a variable on which their depend change. They don't return anything, they just react. Observers may recalculate a lot and in general should be avoided unless needed - like in views to handle external JS widgets or animations. Ember way of doing things is by properties and by template bindings (using things in templates which acts just like a property).
In
PostController I've created a property that has some dependencies - post title and category name. Will return true if there is
python somewhere within those two strings.
CategoryController has
isActive property that is used to highlight category name on the category list. Such properties handle asynchronous behavior of such applications. They will get a promise of a category or post with no value under given field. But when the object is fetched the promis will set it values and the property will be recalculated. You don't have to handle that nor do any DOM operation, jQuery event handling etc.
In the end
I've showcased a working basic ember application that uses Django and DRF as it data provider. Some aspects of ember applications are similar to django, but the asynchronous behavior makes at some point using ember much harder (for the first time). Even so single page applications can be quite handy to use for users where they don't have to wait for page to load and so on. Ember application can work as an Facebook application (like a contest) or rich content, interactive
widget on a bigger web page and more.
So if you are interested in ember get the code from github, check ember manual, try to change the application a bit or try creating something simple on your own. A lot of help is available on stackoverlow or also some on the ember IRC channel. | https://rk.edu.pl/en/example-emberjs-django-django-rest-framework-single-page-application/ | CC-MAIN-2021-31 | refinedweb | 1,895 | 51.65 |
Its my first program written in Python. What its supposed to do is run a python script on a PC which emails back their IP address and other basic information. Right now the only code is for the SMTP email service but I'm hoping to get feedback from the community and optimize that code and then add a service to locate and email the IP address, user info, open ports and other possible snip-its.
Version (Pre-Alpha):
Code:
#!/bin/usr/python
import smtplib
sender = 'from@fromdomain.com'
receivers = ['to@todomain.com']
message = """From: From Person <from@fromdomain.com>
To: To Person <to@todomain.com>
Subject: SMTP e-mail test
This is a test e-mail message.
"""
try:
smtplib.SMTP('mail.gmail.com', 25)
smtpObj.sendmail(sender, receivers, message)
print "Successfully sent email"
except SMTPException:
print "Error: unable to send email" | http://www.backtrack-linux.org/forums/printthread.php?t=43668&pp=10&page=1 | CC-MAIN-2014-10 | refinedweb | 142 | 60.31 |
Weeks
Wow, is it really that long since I last posted? Well, I have been busy. Still, this log can save me time if I'm careful, so I shouldn't continue to neglect it.
So why am I so busy?
Confirmation
Yup, this ugly beast has reared it's head at last. It shouldn't be a big deal, but since I'm trying to work full time it has been almost impossible to find the time to do it. Consequently, I've been spending my evenings and weekends working on the report. That's the time I normally spend on this blog, which is why the blog hasn't been attended to.
Anyway, the report is now written, which is good, because I have to submit it today. I was not aware of the timetable for this, but I was informed on Friday that I really needed it in by Tuesday, and even that was late. I'd hoped to have it finished by then, but I really wanted some feedback before submitting it, and now it looks like I'll have to forgo that.
Now I need to work on the presentation. I know what I need to talk about (after all, I've been discussing it for months, and I've just written a report on it), but the slides will take me some time. It's been a while since I've had to do this.
During that, I have to try to be careful of my exercise and sleep, as I'll be at the Mooloolaba triathlon this weekend. My recent illnesses have taken their toll, so I won't be doing the whole thing. This time I'll be in a team, so I'll just be doing the 1500m ocean swim.
Somehow in amongst all of this, Anne and I are finally getting married in two weeks. What started out as a small event with immediate family and close friends has now grown. I'm looking forward to it, but I could do without the stress of all the new preparations that are required with a bigger event.
Collection Prefixes
I've now coded everything to match the collection prefixes. This went right down in the string pool, all the way to the AVL nodes. I hate going that far down for a high level concept, but it seemed necessary. There are well established interfaces to find the first of something in the string pool, but not the last of it. To simplify things, I decided to make the search only look for URI prefixes, rather than strings in general. If we want it working on strings, then the odds are good that we will want full string searching, so I didn't see the point in adding prefix searching in general.
This work took much longer than I thought, because of the sheer scope of the changes. Every
StringPool and
Resolver class needed modification to handle the new interfaces for searching by prefix. It turns out that there are a lot of them.
Once I thought I was finished, I discovered that I also needed to add support for the in-memory string pool. I'd forgotten about this class. I went in to see how it worked, and discovered that it was written by Andrew. So I set about trying to work out how the existing
findGNodes codes worked, with the hope of modifying it. 5 minutes later I realised that I was the one who'd written this method! I'm guessing that if I search back in this blog I'll even find an entry for it (that reminds me... I should add a Google search to this page).
OK, so I knew how this method worked. It's based on a sorted set (a
TreeSet). But was there any way to find the last element which matches a prefix in a tree set? I'd need to create a new comparator again, but this was getting beyond the scope of what I'd wanted to do. After all, I only wanted to find all the strings that matched a prefix.
So at this point I tried a new tack. To find the last string which started with a prefix, I tried adding a new character to the end of the string. I just had to make sure that character was higher than any character this might be legitimately found here. I started out with ASCII, but then I remembered that URIs can be in Unicode (I really should learn another language, I'd remember these things). So I went looking at the
Character class, and discovered a character called
Character.MAX_VALUE. So I added this to the end of the prefix and used this as my end point for searching. It worked fine.
In fact, it worked too well. Now I'm wondering if I wasted a lot of time with the
findPrefix methods in the string pools. Strictly speaking, these methods are more correct than using the
MAX_VALUE character to find the last string, as it is theoretically possible to use this character in a URI. However, in practice I don't think it ever could be. It certainly won't be used in the context of the
rdf:_ prefix.
ASTs for iTQL
Writing the RDF for a set of rules is a time consuming task. I have everything I need for RDFS, but when I get on to OWL it will get a lot more complex. Since these rules are representing iTQL then a tool which can create the RDF from an iTQL query would make rule generation significantly faster and less error prone. I will really need a tool like this when I get to testing, for fast, reliable turnaround.
So I've spent a little time writing such a tool. This started by pulling out the SableCC parts from Kowari, and re-writing the semantics code. It meant learning more about SableCC than I thought I needed to, but I'm pleased to have picked it up.
In the process I discovered that it was going to take a little more work than I'd originally anticipated. Plus I'll need to consider how to pass in non-iTQL options (such as the URI for the name of the rule being generated). I'm considering using some magic tags in comments, like javadoc does, but I'm also putting that decision off while I can.
Anyway, it's a good intro for AST transformation into RDF, which I've been getting interested in recently. It's more work than I initially anticipated so I still have a lot to write on this. However, it's interesting, and necessary, so when I can I'll be spending time on it. That will be some time after the confirmation.
Monday, April 25, 2005
Weeks
Thursday, April 14, 2005
Day Care
Once more, Luc brought something home from day care. It probably doesn't help that I've been working late most nights. :-)
So Wednesday and Thursday were very unproductive. I don't think I got a lot of programming done, but I did look at some debugging, particularly on the SOAP interface. This morning (Friday) I took a little while to get moving, but once I did I've been able to write quite a bit for the confirmation. Now that I've done that, I think I'd better use the weekend to make up some time on coding.
After dealing with CVS brokeness on Sourceforge, Richard helped me to find that the SOAP problem is due to machine names in model URIs. This was fixed last year, but I'm guessing that it was only fixed along the code path for RMI. I'll try and add some debugging (yet another attempt at configuring log4j) and see where the execution path goes. The machine renaming should either get moved into a common path (if possible) or duplicated into an appropriate area for SOAP.
However, I have enough to do at the moment that this kind of debugging will probably be procrastination. I guess I'll have to come back to it after I've confirmed the Masters.
Posted by
Paula G
at
Thursday, April 14, 2005
0
Tuesday, April 12, 2005
Time to Write
At the moment I'm spending my days programming, and my evenings studying. That's not leaving a lot of time to blog! I'd love to write more, but it's just really difficult.
Evening study has become more pressing at the moment because I have my confirmation on the 29th of this month (that's Friday fortnight for those of you who understand the term). Because of this I'm thinking that I might spend my next few days "inverting" my working habits... study in the day, and programming at night. That's because I'm getting easily distracted from study in the evenings, but Anne thinks that when I write code I wouldn't notice a bomb going off. :-) Besides, I tend to be at my most productive when programming in the evenings. I always have.
Testing and Debugging
The subtraction operation testing went slowly, but smoothly. Once I got through the full suite of tests the first time, it didn't take long to discover that the test target I needed was
test_tuples. That helped it all go faster.
I ended up with some problems getting the full set of JXUnit tests to work. While the simple case worked correctly, I tried some variations on the subtrahend, which led to some failures. The
Difference was fine (the unit tests proved that), and the problem was due to sorting the arguments in the
TuplesOperations.subtract() method. This ended up being due to an inverted test, but it took me a little while to find it.
The difficulty in finding the problem was because I could not modify the log4j configuration (again!). I thought I'd solved this problem months ago, but no matter which XML configuration files I modified, the system always picked up a file that was internal to the JAR file, and would not see my modifications to display debug info. Rather than spend another day on this, I just resorted to error messages, and removed them when I had fixed everything.
Whoever installed the log4j system need to document exactly how to modify the configuration for this. As I said, I thought I'd worked it out some time ago, but obviously not. This time around I modified the log4j.conf file in the main directory and in the conf directory. I then did a "clean" and a full rebuild, and there was no effect. I also did a "find" to look for any other XML files that might affect the configuration, but couldn't find any.
The problem with my desire to get the installer of log4j to document it, is that no one remembers who did it. I suspect Simon, but he doesn't remember. :-)
OWL Again
The next thing I worked on was the underlying semantics for OWL. Bijan has led me down a dark path, and now it seems I have to re-evaluate a lot of what I knew about OWL. It's strange and fortunate, but many of the changes in my understand have not resulted in practical differences to my implementation, although a couple have. At least it has led me to the documentation I need for a more complete implementation of OWL inferencing.
I should also respond to a few people who have written in about doing a closed world assumption for cardinality testing. I can now say with complete confidence that this is a bad idea. For a start, it is not OWL, and will break legitimate inferencing. You can't just switch between open and closed world like that. I agree that the closed world is better in many ways, particularly when working with databases, but it can't be used here, else it will make OWL something that it is not.
For those people who'd like these kind of semantics on cardinality, then perhaps it is time to create a "closed world" namespace. I don't know if it really works with an open world RDF, but if people are doing this sort of thing anyway, then it would be a good idea to do it in a carefully closed off area, rather that changing the meaning of OWL.
Resolvers
I could only spend a short while on that before getting back to the collection resolver. Well, it's just a sequence resolver for the moment, as I don't need to traverse the
rdf:rest links yet. When I do need to handle those collections, I'll need to update
trans to variables bound to a set, instead of single value bindings. This is proceeding smoothly, though it doesn't run yet, as I'm still in the row comparator for the string pool.
This comparator isn't as nice to use as the one from the type resolver, as it needs to look at the string pool entry from the block files, which means much more disk activity. I'll go with the obvious implementation for the moment (I don't want to prematurely optimise), but I'm wondering if there is a hint I can give to the index about where the
rdf namespace starts and finishes.
In the best possible world I'd rebuilt the string pool as a Patricia tree. However, I don't know how I can do that and still maintain our read/write phases. Maybe I could build a Patricia tree on the side, and update it periodically. It wouldn't be guaranteed to give perfect answers all the time, but that may still be useful. After all, the updatedb/locate database on many systems works like this. Even Google falls behind changes around the world, and yet no one would claim that it is not useful. Unfortunately, that is one of those pie in the sky ideas that I'll have to put aside until I get some time.
SOAP
I had a request from someone at UQ today about the SOAP interface (I'm linking to Apache instead of the canonical site, because that's what Kowari uses). He was using Ruby to talk to the interface, so Java's RMI was not an option for him. Unfortunately, SOAP didn't seem to work for him either.
That made me think about our external interfaces. If you want to use Kowari from an external package, you need some sort of IPC to talk to it. RMI is great if your code is in Java, but what about those projects which are not? For instance, how about Ruby? SOAP would seem like a good idea, but there are apparently problems.
The first problem came about when the server recognised that the wrong servername was being used to access the local database. I was concerned about this problem, as I fixed it in November. I looked at my own source code, and discovered that the reported line number in
SessionFactoryFinder was for a blank line, meaning that the JAR file being used was at least as old as November. I looked into this, and discovered that the suspect JAR is the latest binary download from Kowari. We had better get the latest one out there. (That is a hint Andrew!)
In the meantime, I asked this person to use a CVS checkout, only to discover that Sourceforge would not let him check out a copy! In the end, I had to use my own account to get a checkout. Bizarre.
While this is all a bit of a diversion from my real task, keeping this stuff running is still important. I'll see how far I can get with it tomorrow, and if it's taking too long I'll palm it off to Simon, since he wrote the SOAP code in the first place.
Again, the time is too short, so I'll have to leave it here. It's annoying, as I have so much more to write! :-(
Posted by
Paula G
at
Tuesday, April 12, 2005
0
Friday, April 08, 2005
Differences
The other big thing this week has been the difference code. I believe that I'd already mentioned that I seemed to have it working, but sorting the tuples resulted in an empty set.
After wasting some time on debugging, I tried another tack. The result of a difference is essentially just the original minuend, filtered by the data in the subtrahend. Hence, all the method calls on the difference calls which ask about the structure of the tuples should return exactly the same information as the original minuend (with the exception of the row count).
So what was I returning that was different to the minuend? For almost every method I was passing the call straight through to the minuend. The exceptions were
isMaterialised(),
getOperands(),
close() and
clone(). None of this seemed suspicious, so why did the sorting code think that the
Difference class looked different to the minuend?
Thinking about this for a while made me realise that
Difference does not implement
Tuples, but rather, it extends
AbstractTuples. This means that it was providing some default implementations of a couple of methods, rather than using the minuend's implementation. I don't remember the exact methods now, but I think that the default methods I was using were
isUnconstrained() and
getComparator(). I tracked these all down, and implemented them myself, or else passed them on to the minuend.
After that, I tried the unit tests again, and had a lot more success. I still had quite a few errors, but in almost every case this was due to the unit tests being incorrect, so it was easy (though time consuming) to track them all down.
The only unit tests I had trouble with were those which included unconstrained variables. It appears that
beforeFirst(prefix) is not implemented correctly for cases where the prefix includes
UNBOUND. This is not so bad if the unbound variable is at the end of the prefix, as I could try to detect that and truncate the length of the prefix, but it would make the method very non-general.
Considering the general case, having unbound variables at the start of the prefix would require suffix matching, which is something that Andrae and Simon have pointed out is explicitly not supported yet. I'm not sure how I'd go about handling an unbound in the middle of a prefix, except by iterating or re-ordering the tuples. Neither of these are appealing options.
On reflection, I can't think of a use case where I need support for unbound variables in the difference, so I was more than happy to disable these tests. If I ever see a need for them I'll reconsider, but my current needs always result in bound variables.
From the passing unit tests I moved on to testing the iTQL. I'm pleased to say that this all worked perfectly on the first attempt. :-) I'm now putting together some JXUnit tests to script these iTQL tests. (JXUnit is certainly convenient, but it's frustrating how much effort goes into creating even a simple test).
I'll check it all in this evening.
Posted by
Paula G
at
Friday, April 08, 2005
0
Thursday, April 07, 2005
Q & A on Cardinality
I'm not blogging as much these days, which is annoying me. Instead, I'm working longer hours, particularly in the evenings when I normally write the blog. I'm pretty happy about the amount of work I'm getting done, but it would be nice to be keeping track of it better.
Over the last 3 days I've spent some significant time working over some problems to do with cardinality. Anyone watching the RDF Logic mailing list will have seen me working through some of these issues. I'll confess that it's a little embarrassing having the world watch me blunder along as I learn something, but at least I'm coming to a better understanding. Thanks go to Bijan Parsia for this.
So what is the deal with
owl:minCardinality? Well there seem to be two broad cases to consider.
The first is that
owl:minCardinality can conflict with another restriction on the domain of a predicate. For instance, there may be an
owl:maxCardinality restriction which is for a lower number than the
owl:minCardinality restriction. Or perhaps the range of the restricted predicate is a limited set of instances (from a
owl:oneOf definition on the class of the range), and the size of the set of the range is less than the minimum cardinality. In cases like this, the class is unsatisfiable. That means that while the class can exist without conflict, any instances of the class will cause a conflict.
I had earlier thought that it would be illegal to have an unsatisfiable class, but this is not the case. The classic case of this is the
owl:Nothing class. Allowing these classes does change things a bit.
So
owl:minCardinality can be used to define (and detect violations of) unsatisfiable classes.
The second case is where
owl:minCardinality is used to define a satisfiable class. In this case, it tells you that a predicate is in use, but it can't say anything else. If the knowledge base includes some usages of that predicate, then fine. If the knowledge base does not include the usage of that predicate, then you still know that the predicate is being used... but you can't know how it's being used.
From the perspective of supporting OWL minimum cardinality in a database (like Kowari), this means that the database can't do anything for you (except detect the use of an unsatisfiable class). It can't entail any new statements, nor can it detect an inconsistency that must be corrected.
For people who were hoping to use
owl:minCardinality to restrict their models in some way, this will come as a disappointment.
I'm still thinking that it may be useful for some people if I allow for a "temporary" closed world check. That way, if they want to use minimum cardinality to check that a predicate is used at least that many times, then they can. This is an incorrect usage of OWL, but one that I think some people expect to have.
I'll work on the correct implementation first, and then I'll look at installing a switch that will allow of this incorrect (though potentially useful) behaviour. At that point I'll have to decide if I want to assume unique names or not. Yuck. :-)
Posted by
Paula G
at
Thursday, April 07, 2005
2
Tuesday, April 05, 2005
Mach_override
The other day I read an interesting article by Jonathan Rentzsch, on the implementation of mach_override and mach_inject. I think it's interesting, because last year I wrote almost identical code for Windows. Reading this gave me a funny sense of déjà vu.
The main difference between Windows and OSX for this code, is that the mechanisms for doing it in Windows are not properly documented. There are articles for doing it on the net, but they all suffer from problems that I had to overcome.
For a start, Windows does not document that fundamental DLL files (like system32.dll) are mapped into the address space of every process at the same location. This is essential, or else it would not be possible to know where the function to override could be found. Fortunately, it has been well established by people like Matt Pietrik that this can be relied upon, though future versions of Windows could theoretically break this assumption.
More importantly, the only establish technique of code injection in Windows is to create a new thread in the remote process and have it load the code. Unfortunately, we discovered that this causes a race condition that can occasionally cause applications to crash. Since we were building commercial code I needed a better solution.
The solution here was to create the process with the primary thread already paused. Once the program was loaded I could allocate some extra memory (in the same way that mach_override uses
vm_allocate) and write some of my own code into it. Then I could look for the entry point and overwrite the start of the program with a
JMP instruction to go to my freshly created code.
This all sounds straight forward, but it isn't. There are a number of APIs for looking at a remote process's address space, but it turns out that none of them work properly when the process is started in a paused state. It seems that all of the information describing a process's memory is initialised at some point by the application itself.
Fortunately, the memory is partitioned into modules, even though they are not correctly labeled. The solution is to iterate through these modules, and look at the data in them. Since an executable program gets mapped into memory, I realised that one of the modules must start with the head of the file, so I went looking for a Windows executable file header. Once I found it, I was able to trace through the various headers and pointers to find the address of the program entry point. Adding this to the offset of the executable image gave me the entry point of the program.
So while all of the APIs which are supposed to help here were actually useless, it was still possible to find the entry point, and modify the code found there. The code that the program was instructed to jump to would load a DLL which did the rest of the work during its intialisation later on. The end of this code then replaced the original instructions at the program entry point, and jumped back to it. Then when the application was run, it would start with my injected code before doing anything else. It didn't require threads and was therefore free of the errors from the other technique. It also prevented a program from setting anything up which might preclude a function interceptor from working.
The initialisation of the DLL that was loaded ended up doing the work of overwriting any functions that we needed to intercept. This worked almost identically to the mach_override code with one minor exception. mach_override works on a RISC architecture, and so the instructions are guaranteed to be a particular width. Unfortunately, the CISC instructions on Intel chips need to be decoded in order to work out how many bytes wide they were. Luckily, there is a short list of opcodes which are used to start all the functions in Windows, and DavidM spent a few days tracking them all down. This meant that we only needed a small table to work out just how many bytes were needed to be copied from the beginning of a function, so they could be replaced with a
JMP to the replacement code. Fortunately, none of those instructions referred to relative addresses, so no re-writing of these opcodes was necessary.
The weirdest thing I discovered was when various memory pages started changing the permissions. By default, memory with executable code will generate a fault when it is written to, so its permissions have to be updated first. However, I was finding between my loading of my DLL, and the initialisation of the DLL, some pages which I set to being writable had reverted back to being read-only/executable, but only for certain "Office 2000" applications. This was how I discovered that these applications contained statically linked DLLs (which were loaded by the OS after the program was started, but before the entry point of the process was reached) which were modifying the pages of the entry point as well. In other words, someone at Microsoft was also dynamically re-writing the binary at the start of the executable, just like I was.
This kind of dynamic re-writing is simply patching the code after compilation. Given that it comes from Microsoft, I'm surprised that the writer didn't just go and ask to modify the original code! People like me, outside of Redmond, have to perform hacks like this, but Microsoft shouldn't have to! :-)
So the details were very different, but the principles were the same. I always liked this code, and was looking forward to releasing it, but I never seemed to get around to it. DavidW asked that I write all of this up, and I've been very slack about doing it. I've written it down here mostly as a reminder that I need to get around to it one day. Maybe I'll do it while procrastinating about writing my thesis. :-)
Posted by
Paula G
at
Tuesday, April 05, 2005
0
Container Prefixes
I realised that I've spent quite a bit of time working on the difference code, and I've been getting frustrated. The problem has not been writing my code, but rather the need to read and learn other people's code in the joining framework. My recent round of debugging was a good example: the
Difference class appears to work correctly, but the sorting code does not want to recognise it. This means I have to learn the sorting code more carefully.
One of the problems of working on my own is that there is rarely anything to encourage me to poke my head up and look at the world around me. So I thought a little break might be good for my perspective, and I might improve my productivity while I was at it.
Consequently, today I've spent the day working on a new resolver for finding all collection predicates. These are the URIs which follow the pattern:
rdf:_*.
The code to do this is easy and a lot of it is relatively boilerplate, so it hasn't been hard to do. It is very like the "Node Type" resolver, only it needs to find sections in the string pool using different mechanisms.
NodeTypeResolver was easier as it could perform selections using type comparators which were already available in the string pool, but it should not be too difficult to write the new one that can select by prefix instead. However, it does make it more complex. I hope to finish it in the next few days, and then I can go back to debugging the sort.
Posted by
Paula G
at
Tuesday, April 05, 2005
0
Monday, April 04, 2005
Sorting
What is wrong with sorting?
Debugging the difference operation has been a frustrating process, not least because it appears to be working. To start with there were a few problems, but I tracked these down quickly, and resolved them all. But then the unit tests started to give me some strange results.
The first thing I found was that the result of a difference had a null set of variables. This didn't make sense, as it was just returning the variables of the minuend, and the difference operation would have thrown an exception if the minuend had no variables.
After trying to work out what was wrong with the
Difference class for way too long, I suddenly realised that the object I was looking at was not the result of a difference, but the sorted result of a difference. So I looked at the unsorted result, and sure enough everything was correct. As far as I can tell, the
Difference class is working perfectly well.
So where is the problem? Well sorting does not use a
RowComparator (like the lexical sorter does), but is based on how the variables line up with columns from the underlying indexes. This will not work with a
Difference class, as defined by its interface, as this technique is presupposing knowledge of the internal workings of the class.
So there are two choices here. Either I create a
RowComparator and use the other sort method (the one used for lexical sorting of the output to the user), or I drop the principle of information hiding, and allow sort to have special knowledge of the
Difference class. I fear that the latter is the way to go here, but it bothers me, as it will not work on a different (and more efficient) implementation of the difference algorithm.
For the moment, differences are calculated lazily by iterating on the minuend, and filtering based on what is found in the subtrahend (that's a simple description of a lot of work!). So structurally, the result should resemble the minuend in almost every respect. Many of the
Difference methods reflect this, in that they simply delegate their work to the minuend.
Given this, I have not been able to work out why the sorting functionality does not just work on the minuend part of the
Difference object. This won't work if the
Difference implementation is ever updated to sort the minuend as well, but since that is not required in this implementation there should not be a problem.
A cursory glance at the sort didn't reveal anything, so I'll be going through it in detail tomorrow.
In the meantime, I altered the tests to check for the unsorted data first. So far everything has passed, which gives me confidence that it is all working (though I still need to check the unbound variables tests more carefully). Once "sorting" has been resolved I should be able to get out of this code.
Posted by
Paula G
at
Monday, April 04, 2005
0
Saturday, April 02, 2005
Slow
To test the bad memory in this PowerBook, I pulled out my 512MB module, and tried re-running the Kowari tests. A successful run would mean that module has a problem, while a failed run would indicate an internal problem in the PowerBook. The tests passed.
So now I just need to replace that module, rather than give up the computer for several weeks. Whew.
The big problem now is the performance of this computer. When running the Kowari tests it became completely unusable. Indeed, doing anything beyond text editing is painfully slow. Based on this, and Kowari's need for lots of memory, I'm thinking that it may be time to upgrade to a full GB of RAM. I should also be able to get new memory faster than a warrantee replacement on the old RAM, so it will have me up and running much sooner. I'll still get this other module fixed on warrantee, as I may be able to sell it to help offset the price of the new memory.
Posted by
Paula G
at
Saturday, April 02, 2005
0
Friday, April 01, 2005
Memory
For anyone concerned about Kowari tests failing on the Mac, I've just been able to confirm that it's my fault, not Kowari's. It seems that I may have some intermittently faulty memory.
Yay.
Hopefully it is my memory expansion module, and not the built-in RAM. When I have some time this weekend, I'll try taking the extra RAM out and doing another build. Hopefully it will pass, indicating a problem with the memory expansion. Fortunately, everything is under warranty, but I'd rather be without memory for a few days than without the whole computer while it gets fixed.
This may also explain why the system crashed last weekend.
Posted by
Paula G
at
Friday, April 01, 2005
0
| http://gearon.blogspot.com/2005_04_01_archive.html | CC-MAIN-2017-09 | refinedweb | 5,972 | 69.62 |
Handle AS-external-LSAs.
More...
#include <external.hh>
List of all members.
Handle AS-external-LSAs.
Candidate for announcing to other areas.
Store this LSA for future replay into other areas. Also arrange for the MaxAge timer to start running.
A true external route redistributed from the RIB (announce).
If the nexthop address is not configured for OSPF then it won't be reachable, so set the nexthop to zero.
Suppress or remove AS-external-LSAs that are originated by this router that should yield to externally generated AS-external-LSAs as described in RFC 2328 Section 12.4.4.
By time this method is called the routing table should have been updated so it should be clear if the other router is reachable.
[private]
An AS-external-LSA has reached MaxAge and is being withdrawn.
check to see if it was suppressing a self originated LSA.
This LSA if its advertising router is reachable matches a self origniated LSA that will be suppressed.
Store until the routing computation has completed and the routing table can be checked.
Networks with same network number but different prefix lengths can generate the same link state ID.
When looking for an LSA make sure that there the lsar that matches the net is found.
When generating a new LSA if a collision occurs use: RFC 2328 Appendix E. An algorithm for assigning Link State IDs to resolve the clash. | http://xorp.org/releases/current/docs/kdoc/html/classExternal.html | CC-MAIN-2017-39 | refinedweb | 236 | 65.83 |
By TEKNOGODS
TeknoMW3 2.0 - Modern Warfare 3 Steamless/Demonwareless Loader
------------------------------------------------------------------
We hope you'll enjoy this fine release! It took months to pull it
off. - We basically had to write some missing pieces of the game,
add a lot of extra services and code to handle them.
Our goal was to make it easier to play the game on LAN parties
or wherever a proper internet connection is a problem.
For future releases we plan on adding Internet server list,
an in-game console, mod support and much much more!
Don't forget to donate if you would like to keep us supporting
this Modern Warefare 3 MOD!
Regards & Enjoy
-+-
TeknoGods Staff
Requirements:
------------------------------------------------------------------
1. .NET Framework 4.0 ... x?id=17851
2. Original Modern Warfare 3 1.0-1.5 update
3. Original IW5SP.exe, IW5Server.exe and IW5MP.exe
4. No pirated versions
Setup:
------------------------------------------------------------------
1. Copy TeknoMW3.exe, TeknoMW3.dll to your game folder.
2. Run TeknoMW3.exe
3. On first run select nickname and fov
Usage for MP Direct Connect:
------------------------------------------------------------------
1. Press Multiplayer
2. Enter Server IP and Port
3. Press Start (Direct Connect)
4. In game press F12 to connect.
Usage for MP LAN:
------------------------------------------------------------------
1. Press Multiplayer
2. Press Start (LAN Game)
3. In game go to Options -> Dedicated Server and Enable "Enable Server Browser"
4. Go back to main menu -> server browser -> LAN tab
5. Select some server
5. Join the game (double click or click connect)
Usage for Dedicated Server:
------------------------------------------------------------------
1. Edit your \players2\server.cfg (if needed)
2. Press Multiplayer
3. Enter server port of your choosing
NOTE!: The port must be availble, if you enter some used port
the server will start, but you wont be able to join.
3. Press Start Dedicated Server
4. Select map by using "map" command, for example map map_village
or start map rotation
5. Tell clients to join
Usage for Singleplayer Host:
------------------------------------------------------------------
1. Press Singleplayer
2. Press Start as host
3. In game press "TeknoGods Coop" to host
Usage for Singleplayer Client:
------------------------------------------------------------------
1. Click Singleplayer
2. Enter IP Address
3. Press Start as client
4. In game click on "TeknoGods Coop" to join
Usage for getting Steam profile:
------------------------------------------------------------------
1. See Setup
2. Run Modern Warfare 3 Multiplayer from Steam
3. Press the "profile dumper" button in the TeknoMW3 loader GUI
4. Follow instructions
5. Done!
Note:
------------------------------------------------------------------
- This release is not intended for piracy usage!
- You must always use the launcher to run the game.
Support:
------------------------------------------------------------------
This release is beta quality. If something breaks, review any
pertinent comments on teknogods.com, then email me as a last resort.
Include all log files and a detailed description of problem and
how to reproduce it.
Special thanks:
------------------------------------------------------------------
Testers: Happy, Obso, MG, DinoSuperG, Lisfx, Crazycat, Simon, MWatts
Our community of course!
Change Log:
------------------------------------------------------------------
Current version (MAJOR RELEASE):
------------------------------------------------------------------
2.0:
- Dedicated Servers support
* You can now start a dedicated server when totally offline.
* The games are now ranked
* Support for future DLC maps!
* Server will be visible on server browser / LAN tab. If you wish to connect
directly use GUI to setup IP and use F12 in game to connect. (works over
the internet)
- Multiplayer support
* You can now play using custom classes
* Theater works
* The game works totally offline (No need Steam or Demonware connection)
- Profile dumper support
* If you copied our release to your MW3 game in the Steam folder, you can now
import your online Demonware profile to play offline. However it will update
separately from that point.
Run multiplayer mode using steam -> Alt+Tab back to desktop -> run teknowm3
loader -> click Profile dumper
* Your Steam ID can be automatically obtained and saved to the teknogods.ini
------------------------------------------------------------------
Previous versions:
------------------------------------------------------------------
1.3:
- SteamID generation failed with ID "/" when ID was not present and progress
was not saved. This is now fixed and autodetected.
- Multilanguage problems now fixed, French language works fine.
1.2:
- New advanced patching code to prevent timeouts.
- All IP ranges now work.
- IP Box recoded for better usability.
- Bug that caused Client to die on startup is now fixed.
- .NET 4.0 Problems should now be gone.
- Added FOV (65-120) support under settings.
- Now checks for updates on each startup to keep users up-to-date.
- Added "TeknoGods Coop" over the multiplayer text to make it more clear.
- Lot of small bug fixes on loader.
- Version 1.4 of the game now works properly.
- Fixed "," issues with foreign language Windows.
- Added notice when joining game that makes troubleshooting easier
- Added notice when host and client have same IDs.
- Launcher now requires admin rights in order to run.
Hotfix:
- LAN hosts have now better connectivity
Creds:
------------------------------------------------------------------
Smurfette
Reaver
Simon
DOWNLOAD: TEKNOGODS Modern Warfare Steamless Loader 2.2
By AlterMW3
Caranya :
1. register dulu account alterMW3 di
2. Download file di atas
3. Extract isinya ke tempat km install MW 3
4. jalanin gamenya via iw5mp
Troubleshoot:
1. Error dengan pesan tier0_s.dll
- apus file vstdlib_s.dll, tier0_s.dll, steamclient.dll
2. Error dengan pesan steam_api.dll
- apus file cachesSxS.xml
- setelah semua itu d lakuin extract ulang file altermw3, trus run gamenya via iw5mp.exe
3. Error dengan pesan steam Steam must be running to play this game
- servernya lagi off jadi ga ada solusinya
Tidak ada komentar:
Poskan Komentar | http://infowatching.blogspot.com/2012/01/call-of-duty-modern-warfare-3.html | CC-MAIN-2013-48 | refinedweb | 874 | 70.39 |
Server-Side HTTP/2 (Preview)
Server-Side HTTP/2 support in akka-http is currently available as a preview. This means it is ready to be evaluated, but the APIs and behavior are likely to change.
Enable HTTP/2 support
HTTP/2 can then be enabled through configuration:
akka.http.server.preview.enable-http2 = on
Use
newServerAt(...).bind() and HTTPS
HTTP/2 is primarily used over a secure HTTPS connection which takes care of protocol negotiation and falling back to HTTP/1.1 over TLS when the client does not support HTTP/2. See the HTTPS section for how to set up HTTPS.
You can use
Http().newServerAt(...).bind()
Http().get(system).newServerAt(...).bind() as long as you followed the above steps:
- Scala
source
import scala.concurrent.Future import akka.http.scaladsl.HttpsConnectionContext import akka.http.scaladsl.Http Http().newServerAt(interface = "localhost", port = 8443).enableHttps(httpsServerContext).bind(asyncHandler)
- Java
source
import akka.http.javadsl.Http; Http.get(system) .newServerAt("127.0.0.1", 8443) .enableHttps(httpsConnectionContext) .bind(asyncHandler);
Note that currently only
newServerAt(...).bind and
newServerAt(...).bindSync support HTTP/2 but not
bindFlow or
connectionSource(): Source.
HTTP/2 over TLS needs Application-Layer Protocol Negotiation (ALPN) to negotiate whether both client and server support HTTP/2. The JVM provides ALPN support starting from JDK 8u252. Make sure to use at least that version.
HTTP/2 without HTTPS
While un-encrypted connections are allowed by HTTP/2, this is sometimes discouraged.
There are 2 ways to implement un-encrypted HTTP/2 connections: by using the HTTP Upgrade mechanism or by starting communication in HTTP/2 directly which requires the client to have Prior Knowledge of HTTP/2 support.
We support both approaches transparently on the same port. This feature is automatically enabled when HTTP/2 is enabled:
- Scala
source
import akka.http.scaladsl.Http import akka.http.scaladsl.HttpConnectionContext Http().newServerAt("localhost", 8080).bind(handler)
- Java
source
import akka.http.javadsl.Http; Http.get(system) .newServerAt("127.0.0.1", 8443) .bind(asyncHandler);
h2c Upgrade
The advantage of switching from HTTP/1.1 to HTTP/2 using the HTTP Upgrade mechanism is that both HTTP/1.1 and HTTP/2 clients can connect to the server on the same port, without being aware beforehand which protocol the server supports.
The disadvantage is that relatively few clients support switching to HTTP/2 in this way. Additionally, HTTP/2 communication cannot start until the first request has been completely sent. This means if your first request may be large, it might be worth it to start with an empty OPTIONS request to switch to HTTP/2 before sending your first ‘real’ request, at the cost of a roundtrip.
h2c with prior knowledge
The other option is to connect and start communicating in HTTP/2 immediately. The downside of this approach is the client must know beforehand that the server supports HTTP/2. For the reason this approach is known as h2c with Prior Knowledge of HTTP/2 support.
Testing with cURL
At this point you should be able to connect, but HTTP/2 may still not be available.
You’ll need a recent version of cURL compiled with HTTP/2 support (for OSX see this article). You can check whether your version supports HTTP2 with
curl --version, look for the nghttp2 extension and the HTTP2 feature:
curl 7.52.1 (x86_64-pc-linux-gnu) libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.8.0 nghttp2/1.23
When you connect to your service you may now see something like:
$ curl -k -v (...) * ALPN, offering h2 * ALPN, offering http/1.1 (...) * ALPN, server accepted to use h2 (...) > GET / HTTP/1.1 (...) < HTTP/2 200 (...)
If your curl output looks like above, you have successfully configured HTTP/2. However, on JDKs up to version 9, it is likely to look like this instead:
$ curl -k -v (...) * ALPN, offering h2 * ALPN, offering http/1.1 (...) * ALPN, server did not agree to a protocol (...) > GET / HTTP/1.1 (...) < HTTP/1.1 200 OK (...)
This shows
curl declaring it is ready to speak
h2 (the shorthand name of HTTP/2), but could not determine whether the server is ready to, so it fell back to HTTP/1.1. To make this negotiation work you’ll have to configure ALPN as described below. | https://doc.akka.io/docs/akka-http/10.2.4/server-side/http2.html | CC-MAIN-2021-49 | refinedweb | 730 | 58.99 |
This page presents design and layout guidelines for Angular documentation pages. These guidelines should be followed by all guide page authors. Deviations must be approved by the documentation editor.
Most guide pages should have accompanying sample code with special markup for the code snippets on the page. Code samples should adhere to the style guide for Angular applications because readers expect consistency.
For clarity and precision, every guideline on this page is illustrated with a working example, followed by the page markup for that example ... as shown here.
followed by the page markup for that example ... as shown here.
To make changes to the documentation pages and sample code, clone the Angular github repository and go to the
aio/ folder.
The aio/README.md explains how to install and use the tools to edit and test your changes.
Here are a few essential commands for guide page authors.
yarn setup — installs packages; builds docs, stackblitz, and zips.
yarn docs-watch --watch-only — watches for saved content changes and refreshes the browser. The (optional)
--watch-only flag skips the initial docs rebuild.
yarn start — starts the doc viewer application so you can see your local changes in the browser. — browse to the app running locally.
All but a few guide pages are markdown files with an
.md extension.
Every guide page file is stored in the
content/guide directory. Although the side navigation panel displays as a hierarchy, the directory is flat with no sub-folders. The flat folder approach allows us to shuffle the apparent navigation structure without moving page files or redirecting old page URLs.
The doc generation process consumes the markdown files in the
content/guide directory and produces JSON files in the
src/generated/docs/guide directory, which is also flat. Those JSON files contain a combination of document metadata and HTML content.
The reader requests a page by its Page URL. The doc viewer fetches the corresponding JSON file, interprets it, and renders it as fully-formed HTML page.
Page URLs mirror the
content file structure. The URL for the page of a guide is in the form
guide/{page-name}. The page for this "Authors Style Guide" is located at
content/guide/docs-style-guide.md and its URL is
guide/docs-style-guide.
Tutorial pages are exactly like guide pages. The only difference is that they reside in
content/tutorialinstead of
content/guideand have URLs like
tutorial/{page-name}.
API pages are generated from Angular source code into the
src/generated/docs/apidirectory. The doc viewer translates URLs that begin
api/into requests for document JSON files in that directory. This style guide does not discuss creation or maintenance of API pages.
Marketing pages are similar to guide pages. They're located in the
content/marketingdirectory. While they can be markdown files, they may be static HTML pages or dynamic HTML pages that render with JSON data.
Only a few people are authorized to write marketing pages. This style guide does not discuss creation or maintenance of marketing pages.
While documentation guide pages ultimately render as HTML, almost all of them are written in markdown.
Markdown is easier to read and to edit than HTML. Many editors (including Visual Studio Code) can render markdown as you type it.
From time to time you'll have to step away from markdown and write a portion of the document in HTML. Markdown allows you to mix HTML and markdown in the same document.
Standard markdown processors don't allow you to put markdown within HTML tags. But the Angular documentation markdown processor supports markdown within HTML, as long as you follow one rule:
Always follow every opening and closing HTML tag with a blank line.
<div class="alert is-critical"> **Always** follow every opening and closing HTML tag with _a blank line_. </div>
It is customary but not required to precede the closing HTML tag with a blank line as well.
Every guide document must have a title.
The title should appear at the top of the physical page. Begin the title with the markdown
# character. Alternatively, you can write the equivalent
<h1>.
# Authors Style Guide
Only one title (
<h1>) per document!
Title text should be in "Title Case", which means that you use capital letters to start the first words and all principal words. Use lower case letters for secondary words such as "in", "of", and "the".
# The Meat of the Matter
Always follow the title with at least one blank line.
A typical document is divided into sections.
All section heading text should be in "Sentence case", which means the first word is capitalized and all other words are lower case.
Always follow the section heading with at least one blank line.
Begin a main section heading with the markdown
## characters. Alternatively, you can write the equivalent
<h2> HTML tag.
The main section heading should be followed by a blank line and then the content for that heading.
## Sections A typical document is divided into sections.
A secondary section heading is related to a main heading and falls textually within the bounds of that main heading.
Begin a secondary heading with the markdown
### characters. Alternatively, you can write the equivalent
<h3> HTML tag.
The secondary heading should be followed by a blank line and then the content for that heading.
### Secondary section heading A secondary section ...
Try to minimize the heading depth, preferably only two. But more headings, such as this one, are permitted if they make sense.
N.B.: The Table-of-contents generator only considers main (
<h2>) and secondary (
<h3>) headings.
#### Additional section headings Try to minimize ...
Subsections typically present extra detail and references to other pages.
Use subsections for commentary that enriches the reader's understanding of the text that precedes it.
A subsection must not contain anything essential to that understanding. Don't put a critical instruction or a tutorial step in a subsection.
A subsection is content within a
<div> that has the
l-sub-section CSS class. You should write the subsection content in markdown.
Here is an example of a subsection
<div> surrounding the subsection content written in markdown.
You'll learn about styles for live examples in the section below.
<div class="l-sub-section"> You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples"). </div>
Note that at least one blank line must follow the opening
<div>. A blank line before the closing
</div> is customary but not required.
Most pages display a table of contents (TOC). The TOC appears in the right panel when the viewport is wide. When narrow, the TOC appears in an expandable/collapsible region near the top of the page.
You should not create your own TOC by hand. The TOC is generated automatically from the page's main and secondary section headers.
To exclude a heading from the TOC, create the heading as an
<h2> or
<h3> element with a class called 'no-toc'. You can't do this with markdown.
<h3 class="no-toc"> This heading is not displayed in the TOC </h3>
You can turn off TOC generation for the entire page by writing the title with an
<h1> tag and the
no-toc class.
<h1 class="no-toc"> A guide without a TOC </h1>
The navigation links at the top, left, and bottom of the screen are generated from the JSON configuration file,
content/navigation.json.
The authority to change the
navigation.json file is limited to a few core team members. But for a new guide page, you should suggest a navigation title and position in the left-side navigation panel called the "side nav".
Look for the
SideNav node in
navigation.json. The
SideNav node is an array of navigation nodes. Each node is either an item node for a single document or a header node with child nodes.
Find the header for your page. For example, a guide page that describes an Angular feature is probably a child of the
Fundamentals header.
{ "title": "Fundamentals", "tooltip": "The fundamentals of Angular", "children": [ ... ] }
A header node child can be an item node or another header node. If your guide page belongs under a sub-header, find that sub-header in the JSON.
Add an item node for your guide page as a child of the appropriate header node. It probably looks something like this one.
{ "url": "guide/architecture", "title": "Architecture", "tooltip": "The basic building blocks of Angular applications." }
A navigation node has the following properties:
url- the URL of the guide page (item node only).
title- the text displayed in the side nav.
tooltip - text that appears when the reader hovers over the navigation link.
children - an array of child nodes (header node only).
hidden - defined and set true if this is a guide page that should not be displayed in the navigation panel. Rarely needed, it is a way to hide the page from navigation while making it available to readers who should know about it. This "Authors Style Guide" is a hidden page.
Do not create a node that is both a header and an item node. That is, do not specify the
urlproperty of a header node.
The current guidelines allow for a three-level navigation structure with two header levels. Don't add a third header level.
Guides are rich in examples of working Angular code. Example code can be commands entered in a terminal window, a fragment of TypeScript or HTML, or an entire code file.
Whatever the source, the doc viewer renders them as "code snippets", either individually with the code-example component or as a tabbed collection with the code-tabs component.
You can display a simple, inline code snippet with the markdown backtick syntax. We generally prefer to display a code snippet with the Angular documentation code-example component represented by the
<code-example> tag.
You should source code snippets from working sample code when possible. But there are times when an inline snippet is the better choice.
For terminal input and output, put the content between
<code-example> tags, set the CSS class to
code-shell, and set the language attribute to
sh as in this example.
npm start
<code-example npm start </code-example>
Inline, hand-coded snippets like this one are not testable and, therefore, are intrinsically unreliable. This example belongs to the small set of pre-approved, inline snippets that includes user input in a command shell or the output of some process.
Do not write inline code snippets unless you have a good reason and the editor's permission to do so. In all other cases, code snippets should be generated automatically from tested code samples.
One of the documentation design goals is that guide page code snippets should be examples of real, working code.
We meet this goal by displaying code snippets that are derived directly from standalone code samples, written specifically for these guide pages.
The author of a guide page is responsible for the code sample that supports that page. The author must also write end-to-end tests for the sample.
Code samples are located in sub-folders of the
content/examples directory of the
angular/angular repository. An example folder name should be the same as the guide page it supports.
A guide page might not have its own sample code. It might refer instead to a sample belonging to another page.
The Angular CI process runs all end-to-end tests for every Angular PR. Angular re-tests the samples after every new version of a sample and every new version of Angular itself.
When possible, every snippet of code on a guide page should be derived from a code sample file. You tell the Angular documentation engine which code file - or fragment of a code file - to display by configuring
<code-example> attributes.
This "Authors Doc Style Guide" has its own sample application, located in the
content/examples/docs-style-guide folder.
The following code-example displays the sample's
app.module.ts.
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { AppComponent } from './app.component'; @NgModule({ imports: [ BrowserModule, FormsModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModule { }
Here's the brief markup that produced that lengthy snippet:
<code-example </code-example>
You identified the snippet's source file by setting the
path attribute to sample folder's location within
content/examples. In this example, that path is
docs-style-guide/src/app/app.module.ts.
You added a header to tell the reader where to find the file by setting the
title attribute. Following convention, you set the
title attribute to the file's location within the sample's root folder.
Unless otherwise noted, all code snippets in this page are derived from sample source code located in the
content/examples/docs-style-guidedirectory.
The doc tooling reports an error if the file identified in the path does not exist or is git-ignored.
Most
.jsfiles are git-ignored. If you want to include an ignored code file in your project and display it in a guide you must un-ignore it.
The preferred way to un-ignore a file is to update the
content/examples/.gitignorelike this:content/examples/.gitignore# my-guide !my-guide/src/something.js !my-guide/more-javascript*.js
You control the code-example output by setting one or more of its attributes:
path- the path to the file in the
content/examples folder.
title- the header of the code listing.
region- displays the source file fragment with that region name; regions are identified by docregion markup in the source file, as explained below.
linenums- value may be
true,
false, or a
number. When not specified, line numbers are automatically displayed when there are greater than 10 lines of code. The rarely used
number option starts line numbering at the given value.
linenums=4 sets the starting line number to 4.
class- code snippets can be styled with the CSS classes
no-box,
code-shell, and
avoid.
hideCopy- hides the copy button
language- the source code language such as
javascript,
html,
css,
typescript,
json, or
sh. This attribute only works for inline examples.
Often you want to focus on a fragment of code within a sample code file. In this example, you focus on the
AppModule class and its
NgModule metadata.
@NgModule({ imports: [ BrowserModule, FormsModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModule { }
First you surround that fragment in the source file with a named docregion as described below. Then you reference that docregion in the
region attribute of the
<code-example> like this
<code-example </code-example>
A couple of observations:
The
region value,
"class", is the name of the
#docregion in the source file. Confirm that by looking at
content/examples/docs-style-guide/src/app/app.module.ts
Omitting the
title is fine when the source of the fragment is obvious. We just said that this is a fragment of the
app.module.ts file which was displayed immediately above, in full, with a header. There's no need to repeat the header.
The line numbers disappeared. By default, the doc viewer omits line numbers when there are fewer than 10 lines of code; it adds line numbers after that. You can turn line numbers on or off explicitly by setting the
linenums attribute.
Sometimes you want to display an example of bad code or bad design.
You should be careful. Readers don't always read carefully and are likely to copy and paste your example of bad code in their own applications. So don't display bad code often.
When you do, set the
class to
avoid. The code snippet will be framed in bright red to grab the reader's attention.
Here's the markup for an "avoid" example in the Angular Style Guide.
<code-example </code-example>
/* avoid */ @Component({ selector: '[tohHeroButton]', templateUrl: './hero-button.component.html' }) export class HeroButtonComponent {}
Code tabs display code much like code examples do. The added advantage is that they can display multiple code samples within a tabbed interface. Each tab is displayed using code pane.
linenums: The value can be
true,
falseor a number indicating the starting line number. If not specified, line numbers are enabled only when code for a tab pane has greater than 10 lines of code.
path- a file in the content/examples folder
title- seen in the header of a tab
linenums- overrides the
linenumsproperty at the
code-tabslevel for this particular pane. The value can be
true,
falseor a number indicating the starting line number. If not specified, line numbers are enabled only when the number of lines of code are greater than 10.
The next example displays multiple code tabs, each with its own title. It demonstrates control over display of line numbers at both the
<code-tabs> and
<code-pane> levels.
<h1>{{title}}</h1> <h2>My Heroes</h2> <ul class="heroes"> <li * <span class="badge">{{hero.id}}</span> {{hero.name}} </li> </ul> <div * <h2>{{selectedHero.name}} details!</h2> <div><label>id: </label>{{selectedHero.id}}</div> <div> <label>name: </label> <input [(ngModel)]="selectedHero.name" placeholder="name"/> </div> </div>
import { Component } from '@angular/core'; import { Hero, HEROES } from './hero'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'Authors Style Guide Sample'; heroes = HEROES; selectedHero: Hero; onSelect(hero: Hero): void { this.selectedHero = hero; } }
.heroes { margin: 0 0 2em 0; list-style-type: none; padding: 0; width: 15em; }
{ "scripts": { "start": "concurrently \"npm run build:watch\" \"npm run serve\"", "test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"", "lint": "tslint ./src/**/*.ts -t verbose" } }
Here's the markup for that example.
Note how the
linenums attribute in the
<code-tabs> explicitly disables numbering for all panes. The
linenums attribute in the second pane restores line numbering for itself only.
<code-tabs <code-pane </code-pane> <code-pane </code-pane> <code-pane </code-pane> <code-pane </code-pane> </code-tabs>
You must add special code snippet markup to sample source code files before they can be displayed by
<code-example> and
<code-tabs> components.
The sample source code for this page, located in
context/examples/docs-style-guide, contains examples of every code snippet markup described in this section.
Code snippet markup is always in the form of a comment. Here's the default docregion markup for a TypeScript or JavaScript file:
// #docregion ... some code ... // #enddocregion
Different file types have different comment syntax so adjust accordingly.
<!-- #docregion --> ... some HTML ... <!-- #enddocregion -->
/* #docregion */ ... some CSS ... /* #enddocregion */
The doc generation process erases these comments before displaying them in the doc viewer. It also strips them from stackblitz and sample code downloads.
Code snippet markup is not supported in JSON files because comments are forbidden in JSON files. See below for details and workarounds.
The #docregion is the most important kind of code snippet markup.
The
<code-example> and
<code-tabs> components won't display a source code file unless it has a #docregion.
The #docregion comment begins a code snippet region. Every line of code after that comment belongs in the region until the code fragment processor encounters the end of the file or a closing #enddocregion.
The
src/main.tsis a simple example of a file with a single #docregion at the top of the file.src/main.tsimport { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; if (environment.production) { enableProdMode(); } platformBrowserDynamic().bootstrapModule(AppModule);
You'll often display multiple snippets from different fragments within the same file. You distinguish among them by giving each fragment its own #docregion name as follows.
// #docregion region-name ... some code ... // #enddocregion region-name
Remember to refer to this region by name in the
region attribute of the
<code-example> or
<code-pane> as you did in an example above like this:
<code-example</code-example>
The #docregion with no name is the default region. Do not set the
region attribute when referring to the default #docregion.
You can nest #docregions within #docregions
// #docregion ... some code ... // #docregion inner-region ... more code ... // #enddocregion inner-region ... yet more code ... /// #enddocregion
The
src/app/app.module.tsfile has a good example of a nested region.
You can combine several fragments from the same file into a single code snippet by defining multiple #docregions with the same region name.
Examine the
src/app/app.component.ts file which defines two nested #docregions.
The inner,
class-skeleton region appears twice, once to capture the code that opens the class definition and once to capture the code that closes the class definition.
// #docplaster ... // #docregion class, class-skeleton export class AppComponent { // #enddocregion class-skeleton title = 'Authors Style Guide Sample'; heroes = HEROES; selectedHero: Hero; onSelect(hero: Hero): void { this.selectedHero = hero; } // #docregion class-skeleton } // #enddocregion class, class-skeleton
Here's are the two corresponding code snippets displayed side-by-side.
export class AppComponent { title = 'Authors Style Guide Sample'; heroes = HEROES; selectedHero: Hero; onSelect(hero: Hero): void { this.selectedHero = hero; } }
export class AppComponent { }
Some observations:
The
#docplaster at the top is another bit of code snippet markup. It tells the processor how to join the fragments into a single snippet.
In this example, we tell the processor to put the fragments together without anything in between - without any "plaster". Most sample files define this empty plaster.
If we neglected to add,
#docplaster, the processor would insert the default plaster - an ellipsis comment - between the fragments. Try removing the
#docplaster comment yourself to see the effect.
One
#docregion comment mentions two region names as does an
#enddocregion comment. This is a convenient way to start (or stop) multiple regions on the same code line. You could have put these comments on separate lines and many authors prefer to do so.
Code snippet markup is not supported for JSON files because comments are forbidden in JSON files.
You can display an entire JSON file by referring to it in the
src attribute. But you can't display JSON fragments because you can't add
#docregion tags to the file.
If the JSON file is too big, you could copy the nodes-of-interest into markdown backticks.
Unfortunately, it's easy to mistakenly create invalid JSON that way. The preferred way is to create a JSON partial file with the fragment you want to display.
You can't test this partial file and you'll never use it in the application. But at least your IDE can confirm that it is syntactically correct.
Here's an example that excerpts certain scripts from
package.json into a partial file named
package.1.json.
{ "scripts": { "start": "concurrently \"npm run build:watch\" \"npm run serve\"", "test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"", "lint": "tslint ./src/**/*.ts -t verbose" } }
<code-example</code-example>
Many guides tell a story. In that story, the app evolves incrementally, often with simplistic or incomplete code along the way.
To tell that story in code, you'll often need to create partial files or intermediate versions of the final source code file with fragments of code that don't appear in the final app.
Such partial and intermediate files need their own names. Follow the doc sample naming convention. Add a number before the file extension as illustrated here:
package.1.json app.component.1.ts app.component.2.ts
You'll find many such files among the samples in the Angular documentation.
Remember to exclude these files from stackblitz by listing them in the
stackblitz.json as illustrated here.
{ "description": "Authors style guide", "files": [ "!**/*.d.ts", "!**/*.js", "!**/*.[1,2,3].*" ], "tags": ["author", "style guide"] }
By adding
<live-example> to the page you generate links that run sample code in the Stackblitz live coding environment and download that code to the reader's file system.
Live examples (AKA "stackblitz") are defined by one or more
stackblitz.json files in the root of a code sample folder. Each sample folder usually has a single unnamed definition file, the default
stackblitz.json.
You can create additional, named definition files in the form
name.stackblitz.json. See
content/examples/testingfor examples.
The schema for a
stackblitz.jsonhasn't been documented yet but looking at the
stackblitz.jsonfiles in the example folders should tell you most of what you need to know.
Adding
<live-example></live-example> to the page generates the two default links.
live example
a link to the Stackblitz defined by the default
stackblitz.json file located in the code sample folder with the same name as the guide page.
a link that downloads that sample.
Clicking the first link opens the code sample on StackBlitz in a new browser tab.
You can change the appearance and behavior of the live example with attributes and classes.
Give the live example anchor a custom label and tooltip by setting the
title attribute.
<live-example</live-example>
You can achieve the same effect by putting the label between the
<live-example> tags:
Live example with content label
<live-example>Live example with content label</live-example>
To link to a Stackblitz in a folder whose name is not the same as the current guide page, set the
name attribute to the name of that folder.
Live Example from the Router guide
<live-exampleLive Example from the Router guide</live-example>
To link to a Stackblitz defined by a named
stackblitz.json file, set the
stackblitz attribute. The following example links to the Stackblitz defined by
second.stackblitz.json in the current guide's directory.
<live-example</live-example>
To skip the download link, add the
noDownload attribute.
Just the Stackblitz
<live-example noDownload>Just the Stackblitz</live-example>
To skip the live Stackblitz link and only link to the download, add the
downloadOnly attribute.
Download only
<live-example downloadOnly>Download only</live-example>
By default, a live example link opens a Stackblitz in a separate browser tab. You can embed the Stackblitz within the guide page itself by adding the
embedded attribute.
For performance reasons, the Stackblitz does not start right away. The reader sees an image instead. Clicking the image starts the sometimes-slow process of launching the embedded Stackblitz within an iframe on the page.
Here's an embedded live example for this guide.
<live-example embedded></live-example>
Every section header tag is also an anchor point. Another guide page could add a link to this section by writing:
See the "Anchors" section for details.
<div class="l-sub-section"> See the ["Anchors"](guide/docs-style-guide#anchors "Style Guide - Anchors") section for details. </div>
When navigating within the page, you can omit the page URL when specifying the link that scrolls up to the beginning of this section.
... the link that [scrolls up](#anchors "Anchors") to ...
It is often a good idea to lock-in a good anchor name.
Sometimes the section header text makes for an unattractive anchor. This one is pretty bad.
[This one](#ugly-long-section-header-anchors) is pretty bad.
The greater danger is that a future rewording of the header text would break a link to this section.
For these reasons, it is often wise to add a custom anchor explicitly, just above the heading or text to which it applies, using the special syntax like this.
{@a ugly-anchors} #### Ugly, long section header anchors
Now link to that custom anchor name as you did before.
Now [link to that custom anchor name](#ugly-anchors) as you did before.
Alternatively, you can use the HTML
<a>tag.
If you do, be sure to set the
idattribute - not the
nameattribute! The docs generator will not convert the
nameto the proper link URL.<a id="anchors"></a> ## Anchors
Alerts draw attention to important points. Alerts should not be used for multi-line content (use callouts insteads) or stacked on top of each other. Note that the content of an alert is indented to the right by two spaces.
A critical alert.
An important alert.
A helpful, informational alert.
Here is the markup for these alerts.
<div class="alert is-critical"> A critical alert. </div> <div class="alert is-important"> An important alert. </div> <div class="alert is-helpful"> A helpful, informational alert. </div>
Alerts are meant to grab the user's attention and should be used sparingly. They are not for casual asides or commentary. Use subsections for commentary.
Callouts (like alerts) are meant to draw attention to important points. Use a callout when you want a riveting header and multi-line content.
Pitchfork hoodie semiotics, roof party pop-up paleo messenger
Here is the markup for the first of these callouts.
<div class="callout is-critical"> <header>A critical point</header> * </div>
Notice that
</header>tag from the markdown content.
Callouts are meant to grab the user's attention. They are not for casual asides. Please use them sparingly.
Trees can represent hierarchical data.
sample-dir src app app.component.ts app.module.ts styles.css tsconfig.json node_modules ... package.json
Here is the markup for this file tree.
<div class='filetree'> <div class='file'> sample-dir </div> <div class='children'> <div class='file'> src </div> <div class='children'> <div class='file'> app </div> <div class='children'> <div class='file'> app.component.ts </div> <div class='file'> app.module.ts </div> </div> <div class='file'> styles.css </div> <div class='file'> tsconfig.json </div> </div> <div class='file'> node_modules ... </div> <div class='file'> package.json </div> </div> </div>
Use HTML tables to present tabular data.
Here is the markup for this table.
<style> td, th {vertical-align: top} </style> <table> <tr> <th>Framework</th> <th>Task</th> <th>Speed</th> </tr> <tr> <td><code>AngularJS</code></td> <td>Routing</td> <td>Fast</td> </tr> <tr> <td><code>Angular v2</code></td> <td>Routing</td> <!-- can use markdown too; remember blank lines --> <td> *Faster* </td> </tr> <tr> <td><code>Angular v4</code></td> <td>Routing</td> <td> **Fastest :)** </td> </tr> </table>
Store images in the
content/images directory in a folder with the same URL as the guide page. Images for this "Authors Style Guide" page belong in the
content/images/guide/docs-style-guide folder.
Angular doc generation copies these image folders to the runtime location,
generated/images. Set the image
src attribute to begin in that directory.
Here's the
src attribute for the "flying hero" image belonging to this page.
src="generated/images/guide/docs-style-guide/flying-hero.png"
Do not use the markdown image syntax, .
Images should be specified in an
<img> tag.
For accessibility, always set the
alt attribute with a meaningful description of the image.
You should nest the
<img> tag within a
<figure> tag, which styles the image within a drop-shadow frame. You'll need the editor's permission to skip the
<figure> tag.
Here's a conforming example
<figure> <img src="generated/images/guide/docs-style-guide/flying-hero.png" alt="flying hero"> </figure>
Note that the HTML image element does not have a closing tag.
The doc generator reads the image dimensions from the file and adds width and height attributes to the
img tag automatically. If you want to control the size of the image, supply your own width and height attributes.
Here's the "flying hero" at a more reasonable scale.
<figure> <img src="generated/images/guide/docs-style-guide/flying-hero.png" alt="flying Angular hero" width="200"> </figure>
Wide images can be a problem. Most browsers try to rescale the image but wide images may overflow the document in certain viewports.
Do not set a width greater than 700px. If you wish to display a larger image, provide a link to the actual image that the user can click on to see the full size image separately as in this example of
source-map-explorer output from the "Ahead-of-time Compilation" guide:
Large image files can be slow to load, harming the user experience. Always compress the image. Consider using an image compression web site such as tinypng.
You can float the image to the left or right of text by applying the class="left" or class="right" attributes respectively..
The markup for the above example is:
<img src="generated/images/guide/docs-style-guide/flying-hero.png". <br class="clear">
Note that you generally don't wrap a floating image in a
<figure> element.
If you have a floating image inside an alert, callout, or a subsection, it is a good idea to apply the
clear-fix class to the
div to ensure that the image doesn't overflow its container. For example:
A subsection with markdown formatted text.
<div class="l-sub-section clear-fix"> <img src="generated/images/guide/docs-style-guide/flying-hero.png" alt="flying Angular hero" width="100" class="right"> A subsection with **markdown** formatted text. </div>
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0. | https://docs.w3cub.com/angular/guide/docs-style-guide/ | CC-MAIN-2019-13 | refinedweb | 5,484 | 58.18 |
Prev
Java Exception Experts Index
Headers
Your browser does not support iframes.
Re: Read in & count characters from a text file
From:
Eric Sosman <esosman@ieee-dot-org.invalid>
Newsgroups:
comp.lang.java.programmer
Date:
Sat, 04 Aug 2007 17:38:17 -0400
Message-ID:
<K6idnfvkOolBbCnbnZ2dnUVZ_s-pnZ2d@comcast.com>
Jay Cee wrote:
Hi All,
Relatively new to java (ex VB) and could do with some help.
I need to read a text file character by character (can do),
and count each character as it appears, i.e
"A small sample text file" would have 1-A , 2-s, 2-m ,etc etc. and output
the results.
I have a few issues which I cannot seem to solve easily,
1/
I thought it would be a good idea to save the characters in a hashmap in
name-value pairs as they are read , map.put(tempStr,"1" )
I found I had to convert the character to a string before it would save to
the map.Ideally I would like to save as a character.
Maps (all Collections, in fact) deal only with objects,
so you cannot store primitive values like char in them. But
you can use a Character object, which expresses your intent
more directly than a String does.
Similarly, the mapped values must also be objects. I
think an Integer would be a better choice than a String; if
you expect counts greater than two billion use a Long.
2/
Before adding each character to the map
check first if it already exists
and if found increment the value portion of the name value pair
else
if not found insert into map with value of 1.
My problems seems to be I cannot "check the map" if the character exists and
if it does exist how do I get at the value to increment it.
The map has a containsKey() method that tells you whether
there is or isn't an entry for a key you're interested in.
If you're using an Integer (or Long) as the counter, you
can't just increment it: like String, an Integer cannot be
changed once it's created. Instead, you need to retrieve the
existing Integer from the map and replace it with a larger one.
... and since you need to retrieve the Integer anyhow, the
containsKey() method doesn't seem worth while: Just ask the map
for the Integer corresponding to such-and-such a Character. If
there is one, replace it. If there's not, you'll get a null
back from the map and this can be your signal to start a new
counter at unity:
Character key = Character.valueOf( (char)ch );
Integer val = (Integer)map.get(key);
if (val == null)
val = Integer.valueOf(1);
else
val = Integer.valueOf(val.intValue() + 1);
map.put(key, val);
Another approach would be to invent your own Counter class
that looks a lot like an Integer but is mutable: it has methods
like set() or increment() that change its value. Then the code
might look like
Character key = Character.valueOf( (char)ch );
Counter cnt = (Counter)map.get(key);
if (cnt == null)
map.put(key, new Counter()); // initial value zero
cnt.increment();
Here is what I have so far,
import java.io.*;
import java.util.*;
class TextTest
{
public static Map map = new HashMap();
private static TreeMap treeMap;
public static void main(String[] args) throws IOException
{
FileInputStream in = new FileInputStream("textfile.txt");
A word of warning: This is legal, but may not be what you
intend. InputStreams are for files made of bytes; Readers are
for files made of characters. If an InputStream encounters a
character that has been encoded in several bytes, it will deliver
those bytes to you individually. If a Reader encounters such a
thing, it will decode the multi-byte sequence and deliver you
the single corresponding character.
By the way, this sort of code is fine if your objective is
to learn about Maps and the like. But if your goal is really
to count char values (or byte values), an array of 65536 (or
256) ints or longs will be easier:
counts[ch]++;
--
Eric Sosman
esosman@ieee-dot-org.invalid
Generated by PreciseInfo ™
AIPAC, the Religious Right and American Foreign Policy
News/Comment; Posted on: 2007-06-03
On Capitol Hill, 'The (Israeli) Lobby' seems to be in charge co-ordinated system. For example,
it keeps voting statistics on each House,
the Lobby even has developed the habit of recruiting personnel for
Senators and House members' offices. And, when elections come, the
Lobby makes sure that lukewarm, independent-minded or dissenting
politicians are punished and defeated.
Source:
Related Story: USA Admits Meddling in Russian Affairs
News Source: Pravda
2007 European Americans United. | http://preciseinfo.org/Convert/Articles_Java/Exception_Experts/Java-Exception-Experts-070805003817.html | CC-MAIN-2021-49 | refinedweb | 786 | 63.39 |
Connection issue to WiPy 3.0r
Hi,
I was uploading many files to WiPy board using PySense board (more than 1000 files). During uploading, it suddenly prompted me the upload fails. Then, the COM3 connection was not responding.
Then, I reset the board and after that I am not able to connect to the board using COM3 and also Wi-Fi. When I try to connect using Atom it just prompts the below message and nothing happens:
Autoconnect: Found a PyCom board on USB
Autoconnect: Connecting on COM3...
I also tried to use PuTTY to connect to COM3 and the new terminal pops up, but it is not responding.
How can I access to the board and delete all files or rest factory the board?
Thanks
@momentaj When using the pycom uploader 1.15.2, you have tghe option to erase the device on uploading a new firmware image.
I tried to do that but it there is no change. Here are the steps which I did:
1- Connecting P12 to the 3.3v pin.
2- Attaching USB cable to the PySense board while the pins are connected.
3- Holding the pins connected for more than 3 seconds.
Atom shows this message and I am not able to type in it:
Autoconnect: Found a PyCom board on USB Autoconnect: Connecting on COM3... ets Jun 8 2016 00:22:57 rst:0x1 (POWERON_RESET),boot:0x17 Autoconnect: Previous board is not available anymore
Then, I disconnected the USB and connect it again and it prompts:
Autoconnect: Found a PyCom board on USB Autoconnect: Connecting on COM3...
Am I doing something wrong?
Note: as it is shown in the pin layout here, I tried connecting 3rd and 8th top-right pins.
Thanks
@momentaj said in Connection issue to WiPy 3.0r:
@paul-thornton I have many libraries to use and all of the are Python files.
Sounds much too huge for an esp32. I guess that you have to use every trick to run your stuff.
Switch off compression for USB transfer.
figured out unused files and don't copy them
precompile the libs and make the important ones frozen
use this string something feature, so you strings will be located in flash and used by reference
if they are too large for the internal flash, place some on an SD card
merge some files, so you don't waste that many blocks.
shorten all names (class, methods, properties and variables)
think small and redesign (do you really need all this stuff in this detail)
think big and redesing (add a unix machine with a few GByte as a coproc)
@paul-thornton I have many libraries to use and all of the are Python files.
- Paul Thornton last edited by
Hello.
You can put the board into a "Safe Boot" mode by connection P12 to the 3.3v pin and reset the board. It will stop any code in main.py or boot.py from executing.
Afterwhich you should be able to connect to the board and run
import uos uos.mkfs("/flash")
To clear the flash filesystem back to empty.
That said. 1k files sounds excessive. Are they all code? | https://forum.pycom.io/topic/4383/connection-issue-to-wipy-3-0r | CC-MAIN-2021-43 | refinedweb | 528 | 82.14 |
In this video tutorial, I show you how to create combo boxes in Java Swing. This tutorial is also a review of everything I’ve previously gone over.
I review how to create the frame and panel. How to add buttons with event listeners. I also review JOptionPane. I’m slowing down a bit so that I’m sure you understand everything that proceeded this tutorial.
All of the code follows the video below. Leave any questions below.
If you like videos like this share it
Code from the Video
import javax.swing.*; import java.awt.event.*; public class Lesson24 extends JFrame{ JComboBox favoriteShows; JButton button1; String infoOnComponent = ""; public static void main(String[] args){ new Lesson24(); } public Lesson24(){ this.setSize(400,400); this.setLocationRelativeTo(null); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setTitle("My Fourth Frame"); JPanel thePanel = new JPanel(); // Create an array that will be added to the combo box String[] shows = {"Breaking Bad", "Life on Mars", "Doctor Who"}; // Create a combo box and add the array of shows favoriteShows = new JComboBox(shows); // Add an item to the combo box favoriteShows.addItem("Pushing Daisies"); thePanel.add(favoriteShows); // Create a button button1 = new JButton("Get Answer"); ListenForButton lForButton = new ListenForButton(); button1.addActionListener(lForButton); thePanel.add(button1); this.add(thePanel); this.setVisible(true); // Add an item to a combo box at index 1 favoriteShows.insertItemAt("Dexter", 1); // Only show 3 items at a time favoriteShows.setMaximumRowCount(3); // Remove the item named Dexter //favoriteShows.removeItem("Dexter"); // Remove the item at index 1 //favoriteShows.removeItemAt(1); // Remove all items // favoriteShows.removeAllItems(); } private class ListenForButton implements ActionListener{ public void actionPerformed(ActionEvent e){ if(e.getSource() == button1){ favoriteShows.setEditable(true); // Get item at index 0 infoOnComponent = "Item at 0: " + favoriteShows.getItemAt(0) + "\n"; // Get the number of items in the combo box infoOnComponent += "Num of Shows: " + favoriteShows.getItemCount() + "\n"; // Get the index for the selected item infoOnComponent += "Selected ID: " + favoriteShows.getSelectedIndex() + "\n"; // Get the value for the selected item infoOnComponent += "Selected Show: " + favoriteShows.getSelectedItem() + "\n"; // Find out if the values in the combo box are editable infoOnComponent += "Combo Box Editable: " + favoriteShows.isEditable() + "\n"; JOptionPane.showMessageDialog(Lesson24.this, infoOnComponent, "Information", JOptionPane.INFORMATION_MESSAGE); infoOnComponent = ""; } } } }
hi derek thanks a lot for the videos, i have a question, how can we add listeneres on combobox, so that when a particular item is selected on the combo box we wanna do something.
You’re very welcome 🙂 You want to do something like this
myComboBox.addActionListener (new ActionListener () {
public void actionPerformed(ActionEvent e) {
doSomething();
}
});
Derek,
If they gave away Nobel Prizes for education I think that I would nominate you. Thank you for all of you work.
I hesitate to ask this because it is a bit of work but I navigate you site by the every lesson page then to the Java tutorials. It would be nice if the links had a description next to them on the topics covered. i.e. lesson 20 Basics of Swing class. Frames, JPannel, buttons and text fields. Or something like that. often finding myself going and looking for a earlier video and having to hunt through them till I find the one I’m looking for. Not a big deal as I really don’t want to be looking a gift horse in the mouth but it would be useful.
Thank you for the nice compliment 🙂 Yes I have been working to make it easier to find information on my site. In the last few tutorials I have actually done exactly what you said, but I need to do that with my main Java video tutorial. I’ll try to get that done this week.
Just listened to your Java#24 YouTube session today. It appeared to cut off long before you intended(?).
I’ve been following your sessions and feel sort of “robbed”. I’ll go forward, but would like to know if there was more to the lesson or was it a cliffhanger [sort of like “who killed JR].
That is really odd? I think the file may have been messed up on YouTubes servers. I’ll see if there is any way to fix that. I do have the code below to help either way. Sorry about that.
I am facing the same issue. It doesn’t play beyond 2:07 mins. 🙁
Thanks Derek for the great videos. You have made it easy to learn Java.
Sorry, but YouTube won’t let me update it 🙁
Could you perhaps put a link to the correct website in the comments section of YouTube? This is a topic we’re covering in class as well. Love your videos by the way. They’re a life saver.
Thank you 🙂 I fixed the link
Hi Derek.
Great and easy videos so far. Keep it going.
I am having the same problem reported as others, the video stops at 2:02min and it doesn’t go any further, it doesn’t load. Tried different browsers and deleting cache, history etc. but still nothing
Hi, Sorry, but it seems like YouTube messed up that video and won’t let me replace it. The code and comments will have to fill in. Sorry
Hi Derek,
Regards and thanks for your great videos. How can one add key/value pairs to a combobox , so that the combobox shows the values but you can get the key assigned to that value ?
Hi Ben, Take a look here | http://www.newthinktank.com/2012/03/java-video-tutorial-24/?replytocom=18528 | CC-MAIN-2020-29 | refinedweb | 895 | 67.76 |
- NAME
- DESCRIPTION
- Core Enhancements
- Performance Enhancements
- Modules and Pragmata
- Documentation
- Diagnostics
- Configuration and Compilation
- Platform Support
- Internal Changes
- Selected Bug Fixes
- Known Problems
- Acknowledgements
- Reporting Bugs
- SEE ALSO
NAME
perl5192delta - what is new for perl v5.19.2
DESCRIPTION
This document describes differences between the 5.19.1 release and the 5.19.2 release.
If you are upgrading from an earlier release such as 5.19.0, first read perl5191delta, which describes differences between 5.19.0 and 5.19.1.
Core Enhancements
More consistent prototype parsing.
Performance Enhancements
Precomputed hash values are now used in more places during method lookup.
Modules and Pragmata
Updated Modules and Pragmata
autodie has been upgraded from version 2.19 to 2.20.
B has been upgraded from version 1.43 to 1.44.
B::Concise has been upgraded from version 0.96 to 0.98.
B::Deparse has been upgraded from version 1.21 to 1.22.
base has been upgraded from version 2.18 to 2.19.
Benchmark has been upgraded from version 1.16 to 1.17.
Class::Struct has been upgraded from version 0.64 to 0.65.
Data::Dumper has been upgraded from version 2.146 to 2.147.
DB_File has been upgraded from version 1.828 to 1.829.
DBM_Filter has been upgraded from version 0.05 to 0.06.
Devel::Peek has been upgraded from version 1.11 to 1.12.
Digest::MD5 has been upgraded from version 2.52 to 2.53.
Digest::SHA has been upgraded from version 5.84 to 5.85.
English has been upgraded from version 1.06 to 1.07.
Errno has been upgraded from version 1.18 to 1.19.
ExtUtils::Embed has been upgraded from version 1.30 to 1.31
The generated
Ccode now incorporates bug fixes present in miniperlmain.c, and has whitespace changes. It now uses
#include "..."for header files instead of
#include <...>. This should not make any difference, unless programs embedding
libperlhappenlis now using it.)
ExtUtils::Miniperl has been upgraded and given a version of 1. Previously it did not have a version number..
ExtUtils::ParseXS has been upgraded from version 3.19 to 3.21.
File::Basename has been upgraded from version 2.84 to 2.85.
Getopt::Long has been upgraded from version 2.4 to 2.41.
Getopt::Std has been upgraded from version 1.08 to 1.09.
Hash::Util::FieldHash has been upgraded from version 1.11 to 1.12.
HTTP::Tiny has been upgraded from version 0.031 to 0.034.
I18N::Langinfo has been upgraded from version 0.10 to 0.11.
if has been upgraded from version 0.0602 to 0.0603.
IPC::Cmd has been upgraded from version 0.80 to 0.82.
MIME::Base64 has been upgraded from version 3.13 to 3.14.
Module::CoreList has been upgraded from version 2.92 to 2.94.
Params::Check has been upgraded from version 0.36 to 0.38.
Parse::CPAN::Meta has been upgraded from version 1.4404 to 1.4405.
Pod::Functions has been upgraded from version 1.06 to 1.07.
Pod::Html has been upgraded from version 1.19 to 1.2.
POSIX has been upgraded from version 1.33 to 1.34.
POSIX::AUTOLOADwill no longer infinitely recurse if the shared object fails to load.
Safe has been upgraded from version 2.36 to 2.37.
Socket has been upgraded from version 2.009 to 2.010.
Storable has been upgraded from version 2.43 to 2.45.
Calling
STORABLE_attachhooks no longer leaks memory. [perl #118829]
Text::ParseWords has been upgraded from version 3.28 to 3.29.
Tie::Hash has been upgraded from version 1.04 to 1.05.
Time::Piece has been upgraded from version 1.2002 to 1.21.
Documentation
Changes to Existing Documentation
perlexperiment
Code in regular expressions, regular expression backtracking verbs, and lvalue subroutines are no longer listed as experimental. (This also affects perlre and perlsub.)
perlfunc
Since Perl v5.10, it has been possible for subroutines in @INC to return a reference to a scalar holding initial source code to prepend to the file. This is now documented.
perlop
The language design of Perl has always called for monomorphic operators. This is now mentioned explicitly.
perlre
The fact that the regexp engine makes no effort to call (?{}) and (??{}) constructs any specified number of times (although it will basically DWIM in case of a successful match) has been documented.
Diagnostics
The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.
New Diagnostics
New Warnings
Missing ']' in prototype for %s : %s
(W illegalproto) A grouping was started with
[but never closed with
].
Changes to Existing Diagnostics].
The debugger's "n" command now respects lvalue subroutines and steps over them [perl #118839].
Configuration and Compilation
installperl and installman's option handling has been refactored to use Getopt::Long. Both are used by the Makefile
installtargets, and are not installed, so these changes are only likely to affect custom installation scripts.
single letter options now also have long names
invalid options are now rejected
command line arguments that are not options are now rejected
Each now has a
--helpoption to display the usage message.
The behaviour for all valid documented invocations is unchanged.
Platform Support
Platform-Specific Notes
- MidnightBSD
objformatwas removed from version 0.4-RELEASE of MidnightBSD and had been deprecated on earlier versions. This caused the build environment to be erroneously configured for
a.outrather than
elf. This has been now been corrected.
Internal.
Selected Bug Fixes
There have been several fixes related to Perl's handling of locales. perl #38193 was described above in "Internal Changes". Also fixed is #112208 in which the error string in
$.
The dtrace sub-entry probe now works with lexical subs, instead of crashing [perl #118305].
Compiling a
splitoperator whose third argument is a named constant evaulating to 0 no longer causes the constant's value to change.
A named constant used as the second argument to
indexno longer gets coerced to a string if it is a reference, regular expression, dualvar, etc.
A named constant evaluating to the undefined value used as the second argument to
indexno.
Undefining an inlinable lexical subroutine (
my sub foo() { 42 } undef &foo) would result in a crash if warnings were turned on.
Certain uses of.
The arguments to
sortare now all in list context. If the
sortitself.
In regular expressions containing multiple code blocks, the values of
.
Under copy-on-write builds (the default as of 5.19.1)
${'_<-e'}[0]no longer gets mangled. This is the first line of input saved for the debugger's use for one-liners [perl #118627].
Assigning a vstring to a tied variable or to a subroutine argument aliased to a nonexistent hash or array element now works, without flattening the vstring into a regular string.
pos,
tie,
tiedand
untiedid.
Known Problems
One of the bug fixes has accidentally thrown line numbers off in rare cases, causing test failures for some CPAN modules. This will hopefully be fixed soon [perl #118931].
Acknowledgements. | https://metacpan.org/pod/release/SHAY/perl-5.19.3/pod/perl5192delta.pod | CC-MAIN-2015-11 | refinedweb | 1,193 | 63.56 |
We live in a digital age, and we have access to a ton of data. Using this information, we can better understand how we work, play, learn and live. Wouldn't it be nice to be able to get more targeted information on a particular topic?
With this article, we will demonstrate how to use BeautifulSoup and WebScrapingAPI together to build our own crawlers for gathering targeted data from websites.
A word of warning: scraping copyrighted content or personal information is illegal in most cases. To stay safe, it’s better to get explicit consent before you scrape any site, especially social media sites.
What are web crawlers
There are numerous search engines out there, and we all use them. Their services are easy to use - you just ask about something, and they look everywhere on the web to find an answer for you. Behind the curtain, it is Google's Googlebot crawler that makes Google's search engine such a success.
By scanning the web for pages according to your input keywords, crawlers help search engines catalog those pages and return them later on through indexing. Search engines rely on crawlers to gather website information, including URLs, hyperlinks, meta tags, and articles, as well as examining the HTML text.
Due to the bot's ability to track what it has already accessed, you don't have to worry about it getting stuck on the same web page indefinitely. The Public Internet and content selection present several challenges to web crawlers. Every day, existing websites post dozens of new pieces of information and do not even get me started on how many new websites appear daily.
In the end, this would require them to search through millions of pages and refresh their indexes continually. The systems that analyze website content depend on them, so they are essential.
So, crawlers are important, but why mention them? Because we’ll build our own bot to help out in the data extraction process. This way, we can rely on it to fetch URLs instead of typing them into the scraper manually. More automation, woo!
Installation
Now that we have a basic understanding of web crawlers, you may wonder how this all looks in action. Well, let’s dig into it!
First things first, we need to set up our work environment. Make sure your machine matches the following prerequisites:
- python3;
- A Python IDE. This guide will use Visual Studio Code because it’s lightweight and doesn’t require any additional configuration. The code is IDE-agnostic still, so you can choose any IDE you are comfortable with;
Last but not least, we will need an API key. You can create a free WSA account, which will give you 5000 API calls for the first 14 days. Once you registered, simply navigate to your dashboard, where you can find your API key and other valuable resources.
Developing the crawler
Good, we have the tools, so we are closer to start building our crawler. But how are we going to use it? Its implementation may differ depending on our final goal.
Pick a website and inspect the HTML
For this tutorial, we chose an e-commerce website that sells zero-waste products of different uses. We will navigate through all the pages, extract the product list of each page and finally store the data in a CSV file for every page.
To do that, we have first to take a look at the page structure and decide our strategy. Right-click anywhere on the page, then on “Inspect element”, and the “Developer Console” will pop up. Here you can see the website’s HTML document, which holds all the data we need.
Build the crawler
Ok, now we can write some code!
Begin by opening a terminal window in your IDE and run the following command, which will install BeautifulSoup, a library to help us extract the data from the HTML:
> pip install beautifulsoup4
Then, create a folder named “products”. It will help organize and store the scraping results in multiple CSV files.
Finally, create the “crawler.py” file. Here we are going to write all our code and crawling logic. When we are done, we can execute the file with the following command:
> py crawler.py
Moving forward, let’s import the libraries we need and then define some global variables:
import requests from bs4 import BeautifulSoup import csv BASE_URL = "" SECTION = "/collections/all-collections" FULL_START_URL = BASE_URL + SECTION ENDPOINT = "" API_KEY = "API_KEY"
Now, let’s define the entry point for our crawler:
def crawl(url, filename): page_body = get_page_source(url, filename) soup = BeautifulSoup(page_body, 'html.parser') start_crawling(soup, filename) crawl(FULL_START_URL, 'etee-page1.txt')
We implement the crawl function, which will extract the HTML documents through our get_page_source procedure. Then it will build the BeautifulSoup object that will make our parsing easier and call the start_crawling function, which will start navigating the website.
def get_page_source(url, filename): params = { "api_key": API_KEY, "url": url, "render_js": '1' } page = requests.request("GET", ENDPOINT, params=params) soup = BeautifulSoup(page.content, 'html.parser') body = soup.find('body') file_source = open(filename, mode='w', encoding='utf-8') file_source.write(str(body)) file_source.close() return str(body)
As stated earlier, the get_page_source function will use WebScrapingAPI to get the HTML content of the website and will write in a text file in the <body> section, as it’s the one containing all the information we are interested in.
Now, let’s take a step back and check how to achieve our objectives. The products are organized in pages, so we need to access each page repeatedly to extract them all.
This means that our crawler will follow some recursive steps as long as there are available pages. To put this logic in code, we need to look at how the HTML describes these conditions.
If you get back to the Developer Console, you can see that each page number is actually a link to a new page. More than that, considering that we are on the first page and we don’t have any other before this, the left arrow is disabled.
So, the following algorithm has to:
- Access the page;
- Extract the data (we will implement this in the next step);
- Find the pagination container in the HTML document;Verify if the “Next Page” arrow is disabled, stop if it is and if not, get the new link and call the crawl function for the new page.
def start_crawling(soup, filename): extract_products(soup, filename) pagination = soup.find('ul', {'class': 'pagination-custom'}) next_page = pagination.find_all('li')[-1] if next_page.has_attr('class'): if next_page['class'] == ['disabled']: print("You reached the last page. Stopping the crawler...") else: next_page_link = next_page.find('a')['href'] next_page_address = BASE_URL + next_page_link next_page_index = next_page_link[next_page_link.find('=') + 1] crawl(next_page_address, f'etee-page{next_page_index}.txt')
Extract data and export to CSV
Finally, let’s check out how we can extract the data we need. We’ll take another peek at the HTML document, and we can see that we can access the valuable information by looking at the class names.
We will extract the product’s name, rating, number of reviews, and price, but you can go as far as you want.
Remember the “products” folder we created earlier? We will now create a CSV file to export the data we scrape from each page. The folder will help us organize them together.
def extract_products(soup, filename): csv_filename = filename.replace('.txt', '.csv') products_file = open(f'products/{csv_filename}', mode='a', encoding='utf-8', newline='') products_writer = csv.writer(products_file, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) products_writer.writerow(['Title', 'Rating', 'Reviews', 'Price on sale']) products = soup.find_all('div', {'class': 'product-grid-item'}) for product in products: product_title = product.find('div', {'class': 'item-title'}).getText().strip() product_rating = product.find('span', {'class': 'jdgm-prev-badge__stars'})['data-score'] product_reviews = product.find('span', {'class': 'jdgm-prev-badge__text'}).getText().strip() product_price_on_sale = product.find('span', {'class': 'money'}).getText() products_writer.writerow([product_title, product_rating, product_reviews, product_price_on_sale])
After running the program, you can see all the extracted information in the newly created files.
Closing thoughts
And that’s pretty much it! We just made our own web crawler using Python’s BeautifulSoup and WebScrapingAPI in less than 100 lines of code. Of course, it may differ according to the complexity of your task, but it’s a pretty good deal for a crawler that navigates through a website’s pages.
For this guide, we used WebScrapingAPI's free trial, with 5000 API calls for the first 14 days, more than enough to build a powerful crawler.
It was helpful to focus only on the crawler’s logic instead of worrying about the various challenges encountered in web scraping. It spared us time, energy, and considerable other costs, such as using our own proxies, for example, only a few advantages you can obtain by using an API for web scraping. | https://www.webscrapingapi.com/how-to-build-your-own-web-crawler-in-less-than-100-lines-of-code/ | CC-MAIN-2022-05 | refinedweb | 1,470 | 64.71 |
Re: 2nd try for a "correct" starting point for signature gcreation in RSA algorithm
- From: unruh <unruh@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 07 Apr 2011 20:10:39 GMT
On 2011-04-07, ping pong <mosescuadro@xxxxxxxx> wrote:
"unruh" <unruh@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:slrniprtgf.gmr.unruh@xxxxxxxxxxxxxxxxxxxxxxxxxx
On 2011-04-07, ping pong <mosescuadro@xxxxxxxx> wrote:
"Francois Grieu" <fgrieu@xxxxxxxxx> wrote in message
news:4d9de112$0$20750$426a74cc@xxxxxxxxxxxxxxx
On 07/04/2011 16:42, ping pong wrote:
Using a previous advice on correct notation and algebra:
All parameters adhering to the RSA standard .
I am hoping I have now achieved a correct staring point for signature
creation in RSA.
As Advised:
1. Pick two large equal sized primes p and q
Question 2:
Sorry: my vision is pretty bad.
I likely cannot locate it in Handbook of applied cryptography (from now
on HAC) after trying many times with maximum effort!
What exactly is the recommendation for the requirement that follows:
1. Generate two large distinct random primes p and q, each roughly
the
same size (see 11.3.2)
It is of interest to me.
Can you shed some light on that requirement?
First, let's examine the size requirements.
By definition, a positive integer of b bits is in range
[2^(b-1) .. (2^b)-1].
Checking formulation:
Let b = 2 bits
Formula gives:
(2^(2-1) .. (2^2) -1)
(2 .. 3)
Why not: (0, 1, 2, 3)?
or [0 .... (2^b) - 1]
Because 1 is only 1 bit long, and 0 is zero bits long.
Sorry about rambling, I am trying to learn o.k.?
I plead for patience.
That's interesting:
You mean, to be, explicit, that the numbers to be considered for p and q
being "prime" shall not be
zero or or one but shall be selected from possibilities between:
2^(b-1) ... 2^b - 1?
They start at 2 when b = 2?
If so that requirement escaped me, and I thank you all for pointing that out
(if that is the cause of the vanishing of 0 and 1 from the list
of possibilities. Please be patient now. These are considerations likely
obvious to you that are new to me with respect to p and q.
Where is the start when b = 512, or 2048?
Since k1 and k2 ( usually called p and q) are to give a number of length 512
or 2048, then p and q should each have length 256 or 1024 respectively.
Ie, be from 2^255 to 2^256-1 each ( or 2^1023 to 2^1024-1 respectively)
Ie, have length 256 or 1024 each.
Confused by what is going on and why?
Length is the number of bits in the number once all leading 0 bits are
discarded. That is the definition of length.
..
Please be patient with my basic questions.
Is the lower limit to be questioned?
Question is all you want. This is the definition of what it means to say
a number is b bits long.
I am not sure at this moment?
In some contexts, p and q must be exactly the same size.
For example, ANSI X9.31 specifies that for a key of 1024+256*s bits,
p and q must be in range [2^(511.5+128*s) .. 2^(512+128*s)-1];
it follows that p and q must be exactly 512+128*s bits.
In some other contexts (e.g. PKCS#1), p and q are allowed to
have slightly different size; typically, the difference is chosen
small (1 or 2 bits).
I had no idea that different contexts had different size requirements for
p
and q.
requirements for a key to fall under some specification. Not context.
But I am learning.
I am trying to identify the "basis" version of the RSA algorithm that is
considered "secure".
It's interesting that sometimes p and q are the same bit size?
Sometimes
not, by a small bit difference - a couple of "lower bits" - I presume?
In a "basis" study of RSA, which version is normally used? Equality or
small difference between p and q?
It does not matter.
And I wondered about the logic underpinning this decision?
Can some light be shed on these considerations?
You are getting distracted. Certain standards require that the key obey
certain restriction. They have nothing to do with RSA. Their only
purpose is to make the definition clear and to make sure that the system
is hard to break. If one of the keys is a very different length than the
other, RSA becomes easier to break.
Remember that an integer of length n has 2^(n-1) possibilities. So there
are lots and lots of p, q of length n.
Adding in possibilities of length n-1 say only increases this by 50%
(actually slightly more because of the distribution of primes, but that
is straining at gnats)
These factors seem to be subtleties that I cannot readily read in the
standard books,
Because they have nothing to do with RSA.
Or have escaped me in the complexity of the matter
Or my vision is failing me.
I try not to skip text but inevitably I do.
By virtue of making text recognition as painless as possible.
This is partly why I have to read and re-read.
In part however it is not understanding all of the information that my
vision absorbs. I
f you see what I mean?
So please be patient.
With my numerous questions.
.... But I am rambling on .....
Yes.
So, I shall stop and await your reply.
The RSA cryptosystem works just the same, but its implementation
in the CRT variant (especially in hardware) is slightly more
difficult.
Then, the "random" requirement.
Again, depending on context, one might want to use a true or
pseudo-random source.
And there are several techniques to go from a random bitstring
to a random prime; its primality might be probable or provable;
so other characteristics might be required (e.g. "strong" prime,
for some definition of strong).
A free, modern, recognized, almost self-contained standard for
RSA key generation is in
<>
Start reading in appendix B.3
2. Compute n = pq3. Pick a value of e such that gcd(e, lcm(p-1,q-1)) = 1
4. Compute d = 1/e (mod lcm(p-1, q-1))
5. Return (e, n) as the public key and return (d, n) as the private
key.
What follows is my real interest:
As Advised:
A signature is then:
1. Compute h the hash of your message = h(m)
2. Compute the padded version of h (see PKCS #1 for instance) =
p(h(m)) = m'
3. Compute s = m'^d mod n
4. Return s= m'^d mod n as the signature
5. Or for my purpose, return:
EQ 1: s = m'^d mod (p * q)
Question 3:
May I ask:
Is EQ 1, the correct RSA signature creation starting point -
(ignoring the likely notational defects)?
This is *ONE* correct RSA signature generation method.
There are many others. In particular:
- in some (relatively rare) contexts (including ISO/IEC 9796-2
with some set of options), an additional step replaces s by s'
with s' = min(s, n-s), making s one bit less than n. If about
half of your signatures are wrong, likely you are hit by
this.
- in many contexts, a final step transforms s or s' into a byte
string of fixed size. If a small fraction of your signatures
are wrong, likely you are hit by this.
Francois Grieu
- Follow-Ups:
- References:
- 2nd try for a "correct" starting point for signature gcreation in RSA algorithm
- From: ping pong
- Re: 2nd try for a "correct" starting point for signature gcreation in RSA algorithm
- From: Francois Grieu
- Re: 2nd try for a "correct" starting point for signature gcreation in RSA algorithm
- From: ping pong
- Re: 2nd try for a "correct" starting point for signature gcreation in RSA algorithm
- From: unruh
- Re: 2nd try for a "correct" starting point for signature gcreation in RSA algorithm
- From: ping pong
- Prev by Date: Re: 2nd try for a "correct" starting point for signature gcreation in RSA algorithm
- Next by Date: Re: The FBI wants your help - really !
- Previous by thread: Re: 2nd try for a "correct" starting point for signature gcreation in RSA algorithm
- Next by thread: Re: 2nd try for a "correct" starting point for signature gcreation in RSA algorithm
- Index(es): | http://www.derkeiler.com/Newsgroups/sci.crypt/2011-04/msg00078.html | CC-MAIN-2014-42 | refinedweb | 1,410 | 73.98 |
The new online love of my life is NOAA, whose publicly available data files are a wonder. A couple weeks ago I discovered their weather forecasting web service, which can be used with Flash's WebService class to produce a Flash-based weather forecast for up to a week for any city in the US. The people at NOAA were very helpful in explaining some of the finer points of the forecast RSS file, and providing links to more information. Yesterday I found a whole new source of interesting data at NOAA's Geophysical Data Center. Among the data provided (for free) here is a complete database of global elevations.
What does this have to do with the BitmapData class? My first thought when I found this data was to try to use it to produce a sort of topographic map using traditional attachMovie methods to create a dot movieclip which I would attach repeatedly and color based on information in the data file. This quickly proved to be unworkable, as it took way too long to render the number of points required with vector graphics. Enter the BitmapData class, whose purpose is to allow the (relatively) quick rendering of bitmap (pixel-based) data in Flash. The results, including the amount of time taken for each step of the process (for 45,000 points) is shown above. A couple seconds to render a map for an area covering 20 degrees longitude and 10 degrees latitude is quite nice, I think.
Rendering bitmap data in a Flash movieclip is simple. Here's an outline of the BitmapData-related steps I used to make the sample above:
This is the code to do that:
import flash.display.BitmapData; // .. set up variables and read file data .. var topodata:BitmapData = new BitmapData(filedata.ncols, filedata.nrows); for (var row=0; row < filedata.nrows; row++) { for (var col=0; col < filedata.ncols; col++) { cell = row*filedata.ncols+col; for (var j=1; j<=colors.length; j++) { // .. find the right color for this pixel .. topodata.setPixel(col, row, cellcolor); break; } } } this.createEmptyMovieClip("map1", 1); map1._x = 15; map1._y = 10; map1.attachBitmap(topodata, 2, "auto", true);
In the sample above, I created two movieclips and did a separate attachBitmap (of the same bitmapdata instance) to each, specifying smoothing for the top one and not for the bottom one, so you can see the difference when they are expanded.
As is evident above, plotting elevations does not produce a true topographic map with contours or an accurate physical map (which would show actual land boundaries, shading of elevation changes, and an indication of the rainfall associated with an area by its color). But it does a pretty nice approximation, as can be seen by moving the slider at the bottom, which allows simultaneous viewing of a physical map of the same area (a piece of a National Geographic map which I scanned and skewed to get the latitude and longitude lines to match my rendering). And it brings out some interesting features by comparison, such as the fact that the area around the mouth of the Volga (appropriately named the Caspian Depression) is so low-lying that it is not distinguished from the water at all in my rendering, which makes me think the river must overflow a lot and which a bit of googling showed to in fact be the case). I played around with the color ranges for an hour or so, trying to get the best picture of actual landforms based on elevation and finally settled for using gradations of blue for everything at sea level and below, green starting with 50m, and yellow-going-to-red at 500m and above. This produces certain anomalies, such as the Crimean peninsula appearing to be an island instead of a peninsula, but it's so far the best combination of color ranges I've come up with to include an indication of lakes (often a bit higher than sea level) as well as oceans and seas. It does make obvious things like how deep the Black Sea is (especially compared to its neighbor, the Caspian). The color of each pixel was determined by finding its depth in an array of depth ranges I set up, and using the color range calculations described at the bottom of this page to get an intermediate value.
The data I used for the map was obtained by using NOAA's GOEDAS Grid Translator with the input shown below:
This produces a comma-delimited text file which can be downloaded and read in using the LoadVars object and its onData method to create an array of elevation points to plot. Notice that the GEODAS program produces an indication of the number of rows and columns, which you can also plug into your Flash movie.
To read the data from the text file created by GOEDAS, I used a loadVars instance with this onLoad function:
lv.onData = function(s:String) { // create an array where each element is one line from the data file // (covers all possible representations of a new line in the file) pts = s.split("\r\n"); if (pts.length==1) pts = s.split("\r"); if (pts.length==1) pts = s.split("\n"); // put the 3rd comma-delimited value into the pts array // overwriting its previous value for (var i=0; i <pts.length; i++) { var temp:Array = pts[i].split(','); pts[i] = Number(temp[2]); } drawPoints(); }
If you need to save a reference to the latitude and longitude associated with each point, you can do so by saving the first and second items in the comma-delimited string as well. If you don't need those points at all, you can get a smaller file from GEODAS by selecting the ASCII raster format instead of XYZ.
A zip file of the complete fla and data file used to produce the maps above may be downloaded by subscription from the link above at right. A faster version of this, made by saving the data from GEODAS in a compiled swf, can be found in the next sample in this section.
last update: 4 Jun 2006
Discussed on this page:
representation of bitmap data in flash, bitmapdata class for quick rendering of pixel-based data, noaa, goedas, elevation data, topographic map, color range, parse comma-delimited (csv) file with onData
Files:
bitmaptopo.fla
topo data txt file. | http://www.flash-creations.com/notes/sample_bitmaptopo.php | crawl-001 | refinedweb | 1,066 | 58.82 |
Using QR Codes in printed books.python (59), elegant-puzzle (9)
Probably my favorite parts of An Elegant Puzzle is the QR codes we created for each link as an exploration of how print and digital can comingle a bit more easily.
As I start thinking about how to turn staffeng.com into a book, I’m keen to recreate this feature, but even moreso I’m curious if this time I can push it a bit closer to the original vision.
Cool URIs don’t change
Ok, so we know that Cool URIs don’t change, but now that the book has been out in the wild for over a year, the biggest issue by far has been URLs bit-rotting into 404s. This really highlighted for me how important it is to use a URL shortener to indirect the links, making it possible to fix 404s as links expire.
The other advantage is that QR codes get more complex the longer they are, so simpler ones can be much smaller. For example, let’s generate QR codes for these three URLs:
Then you can see the corresponding QR codes from left to right, which requrie more and more complexity to represent the underlying URL.
The image complexity matters, because it determines just how small you can get the codes, which in turn impacts either the cost to print or the viability of printing at all.
So, let’s ’s play around with scaling the images a bit, how small can we get the, such that an iPhone can still read the images?
Let’s imagine we can generate a short code for every link in the book and that there are fewer than 10,000 links. Then we can use a URL like this one to reason about rendering sizes.
Ok, so looking at it scaled to one, two, three and six pixels,
we can get a sense of various scales (
scale is the number of pixels
used to represent a single module within the QRCode).
Even zooming my phone in on my high definition monitor I can’t get the smallest QR code to parse, but I can get the second smallest to work reliably, and looking at a printed copy of An Elegant Puzzle, I believe we ended up with a three scale there despite the much longer URLs we were representing.
If you’re self-publishing and printing via Kindle Direct Publishing, they print at 300 dots-per-inch, which ought to be more than enough for these images.
Experimenting with format
Ok, now that we have the QRCode sizing, next is to experiment with how to use them. In particular, I want to play around with how to inline them so the QRCodes are close to the link they represent rather than at the end of the book. A compromise would be collecting them all into the end of each chapter rather than the entire book, but inline would be better!
It’s a bit verbose though, so interesting to try inlining them even more.
Both of those could work quite nicely, I think, if I can get the layout to work properly, which I suspect will be quite hard! Will see if this is actually possible.
It also makes me have a bunch of other ideas, e.g. should print layout of ever blog post do something similar? An experiment for another time.
Code for QR codes
The script I used for these QRCodes was modeled off this tutorial:
import argparse import pyqrcode import png from pyqrcode import QRCode def qr(txt): code = pyqrcode.create(txt) return code if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("text_string", help="text to format, use quotes if whtiespace") parser.add_argument("output_file", help="filename to render output file") parser.add_argument("--scale", help="integer representing scale of image", type=int, default=6) args = parser.parse_args() code = qr(args.text_string) code.png(args.output_file, scale=args.scale)
Despite being quite simple, it worked quite well. | https://lethain.com/qr-codes-in-books/ | CC-MAIN-2021-21 | refinedweb | 666 | 67.99 |
If you have a map from something to large vectors, to insert into that map, you would first call value_type(). This would cause
the large vector to be copied. When you call insert(), the large vector would be copied a second time.
Here is a technique to get rid of one of the large vector copies:
#include <iostream> #include <map> using namespace std; namespace { typedef vector<unsigned> MyVectorType; typedef map<unsigned, MyVectorType, less<unsigned> > U2VU; U2U g_myU2U (less<unsigned>()); U2VU g_myU2VU(less<unsigned>()); } // end unnamed namespace int main() { MyVectorType myVector; myVector.push_back(1); myVector.push_back(2); myVector.push_back(3); U2VU::value_type vt1(1,MyVectorType()); U2VU::value_type vt2(2,MyVectorType()); g_myU2VU.insert(vt1); pair<U2VU::iterator, bool> ret; ret = g_myU2VU.insert(vt2); if (ret.second == true) { // This means the key was not already there, // so the item was inserted. std::cout << "Inserting vector into map via iterator" << std::endl; ret.first->second = myVector; } std::cout << "U2VU has " << g_myU2VU.size() << " items in it." << std::endl; return 0; }
The trick was to insert a value_type() with an empty vector, and then use the returned iterator to set the vector part to the large vector, thus saving a copy of the large vector. | http://cpptrivia.blogspot.com/2010/11/trick-to-reducing-copying-of-large.html | CC-MAIN-2017-51 | refinedweb | 199 | 65.83 |
Microsoft's official enterprise support blog for AD DS and more. Being an unsigned 64-bit integer, that means 264-1, which is 18,446,744,073,709,551,615 (i.e. 18 quintillion). Under normal use that is never going to run out. Even more, when AD reaches that top number, it would restart at 1 all over again!
Let's say I want to run out of USNs though, so I create a script that makes 100 object write updates per second on at DC. It would take me 54 days to hit the first 1 billionth USN. At that rate, this means I am adding ~6.5 billion USN changes a year. Which means at that rate, it would take just under 3 billion years to run out on that DC. Which is probably longer than your hardware warranty.
My further thought was around Version metadata, which we don't document anywhere I can find. That is an unsigned 32-bit counter for each attribute on an object and again, so huge it is simply not feasible that it would run out in anything approaching normal circumstances. If you were to update a computer’s description every time a user logged on and they only had one computer, at 232-1 that means they have to logon 4,294,967,295 times to run out. Let’s say they logon in the morning and always logoff for bathroom, coffee, meetings and lunch breaks rather than locking their machines – call it 10 logons a day and 250 working days a year. That is still 1.7 million years before they run out and you need to disjoin, rename, and rejoin their computer so they can start again.
That said - the commenter was a bit off about the facts, but he had the right notion: not re-writing attributes with unchanged data is definitely a good idea. Less spurious work is always the right answer for DC performance and replication. Figure out a less invasive way to do this, or even better, use a product like System Center Config Manager; it has built in functionality to determine the “primary user” of computers, involving auditing and some other heuristics. This is part of its “Asset Intelligence” reporting (maybe called something else in SCCM 2012).
Interesting side effect of this conversation: I was testing all this out with NTDSUTIL auth restores and setting the version artificially high on an object with VERINC. Repadmin /showmeta gets upset once your version crosses the 231 line. :)), so I have it disabled on the connections between my hub servers and the other servers on the same LAN. I have other servers connected over a WAN, so I kept RDC enabled on those connections.
By having some connections with RDC enabled and others disabled, am I making my hub server do ‘twice’ the work? Would it be better if I enabled it on all connections, even the LAN ones?
You aren’t making your servers do things twice, per se; more like doing the same things, then one does a little more.
Consider a change made on the hub: it still stage the same file once, compresses it in staging once, creates RDC signatures for it once, and sends the overall calculated SHA-1 file hash to each server once. The only difference will be that one spoke server then receives the whole file and the other spoke does the RDC version vector and signature chunk dance to receive part of the file.
The non-RDC LAN-based communication will still be more efficient and fast within its context, and the WAN will still get less utilization and faster performance for large files with small changes.
I'm trying to get Network Policy Server (RADIUS) to work in my environment to enable WPA-2 authentication from a slick new wireless device. I keep getting the error "There is no domain controller available for domain CONTOSO.COM" in the event log when I try to authenticate, which is our legacy dotted NetBIOS domain name. On a hunch, I created a subdomain without a dot in the NetBIOS name and was able to authenticate right away with any user from that subdomain. Do you have any tricks or advice on how to deal with NPS in a dotted domain running in native Windows 2008 R2 mode other than renaming it (yuck).
I don't even know how to spell NPS (it's supported by our Networking team) but I found this internal article from them. You are not going to like the answer:
Previous versions of IAS/NPS could not perform SPN lookups across domains because it treated the SPN as a string and not an FQDN. Windows Server 2008 R2 corrected that behavior, but now NPS is treating a dotted NetBIOS name as a FQDN and NPS performs a DNS lookup on the CONTOSO.COM name. This fails because DNS does not host a CONTOSO.COM zone.
That leaves you with three main solutions:
There might be some other workaround - this would be an extremely corner case scenario and I doubt we've explored it deeply.
The third solution is an ok short-term workaround, but Win2008 isn’t going to be supported forever and you might need some R2 features in the meantime. The first two are gnarly, but I gotta tell ya: no one is rigorously testing dotted NetBIOS names anymore, as they were only possible from NT 4.0 domain upgrades and.
We are using USMT 4.0 to migrate data with the merge script sourcepriority option to always overwrite data on the destination with data from the source. No matter what though, the destination always wins and the source copy of the file is renamed with the losing (1) tag.
This turned out to be quite an adventure.
We turned on migdiag logging using SET MIG_ENABLE_DIAG=migdiag.xml in order to see what was happening here; that's a great logging option for figuring out why your rules aren’t processing correctly. When it got to the file in question during loadstate, we saw this weirdness:
<Pattern Type="File" Path="C:\Users\someuser\AppData\Local\Microsoft\Windows Sidebar [Settings.ini]" Operation="DynamicMerge,<unknown>"/>
<Pattern Type="File" Path="C:\Users\someuser\AppData\Local\Microsoft\Windows Sidebar [Settings.ini]" Operation="DynamicMerge,<unknown>"/>
Normally, it should have looked like:
<Pattern Type="File" Path="C:\Users\someuser\AppData\Roaming\Microsoft\Access\* [*]" Operation="DynamicMerge,CMXEMerge,CMXEMergeScript,MigXmlHelper,SourcePriority"/>
<Pattern Type="File" Path="C:\Users\someuser\AppData\Roaming\Microsoft\Access\* [*]" Operation="DynamicMerge,CMXEMerge,CMXEMergeScript,MigXmlHelper,SourcePriority"/>
More interestingly, none of us could reproduce the issue here using the customer's exact same XML file. Finally, I had him reinstall USMT from a freshly downloaded copy of the WAIK, and it all started working perfectly. I've done this a few times in the past with good results for these kinds of weirdo issues; since USMT cannot be installed on Windows XP, it just gets copied around as folders. Sometimes people start mixing in various versions and DLLS, from Beta, RC, and hotfixes, and you end up with something that looks like USMT - but ain't.'s existence, so hopefully by creating and implementing our own driver system, we stop the pain customers have using third party solutions of variable quality. At least we'll be able to see what's wrong now if it doesn’t work.
For a lot more info, grab the whitepaper.).
$Db_dirty$ exists after a dirty database shutdown and acts as a marker of that fact. $Db_normal$ exists when there are no database issues and is renamed to $db_lost$ if the database goes missing, also acting as a state marker for DFSR between service restarts.
Where is the best place to learn more about MaxConcurrentAPI?
Right here, and only quite recently:
If you missed it, we released a new hotfix for DFSR last month that adds some long-sought functionality for file server administrators: the ability to prevent DFSR from non-authoritatively synchronizing replicated folders on a volume where the database suffered a dirty shutdown:
Changes that are not replicated to a downstream server are lost on the upstream server after an automatic recovery process occurs in a DFS Replication environment in Windows Server 2008 R2 -
DFSR now provides the capability to override automatic replication recovery of dirty shutdown-flagged databases. By default, the following registry DWORD value exists:
HKLM\System\CurrentControlSet\Services\DFSR\Parameters\
StopReplicationOnAutoRecovery = 1
If set to 1, auto recovery is blocked and requires administrative intervention. Set it to 0 to return to the old behavior.
DFSR writes warning 2213 event to the DFSR event log:
MessageId=2213
Severity=Warning
The DFS Replication service stopped replication on volume : %2
GUID: %1 VolumeConfig class.
For example, from an elevated command prompt, type the following command:
wmic /namespace:\\root\microsoftdfs path dfsrVolumeConfig where volumeGuid="%1"
Holy crap!
Pandora.com is a great way to find new music; I highly recommend it. It can get a little esoteric, though. Real radio will never find you a string duo that plays Guns and Roses songs, for example.
AskDS reader Joseph Moody sent this along to us:
"Because I got tired of forwarding the Accelerating Your IT Career post to techs in our department, we just had it printed poster size and hung it on an open wall. Now, I just point to it when someone asks how to get better."
My wife wanted to be a marine biologist (like George Costanza!) when she was growing up and we got on a killer whale conversation last week when I was watching the amazing Discovery Frozen Planet series. She later sent me this tidbit:
's Deep Blue Sea for Realzies!!!
Have you ever wanted to know what AskDS contributor Rob Greene looks like when his manager 'shops him to a Shrek picture? Now you can:
Have a nice weekend folks,
- Ned “” Pyle
- Ned “” Pyle | http://blogs.technet.com/b/askds/archive/2012/04/20/friday-mail-sack-drop-the-dope-hippy-edition.aspx | CC-MAIN-2013-48 | refinedweb | 1,656 | 59.33 |
Running a basic, truly minimal window manager can save significant CPU cycles and memory. This becomes important if you’re running old, limited hardware or when designing a desktop environment for an embedded Linux device. Even the oldest, most primitive window managers (think TWM or MWM) can support a pretty desktop background image. The ability is almost as old as X itself.
The tool you need is a very old, very small utility called xli. It’s included as part of X.org in many distributions. If your favorite distro doesn’t include it the source code can be found here. You can load the image of your choice either from the command line or when your window manager starts. The command you’d use to add a background to an X session that’s already running is:
xli -onroot <path-to-image>
If you want have this image load when your window manager starts there are two approaches you might use. Some very lightweight but recent window managers have some sort of configuration file which allows for commands to be executed at startup. For example JWM (Joe’s Window Manager) has am xml configuration file which, in a default installation, can be found at
/usr/etc/system.jwmrc
This file uses xli to load a background image, albeit one that probably doesn’t exist on your system, as part of it’s default configuration. In the case of JWM you simply change the default image file. For other window managers you would likely have to specify the command above as one of your startup commands.
Even If your window manager of choice doesn’t have it’s own configuration file it is almost certainly started from a file called .xinitrc. You can have an .xinitrc file for an individual user in their home directory or you can modify the system default file located in /etc/X11 in most current distributions.
TWM, a part of X.org, is the “failsafe” window manager for many distributions. The command to start it in your system .xinitrc looks something like this:
/usr/X11R6/bin/twm & /usr/X11R6/bin/xclock -geometry 50x50-1+1 & exec /usr/X11R6/bin/xterm -geometry 80x66+0+0 -name login
That launches twm with an xterm window and a clock. Adding another & and the xli command above will cause TWM to launch with a background of your choice. This method should work with almost any minimalist window manager.
Compiling xli from source
If your distro doesn’t include xli you’ll be compiling from source. Since xli is a really, truly ancient utility compiling it is a bit quirky. When you download xli to your home directory create a working directory below that. Move the gzipped tarball into the newly created directory before you unzip and untar. If you don’t do that the source files (lots of them) will go directly into your home directory.
Next you need to edit rlelib.c. Near the top you’ll find this line:
#include <varargs.h>
varargs.h is no longer supported by gcc. You’ll need to change that line to:
#include <stdarg.h>
Once that’s done you can create your makefile with the command:
xmkmf
The rest (run as root) is what you’d expect:
make make install
That’s all there is to it. Now even the most primitive window manager can look pretty on your system. | http://www.oreillynet.com/linux/blog/2007/02/adding_a_background_image_to_a.html | CC-MAIN-2014-10 | refinedweb | 570 | 64.61 |
2.7: Installing Pygame
- Page ID
- 14390
Pygame does not come with Python. Like Python, Pygame is available for free. You will have to download and install Pygame, which is as easy as downloading and installing the Python interpreter. In a web browser, go to the URL and click on the "Downloads" link on the left side of the web site. This book assumes you have the Windows operating system, but Pygame works the same for every operating system. You need to download the Pygame installer for your operating system and the version of Python you have installed.
You do not want to download the "source" for Pygame, but rather the Pygame "binary" for your operating system. For Windows, download the pygame-1.9.1.win32-py3.2.msi file. (This is Pygame for Python 3.2 on Windows. If you installed a different version of Python (such as 2.7 or 2.6) download the .msi file for your version of Python.)".
On Windows, double click on the downloaded file to install Pygame. To check that Pygame is install correctly, type the following into the interactive shell:
>>> import pygame
If nothing appears after you hit the Enter key, then you know Pygame has successfully been installed. If the error
ImportError: No module named pygame appears, then try to install Pygame again (and make sure you typed
import pygame correctly).
This chapter has five small programs that demonstrate how to use the different features that Pygame provides. In the last chapter, you will use these features for a complete game written in Python with Pygame.
A video tutorial of how to install Pygame is available from this book's website at | https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Making_Games_with_Python_and_Pygame_(Sweigart)/02%3A_Installing_Python_and_Pygame/2.07%3A_Installing_Pygame | CC-MAIN-2022-21 | refinedweb | 281 | 74.69 |
Departement Informatik
DiskreteMathematik
Ueli Maurer
Herbstsemester 2020Vorwort
1 Die Mathematik der Informatik sollte demnach einfacher verständlich sein als die kontinuier-
liche Mathematik (z.B. Analysis). Sollte dies dem Leser ab und zu nicht so erscheinen, so ist esvermutlich lediglich eine Frage der Gewöhnung. 2 Die Numerik befasst sich unter anderem mit dem Thema der (in einem Computer unvermeid-
baren) diskreten Approximation reeller Grössen und den daraus resultierenden Problemen wie z.B.numerische Instabilitäten. Das Teilgebiet der Mathematik, das sich mit diskreten Strukturen befasst,heisst diskrete Mathematik. Der Begriff “diskret” ist zu verstehen als endlich oderabzählbar unendlich. Viele Teilbereiche der diskreten Mathematik sind so wichtig,dass sie vertieft in einer eigenen Vorlesung behandelt werden. Dazu gehörendie Theorie der Berechnung, also die Formalisierung der Begriffe Berechnungund Algorithmus, welche in der Vorlesung “Theoretische Informatik” behan-delt wird, sowie die diskrete Wahrscheinlichkeitstheorie. Eine inhaltliche Ver-wandtschaft besteht auch zur Vorlesung über Algorithmen und Datenstruk-turen. In dieser Lehrveranstaltung werden die wichtigsten Begriffe, Techniken undResultate der diskreten Mathematik eingeführt. Hauptziele der Vorlesung sindnebst der Behandlung der konkreten Themen ebenso die adäquate Model-lierung von Sachverhalten, sowie das Verständnis für die Wichtigkeit von Ab-straktion, von Beweisen und generell der mathematisch-präzisen Denkweise,die auch beim Entwurf von Softwaresystemen enorm wichtig ist. Zudem wer-den einige Anwendungen diskutiert, z.B. aus der Kryptografie, der Codierungs-theorie oder der Algorithmentheorie. Diskrete Mathematik ist ein sehr bre-ites Gebiet. Entsprechend unterschiedliche Ansätze gibt es auch für den Auf-bau einer Vorlesung über das Thema. Mein Ziel bei der Konzipierung dieserLehrveranstaltung war es, speziell auf Themen einzugehen, die in der Infor-matik wichtig sind, sowie dem Anspruch zu genügen, keine zentralen Themender diskreten Mathematik auszulassen. Ausnahmen sind die Kombinatorik unddie Graphentheorie, die früher als Kapitel 4 und 5 dieses Skriptes erschienen, inder letzten Studienplanrevision aber in andere Vorlesungen verschoben wur-den. Die sechs Kapitel sind
Viele Beispiele werden nur an der Tafel oder in den Übungen behandelt. DieVorlesung und die Übungen bilden einen integralen Bestandteil der Lehrver-anstaltung und des Prüfungsstoffes. Es gibt kein einzelnes Buch, das denganzen Stoff der Lehrveranstaltung behandelt. Aber unten folgt eine Liste guterBücher, die als Ergänzung dienen können. Sie decken aber jeweils nur Teile derVorlesung ab, gehen zum Teil zu wenig tief, oder sind zu fortgeschritten im Ver-gleich zur Vorlesung.
Vorwort iii
4 Number Theory 69 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4.1.1 Number Theory as a Mathematical Discipline . . . . . . . 69 4.1.2 What are the Integers? . . . . . . . . . . . . . . . . . . . . . 70 4.2 Divisors and Division . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4.2.1 Divisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4.2.2 Division with Remainders . . . . . . . . . . . . . . . . . . . 71 4.2.3 Greatest Common Divisors . . . . . . . . . . . . . . . . . . 72 4.2.4 Least Common Multiples . . . . . . . . . . . . . . . . . . . 74 4.3 Factorization into Primes . . . . . . . . . . . . . . . . . . . . . . . . 74 4.3.1 Primes and the Fundamental Theorem of Arithmetic . . . 74 4.3.2 Proof of the Fundamental Theorem of Arithmetic * . . . . 75 4.3.3 Expressing gcd and lcm . . . . . . . . . . . . . . . . . . . . 76 4.3.4 Non-triviality of Unique Factorization * . . . . . . . . . . . 76 4.3.5 Irrationality of Roots * . . . . . . . . . . . . . . . . . . . . . 77 4.3.6 A Digression to Music Theory * . . . . . . . . . . . . . . . . 77 4.4 Some Basic Facts About Primes * . . . . . . . . . . . . . . . . . . . 78 4.4.1 The Density of Primes . . . . . . . . . . . . . . . . . . . . . 78 4.4.2 Remarks on Primality Testing . . . . . . . . . . . . . . . . . 79 4.5 Congruences and Modular Arithmetic . . . . . . . . . . . . . . . . 80 4.5.1 Modular Congruences . . . . . . . . . . . . . . . . . . . . . 80 4.5.2 Modular Arithmetic . . . . . . . . . . . . . . . . . . . . . . 81 4.5.3 Multiplicative Inverses . . . . . . . . . . . . . . . . . . . . . 83 4.5.4 The Chinese Remainder Theorem . . . . . . . . . . . . . . 84 4.6 Application: Diffie-Hellman Key-Agreement . . . . . . . . . . . . 85
5 Algebra 88 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5.1.1 What Algebra is About . . . . . . . . . . . . . . . . . . . . . 88 5.1.2 Algebraic Systems . . . . . . . . . . . . . . . . . . . . . . . 88 5.1.3 Some Examples of Algebras . . . . . . . . . . . . . . . . . . 89 5.2 Monoids and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.2.1 Neutral Elements . . . . . . . . . . . . . . . . . . . . . . . . 90 5.2.2 Associativity and Monoids . . . . . . . . . . . . . . . . . . 90 5.2.3 Inverses and Groups . . . . . . . . . . . . . . . . . . . . . . 91 5.2.4 (Non-)minimality of the Group Axioms . . . . . . . . . . . 92 5.2.5 Some Examples of Groups . . . . . . . . . . . . . . . . . . . 93 5.3 The Structure of Groups . . . . . . . . . . . . . . . . . . . . . . . . 94 5.3.1 Direct Products of Groups . . . . . . . . . . . . . . . . . . . 94 5.3.2 Group Homomorphisms . . . . . . . . . . . . . . . . . . . . 94 5.3.3 Subgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5.3.4 The Order of Group Elements and of a Group . . . . . . . 96 5.3.5 Cyclic Groups . . . . . . . . . . . . . . . . . . . . . . . . . . 97 5.3.6 Application: Diffie-Hellman for General Groups . . . . . 98 5.3.7 The Order of Subgroups . . . . . . . . . . . . . . . . . . . . 98 5.3.8 The Group Z∗m and Euler’s Function . . . . . . . . . . . . . 99 5.4 Application: RSA Public-Key Encryption . . . . . . . . . . . . . . 101 5.4.1 e-th Roots in a Group . . . . . . . . . . . . . . . . . . . . . . 102 5.4.2 Description of RSA . . . . . . . . . . . . . . . . . . . . . . . 102 5.4.3 On the Security of RSA * . . . . . . . . . . . . . . . . . . . . 104 5.4.4 Digital Signatures * . . . . . . . . . . . . . . . . . . . . . . . 104 5.5 Rings and Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 5.5.1 Definition of a Ring . . . . . . . . . . . . . . . . . . . . . . . 105 5.5.2 Divisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 5.5.3 Units, Zerodivisors, and Integral Domains . . . . . . . . . 107 5.5.4 Polynomial Rings . . . . . . . . . . . . . . . . . . . . . . . . 108 5.5.5 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 5.6 Polynomials over a Field . . . . . . . . . . . . . . . . . . . . . . . . 112 5.6.1 Factorization and Irreducible Polynomials . . . . . . . . . 112 5.6.2 The Division Property in F [x] . . . . . . . . . . . . . . . . . 114 5.6.3 Analogies Between Z and F [x], Euclidean Domains * . . . 115 5.7 Polynomials as Functions . . . . . . . . . . . . . . . . . . . . . . . 116 5.7.1 Polynomial Evaluation . . . . . . . . . . . . . . . . . . . . . 116 5.7.2 Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 5.7.3 Polynomial Interpolation . . . . . . . . . . . . . . . . . . . 117 5.8 Finite Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 5.8.1 The Ring F [x]m(x) . . . . . . . . . . . . . . . . . . . . . . . 118 5.8.2 Constructing Extension Fields . . . . . . . . . . . . . . . . 120 5.8.3 Some Facts About Finite Fields * . . . . . . . . . . . . . . . 122 5.9 Application: Error-Correcting Codes . . . . . . . . . . . . . . . . . 123 5.9.1 Definition of Error-Correcting Codes . . . . . . . . . . . . . 123 5.9.2 Decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 5.9.3 Codes based on Polynomial Evaluation . . . . . . . . . . . 125
6 Logic 127 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 6.2 Proof Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 xii
k 2 ≡3 1
discussed in this section, for example the interpolation of a polynomial, computation modulo anumber n, Euclid’s algorithm for computing greatest common divisors, or matrices.3 Chapter 1. Introduction and Motivation
Hence we have P (k) = 0 for all k with k ≡3 0 (i.e.,3 the k divisible by 3).4 The case k = 4 can be solved easily by finding a solution for each of the threetypes of squares (corner, edge, interior of board) that could be marked. Hencewe have proved P (4) = 1. This proof type will later be called a proof by casedistinction. For the case k = 5 one can prove that P (5) = 0 by showing that there is (atleast) a square which, when marked, leaves an area not coverable by L-shapes.Namely, if one marks a square next to the center square, then it is impossible tocover the remaining area by L-shapes. This proof type will later be called a proofby counterexample. We have P (6) = 0 because 6 is divisible by 3, and hence the next interestingcase is k = 7. The reader can prove as an exercise that P (7) = 1. (How manycases do you have to check?) The question of interest is, for a general k, whether P (k) = 1 or P (k) = 0.But one can prove (explained in the lecture) that
P (k) = 1 =⇒ P (2k) = 1,
i.e., that if the statement is true for some k, then it is also true for two times k.This implies that P (2i ) = 1 for any i and also that P (7 · 2i ) = 1 for any i. Hencewe have P (8) = 1, and P (9) = 0, leaving P (10) and P (11) as the next opencases. One can also prove the following generalization of the above-stated fact:
We point out that, already in this first example, we understand the reasoningleading to the conclusion P (k) = 0 or P (k) = 1 as a proof.
Example 1.2. Consider the following simple method for testing primality. Proveor disprove that an odd number n is a prime if and only if 2n−1 divided by nyields remainder 1, i.e., if 2n−1 ≡n 1.One can easily check that 2n−1 ≡n 1 holds for the primes n = 3, 5, 7, 11, 13 (andmany more). Moreover, one can also easily check that 2n−1 6≡n 1 for the first oddcomposite numbers n = 9, 15, 21, 25, etc. But is the formula a general primalitytest? The solution to this problem will be given in Chapter 4.
Example 1.3. The well-known cancellation law for real numbers states that ifab = ac and a 6= 0, then b = c. In other words, one can divide both sides bya. How general is this law? Does it hold for the polynomials over R, i.e., does 3 “i.e.”, the abbreviation of the Latin “id est”, should be read as “that is” (German: “das heisst”). 4 Thefact that the equation k 2 ≡p 1 has two solutions modulo p, for any prime p, not just forp = 3, will be obvious once we understand that computing modulo p is a field (see Chapter 5) andthat every element of a field has either two square roots or none.1.3. Abstraction: Simplicity and Generality 4
a(x)b(x) = a(x)c(x) imply b(x) = c(x) if a(x) 6= 0? Does it hold for the integersmodulo m, i.e., does ab ≡m ac imply b ≡m c if a 6= 0? Does it hold for thepermutations, when multiplication is defined as composition of permutations?What does the condition a 6= 0 mean in this case? Which abstraction lies behindthe cancellation law? This is a typical algebraic question (see Chapter 5).Example 1.4. It is well-known that one can interpolate a polynomial a(x) =ad xd + ad−1 xd−1 + · · · a1 x + a0 of degree d with real coefficients from any d + 1values a(αi ), for distinct α1 , . . . , αd+1 . Can we also construct polynomials over afinite domain (which is of more interest and use in Computer Science), keepingthis interpolation property? For example, consider computation modulo 5. There are 53 = 125 polyno-mials a2 x2 + a1 x + a0 of degree 2 because we can freely choose three coefficientsfrom {0, 1, 2, 3, 4}. It is straight-forward (though cumbersome) to verify that ifwe fix any three evaluation points (for example 0, 2, and 3), then the polyno-mial is determined by the values at these points. In other words, two differentpolynomials p and q result in distinct lists (p(0), p(2), p(3)) and (q(0), q(2), q(3))of polynomial values. What is the general principle explaining this? For theanswer and applications, see Chapter 5.
a a
replaced by the pair consisting of the smaller integer and the remainder of thedivision. This step is repeated until the remainder is 0. The greatest commondivisor is the last non-zero remainder. Essentially the same algorithm works for two polynomials a(x) and b(x), saywith integer (or real) coefficients, where the size of a polynomial is defined tobe its degree. In which sense are integer numbers and polynomials similar? Atwhich level of abstraction can they be seen as instantiations of the same abstractconcept? As we will see in Chapter 5, the answer is that they are both so-calledEuclidean domains, which is a special type of a so-called integral domain, which inturn is a special case of a ring.
Mathematical Reasoning,Proofs, and a First Approachto Logic
Definition 2.1. A mathematical statement that is either true or false is also calleda proposition.
• 71 is a prime number. • If p is a prime number, then 2p − 1 is also a prime number. • Every natural number is the sum of at most four square numbers. (Exam- ple: 22 = 42 + 22 + 12 + 12 and 74 = 62 + 52 + 32 + 22 .) 1 German: Behauptung2.1. Mathematical Statements 8
• Every even natural number greater than 2 can be expressed as the sum of two primes.2 For example, 108 = 37 + 71 and 162 = 73 + 89. • Any n lines ℓ1 , . . . , ℓn in the plane, no two of which are parallel, intersect in one point (see Example 2.4). • For the chess game there exists a winning strategy for the player making the first move (playing “white”).
The first proposition is easily shown to be true. The second proposition is false,and this can be proved by giving a counter-example: 11 is prime but 211 − 1 =2047 = 23 · 89 is not prime.3 The third proposition is true but by no meansobvious (and requires a sophisticated proof). The fourth proposition is false.The fifth proposition is not known to be true (or false).
Example 2.1. Consider the following statement which sounds like a statementas it could appear in Computer Science: “There is no algorithm for factoring anyn-bit integer in n3 steps”. This is not a precise mathematical statement becauseits truth (namely the complexity of the best algorithm) generally depends on theparticular computational model one is considering.
If one makes a statement, say S, for example in the context of these lecturenotes, there can be two different meanings. The first meaning is that by statingit one claims that S is true, and the second meaning is simply to discuss thestatement itself (for example as an assumption), independently of whether it istrue or not. We should try to distinguish clearly between these two meanings.
in mathematics. 3 2p − 1 is prime for most primes p (e.g. for 2, 3, 5, 7, 13 and many more), but not all. 4 The term “theorem” is usually used for an important result, whereas a lemma is an interme-
diate, often technical result, possibly used in several subsequent proofs. A corollary is a simpleconsequence (e.g. a special case) of a theorem or lemma.9 Chapter 2. Math. Reasoning, Proofs, and a First Approach to Logic
The first statement is true because both statements “4 is an even number” and“71 is a prime number” are true. In contrast, the second statement is false be-cause the statement “5 is an even number” is false. However, the third statementis again true because “71 is a prime number” is true and hence it is irrelevantwhether “5 is an even number” is true or false. A slightly more involved combination of two statements S and T is implica-tion, where in mathematics one usually writes
S =⇒ T.
It stands for “If S is true, then T is true”. One also says “S implies T ”. Thestatement S =⇒ T is false if S is true and T is false, and in all other three casesit is true. In other words, the first three statements below are true while the lastone is false.
We point out that S =⇒ T does not express any kind of causality like “because Sis true, T is also true”. Similarly, S ⇐⇒ T means that S is true if and only if T is true. This canequivalently be stated as “S implies T and T implies S.”
n is prime =⇒ 2n − 1 is prime
is a false statement, even though it may appear at first sight to follow from theabove claim. However, we observe that if S =⇒ T is true, then generally it doesnot follow that if S is false, then T is false.Example 2.3. An integer n is called a square if n = m · m for some integer m.Prove that if a and b are squares, then so is a · b.
• S1 =⇒ S3 , 5 It is understood that this statement is meant to hold for an arbitrary n.11 Chapter 2. Math. Reasoning, Proofs, and a First Approach to Logic
• S1 =⇒ S4 , • S2 =⇒ S5 , • S3 and S5 =⇒ S6 , • S1 and S4 =⇒ S7 , as well as • S6 and S7 =⇒ T .
we follow the traditional notation used in the literature. The difference will become more clear inChapter 6 when we differentiate between logical consequence and syntactic derivation. 7 This example is taken from the book by Matousek and Nesetril. 8 Here we assume some familiarity with proofs by induction; in Section 2.6.10 we discuss them
in depth.2.2. The Concept of a Proof 12
• Prevention of errors. Errors are quite frequently found in the scientific lit- erature. Most errors can be fixed, but some can not. In contrast, a com- pletely formal proof leaves no room for interpretation and hence allows to exclude errors.
puter can only deal with rigorously formalized statements, not with semi- precise common language, hence a formal proof is required.9
• Precision and deeper understanding. Informal proofs often hide subtle steps. A formal proof requires the formalization of the arguments and can lead to a deeper understanding (also for the author of the proof).
error-prone. 10 “e.g.”, the abbreviation of the Latin “exempli gratia” should be read as “for example”.2.3. A First Introduction to Propositional Logic 14
Logic (see Chapter 6) defines the syntax of a language for expressing statementsand the semantics of such a language, defining which statements are true andwhich are false. A logical calculus allows to express and verify proofs in a purelysyntactic fashion, for example by a computer.
• Proof sketch or proof idea: The non-obvious ideas used in the proof are described, but the proof is not spelled out in detail with explicit reference to all definitions that are used. • Complete proof: The use of every definition is made explicit. Every proof step is justified by stating the rule or the definition that is applied. • Formal proof: The proof is entirely phrased is a given calculus.
Proof sketches are often used when the proof requires some clever ideas andthe main point of a task or example is to describe these ideas and how they fittogether. Complete proofs are usually used when one systematically applies thedefinitions and certain logical proof patterns, for example in our treatments ofrelations and of algebra. Proofs in the resolution calculus in Chapter 6 can beconsidered to be formal proofs.
Definition 2.5. (i) The negation (logical NOT) of a proposition A, denoted as ¬A, is true if and only if A is false. (ii) The conjunction (logical AND) of two propositions A and B, denoted A∧B, is true if and only if both A and B are true. (iii) The disjunction (logical OR) of two propositions A and B, denoted A ∨ B, is true if and only if A or B (or both) are true.12
The logical operators are functions, where ¬ is a function {0, 1} → {0, 1} and∧ and ∨ are functions {0, 1} × {0, 1} → {0, 1}. These functions can be describedby function tables, as follows:
A B A∧B A B A∨B A ¬A 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1
Logical operators can also be combined, in the usual way of combining func-tions. For example, the formula
A ∨ (B ∧ C)
A B A→B 0 0 1 0 1 1 1 0 0 1 1 1
Note that A → B is true if and only if A implies B. This means that when Ais true, then also B is true. Note that A → B is false if and only if A is true andB is false, or, stated differently, if B is false despite that A is true. A → B can beunderstood as an alternative notation for ¬A ∨ B, which has the same functiontable.
Example 2.6. Consider the following sentence: If student X reads the lecturenotes every week and does the exercises (A), then student X will get a goodgrade in the exam (B). This is an example of an implication A → B. Saying thatA → B is true does not mean that A is true and it is not excluded that B is trueeven if A is false, but it is excluded that B is false when A is true. Let’s hope thestatement A → B is true for you : -) .
A B A↔B 0 0 1 0 1 0 1 0 0 1 1 117 Chapter 2. Math. Reasoning, Proofs, and a First Approach to Logic
Definition 2.7. Two formulas F and G (in propositional logic) are called equiva-lent, denoted as F ≡ G, if they correspond to the same function, i.e., if the truthvalues are equal for all truth assignments to the propositional symbols appear-ing in F or G.
For example, it is easy to see that ∧ and ∨ are commutative and associative,i.e., A∧B ≡ B∧A and A∨B ≡ B ∨A 13 but not for other logics such as predicate logic2.3. A First Introduction to Propositional Logic 18
as well as A ∧ (B ∧ C) ≡ (A ∧ B) ∧ C.
A ∧ B ∧ C ≡ A ∧ (B ∧ C).
Similarly we have A ∨ (B ∨ C) ≡ (A ∨ B) ∨ C
¬(¬A) ≡ A.
Let us look at some equivalences involving more than one operation, whichare easy to check. The operator ∨ can be expressed in terms of ¬ and ∧, asfollows: ¬(A ∨ B) ≡ ¬A ∧ ¬B,
which also means that A ∨ B ≡ ¬(¬A ∧ ¬B).14 In fact, ¬ and ∧ are sufficient toexpress every logical function (of propositional logic). Similarly we have
¬(A ∧ B) ≡ ¬A ∨ ¬B.
Example 2.8. Here is a more complicated example which the reader can verifyas an exercise:
The following example shows a distributive law for ∧ and ∨. Such laws willbe discussed more systematically in Chapter 6.
14 Here we have used the convention that ¬ binds stronger than ∧ and ∨, which allow us to write¬(¬A ∧ ¬B) instead of ¬((¬A) ∧ (¬B)).19 Chapter 2. Math. Reasoning, Proofs, and a First Approach to Logic
Lemma 2.1. 1) A ∧ A ≡ A and A ∨ A ≡ A (idempotence); 2) A ∧ B ≡ B ∧ A and A ∨ B ≡ B ∨ A (commutativity); 3) (A ∧ B) ∧ C ≡ A ∧ (B ∧ C) and (A ∨ B) ∨ C ≡ A ∨ (B ∨ C) (associativity); 4) A ∧ (A ∨ B) ≡ A and A ∨ (A ∧ B) ≡ A (absorption); 5) A ∧ (B ∨ C) ≡ (A ∧ B) ∨ (A ∧ C) (distributive law); 6) A ∨ (B ∧ C) ≡ (A ∨ B) ∧ (A ∨ C) (distributive law); 7) ¬¬A ≡ A (double negation); 8) ¬(A ∧ B) ≡ ¬A ∨ ¬B and ¬(A ∨ B) ≡ ¬A ∧ ¬B (de Morgan’s rules).
F |= G,if for all truth assignments to the propositional symbols appearing in F or G,the truth value of G is 1 if the truth value of F is 1. Intuitively, if we would interpret the truth values 0 and 1 as the numbers 0and 1 (which we don’t!), then F |= G would mean F ≤ G.
Example 2.10. A ∧ B |= A ∨ B.
(A ∧ B) ∨ (A ∧ C) |= ¬B → (A ∨ C).
Example 2.12. The following logical consequence, which the reader can proveas an exercise, captures a fact intuitively known to us, namely that implicationis transitive:16 (A → B) ∧ (B → C) |= A → C. We point out (see also Chapter 6) that two formulas F and G are equivalentif and only if each one is a logical consequence of the other, i.e.,17 F ≡G ⇐⇒ F |= G and G |= F.
Example 2.14. The formulas A∨(¬A) and (A∧(A → B)) → B are tautologies. One often wants to make statements of the form that some formula F is atautology. As stated in Definition 2.9, one also says “F is valid” instead of “F isa tautology”.
F ∨ ¬F ≡ ⊤ and F ∧ ¬F ≡ ⊥.
The following lemmas state two simple facts that follow immediately fromthe definitions. We only prove the second one.
Proof. The lemma has two directions which we need to prove. To prove thefirst direction (=⇒), assume that F → G is a tautology. Then, for any truthassignment to the propositional symbols, the truth values of F and G are eitherboth 0, or 0 and 1, or both 1 (but not 1 and 0). In each of the three cases itholds that G is true if F is true, i.e., F |= G. To prove the other direction (⇐=),assume F |= G. This means that for any truth assignment to the propositionalsymbols, the truth values of G is 1 if it is 1 for F . In other words, there is notruth assignment such that the truth value of F is 1 and that of G is 0. Thismeans that the truth value of F → G is always 1, which means that F → G is atautology.
can be implemented as a digital circuit where the operators correspond to the logicalgates. This topic will be discussed in a course on the design of digital circuits21 . The twomain components of digital circuits in computers are such logical circuits and memorycells.
2.4.1 PredicatesLet us consider a non-empty set U as the universe in which we want to reason.For example, U could be the set N of natural numbers, the set R of real numbers,the set {0, 1}∗ of finite-length bit-strings, or a finite set like {0, 1, 2, 3, 4, 5, 6}.Definition 2.11. A k-ary predicate25 P on U is a function U k → {0, 1}.
Similarly, one can naturally define the unary predicates even(x) and odd(x). For any universe U with an order relation ≤ (e.g. U = N or U = R), thebinary (i.e., k = 2) predicate less(x, y) can be defined as 1 if x ≤ y and x 6= y less(x, y) = 0 else. 21 German: Digitaltechnik 22 German: Aussagenlogik 23 German: Quantoren 24 German: Prädikatenlogik 25 German: Prädikat23 Chapter 2. Math. Reasoning, Proofs, and a First Approach to Logic
2.4.2 FunctionsIn predicate logic one can also use functions on U , for example addition andmultiplication. For example, if the universe is U = N, then we can writeless(x + 3, x + 5), which is a true statement for every value x in U .
Definition 2.12. For a universe U and predicate P (x) we define the followinglogical statements:26 ∀x P (x) is the statement: P (x) is true for all x in U . ∃x P (x) is the statement: P (x) is true for some x in U , i.e., there exists an x ∈ U for which P (x) is true.More generally, for a formula F with a variable x, which for each value x ∈ U iseither true or false, the formula ∀x F is true if and only if F is true for all x inU , and the formula ∃x F is true if and only if F is true for some x in U .
The name of the variable x is irrelevant. For example, the formula ∃x (x+5 =3) is equivalent to the formula ∃y (y + 5 = 3). The formula could be stated inwords as: “There exists a natural number (let us call it y) which, if 5 is addedto it, the result is 3.” How the number is called, x or y or z, is irrelevant for thetruth or falsity of the statement. (Of course the statement is false; it would betrue if the universe were the integers Z.) Sometimes one wants to state only that a certain formula containing x istrue for all x that satisfy a certain condition. For example, to state that x2 ≥ 25whenever x ≥ 5, one can write ∀x (x ≥ 5) → (x2 ≥ 25) .A different notation sometimes used to express the same statement is to statethe condition on x directly after the quantifier, followed by “:” ∀x ≥ 5 : (x2 ≥ 25). 26 In the literature one also finds the notations ∀x: P (x) and ∀x. P (x) instead of ∀x P (x), and
similarly for ∃. 27 But note that ∀x (x ≥ 0) is false for the universe U = R.2.4. A First Introduction to Predicate Logic 24
Example 2.18. For the universe of the natural numbers, U = N, the predicateprime(x) can be defined as follows:29
def prime(x) ⇐⇒ x > 1 ∧ ∀y ∀z (yz = x) → ((y = 1) ∨ (z = 1)) .
For sequences of quantifiers of the same type one sometimes omits paren-theses or even multiple copies of the quantifier. For example one writes ∃xyzinstead of ∃x ∃y ∃z.
Example 2.19. Fermat’s last theorem can be stated as follows: For universeN \ {0}, ¬ ∃ x ∃y ∃z ∃n (n ≥ 3 ∧ xn +y n = z n ) .
Example 2.20. The statement “for every natural number there is a larger prime”can be phrased as ∀x ∃y y > x ∧ prime(y)and means that there is no largest prime and hence that there are infinitely manyprimes. If the universe is N, then one often uses m, n, or k instead of x and y. Theabove formula could hence equivalently be written as ∀m ∃n n > m ∧ prime(n) .
Example 2.21. Let U = R. What is the meaning of the following statement, andis it true? ∀x x = 0 ∨ ∃y (xy = 1) 28 German: verschachtelt 29 We use def the symbol “⇐⇒” if the object on the left side is defined as being equivalent to the objecton the right side.25 Chapter 2. Math. Reasoning, Proofs, and a First Approach to Logic
The order of identical quantifiers does not matter, i.e., we have for example:
∃x∃y P (x, y) ≡ ∃y∃x P (x, y) and ∀x∀y P (x, y) ≡ ∀y∀x P (x, y).
∀x P (x) |= ∃x P (x).
It holds because if P (x) is true for all x in the universe, then it is also true forsome (actually an arbitrary) x. (Recall that the universe is non-empty.) Some more involved examples of equivalences and logical consequences arestated in the next section.
since if P (x) is true for all x and also Q(x) is true for all x, then P (x) ∧ Q(x) istrue for all x, and vice versa. Also,31 ∃x P (x) ∧ Q(x) |= ∃x P (x) ∧ ∃x Q(x)
since, no matter what P and Q actually mean, any x that makes P (x)∧Q(x) true(according to the left side) also makes P (x) and Q(x) individually true. But, incontrast, ∃x (P (x) ∧ Q(x)) is not a logical consequence of ∃x P (x) ∧ ∃x Q(x), asthe reader can verify. We can write
We also have: ¬∀x P (x) ≡ ∃x ¬P (x)and ¬∃x P (x) ≡ ∀x ¬P (x).The reader can prove as an exercise that
∃y ∀x P (x, y) |= ∀x ∃y P (x, y)
but that ∀x ∃y P (x, y) 6|= ∃y ∀x P (x, y). 31 We point out that defining logical consequence for predicate logic is quite involved (see Chap-ter 6), but intuitively it should be quite clear.27 Chapter 2. Math. Reasoning, Proofs, and a First Approach to Logic
Example 2.23. For the universe N and the usual interpretation of < and >, theformula ∃n (n < 4 ∧ n > 5) is false and the formula ∀n (n > 0 → (∃m m < n))is true.
Lemma 2.4. For any two formulas F and G, if F |= G, then (2.1) is true.2.6. Some Proof Patterns 28
Proof. F |= G states that for every interpretation, if F is true (for that interpre-tation), then also G is true (for that interpretation). Therefore, if F is true forevery interpretation, then also G is true for every interpretation, which is state-ment (2.1).
Lemma 2.5. (A → B) ∧ (B → C) |= A → C.
Lemma 2.6. ¬B → ¬A |= A → B.
Proof. One can actually prove the stronger statement, namely that ¬B → ¬A ≡A → B, simply by examination of the truth table which is identical for bothformulas ¬B → ¬A and A → B.
√Example 2.24. Prove the following claim: If x > 0 is irrational, √ then also x isirrational. The indirect proof proceeds by assuming that x is not irrational andshowing that then x is also not irrational. Here “not irrational” means rational,i.e., we prove √ x is rational =⇒ x is rational √ √Assume hence that x is rational, i.e., that x = m/n for m, n ∈ N. This meansthat x = m2 /n2 , i.e., x is the quotient of two natural numbers (namely m2 andn2 ) and thus is rational. This completes the proof of the claim.
Lemma 2.7. A ∧ (A → B) |= B.
More informally, one proves for a complete list of cases that the statement Sholds in all the cases. The soundness of this principle is explained by the following lemma ofpropositional logic.
Proof. For a fixed k (say k = 2) one can verify the statement by examinationof the truth table. The statement for general k can be proved by induction (seeSection 2.6.10).
Note that for k = 1 (i.e., there is only one case), case distinction correspondsto the modus ponens discussed above.
Example 2.25. Prove the following statement S: The 4th power of every naturalnumber n, which is not divisible by 5, is one more than a multiple of 5. To prove the statement, let n = 5k + c, where 1 ≤ c ≤ 4. Using the usualbinomial formula (a + b)4 = a4 + 4a3 b + 6a2 b2 + 4ab3 + b4 we obtain:
Each summand is divisible by 5, except for the last term c4 . The statement S ishence equivalent to the statement that c4 is one more than a multiple of 5, for1 ≤ c ≤ 4. This statement S can be proved by case distinction, i.e., by considering allfour choices for c. For c = 1 we have c4 = 1, which is trivially one more than amultiple of 5. For c = 2 we have c4 = 16, which is also one more than a multipleof 5. The same is true for c = 3 where c4 = 81 and for c = 4 where c4 = 256.This concludes the proof. With a few insights from number theory and algebra we will see later thatthe above statement holds when 5 is replaced by any odd prime number.31 Chapter 2. Math. Reasoning, Proofs, and a First Approach to Logic
In many cases, the proof steps appear in a different order: One starts fromassuming that S is false, derives statements from it until one observes that oneof these statements is false (i.e., is the statement T in the above description). Inthis case, the fact that T is false (step 2) is obvious and requires no proof. The soundness of this principle is explained by the following lemma ofpropositional logic which can again be proved by comparing the truth tablesof the involved formulas.
√namely “ 2 is irrational” is the statement that the following formula F is true.35 F = ¬ ∃m ∃n m2 = 2n2 ∧ gcd(m, n) = 1 .
and showing that ¬F implies a false statement T (discussed below). For anyfixed m and n we have m2 = 2n2 =⇒ ∃k m = 2k ∧ m2 = 2n2 =⇒ ∃k m = 2k ∧ 2n2 = 4k 2 =⇒ ∃k m = 2k ∧ n2 = 2k 2 =⇒ ∃k (m = 2k) ∧ ∃ℓ (n = 2ℓ) =⇒ gcd(m, n) ≥ 2 =⇒ m2 = 2n2 ∧ gcd(m, n) ≥ 2,
where the last step captures that m2 = 2n2 trivially follows from m2 = 2n2 andtherefore also the AND of m2 = 2n2 and gcd(m, n) ≥ 2 follows from m2 = 2n2 .Therefore we can replace m2 = 2n2 in (2.2) by m2 = 2n2 ∧ gcd(m, n) ≥ 2, andwe obtain: ¬F ≡ ∃m ∃n m2 = 2n2 ∧ gcd(m, n) ≥ 2 ∧ gcd(m, n) = 1 . | {z } false | {z } def = GReferring to Definition 2.18, the statement T is the statement that G is true(step 1). We note that G (and hence T ) is false since gcd(m, n) ≥ 2 ∧ gcd(m, n) =1 is false (step 2). Of course, ¬F ≡ G also means that ¬F |= G, i.e., that the(false) statement T follows from the assumption that S is false (step 3 in Defini-tion 2.18). This hence concludes the proof by contradiction.
Example 2.27. Prove that there exists a prime36 number n such that n − 10 andn + 10 are also primes, i.e., prove ∃n prime(n) ∧ prime(n − 10) ∧ prime(n + 10) . | {z } Sn
Example 2.28. We prove that there are infinitely many primes by involving anon-constructive existence proof.37 This statement can be rephrased as follows:For every number m there exists a prime p greater than m; as a formula: ∀m ∃p prime(p) ∧ p > m . | {z } Sp
To prove this, consider an arbitrary but fixed number m and consider the state-ments Sp parameterized by p: There exists a prime p greater than m, i.e., suchthat prime(p) ∧ p > m is true. To prove this, we use the known fact (which has been proved) that everynatural number n ≥ 2 has at least one prime divisor. We consider the specificnumber m! + 1 (where m! = 2 · 3 · · · (m − 1) · m). We observe that for all k inthe range 2 ≤ k ≤ m, k does not divide m! + 1. In particular, no prime smallerthan m divides m! + 1. Because m! + 1 has at least one prime divisor, there existsa prime p greater than m which divides m! + 1. Hence there exists a prime pgreater than m.38
Theorem 2.10. If a set of n objects is partitioned into k < n sets, then at least one ofthese sets contains at least ⌈ nk ⌉ objects.41
36 Recall that prime(n) is the predicate that is true if and only if n is a prime number. 37 See also Example 2.20, where different variable names are used. 38 Note that p is not known explicitly, it is only known to exist. In particular, p is generally not
equal to m! + 1. 39 German: Schubfachprinzip 40 This principle is often described as follows: If there are more pigeons than pigeon holes, then
there must be at least one pigeon hole with more than one pigeon in it. Hence the name of theprinciple. 41 In the literature, the pigeon hole principle often states only that there must be a set containing
Proof. The proof is by contradiction. Suppose that all sets in the partition have at most ⌈ nk ⌉ − 1 objects. Then the total number of objects is at most k ⌈ nk ⌉ − 1 ,which is smaller than n because l n m n n k −1 < k +1 −1 = k = n. k k k
Example 2.29. Claim: Among 100 people, there are at least nine who were bornin the same month. The claim can be equivalently stated as an existence claim:Considering any 100 people, there exists a month in which at least nine of themhave their birthday.Proof: Set n = 100 and k = 12, and observe that ⌈100/12⌉ = 9.
Example 2.30. Claim: In any subset A of {1, 2, . . . , 2n} of size |A| = n + 1, thereexist a, b ∈ A such that a | b (a divides b).42For example, in the set {2, 3, 5, 7, 9, 10} we see that 3 | 9.Proof: We write every ai ∈ A as 2ei ui with ui odd. There are only n possiblevalues {1, 3, 5, . . . , 2n − 1} for ui . Thus there must exist two numbers ai and ajwith the same odd part (ui = uj ). Therefore one of them has fewer factors 2than the other and must hence divide it.
Proof by induction: 1. Basis step.43 Prove P (0). 2. Induction step. Prove that for any arbitrary n we have P (n) =⇒ P (n+1). 43 German: Verankerung2.6. Some Proof Patterns 36
Theorem 2.11. For the universe N and an arbitrary unary predicate P we have
44 This theorem is actually one of the Peano axioms used to axiomatize the natural numbers. In
this view, it is an axiom and not a theorem. However, one can also define the natural numbers fromaxiomatic set theory and then prove the Peano axioms as theorems. This topic is beyond the scopeof this course. 45 Note that this proof step is a proof by case distinction.Chapter 3
ing that the two universes are the same.) We use an intuitive understanding thata set can be composed of arbitrary objects. We assume that for every object x and set A it is defined whether x is anelement of A, denoted x ∈ A, or whether it is not an element of A, denoted x ∈ /A(as a short-hand for ¬(x ∈ A)). In other words, x ∈ A is a proposition. 1Example 3.1. If Z denotes the set of integers, then 5 ∈ Z, but 2 / Z. ∈
Definition 3.1. The number of elements of a finite set A is called its cardinalityand is denoted |A|.
{x ∈ A| P (x)}
Example 3.5. The following sets, though quite differently described, describethe same set: 2 Note that we allow that an object is referred to by different names and assume there is a common
understanding of when two names refer to the same object. For example, in the context of numbers,35 7 , 35/7, and 5 would generally be understood as referring to the same object.39 Chapter 3. Sets, Relations, and Functions
d ∈ Z d divides 6 n ∈ Z |n| ≤ 6 ∧ n 6= 0 ∧ |n| ∈ / {4, 5} {−6, −3, −2, −1, 1, 2, 3, 6}
defDefinition 3.2. A = B ⇐⇒ ∀x (x ∈ A ↔ x ∈ B).
Since a set is specified by its elements, we can conclude that if two sets, eachcontaining a single element, are equal, then the elements are equal:
Note that, in contrast, {a, b} = {c, d} neither implies that a = c nor that b = d.
axiomatic treatment of set theory, this definition is adopted as an axiom, called the axiom of exten-sionality.3.1. Sets and Operations on Sets 40
In a set, say {a, b}, there is no order of the elements: {a, b} = {b, a}. Butanother important concept is an (ordered) list of objects. For the operation offorming an ordered pair of two objects a and b, denoted (a, b), we have def (a, b) = (c, d) ⇐⇒ a = c ∧ b = d.
Example 3.8. This example shows that one can model ordered pairs by usingonly (unordered) sets?4 This means that the sets corresponding to two orderedpairs must be equal if and only if the ordered pairs are equal. A first approach is defto define (a, b) = {a, {b}}. However, this definition of an ordered pair fails be-cause one could not distinguish whether the set {{b}, {c}} denotes the orderedpair ({b}, c) or the ordered pair ({c}, b). The reader can verify as an exercise thatthe following definition is correct: def (a, b) = {{a}, {a, b}}.
3.1.5 SubsetsAn important relation between sets is the subset (or inclusion) relation.
Example 3.9. The set Z of integers is a subset of the set Q of rational numbers,which is a subset of the set R of real numbers, which in turn is a subset of theset C of complex numbers. In short: Z ⊆ Q ⊆ R ⊆ C.
A = B ⇐⇒ (A ⊆ B) ∧ (B ⊆ A).
In fact, this is generally the best way to prove that two sets are equal. If A is a proper subset of B, i.e., A ⊆ B and A 6= B, this is typically denotedas A ⊂ B.5 Also, these symbols can be used in both directions (e.g. A ⊆ B isequivalent to B ⊇ A). 4 We briefly address this question, although we will not make use of this later and will continue
to think about ordered pairs and lists in a conventional sense and with conventional notation. 5 The symbol ⊂ is in some contexts also used instead of ⊆, in particular in axiomatic set theory.41 Chapter 3. Sets, Relations, and Functions
A ⊆ B ∧ B ⊆ C =⇒ A ⊆ C.
Definition 3.4. A set is called empty if it contains no elements and is often de-noted as ∅ or {}. In other words, ∀x (x 6∈ ∅).6
Proof. Let ∅ and ∅′ both be arbitrary empty sets. Since both are empty, everyelement that is in ∅ (namely none) is also in ∅′ , and vice versa. This meansaccording to Definition 3.2 that ∅ = ∅′ , which means that there is only oneempty set.
Proof. The proof is by contradiction: Assume that there is a set A for which∅ 6⊆ A. This means that there exists an x for which x ∈ ∅ but x ∈ / A. But suchan x cannot exist because ∅ contains no element, which is a contradiction.The above is a valid proof. Just to illustrate (as an example) that the same proofcould be made more formal and more precise we can write the proof as follows,making use of logical transformation rules for formulas with quantifiers. Let Abe an arbitrary (but fixed) set. The proof is by contradiction (see Definition 2.18),where the statement S to be proved is ∅ ⊆ A and as the statement T we choose¬∀x (x ∈/ ∅), which is false because it is the negation of the definition of ∅. Theproof that the negation of S implies T (step 3 in Definition 2.18) is as follows:
6 We take it for granted that ∅ is actually a set. In an axiomatic treatment of set theory, this mustbe stated as an axiom.3.1. Sets and Operations on Sets 42
One can also define a multiplication operation and prove that these operationssatisfy the usual laws of the natural numbers (commutative, associative, anddistributive laws).
Definition 3.5. The power set of a set A, denoted P(A), is the set of all subsetsof A: def P(A) = {S| S ⊆ A}.
For a finite set with cardinality k, the power set has cardinality 2k (hence thename ‘power set’ and the alternative notation 2A ).Example 3.12. P({a, b, c}) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}} and|P({a, b, c})| = 8.Example 3.13. We have P(∅) = {∅}, P({∅}) = {∅, {∅}}, P({∅, {∅}}) = {∅, {∅}, {{∅}}, {∅, {∅}}}, {1, 7, 9} ∈ P(N).
The above definition can be extended from two to several sets, i.e., to a set(or collection) of sets. Let A be a set of sets, with finite or infinite cardinality.3.1. Sets and Operations on Sets 44
The only restriction on A is that its elements must be sets. Then we define theunion of all sets in A as the set of all x that are an element of at least one of thesets in A: [ def A = {x| x ∈ A for some A ∈ A}.
Similarly, we define the intersection of all sets in A as the set of all x that are anelement of every set in A:
\ def A = {x| x ∈ A for all A ∈ A}.
A = {a, b, c, d}, {a, c, e}, {a, b, c, f }, {a, c, d} .
S TThen we have A = {a, b, c, d, e, f } and A = {a, c}.
Typically, the sets (elements) in a set A of sets are indexed by some indexset I: A = {Ai | i ∈ I}. In this also writes {Ai }i∈I , and for the intersec- T case, one Stion and union one writes i∈I Ai and i∈I Ai , respectively.
Definition 3.8. The difference of sets B and A, denoted B\A is the set of elementsof B without those that are elements of A: def B \ A = {x ∈ B| x ∈ / A}.
Theorem 3.4. For any sets A, B, and C, the following laws hold: Idempotence: A ∩ A = A; A ∪ A = A; Commutativity: A ∩ B = B ∩ A; A ∪ B = B ∪ A; Associativity: A ∩ (B ∩ C) = (A ∩ B) ∩ C; A ∪ (B ∪ C) = (A ∪ B) ∪ C; Absorption: A ∩ (A ∪ B) = A; A ∪ (A ∩ B) = A; Distributivity: A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C); A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C); Consistency: A ⊆ B ⇐⇒ A ∩ B = A ⇐⇒ A ∪ B = B.
Proof. The proof is straight-forward and exploits the related laws for logical op-erations. For example, the two associative laws are implied by the associativityof the logical AND and OR, respectively. The proof is left as an exercise.
Definition 3.9. The Cartesian product A × B of two sets A and B is the set ofall ordered pairs with the first component from A and the second componentfrom B: A × B = (a, b) a ∈ A ∧ b ∈ B .
For finite sets, the cardinality of the Cartesian product of some sets is theproduct of their cardinalities: |A × B| = |A| · |B|.
More generally, the Cartesian product of k sets A1 , . . . , Ak is the set of all listsof length k (also called k-tuples) with the i-th component from Ai :
We point out that the Cartesian product is not associative, and in particular
×3i=1 Ai 6= (A1 × A2 ) × A3 .
ematician, but also politically active as a pacifist. Because of his protests against World War I hewas dismissed from his position at Trinity College in Cambridge and imprisoned for 6 months. In1961, at the age of 89, he was arrested again for his protests against nuclear armament. In 1950 hereceived the Nobel Prize for literature.47 Chapter 3. Sets, Relations, and Functions
3.2 RelationsRelations are a fundamental concept in discrete mathematics and Computer Sci-ence. Many special types of relations, (e.g., equivalence relations, order rela-tions, and lattices) capture concepts naturally arising in applications. Functionsare also a special type of relation.
Definition 3.10. A (binary) relation ρ from a set A to a set B (also called an (A, B)-relation) is a subset of A × B. If A = B, then ρ is called a relation on A.
a ρ b,
def a ≡m b ⇐⇒ a − b = km for some k,
i.e., a ≡m b if and only if a and b have the same remainder when divided by m.(See Section 4.2.)Example 3.20. The relation {(x, y)| x2 + y 2 = 1} on R is the set of points on theunit circle, which is a subset of R × R.Example 3.21. For any set S, the subset relation (⊆) is a relation on P(S).Example 3.22. Two special relations from A to B are the empty relation (i.e., theempty set ∅) and the complete relation A × B consisting of all pairs (a, b).Definition 3.11. For any set A, the identity relation on A, denoted idA (or simplyid), is the relation idA = {(a, a)| a ∈ A}. 2 Relations on a finite set are of special interest. There are 2n different rela-tions on a set of cardinality n. (Why?)3.2. Relations 48
The relation concept can be generalized from binary to k-ary relations forgiven sets A1 , . . . , Ak . A k-ary relation is a subset of A1 × · · ·× Ak . Such relationsplay an important role in modeling relational databases. Here we only considerbinary relations.
def ρ◦σ = (a, c) ∃b ∈ B (a, b) ∈ ρ ∧ (b, c) ∈ σ .
Proof. We use the short notation ρσ instead of ρ ◦ σ. The claim of the lemma,ρ(σφ) = (ρσ)φ, states an equality of sets, which can be proved by proving thateach set is contained in the other (see Section 3.1.5). We prove ρ(σφ) ⊆ (ρσ)φ;the other inclusion is proved analogously. Suppose that (a, d) ∈ ρ(σφ). Weneed to prove that (a, d) ∈ (ρσ)φ. For illustrative purposes, We provide twoformulations of this proof, first as a text and then in logical formulas. Because (a, d) ∈ ρ(σφ), there exists b such that (a, b) ∈ ρ and (b, d) ∈ σφ.The latter implies that there exists c such that (b, c) ∈ σ and (c, d) ∈ φ. Now,(a, b) ∈ ρ and (b, c) ∈ σ imply that (a, c) ∈ ρσ, which together with (c, d) ∈ φimplies (a, d) ∈ (ρσ)φ. Now comes the more formal version of the same proof, where the justifica-tion for each step is omitted but should be obvious: (a, d) ∈ ρ(σφ) =⇒ ∃b (a, b) ∈ ρ ∧ (b, d) ∈ σφ =⇒ ∃b (a, b) ∈ ρ ∧ ∃c (b, c) ∈ σ ∧ (c, d) ∈ φ =⇒ ∃b∃c (a, b) ∈ ρ ∧ (b, c) ∈ σ ∧ (c, d) ∈ φ =⇒ ∃b∃c (a, b) ∈ ρ ∧ (b, c) ∈ σ ∧ (c, d) ∈ φ =⇒ ∃c∃b (a, b) ∈ ρ ∧ (b, c) ∈ σ ∧ (c, d) ∈ φ =⇒ ∃c ∃b (a, b) ∈ ρ ∧ (b, c) ∈ σ ∧ (c, d) ∈ φ =⇒ ∃c (a, c) ∈ ρσ ∧ (c, d) ∈ φ =⇒ (a, d) ∈ (ρσ)φ.
Example 3.30. Consider the ownership relation π and the parenthood relation φas above. Then the relation φπ from H to O can be interpreted as follows: a φπ bif and only if person a has a child who owns object b.
Example 3.31. If φ is the parenthood relation on the set H of humans, then therelation φ2 is the grand-parenthood relation.12
Lemma 3.6. Let ρ be a relation from A to B and let σ be a relation from B to C. Thenthe inverse ρc b ρb. σ of ρσ is the relation σ
Example 3.32. The relations ≤, ≥, and | (divides) on Z \ {0} are reflexive, butthe relations < and > are not.
ρ = ρb.
Example 3.34. The “married to” relation on the set H of humans is symmetric.
14 Note that irreflexive is not the negation of reflexive, i.e., a relation that is not reflexive is notnecessarily irreflexive.3.2. Relations 52
ρ ∩ ρb ⊆ id.
Example 3.35. The relations ≤ and ≥ are antisymmetric, and so is the divisionrelation | on N: If a | b and b | a, then a = b. But note that the division relation| on Z is not antisymmetric. Why?
(a ρ b ∧ b ρ c) =⇒ a ρ c
Example 3.37. Let ρ be the ancestor relation on the set H of humans, i.e., a ρ b ifa is an ancestor of b. This relation is transitive.
Proof. The “if” part of the theorem (⇐=) follows from the definition of compo-sition: If a ρ b and b ρ c, then a ρ2 c. Therefore also a ρ c since ρ2 ⊆ ρ.15 Thismeans transitivity.Proof of the “only if” part (=⇒): Assume that ρ is transitive. To show that ρ2 ⊆ ρ,assume that a ρ2 b for some a and b. We must prove that a ρ b. The definitionof a ρ2 b states that there exists c such that a ρ c and c ρ b. Transitivity of ρthus implies that a ρ b, which concludes the proof.
Definition 3.21. For an equivalence relation θ on a set A and for a ∈ A, the setof elements of A that are equivalent to a is called the equivalence class of a and isdenoted as [a]θ :17 def [a]θ = {b ∈ A| b θ a}.
Example 3.40. The equivalence classes of the relation ≡3 are the sets
Example 3.41. Consider the set R2 of points (x, y) in the plane, and consider therelation ρ defined by (x, y) ρ (x′ , y ′ ) ⇐⇒ x + y = x′ + y ′ . Clearly, this relation isreflexive, symmetric, and transitive. The equivalence classes are the set of linesin the plane parallel to the diagonal of the second quadrant.
Consider any partition of a set A and define the relation ≡ such that twoelements are ≡-related if and only if they are in the same set of the partition. Itis easy to see that this relation is an equivalence relation. The following theoremstates that the converse also holds. In other words, partitions and equivalencerelations capture the same (simple) abstraction.
Proof. Since a ∈ [a] for all a ∈ A (reflexivity of θ), the union of all equivalenceclasses is equal to A. It remains to prove that equivalence classes are disjoint.This is proved by proving, for any fixed a and b, that
a θ b =⇒ [a] = [b]55 Chapter 3. Sets, Relations, and Functions
and a 6 θ b =⇒ [a] ∩ [b] = ∅.To prove the first statement we consider an arbitrary c ∈ [a] and observe that
Note that c ∈ [a] =⇒ c ∈ [b] (for all c ∈ A) is the definition of [a] ⊆ [b]. The state-ment [b] ⊆ [a] is proved analogously but additionally requires the application ofsymmetry. (This is an exercise.) Together this implies [a] = [b]. The second statement is proved by contradiction. Suppose it is false19 , i.e.,a 6 θ b and [a] ∩ [b] 6= ∅, i.e., there exists some c ∈ [a] ∩ [b], which means that c θ aand c θ b. By symmetry we have a θ c and thus, by transitivity, we have a θ b,a contradiction. (As an exercise, the reader can write this proof as a sequence ofimplications.)
For a partial order relation we can define the relation a ≺ b similar to howthe relation < is obtained from ≤: def a ≺ b ⇐⇒ a b ∧ a 6= b.
Definition 3.25. For a poset (A; ), two elements a and b are called comparable22if a b or b a; otherwise they are called incomparable.
Definition 3.26. If any two elements of a poset (A; ) are comparable, then A iscalled totally ordered (or linearly ordered) by .
Example 3.47. (Z; ≤) and (Z; ≥) are totally ordered posets (or simply totallyordered sets), and so is any subset of Z with respect to ≤ or ≥. For instance,({2, 5, 7, 10}; ≤) is a totally ordered set. 21 Partial orders are often denoted by ≤ or by a similar symbol like or ⊑. 22 German: vergleichbar57 Chapter 3. Sets, Relations, and Functions
Example 3.48. The poset (P(A); ⊆) is not totally ordered if |A| ≥ 2, nor is theposet (N; |).
Definition 3.28. The Hasse diagram of a (finite) poset (A; ) is the directed graphwhose vertices are labeled with the elements of A and where there is an edgefrom a to b if and only if b covers a.
The Hasse diagram is a graph with directed edges. It is usually drawn suchthat whenever a ≺ b, then b is placed higher than a. This means that all arrowsare directed upwards and therefore can be omitted.Example 3.50. The Hasse diagram of the poset ({2, 3, 4, 5, 6, 7, 8, 9}; |) is shownin Figure 3.1 on the left.Example 3.51. A nicer diagram is obtained when A is the set of all divisors ofan integer n. The Hasse diagram of the poset ({1, 2, 3, 4, 6, 8, 12, 24}; |) is shownin Figure 3.1 in the middle. {a,b,c} 24
8 12 8 {a,c} {a,b} {b,c}
6 9 4 6 4 {a} {b} {c}
2 3
2 3 5 7 1 {}
Figure 3.1: The Hasse diagrams of the posets ({2, 3, 4, 5, 6, 7, 8, 9}; |), ({1, 2, 3, 4, 6, 8, 12, 24}; |), and (P({a, b, c}); ⊆).
Example 3.52. The Hasse diagram of the poset (P({a, b, c}); ⊆) is shown in Fig-ure 3.1 on the right. 23 German: überdecken3.4. Partial Order Relations 58
Example 3.53. For the two Hasse diagrams in Figure 3.2, give a realization asthe divisibility poset of a set of integers.
Example 3.54. Consider the covering24 relation on the convex polygons dis-cussed in Example 3.38. A polygon a is covered by a polygon b if b can beplaced on top of a such that a disappears completely. Are there sets of six poly-gons resulting in a poset with the left (or right) Hasse diagram in Figure 3.2?
The proof is left as an exercise. The reader can verify that when replacing ∧by ∨, the resulting relation is in general not a partial order relation. A more interesting order relation on A × B is defined in the following theo-rem, whose proof is left as an exercise.Theorem 3.11. For given posets (A; ) and (B; ⊑), the relation ≤lex defined on A×Bby def (a1 , b1 ) ≤lex (a2 , b2 ) ⇐⇒ a1 ≺ a2 ∨ (a1 = a2 ∧ b1 ⊑ b2 ) 25is a partial order relation.
The relation ≤lex is the well-known lexicographic order of pairs, usually con-sidered when both posets are identical. The lexicographic order ≤lex is usefulbecause if both (A; ) and (B; ⊑) are totally ordered (e.g. the alphabetical orderof the letters), then so is the lexicographic order on A × B (prove this!). 24 The term “cover” is used here in a physical sense, not in the sense of Definition 3.27. 25 Recall def that for a partial order we can define the relation ≺ as a ≺ b ⇐⇒ a b ∧ a 6= b.59 Chapter 3. Sets, Relations, and Functions
The lexicographic order can easily be generalized to the k-tuples over somealphabet Σ (denoted Σk ) and more generally to the set Σ∗ of finite-length stringsover Σ. The fact that a total order on the alphabet results in a total order on Σ∗is well-known: The telephone book has a total order on all entries.
Definition 3.29. Let (A; ) be a poset, and let S ⊆ A be some subset of A. Then 1. a ∈ A is a minimal (maximal) element of A if there exists no b ∈ A with b ≺ a (b ≻ a).26 2. a ∈ A is the least (greatest) element of A if a b (a b) for all b ∈ A.27 3. a ∈ A is a lower (upper) bound28 of S if a b (a b) for all b ∈ S.29 4. a ∈ A is the greatest lower bound (least upper bound) of S if a is the greatest (least) element of the set of all lower (upper) bounds of S.30
bound can be outside of the considered subset S (and therefore need not be unique). 30 Note that for a poset (A; ) and a subset S ⊆ A, restricting to S results in a poset (S; ).3.5. Functions 60
Example 3.58. In the poset (Z+ ; |), 1 is a least element but there is no greatestelement.
Note that every totally ordered finite poset is well-ordered. The property ofbeing well-ordered is of interest only for infinite posets. The natural numbers Nare well-ordered by ≤. Any subset of the natural numbers is also well-ordered.More generally, any subset of a well-ordered set is well-ordered (by the sameorder relation).
Definition 3.31. Let (A; ) be a poset. If a and b (i.e., the set {a, b} ⊆ A) have agreatest lower bound, then it is called the meet of a and b, often denoted a ∧ b.If a and b have a least upper bound, then it is called the join of a and b, oftendenoted a ∨ b.
Definition 3.32. A poset (A; ) in which every pair of elements has a meet anda join is called a lattice33 .
Example 3.59. The posets (N; ≤), (N \ {0}; | ), and (P(S); ⊆) are lattices, as thereader can verify.Example 3.60. The poset ({1, 2, 3, 4, 6, 8, 12, 24}; |) shown in Figure 3.1 is a lat-tice. The meet of two elements is their greatest common divisor, and their joinis the least common multiple. For example, 6 ∧ 8 = 2, 6 ∨ 8 = 24, 3 ∧ 4 = 1, and3 ∨ 4 = 12. In contrast, the poset ({2, 3, 4, 5, 6, 7, 8, 9}; |) is not a lattice.
3.5 Functions3.5.1 The Function ConceptThe concept of a function is perhaps the second most fundamental concept inmathematics (after the concept of a set). We discuss functions only now, afterhaving introduced relations, because functions are a special type of relation, andseveral concepts defined for relations (e.g. inversion and composition) apply tofunctions as well. 31 German: wohlgeordnet 32 Theleast element is defined naturally (see Definition 3.29). 33 German: Verband61 Chapter 3. Sets, Relations, and Functions
f : a 7→ “expression in a”
One can generalize the function concept by dropping the first condition (to-tally defined), i.e., allowing that there can exist elements a ∈ A for which f (a) isnot defined.
Definition 3.37. The subset f (A) of B is called the image (or range) of f and isalso denoted Im(f ).
functions. 37 German: Bild3.5. Functions 62
def f −1 (T ) = {a ∈ A| f (a) ∈ T }.
Example 3.62. Consider again the function f (x) = x2 . The preimage of theinterval [4, 9] is [−3, −2] ∪ [2, 3].
Definition 3.40. For a bijective function f , the inverse (as a relation, see Defini-tion 3.12) is called the inverse function39 of f , usually denoted as f −1 .
Example 3.63. Consider again the function f (x) = x3 + 3 and g(x) = 2x2 + x.Then g ◦ f (x) = 2(f (x))2 + f (x) = 2x6 + 13x3 + 21.
Proof. This is a direct consequence of the fact that relation composition is asso-ciative (see Lemma 3.5). 38 German: Urbild 39 Itis easy to see that this is a function 40 Note that the composition of functions is the same as the composition of relations. However,
unfortunately, different notation is used: The composition of relations f and g is denoted f ◦g while,if considered as functions, the same resulting composition is denoted as g ◦ f . (The reason is thatone thinks of functions as mapping “from right to left”.) Because of this ambiguity one must makeexplicit whether the symbol ◦ refers to function or relation composition.63 Chapter 3. Sets, Relations, and Functions
Definition 3.42. (i) Two sets A and B equinumerous,41 denoted A ∼ B, if there exists a bijection A → B. (ii) The set B dominates the set A, denoted A B, if A ∼ C for some subset C ⊆ B or, equivalently, if there exists an injective function A → B. (iii) A set A is called countable42 if A N, and uncountable43 otherwise.44
Lemma 3.13. (i) The relation is transitive: A B ∧ B C =⇒ A C. (ii) A ⊆ B =⇒ A B.
Proof. Proof of (i). If there is an injection from A to B and also an injection fromB to C, then their composition is an injection from A to C.Proof of (ii). If A ⊆ B, then the identity function on A is an injection from Ato B.
Proof. A statement of the form “if and only if” has two directions. To prove thedirection ⇐=, note that if A is finite, then it is countable, and also if A ∼ N, thenA is countable.To prove the other direction (=⇒), we prove that if A is countable and infinite,then A ∼ N. According to the definition, A N means that there is a bijectionf : A → C for a set C ⊆ N. For any infinite subset of N, say C, one can define abijection g : C → N as follows. According to the well-ordering principle, thereexists a least element of C, say c0 . Define g(c0 ) = 0. Define C1 = C \ {c0 }.Again, according to the well-ordering principle, there exists a least element ofC1 , say c1 . Define g(c1 ) = 1. This process can be continued, defining inductivelya bijection g : C → N. Now g ◦ f is a bijection A → N, which proves A ∼ N.
defTheorem 3.16. The set {0, 1}∗ = {ǫ, 0, 1, 00, 01, 10, 11, 000, 001, . . .} of finite binarysequences is countable.45
Proof. We could give an enumeration of the set {0, 1}∗, i.e., a bijection be-tween {0, 1}∗ and N, but to prove the theorem it suffices to provide an injection{0, 1}∗ → N, which we define as follows. We put a “1” at the beginning of thestring and then interpret it as an integer using the usual binary representationof the natural numbers. For example, the string 0010 is mapped to the integer18.46
Theorem 3.17. The set N×N (= N2 ) of ordered pairs of natural numbers is countable.
m = n − 2t , where t > 0 is the smallest integer such that t+1 2 > n. This cor-responds to the enumeration of the pairs (k, m) along diagonals with constantsum k + m. More concretely, we enumerate the pairs as follows: (0, 0), (1, 0),(0, 1), (2, 0), (1, 1), (0, 2), (3, 0), (2, 1), (1, 2), (0, 3), (4, 0), (3, 1), · · ·. It is easy tosee that this is a bijection N → N2 , hence N2 is countable.
Corollary 3.18. The Cartesian product A × B of two countable sets A and B is count-able, i.e., A N ∧ B N =⇒ A × B N.
Proof. Every rational number can be represented uniquely as a pair (m, n) wherem ∈ Z, n ∈ N \ {0}, and where m and n are relatively prime. Hence Q Z × N.According to Example 3.64, Z is countable, i.e., Z N. Thus, according toCorollary 3.18, Z × N N. Hence, using transitivity of , we have Q N (i.e.,Q is countable).
The next theorem provides some other important sets that are countable.
Proof. Statement (i) can be proved by induction. The (trivial) induction basis isthat A1 = A is countable. The induction step shows that if An is countable, thenalso An+1 = An × A is countable. This follows from Corollary 3.18 because bothAn and A are countable. We omit the proof of (ii).3.6. Countable and Uncountable Sets 66
We now prove (iii), which implies (i), and hence gives an alternative prooffor (i). We define an injection A∗ → {0, 1}∗. This is achieved by using an ar-bitrary injection f : A → {0, 1}∗ and defining the natural injection g : A∗ →({0, 1}∗)∗ as follows: For a sequence of length n in A∗ , say (a1 , . . . , an ), we let g(a1 , . . . , an ) = (f (a1 , . . . , f (an )),i.e., each element in the sequence is mapped separately using f . Now it onlyremains to demonstrate an injection ({0, 1}∗)∗ → {0, 1}∗, which can be achievedas follows.47 We replace every 0-bit in a sequence by 00 and every 1-bit by 01,which defines a (length-doubling) injection {0, 1}∗ → {0, 1}∗ . Then we con-catenate all obtained expanded sequences, always separated by 11. This is aninjection because the separator symbols 11 can be detected and removed andthe extra 0’s can also be removed. Hence a given sequence can be uniquely de-composed into the component sequences, and hence no two sequences of binary(component) sequences can result in the same concatenated sequence.Example 3.66. We illustrate the above injection ({0, 1}∗)∗ → {0, 1}8 by an ex-ample. Consider the sequence (0100, 10111, 01, 1) of bit-sequences. Now 0100is mapped to 00010000, 10111 is mapped to 0100010101, etc. and the final con-catenated sequence is 000100001101000101011100011101, which can uniquely bedecomposed into the original four sequences.
sequences can not uniquely be decomposed into the original sequences, i.e., this is not an injection. 48 Here we make use of Theorem 3.15 which implies that {0, 1}∞ is countable if and only if such
a bijection exists.67 Chapter 3. Sets, Relations, and Functions
Let b be the complement of a bit b ∈ {0, 1}. We define a new semi-infinite binarysequence α as follows: def α = β0,0 , β1,1 , β2,2 , β3,3 , . . . .
In fact, essentially all such functions are uncomputable. Those that are com-putable are rare exceptions. For example, the function prime : N → {0, 1}(where prime(n) = 1 if and only if n is prime) is computable. Is there a specific uncomputable function? A prominent example is the so-called Halting problem defined as follows: Given as input a program (encoded asa natural number) together with an input (to the program), determine whether 49 A subtlety, which is not a problem in the proof, is that some real numbers have two representa-tions as bit-strings. For example, the number 0.5 has representations 10000000 · · · and 0111111 · · ·.3.6. Countable and Uncountable Sets 68
the program will eventually stop (function value 1) or loop forever (functionvalue 0). This function is uncomputable. This is usually stated as: The Haltingproblem is undecidable. This theorem can also be proved by a diagonalization argument similar tothe one above. The theorem has far-reaching consequences in theoretical andpractical Computer Science. It implies, for example, that it is impossible to writea program that can verify (in the most general case) whether a given programsatisfies its specification, or whether a given program contains malicious parts.Chapter 4
Number Theory
4.1 IntroductionNumber theory is one of the most intriguing branches of mathematics. For along time, number theory was considered one of the purest areas of mathemat-ics, in the sense of being most remote from having applications. However, sincethe 1970’s number theory has turned out to have intriguing and unexpectedapplications, primarily in cryptography. In this course we discuss only some basic number-theoretic topics that haveapplications in Computer Science. In addition to the rich applications, a sec-ond reason for discussing the basics of number theory in a course in ComputerScience is as a preparation for the chapter on algebra (Chapter 5).
Example 4.3. The recent proof of the Catalan conjecture by Preda Mihailescu,who worked at ETH Zürich, is another break-through in number theory. Thistheorem states that the equation am − bn = 1 has no other integer solutions but32 − 23 = 1 (for m, n ≥ 2).
Theorem 4.1 (Euclid). For all integers a and d 6= 0 there exist unique integers q andr satisfying a = dq + r and 0 ≤ r < |d|.
Here a is called the dividend, d is called the divisor, q is called the quotient, andr is called the remainder. The remainder r is often denoted as Rd (a) or sometimesas a mod d.
Proof. We carry out this proof in a detailed manner, also to serve as an exampleof a systematic proof. We define S to be the set of possible nonnegative remainders: def S = {s| s ≥ 0 and a = dt + s for some t ∈ Z}.
We prove the following three claims by first proving 1), then proving that 1)implies 2), and then proving that 2) implies 3).
1) S is not empty. 2) S contains an r < |d|. 3) The r of claim 2) is unique. 2 German: Teiler 3 German: Vielfaches 4 One can prove that it is unique. 5 German: Rest4.2. Divisors and Division 72
Proof of 1): We use case distinction and prove the statement for three cases (oneof which is always satisfied):Case 1: a ≥ 0. Then a = d0 + a and hence a ∈ S.Case 2: a < 0 and d > 0. Then a = da + (1 − d)a and thus (1 − d)a ∈ S since(1 − d)a ≥ 0 because both (1 − d) and a are ≤ 0.Case 3: a < 0 and d < 0. Then a = d(−a) + (1 + d)a and thus (1 + d)a ∈ S since(1 + d)a ≥ 0 because both (1 + d) and a are ≤ 0. Proof that 1) implies 2): Because S is not empty, it has a smallest element(due to the well-ordering principle), which we denote by r. We now prove thatr < |d|, by contradiction, i.e., assuming r ≥ |d|. By definition of S we havea = dq + r for some q. We make a case distinction: d > 0 and d < 0. If d > 0,then a = d(q + 1) + (r − |d|),hence r − |d| ≥ 0 and therefore r − |d| ∈ S, which means that r is not the smallestelement of S, a contradiction. If d < 0, then a = d(q − 1) + (r − |d|), and the sameargument as above shows that r − |d| ∈ S, a contradiction. Proof that 2) implies 3): It remains to prove that r is unique. We give a proofonly for d > 0; the case d < 0 is analogous and is left as an exercise. The proofis by contradiction. Suppose that there also exist r′ 6= r with 0 ≤ r′ < |d| andsuch that a = dq ′ + r′ for some q ′ . We distinguish the three cases q ′ = q, q ′ < q,and q ′ > q. If q ′ = q, then r′ = a − dq ′ = a − dq = r, a contradiction since weassumed r′ 6= r. If q ′ < q, then q − q ′ ≥ 1, so r′ = a − dq ′ = (a − dq) + d(q − q ′ ) ≥ r + d.Since r′ ≥ r + d ≥ d, the condition 0 ≤ r′ < |d| is violated, which is a contra-diction. A symmetric argument shows that q ′ > q also results in a contradic-tion,
Definition 4.2. For integers a and b (not both 0), an integer d is called a greatestcommon divisor6 of a and b if d divides both a and b and if every common divisorof a and b divides d, i.e., if d | a ∧ d | b ∧ ∀c (c | a ∧ c | b) → c | d .
The concept of a greatest common divisor applies not only to Z, but to moregeneral structures (e.g. polynomial rings). If d and d′ are both greatest commondivisors of a and b, then d | d′ and d′ | d. For the integers Z, this means thatd′ = ±d, i.e., there are two greatest common divisors. (But for more generalstructures there can be more than two greatest common divisors.) 6 Note that the term “greatest” does not refer to the order relation ≤ but to the divisibility relation.73 Chapter 4. Number Theory
Definition 4.3. For a, b ∈ Z (not both 0) one denotes the unique positive greatestcommon divisor by gcd(a, b) and usually calls it the greatest common divisor. Ifgcd(a, b) = 1, then a and b are called relatively prime7 .
Proof. It is easy to prove (as an exercise) that every common divisor of m andn − qm (and therefore also the greatest) is also a common divisor of m and n,and vice versa.
which is the basis for Euclid’s well-known gcd-algorithm: Start with m < n andrepeatedly replace the pair (m, n) by the pair (Rn (m), m) until the remainderis 0, at which point the last non-zero number is equal to gcd(m, n).
Definition 4.4. For a, b ∈ Z, the ideal generated by a and b8 , denoted (a, b), is theset (a, b) := {ua + vb | u, v ∈ Z}.Similarly, the ideal generated by a single integer a is
Proof. Obviously, (a, b) contains some positive numbers, so (by the well-ordering principle) let d be the smallest positive element in (a, b). Clearly(d) ⊆ (a, b) since every multiple of d is also in (a, b). It remains to prove(a, b) ⊆ (d). For any c ∈ (a, b) there exist q and r with 0 ≤ r < d such thatc = qd + r. Since both c and d are in (a, b), so is r = c − qd. Since 0 ≤ r < d andd is (by assumption) the smallest positive element in (a, b), we must have r = 0.Thus c = qd ∈ (d).
Lemma 4.4. Let a, b ∈ Z (not both 0). If (a, b) = (d), then d is a greatest commondivisor of a and b. 7 German: teilerfremd 8 German: durch a und b erzeugtes Ideal4.3. Factorization into Primes 74
Proof. d is a common divisor of a and b since a ∈ (d) and b ∈ (d). To show that dis a greatest common divisor, i.e., that every common divisor c of a and b dividesd, note that c divides every integer of the form ua + vb, in particular d.
This notion of having only trivial divisors extends to other rings, for examplethe ring of polynomials over R. In such a general context, the property is calledirreducible rather than prime. The term prime is in general used for the propertythat if p divides a product of elements, then it divides at least one of them (seeLemma 4.7 below). For the integers, these two concepts are equivalent. The nextlemma states one direction of this equivalence. The following theorem is called the fundamental theorem of arithmetic.
Theorem 4.6. Every positive integer can be written uniquely (up to the order in whichfactors are listed) as the product of primes.11
Proof. The proof is by induction on n. The claim is trivially true for n = 1 (inductionbasis). Suppose it is true for some general n (induction hypothesis). To prove the claimfor n + 1 (induction step), suppose that p | x1 · · · xn+1 . We let y := x1 · · · xn (and hencep | yxn+1 ) and look at the two cases p | y and p6 | y separately. If p | y, then p | xi forsome 1 ≤ i ≤ n, due to the induction hypothesis, and we are done. If p6 | y, then, since phas no positive divisor except 1 and p, we have gcd(p, y) = 1. By Corollary 4.5 there areintegers u and v such that up + vy = 1. Hence we have
Because p divides both terms (uxn+1 )p and v(yxn+1 ) in the sum on the right side, itfollows that it also divides the sum, i.e., p | xn+1 , which concludes the proof.
Proof. We first need to prove that a factorization into primes exists and then that it isunique. The existence is proved by contradiction. Every prime can obviously be factored intoprimes. Let n be the smallest positive integer which has no prime factorization. Sinceit can not be a prime, we have n = km with 1 < k, m < n. Since both k and m can befactored into primes, so can km = n, a contradiction. Hence there is no smallest n thatcannot be factored into primes, and therefore every n ≥ 1 can be factored into primes. To prove the uniqueness of the prime factorization, suppose towards a contradictionthat an integer n can be factored in two (possibly different) ways as a product of primes,
where the primes p1 , . . . , pr and also the primes q1 , . . . , qs are put in an increasing orderand where we have written products of identical primes as powers (here ai > 0 and 11 Note that 1 has zero prime factors, which is allowed.4.3. Factorization into Primes 76
bi > 0). Then for every i, pi | n and thus pi | q1b1 q2b2 · · · qsbs . Hence, by Lemma 4.7,pi | qj for some j and, because qj is a prime and pi > 1, we have pi = qj . Similarly forevery j, qj = pi for some i. Thus the set of primes are identical, i.e., r = s and pi = qifor 1 ≤ i ≤ r. To show that the corresponding exponents ai and bi are also identical,suppose that ai < bi for some i. We can divide both expressions by pai i , which resultsin two numbers that are equal, yet one is divisible by pi while the other is not. This isimpossible since if two numbers are equal, then they have the same divisors.
Example 4.6. Consider now a slightly twisted version of the Gaussian integers: √ √ Z[ −5] = {a + b 5i | a, b ∈ Z}.
Like the Gaussian integers, this set is closed with respect to addition and multiplication(of complex numbers). For example, √ √ √ (a + b 5i)(c + d 5i) = ac − 5bd + (bc + ad) 5i. √The only units in Z[ −5] are 1 and −1. One can check√easily, by ruling √ out all possibledivisors with smaller norm, that the elements 2, 3, 1 + 5i, and 1 − 5i are irreducible.The element 6 can be factored in two different ways into irreducible elements: √ √ 6 = 2 · 3 = (1 + 5i)(1 − 5i).
Note that this proof is simpler and more general than the proof given in Example 2.26because there we have not made use of the unique prime factorization of the integers.
approximating the minor third, major third, fourth, and fifth astonishingly well. One can view these relations also as integer approximations. For example, we have531′ 441 = 312 ≈ 219 = 524′ 288, which implies that ( 32 )12 ≈ 27 , i.e., 12 fifths are approxi-mately seven octaves. √ A piano for which every half-tone has the same frequency ratio, namely 12 2, is calleda well-tempered15 piano. The reason why music is a pleasure, despite its theoreticallyunavoidable inaccuracy, is that our ear is trained to “round tones up or down” as needed.
Proof. To arrive at a contradiction, suppose Q that the set of primes is finite, say P ={p1 , . . . , pm }. Then the number n = m i=1 p i + 1 is not divisible by any of the primesp1 , . . . , pm and hence n is either itself a prime, or divisible by a prime not in {p1 , . . . , pm }.In either case, this contradicts the assumption that p1 , . . . , pm are the only primes.
Theorem 4.10. Gaps between primes can be arbitrarily large, i.e., for every k ∈ N there existsn ∈ N such that the set {n, n + 1, · · · , n + k − 1} contains no prime.
Example 4.7. The largest gap between two primes below 100 is 8. Which are theseprimes?
There exists a huge body of literature on the density and distribution of primes. Weonly state the most important one of them.
Definition 4.7. The prime counting function π : R → N is defined as follows: For any realx, π(x) is the number of primes ≤ x.
15 German: wohltemperiert79 Chapter 4. Number Theory
The following theorem proved by Hadamard and de la Vallée Poussin in the 19thcentury states that the density of primes ≤ x is approximately 1/ ln(x). This shows thatif one tries to find a large (say 1024 bit) prime, for instance for cryptographic purposes,then a randomly selected odd integer has reasonable chances of being prime. Much moreprecise estimates for π(x) are known today. π(x) ln(x)Theorem 4.11. lim = 1. x→∞ x Two of the main open conjectures on prime numbers are the following:Conjecture 4.1. There exist infinitely many twin primes, i.e., primes p for which alsop + 2 is prime.Conjecture 4.2 (Goldbach). Every even number greater than 2 is the sum of two primes.
Proof. If n is composite, it has a divisor a with 1 < a < n. Hence n = ab for b > 1. Either √ √ √ √a ≤ n√ or b ≤ n since otherwise ab > n · n = n. Hence n has a divisor √ c with1 < c ≤ n. Either c is prime or, by Theorem 4.6, has a prime divisor d < c ≤ n.
For large integers, trial-division up to the square root is hopelessly inefficient. Let usbriefly discuss the algorithmic problem of testing primality. Primes are of great importance in cryptography. In many applications, one needs togenerate very large primes, with 1024 or even 2048 bits. In many cases, the primes mustremain secret and it must be infeasible to guess them. They should therefore be selecteduniformly at random from the set of primes in a certain interval, possibly satisfying somefurther restrictions for security or operational reasons. Such primes can be generated in three different ways. The first approach is to selecta random (odd) integer from the given interval (e.g. [101023 , 101024 − 1]) and to applya general primality test. Primality testing is a very active research area. The recordin general primality testing is around 8.000 decimal digits and required sophisticatedtechniques and very massive computing power. As a celebrated theoretical breakthrough(with probably little practical relevance), it was proved in 2002 that primality testing isin P, i.e., there is a worst-case polynomial-time algorithm for deciding primality of aninteger.16 The second approach is like the first, but instead of a primality test one performs aprobabilistic compositeness test. Such a test has two outcomes, “composite” and “pos-sibly prime”. In the first case, one is certain that the number is composite, while in the 16 M. Agrawal, N. Kayal, and N. Saxena, PRIMES is in P, Annals of Mathematics vol. 160, pp. 781–793.4.5. Congruences and Modular Arithmetic 80
other case one has good chances that the number is a prime, without being certain. Moreprecisely, one can fix a (very small) probability ǫ (e.g. ǫ = 10−100 ) and then performa test such that for any composite integer, the probability that the test does not output“composite” is bounded by ǫ. A third approach is to construct a prime together with a proof of primality. As wemight see later, the primality of an integer n can be proved if one knows part of thefactorization of n − 1.
def a ≡m b ⇐⇒ m | (a − b).
Example 4.10. We have 23 ≡7 44 and 54321 ≡10 1. Note that a ≡2 b means thata and b are either both even or both odd.Example 4.11. If a ≡2 b and a ≡3 b, then a ≡6 b. The general principle underly-ing this example will be discussed later.
The above examples 4.8 and 4.9 make use of the fact that if an equality holdsover the integers, then it must also hold modulo 2 or, more generally, moduloany modulus m. In other words, for any a and b,
a = b =⇒ a ≡m b (4.1)81 Chapter 4. Number Theory
for all m, i.e., the relation ≡m is reflexive (a ≡m a for all a). It is easy to verifythat this relation is also symmetric and transitive, which was already stated inChapter 3:
The implication (4.1) can be turned around and can be used to prove theinequality of two numbers a and b:
a 6≡m b =⇒ a 6= b.
The following lemma shows that modular congruences are compatible withthe arithmetic operations on Z.
a + c ≡m b + d and ac ≡m bd.
Proof. We only prove the first statement and leave the other proof as an exercise.We have m | (a − b) and m | (c − d). Hence m also divides (a − b) + (c − d) =(a + c) − (b + d), which is the definition of a + c ≡m b + d.
f (a1 , . . . , ak ) ≡m f (b1 , . . . , bk ).
Example 4.12. Is n = 84877 · 79683 − 28674 · 43879 even or odd? The answeris trivial and does not require the computation of n. The product of two oddnumbers is odd, the product of an even and an odd numbers is even, and thedifference of an odd and an even number is odd. Thus n is odd.
(i) a ≡m Rm (a). (ii) a ≡m b ⇐⇒ Rm (a) = Rm (b).
The above lemma together with Lemma 4.14 implies that if in a computationinvolving addition and multiplication one is interested only in the remainder ofthe result modulo m, then one can compute remainders modulo m at any in-termediate step (thus keeping the numbers small), without changing the result.This is referred to as modular arithmetic.
Proof. By Lemma 4.16 (i) we have ai ≡m Rm (ai ) for all i. Therefore, usingCorollary 4.15 we have f (a1 , . . . , ak ) ≡m f (Rm (a1 ), . . . , Rm (ak )). Thus, usingLemma 4.16 (ii) we obtain the statement to be proved.
Example 4.13. Compute 7100 modulo 24. We make use of the fact that 72 =49 ≡24 1. Thus R24 (7100 ) = R24 ((72 )50 ) = R24 (R24 (72 )50 ) = R24 (150 ) =R24 (1) = 1.
Example 4.15. A similar test can be performed for m = 11. R11 (n) can be com-puted by adding the decimal digits of n with alternating sign modulo 11. Thistest, unlike that for m = 9, detects the swapping of digits.
Example 4.16. The larger m, the more likely it is that a calculation error is de-tected. How could one implement a similar test for m = 99, how for m = 101?
ax ≡m b.
ax ≡m 1
TheoremQr 4.19. Let m1 , m2 , . . . , mr be pairwise relatively prime integers and let M = i=1 m i . For every list a1 , . . . , ar with 0 ≤ ai < mi for 1 ≤ i ≤ r, the system ofcongruence equations
x ≡ m1 a1 x ≡ m2 a2 ... x ≡ mr ar
M i N i ≡ mk 0
satisfies all the congruences. In order to prove uniqueness, observe that for twosolutions x′ and x′′ , x′ − x′′ ≡mi 0 for all i, i.e., x′ − x′′ is a multiple of all the miand hence of lcm(m1 , . . . , mr ) = M . Thus x′ ≡M x′′ .
The Chinese Remainder Theorem has several applications. When one is in-terested in a computation modulo M , then the moduli mi can be viewed as acoordinate system. One can project the numbers of interest modulo the mi , andperform the computation in the r projections (which may be more efficient thancomputing directly modulo M ). If needed at the end, one can reconstruct theresult from the projections.
Example 4.19. Compute R35 (21000 ). We can do this computation modulo 5 andmodulo 7 separately. Since 24 ≡5 1 we have 21000 ≡5 1. Since 23 ≡7 1 we have21000 ≡7 2. This yields 21000 ≡35 16 since 16 is the (unique) integer x ∈ [0, 34]with x ≡5 1 and x ≡7 2.
as (a version of) the discrete logarithm problem. The security of the Diffie-Hellmanprotocol is based on this asymmetry in computational difficulty. Such a func-tion, like x 7→ Rp (g x ), is called a one-way function: it is easy to compute in onedirection but computationally very hard to invert.21 The prime p and the basis g (e.g. g = 2) are public parameters, possiblygenerated once and for all for all users of the system. The protocol is symmetric,i.e., Alice and Bob perform the same operations. The exchange of the so-calledpublic keys yA and yB must be authenticated, but not secret.22 It is easy to see thatAlice and Bob end up with the same value kAB = kBA which they can use asa secret key for encrypting subsequent communication.23 In order to computekAB from yA and yB , an adversary would have to compute either xA or xB ,which is believed to be infeasible.
yA := Rp (g xA ) yB := Rp (g xB ) yA ✲ yB ✛ xA xB kAB := Rp (yB ) kBA := Rp (yA )
xA kAB ≡p yB ≡p (g xB )xA ≡p g xA xB ≡p kBA
to KAB . 24 A padlock with a key corresponds to a so-called trapdoor one-way function which is not consid-
ered here.87 Chapter 4. Number Theory
Alice Bob insecure channel
x x A A yA=g A yB=g B B B
xA xB yA A
yB B
xx xx B
kAB=g B A kBA=g A B
B A
A Figure 4.2: Mechanical analog of the Diffie-Hellman protocol.
interlocked. For the adversary, this is impossible without breaking open one ofthe locks. Another famous (and more widely used) public-key cryptosystem, the so-called RSA-system invented in 1977 and named after Rivest, Shamir and Adle-man25 , will be discussed later. Its security is based on the (conjectured) compu-tational difficulty of factoring large integers.
Algebra
5.1 Introduction5.1.1 What Algebra is AboutIn a nutshell, algebra is the mathematical study of structures consisting of a setand certain operations on the set. Examples are the integers Z, the rational num-bers Q, and the set of polynomials with coefficients from some domain, with therespective addition and multiplication operations. A main goal in algebra is tounderstand the properties of such algebraic systems at the highest level of gen-erality and abstraction. For us, an equally important goal is to understand thealgebraic systems that have applications in Computer Science. For instance, one is interested in investigating which properties of the inte-gers are responsible for the unique factorization theorem. What do the integers,the polynomials with rational or real coefficients, and several other structureshave in common so that the unique factorization theorem holds? Why does itnot hold for certain other structures? The benefit of identifying the highest level of generality and abstraction isthat things often become simpler when unnecessary details are eliminated fromconsideration, and that a proof must be carried out only once and applies to allstructures captured at the given level of generality.
Operations with arity 1 and 2 are called unary and binary operations, respec-tively. An operation with arity 0 is called a constant; it is a fixed element fromthe set S, for instance the special element 1 in Z. In many cases, only binaryoperations are actually listed explicitly,
Definition 5.3. A left [right] neutral element (or identity element) of an algebrahS; ∗i is an element e ∈ S such that e ∗ a = a [a ∗ e = a] for all a ∈ S. Ife ∗ a = a ∗ e = a for all a ∈ S, then e is simply called neutral element.
Lemma 5.1. If hS; ∗i has both a left and a right neutral element, then they are equal.In particular hS; ∗i can have at most one neutral element.
Proof. Suppose that e and e′ are left and right neutral elements, respectively.Then, by definition, e ∗ e′ = e′ (considering e as a left neutral element), but alsoe ∗ e′ = e (considering e′ as a right neutral element). Thus e′ = e.
Example 5.4. The empty sequence ǫ is the neutral element of hΣ∗ ; ||i, whereΣ∗ is the set of sequences over the alphabet Σ and || denotes concatenation ofsequences.
Note that up to now, and also in the next section, we do not yet pay attentionto the fact that some operations are commutative. In a sense, commutativity isless important than associativity. Some standard examples of associate operations are addition and multipli-cation in various structures: Z, N, Q, R, and Zm .
Example 5.7. For a set A, the set AA of functions A → A form a monoid with re-spect to function composition. The identity function id (defined by id(a) = a forall a ∈ A) is the neutral element. According to Lemma 3.5, relation composition,and therefore also function composition, is associative. The algebra hAA ; ◦, idi isthus a monoid.
Lemma 5.2. In a monoid hM ; ∗, ei, if a ∈ M has a left and a right inverse, then theyare equal. In particular, a has at most one inverse.
Proof. Let b and c be left and right inverses of a, respectively, i.e., we have b ∗ a =e and a ∗ c = e, Then
b = b ∗ e = b ∗ (a ∗ c) = (b ∗ a) ∗ c = e ∗ c = c,
Example 5.8. Consider again hAA ; ◦, idi. A function f ∈ AA has a left inverseonly if it is injective, and it has a right inverse only if it is surjective. Hence f hasan inverse f −1 if and only if f is bijective. In this case, f ◦ f −1 = f −1 ◦ f = id. 5 or simply left [right] inverse.5.2. Monoids and Groups 92
Definition 5.7. A group is an algebra hG; ∗,b, ei satisfying the following axioms: G1 ∗ is associative. G2 e is a neutral element: a ∗ e = e ∗ a = a for all a ∈ G. G3 Every a ∈ G has an inverse element b a, i.e., a ∗ b a=ba ∗ a = e.
We can write hG; ∗i (or simply G if ∗ is understood) instead of hG; ∗,b, ei. Ifthe operation ∗ is called addition (+) [multiplication (·)], then the inverse of a isdenoted −a [a−1 or 1/a] and the neutral element is denoted 0 [1]. Some standard examples of groups are hZ; +, −, 0i, hQ; +, −, 0i, hQ \{0}; ·,−1 , 1i, hR; +, −, 0i, hR \ {0}; ·,−1 , 1i, and hZm ; ⊕, ⊖, 0i.
We summarize a few facts we encountered already earlier for the special caseof the integers Z. The group is the right level of abstraction for describing thesefacts. The proofs are left as exercises.
Lemma 5.3. For a group hG; ∗,b, ei, we have for all a, b, c ∈ G: c (i) (b a) = a. (ii) ad ∗ b = bb ∗ b a.(iii) Left cancellation law: a ∗ b = a ∗ c =⇒ b = c. (iv) Right cancellation law: b ∗ a = c ∗ a =⇒ b = c. (v) The equation a ∗ x = b has a unique solution x for any a and b. So does the equation x ∗ a = b.
= b a) ∗ b a ∗ ((a ∗ b b a) (G1) = b b a ∗ (e ∗ b a) (G3) a ∗ e) ∗ b = (b b a (G1) = b a∗b b a (G2) = e (G3, i.e., def. of inverse of b a)
these four elements also includes the four rotations by 0◦ (the neutral element),by 90◦ , 180◦ , and by 270◦. These 8 elements (reflections and rotations) form agroup, which we denote by S✷ . It is called the symmetry group of the square. Ifthe vertices of the square are labeled A, B, C, D, then these eight geometric op-erations each corresponds to a permutation of the set {A, B, C, D}. For example,the rotation by 90◦ corresponds to the permutation (A, B, C, D) → (B, C, D, A).Note that the set of four rotations also form a group, actually a subgroup of theabove described group and also a subgroup of the group of permutations on{A, B, C, D}.7
Example 5.14. It is left as an exercise to figure out the symmetry group of thethree-dimensional cube.
Definition 5.9. The direct product of n groups hG1 ; ∗1 i , . . . , hGn ; ∗n i is the alge-bra hG1 × · · · × Gn ; ⋆i,where the operation ⋆ is component-wise:
Lemma 5.4. hG1 × · · ·× Gn ; ⋆i is a group, where the neutral element and the inversionoperation are component-wise in the respective groups.
Example 5.15. Consider the group hZ5 ; ⊕i × hZ7 ; ⊕i. The carrier of the group isZ5 × Z7 . The neutral element is (0, 0). If we denote the group operation by ⋆, [then we have (2, 6) ⋆ (4, 3) = (1, 2). Also, (2, 6) = (3, 1). It follows from theChinese remainder theorem that hZ5 ; ⊕i × hZ7 ; ⊕i is isomorphic to hZ35 ; ⊕i, aconcept introduced in the following subsection.
Definition 5.10. A function ψ from a group hG; ∗,b, ei to a group hH; ⋆,e, e′ i is agroup homomorphism if, for all a and b,
We use the symbol e for the inverse operation in the group H. The proof ofthe following lemma is left as an exercise:Lemma 5.5. A group homomorphism ψ from hG; ∗,b, ei to hH; ⋆,e, e′ i satisfies (i) ψ(e) = e′ , (ii) ψ(b g for all a. a) = ψ(a)
We give two familiar examples of relevant homomorphisms that are not iso-morphisms.Example 5.18. If one considers the three-dimensional space R3 with vector ad-dition, then any projection on a plane through the origin or a line through theorigin are homomorphic images of R3 . A special case is the projection onto anaxis of the coordinate system, which abstracts away all but one coordinate.Example 5.19. Consider the set of real-valued n × n matrices. The determinantis a homomorphism (with respect to multiplication) from the set of matrices toR. We have det(AB) = det(A) det(B).
5.3.3 SubgroupsFor a given algebra, for example a group or a ring (see Section 5.5), a subalgebrais a subset that is by itself an algebra of the same type, i.e., a subalgebra is a sub-set of an algebra closed under all operations. For groups we have specifically:5.3. The Structure of Groups 96
Example 5.20. For any group hG; ∗,b, ei, there exist two trivial subgroups: thesubset {e} and G itself.
Example 5.21. Consider the group Z12 (more precisely hZ12 ; ⊕, ⊖, 0i). Thefollowing subsets are all the subgroups: {0}, {0, 6}, {0, 4, 8}, {0, 3, 6, 9},{0, 2, 4, 6, 8, 10}, and Z12 .Example 5.22. The set of symmetries and rotations discussed in example 5.13,denoted S✷ , constitutes a subgroup (with 8 elements) of the set of 24 permuta-tions on 4 elements.
Example 5.23. The order of 6 in hZ20 ; ⊕, ⊖, 0i is 10. This can be seen easily since60 = 10 · 6 is the least common multiple of 6 and 20. The order of 10 is 2, andindeed 10 is self-inverse.Example 5.24. The order of any axial symmetry in the group S✷ (see exam-ple 5.13) is 2, while the order of the 90◦ -rotation (and also of the 270◦-rotation)is 4.
Proof. Since G is finite, we must have ar = as = b for some r and s with r < s(and some b). Then as−r = as · a−r = b · b−1 = e.
Definition 5.13. For a finite group G, |G| is called the order of G.9
am = aRord(a) (m) .
Definition 5.14. For a group G and a ∈ G, the group generated by a, denoted hai,is defined as def hai = {an | n ∈ Z}.
It is easy to see that hai is a group, actually the smallest subgroup of a groupG containing the element a ∈ G. For finite groups we have
def hai = {e, a, a2 , . . . , aord(a)−1 }.
Being cyclic is a special property of a group. Not all groups are cyclic! Acyclic group can have many generators. In particular, if g is a generator, then sois g −1 .
Example 5.27. The group hZn ; ⊕i is cyclic for every n, where 1 is a generator.The generators of hZn ; ⊕i are all g ∈ Zn for which gcd(g, n) = 1, as the readercan prove as an exercise.
Example 5.28. The additive group of the integers, hZ; +, −, 0i, is an infinitecyclic group generated by 1. The only other generator is −1.
Theorem 5.7. A cyclic group of order n is isomorphic to hZn ; ⊕i (and hence abelian).
Proof. Let G = hgi be a cyclic group of order n (with neutral element e). Thebijection Zn → G : i 7→ g i is a group isomorphism since i ⊕ j 7→ g i+j =gi ∗ gj .
Theorem 5.8 (Lagrange). Let G be a finite group and let H be a subgroup of G. Thenthe order of H divides the order of G, i.e., |H| divides |G|.
Corollary 5.9. For a finite group G, the order of every elements divides the group order,i.e., ord(a) divides |G| for every a ∈ G.99 Chapter 5. Algebra
Corollary 5.11. Every group of prime order10 is cyclic, and in such a group everyelement except the neutral element is a generator.
Proof. Let |G| = p with p prime. For any a, the order of the subgroup hai dividesp. Thus either ord(a) = 1 or ord(a) = p. In the first case, a = e and in the lattercase G = hai.
defDefinition 5.16. Z∗m = {a ∈ Zm | gcd(a, m) = 1}.
QrLemma 5.12. If the prime factorization of m is m = i=1 pei i , then11 r Y ϕ(m) = (pi − 1)piei −1 . i=1
ϕ(pe ) = pe−1 (p − 1)
since exactly every pth integer in Zpe contains a factor p and hence ϕ(pe ) =pe−1 (p − 1) elements contain no factor p. For a ∈ Zm we have gcd(a, m) = 1 ifand only if gcd(a, pei i ) = 1 for i = 1, . . . , r. Since the numbers pei i are relativelyprime, the Chinese remainder theorem implies that there is a one-to-one corre-spondence between elements of Zm and lists (a1 , . . . , ar ) with ai ∈ Zpei . Hence, iusing the above, there is also a one-to-one correspondence Q between elements rof Z∗m and lists (a1 , . . . , ar ) with ai ∈ Z∗pei . There are i=1 (pi − 1)piei −1 such ilists.
Example 5.30. In Z∗18 = {1, 5, 7, 11, 13, 17} we have 5 ⊙ 13 = 11 and 11−1 = 5since 11 ⊙ 5 = 1 (i.e., R18 (11 · 5) = 1).
Now we obtain the following simple but powerful corollary to Theorem 5.8. 11 Alternatively, Y 1 ϕ(m) could be defined as ϕ(m) = m · 1− . p p|m p prime101 Chapter 5. Algebra
Corollary 5.14 (Fermat, Euler). For all m ≥ 2 and all a with gcd(a, m) = 1,
aϕ(m) ≡m 1.
ap−1 ≡p 1.
Proof. This follows from Corollary 5.10 for the group Z∗m of order ϕ(m).
The special case for primes was known already to Fermat.12 The generalcase was proved by Euler, actually before the concept of a group was explicitlyintroduced in mathematics. We state the following theorem about the structure of Z∗m without proof. Ofparticular importance and interest is the fact that Z∗p is cyclic for every prime p.
Example 5.32. The group Z∗19 is cyclic, and 2 is a generator. The powers of 2are 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 1. The other generators are3, 10, 13, 14, and 15.
propriate. To test whether a number n is prime one chooses a base a and checks whether an−1 ≡n 1.If the condition is violated, then n is clearly composite, otherwise n could be a prime. Unfortunately,it is not guaranteed to be a prime. In fact, there are composite integers n for which an−1 ≡n 1 forall a with gcd(a, n) = 1. (Can you find such an n?) For more sophisticated versions of such aprobabilistic test one can prove that for every composite n, the fraction of test values for which thecorresponding condition is satisfied is at most 1/4. Thus, by repeating the test sufficiently manytimes, the confidence that n is prime can be increased beyond any doubt. This is useful in practice,but it does not provide a proof that n is prime. 13 R. L. Rivest, A. Shamir, and L. Adleman, A method for obtaining digital signatures and public-
key cryptosystems, Communications of the ACM, Vol. 21, No. 2, pp. 120–126, 1978.5.4. Application: RSA Public-Key Encryption 102
Theorem 5.16. Let G be some finite group (multiplicatively written), and let e ∈ Z berelatively prime to |G| (i.e. gcd(e, |G|) = 1). The function x 7→ xe is a bijection andthe (unique) e-th root of y ∈ G, namely x ∈ G satisfying xe = y, is
x = yd,
ed ≡|G| 1.
which means that the function y 7→ y d is the inverse function of the functionx 7→ xe (which is hence a bijection). The under-braced term is equal to 1 becauseof Corollary 5.10.
When |G| is known, then d can be computed from ed ≡|G| 1 by using theextended Euclidean algorithm No general method is known for computing e-throots in a group G without knowing its order. This can be exploited to define apublic-key cryptosystem.
can be computed only if the prime factors p and q of n are known.14 The (public)encryption transformation is defined by
m 7→ y = Rn (me ), 14 One can show that one can efficiently compute p and q when given (p − 1)(q − 1). (How?)103 Chapter 5. Algebra
Generate primes p and q n=p·q f = (p−1)(q−1) select e n, e plaintext d ≡f e−1 ✲ m ∈ {1, . . . , n − 1}
y ciphertext m = Rn (y d ) ✛ y = Rn (me )
Figure 5.1: The naı̈ve RSA public-key cryptosystem. Alice’s public key is the pair (n, e) and her secret key is d. The public key must be sent to Bob via an authenticated channel. Bob can encrypt a message, rep- resented as a number in Zn , by raising it to the eth power modulo n. Alice decrypts a ciphertext by raising it to the dth power modulo n.
y 7→ m = Rn (y d ),
ed ≡(p−1)(q−1) 1.
15 The described version of using RSA is not secure, for several reasons. One reason is that it is
deterministic and therefore an attacker can check potential messages by encrypting them himselfand comparing the result with the ciphertext. 16 The RSA encryption was defined above as a permutation on Z∗ . But one can show that encryp- ntion and decryption work for all m ∈ Zn . Thus the condition gcd(m, n) = 1 need not be checked.5.4. Application: RSA Public-Key Encryption 104
Let us have a brief look at the security of the RSA public-key system.17 It is not knownwhether computing e-th roots modulo n (when gcd(e, ϕ(n)) = 1) is easier than factoringn, but it is widely believed that the two problems are computationally equivalent.18 Fac-toring large integers is believed to be computationally infeasible. If no significant break-through in factoring is achieved and if processor speeds keep improving at the same rateas they are now (using the so-called Moore’s law), a modulus with 2048 bits appears tobe secure for the next 15 years, and larger moduli (e.g. 8192 bits) are secure for a verylong time. Obviously, the system is insecure unless Bob can make sure he obtains the correctpublic key from Alice rather than a public key generated by an adversary and posted inthe name of Alice. In other words, the public key must be sent from Alice to Bob via anauthenticated channel. This is usually achieved (indirectly) using a so-called public-keycertificate signed by a trusted certification authority. One also uses the term public-keyinfrastructure (PKI). Explaining these concepts is beyond the scope of this course. It is important to point out that for a public-key system to be secure, the messagemust be randomized in an appropriate manner. Otherwise, when given an encryptedmessage, an adversary can check plaintext messages by encrypting them and comparingthem with the given encrypted message. If the message space is small (e.g. a bit), thenthis would allow to efficiently break the system.
The RSA system can also be used for generating digital signatures. A digitalsignature can only be generated by the entity knowing the secret key, but it canbe verified by anyone, e.g. by a judge, knowing the public key. Alice’s signatures for a message m is
s = Rn (z d ) for z = m||h(m),
s ∈ Z∗n would be a legitimate signature, and hence forging a signature would be trivial.105 Chapter 5. Algebra
Lemma 5.17. For any ring hR; +, −, 0, ·, 1i, and for all a, b ∈ R, (i) 0a = a0 = 0. (ii) (−a)b = −(ab).(iii) (−a)(−b) = ab. (iv) If R is non-trivial (i.e., if it has more than one element), then 1 6= 0.
addition follows from the remaining ring axioms. The stated ring axioms are hence not minimal.The word “commutative” in (i) could be dropped.5.5. Rings and Fields 106
Definition 5.19. The characteristic of a ring is the order of 1 in the additive groupif it is finite, and otherwise the characteristic is defined to be 0 (not infinite).
5.5.2 DivisorsIn the following R denotes a commutative ring.
21 This also follows from commutativity of multiplication, but the proof shows that the statement
Definition 5.21. For ring elements a and b (not both 0), a ring element d is calleda greatest common divisor of a and b if d divides both a and b and if every commondivisor of a and b divides d, i.e., if d | a ∧ d | b ∧ ∀c (c | a ∧ c | b) → c | d .
Example 5.38. The ring of Gaussian integers (see Example 4.5) contains fourunits: 1, i, −1, and −i. For example, the inverse of i is −i.
Proof. We need to show that R∗ is closed under multiplication, i.e., that foru ∈ R∗ and v ∈ R∗ , we also have uv ∈ R∗ , which means that uv has an in-verse. The inverse of uv is v −1 u−1 since (uv)(v −1 u−1 ) = uvv −1 u−1 = uu−1 = 1.R∗ also contains the neutral element 1 (since 1 has an inverse). Moreover, theassociativity of multiplication in R∗ is inherited from the associativity of multi-plication in R (since elements of R∗ are also elements of R and the multiplicationoperation is the same).
25 German: Nullteiler 26 German: Einheit 27 The inverse, if it exists, is unique. 28 In fact, we now see the justification for the notation Z∗ already introduced in Definition 5.16. m 29 German: Integritätsbereich 30 i.e., 1 6= 05.5. Rings and Fields 108
and thus, because a 6= 0 and there are no zero-divisors, we must have c+(−c′ ) =0 and hence c = c′ .
max(d,d′ ) X a(x) + b(x) = (ai + bi ) xi , i=0
where here and in the following coefficients with index greater than the degreeare understood to be 0. The product of a(x) and b(x) is defined as33 d+d ′ i ! d+d ′ ! X X X X ia(x)b(x) = ak bi−k x = au bv xi i=0 k=0 i=0 u+v=i d+d′ = + · · · + (a0 b2 + a1 b1 + a2 b0 )x2 + (a0 b1 + a1 b0 )x + a0 b0 . ad b d ′ x Pi PThe i-th coefficient of a(x)b(x) is k=0 ak bi−k = u+v=i au bv , where the sumis over all pairs (u, v) for which u + v = i as well as u ≥ 0 and v ≥ 0. The degree of the product of polynomials over a ring R is, by definition, atmost the sum of the degrees. It is equal to the sum if R is an integral domain,which implies that the highest coefficient is non-zero: ad bd′ 6= 0 if ad 6= 0 andbd′ 6= 0.Example 5.42. Consider the ring Z7 and let a(x) = 2x2 +3x+1 and b(x) = 5x+6.Then a(x) + b(x) = 2x2 + (3 + 5)x + (1 + 6) = 2x2 + xanda(x)b(x) = (2 · 5)x3 + (3 · 5 + 2 · 6)x2 + (1 · 5 + 3 · 6)x + 1 · 6 = 3x3 + 6x2 + 2x + 6.
Proof. We need to prove that the conditions of Definition 5.18 (i.e., the ring ax-ioms) are satisfied for R[x], assuming they are satisfied for R. We first observethat since multiplication in R is commutative, so is multiplication in R[x]. Condition (i) requires that R[x] is an abelian group with respect to (poly-nomial) addition. This is obvious from the definition of addition. Associativ-ity and commutativity of (polynomial) addition are inherited from associativ-ity and commutativity of addition in R (because R is a ring). The neutral el-ement is the polynomial 0, and the inverse in the group (i.e., the negative) of Pd Pda(x) = i=0 ai xi is −a(x) = i=0 (−ai )xi . Condition (ii) requires that R[x] is a monoid with respect to (polynomial)multiplication. The polynomial 1 is the neutral element, which is easy to see.That multiplication is associative can be seen as follows. Let a(x) and b(x) as Pd′′above, and c(x) = i=0 ci xi . Using the above definition of a(x)b(x), we have ′ d+d X +d′′ i X X a(x)b(x) c(x) = au bv ci−j xi i=0 j=0 u+v=j
′ 33 Note that, for example, the highest coefficient d+d P k=0 ak bi−k is in the formula defined as a sumof d + d′ + 1 terms, but all but one of them (namely for k = d) are zero.5.5. Rings and Fields 110
d+d ′ +d′′ ! X X = (au bv )cw xi . i=0 u+v+w=i If one computes a(x) b(x)c(x) , one arrives at the same expression, by mak-ing use of associativity of multiplication in R, i.e., the fact that (au bv )cw =au (bv cw ) = au bv cw . Condition (iii), the distributive law, can also be shown to follow from thedistributive law holding for R.
Lemma 5.22. (i) If D is an integral domain, then so is D[x]. (ii) The units of D[x] are the constant polynomials that are units of D: D[x]∗ = D∗ .
Example 5.43. Lemma 5.22 implies that for an integral domain D, the set D[x][y]of polynomials in y with coefficients in D[x], is also an integral domain. One canalso view the elements of D[x][y] as polynomials in two indeterminates, denotedD[x, y].
5.5.5 Fields
Example 5.44. Q, R, and C are fields, but Z and R[x] (for any ring R) are notfields.
Proof. This follows from our earlier analysis of Z∗p , namely that Zp \ {0} is amultiplicative group if and only if p is prime.
In the following we denote the field with p elements by GF(p) rather thanZp . As explained later, “GF” stands for Galois field. Galois discovered finitefields around 1830. 34 German: Körper111 Chapter 5. Algebra
Fields are of crucial importance because in a field one can not only add,subtract, and multiply, but one can also divide by any nonzero element. Thisis the abstraction underlying many algorithms like those for solving systems oflinear equations (e.g. by Gaussian elimination) or for polynomial interpolation.Also, a vector space, a crucial concept in mathematics, is defined over a field,the so-called base field. Vector spaces over R are just a special case.Example 5.45. Solve the following system of linear equations over Z11 :
5x ⊕ 2y = 4 2x ⊕ 7y = 9
Solution: Eliminate x by adding 2 times the first and ⊖5 = 6 times the secondequation, resulting in
(2 ⊙ 5 ⊕ 6 ⊙ 2) x + (2 ⊙ 2 ⊕ 6 ⊙ 7) y = 2 ⊙ 4 ⊕ 6 ⊙ 9, | {z } | {z } | {z } =0 =2 =7
x = 2−1 ⊙ (9 ⊖ 7 ⊙ y) = 6 ⊙ (9 ⊕ 4 ⊙ 9) = 6 ⊙ 1 = 6.
Later we will describe a few applications of finite fields. Here we give an-other example of a finite field.Example 5.46. We describe a field with 4 elements, F = {0, 1, A, B}, by givingthe function tables of addition and multiplication:
+ 0 1 A B · 0 1 A B 0 0 1 A B 0 0 0 0 0 1 1 0 B A 1 0 1 A B A A B 0 1 A 0 A B 1 B B A 1 0 B 0 B 1 A
This field is not isomorphic to the ring Z4 , which is not a field. We explain theconstruction of this 4-element field in Section 5.8.2.Theorem 5.24. A field is an integral domain.
v = 1v = u−1 uv = u−1 0 = 0,
Definition 5.27. A polynomial a(x) ∈ F [x] is called monic35 if the leading coef-ficient is 1.
In GF(2)[x] we have
Definition 5.28. A polynomial a(x) ∈ F [x] with degree at least 1 is called irre-ducible if it is divisible only by constant polynomials and by constant multiplesof a(x).
It follows immediately from the definition (and from the fact that the degreesare added when polynomials are multiplied) that every polynomial of degree 1is irreducible. Moreover, a polynomial of degree 2 is either irreducible or theproduct of two polynomials of degree 1. A polynomial of degree 3 is eitherirreducible or it has at least one factor of degree 1. Similarly, a polynomial ofdegree 4 is either irreducible, has a factor of degree 1, or has an irreduciblefactor of degree 2. Irreducibility of a polynomial of degree d can be checked by testing all irre-ducible polynomials of degree ≤ d/2 as possible divisors. Actually, it suffices totest only the monic polynomials because one could always multiply a divisor bya constant, for example the inverse of the highest coefficient. This irreducibil-ity test is very similar to the primality test which checks all divisors up to thesquare root of the number to be tested.
Not only the concepts of divisors and division with remainders (see below)carries over from Z to F [x], also the concept of the greatest common divisor canbe carried over. Recall that F [x] is a ring and hence the notion of a greatestcommon divisor is defined. For the special type of ring F [x], as for Z, one cansingle out one of them.
Definition 5.29. The monic polynomial g(x) of largest degree such that g(x) |a(x) and g(x) | b(x) is called the greatest common divisor of a(x) and b(x), de-noted gcd(a(x), b(x)).
Example 5.53. Consider GF(2)[x]. Let a(x) = x3 +x2 +x+1 and b(x) = x2 +x+1.Then gcd(a(x), b(x)) = 1.5.6. Polynomials over a Field 114
Theorem 5.25. Let F be a field. For any a(x) and b(x) 6= 0 in F [x] there exist aunique monic q(x) (the quotient) and a unique r(x) (the remainder) such that
Proof sketch. We first prove the existence of q(x) and r(x) and then the unique-ness. If deg(b(x)) > deg(a(x)), then q(x) = 0 and r(x) = a(x). We thus assumethat deg(b(x)) ≤ deg(a(x)). Let a(x) = am xm + · · · and b(x) = bn xn + · · · withn ≤ m, where “· · ·” stands for lower order terms. The first step of polynomialdivision consists of subtracting am b−1 n b(x)x m−n from a(x), resulting in a poly- 36nomial of degree at most m − 1. Continuing polynomial division finally yieldsq(x) and r(x), where deg(r(x)) < deg(b(x)) since otherwise one could still sub-tract a multiple of b(x). To prove the uniqueness, suppose that
where deg(r(x)) < deg(b(x)) and deg(r′ (x)) < deg(b(x)). Then
Since deg(r′ (x) − r(x)) < deg(b(x)), this is possible only if q(x) − q ′ (x) = 0, i.e.,q(x) = q ′ (x), which also implies r′ (x) = r(x).37
In analogy to the notation Rm (a), we will denote the remainder r(x) of theabove theorem by Rb(x) (a(x)).Example 5.54. Let F be the field GF(7) and let a(x) = x3 + 2x2 + 5x + 4 andb(x) = 2x2 + x + 1. Then q(x) = 4x + 6 and r(x) = 2x + 5 since
point out that this only holds in an integral domain. (Why?) Recall that a field is an integral domain(Theorem 5.24).115 Chapter 5. Algebra
The units in Z are 1 and −1 and the units in F [x] are the non-zero constant polyno-mials (of degree 0). In Z, a and −a are associates.
For a ∈ D one can define one associate to be distinguished. For Z the distinguishedassociate of a is |a|, and for a(x) ∈ F [x] the distinguished associate of a(x) is the monicpolynomial associated with a(x). If we consider only the distinguished associates ofirreducible elements, then for Z we arrive at the usual notion of prime numbers.39 We point out that the association relation is closely related to divisibility. The proofof the following lemma is left as an exercise.
Lemma 5.26. a ∼ b ⇐⇒ a | b ∧ b | a.
There is one more crucial property shared by both integral domains Z and F [x] (forany field F ), described in the following abstract definition.
One can prove that in a Euclidean domain, the greatest (according to the degree func-tion) common divisor is well-defined, up to taking associates, i.e., up to multiplicationby a unit. The condition d(r) < d(b) guarantees that the gcd can be computed in thewell-known manner by continuous division. This procedure terminates because d(r)decreases monotonically in each division step. 38 In other words, p is divisible only by units and associates of p. 39 There is a notionof a prime element of a ring, which is different from the notion of an irreducibleelement, but for the integers Z the two concepts coincide.5.7. Polynomials as Functions 116
The following theorem can be proved in a manner analogous to the proof of theunique factorization theorem for Z. One step is to show that a Euclidean domain is aprinciple ideal domain.
Theorem 5.27. In a Euclidean domain every element can be factored uniquely (up to takingassociates) into irreducible elements.
If c(x) = a(x) · b(x), then c(α) = a(α) · b(α) for any α. Similarly, if c(x) =a(x) + b(x), then c(α) = a(α) + b(α) for any α.
5.7.2 Roots
Definition 5.33. Let a(x) ∈ R[x]. An element α ∈ R for which a(α) = 0 is calleda root40 of a(x).
Example 5.59. The polynomial x3 − 7x + 6 in R[x] has 3 roots: −3, 1, and 2. Thepolynomial x2 + 1 in R[x] has no root. The polynomial (x3 + 2x2 + 5x + 2) inGF(7)[x] has 2 as its only root. The polynomial (x4 + x3 + x + 1) in GF(2)[x] hasthe root 1.
Lemma 5.28. For a field F , α ∈ F is a root of a(x) if and only if x − α divides a(x).
Proof. (=⇒) Assume that α is a root, i.e., a(α) = 0. Then, according to Theo-rem 5.25, we can write a(x) as
r = a(x) − (x − α)q(x). 40 German: Nullstelle oder Wurzel117 Chapter 5. Algebra
Theorem 5.30. For a field F , a nonzero42 polynomial a(x) ∈ F [x] of degree d has atmost d roots, counting multiplicities.
Proof. To arrive at a contradiction, suppose that a(x) has degree d but e > droots, say α1 , . . . , αe (with possibly multiple occurrences). Then the polynomialQ e i=1 (x−αi ) divides a(x). Since this is a polynomial of degree e, a(x) has degreeat least e, and hence more than d, which is a contradiction.
Note that for ui (x) to be well-defined, all constant terms αi − αj in the denomi-nator must be invertible. This is guaranteed if F is a field since αi − αj 6= 0 fori 6= j. Note also that the denominator is simply a constant and hence ui (x) is in-deed a polynomial of degree d. It is easy to verify that ui (αi ) = 1 and ui (αj ) = 0 Pd+1for j 6= i. Thus the polynomials a(x) and i=1 βi ui (x) agree when evaluated atany αi , for all i. We note that a(x) has degree at most d.43 It remains to prove the uniqueness. Suppose there is another polynomiala′ (x) of degree at most d such that βi = a′ (αi ) for i = 1, . . . , d + 1. Then a(x) −a′ (x) is also a polynomial of degree at most d, which (according to Theorem 5.30)can have at most d roots, unless it is 0. But a(x) − a′ (x) has indeed the d + 1 rootsα1 , . . . , αd+1 . Thus it must be 0, which implies a(x) = a′ (x).
def a(x) ≡m(x) b(x) ⇐⇒ m(x) | a(x) − b(x) .
The proof of the following lemma is analogous to the proof that congruencemodulo m is an equivalence relation on Z. 43 The degree can be smaller than d if some βi are 0.119 Chapter 5. Algebra
Lemma 5.32. Congruence modulo m(x) is an equivalence relation on F [x], and eachequivalence class has a unique representative of degree less than deg(m(x)).Example 5.61. Consider R[x] or Q[x]. We have, for example,
as one can easily check. Actually, the remainder when 5x3 − 2x + 1 is dividedby 3x2 + 2 is − 16 3 x + 1.
Example 5.62. Consider GF(2)[x]. Example 5.55 can be rephrased as Rx2 +1 (x4 +x3 + x2 + 1) = x + 1.
def F [x]m(x) = a(x) ∈ F [x] deg(a(x)) < d .
Proof. We have F [x]m(x) = ad−1 xd−1 + · · · + a1 x + a0 a0 , . . . , ad−1 ∈ F .
F [x]m(x) is derived from F [x] in close analogy to how the ring Zm is derivedfrom the ring Z.
Lemma 5.34. F [x]m(x) is a ring with respect to addition and multiplication mod-ulo m(x).44
and F [x]m(x) . Each system has an addition and a multiplication operation, and we use the samesymbols “+” and “·” in each case, letting the context decide which one we mean. This should causeno confusion. The alternative would have been to always use different symbols, but this wouldbe too cumbersome. Note that, as mentioned above, addition (but not multiplication) in F [x] andF [x]m(x) are identical. 45 Note that the sum of two polynomials is never reduced modulo m(x) because the degree of the
sum is at most the maximum of the two degrees. In other words, a(x)+ b(x) in F [x] and a(x)+ b(x)in F [x]m(x) are the same operation when restricted to polynomials of degree less than deg(m(x)).5.8. Finite Fields 120
a(x)b(x) ≡m(x) 1
(for a given a(x)) has a solution b(x) ∈ F [x]m(x) if and only if gcd(a(x), m(x)) = 1.The solution is unique.46 In other words, F [x]∗m(x) = a(x) ∈ F [x]m(x) gcd(a(x), m(x)) = 1 .
Theorem 5.36. The ring F [x]m(x) is a field if and only if m(x) is irreducible.47
Proof. For an irreducible polynomial m(x), we have gcd(a(x), m(x)) = 1 for alla(x) 6= 0 with deg(a(x)) < deg(m(x)) and therefore, according to Lemma 5.35,a(x) is invertible in F [x]m(x) . In other words, F [x]∗m(x) = F [x]m(x) \ {0}. If m(x)is not irreducible, then F [x]m(x) is not a field because nontrivial factors of m(x)have no multiplicative inverse.
In Computer Science, the fields of most interest are finite fields, i.e., F [x]m(x)where F itself is a finite field. But before we discuss finite fields, we illustratethis new type of field based on polynomial arithmetic using a well-known ex-ample of an infinite field.Example 5.63. The polynomial x2 + 1 is irreducible in R[x] because x2 + 1 has noroot in R. Hence, according to Theorem 5.36, R[x]x2 +1 is a field. The elementsof R[x]x2 +1 are the polynomials of degree at most 1, i.e., of the form ax + b.Addition and multiplication are defined by
and
The last step follows from the fact that Rx2 +1 (x2 ) = −1. The reader may havenoticed already that these addition and multiplication laws correspond to thoseof the complex numbers C when ax + b is interpreted as the complex numberb + ai. Indeed, R[x]x2 +1 is simply C or, more precisely, R[x]x2 +1 is isomorphic toC. In fact, this appears to be the most natural way of defining C.
This example raises a natural question: Can we define other extension fieldsof R, or, what is special about C? There are many other irreducible polynomialsof degree 2, namely all those corresponding to a parabola not intersecting withthe x-axis. What is, for example, the field R[x]2x2 +x+1 ? One can show thatR[x]m(x) is isomorphic to C for every irreducible polynomial of degree 2 overR. Are there irreducible polynomials of higher degree over R? The answer, aswe know, is negative. Every polynomial in R[x] can be factored into a productof polynomials of degree 1 (corresponding to real roots) and polynomials ofdegree 2 (corresponding to pairs of conjugate complex roots). The field C hasthe special property that a polynomial of degree d has exactly d roots in C. Forthe field R, this is not true. There are no irreducible polynomials of degree > 1over C.
Note that the “+” in ax + b is in GF(2) (i.e., in Z2 ), and the middle “+” in(ax + b) + (cx + d) is to be understood in GF(2)[x]x2 +x+1 , i.e., as polynomialaddition. Multiplication is defined by
The last step follows from the fact that Rx2 +x+1 (x2 ) = −x − 1 = x + 1 (since−1 = 1 in GF(2)). It now becomes clear that this field with 4 elements is that ofExample 5.46. The reader can check that A = x and B = x + 1 works just as wellas A = x + 1 and B = x.5.8. Finite Fields 122
+ 0 1 x x+1 x2 x2 + 1 x2 + x x2 + x + 1 0 0 1 x x+1 x2 x2 + 1 x2 + x x2 + x + 1 2 1 0 x+1 x x +1 x2 2 x +x+1 x2 + x x 0 1 x2 + x 2 x +x+1 x2 x2 + 1 x+1 0 x2 + x + 1 x2 + x 2 x +1 x2 x2 0 1 x x+1 x2 + 1 0 x+1 x x2 + x 0 1 2 x +x+1 0
Figure 5.2: The addition table for GF(8) constructed with the irreducible poly- nomial x3 + x + 1.
· 0 1 x x+1 x2 x2 + 1 x2 + x x2 + x + 1 0 0 0 0 0 0 0 0 0 1 1 x x+1 x2 x2 + 1 x2 + x x2 + x + 1 x x2 x2 + x x+1 1 x2 + x + 1 x2 + 1 x+1 x2 + 1 x2 + x + 1 x2 1 x x2 x2 + x x x2 + 1 1 2 x +1 x2 + x + 1 x+1 x2 + x x2 + x x x2 x2 + x + 1 x+1
Figure 5.3: The multiplication table for GF(8) constructed with the irreducible polynomial x3 + x + 1.
(1811–1832).48 In his honor, finite fields are called Galois fields. A field with q elements isusually denoted by GF(q) (independently of how it is constructed).Theorem 5.37. For every prime p and every d ≥ 1 there exists an irreducible polynomial ofdegree d in GF(p)[x]. In particular, there exists a finite field with pd elements.
The following theorem states that the finite fields we have seen so far, Zp for primep and GF(p)[x]m(x) for an irreducible m(x), are all finite fields. There are no other finitefields. Moreover, one obtains no new finite fields by taking an irreducible polynomial, ′say of degree d′ , over some extension field GF(pd ), resulting in the field GF(pdd ). Sucha field can always be constructed directly using an irreducible polynomial of degree dd′over GF(p).
Theorem 5.38. There exists a finite field with q elements if and only if q is a power of a prime.Moreover, any two finite fields of the same size q are isomorphic.
The last claim justifies the use of the notation GF(q) without making explicit how thefield is constructed. Different constructions yield different representations (naming) ofthe field elements, but not different fields. However, it is possible that some representa-tions are better suited than others for the efficient hardware or software implementationof the field arithmetic.Theorem 5.39. The multiplicative group of every finite field GF(q) is cyclic.
Note that the multiplicative group of GF(q) has order q − 1 and has ϕ(q − 1) genera-tors.Example 5.66. One can check that the fields GF(22 ) and GF(23 ) have multiplicativegroups of orders 3 and 7, which are both prime. Therefore all elements except 1 (and0 of course) are generators of the multiplicative group.
general no closed form solution in radicals (while equations of up to fourth degree do). His majorcontributions to mathematics were recognized by the leading mathematicians only many years afterhis death. He died in a duel at the age of 21. The story goes that he wrote down major parts of histheory during the last night before the duel.5.9. Application: Error-Correcting Codes 124
There are two types of problems that can occur in data transmission or whenreading data from a storage medium. First, data can be erased, meaning thatwhen reading (or receiving) it one realizes that it is missing. Second, data cancontain errors. The second type of problem is more severe because it is not evenknown where in a data stream the errors occurred. A good error-correctingscheme can handle both problems.
Definition 5.37. An (n, k)-error-correcting code over the alphabet A with |A| = qis a subset of An of cardinality q k .
It is natural to use as the alphabet A = {0, 1}, i.e., to take bits as the basic unitof information. However, for several reasons (one being the efficiency of encod-ing and in particular decoding), one often considers larger units of information,for example bytes (i.e., A = {0, 1}8).
Definition 5.38. The Hamming distance between two strings of equal length overa finite alphabet A is the number of positions at which the two strings differ.
Example 5.67. The following code is a (5, 2)-code over the alphabet {0, 1}:
5.9.2 Decoding
Theorem 5.40. A code C with minimum distance d is t-error correcting if and only ifd ≥ 2t + 1.
Proof. (⇐=) If any two codewords have Hamming distance at least 2t + 1 (i.e.,differ in at least 2t+1 positions), then it is impossible that a word (r0 , . . . , rn−1 ) ∈An could result from two different codewords by changing t positions. Thus if(r0 , . . . , rn−1 ) has distance at most t from a codeword (c0 , . . . , cn−1 ), then thiscodeword is uniquely determined. The decoding function D can be defined todecode to (one of) the nearest codeword(s) (more precisely, to the informationresulting (by E) in that codeword).(=⇒) If there are two codewords that differ in at most 2t positions, then thereexists a word (r0 , . . . , rn−1 ) which differs from both codewords in at most t po-sitions; hence it is possible that t errors can not be corrected.
49 Forexample the list of symbols received after transmission of a codeword over a noisy channelor read from a storage medium like a CD.5.9. Application: Error-Correcting Codes 126
Theorem 5.41. Let A = GF(q) and let α0 , . . . , αn−1 be arbitrary distinct elements ofGF(q). Consider the encoding function E((a0 , . . . , ak−1 )) = a(α0 ), . . . , a(αn−1 ) ,
Proof. The polynomial a(x) of degree k−1 can be interpolated from any k values,i.e., from any k codeword symbols. If two polynomials agree for k arguments(or, equivalently, if two codewords agree at k positions), then they are equal.This means that two different codewords cannot agree at k positions. Hence anytwo codewords disagree in at least n − k + 1 positions.
An (n, k)-code over the field GF(2d ) can be interpreted as a binary (dn, dk)-code (over GF(2)). The minimum distance of this binary code is at least that ofthe original code because two different GF(2d )-symbols must differ in at leastone bit (but can of course differ in more than one bit).Example 5.69. Polynomial codes as described are used for storing informationon Compact Discs. In fact, the coding scheme of CD’s makes use of two differentsuch codes, but explaining the complete scheme is beyond the scope of thiscourse on discrete mathematics. The field is GF(28 ) defined by an irreduciblepolynomial of degree 8 over GF(2) and the two codes are a (32, 28)-code overGF(28 ) and a (28, 24)-code over GF(28 ), both with minimum distance 5.Chapter 6
Logic
6.1 IntroductionIn Chapter 2 we have introduced some basic concepts of logic, but the treat-ment was quite informal. In this chapter we discuss the foundations of logicin a mathematically rigorous manner. In particular, we clearly distinguish be-tween the syntax and the semantics of a logic and between syntactic derivationsof formulas and logical consequences they imply. We also introduce the con-cept of a logical calculus and define soundness and completeness of a calculus.Moreover, we discuss in detail a concrete calculus for propositional logic, theso-called resolution calculus. At a very general level, the goal of logic is to provide a framework for ex-pressing mathematical statements and for expressing and verifying proofs forsuch statements. A more ambitious, secondary goal can be to provide tools forautomatically or semi-automatically generating a proof for a given statement. A treatment of logic usually begins with a chapter on propositional logic1(see Section 6.5), followed by a chapter on predicate (or first-order) logic2 (seeSection 6.6), which can be seen as an extension of propositional logic. There areseveral other logics which are useful in Computer Science and in mathematics,including temporal logic, modal logic, intuitionistic logic, and logics for rea-soning about knowledge and about uncertainty. Most if not all relevant logicscontain the logical operators from propositional logic, i.e., ∧, ∨, ¬ (and the de-rived operators → and ↔), as well as the quantifiers (∀ and ∃) from predicatelogic. Our goal is to present the general concepts that apply to all types of log-ics in a unified manner, and then to discuss the specific instantiations of these 1 German: Aussagenlogik 2 German: Prädikatenlogik6.2. Proof Systems 128
concepts for each logic individually. Therefore we begin with such a generaltreatment (see Sections 6.2, 6.3, and 6.4) before discussing propositional andpredicate logic. From a didactic viewpoint, however, it will be useful to switchback and forth between the generic concepts of Sections 6.2, 6.3, and 6.4 and theconcrete instantiations of Sections 6.5 and 6.6. We give a general warning: Different treatments of logic often use slightly orsometimes substantially different notation.3 Even at the conceptual level thereare significant differences. One needs to be prepared to adopt a particular no-tation used in a particular application context. However, the general principlesexplained here are essentially standard. We also refer to the book by Kreuzer and Kühling and that by Schöningmentioned in the preface of these lecture notes.
τ : S → {0, 1}
assigns to each s ∈ S its truth value τ (s). This function τ defines the meaning,called the semantics, of objects in S.5 3 For example, in some treatments the symbol ⇒ is used for →, which can be confusing. 4 Membership in S and also in P is assumed to be efficiently checkable (for some notion of effi-ciency). 5 In the context of logic discussed from the next section onwards, the term semantics is used in a
φ : S × P → {0, 1},
S = P = {0, 1}∗,
with the understanding that any string in {0, 1}∗ can be interpreted as a state-ment by defining syntactically wrong statements as being false statements.
6.2.2 ExamplesExample 6.1. An undirected graph consists of a set V of nodes and a set E ofedges between nodes. Suppose that V = {0, . . . , n − 1}. A graph can then bedescribed by the so-called adjacency matrix, an n×n-matrix M with {0, 1}-entries, 6 The term proof system is also used in different ways in the mathematical literature. 7 German: korrekt 8 German: vollständig 9 The usual efficiency notion in Computer Science is so-called polynomial-time computable which
(PCP). The idea is that the proof can be very long (i.e., exponentially long), but that the verificationonly examines a very small random selection of the bits of the proof and nevertheless can decidecorrectness, except with very small error probability.6.2. Proof Systems 130
where Mi,j = 1 if and only if there is an edge between nodes i and j. A graphwith n nodes can hence be represented by a bit-string of length n2 , by readingout the entries of the matrix row by row. We are now interested in proving that a given graph has a so-called Hamilto-nian cycle, i.e., that there is a closed path from node 1 back to node 1, followingedges between nodes, and visiting every node exactly once. We are also inter-ested in the problem of proving the negation of this statement, i.e., that a givengraph has no Hamiltonian cycle. Deciding whether or not a given graph has aHamiltonian cycle is considered a computationally very hard decision problem(for large graphs).11 To prove that a graph has a Hamiltonian cycle, one can simply provide thesequence of nodes visited by the cycle. A value in V = {0, . . . , n − 1} can berepresented by a bit-string of length ⌈log2 n⌉, and a sequence of n such numberscan hence be represented by a bit-string of length n⌈log2 n⌉. We can hence defineS = P = {0, 1}∗. Now we can let τ be the function defined by τ (s) = 1 if and only if |s| = n2for some n and the n2 bits of s encode the adjacency matrix of a graph containinga Hamiltonian cycle. If |s| is not a square or if s encodes a graph without aHamiltonian cycle, then τ (s) = 0.12 Moreover, we can let φ be the functiondefined by φ(s, p) = 1 if and only if, when s is interpreted as an n × n-matrixM and when p is interpreted as a sequence of n different numbers (a1 , . . . , an )with ai ∈ {0, . . . , n − 1} (each encoded by a bit-string of length ⌈log2 n⌉), thenthe following is true: Mai ,ai+1 = 1
for i = 1, . . . , n − 1 and Man ,a1 = 1.
Example 6.2. Let us now consider the opposite problem of proving the inex-istence of a Hamiltonian cycle in a given graph. In other words, in the aboveexample we define τ (s) = 1 if and only if |s| = n2 for some n and the n2 bitsof s encode the adjacency matrix of a graph not containing Hamiltonian cycle.In this case, no sound and complete proof system (with reasonably short andefficiently verifiable proofs) is known. It is believed that no such proof systemexists. 11 The best known algorithm has running time exponential in n. The problem is actually NP-
complete, a concept that will be discussed in a later course on theoretical Computer Science. 12 Note that τ defines the meaning of the strings in S, namely that they are meant to encode graphs
and that we are interested in whether a given graph has a Hamiltonian cycle.131 Chapter 6. Logic
Example 6.3. Let again S = P = {0, 1}∗, and for s ∈ {0, 1}∗ let n(s) de-note the natural number whose (standard) binary representation is s, with theconvention that leading 0’s are ignored. (For example, n(101011) = 43 andn(00101) = 5.) Now, let τ be the function defined as follows: τ (s) = 1 if andonly if n(s) is not a prime number. Moreover, let φ be the function definedby φ(s, p) = 1 if and only if n(s) = 0, or if n(s) = 1, or if n(p) divides n(s) and1 < n(p) < n(s). This function φ is efficiently computable. This is a proof systemfor the non-primality (i.e., compositeness) of natural numbers. It is sound be-cause every s corresponding to a prime number n(s) has no proof since n(s) 6= 0and n(s) 6= 1 and n(s) has no divisor d satisfying 1 < d < n(s). The proof sys-tem is complete because every natural number n greater than 1 is either primeor has a prime factor q satisfying 1 < q < n (whose binary representation canserve as a proof).Example 6.4. Let us consider the opposite problem, i.e., proving primality ofa number n(s) represented by s. In other words, in the previous example wereplace “not a prime” by “a prime”. It is far from clear how one can define averification function φ such that the proof system is sound and complete. How-ever, such an efficiently computable function φ indeed exists. Very briefly, theproof that a number n(s) (henceforth we simply write n) is prime consists of(adequate representations of): 1) the list p1 , . . . , pk of distinct prime factors of n − 1, 2) a (recursive) proof of primality for each of p1 , . . . , pk 13 3) a generator g of the group Z∗n .
The exact representation of these three parts of the proof would have to be madeprecise, but we omit this here as it is obvious how this could be done. The verification of a proof (i.e., the computation of the function φ) works asfollows.
required.6.2. Proof Systems 132
This proof system for primality is sound because if n is not a prime, then thereis no element of Z∗n of order n − 1 since the order of any element is at most ϕ(n),which is smaller than n − 1. The proof system is complete because if n is prime,then GF (n) is a finite field and the multiplicative group of any finite field, i.e.,Z∗n , is cyclic and has a generator g. (We did not prove this statement in thiscourse.)15
6.2.3 DiscussionThe examples demonstrate the following important points:
• While proof verification must be efficient (in some sense not defined here), proof generation is generally not (or at least not known to be) efficient. For example, finding a proof for the Hamiltonian cycle example requires to find such a cycle, a problem that, as mentioned, is believed to be very hard. Similarly, finding a primality proof as discussed would require the factorization of n − 1, and the factoring problem is believed to be hard. In general, finding a proof (if it exists) is a process requiring insight and ingenuity, and it cannot be efficiently automated. • A proof system is always restricted to a certain type of mathematical state- ment. For example, the proof system of Example 6.1 is very limited in the sense that it only allows to prove statements of the form “graph G has a Hamiltonian cycle”. • Proof verification can in principle proceed in very different ways. The proof verification method of logic, based on checking a sequence of rule applications, is (only) a special case. • Asymmetry of statements and their negation: Even if a proof system exists for a certain type of statements, it is quite possible that for the negation of the statements, no proof system (with efficient verification) exists.
and this means that primality can be checked without a proof. In other words, there exists a trivialproof system for primality with empty proofs. However, this fact is mathematically considerablymore involved than the arguments presented here for the soundness and completeness of the proofsystem for primality.133 Chapter 6. Logic
L = {s | τ (s) = 1}.
Conversely, every subset L ⊆ {0, 1}∗ defines a predicate τ . In TCS, such a set L of stringsis called a formal language, and one considers the problem of proving that a given strings is in the language, i.e., s ∈ L. A proof for s ∈ L is called a witness of s, often denoted asw, and the verification function φ(s, w) defines whether a string w is a witness for s ∈ L. One then considers the special case where the length of w is bounded by a polynomialof the length of s and where the function φ must be computable in polynomial time, i.e.,by a program with worst-case running time polynomial in the length of s. Then, theimportant class NP of languages is the set of languages for which such a polynomial-time computable verification function exists. As mentioned in a footnote, a type of proof system of special interest are so-calledprobabilistically checkable proofs (PCP). An important extension of the concept of proof systems are so-called interactiveproofs.16 In such a system, the proof is not a bit-string, but it consists of an interaction(a protocol) between the prover and the verifier, where one tolerates an immensely small(e.g. exponentially small) probability that a verifier accepts a “proof” for a false state-ment. The reason for considering such interactive proofs are:
• Such interactive proofs can exist for statements for which a classical (non- interactive) proof does not exist. For example, there exists an interactive proof system for the non-Hamiltonicity of graphs. • Such interactive proofs can have a special property, called zero-knowledge, which means that the verifier learns absolutely nothing (in a well-defined sense) during the protocol, except that the statement is true. In particular, the verifier cannot prove the statement to somebody else. • Interactive proofs are of crucial importance in a large number of applications, es- pecially if they have the zero-knowledge property, for example in sophisticated block-chain systems.
16 This topic is discussed in detail in the Master-level course Cryptographic Protocols taught byMartin Hirt and Ueli Maurer.6.3. Elementary General Concepts in Logic 134
Definition 6.4. The syntax of a logic defines an alphabet Λ (of allowed symbols)and specifies which strings in Λ∗ are formulas (i.e., are syntactically correct).
17 Ina fully computerized system, this must of course be (and indeed is) defined. 18 German: Formel 19 There are logics (not considered here) with more than two truth values, for example a logic with
confidence or belief values indicating the degree of confidence in the truth of a statement.135 Chapter 6. Logic
Definition 6.5. The semantics of a logic defines (among other things, see below)a function free which assigns to each formula F = (f1 , f2 , . . . , fk ) ∈ Λ∗ a subsetfree(F ) ⊂ {1, . . . , k} of the indices. If i ∈ free(F ), then the symbol fi is said tooccur free in F .20
The same symbol β ∈ Λ can occur free in one place of F (say f3 = β where3 ∈ free(F )) and not free in another place (say f5 = β where 5 6∈ free(F )). The free symbols of a formula denote kind of variables which need to beassigned fixed values in their respective associated domains before the formulahas a truth value. This assignment of values is called an interpretation:
Often (but not in propositional logic), the domains are defined in terms of aso-called universe U , and the domain for a symbol in Λ can for example be U , ora function U k → U (for some k), or a function U k → {0, 1} (for some k).
20 The term “free” is not standard in the literature which instead uses special terms for each specific
logic, but as we see later it coincides for the notion of free variables in predicate logic. 21 German: passend 22 A suitable interpretation can also assign values to symbols β ∈ Λ not occurring free in F . 23 We assume that the set of formulas and the set of interpretations are well-defined. 24 Note that different free occurrences of a symbol β ∈ Λ in F are assigned the same value, namely
ent things, namely for an interpretation as well as for the function induced by the interpretationwhich assigns to every formula the truth value (under that interpretation). We nevertheless use thenotation A(F ) instead of σ(F, A) in order to be compatible with most of the literature.6.3. Elementary General Concepts in Logic 136
27 Note that the statement that M is satisfiable is not equivalent to the statement that every formula
in M is satisfiable. 28 The symbol ⊥ is not a formula itself, i.e., it is not part of the syntax of a logic, but if used in
also with an interpretation on the left side. This makes sense because one can consider a set M offormulas as defining a set of interpretations, namely the set of models for M . 33 More formally, let G be any formula (one of the many equivalent ones) that corresponds to the
Definition 6.16. A((F ∧ G)) = 1 if and only if A(F ) = 1 and A(G) = 1. A((F ∨ G)) = 1 if and only if A(F ) = 1 or A(G) = 1. A(¬F ) = 1 if and only if A(F ) = 0.
Some basic equivalences were already discussed in Section 2.3.2 and are nowstated for any logic that includes the logical operators ∧, ∨, and ¬ :
also need to extend the semantics to provide an interpretation for →. This subtle distinction be-tween notational convention or syntax extension is not really relevant for us. We can simply use thesymbol →.139 Chapter 6. Logic
Proof. The proofs follow directly from Definition 6.16. For example, the claim¬(F ∧ G) ≡ ¬F ∨ ¬G follows from the fact that for any suitable interpretation,we have A(¬(F ∧ G)) = 1 if and only if A(F ∧ G) = 0, and hence if and only ifeither A(F ) = 0 or A(G) = 0, i.e., if and only if either A(¬F ) = 1 or A(¬G) = 1,and hence if and only if A(¬F ∨ ¬G) = 1.
To describe the first type of statements, consider a fixed logic, for instancepredicate logic discussed in Section 6.6, and consider a set T of formulas,, wherethe formulas in T are called the axioms of the theory. Any formula F for which T |= F6.4. Logical Calculi 140
is called a theorem in theory T . For example, the axioms of group theory are threeformulas in predicate logic, and any theorem in group theory (e.g. Lagrange’stheorem) is a logical consequence of the axioms. Consider two theories T and T ′ satisfying T ⊂ T ′ , T ′ contains all the axiomsof T plus one or more additional axioms. Then every theorem in T is also atheorem in T ′ (but not vice versa). In the special case where T = ∅, a theoremin T = ∅ is a tautology in the logic. Tautologies are useful because they aretheorems in any theory, i.e., for any set of axioms.
Example 6.5. The formula ¬∃x∀y P (y, x) ↔ ¬P (y, y) is a tautology in predi-cate logic, as proved in Section 6.6.9.
6.4.1 Introduction
As mentioned in Section 6.3.1, the goal of logic is to provide a framework for ex-pressing and verifying proofs of mathematical statements. A proof of a theoremshould be a purely syntactic derivation consisting of simple and easily verifiablesteps. In each step, a new syntactic object (typically a formula, but it can also bea more general object involving formulas) is derived by application of a deriva-tion rule, and at the end of the derivation, the desired theorem appears. Thesyntactic verification of a proof does not require any intelligence or “reasoningbetween the lines”, and it can in particular be performed by a computer. Checking a proof hence simply means to execute a program. Like in com-puter programming, where the execution of a program is a dumb process whilethe design of a program is generally an intelligent, sometimes ingenious pro-cess, the verification of a proof should be a dumb process while devising a proofis an intelligent, creative, and sometimes ingenious process. A well-defined set of rules for manipulating formulas (the syntactic objects)is called a calculus. Many such calculi have been proposed, and they differ invarious ways, for example in the syntax, the semantics, the expressiveness, howeasy or involved it is to write a proof, and how long a proof will be. When defining a calculus, there is a trade-off between simplicity (e.g. a smallnumber of rules) and versatility. For a small set of rules, proving even sim-ple logical steps (like the substitution of a sub-formula by an equivalent sub-formula) can take a very large number of steps in the calculus. It is beyond the scope of this course to provide an extensive treatment ofvarious logical calculi.141 Chapter 6. Logic
Definition 6.17. A derivation rule35 is a rule for deriving a formula from a set offormulas (called the precondition). We write
{F1 , . . . , Fk } ⊢R G
F1 F2 · · · Fk (R), Gwhere spaces separate the formulas above the bar. Derivation is a purely syntactic concept. Derivation rules apply to syntac-tically correct (sets of) formulas. Some derivation rules (e.g. resolution, seeSection 6.5.6) require the formulas to be in a specific format. Typically such a derivation rule is defined as a rule that involves place-holdersfor formulas (such as F and G), which can be instantiated with any concreteformulas. In order to apply such a rule one must instantiate each place-holderwith a concrete formula.
Example 6.6. Two derivation rules for propositional and predicate logic are
{F ∧ G} ⊢ F and {F, G} ⊢ F ∧ G 35 German: Schlussregel 36 Formally, a derivation rule is a relation from the power set of the set of formulas to the set offormulas.6.4. Logical Calculi 142
The left rule states that if one has already derived a formula of the form F ∧ G,where F and G are arbitrary formulas, then one can derive F . The second rulestates that for any two formulas F and G that have been derived, one can alsoderive the formula F ∧ G. For example, an application of the right rule yields
{A ∨ B, C ∨ D} ⊢ (A ∨ B) ∧ (C ∨ D),
37 German: Kalkül 38 German: Herleitung143 Chapter 6. Logic
Definition 6.21. A derivation rule R is correct if for every set M of formulas andevery formula F , M ⊢R F implies M |= F : M ⊢R F =⇒ M |= F.
Example 6.7. The two rules of Example 6.6 are correct, but the rule
{F → G, G → F } ⊢ F ∧ G
is not correct. To see this, note that if F and G are both false, then F → G andG → F are true while F ∧ G is false.
M |= F =⇒ M ⊢K F.
For a given calculus one can also prove new derivation rules. A proof pat-tern (i.e., a sequence of rule applications) can be captured as a new rule whichfrom then on can be used directly in a proof.41 More precisely, if for a soundcalculus K and for formulas F1 , . . . , Fk , G containing place-holders we have 39 German: widerspruchsfrei 40 German: vollständig 41 This is analogous to a procedure that can be invoked several times in a program.6.5. Propositional Logic 144
6.5.1 Syntax
6.5.2 SemanticsRecall Definitions 6.5 and 6.6. In propositional logic, the free symbols of a formulaare all the atomic formulas. For example, the truth value of the formula A ∧ B isdetermined only after we specify the truth values of A and B. In propositionallogic, an interpretation is called a truth assignment (see below). 42 A 0 is usually not used. This definition guarantees an unbounded supply of atomic formulas,but as a notational convention we can also write A, B, C, . . . instead of A1 , A2 , A3 , . . ..145 Chapter 6. Logic
F = (A ∧ ¬B) ∨ (B ∧ ¬C)
Theorem 6.5. Every formula is equivalent to a formula in CNF and also to a formulain DNF.
disjunctions. F is false if and only if all the disjunctions are false, i.e., the truthtable of this formula in CNF is identical to that of F .Example 6.12. Consider the formula F = (A ∧ ¬B) ∨ (B ∧ ¬C) from above.The function table is A B C (A ∧ ¬B) ∨ (B ∧ ¬C) 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0
In the first step we have used F ∧ G ≡ ¬(¬F ∨ ¬G), which is a direct con-sequence of rule 8) of Lemma 6.1. In the second step we have applied rule 8)twice, etc.6.5. Propositional Logic 148
Which set of rules constitutes an adequate calculus is generally not clear, butsome calculi have received special attention. One could argue both for a smallset of rules (which are considered the fundamental ones from which everythingelse is derived) or for a large library of rules (so there is a large degree of freedomin finding a short derivation).
def K(F ) = {L11 , . . . , L1m1 } , . . . , {Ln1 , . . . , Lnmn } .
The idea behind this definition is that a clause is satisfied by a truth assign-ment if and only if it contains some literal that evaluates to true. In other words,a clause stands for the disjunction (OR) of its literals. Likewise, a set K(M ) ofclauses is satisfied by a truth assignment if every clause in K(M ) is satisfied by it.In other words, a set of clauses stands for the conjunction (AND) of the clauses. VkThe set M = {F1 , . . . , Fk } is satisfied if and only if i=1 Fi is satisfied, i.e., if andonly if all clauses in K(M ) are satisfied. Note that the empty clause corresponds toan unsatisfiable formula and the empty set of clauses corresponds to a tautology. Note that for a given formula (not necessarily in CNF) there are many equiv-alent formulas in CNF and hence many equivalent sets of clauses. Conversely,to a given set K of clauses one can associate many formulas which are, how-ever, all equivalent. Therefore, one can naturally think of a set of clauses as a(canonical) formula, and the notions of satisfiability, equivalence, and logicalconsequence carry over immediately from formulas to clause sets.
Example 6.16. The clauses {A, ¬B, ¬C} and {¬A, C, D, ¬E} have two resol-vents: If A is eliminated, we obtain the clause {¬B, ¬C, C, D, ¬E}, and if Cis eliminated, we obtain the clause {A, ¬B, ¬A, D, ¬E}. Note that clauses aresets and we can write the elements in arbitrary order. In particular, we couldwrite the latter clause as {A, ¬A, ¬B, D, ¬E}.
It is important to point out that resolution steps must be carried out one byone; one cannot perform two steps at once. For instance, in the above exam-ple, {¬B, D, ¬E} is not a resolvent and can also not be obtained by two res-olution steps, even though {¬B, D, ¬E} would result from {A, ¬B, ¬C} and{¬A, C, D, ¬E} by eliminating A and ¬C from the first clause and ¬A and Cfrom the second clause.47 Given a set K of clauses, a resolution step takes two clauses K1 ∈ K andK2 ∈ K, computes a resolvent K, and adds K to K. To be consistent withSection 6.4.2, one can write the resolution rule (6.1) as follows:48 {K1 , K2 } ⊢res K,where equation (6.1) must be satisfied. The resolution calculus, denoted Res,consists of a single rule: Res = {res}. 46 For a literal L, ¬L is the negation of L, for example if L = ¬A, then ¬L = A. 47 A simpler example illustrating this is that {{A, B}, {¬A, ¬B}} is satisfiable, but a “double”resolution step would falsely yield ∅, indicating that {{A, B}, {¬A, ¬B}} is unsatisfiable. 48 In the literature, one usually does not use the symbol ⊢ in the context of resolution.151 Chapter 6. Logic
Recall that we write K ⊢Res K if K can be derived from K using a finite num-ber of resolution steps.49
Lemma 6.6. The resolution calculus is sound, i.e., if K ⊢Res K then K |= K.50
Proof. We only need to show that the resolution rule is correct, i.e., that if K is aresolvent of clauses K1 , K2 ∈ K, then K is logical consequence of {K1 , K2 }, i.e.,
Let A be an arbitrary truth assignment suitable for {K1 , K2 } (and hence also forK). Recall that A is a model for {K1 , K2 } if and only if A makes at least oneliteral in K1 true and also makes at least one literal in K2 true. We refer to Definition 6.30 and distinguish two cases. If A(L) = 1, thenA makes at least one literal in K2 \ {¬L} true (since ¬L is false). Similarly, ifA(L) = 0, then A makes at least one literal in K1 \ {L} true (since L is false).Because one of the two cases occurs, A makes at least one literal in K = (K1 \{L}) ∪ (K2 \ {¬L}) true, which means that A is a model for K.
Proof. The “if” part (soundness) follows from Lemma 6.6: If K(M ) ⊢Res ∅,then K(M ) |= ∅, i.e., every model for K(M ) is a model for ∅. Since ∅ has nomodel, K(M ) also does not have a model. This means that K(M ) is unsatisfiable. It remains to prove the “only if” part (completeness with respect to unsatis-fiability). We need to show that if a clause set K is unsatisfiable, then ∅ can bederived by some sequence of resolution steps. The proof is by induction overthe number n of atomic formulas appearing in K. The induction basis (for n = 1)is as follows. A clause set K involving only literals A1 and ¬A1 is unsatisfiableif and only if it contains the clauses {A1 } and {¬A1 }. One can derive ∅ exactlyif this is the case. For the induction step, suppose that for every clause set K′ with n atomicformulas, K′ is unsatisfiable if and only if K′ ⊢Res ∅. Given an arbitrary 49 In the lecture we introduce a natural graphical notation for writing a sequence of resolution
steps. 50 For convenience, the clause K is understood to mean the singleton clause set {K}. In other
words, the truth value of a clause K is understood to be the same the truth value of {K}.6.5. Propositional Logic 152
clause set K for the atomic formulas A1 , . . . , An+1 , define the two clause sets K0and K1 as follows. K0 is the clause set for atomic formulas A1 , . . . , An obtainedfrom K by setting An+1 = 0, i.e., • by eliminating all clauses from K containing ¬An+1 (which are satisfied since ¬An+1 = 1), and • by eliminating from each remaining clause the literal An+1 if it appears in it (since having An+1 in it can not contribute to the clause being satisfied).
6.6.1 SyntaxDefinition 6.31. (Syntax of predicate logic.) • A variable symbol is of the form xi with i ∈ N.51 (k) • A function symbol is of the form fi with i, k ∈ N, where k denotes the number of arguments of the function. Function symbols for k = 0 are called constants. (k) • A predicate symbol is of the form Pi with i, k ∈ N, where k denotes the number of arguments of the predicate. • A term is defined inductively: A variable is a term, and if t1 , . . . , tk are (k) terms, then fi (t1 , . . . , tk ) is a term. For k = 0 one writes no parentheses. • A formula is defined inductively: (k) – For any i and k, if t1 , . . . , tk are terms, then Pi (t1 , . . . , tk ) is a for- mula, called an atomic formula. – If F and G are formulas, then ¬F , (F ∧ G), and (F ∨ G) are formulas. – If F is a formula, then, for any i, ∀xi F and ∃xi F are formulas.
Note that the same variable can occur bound and free in a formula. One candraw the construction tree (see lecture) of a formula showing how a formula isconstructed according to the rules of Definition 6.31. Within the subtree corre-sponding to ∀x or ∃x, all occurrences of x are bound.Example 6.17. In the formula F = Q(x) ∨ ∀y P (f (x, y)) ∧ ∃x R(x, y) ,
the first two occurrences of x are free, the other occurrences are bound. The lastoccurrence of y is free, the other occurrences are bound.
Definition 6.33. For a formula F , a variable x and a term t, F [x/t] denotes theformula obtained from F by substituting every free occurrence of x by t.
6.6.3 SemanticsRecall Definitions 6.5 and 6.6. In predicate logic, the free symbols of a formula are allpredicate symbols, all function symbols, and all occurrences of free variables. An inter-pretation, called structure in the context of predicate logic, must hence define auniverse and the meaning of all these free symbols.
This definition defines the function σ(F, A) of Definition 6.8. Note that thedefinition is recursive not only on formulas (see the second bullet of the defini-6.6. Predicate Logic (First-order Logic) 156
tion), but also on structures. Namely, A(∀x G) and A(∃x G) are defined in termsof all structures A[x→u] (G) for u ∈ U . To evaluate the truth value of a formulaF = ∀x G one needs to apply Definition 6.36 recursively, for formula G and allstructures A[x→u] . The basic concepts discussed in Section 6.3 such as satisfiable, tautology,model, logical consequence, and equivalence, are now immediately instantiatedfor predicate logic. Note that the syntax of predicate logic does not require nested quantifiedvariables in a formula to be distinct, but we will avoid such overload of variablenames to avoid any confusion. For example, the formula ∀x (P (x) ∨ ∃y Q(y)) isequivalent to ∀x (P (x) ∨ ∃x Q(x)).
Lemma 6.8. For any formulas F , G, and H, where x does not occur free in H, we have 1) ¬(∀x F ) ≡ ∃x ¬F ; 2) ¬(∃x F ) ≡ ∀x ¬F ; 3) (∀x F ) ∧ (∀x G) ≡ ∀x (F ∧ G); 4) (∃x F ) ∨ (∃x G) ≡ ∃x (F ∨ G); 5) ∀x ∀y F ≡ ∀y ∀x F ; 6) ∃x ∃y F ≡ ∃y ∃x F ; 7) (∀x F ) ∧ H ≡ ∀x (F ∧ H); 8) (∀x F ) ∨ H ≡ ∀x (F ∨ H); 9) (∃x F ) ∧ H ≡ ∃x (F ∧ H); 10) (∃x F ) ∨ H ≡ ∃x (F ∨ H).
Proof. We only prove statement 7). The other proofs are analogous. We have to show that every structure A that is a model for (∀x F ) ∧ H isalso a model for ∀x (F ∧ H), and vice versa.157 Chapter 6. Logic
Therefore ∀x G is true for exactly the same structures for which ∀y G[x/y] istrue. 54 according to the semantics of ∧, see Definition 6.366.6. Predicate Logic (First-order Logic) 158
Example 6.21. The formula ∀x ∃y (P (x, f (y)) ∨ Q(g(x), a)) is equivalent to theformula ∀u ∃v (P (u, f (v)) ∨ Q(g(u), a)) obtained by substituting x by u and yby v.
∀xF |= F [x/t].
Q1 x1 Q2 x2 · · · Qn xn G,
Theorem 6.12. For every formula there is an equivalent formula in prenex form.
55 German: bereinigt 56 Notethat if x does not occur free in F , the statement still holds but in this case is trivial. 57 German: Pränexform159 Chapter 6. Logic
Proof. One first transforms the formula into an equivalent formula in rectifiedform and then applies the equivalences of Lemma 6.8 move up all quantifiers inthe formula tree, resulting in a prenex form of the formula.
Example 6.22. ¬ ∀x P (x, y) ∧ ∃y Q(x, y, z) ≡ ¬ ∀u P (u, y) ∧ ∃v Q(x, v, z) ≡ ¬∀u P (u, y) ∨ ¬∃v Q(x, v, z) (1) ≡ ∃u ¬P (u, y) ∨ ¬∃v Q(x, v, z) (2) ≡ ∃u ¬P (u, y) ∨ ∀v ¬ Q(x, v, z) (10) ≡ ∃u ¬P (u, y) ∨ ∀v ¬ Q(x, v, z) ≡ ∃u ∀v ¬ Q(x, v, z) ∨ ¬P (u, y) (8) ≡ ∃u ∀v ¬Q(x, v, z) ∨ ¬P (u, y) ≡ ∃u ∀v ¬Q(x, v, z) ∨ ¬P (u, y) ≡ ∃u ∀v ¬P (u, y) ∨ ¬ Q(x, v, z) .
In the first step we have renamed the bound variables, in the second step wemade use of the equivalence ¬(F ∧ G) ≡ ¬F ∨ ¬G (Lemma 6.1 8)), and then wehave applied the rules of Lemma 6.8, as indicated. We have also made explicitthe use of the commutative law for ∨ (Lemma 6.1 2)). In the second last step.the removal of parentheses is made explicit. The last step, again making useof Lemma 6.1 2), is included (only) to arrive at a form with the same order ofoccurrence of P and Q.
One can also transform every formula F into a formula G in prenex form thatonly contains universal quantifiers (∀). However, such a formula is in generalnot equivalent to F , but only equivalent with respect to satisfiability. In otherwords, F is satisfiable if and only if G is satisfiable. Such a normal form is calledSkolem normal form. This topic is beyond the scope of this course.
Let us now interpret Theorem 6.13. We can instantiate it for different uni-verses and predicates. The first interpretation is Russel’s paradox:Corollary 6.14. There exists no set that contains all sets S that do not contain them-selves, i.e., {S| S 6∈ S} is not a set.
Proof. We consider the universe of all sets58 and, to be consistent with the chap-ter on set theory, use the variable names R instead of x and S instead of y.59 58 The universe of all sets is not a set itself. Formally, the universe in predicate logic need not be a
with the chapter on set theory where sets were denoted by capital letters and Russel’s proposed setwas called R. Here we have deviated from the convention to use only small letters for variables.161 Chapter 6. Logic
This formula states that there is no set R such that for a set (say S) to be in R isequivalent to not being contained in itself (S 6∈ S).
Example 6.23. The reader can investigate as an exercise that Theorem 6.13 alsoexplains the so-called barber paradox (e.g. see Wikipedia) which considers atown with a single barber as well as the set of men that do not shave themselves.
Note that the proof of this corollary contains Cantor’s diagonalization argu-ment, which is hence implicite in Theorem 6.13. We discuss a further use of the theorem. If we understand a program as de-scribable by a finite bit-string, or, equivalently, a natural number (since there isa bijection between finite bit-strings and natural numbers), and if we considerprograms that take a natural number as input and output 0 or 1, then we ob-tain the following theorem. (Here we ignore programs that do not halt (i.e.,loop forever), or, equivalently, we interpret looping as output 0.) The followingcorollary was already stated as Corollary 3.22.60
a given input, would require a more general theorem than Theorem 6.13, but it could be explainedin the same spirit.6.7. Beyond Predicate Logic * 162
61 This function of course depends on the concrete programming language which determines theexact meaning of a program and hence determines P . | https://de.scribd.com/document/513928369/DM20-LN-tablet-3pj9pb75pgsjs47mzarh | CC-MAIN-2022-33 | refinedweb | 30,093 | 64.81 |
Bug #17105closed
A single `return` can return to two different places in a proc inside a lambda inside a method
Description
A single
return in the source code might return to 2 different lexical places.
That seems wrong to me, as AFAIK all other control flow language constructs always jump to a single place.
def m(call_proc) r = -> { # This single return in the source might exit the lambda or the method! proc = Proc.new { return :return } if call_proc proc.call :after_in_lambda else proc end }.call # returns here if call_proc if call_proc [:after_in_method, r] else r.call :never_reached end end p m(true) # => [:after_in_method, :return] p m(false) # :return
We're trying to figure out the semantics of
return inside a proc in
and this behavior doesn't seem to make much sense.
@headius (Charles Nutter) also seems to agree:
I would consider that behavior to be incorrect; once the proc has escaped from the lambda, its return target is no longer valid. It should not return to a different place.
So:
- is this behavior intentional? or is it a bug?
- what are actually the semantics of
returninside a proc?
The semantics seem incredibly complicated to a point developers have no idea where
return actually goes.
Also it must get even more complicated if one defines a
lambda method as the block in
lambda { return } is then non-deterministically a proc or lambda.
Updated by Eregon (Benoit Daloze) almost 2 years ago
I should also note some of these semantics might significantly harm the performance of Ruby.
CRuby seems to walk the stack on every
return.
On others VMs there need to be some extra logic to find if the frame to return to is still on the stack.
It's already quite complicated but then if
return can go to two places, it becomes a huge mess.
Updated by Hanmac (Hans Mackowiak) almost 2 years ago
i think this is by design:
A lambda will return normally, like a regular method.
But a proc will try to return from the current context.
Procs return from the current method, while lambdas return from the lambda itself.
Updated by chrisseaton (Chris Seaton) almost 2 years ago
Hans I don't think anyone is debating the basic idea of what return in a proc or lambda does - I think we're talking about the edge-case for a proc in a return in the example above, which isn't explained by the text you have.
Updated by Dan0042 (Daniel DeLorme) almost 2 years ago
I think the behavior makes sense to some extent, because the proc is within 2 nested contexts. Since the proc is within the lambda context, calling it in the lambda returns from the lambda. And since the proc is also within the method context, calling it in the method returns from the method.
The
call_proc branching logic makes this look more complicated than it really is, but if you separate the logic I feel the behavior is rather reasonable. What do you think should be the behavior of
m2 below?
def m1 r = -> { proc = Proc.new{ return :return } proc.call #return from lambda :after_in_lambda }.call [:after_in_method, r] end def m2 r = -> { proc = Proc.new { return :return } }.call r.call #return from method :never_reached end p m1 #=> [:after_in_method, :return] p m2 #=> :return
Updated by Eregon (Benoit Daloze) almost 2 years ago
IMHO it should be a LocalJumpError. The Proc should return to the lambda, that's syntactically the closest scope it should return to.
Since it's not possible to return to it (the lambda is no longer on stack), it should be a LocalJumpError.
Updated by shyouhei (Shyouhei Urabe) almost 2 years ago
+1 to @Eregon (Benoit Daloze) ’s interpretation. Current behaviour is at least very cryptic.
Updated by headius (Charles Nutter) almost 2 years ago
Just to be clear I am +1 on single return target, as described here:
In addition to the confusing (and possibly inefficient) behavior that results from having two possible return targets, there's also a bug potential here if someone "accidentally" allows a proc containing a return to escape from its lambda container. Rather than returning from the lambda as it should have done, it will now return from the next "returnable" scope, and likely interrupt execution in an unexpected way.
I would challenge anyone to explain why the current behavior should exist, since I can't think of a single valid use case. If there's no use case for a confusing "feature", we should remove it.
Updated by matz (Yukihiro Matsumoto) almost 2 years ago
It is intentional since 1.6.0. But I am OK with making
m2 raise
LocalJumpError.
Ask @ko1 (Koichi Sasada) about migration.
Matz.
Updated by jeremyevans0 (Jeremy Evans) over 1 year ago
I added a pull request to fix this:
Updated by ko1 (Koichi Sasada) about 1 year ago
- Status changed from Open to Closed
Applied in changeset git|ecfa8dcdbaf60cbe878389439de9ac94bc82e034.
fix return from orphan Proc in lambda
A "return" statement in a Proc in a lambda like:
lambda{ proc{ return }.call }
should return outer lambda block. However, the inner Proc can become
orphan Proc from the lambda block. This "return" escape outer-scope
like method, but this behavior was decieded as a bug.
[Bug #17105]
This patch raises LocalJumpError by checking the proc is orphan or
not from lambda blocks before escaping by "return".
Most of tests are written by Jeremy Evans
Also available in: Atom PDF | https://bugs.ruby-lang.org/issues/17105 | CC-MAIN-2022-27 | refinedweb | 911 | 62.38 |
In a previous post, I discuss my difficulties calling some Python modules from IronPython. In particular I wanted to call SciPy from IronPython and couldn’t. The discussion following that post brought up Ironclad as a possible solution. I wanted to learn more about Ironclad, and so I invited William Reade to write a guest post about the project. I want to thank William for responding to my request with a very helpful article. — John
Hi! My name’s William Reade, and I’ve spent the last year or so working on Ironclad, an open-source project which helps IronPython to inter-operate better with CPython. Michael Foord recently introduced me to our host John, who kindly offered me the opportunity to write a bit about my work and, er, how well it works. So, here I am.
To give you a little bit of context, I’ve been working at Resolver Systems for several years now; our main product, Resolver One, is a spreadsheet with very tight IronPython integration. We like to describe it as a “Pythonic spreadsheet”, and that’s clearly a concept that people like. However, when people think of a “Pythonic spreadsheet”, they apparently expect it to work with popular Python libraries — such as NumPy and SciPy — and we found that IronPython’s incompatibility put us at a serious disadvantage. And, for some reason, nobody seemed very keen to solve the problem for us, so we had to do it ourselves.
The purpose of Ironclad is to allow you to use Python C extensions (of which there are many) from inside IronPython without recompiling anything. The secret purpose has always been to get NumPy working in Resolver One, and in release 1.4 we finally achieved this goal. Although the integration is still alpha level, you can import and use NumPy inside the spreadsheet grid and user code: you can see a screencast about the integration here.
However, while Resolver One is a great tool, you aren’t required to use it to get the benefits: Ironclad has been developed completely separately, has no external dependencies, and is available under an open source license. If you consider yourself adequately teased, keep reading for a discussion of what Ironclad actually does, what it enables you to do, and where it’s headed.
As you may know, Python is written in C and IronPython is written in C#. While IronPython is an excellent implementation of Python, it works very differently under the hood, and it certainly doesn’t have anything resembling Python’s API for writing C extensions. However, Ironclad can work around this problem by loading a stub DLL into an IronPython process which impersonates the real
python25.dll, and hence allows us to us intercept the CPython API calls. We can then ensure that the appropriate things happen in response to those calls … except that we use IronPython objects instead of CPython ones.
So long as we wrap IronPython objects for consumption by CPython, and vice versa, the two systems can coexist and inter-operate quite happily. Of course, the mix of deterministic and non-deterministic garbage collection makes it a little tricky [1] to ensure that unreferenced objects — and only unreferenced objects — die in a timely manner, and there are a number of other dark corners, but I’ve done enough work to confidently state that the problem is “just” complex and fiddly. While it’s not the sort of project that will ever be finished, it hopefully is the sort that can be useful without being perfect.
The upshot of my recent work is that you can now download Ironclad, type ‘
import ironclad; import scipy‘ in an IronPython console, and it will Just Work [2]. I am programmer, hear me roar!:
C:devironclad-headbuild>ipy IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053 Type "help", "copyright", "credits" or "license" for more information. >>> import ironclad >>> from scipy.special import erf Detected scipy import faking out numpy._import_tools.PackageLoader Detected numpy import faking out modules: mmap, nosetester, parser >>> erf(0) 0.0 >>> erf(0.1) 0.1124629160182849 >>> erf(1) 0.84270079294971478 >>> erf(10) 1.0
Numerical integration also seems to work pretty well, even for tricky cases (note that the quad function returns a tuple of (result, error)):
>>> from scipy.integrate import quad >>> quad(erf, 0, 1) (0.48606495811225592, 5.3964050795968879e-015) >>> quad(erf, -1, 1) (0.0, 1.0746071094349994e-014) >>> from scipy import inf >>> quad(erf, -inf, inf) (0.0, 0.0) >>> quad(erf, 0, inf) # ok, this one is probably more of a 'stupid' case Warning: The integral is probably divergent, or slowly convergent. (-1.564189583542768, 3.2898350710297564e-010)
And, while this exposes a little import-order wart, we can re-implement
erf in terms of the normal CDF, and see that we get pretty similar results:
>>> from scipy import misc # shouldn't really be necessary - sorry :) >>> from scipy.stats.distributions import norm >>> import numpy as np >>> def my_erf(x): ... y = norm.cdf(x * np.sqrt(2)) ... return (2 * y) - 1 ... >>> my_erf(0.1) 0.11246291601828484 >>> my_erf(1) 0.84270079294971501 >>> quad(my_erf, 0, 1) (0.48606495811225597, 5.3964050795968887e-015) >>> quad(my_erf, -inf, inf) (2.8756927650058737e-016, 6.1925307417506635e-016)
I also know that it’s possible to run through the whole Tentative NumPy Tutorial [3] with identical output on CPython and IronPython [4], and the SciPy tutorial appears to work equally well in both environments [5]. In short, if you’re trying to do scientific computing with IronPython, Ironclad is now probably mature enough to let you get significant value out of SciPy/NumPy.
However, I can’t claim that everything is rosy: Ironclad has a number of flaws which may impact you.
- It won’t currently work outside Windows, and it won’t work in 64-bit processes. However, NumPy itself doesn’t yet take advantage of 64-bit Windows. I’ll start work on this as soon as it’s practical; for now, it should be possible to run in 32-bit mode without problems.
- Performance is generally poor compared to CPython. In many places it’s only a matter of a few errant microseconds — and we’ve seen NumPy integration deliver some great performance benefits for Resolver One — but in pathological cases it’s worse by many orders of magnitude. This is another area where I would really like to hear back from users with examples of what needs to be faster.
- Unicode data doesn’t work, and I don’t plan to work on this problem because it’ll disappear when IronPython catches up to Python 3000. At that point both systems will have Unicode strings only, instead of the current situation where I would have to map one string type on one side to two string types on the other.
- NumPy’s
distutilsand
f2pysubpackages don’t currently work at all, and nor do memory-mapped files.
- Plenty of other CPython extensions work, to a greater or lesser extent, but lots won’t even import.
However, just about every problem with Ironclad is fixable, at least in theory: if you need it to do something that it can’t, please talk to me about it (or even send me a patch!).
Footnotes
[1] CPython uses reference counting to track objects’ states, and deletes them deterministically the moment they become unreferenced, while .NET uses a more advanced garbage collection strategy which unfortunately leads to non-deterministic finalization.
[2] Assuming you have the directories containing the
ironclad,
numpy and
scipy packages already on your
sys.path, at any rate. I personally just install everything for Python 2.5, and have added the CPython install’s ‘
Dlls‘ and ‘
lib/site-packages‘ subdirectories to my
IRONPYTHONPATH.
[3] Apart from the
matplotlib/pylab bit, but even that should be workable with a little extra setup if you don’t mind using a non-interactive back-end.
[4] Modulo PRNG output, of course.
[5] That is to say, not very well at all, but at least they go wrong in similar ways. | https://www.johndcook.com/blog/2009/03/page/2/ | CC-MAIN-2017-43 | refinedweb | 1,341 | 61.87 |
TERMIO(7) TERMIO(7)
termio, termios - general terminal interfaces
#include <termios.h>
ioctl (int fildes, int request, struct termios *arg);
ioctl (int fildes, int request, int arg);
#include <termio.h>
ioctl (int fildes, int request, struct termio *arg);
All of the asynchronous communications ports use the same general
interface, no matter what hardware is involved. The user interface to
this functionality is via the ioctl calls described below, or the POSIX
termios interface described in termios(3t). The remainder of this
section discusses the common features of the terminal subsystem which are
relevant to both of these interfaces.
Recent changes [Toc] [Back]
The termio and termios structures have been changed to support bit rates
of greater than 38400 bps. Each of these structures has two new members
c_ospeed and c_ispeed which store the output and input bit rates,
respectively. They replace the CBAUD and CIBAUD fields of the c_cflag
member. CBAUD and CIBAUD should no longer be modified or examined by
applications. (Because no current SGI hardware supports setting input
and output to different rates, c_ispeed is currently unsupported.
Applications should either not modify it, or should set it to the same
value as c_ospeed.)
Unlike CBAUD and CIBAUD, c_ospeed and c_ispeed encode bit rates as plain
integers. To set a bit rate of 38400 bits per second, an application
would set c_ospeed to the integer value 38400. For convenience, macros
such as B38400 have been provided for several common bit rates.
Note that the capabilities of various serial port hardware differ; many
still do not support rates greater than 38400 bps (see serial(7) for more
information on different serial port types.) Applications therefore need
to check the return values of library calls that attempt to set bit rates
(such as ioctl described here) , because the calls may now fail in more
situations than before.
Controlling Terminal [Toc] [Back]
When a terminal file is opened, it normally causes the process to wait
until a connection is established. In practice, users' programs seldom
open terminal files; they are opened by the system and become a user's
standard input, output and error files. The very first terminal file
Page 1
TERMIO(7) TERMIO(7)
opened by the session leader which is not already associated with a
session becomes the controlling terminal for the session.
If a process does not wish to acquire the terminal as a controlling
terminal (as is the case with many daemons that open /dev/console), the
process should add the O_NOCTTY flag into the second argument bitmask to
open(2).
The controlling terminal is inherited by the child process during a
fork(2). A process can break this association by changing its session
using setsid(2). (Currently, this also happens if a process issues a
System V setpgrp() or BSDsetpgrp(mypid, 0). This provides backward
compatibility with SVR3 and BSD4.3).
When a session leader that has a controlling terminal exits, the SIGHUP
signal will be sent to each process in the foreground process group of
the controlling terminal and the controlling terminal will be
disassociated from the current session. This allows the terminal to be
acquired by a new session leader. Subsequent access to the terminal by
other processes in the earlier session will fail, returning the error
code EIO.
Session Management (Job Control) [Toc] [Back]
A controlling terminal will designate one of the process groups in the
session associated with it as the foreground process group. All other
process groups in the session are designated as background process
groups. The foreground process group plays a special role in handling
signal-generating input characters, as discussed below. By default, when
a controlling terminal is allocated, the controlling process's process
group is assigned as the foreground process group.
Background process groups in the controlling process's session are
subject to a job control line discipline when they attempt to access
their controlling terminal. Typically, they will be sent signals that
will cause them to stop, unless they have made other arrangements. An
exception is made for members of orphaned process groups. When a member
of an orphaned process group attempts to access its controlling terminal,
an error is returned since there is no process to continue it should it to its
controlling terminal and the TOSTOP bit is set in the c_lflag field (see
below), its process group will be sent a SIGTTOU signal, which will
normally cause the members of that process group to stop. If, however,
the process is ignoring or holding SIGTTOU, the write will succeed. If
Page 2
TERMIO(7) TERMIO(7)
the process is not ignoring or holding SIGTTOU and is a member of an
orphaned process group, the write will fail with errno set to EIO, and no
signal will be sent.
If a member of a background process group attempts to invoke an ioctl()
on its controlling terminal, and that ioctl() will modify terminal
parameters (e.g. TCSETA, TCSETAW, TCSETAF, or TIOCSPGRP), and the TOSTOP
bit is set in the c_lflag field, ioctl() will fail with
errno set to EIO, and no signal will be sent.
Input Processing and Reading Characters
A terminal associated with one of these files ordinarily operates in
full-duplex mode. Characters may be typed at any time, even while output
is occurring, and are only lost when the system's character input buffers
become completely full (which is rare) or when the user has accumulated
the maximum allowed number of input characters that have not yet been
read by some program. Currently, this limit is {MAX_CANON} characters
(see pathconf(2)). When the input limit is reached, the buffer is
flushed and all the saved characters are thrown away without notice.
Canonical Mode Input Processing
Normally, terminal input is processed in units of lines. A line is
delimited by a new-line , however, necessary to read a
whole line at once; any number of characters may be requested in a read,
even one, without losing information.
During input, erase and kill processing is normally done. The ERASE
character (Control-H) erases the last character typed. The WERASE
character (Control-W) erases the last ``word'' typed in the current input
line (but not any preceding spaces or tabs). A ``word'' is defined as a
sequence of non-blank characters, with tabs counted as blanks. Neither
ERASE or WERASE will erase beyond the beginning of the line. The KILL
character (Control-U) kills (deletes) the entire input line, and
optionally outputs a new-line character. All these characters operate on
a key-stroke basis, independently of any backspacing or tabbing that may
have been done. The REPRINT character (Control-R) prints a newline
followed by all unread characters. The characters are reprinted as if
they were being echoed; consequently if the ECHO flag is not set (see
below), they are not printed. The ERASE, WERASE, KILL and REPRINT
characters may be changed.
Non-canonical Mode Input Processing [Toc] [Back]
In non-canonical mode input processing, input characters are not
assembled into lines, and erase and kill processing does not occur. The
Page 3
TERMIO(7) TERMIO(7)
MIN and TIME values are used to determine how to process the characters
received.
MIN represents the minimum number of characters that should be received
when the read is satisfied (i.
Case B: MIN > 0, TIME = 0.
Case D: MIN = 0, TIME = 0
In this case, return is immediate. The minimum of either the number of
characters requested or the number of characters currently available is
returned without waiting for more characters to be input.
Page 4
TERMIO(7) TERMIO(7)
Writing Characters [Toc] [Back]
When one or more characters are written, they are transmitted to the
terminal as soon as previously-written characters have finished typing.
Input characters are echoed by putting them in the output queue as they
arrive. If a process produces characters more rapidly than they can be
typed, it will be suspended when its output queue exceeds some limit.
When the queue has drained down to some threshold, the program is
resumed.
Special Characters [Toc] [Back]
Certain characters have special functions on input. These functions and
their default character values are summarized as follows:
INTR (Typically, rubout or ASCII DEL) generates an interrupt
signal SIGINT which is sent to all foreground processes with
the associated controlling terminal. Normally, each such
process is forced to terminate, but arrangements may be made
either to ignore the signal or to receive a trap to an
agreed-upon location; see signal(2).
QUIT (Typically, control-\ or ASCII FS) generates a quit signal
SIGQUIT. Its treatment is identical to the interrupt signal
except that, unless a receiving process has made other
arrangements, it will not only be terminated, but a core
image file (called core) will be created in the current
working directory.
ERASE (Typically, control-H or backspace) erases the preceding
character. It will not erase beyond the start of a line, as
delimited by a NL, EOF, EOL, or EOL2 character.
KILL (Typically, control-U) deletes the entire line, as delimited
by a NL, EOF, EOL, or EOL2 character.
EOF (Typically, control-D or ASCII EOT) may be used to generate
an end-of-file from a terminal. When received, all the
characters waiting to be read are immediately passed to the
program, without waiting for a new-line, and the EOF is
discarded. Thus, if there are no characters waiting, which
is to say the EOF occurred at the beginning of a line, zero
characters will be passed back, which is the standard endof-file
indication.
NL (ASCII LF) is the normal line delimiter. It can not be
changed or escaped.
EOL (Typically, ASCII NUL) is an additional line delimiter, like
NL. It is not normally used.
EOL2 is another additional line delimiter.
Page 5
TERMIO(7) TERMIO(7)
STOP (Typically, control-S or ASCII DC3) can be used to
temporarily suspend output. It is useful with CRT terminals
to prevent output from disappearing before it can be read.
While output is suspended, STOP characters are ignored and
not read.
START (Typically, control-Q or ASCII DC1) is used to resume output
which has been suspended by a STOP character. While output
is not suspended, START characters are ignored and not read.
The START/STOP characters can not be changed or escaped in
LDISC0 (see ``Termio Structure'' below).
The following characters have special functions on input when the POSIX
termios interface is used or when the System V termio interface is used
and the line discipline is set to the default of LDISC1 (see ``Termio
Structure'' below). These functions and their default character values
are summarized as follows:
SUSP (Control-Z or ASCII SUB) generates a SIGTSTP signal which
stops all processes in the foreground process group for that
terminal.
DSUSP (Control-Y or ASCII EM) generates a SIGTSTP signal as SUSP
does, but the signal is sent when a process in the foreground
process group attempts to read the DSUSP character, rather
than when it is typed.
LNEXT (Control-V or ASCII SYN) causes the next character input to
treated literally.
WERASE (Control-W or ASCII ETB) erases the preceding white spacedelimited
word. It will not erase beyond the start of a
line, as delimited by a NL, EOF, EOL, or EOL2 character.
REPRINT (Control-R or ASCII DC2) reprints all characters, preceded by
a newline, that have not been read.
FLUSH (Control-O or ASCII SI) when typed during output causes all
subsequent output to be discarded. Typing any character reenables
output. This character is also known by the POSIX
name DISCARD
The character values for INTR, QUIT, ERASE, WERASE, KILL, REPRINT, EOF,
EOL, EOL2, SUSP, DSUSP, STOP, START, FLUSH/DISCARD, and LNEXT may be
changed to suit individual tastes (see stty(1)). If the value of a
special control character is CNUL or _POSIX_VDISABLE, the function of
that special control character is disabled. The ERASE, KILL, and EOF
characters may be entered literally in LDISC0 (see ``Termio Structure''
below), by preceding them with the escape character (\), in which case no
special function is done and the escape character is not read. Any of
the special characters may be entered literally in the termios interface
or if the termio interface line discipline is set to LDISC1 (see ``Termio
Page 6
TERMIO(7) TERMIO(7)
Structure'' below), by preceding them with the LNEXT character, in which
case no special function is done and the LNEXT character is not read.
Modem Disconnect [Toc] [Back]
When a modem disconnect is detected, and if CLOCAL is not set in the line
discipline mode (see the discussion of the c_cflag field below), a SIGHUP
signal is sent to the terminal's controlling process. Unless other
arrangements have been made, this signal causes the process to terminate.
If SIGHUP is ignored or caught, any subsequent read returns with an
end-of-file indication until the terminal is closed. Thus, programs that
read a terminal and test for end-of-file can terminate appropriately
after a disconnect. Any subsequent write will return -1 and set errno to
EIO until the device is closed.
If the controlling process is not in the foreground process group of the
terminal, a SIGTSTP is sent to the terminal's foreground process group.
Unless other arrangements have been made, this signal causes.
Terminal Parameters [Toc] [Back]
The parameters that control the behavior of devices and modules providing
the termios interface are specified by the termios structure defined by
<termios.h>. Several ioctl(2) system calls that fetch or change these
parameters use this structure, which contains the following members:
struct termios {
tcflag_t c_iflag; /* input modes */
tcflag_t c_oflag; /* output modes */
tcflag_t c_cflag; /* control modes */
tcflag_t c_lflag; /* local modes */
speed_t c_ospeed; /* output speed */
speed_t c_ispeed; /* input speed; not supported */
cc_t c_cc[NCCS]; /* control chars */
};
The special control characters are defined by the array c_cc. The
symbolic name NCCS is the size of the control-character array and is also
defined by <termios.h>. All space in the array is reserved or used as
described below. The relative positions, subscript names, and normal
default values for each function are as follows:
Page 7
TERMIO(7) TERMIO(7)
0 VINTR CINTR (DEL)
1 VQUIT CQUIT (Control-\)
2 VERASE CERASE (Control-H (Backspace))
3 VKILL CKILL (Control-U)
4 VEOF CEOF (Control-D)
4 VMIN
5 VEOL CEOL (NUL)
5 VTIME
6 VEOL2 CEOL2 (NUL))
Input Modes [Toc] [Back]
The c_iflag field describes the basic terminal input control. The
values, functions, and symbolic names of the bits in the c_iflag field
are as follows:
IGNBRK 0000001 Ignore break condition.
BRKINT 0000002 Signal interrupt on break.
IGNPAR 0000004 Ignore characters with parity errors.
PARMRK 0000010 Mark parity errors.
INPCK 0000020 Enable input parity check.
ISTRIP 0000040 Strip character.
INLCR 0000100 Map NL to CR on input.
IGNCR 0000200 Ignore CR.
ICRNL 0000400 Map CR to NL on input.
IUCLC 0001000 Map upper-case to lower-case on input.
IXON 0002000 Enable start/stop output control.
IXANY 0004000 Enable any character to restart output.
IXOFF 0010000 Enable start/stop input control.
IMAXBEL 0020000 Echo BEL on input line too long.
IGNBRK If IGNBRK is set, a break condition (a character framing
error with data all zeros) detected on input is ignored, that
is, not put on the input queue and therefore not read by any
process.
BRKINT If IGNBRK is not set and BRKINT is set, the break condition
will flush the input and output queues and if the terminal is
the controlling terminal of a foreground process group, the
break condition will generate a single SIGINT signal to that
foreground process group. If neither IGNBRK nor BRKINT is
set, a break condition is read as a single ASCII NUL
Page 8
TERMIO(7) TERMIO(7)
character, or if PARMRK is set, as: `0377', `0', `0'.
IGNPAR If IGNPAR is set, a byte with framing or parity errors (other
than break) is ignored.
PARMRK If PARMRK is set, and IGNPAR is not set, a character with a
framing or parity error (other than break) is read as the
three-character sequence: `0377', `0', `X', where X is the
data of the character received in error. To avoid ambiguity
in this case, if ISTRIP is not set, a valid character of
`0377' is read as `0377', `0377'. If neither PARMRK nor
IGNPAR is set, a framing or parity error (other than break)
is read as the single ASCII NUL character.
INPCK If INPCK is set, input parity checking is enabled. If INPCK
is not set, input parity checking is disabled. This allows
output parity generation without input parity errors.
ISTRIP If ISTRIP is set, valid input characters are first stripped
to 7-bits, otherwise all 8-bits are processed.
INLCR If INLCR is set, a received NL character is translated into a
CR character.
IGNCR If IGNCR is set, a received CR character is ignored (not
read).
ICRNL If ICRNL is set, a received CR character is translated into a
NL character.
IUCLC If IUCLC is set, a received upper-case alphabetic character
is translated into the corresponding lower-case character.
IXON If IXON is set, start/stop output control is enabled. A
received STOP character will suspend output and a received
START character will restart output. The STOP and START
characters will not be read, but will mearly perform flow
control functions.
IXANY If IXANY is set, any input character will restart output that
has been suspended.
IXOFF If IXOFF is set, the system will transmit START/STOP
characters when the input queue is nearly empty/full.
IMAXBEL If IMAXBEL is set, the ASCII BEL character is echoed if the
input stream overflows. Further input is discarded, but any
input already present in the input stream is preserved.
Output Modes [Toc] [Back]
Page 9
TERMIO(7) TERMIO(7)
The c_oflag field specifies the system treatment of output. The values,
functions, and symbolic names of the bits and subfields in the c_oflag
field are as follows:
OPOST 0000001 Postprocess output.
OLCUC 0000002 Map lower case to upper on output.
ONLCR 0000004 Map NL to CR-NL on output.
OCRNL 0000010 Map CR to NL on output.
ONOCR 0000020 No CR output at column 0.
ONLRET 0000040 NL performs CR function.
OFILL 0000100 Use fill characters for delay.
OFDEL 0000200 Fill is DEL, else NUL.
NLDLY 0000400 Select new-line delays:
NL0 0
NL1 0000400
CRDLY 0003000 Select carriage-return delays:
CR0 0
CR1 0001000
CR2 0002000
CR3 0003000
TABDLY 0014000 Select horizontal-tab delays:
TAB0 0
TAB1 0004000
TAB2 0010000
TAB3 0014000 Expand tabs to spaces.
BSDLY 0020000 Select backspace delays:
BS0 0
BS1 0020000
VTDLY 0040000 Select vertical-tab delays:
VT0 0
VT1 0040000
FFDLY 0100000 Select form-feed delays:
FF0 0
FF1 0100000
OPOST If OPOST is set, output characters are post-processed as
indicated by the remaining flags, otherwise characters are
transmitted without change.
OLCUC If OLCUC is set, a lower-case alphabetic character is
transmitted as the corresponding upper-case character. This
function is often used in conjunction with IUCLC.
ONLCR If ONLCR is set, the NL character is transmitted as the CR-NL
character pair.
OCRNL If OCRNL is set, the CR character is transmitted as the NL
character.
ONOCR If ONOCR is set, no CR character is transmitted when at
column 0 (first position).
Page 10
TERMIO(7) TERMIO(7)
ONLRET If ONLRET is set, the NL character is assumed to do the
carriage-return function; the column pointer will be set to 0
and the delays specified for CR will be used. Otherwise the
NL character is assumed to do just the line-feed function;
the column pointer will remain unchanged. The column pointer
is also set to 0 if the CR character is actually transmitted.
OFILL If OFILL is set, fill characters will be transmitted for
delay instead of a timed delay. This is useful for high baud
rate terminals which need only a minimal delay.
OFDEL If OFDEL is set, the fill character is DEL, otherwise NUL.
The delay bits specify how long transmission stops to allow for
mechanical or other movement when certain characters are sent to the
terminal. In all cases a value of 0 indicates no delay.
The actual delays depend on line speed and system load.
NLDLY Newline delay type 0 (NL0) selects no delay. Newline delay
type 1 (NL1) lasts about 0.10 seconds. If ONLRET is set, the
carriage-return delays are used instead of the new-line
delays. If OFILL is set, two fill characters will be
transmitted.
CRDLY Carriage-return delay type 0 (CR0) selects no delay.
Carriage-return delay type 1 (CR1) is dependent on the
current column position, type 2 (CR2) is about 0.10 seconds,
and type 3 (CR3) is about 0.15 seconds. If OFILL is set,
delay type 1 transmits two fill characters, and type 2, four
fill characters.
TABDLY Horizontal-tab delay type 0 (TAB0) selects no delay.
Horizontal-tab delay type 1 (TAB1) is dependent on the
current column position. Type 2 (TAB2) is about 0.10
seconds. Type 3 (TAB3) specifies that tabs are to be
expanded into spaces. If OFILL is set, two fill characters
will be transmitted for any delay.
BSDLY Backspace delay type 0 (BS0) selects no delay. Backspace
delay type 1 (BS1) lasts about 0.05 seconds. If OFILL is
set, one fill character will be transmitted.
VTDLY Vertical-tab delay type 0 (VT0) selects no delay. Verticaltab
delay type 1 (VT1) lasts about 2.0 seconds.
FFDLY Form-feed delay type 0 (FF0) selects no delay. Form-feed
delay type 0 (FF0) lasts about 2.0 seconds.
Control Modes [Toc] [Back]
Page 11
TERMIO(7) TERMIO(7)
The c_cflag field describes the hardware control of the terminal. The
values, functions, and symbolic names of the bits and subfields in the
c_cflag field are as follows:
CBAUD 000000017 No longer supported; see "Old termio" below.
CSIZE 000000060 Character size:
CS5 0 5 bits
CS6 000000020 6 bits
CS7 000000040 7 bits
CS8 000000060 8 bits
CSTOPB 000000100 Send two stop bits, else one.
CREAD 000000200 Enable receiver.
PARENB 000000400 Parity enable.
PARODD 000001000 Odd parity, else even.
HUPCL 000002000 Hang up on last close.
CLOCAL 000004000 Local line, else dial-up.
RCV1EN 000010000 Not supported.
XMT1EN 000020000 Not supported.
LOBLK 000040000 Block layer output.
XCLUDE 000100000 Not supported.
CIBAUD 003600000 Not supported.
PAREXT 004000000 Not supported.
CNEW_RTSCTS 010000000 Use RTS/CTS flow control
CSIZE The CSIZE bits specify the character size in bits for both
transmission and reception. This size does not include the
parity bit, if any.
CSTOPB If CSTOPB is set, two stop bits are used, otherwise one
stop bit. For example, at 110 baud, two stops bits are
required.
CREAD If CREAD is set, the receiver is enabled. Otherwise no
characters will be received.
PARENB If PARENB is set, parity generation and detection is
enabled and a parity bit is added to each character.
PARODD If parity is enabled, the PARODD flag specifies odd parity
if set, otherwise even parity is used.
HUPCL If HUPCL is set, the line will be disconnected when the
last process with the line open closes it or terminates.
That is, the data-terminal-ready signal will not be
asserted.
CLOCAL If CLOCAL is set, the line is assumed to be a local, direct
connection with no modem control. Otherwise modem control
is assumed.
Page 12
TERMIO(7) TERMIO(7)
LOBLK If LOBLK is set, the output of a job control layer will be
blocked when it is not the current layer. Otherwise the
output generated by that layer will be multiplexed onto the
current layer.
CNEW_RTSCTS If CNEW_RTSCTS is set, and the communications port supports
it, RTS/CTS handshaking will be used. When the input queue
becomes nearly full, RTS will be dropped. RTS will be
reasserted when the input queue has drained sufficiently.
Output is suspended when CTS is lowered and restarted when
CTS is raised. This flag is automatically set on the ttyf
serial port devices; see serial(7).
Local Modes [Toc] [Back]
The c_lflag field of the argument structure is used by the line
discipline to control terminal functions. The following flags are
currently defined:
ISIG 0000001 Enable signals.
ICANON 0000002 Canonical input (erase and kill processing).
XCASE 0000004 Canonical upper/lower presentation.
ECHO 0000010 Enable echo.
ECHOE 0000020 Echo erase character as BS-SP-BS.
ECHOK 0000040 Echo NL after kill character.
ECHONL 0000100 Echo NL.
NOFLSH 0000200 Disable flush after interrupt or quit.
IEXTEN 0000400 Enable extended functions (not used by IRIX).
ECHOCTL 0001000 Echo control characters as ^char, delete as ^?.
ECHOPRT 0002000 Echo erase character as character erased.
ECHOKE 0004000 BS-SP-BS entire line on line kill.
FLUSHO 0020000 Output being flushed.
PENDIN 0040000 Retype pending input at next read or input char.
TOSTOP 0100000 Send SIGTTOU for background output.
ISIG If ISIG is set, each input character is checked against the
special control characters INTR, SUSP, DSUSP, and QUIT. If an
input character matches one of these control characters, the
function associated with that character is performed. If
ISIG is not set, no checking is done. Thus these special
input functions are possible only if ISIG is set. These
functions may be disabled individually by changing the value
of the control character to CNUL or _POSIX_VDISABLE
ICANON If ICANON is set, canonical processing is enabled. This
enables the erase and kill edit functions, and the assembly
of input characters into lines delimited by NL, EOF, EOLand
EOL2. If ICANON is not set, read requests are satisfied
directly from the input queue. A read will not be satisfied
until at least MIN characters have been received or the
timeout value TIME has expired between characters. This
allows fast bursts of input to be read efficiently while
Page 13
TERMIO(7) TERMIO(7)
still allowing single character input. The MIN and TIME
values are stored in the position for the EOF and EOL
characters, respectively. The time value represents tenths
of seconds.
XCASE If XCASE is set, and if ICANON is set, an upper-case letter
is accepted on input by preceding it with a \ character, and
is output preceded by a \ character. In this mode, the
following escape sequences are generated on output and
accepted on input:
for: use:
` \'
| \!
~ \^
{ \(
} \)
\ \\
For example, ``A'' is input as ``\a'', ``\n'' as ``\\n'', and
``\N'' as ``\\\n''.
ECHO If ECHO is set, characters are echoed as received.
When ICANON is set, the following echo functions are possible.
ECHOE If ECHO and ECHOE are set, and ECHOPRT is not set, the ERASE
and WERASE characters are echoed as one or more ASCII BS SP
BS, which will clear the last character(s) from a CRT screen.
If ECHOE is set and ECHO is not set, the erase character is
echoed as ASCII SP BS.
ECHOK If ECHOK is set, and ECHOKE is not set, the NL character will
be echoed after the kill character to emphasize that the line
will be deleted. Note that an escape character or an LNEXT
character preceding the erase or kill character removes any
special function (see ``Special Characters'' above).
ECHONL If ECHONL is set, the NL character will be echoed even if
ECHO is not set. This is useful for terminals set to local
echo (so-called half duplex). Unless escaped, the EOF
character is not echoed. Because EOT is the default EOF
character, this prevents terminals that respond to EOT from
hanging up.
NOFLSH If NOFLSH is set, the normal flush of the input and output
queues associated with the INTR, QUIT, and SUSP characters
will not be done.
Page 14
TERMIO(7) TERMIO(7)
TOSTOP If TOSTOP and the
SIGTTOU signal is not sent.
ECHOCTL If ECHOCTL is set, all control characters (characters with
codes between 0 and 37 octal) other than ASCII TAB, ASCII NL,
the START character, ^?.
ECHOPRT If ECHO and ECHOPRT are set, the first ERASE or WERASE
character in a sequence echoes as a backslash (\), followed
by the characters being erased. Subsequent ERASE or WERASE
characters echo the characters being erased in reverse order.
The next non-erase character causes a slash (/) to be typed
before it is echoed.
ECHOKE If ECHOKE is set, the kill character is echoed by erasing
each character on the line from the screen (using the
mechanism selected by ECHOE and ECHOPRT).
FLUSHO If FLUSHO is set, data written to the terminal is discarded.
This bit is set when the FLUSH/DISCARD character is typed. A
program can cancel the effect of typing the FLUSH/DISCARD
character by clearing FLUSHO.
PENDIN If PENDIN is set, any input that has not yet been read is
reprinted when the next character arrives as input.
Speed [Toc] [Back]
The c_ospeed and c_ispeed fields control the output and input speeds of
the line, respectively, in bits per second (bps). No current SGI devices
support setting output and input speeds to different values, however, so
c_ispeed is not supported.
B0 0 Hang up
B50 50 50 bps
B75 75 75 bps
B110 110 110 bps
B134 134 134 bps
B150 150 150 bps
B200 200 200 bps
B300 300 300 bps
B600 600 600 bps
Page 15
TERMIO(7) TERMIO(7)
B1200 1200 1200 bps
B1800 1800 1800 bps
B2400 2400 2400 bps
B4800 4800 4800 bps
B9600 9600 9600 bps
B19200 19200 19200 bps
B38400 38400 38400 bps
B57600 57600 57600 bps
B76800 76800 76800 bps
B115200 115200 115200 bps
SSPEED B9600 Default baud rate.
The B* names are provided only for convenience; applications may use
plain integer values in c_ospeed and c_ispeed.
Note that capabilities of serial ports vary; not all devices support all
bit rates. Some devices support additional rates.
Termio Structure [Toc] [Back]
The System V termio structure is used by some ioctls; it is defined by
<sys/termio.h> and includes the following members:
struct termio {
tcflag_t c_iflag; /* input modes */
tcflag_t c_oflag; /* output modes */
tcflag_t c_cflag; /* control modes */
tcflag_t c_lflag; /* local modes */
speed_t c_ospeed; /* output speed */
speed_t c_ispeed; /* input speed; not supported */
char c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control chars */
};
The c_line field defines the line discipline used to interpret control
characters. A line discipline is associated with a family of
interpretations. For example, LDISC0 is the standard System V set of
interpretations, while LDISC1 is similar to the interpretations used in
the 4.3BSD tty driver. In LDISC1,
o additional control characters are available,
o control characters which are not editing characters are echoed as '^'
followed by the equivalent letter,
o backspacing does not back up into the prompt,
o input is re-typed when backspacing encounters a confusion between what
the user and the computer have typed, and
Page 16
TERMIO(7) TERMIO(7)
o job control is available.
The symbolic name NCCS is the size of the control-character array and is
also defined by <termio.h>. The relative positions, subscript names, and
typical default values for each function are as follows:
0 VINTR CINTR (DEL)
1 VQUIT CQUIT (Control-\)
2 VERASE CERASE (Control-H (backspace))
3 VKILL CKILL (Control-U)
4 VEOF CEOF (Control-D (EOT))
4 VMIN
5 VEOL NUL
5 VTIME
6 VEOL2 NUL
If the line discipline (c_line) is set to LDISC1, then additional control
characters are defined:)
Old termio and termios [Toc] [Back]
For compatibility with existing binaries, MIPS ABI programs, and programs
that cannot be ported to use the new termio or termios structures, the
old interfaces are retained. Existing binaries automatically use the old
interfaces. By defining _OLD_TERMIOS at compile time (before including
<termios.h>, <termio.h>, or <sys/ttydev.h>), the old interfaces are in
effect. The old termios structure is defined as follows:
struct termios {
tcflag_t c_iflag; /* input modes */
tcflag_t c_oflag; /* output modes */
tcflag_t c_cflag; /* control modes */
tcflag_t c_lflag; /* local modes */
cc_t c_cc[NCCS]; /* control chars */
};
and the old termio structure is defined as follows:
struct termio {
tcflag_t c_iflag; /* input modes */
tcflag_t c_oflag; /* output modes */
tcflag_t c_cflag; /* control modes */
Page 17
TERMIO(7) TERMIO(7)
tcflag_t c_lflag; /* local modes */
char c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control chars */
};
The members are as described above, except for c_cflag, in which CBAUD
encodes the bit rate:
CBAUD 000000017 Baud rate:
B0 0 Hang up
B50 000000001 50 baud
B75 000000002 75 baud
B110 000000003 110 baud
B134 000000004 134 baud
B150 000000005 150 baud
B200 000000006 200 baud
B300 000000007 300 baud
B600 000000010 600 baud
B1200 000000011 1200 baud
B1800 000000012 1800 baud
B2400 000000013 2400 baud
B4800 000000014 4800 baud
B9600 000000015 9600 baud
B19200 000000016 19200 baud
EXTA 000000016 External A
B38400 000000017 38400 baud
EXTB 000000017 External B
SSPEED B9600 Default baud rate.
Mixing old and new interfaces [Toc] [Back]
If a bit rate is set using the new termio or termios interfaces (or the
POSIX interfaces described in termios(3)) that cannot be represented in
the old CBAUD field, then the old termio, termios, and POSIX interfaces
will return _INVALID_BAUD in the CBAUD field. If the bit rate is set to
_INVALID_BAUD using the old interfaces, the bit rate change will be
ignored, and the actual line speed will remain unchanged. This allows
many programs that do not explicitly manage bit rates to work with the
new interfaces without change. And, it allows some old programs to work
with new, fast bit rates without change. For example, sequences similar
to the following (which are very common) work with either old or new
interfaces, even if the line is currently set to a baud rate than cannot
be represented in the old CBAUD field:
struct termio t;
ioctl(fd, TCGETA, &t);
t.c_cflag |= CREAD;
t.c_lflag &= ~ECHO;
/* t.c_cflag & CBAUD may contain _INVALID_BAUD, but, if so, */
/* this TCSETA will not affect the actual bit rate */
ioctl(fd, TCSETA, &t);
Page 18
TERMIO(7) TERMIO(7)
System Calls [Toc] [Back]
The ioctl()s supported by devices and STREAMS modules providing the
termio and termios interface are listed below.
TCGETA The argument is a pointer to a termio structure. Get the
parameters associated with the terminal and store in the
termio structure referenced by arg.
TCSETA The argument is a pointer to a termio structure. Set the
parameters associated with the terminal from the structure
referenced by arg. The change is immediate.
TCSETAW The argument is a pointer to a termio structure. Wait for
the output to drain before setting the new parameters. This
form should be used when changing parameters that will
affect output.
TCSETAF The argument is a pointer to a termio structure. Wait for
the output to drain, then flush the input queue and set the
new parameters.
TCGETS The argument is a pointer to a termios structure. Get the
parameters associated with the terminal and store in the
termios structure referenced by arg. See tcgetattr(3).
TCSETS The argument is a pointer to a termios structure. Set the
parameters associated with the terminal from the structure
referenced by arg. The change is immediate. See
tcsetattr(3).
TCSETSW The argument is a pointer to a termios structure. Wait for
the output to drain before setting the new parameters. This
form should be used when changing parameters that will
affect output. See tcsetattr(3).
TCSETSF The argument is a pointer to a termios structure. Wait for
the output to drain, then flush the input queue and set the
new parameters. See tcsetattr(3).
TCSBRK The argument is an int value. Wait for the output to drain.
If arg is 0, then send a break (zero bits for 0.25 seconds).
See tcsendbreak(3) and tcdrain(3).
TCXONC Start/stop control. The argument is an int value. If arg
is 0, suspend output; if 1, restart suspended output; if 2,
suspend input; if 3, restart suspended input. See
tcflow(3).
TCFLSH The argument is an int value. If arg is 0, flush the input
queue; if 1, flush the output queue; if 2, flush both the
input and output queues. See tcflush(3).
Page 19
TERMIO(7) TERMIO(7)
TIOCNOTTY Disconnect calling process from terminal and session.
TIOCSTI Simulate terminal input: arg points to a character which the
system pretends has been typed on the terminal.
TIOCSPGRP Set process group of tty: arg is a pointer to a pid_t which
is the value to which the process group ID for this terminal
will be set. See tcsetpgrp(3).
TIOCGPGRP Get process group of tty: arg is a pointer to a pid_t into
which is placed the process group ID of the process group
for which this terminal is the controlling terminal. See
tcgetpgrp(3).
TIOCGSID arg is a pointer to a pid_t into which is placed the session
ID of the terminal.
TIOCFLUSH If the int pointed to by arg has a zero value, all
characters waiting in input or output queues are flushed.
Otherwise, the value of the int is for the FREAD and FWRITE
bits defined in <sys/file.h>; if the FREAD bit is set, all
characters waiting in input queues are flushed, and if the
FWRITE bit is set, all characters waiting in output queues
are flushed.
TIOCMGET The argument is a pointer to an int sized bit field into
which the current state of the modem status lines is stored.
This ioctl() is supported only on special files representing
serial ports. See serial(7). The symbolic names of the
bits returned in arg are defined by <sys/termios.h>: synonym for TIOCM_CAR
TIOCM_RNG ring
TIOCM_RI synonym for TIOCM_RNG
TIOCM_DSR data set ready
Not all of these are necessarily supported by any particular
device.
TIOCMSET The argument is a pointer to an int sized bit field used to
set the state of the modem status lines. If a bit is set, the
coresponding modem status line is turned on. If a bit is
cleared the coresponding modem status line is turned off.
This ioctl() is supported only on special files representing
Page 20
TERMIO(7) TERMIO(7)
serial ports. See serial(7). The symbolic names of the bits
used in arg are the same as for TIOCMGET. Only DTR and RTS
are settable with this ioctl(). Not all of these are
necessarily supported by any particular device.
TIOCGWINSZ Get window size: arg is a pointer to a structure of the
following form: Window size structure:
struct winsize {
unsigned short ws_row; /* rows, in chars */
unsigned short ws_col; /* columns, in chars */
unsigned short ws_xpixel; /* horiz. pixels */
unsigned short ws_ypixel; /* vert. pixels */
};
TIOCSWINSZ Set window size: arg is a pointer to a structure of a winsize
structure.
FIONREAD Return the number of bytes currently available to read. arg
is a pointer to an int.
FIONBIO Enables or disables non-blocking mode, according to the
boolean value of the contents of arg. arg is a pointer to an
int. Enabling this mode has the same effect as the O_NDELAY
flag for open(2).
The following ioctl calls apply only to pseudo terminals; see pty(7M) for
their descriptions:
TIOCPKT, TIOCPKT_DATA, TIOCPKT_FLUSHREAD, TIOCPKT_FLUSHWRITE,
TIOCPKT_STOP, TIOCPKT_START, TIOCPKT_NOSTOP and TIOCPKT_DOSTOP.
Of the ioctl commands listed above, all except TCGETA and TCGETS alter
the state of the terminal. For this reason, a background job which
issues any of commands except TCGETA or TCGETS will be suspended. Refer
to cs
for more information about job control.
/dev/tty*
stty(1), fork(2), ioctl(2), setsid(2), setpgrp(2), signal(2), tcdrain(3),
tcflow(3), tcflush(3), tcgetattr(3), tcgetpgrp(3), tcsendbreak(3),
tcsetattr(3), tcsetpgrp(3), pty(7M), serial(7), termios(3)
PPPPaaaaggggeeee 22221111 | http://nixdoc.net/man-pages/IRIX/man7/termio.7.html | CC-MAIN-2019-26 | refinedweb | 6,576 | 62.27 |
Introduction
When I was working for my SharePoint project, the requirement for a special feature
is requrested. The requirement was to use a only one list for search and provide
only that list's information in search results. At the time, I've to find the
solution and I came across the Search Scope in the Site Settings of the SharePoint
Site. Here in this article I explain how to configure new search scope for a
particular list in web site and how to use it in the search and custom web part.
Assumptions
I assume that the reader of this article is familiar to with Visual Studio 2008 and
WSPBuilder project templates and SharePoint sites. Also considered the would
be familiar how to enabl/disable features. Programming language is C#. Also the
SharedService required for this article.
Assembly References
Microsoft.Office.Server.Search .NET assembly
Preparation
Create a new WSPBuilder Project using Visual Studio 2008.
Add references to the Microsoft.Office.Server.Search .NET assembly.
Add the Web Part Feature item template to the project.
This will create a 12 hive folder structure and add the feature which is used to
add the web part to the site when that feature is activated.
Open the .cs file from WebPartCode folder from Solution Explorer.
Add using statements for Microsoft.SharePoint, Microsoft.Office.Server.Search.WebControls,
System.Web.UI.WebControls, Microsoft.SharePoint.Utilities, System.Text namespaces.
Clear the default code provided by the template from the class definition, if you
have used the WSP Builder template.
Add the following lines of code at the beginning of the class.
private bool _error = false;
private string _searchScope = null;
CoreResultsWebPart m_theResults = null;
private TextBox m_txtSearch = null;
private SPWeb m_theWeb;
private Button m_btnSearch;
private Table m_theTable;
Add the following property code to the class. This property is used as the web part
property. The SearchScope property provides the search Scope name to use for
search.
[Personalizable(PersonalizationScope.Shared)]
[WebBrowsable(true)]
[WebDisplayName("Search Scope Name")]
[WebDescription("Name of the search scope to be used.")]
public string SearchScope
{
get
{
if (string.IsNullOrEmpty(_searchScope))
{
return string.Empty;
}
return _searchScope;
}
set { _searchScope = value; }
}
Add the constructor for the class as following. The current context web object is
used to get the current web site for the web part.
public CustomSearchScopeWebPart()
{
this.ExportMode = WebPartExportMode.All;
m_theWeb = SPContext.Current.Web;
}
Now override the CreateChildControls of the base class and write the code to create
and add the content controls. [As like below].
protected override void CreateChildControls()
{
if (!_error)
{
try
{
base.CreateChildControls();
this.createMainTable();
this.m_theTable.Rows.Add(this.trCreateSearchBoxRow());
this.m_theTable.Rows.Add(this.trCreateSearchResultsRow());
}
catch (Exception ex)
{
HandleException(ex);
}
}
}
In the above code the method createMainTable() will initializes the main container
table object, sets its properties and add that table to the controls collection
of the web part. The method trCreateSearchBoxRow() initializes the search box
and search button controls and adds them to the table row and returns the table
row object. The method trCreateSearchResultsRow() will initializes and add the
CoreSearchResult web part object and add it to the table row and returns the
table row object.
The CoreSearchResultsWebPart object takes the search keyword and other information
from the query string of the url and searchs the results and displays on the
page. So, we just have to add the search keyword and search scope name to the
query string and the redirect to the search page or to the same page to get the
search result, which I've done for this example.
Code for trCreateSearchBoxRow() method is as follows:
private TableRow trCreateSearchBoxRow()
{
TableRow row = new TableRow();
TableCell cellKeywordText = new TableCell();
cellKeywordText.CssClass = "ms-formlabel";
cellKeywordText.Controls.Add(new LiteralControl("Search keyword: "));
row.Cells.Add(cellKeywordText);
m_txtSearch = new TextBox();
m_txtSearch.ID = "txtSearch";
m_txtSearch.CssClass = "ms-long";
cellKeywordText.Controls.Add(m_txtSearch);
if (this.Context.Request.QueryString["k"] != null)
m_txtSearch.Text = this.Context.Request.QueryString["k"];
m_btnSearch = new Button();
m_btnSearch.Text = "Search";
m_btnSearch.ID = "btnSearch";
m_btnSearch.Click += new EventHandler(m_btnSearch_Click);
m_btnSearch.Attributes["onclick"] = "return ConfirmSearchValue()";
cellKeywordText.Controls.Add(new LiteralControl(" "));
cellKeywordText.Controls.Add(m_btnSearch);
return row;
}
Code for trCreateSearchResultsRow() method is as follows:
private TableRow trCreateSearchResultsRow()
{
TableRow row = new TableRow();
TableCell cell = new TableCell();
cell.ColumnSpan = 2;
cell.Style.Add(HtmlTextWriterStyle.PaddingLeft, "5px");
row.Cells.Add(cell);
m_theResults = new CoreResultsWebPart();
cell.Controls.Add(m_theResults);
return row;
}
Now override the Render method of the base class and add the javascript element for
validation of key word as shown below
protected override void Render(HtmlTextWriter writer)
{
writer.Write(this.createValidationScript());
base.Render(writer);
}
/// <summary>
/// Adds the search text box validation javascript to the page.
/// </summary>
/// <returns></returns>
private string createValidationScript()
{
StringBuilder sb = new StringBuilder();
sb.Append("<script type=\"text/javascript\" language=\"javascript\">");
sb.Append("function ConfirmSearchValue(){");
sb.AppendFormat("if(document.getElementById('{0}').value == '')", m_txtSearch.ClientID);
sb.Append("{");
sb.Append("alert('Please enter one or more search words.'); return false;");
sb.Append("}");
sb.Append("return true;");
sb.Append("}");
sb.Append("</script>");
return sb.ToString();
}
Now build the solution and resolve any errors.
After successful build of the solution, build the WSP file by right clicking the
Project Name in Solution Explorer and selecting "Build WSP" context
menu item.
After successful build of the WSP file, deploy that solution to the SharePoint by
right clicking the Project Name in Solution Explorer and selecting "Deploy"
context menu item.
Now before adding the web part to the page we need to configure the search scope
for the site. So, let's do that with following steps.
Open you site in IE.
Go to Site Settings.
Click the "Search Scope" link in the "Site Collection Administration".This
will take you to the View Scopes page as displayed in below image.
Click on "New Scope" link on top toolbar.
On the "Create Scope" page [as displayed in below image], provide the title
and description [optional] for the scope. Leave other things as it is and click
Ok.
Thsi will create new search scope, and takes you to the View Scopes page.
Now click on the search scope name link in the Title column. This will take you to
the Scope Properties and Rules page. [As displayed in below image]
In the Rules section, click on New rule link.
This will take you to the "Add Scope Rule" page. [As displayed in below
image]
Click on "Web Address" radio buttion in the "Scope Rule Type".
This will display "Web Address" section. [As displayed in above image
at step 40.]
By default "Folder" radio button is selected and we will use this for our
work out. Enter the url of the list for which you are configuring the search
scope. For my example I entered "",
for Employees list.
Leave other settings as it is and click Ok.
This way we've added a rule for the search scope.
You can add more rules to the single search scope.
When you scheduled search crawl runs, after that your new created search scope will
be used in search.
To manually start the search crawl follow the below steps.
Open SharePoint 3.0 Central Administration.
Click on the link for SharedServices if any.
On Shared Services page click on "Search settings" in "Search"
section.
On "Configure Search Settings" click on "Content sources and crawl
schedules" link.
On "Manage Content Sources" right click "Local Office SharePoint Server
Sites" in the Name column and click "Start Full Crawl". This will
the start the full crawl for the SharePoint and sets the "Status" to
"Crawling Full". Frequently Refresh the page and wait for the status
to be "Idle".
Afther the status gets "Idle", go to your site. Before adding the web part
to the web part we need to activate the feature which will add the web part to
the web part gallary for the site. [As we have used the Web Part feature item
template for this project].
To enable the feature go to Site Settings and go to "Site collection features"
page by clicking "Site collection features" link in "Site Collection
Administration".
On Site Collection Features page find your web part feature and Activate it.
If you have configured your web part's scope to Web, then you need to go for "Site
features".
Now, create a new web part page and add that web part on the page.
As, we have created the Searc Scope property for the web part. First don't set that
web part and try to search for any keyword by entering the word in search box.
At this stage you will get the search results from many of the list if your key word
matches.
Now edit the page and set the web part's Searc Scope property to new name of your
created search scope.
Now try to find the keyword and you will get the results only from your configured
list.
Summary
This type of criteria is useful when you are branding your site as well as only particular
list are used for search results. Hope this will help you a lot. You can download
the fully working source code from below link.
Source code
CustomSearchScope | http://www.nullskull.com/a/1511/search-scope-for-sharepoint-web-site.aspx | CC-MAIN-2013-48 | refinedweb | 1,509 | 59.19 |
Check out the syntax highlighting on the following valid scala code in sublime version 2.0.1 Build 2217:
object HelloWorld {
class Complex(_re:Double, _im:Double) {
def re = _re
def im = _im
override def toString() = "" + re + (if (im<0) "" else "+") + im + "j"
}
def main(args: Array[String]) {
println(new Complex(1.5, 2.3))
}
}
This is what I see:
In your Scala.tmLanguage file change the following line to what you see:[pre=#2D2D2D] 619 </?([a-zA-Z][a-zA-Z0-9]*)[/pre]
Awesome. that fixed it.
Hi.
I seem to be having the same problem in Sublime Text 3 (build 3059 installed with the Ubuntu .deb package).
I can't locate the Scala.tmLanguage file. All I can find is some file that seems to be compiled at $HOME/.config/sublime-text-3/Cache/Scala/Scala.tmLanguage.cache
The only other thing I find is the global /opt/sublime_text/Packages/Scala.sublime-package file that seems to be a binary file as well.
How can I fix the Scala syntax highlighting file for Sublime Text 3?
Nevermind. I figured it out.
For future reference the syntax file is in /opt/sublime_text/Packages/Scala.sublime-package which is a zip file.
So you need to copy that file and unzip it, change the Scala.tmLanguage file as per the instructions above and then rezip the whole thing and replace /opt/sublime_text/Packages/Scala.sublime-package with that zip file instead.
It's a bit surprising that this hasn't been fixed in the official version. I'll send in a feature request and point this out.
UPDATE: feedback sent (sublimetext.userecho.com/topic/4 ... -included/) | https://forum.sublimetext.com/t/scala-syntax-highlighting-problem/7895/3 | CC-MAIN-2017-43 | refinedweb | 276 | 68.77 |
On Bugs and Reproducibility
By meem on Jul 06, 2005
I love bugs -- specifically, I love putting an end to bugs[1]. I find myself a bit tongue-twisted when asked to articulate just what makes root-causing a bug so engrossing. In brief: it's the thrill of the hunt, the pull of a mystery, the search for a deeper understanding of how the system works, and -- of course -- the gripping fear that some customer somewhere will hit it again if we don't nail the bloody thing[2].
One way to subclass bugs is by reproducibility. That is, can the bug be reproduced on demand? However, as this blog entry will make clear, almost[3] any bug can be reproduced on demand once it is sufficiently understood. Thus, when someone states "this bug is not reproducible", they're likely really saying "this bug is not sufficiently understood". Sadly, one established way a bug can be "resolved" at Sun is for it to be closed out as "not reproducible" -- not just a shameful admission of utter defeat, but a near-guarantee to customers that they will be inconvenienced by the problem yet again. Thus, many of us simply refuse to close out bugs as "not reproducible"[4].
Nonetheless, sometimes bugs are indeed closed out as "not reproducible". In fact, if a bug takes up residence in a subsystem that is poorly understood but widely used, it can thump around for years -- or even decades -- before it is finally smoked out by a particularly determined engineer. Further, often the manifestations of the bug can be so varied that even after diagnosing, it can prove impossible to track down all of the duplicates that are either still open or have been closed out over the years as "not reproducible". Here I discuss my dealings with one such bug -- 4927647.
The Sewer of STREAMS
A classic example of a poorly-understood but widely-used area is the pseudo-terminal subsystem[5]. While the basics of how pseudo-terminals work is well-documented in several texts[6], the STREAMS code that implements it is a arcane and delicate piece of machinery from AT&T that has undergone little change since its initial impact with SVR3.2 some 18 years ago.
Again, that's not to say the code is unimportant. On the contrary, it is a core building block upon which many critical utilities, such as xterms, remote logins (ssh/telnet), and tools like expect(1) are built. Thus, when something goes wrong, someone has to be called in to diagnose it -- and since it's STREAMS code, these days that often means me[7].
Enter 4927647.
Specifically, I got called in because a high-profile customer filed the following bug:
In expect 5.38.0 on Solaris 9, run the following script: for { set i 1 } { 1 } { incr i } { spawn echo foobarbaz expect { "foobarbaz" { puts "ok" expect eof wait } eof { puts "$i passes" wait exit 1 } } } It should loop forever; instead, it exits after a few iterations on multiprocessor systems. It appears to loop "forever" on uniprocessors.
Indeed, running this test I was able to confirm that it did fail on multiprocessor systems -- though usually after thousands of iterations (each iteration taking close to a second), rather than the "few" indicated in the bug report. Without a reproducible test case, this was surely going to be a painful battle.
The Hunt for Reproducibility
Using truss(1), it had already been confirmed that the problem was not with expect, but with the pseudo-terminal implementation itself. Specifically, something was causing the poll(2) to occasionally wake up with POLLERR, and the subsequent read(2) to return EINVAL rather than the number of bytes in the expected message:
25258: open("/dev/ptmx", O_RDWR) = 4 [ ... lots happens ... ] 25258: poll(0xFFBFEBC0, 1, 10000) = 1 25258: fd=4 ev=POLLRDNORM|POLLRDBAND rev=POLLERR 25258: read(4, 0x00044FE8, 3999) Err#22 EINVAL
Of course, with this came the sobering realization that this bug was undoubtedly responsible for countless other sporadic "not reproducible" pseudo-terminal-related bugs, and an accompanying growing list of suspected duplicates. So, the key question was: could we intuit enough about this bug to make it reproducible and finally smoke this thing out?
At the time, DTrace had not yet integrated into Solaris, but was available for internal use and had an ever-growing buzz, so I was eager to see if it could shed some light on this bug. In particular, based on the truss output, my suspicion was that a toxic message was arriving on the /dev/ptmx stream that was causing STRDERR to be set, triggering POLLERR to be returned from strpoll():
if (sd_flags & (STPLEX | STRDERR | STWRERR)) { if (sd_flags & STPLEX) { \*reventsp = POLLNVAL; return (EINVAL); } if (((events & (POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI)) && (sd_flags & STRDERR)) || ((events & (POLLOUT | POLLWRNORM | POLLWRBAND)) && (sd_flags & STWRERR))) { if (!(events & POLLNOERR)) { \*reventsp = POLLERR; return (0); } } }Further, my suspicion was that most of the time, the application called poll() before this toxic message arrived, thus sidestepping the problem. However, occasionally, the application would get delayed (e.g., by other system activity), causing the toxic message to set STRDERR before the application was able to call poll().
Thus, I used the following simple D script to "force" the application to become stalled:
#!/usr/sbin/dtrace -ws syscall::poll:entry { chill(30000000); }
And just like that, the problem became reproducible on the first try! That is, by simply widening the failure window, the problem became immediately reproducible, simultaneously confirming my hypothesis and significantly easing further analysis. (It should be noted that the proper value to chill(), which is specified in nanoseconds, is highly dependent on the underlying hardware -- for my hardware, delaying by 30ms was sufficient. Of course, to prevent widespread system misbehavior, the amount of time one can chill() is bounded.)
The Analysis
With the problem reproducible, further analysis with DTrace and other tools proceeded quickly. In less than an hour, the specifics behind the bug were well-understood, though still extraordinarily twisted.
For those who are interested in such sordid details, here's a crude diagram which shows the data flow (indicated by arrows) and the relevant streams modules (shown in brackets; more about the the modules can be gleaned from their manpages -- e.g., pts(7D)). Note that pckt(7D), while critical to the problem, is not actually on the stream -- hence the dotted lines going through it:
expect echo U ------------------------------------------- K [ stream ] [ stream ] [ head ] [ head ] | \^ | \^ | | v | | | [ ldterm ] | | | \^ : : v | [ pckt ] [ ptem ] : : | \^ v | v | [ ptm ] <------> [ pts ] master side slave sideUsing the above diagram, here are the steps that lead to the problem [8]:
- The message (e.g., "foobarbaz" or "something") is sent down the pseudo-terminal slave stream by the echo command.
- The pseudo-terminal slave is closed by echo (e.g., through exit(2)) and the dismantling of the stream begins; the message sent in (1) is still in-flight, perhaps even still on the slave side.
- Eventually, ldterm's close routine (ldtermclose()) is called, which causes a TCSBRK M_IOCTL to be sent downstream (see Jim Carlson's blog for lots more on that misery).
- The ptem module receives the M_IOCTL, acks it, and then passes a copy of of the M_IOCTL downstream for pckt(7M), as documented in ptem(7M).
- Shortly after ldtermrput() receives the M_IOCACK, ldtermclose() is allowed to complete, and the following processing elements (ptem and pts) quickly follow suit, being careful to drain (if necessary) the message and the M_IOCTL copy to the master side stream.
- Both the M_IOCTL and original data message reach the master side stream. Eventually, the data message makes it to the stream head and a pollwakeup() is issued to notify the application (expect) that data is available. However, as discussed before, for whatever reason the application is delayed.
- Since the pckt(7M) module is actually not on the master side, the M_IOCTL reaches the master side's stream head. Since it's not expecting to receive this message, strrput_nondata() sends an M_IOCNAK back downstream.
- The M_IOCNAK reaches ptm. However, since the slave-side has been closed, ptmwput() frees the message and sends an M_ERROR upstream to indicate the problem.
- The stream head receives the M_ERROR and strrput_nondata() sets STRDERR on the stream.
- The application thread finally receives the notification from step (6) and is awoken, but since STRDERR is set, the block of code shown earlier causes strpoll() to return POLLERR rather than POLLIN. Thus, the observed behavior.
All That ... For This?
Despite the tortuous nature of the bug, the fix itself proved to be trivial[9]. In particular, while there are several possible simple fixes, the least risky is to change the ptmwput() logic in step (8) to use the obscure 2-byte form of the M_ERROR message to only mark the write-side as having an error. That is, to change:
if ((ptmp->pt_state & PTLOCK) || (ptmp->pts_rdq == NULL)) { DBG(("got msg. but no slave\\n")); (void) putnextctl1(RD(qp), M_ERROR, EINVAL); PT_EXIT_READ(ptmp); freemsg(mp); return; }
if ((ptmp->pt_state & PTLOCK) || (ptmp->pts_rdq == NULL)) { DBG(("got msg. but no slave\\n")); mp = mexchange(NULL, mp, 2, M_ERROR, -1); if (mp != NULL) { mp->b_rptr[0] = NOERROR; mp->b_rptr[1] = EINVAL; qreply(qp, mp); } PT_EXIT_READ(ptmp); return; } [ See the putnextctl(9F), qreply(9F), and mexchange(9F) manpages to get a better handle on this code. ]
This seems eminently reasonable since ptm is unable to forward a message through the write-side, but the read-side is still usable -- so why wasn't it done this way from day one? The reason is simple: the 2-byte form of the M_ERROR message post-dates the original code.
Again, thanks to the reproducible test case, it was quick and easy to verify that this fixed the problem.
Due Diligence
As I previously mentioned, most of the pseudo-terminal code dates back to AT&T and has simply been hitched to the nearest wrecker and gingerly towed to the latest release. Indeed, inspecting an internal gates, it's clear this bug goes all the way back to the introduction of the STREAMS-based pseudo-terminal subsystem in 1987! While this is certainly an extreme case, it is not rare for apparently-intermittent bugs to terrorize subsystems for years before they are finally root-caused.
In this case, scanning the bug database suggests the conditions needed to reproduce this bug did not become widespread until Solaris 9 -- at which point, numerous bizarre application failures began to be reported, such as:
4530041 Unable to restore/save backup during DSR upgrade to S9/S10 due to internal error 4654418 ripv2 test routed.perf.3 failed intermittently 4695559 spurious failures of tcp.serverclose 4813669 ripv2 test routed.perf.3 failed intermittently 4897163 ppp tests often return with "FAIL: Unable to ping 10.0.0.2." 4892148 unexpected POLLERR causing early EOF from spawned processes in "expect" 4926624 ssh exits with -1 if stdin is not a terminal 4985311 rdisc.3 testcase randomly fails 5012511 ripv2: some test cases in rtquery subdir failed randomly and intermittently
Of course, there were surely many more anomalies due to this bug which were either never filed, "fixed" by other means (workaround), or closed out as "not reproducible" -- we will never know the full scope of the chaos caused by this persistent little bug.
Summary
Hopefully, this treatise has clarified three key points regarding hard-to-reproduce bugs:
- Almost any bug can be reproduced once it is properly understood. Resist the temptation to close a bug out as non-reproducible -- it will come back to bite someone!
- DTrace is a powerful tool for investigating hard-to-reproduce bugs, and the chill() action is particularly ideal for investigating bugs that you suspect are timing-related.
- Once the problem is understood, scanning the bug database for similar symptoms can often reveal years -- or even decades -- of other bits of inexplicable behavior. Like nabbing a serial killer, the search through the cold cases can prove tedious but ultimately provides a sense of closure to others who have been victimized. Moreover, the search provides a basis for understanding the true impact of the bug and thus how many releases the fix needs to be patched back to.
Happy hunting!
Footnotes
[1]
I literally put an end to bugs during a recent trip to China -- though
sadly I was not able to dine on anything quite this large.
(Upon seeing that photo, Jim
Carlson quipped: "I guess if you can put a stick through it, it's food."
-- a disturbingly accurate observation.)
[2] Of course, as a developer, much of my time is spent on the other side of the fence: introducing new code, which will invariably have a new crop of challenging bugs. Thus, there is another element to bugfixing: paying my dues to society.
[3] There exists a very small subset of bugs that are tied to factors that are beyond software's ability to control, and thus cannot be reproduced on demand, even when they are sufficiently understood.
[4] Unfortunately, our internal "list" of reasons for closing out a bug is currently too limited, forcing "not reproducible" to be pressed into service for "fixed as a side effect of X", or "insufficient information available to evaluate", among others.
[5] Actually, we have two pseudo-terminal subsystems on Solaris: an System V one, and a BSD one. However, the BSD flavor is provided only for compatibility and for purposes of this discussion can be ignored.
[6] An excellent description of pseudo-terminals can be found in the recently-revised Advanced Programming in the Unix Environment.
[7] For the record, I've never formally worked on STREAMS -- but Sasha Kolbasov and myself have become the unofficial caretakers of the much-maligned STREAMS core.
[8] To keep the description from growing too bloated, I have left out the code snippets, but inspecting the linked functions will allow more detailed study of the problem. Of course, the bug has been fixed, so the broken code in ptmwsrv() no longer exists.
[9] It is surprising how often hard bugs have trivial fixes. Surely there is a reason for this, but it's not obvious to me.
[10] Note that this fix makes use of mexchange(9F), which has long been available internally, but which I added to the Solaris DDI (along with a collection of other STREAMS utility routines) for Solaris 10. Hopefully these routines will make writing new STREAMS code a little less painful. Perhaps worthy of a future blog entry.
Technorati Tag:
OpenSolaris
Technorati Tag: Solaris
Technorati Tag: DTrace
its... ewww........... bugs!!!! i hate eat a bug
if i touch a bug i feel my hand is so very dirty...yak!!!! i hate a bug....ever!!
Posted by nicole on September 04, 2007 at 04:53 PM EDT # | https://blogs.oracle.com/meem/entry/on_bugs_and_reproducibility | CC-MAIN-2016-22 | refinedweb | 2,457 | 57.3 |
Object Oriented Programming is the most dramatic innovation in software development in the last decade. It ranks in importance with the development of the higher-level languages at the dawn of the computer age. Sooner or later every programmer will be affected by the object oriented approach to program design. An object is a self-contained element of a computer program that represents a related group of features and is designed to accomplish specific tasks. Objects also called instances. Each objects has specific role in a program, and all objects can work with other objects in defined ways.
The fundamental idea behind object-oriented language languages is to combine into a single unit both data and the functions that operate on the data. Such a unit is called an object. An object's functions, called member functions in C++, typically provide the only way to access its data. If you want to read a data item an object. It will read a data and return the value to you. You can't access the data directly. The data is hidden, so it is safe from accidental alteration. Data and its functions are said to be encapsulated into a single entity. Data encapsulation and data hiding are key termed in the description of object-oriented languages. Objects-oriented programming is modeled in the observation that in the real world, objects are, made up of many kinds of smaller objects. However, the capability to combine objects is only a general aspect of object-oriented programming. It also includes concepts and features that make the creation and use of objects easier and more flexible. The most important of these feature is the class.
A class is a template used to create multiple objects with similar features. Classes embody all features of a particular set of objects. When you write a program in an object-oriented language. You don't define individual objects. Instead, you define classes of objects.
All object-oriented programming languages provide mechanisms that help you implement the object-oriented model.
They are:
Encapsulation is the mechanism that binds together code and the data if. Conclusion: The wrapping up of data and methods into a single unit (called class) is known as encapsulation.
C++
// listing incap.cpp #include<iostream.h> #include<conio.h> class one // declare a class { private: int a; public: void printdata() { a = 7; cout<<"Value of a is "<<a; } }; void main() { clrscr(); one b; //declare a object for the class one cout<<"Now I am in main function and going to call a function from class one"; b.printdata(); // calling function from class one getch(); }
Java
// listing incap.java class one { int a; void printdata() { a = 7; System.out.println("Value of a is " + a); } } class incap public static void main(String[] args) { one b = new one(); // declare a object for class one System.out.println("Now I am in main function and going to " + "call a function from class one"); b.printdata(); // calling function from class one } }
Inheritance is the process by which object of one class acquires the properties of another class. Inheritance supports the concept of hierarchical classification. For example, the atlas is a part of class
bicycle, which is again a part of the class cycle. As illustrated in the principal deriving a new class from the existing one. The new class will have the combined features of both the classes. Thus the real appeal and power of the inheritance mechanism is that allows the programmer to reuse a class that is almost, but not exactly, what he wants, and to tailor the class is such a way that is does not introduce any undesirable side effects into the rest of the class. The drive class is knows as 'subclass'.
C++
// listing helloworld.cpp #include<iostream.h> #include<conio.h> class one // declare class one { public: void test() { cout<<"Hello from class one"; } }; class two : public one // inherit class two by class one { public: void test() { cout<<"Hello from class two"; one::test(); // calling function from class one } }; void main() { clrscr(); two t; // declare a object for class two cout<<"Hello from main function"; t.test(); // calling function from class two getch(); }
Java
// listing dasForm.java import java.awt.*; import javax.swing.*; import java.awt.event.*; public class dasForm extends JFrame // inherite by JFrame { public dasForm() { super("Shankar Das"); // set the application title } public static void main(String[] args) { JFrame frame = new dasForm(); // declare a new frame // windows common property WindowListener w = new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }; frame.addWindowListener(w); // sets winwods common property frame.pack(); frame.setVisible(true); frame.setSize(180,80); } }
Polymorphism is a feature that allows one interface to be used for a general class of actions. The specific action is determined by the exact nature of the solution. Polymorphism means the ability to take more than one form. For example, consider the operation of addition. For two numbers, the operation will generate the sum. If the operands are three numbers, then the operation would produce the product of them. That a single function name can be used to handle different number and different.
C++
// listing polymor.cpp #include<iostream.h> #include<conio.h> #include<graphics.h> class poly { private: int gd,gm; public: void graph() // for initialize graphics { gd=DETECT; initgraph(&gd,&gm,""); } void draw(int a) // function with one args { cleardevice(); circle(getmaxx()/2,getmaxy()/2,a); getch(); } void draw(int a, int b) // function with two args { cleardevice(); rectangle(getmaxx()/2-a/2,getmaxy()/2-b/2, getmaxx()/2+a/2,getmaxy()/2+b/2); getch(); } }; void main() { clrscr(); poly p; p.graph(); // initialize graphics p.draw(50); // calling one args function p.draw(50,50); // calling two args function closegraph(); // closing graphics }
Java
// listing polymor.java class plm { void hello(String s) // function with one args { System.out.println("My name is " + s); } void hello(String s, int ag) // function with two args { System.out.println("My name is " + s + " & Age is " + ag); } void hello(String s, int ag, String ct) // function with three args { System.out.println("My name is " + s + " & age is " + ag); System.out.println("I am from " + ct + " city"); } } class polymor { public static void main(String[] agrs) { plm p = new plm(); // declaring a object for class plm p.hello("Shankar Das"); // calling one args function p.hello("Shankar Das",25); // calling two args function p.hello("Shankar Das",25,"Bhopal"); // calling three args } }
When properly applied polymorphism, encapsulation and inheritance combine to produce a programming environment that support the development of far more robust and scaleable programs than does the process-oriented model. A well-designed hierarchy of classes is the basis for reusing the code in which you have invested time and effort developing and testing. Encapsulation allows you to migrate your implementations over time without breaking the code that depends on the public interface of your classes. Polymorphism allows you to create clean, sensible, readable and resilient code.
General
News
Question
Answer
Joke
Rant
Admin | http://www.codeproject.com/KB/cpp/das.aspx | crawl-002 | refinedweb | 1,169 | 56.35 |
OpenAPI
In specific development, joint debugging is always troublesome, especially after the front-end and back-end are separated, the back-end generally needs to maintain a document to tell us what specific API functions, specific field information, and the information Maintenance costs are still quite high.
Install plugin
In Pro, we introduced an openAPI plug-in. In the scaffolding, we have this feature. If you are using the unofficial version of v5, you can install the plug-in with the following command.
yarn add @umijs/plugin-openapi // npm npm i @umijs/plugin-openapi --save
Then configure the relevant configuration of openAPI in
config/config.ts.
openAPI: { requestLibPath: "import {request} from'umi'", // Or use the online version // schemaPath: "", schemaPath: join(__dirname,'oneapi.json'), mock: false, }
You also need to add a command to the scripts of package.json.
"openapi": "umi openapi",
Finally, we can execute
npm run openapi to generate related interfaces and documents.
如何使用
openAPI has some workload for the backend, but the workload is far less than the cost of maintaining a document. If you maintain a document, you need to edit the document every time you update the code. With openAPI, you only need to access swagger and do some configuration to generate an interface. If you are using python or java, then access will become easy. For detailed access steps, please see the official document of swagger. Here mainly introduces how to use the front end.
After the back-end access to swagger is completed, we can access the documents generated by swagger, which are generally, and we can get an openapi specification file by visiting the page.
We need to copy the url of swagger to the configuration of openapi. Taking the openapi of pro as an example, let's configure it:
openAPI: { requestLibPath: "import {request} from'umi'", // use the url of copy here schemaPath: "", mock: false, }
There are two configurations
requestLibPath and
mock that need to be noted.
requestLibPath
How can
requestLibPath use
request? Generally speaking, we recommend using umi's request directly, but sometimes you need to customize it and you can modify the configuration of
requestLibPath. For example, to use the request in utils, we can configure it like this:
openAPI: { schemaPath: "import request from'@utils/request", // use the url of copy here schemaPath: "", mock: false, }
Of course, you need to ensure that the
schemaPath configuration introduces the request, otherwise the generated code may not be executed. The generated code is as follows:
// configuration of requestLibPath import { request } from 'umi'; /** Get the list of rules GET /api/rule */ export async function rule(params: API.PageParams, options?: { [key: string]: any }) { return request<API.RuleList>('/api/rule', { method: 'GET', params: { ...params, }, ...(options || {}), }); }
The comments will also be loaded automatically, saving us the trouble of checking the documentation. At the same time, we will also generate the
typings.d.ts file in the serves, which contains all the definitions in the openapi.
API.RuleList is the description of the data that the backend needs to return. Examples are as follows:
declare namespace API { type RuleListItem = { key?: number; disabled?: boolean; href?: string; avatar?: string; name?: string; owner?: string; desc?: string; callNo?: number; status?: number; updatedAt?: string; createdAt?: string; progress?: number; }; type RuleList = { data?: RuleListItem[]; /** The total content of the list */ total?: number; success?: boolean; }; }
In this way, we can cooperate with ProTable to quickly make a CURD, the code is easy.
import { rule } from '@/services/ant-design-pro/rule'; // Two generics, the first is the type definition of the list item, and the second is the definition of the query parameter. // 🥳 A table has been generated <ProTable<API.RuleListItem, API.PageParams> request={rule} columns={columns} />;
mock
mock is relatively easy. After setting it to true, some mock files will be automatically generated. Although the quality is not as good as ours, it is no problem to use it in development.
The generated mock file is in the mock file under the project root path. The generated mock data is different every time. If you want to debug, you can modify it at will. Only by executing
npm run openapi will it be modified.
import { Request, Response } from 'express'; export default { 'GET /api/rule': (req: Request, res: Response) => { res.status(200).send({ data: [ { key: 86, disabled: false, href: '', avatar: '', name: 'Luo Xiulan', owner: 'Garcia', desc: 'Sida kind of rectification and construction is difficult, but wait for it to come to light. ', callNo: 96, status: 89, updatedAt: 'PpVmJ50', createdAt: 'FbRG', progress: 100, }, ], total: 98, success: false, }); }, };
Documentation
In development, we can't just look at the code, but also the documentation. Swagger-ui is also integrated by default in Pro, which provides an interface to read the openapi configuration in the current project. We can find a shortcut in the lower right corner of the Layout:
This operation is only valid in the development environment. If it is a lower version, you can visit
/umi/plugin/openapi to view, the final effect should be like this:
| https://beta-pro.ant.design/docs/openapi/ | CC-MAIN-2022-40 | refinedweb | 828 | 54.32 |
In our Hello World program in Clojure, we saw one function, the println function, which prints its argument to the standard output. The heart of any Clojure program is, of course, the ability to write your own functions, so we’ll have a look at how that is done here. We’ll start with functions that do relatively simple things, such as arithmetic.
Java programmers are used to the idea of defining a function (or method as they are usually called in OO programming) by defining a name, argument list, and return type for their function. For example, a function that calculates the square of an integer might have the signature
int square(int number) { return number * number; }
In Clojure, the process is roughly the same, although the syntax is quite different. One key point is that a Clojure function actually has no name; however for it to be useful (that is, for you to be able to call it), it is almost always bound to a symbol that effectively gives it a name. The syntax for a Clojure function equivalent to the Java one above is
(defn square "Squares its argument" [number] (* number number))
Like everything in Clojure, a function definition is a list of forms enclosed in parentheses. The form defn is a special form (a keyword of the language) which begins a function definition. The next form is the symbol (square) to which the function is to be bound. Following this is an optional string which documents the function. As with all coding, it’s a good idea to document your code even if you plan never to let anyone else see it. It’s amazing how fast your own memory of what a function does will fade.
The next form is a list of arguments for the function. Note that this list is enclosed in square brackets: [number]. A list in square brackets is a vector, of which we will say more in another post. A function can have any number of arguments, including zero (in which case this form is just empty brackets: []). As with all lists, elements within the list are separated by blanks, so if the function had two arguments, this would be written as [arg1 arg2].
The last element in the list is the code which is run when the function is called. In this case we want to square number, so the code is (* number number). The * here is just another symbol, rather than a specialized operator as in Java, and it calls a built-in function which multiplies its arguments. (Actually, * can take any number of arguments so you could multiply together 4 numbers by writing (* n1 n2 n3 n4).)
A statement returns the value of the last element in the list, so in this case the result of the multiplication is returned.
To run this code, create a new Netbeans project called Square, with a namespace of glenn.rowe.square. Add the code above after the ns statement, so the full program looks like this:
(ns glenn.rowe.square ;(:import ) ;(:require ) ) (defn square "Squares its argument" [number] (* number number))
Start up a REPL but don’t use Netbeans’s menu to load anything just yet. At the prompt, try calling your function. You’ll get the following error:
user=> (square 4) #<CompilerException java.lang.Exception: Unable to resolve symbol: square in this context (NO_SOURCE_FILE:2)>
The problem is that since the file hasn’t been loaded, the square function is unknown to the REPL.
Now try loading the file by right clicking on the project name and selecting ‘REPL->Load all Clojure files in Source Packages’. Now try calling the square function again. You’ll still get an error:
user=> #'glenn.rowe.square/square user=> (square 4) #<CompilerException java.lang.Exception: Unable to resolve symbol: square in this context (NO_SOURCE_FILE:4)>
What’s going on? The clue lies in the response you got when you loaded the source file. The REPL’s response was the mysterious string “#’glenn.rowe.square/square”. This gives the fully qualified name of the function it found in your source file; that is, the symbol name ‘square’ preceded by the namespace you defined when you created the project, and which appears in the ns statement at the start of the file.
The problem is that the namespace currently being used by the REPL is not the namespace defined in the file. In fact, it’s a default namespace which is called ‘user’, and that’s where the ‘user’ in the prompt comes from: it tells you which namespace the REPL is currently operating in.
Try calling the function by giving it its full name:
user=> (glenn.rowe.square/square 4) 16
Aha! This time we have success. However, it gets to be a bit of a pain having to type in the namespace every time we want to call a function. Fortunately, there are a few ways around this. One way is to change the namespace in which the REPL is operating by entering the following line at the ‘user’ prompt:
user=> (ns glenn.rowe.square) nil glenn.rowe.square=>
The ‘ns’ command tells the REPL to change its namespace to “glenn.rowe.square”, and you can see that after entering this command, the prompt in the REPL has changed to reflect the new namespace. Now try calling the square function using just its name:
glenn.rowe.square=> (square 4) 16
This time it works without having to type in the namespace.
If you don’t want to change the REPL’s operating namespace, there is another way to get access to the square function without having to type its namespace name every time. Return to the ‘user’ namespace by entering (ns user). Next, enter a use statement as follows:
user=> (use 'glenn.rowe.square) nil user=> (square 4) 16
The use statement, followed by the name of a namespace (the quote before the name is required) tells the REPL to include all the symbols defined in that namespace within the current ‘user’ namespace. Thus ‘square’ now becomes directly accessible so we can call it as shown above.
There’s an obvious danger with doing this, of course. If we use several namespaces within our operating namespace, no two of these namespaces can contain the same symbol; if this happens we get a collision of names, and the REPL will generate an error. However, for testing purposes, it’s usually a safe thing to do.
A couple of other commands are useful to know about before we leave this introduction to functions.
When you’re writing code, you frequently need to change things and then test them by running the result. However, the REPL won’t know about any changes unless you tell it reload the file. For example, suppose we added a new function called cube which returns the cube of its single argument. The file now looks like this:
(ns glenn.rowe.square ;(:import ) ;(:require ) ) (defn square "Squares its argument" [number] (* number number)) (defn cube "Cubes its argument" [number] (* number number number))
Entering the code will not update the REPL, so the cube function will still be undefined. In Netbeans using Enclojure, the easiest way is to type Alt+L. This will save the file and load all the changes into the REPL.
If you’re running the REPL from a command console, you can reload a namespace by typing
user=> (use :reload-all 'glenn.rowe.square) nil
Note that this won’t work in the Enclojure REPL, so just use the Alt+L shortcut (it’s a lot faster than typing in that line anyway).
Finally, it’s useful to know how to delete a symbol from the REPL’s map. If you try deleting the code for square from the source file and then reloading it, you’ll find that you can still call square from the REPL. The reason is that loading or reloading a file will just add new symbols or modifications to existing symbols, but it won’t delete symbols that are no longer in the source code. To do that, there is a special command called ns-unmap. Suppose we want to delete the square symbol. Try the command
user=> (ns-unmap 'glenn.rowe.square 'square)
The ns-unmap function’s first argument is the namespace from which to remove the symbol, and the second argument is the symbol to be removed (both prefixed by a quote).
Now if you try calling square you’ll get an error. However, if you had previously given a (use ‘glenn.rowe.square) command, there will still be a square symbol in the REPL’s map. You can see this by typing square on its own (without parentheses) into the REPL. You’ll get a response that looks something like this:
user=> square #<square$square__304 glenn.rowe.square$square__304@1677737>
If square were completely undefined, you’d get an error, but this cryptic string shows that there is still a reference to square stored in the REPL’s map.
This is because the square in the namespace glenn.rowe.square was copied into the ‘user’ namespace. When you unmapped square from glenn.rowe.square, you didn’t remove the copy from ‘user’. However, you are unable to call square since the copy in ‘user’ pointed to the original function symbol in glenn.rowe.square, and since the original is now gone, the function can’t be called.
To completely remove the square symbol you need to use a second call to ns-unmap:
user=> (ns-unmap 'user 'square)
Now all trace of square is gone. | https://programming-pages.com/tag/clojure-namespaces/ | CC-MAIN-2018-26 | refinedweb | 1,605 | 70.73 |
For copying a file I've used this code:
#include <fstream>
int main()
{
std::ifstream file("C:/Kopia.dat");
std::ofstream file2("C:/KopiaAvKopia.dat");
int x = sizeof file;
char c[x];
file >> c;
file2 << c;
return 0;
}
The problem here is that the program only reads the first characters before a space comes from "file" into the "c"-array. Thus, it only copies those characters into "file2".
What I'm asking for is help with this copying process, so that it can copy everything from "file". I also would like the copied characters to be outputted in binary formate to "file2". | https://cboard.cprogramming.com/cplusplus-programming/14275-program-copies-file-then-outputs-copy-binary-formate-printable-thread.html | CC-MAIN-2017-17 | refinedweb | 102 | 73.17 |
Getting Started with the Backend Services Android SDK
The Backend Services Android SDK is a wrapper around the Backend Services RESTful services. It greatly simplifies the integration process and allows you to work with Backend Services without having any knowledge of the RESTful services.
Being an Android SDK, the Backend Services Android SDK is based on Java.
Key Features
- Fully asynchronous API
- Easy mapping from Telerik Platform content types to Java classes
- Fluent interface API
Unsupported Operations
Any operations that are not directly supported by the SDK can be accessed through the RESTful API.
Download the Android SDK
To use the Backend Services Android SDK you need a single jar file. It is distributed in a ZIP archive.
Download the Backend Services Android SDK from the Downloads page or from this link.
Copy the jar in your project file structure and add it as a library.
Entry point
The entry point of the Backend Services Android SDK is the EverliveApp class. It provides access to a single Backend Services application. You will normally have one instance of this class, globally available. Of course, you can have as many instances as you want, in case you want to enable some inter-application collaboration scenarios.
An EverliveApp object is instantiated by supplying an App ID. You can also specify some other settings, but this is the most important one. The App ID links the runtime object to the Telerik Platform app you want to work with. Here is an example:
EverliveApp myApp = new EverliveApp("your-app-id");
Once you have an instance of EverliveApp, you are ready to make requests to Telerik Platform. You will find more examples later in the documentation.
Settings
When creating an EverliveApp instance, you can specify some settings to configure the behavior of the instance. Those settings are available in the EverliveAppSettings class. An instance of this class is accepted in the constructor of the EverliveApp. In the following table you will find the available settings and a description what they do.
Important Classes and Interfaces
In this section you will find the most important classes, interfaces and namespaces in the SDK and a brief description of what they are used for. | https://docs.telerik.com/platform/backend-services/android/getting-started-android-sdk | CC-MAIN-2017-47 | refinedweb | 365 | 63.29 |
ll-xist 5.1 (released 08/02/2013)
The HTML namespace (ll.xist.ns.html) now supports microdata attributes.
Added support for triple quoted strings to UL4 templates.
Added an UL4 function sum thatade more robust.
Added missing processing instruction class ll.xist.ns.ul4.note.
ll.oradd now prints the data object before trying to call the procedure and can handle foreign keys that are NULL.
The methods abslum and rellum of Color objects are now exposed to UL4 templates.
The oradd script has a new option --dry-run to rollback all database changes instead of committing them. This can be used to test whether an oradd dump will work.
oradd can now copy files via scp. Parts of the file names used may depend on key values.
oradd now supports other out types than integers.
The query method for database connections in db2ul4 scripts independent from the parameter format of the database driver.
-.1.xml | https://pypi.python.org/pypi/ll-xist/5.1 | CC-MAIN-2016-36 | refinedweb | 157 | 77.23 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.