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 |
|---|---|---|---|---|---|
Upcasting and downcasting are important part of Java, which allow us to build complicated programs using simple syntax, and gives us great advantages, like Polymorphism or grouping different objects. Java permits an object of a subclass type to be treated as an object of any superclass type. This is called upcasting. Upcasting is done automatically, while downcasting must be manually done by the programmer, and i'm going to give my best to explain why is that so.
Upcasting and downcasting are NOT like casting primitives from one to other, and i believe that's what causes a lot of confusion, when programmer starts to learn casting objects.
Throughout this tutorial i'm going to use Animal hierarchy to explain how class hierarchy works.
Inheritance
What we have here, is a simplified version of an Animal Hierarchy. You can see, that Cat and Dog are both Mammals, which extends from Animal, which silently extends from Object. By silently, i mean, that Java automatically extends every class from Object class, which isn't extended from something else, so everything is an Object (except primitives).
Now, if you ask - is Cat an Object - It doesn't extend Object, it extends Mammal?
By inheritance Cat gets all the properties its ancestors have. Object is Cat's grandgrandparent, which means Cat is also an Object. Cat is also an Animal and a Mammal, which logically means - if Mammals possess mammary glands and Animals are living beings, then Cat also has mammary glands and is living being.
Basic JTable and Netbeans
What this means for a programmer, is that we don't need to write for every possible Animal, that it has health. We just need to write it once, and every Animal gets it through inheritance.
Consider the following example:
class Animal { int health = 100; } class Mammal extends Animal { } class Cat extends Mammal { } class Dog extends Mammal { } public class Test { public static void main(String[] args) { Cat c = new Cat(); System.out.println(c.health); Dog d = new Dog(); System.out.println(d.health); } }
When running the Test class, it will print "100" and "100" to the console, because both, Cat and Dog inherited the "health" from Animal class.
Upcasting and downcasting
First, you must understand, that by casting you are not actually changing the object itself, you are just labeling it differently..
Let's look at object's code before and after upcasting:
Cat c = new Cat(); System.out.println(c); Mammal m = c; // upcasting System.out.println(m); /* This printed: Cat@a90653 Cat@a90653 */
As you can see, Cat is still exactly the same Cat after upcasting, it didn't change to a Mammal, it's just being labeled Mammal right now. This is allowed, because Cat is a Mammal.
Note that, even though they are both Mammals, Cat cannot be cast to a Dog. Following picture might make it a bit more clear.
Although there's no need to for programmer to upcast manually, it's allowed to do.
Consider the following example:
Mammal m = (Mammal)new Cat();
is equal to
Mammal m = new Cat();
But downcasting must always be done manually:
Cat c1 = new Cat(); Animal a = c1; //automatic upcasting to Animal Cat c2 = (Cat) a; //manual downcasting back to a Cat
Why is that so, that upcasting is automatical, but downcasting must be manual? Well, you see, upcasting can never fail. But if you have a group of different Animals and want to downcast them all to a Cat, then there's a chance, that some of these Animals are actually Dogs, and process fails, by throwing ClassCastException.
Double buffering, movement, and collision detection
This is where is should introduce an useful feature called "instanceof", which tests if an object is instance of some Class.
Consider the following example:
Cat c1 = new Cat(); Animal a = c1; //upcasting to Animal if(a instanceof Cat){ // testing if the Animal is a Cat System.out.println("It's a Cat! Now i can safely downcast it to a Cat, without a fear of failure."); Cat c2 = (Cat)a; }
Note, that casting can't always be done in both ways. If you are creating a Mammal, by calling "new Mammal()", you a creating a Object that is a Mammal, but it cannot be downcasted to Dog or Cat, because it's neither of them.
For example:
Mammal m = new Mammal(); Cat c = (Cat)m;
Such code passes compiling, but throws "java.lang.ClassCastException: Mammal cannot be cast to Cat" exception during running, because im trying to cast a Mammal, which is not a Cat, to a Cat.
General idea behind casting, is that, which object is which. You should ask, is Cat a Mammal? Yes, it is - that means, it can be cast.
Is Mammal a Cat? No it isn't - it cannot be cast.
Is Cat a Dog? No, it cannot be cast.
Important: Do not confuse variables with instances here. Cat from Mammal Variable can be cast to a Cat, but Mammal from Mammal variable cannot be cast to a Cat.
Creating an Executable Jar File
Cats cant purr, while being labeled something else
If you upcast an object, it will lose all it's properties, which were inherited from below it's current position. For example, if you cast a Cat to an Animal, it will lose properties inherited from Mammal and Cat. Note,. I'm not going to go into details with this one, so i'm referring to Polymorphism tutorial by Turk4n:
Upcasting during method calling
The beauty of casting is that programmer can make general methods, which can take a lot of different classes as an argument.
For example:
public static void stroke(Animal a){ System.out.println("you stroke the "+a); }
This method can have what ever Animal or it's subclass as an argument. For example calling:
Cat c = new Cat(); Dog d = new Dog(); stroke(c); // automatic upcast to an Animal stroke(d); // automatic upcast to an Animal
..is a correct code.
however, if you have a Cat, that is currently being held by Animal variable, then this variable cannot be argument for a method, that expects only Cats, even though we currently have a instance of Cat - manual downcasting must be done before that.
About variables
Variables can hold instance of objects that are equal or are hierarchically below them. For example Cat c; can hold instances of Cat and anything that is extended from a Cat. Animal can hold Animal, Mammal, etc..
Remember, that instances will always be upcasted to the variable level.
"I really need to make a Dog out of my Cat!"
Well, you can't do it by casting. However, objects are nothing else, but few methods and fields. That means, you can make a new dog out of your Cat's data.
Let's say you have a Cat class:
class Cat extends Mammal { Color furColor; int numberOfLives; int speed; int balance; int kittens = 0; Cat(Color f, int n, int s, int B){ this.furColor = f; this.numberOfLives = n; this.speed = s; this.balance = b; } }
and a Dog class.
class Dog extends Mammal { Color furColor; int speed; int barkVolume; int puppies = 0; Dog(Color f, int n, int s, int B){ this.furColor = f; this.speed = s; this.barkVolume = b; } });
Thanks for reading.
Looking for some more related topics?
About casting/downcasting
Inherritance or Interfaces
Edited by Roger, 26 February 2013 - 03:27 PM.
some pictures were gone. | http://forum.codecall.net/topic/50451-upcasting-downcasting/ | CC-MAIN-2013-48 | refinedweb | 1,241 | 63.9 |
Here are all the tables you will be able to access when you use Splitgraph to query Stripe data. We have also listed some useful queries that you can run.
repositories: - namespace: CHANGEME repository: airbyte-stripe #-stripe plugin: airbyte-stripe # Plugin-specific parameters matching the plugin's parameters schema params: account_id: '' # REQUIRED. Account ID. Your Stripe account ID (starts with 'acct_', find yours <a href="">here</a>). start_date: '2017-01-25T00:00:00Z' # REQUIRED. Replication start date. UTC date and time in the format 2017-01-25T00:00:00Z. Only. lookback_window_days: 0 # Lookback Window in days (Optional). When set, the connector will always re-export data from the past N days, where N is the value set here. This is useful if your data is frequently updated after creation. More info <a href="">here<-stripe: # This is the name of this credential that "external" sections can reference. plugin: airbyte-stripe # Credential-specific data matching the plugin's credential schema data: client_secret: '' # REQUIRED. Secret Key. Stripe API key (usually starts with 'sk_live_'; find yours <a href="">here<. | https://www.splitgraph.com/data-sources/stripe/tables/invoices/queries/invoice-count-by-invoice-attempted | CC-MAIN-2022-27 | refinedweb | 176 | 59.4 |
OpenCV is a library of programming functions mainly aimed at real-time computer vision. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products. Being a BSD-licensed product, OpenCV makes it easy for businesses to utilize and modify the code.
Here are the simple installation guide to install OpenCV on Windows:
- Go to and download the latest release. Extract files to local drive (eg : C)
- Add bin folder to the Environment Variables path. For eg:
C:\opencv\build\x64\vc15\bin
Create a New Visual Studio project C++ console.
Set the platform target to
x64
- Add Directories by going to:
Project->Properties->Configuration Properties-
VC++ Directories
1. Add Build Directories:
C:\opencv\build\include
2. Add Library Directories:
C:\opencv\build\x64\vc15\lib
Linker Input
1. Add to Linker->Input:
opencv_world452d.lib (
452 depends
on your OpenCV version)
d for debug, without
d for release
- Click on your Project name on right side in Solutions Explorer, and right-click on it to Add a New Item.
Select C++ File and rename it as
test.cpp.
- Finally, you can run this demo code in your visual studio IDE to see if it’s all working fine.
#include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <iostream> using namespace std; using namespace cv; void main() { VideoCapture cap(0); Mat img; while (true) { cap.read(img); imshow("Image", img); waitKey(1); } }
- Your Output Screen should display your live Web-Cam feed.
And that’s all, you can now use OpenCV with ease. 😉
For more install information, visit the OpenCV official guide.
Top comments (0) | https://dev.to/asmit2952/installing-opencv-on-windows-for-c-326i | CC-MAIN-2022-40 | refinedweb | 281 | 58.99 |
In this problem, we have several hay bales on the number line and a few exploding cows. We can send an exploding cow to a certain location on the line and it will cause all the hay bales to explode within a given radius. We want to figure out the smallest radius that the cows can explode at so that we can force all the hay bales to explode.
Note that if there is some radius $r$ such that it is possible for all hay bales to explode, then all the hay bales will explode for any radius $R > r$. Therefore, we can binary search for the minimum radius $r$.
To check if a given radius $r$ is feasible, consider the leftmost hay bale at location $x$. We have to place a cow somewhere between $x-r$ and $x+r$ in order to make that hay bale explode. To make as many other hay bales explode, it makes sense to move the cow to the right as much as possible, because there are no hay bales to the left of $x$ so shifting the cow to the right can only include more hay bales. Therefore, we would have the hay bale explode at location $x+r$ and all hay bales in between $x$ and $x+2r$ explode. We can then find the leftmost hay bale that is at location greater than $x+2r$ and repeat this process, then count the number of cows that we placed. If the number of cows used is less than or equal to $K$, then $r$ is feasible. Otherwise, the answer must be at least $r+1$.
Here is my Java code demonstrating this.
import java.io.*; import java.util.*; public class angry { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new FileReader("angry.in")); PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("angry.out"))); StringTokenizer st = new StringTokenizer(br.readLine()); int n = Integer.parseInt(st.nextToken()); int k = Integer.parseInt(st.nextToken()); int[] locations = new int[n]; for(int i = 0; i < n; i++) { locations[i] = Integer.parseInt(br.readLine()); } Arrays.sort(locations); int min = 0; int max = 500000000; while(min != max) { int mid = (min+max)/2; int used = 0; int last = 0; while(last < n) { used++; int curr = last+1; while(curr < n && locations[curr] - locations[last] <= 2*mid) { curr++; } last = curr; } if(used <= k) { max = mid; } else { min = mid+1; } } pw.println(min); pw.close(); } } | http://usaco.org/current/data/sol_angry_silver_jan16.html | CC-MAIN-2018-17 | refinedweb | 407 | 70.94 |
Question 1: Static block trap!! What will be the output of this program ?
public class Test { static { main(new String[]{"[Static call]"}); } public static void main(String[] args) { System.out.println(args.length > 0 ? args[0] : "[From main]"); } }Solution : Here two time main method will be called one originated from static block (Since on loading a class by class loader static block elements are scanned from top to bottom and executed one by one) So in this case static block code will be executed and main method will be executed. Later since execution of program is starts from main(Its golden rule in java) so second time again main method will be executed.Sample output is :
Question 2: Give a try with ternary operator!! What will be the output of this program ?Question 2: Give a try with ternary operator!! What will be the output of this program ?
Static call From main
public class TernaryOperation{ public static void main(String[] args) { char x = 'X'; int i = 0; System.out.print(true ? x : 0); System.out.print(false ? i : x); } }Solution: At first look it appears easy and output flashes in mind ,match your output with sample output below. We will go into delve of problem and concept behind it , from first SOP it is clear that conditional expression is true so value of x will be printed (i.e : X) but what happened to second SOP ? it did not printed 'X' again , instead printed ASCII value of 'X'. As per JLS(Java language specification) automatic conversion of type comes into picture in ternary operator if type is integer or double is there.please refer this and this for detail.
Some general rules to workout such problem :
1. If any operand is double final result will be of double type.
2. If operand is of reference type the unboxing will happen there.
3. If one operand char and other is variable of type int then final result will be of type int. Sample output is:
Question 3 : Do you recognize me ">>" and ">>>" ? Verify your output with sample outcome.Question 3 : Do you recognize me ">>" and ">>>" ? Verify your output with sample outcome.
X 88
Solution: Java supports following two right shift operators : signed right shift operator >> andSolution: Java supports following two right shift operators : signed right shift operator >> and
public class ShiftOperators { public static void main(String[] args) { System.out.println("I(>>) maintain sign so (-4 >> 2) is : "+ -4>>2); System.out.println("I(>>) maintain sign so (4 >> 2) is : "+ 4>>2); System.out.println("I do not (>>>) maintain sign so (-4 >>> 2) is :" + -4>>>2); System.out.println("I do not (>>>) maintain sign so (4 >>> 2) is :" + 4>>>2); } }
Unsigned right shift operator >>>.
The operator ‘>>’ uses the sign bit (left most bit) to fill the trailing positions after shift. If the number is negative, then 1 is used as a filler and if the number is positive, then 0 is used as a filler.
On the other hand, the operator ‘>>>’ is unsigned right shift operator. It always fills 0 irrespective of the sign of the number. Before going to our problem, we should understand how internally negative numbers are stored: Negative numbers are stored in 32 bit 2's complement form. For example, Binary representation of -1 is all 1s (111..1) 32 times ,left most bit of this is 1, it indicates that it is negative number. How do we find 2's complement of a number?
Now come back to our problem, in case of first SOP statement with signed shift operator:
2's complement representation of -4 = 1111...100 and after doing shift operation (-4>>2) it shift number by 2 and outcome becomes 111...001(1 at 3rd position from right is shifted 2 position right) and sign is maintained as stated earlier with left most bit as 1, So final outcome is -1(111...001).
Similarly, for second SOP, (4>>2), the outcome is 1 (left most bit is 0, since it is positive number).
Now we will look for third SOP statement, binary representation of -4 is 111...100. After performing right shift unsigned operation(-4>>>2) outcome becomes : 011....001, here leftmost bit is 0 because this operator (>>>) does not retain sign and It always fills 0 irrespective of the sign of the number.
So it prints 1073741823.
For fourth SOP statement it prints 1. It is similar to second one because it is positive number and sign bit is 0.Sample output is:
Question 4 : Predict the outcome. (Hint: Program start from main method, Opps!! We have two main method here)Question 4 : Predict the outcome. (Hint: Program start from main method, Opps!! We have two main method here)
-1 1 1073741823 1
class MainBuster{ public static void main(){ System.out.println("Hello!! I will execute too."); } public static void main(String[] args) { System.out.println("Do not worry!! I will execute."); MainBuster.main(); } }Solution:What is your sample output ? Compile time error because of two main method or something else.This program compiles with ease. We can have multiple main method in a class with once exception ONLY one main method signature can have String array as method argument.
so it works as usual.Sample output is :
Do not worry!! I will execute. Hello!! I will execute too.
Question 5: What is outcome of following snippet, when doThis() is being called?
class TryFinally{ public static int doThis() { try { System.out.println("Hello try"); return 12; } finally { System.out.println("Hello finally"); return 13; } } public static void main(String[] arg) { System.out.println(TryFinally.doThis()); } }Solution: finally block is always executed except in system failure( or System.exit()).So, finally block will be always executed and 13 will be returned instead of 12. So , what will happen to statement "return 12" ? Answer of this question lies in when finally gets executed? Answer : finally is always executed just before any return statement in try block, As it can be verified from following snippet :
public static int tryFinallyTest() { try { return 1; } finally { System.out.println("finally block is run before method returns."); } } public static void main(String args[]) { // call the prtryFinallyTest method and print the return value System.out.println(tryFinallyTest()); }Outcome of the above snippet is :
finally block is run before method returns
1
Now it's evident that, finally block is executed just before return statement of try block if available. Now we apply the same logic in our main problem and we can conclude that return value in the finally block (“13″) will override the return value in the try block (“12″) and ultimately 13 will be returned to calling method.Sample output is
================End of article ===============================End of article ===============
Hello try Hello finally 13
Happy learning!!!
Nikhil | https://www.devinline.com/2013/08/java-puzzle-set-1.html | CC-MAIN-2019-13 | refinedweb | 1,126 | 58.18 |
In Python, a name (sometimes also called a symbolic name) is an identifier for an object. In the programs we have written so far, we have been using the concept of naming all along! Let’s take a look at an example:
color = "cyan"
Here, we assign
color as the name of the string
"cyan".
Python uses the system of names so that it can differentiate between each distinct object (such as a string or a function) that we define. In most programs, Python has to keep track of the hundreds and sometimes even thousands of names. So, how exactly does Python store all of this information? Well, it creates what is called a namespace.
A namespace is a collection of names and the objects that they reference. Python will host a dictionary where the keys are the names that have been defined and the mapped values are the objects that they reference.
In the example above, the namespace Python creates would look something like this:
{'color': 'cyan'}
So, in this case, if we tried to print the variable
color:
print(color)
Python would search the namespace defined above for a key named
color and provide the value to be run in our program. Thus we would see the output of
'cyan'.
In the next exercises we will explore the four distinct types of namespaces that Python generates:
- Built-In
- Global
- Local
- Enclosing
We’ll learn all about the different types and how they are generated and managed. For now, let’s examine a visual representation of how namespaces get generated.
Instructions
Take some time to look over the provided visualization of namespaces. Notice that different scripts will generate different namespaces. | https://www.codecademy.com/courses/learn-intermediate-python-3/lessons/python-namespaces/exercises/introduction-to-names-and-namespaces | CC-MAIN-2021-39 | refinedweb | 281 | 69.72 |
HLS Streaming with AVKit and SwiftUI
By the end of this article, you will be able to understand the basic of HTTP Live Streaming (HLS) and how to use it with the VideoPlayer in SwiftUI
For playing media files in apps, the AVKit framework provides all necessary components to create the necessary interfaces for media playback, transport controls, etc. It also provides a generic structure VideoPlayer for SwiftUI that displays media content with a native user interface to control playback. It is initialized with an AVPlayer object that provides the VideoPlayer with the interface to control the player’s transport behavior
AVPlayer is used to play single media files, alternatively, an AVQueuePlayer is also available to play a sequence of media items. The AVPlayer is initialized by providing either an AVPlayerItem object or by providing an URL to reference and play a single audiovisual resource.
The latter is certainly very convenient and allows a simple video player to be created in SwiftUI with just a few lines of code.
import SwiftUI import AVKit struct SimpleVideoPlayer: View { private let player = AVPlayer(url: URL(string: "YOUR-URL.mp4") var body: some View { VideoPlayer(player: player) .onAppear() { player.play() } } }
HTTP Live Streaming (HLS)
The AVPlayer supports a broad variety of media files and among those HTTP Live Streaming (HLS) is a nice option to stream live or on-demand video content inside apps on iPhone, iPad, Mac, Apple Watch, or Apple TV. The beauty of HLS allows separate streams with different resolutions to be supported, which can make the playback experience more reliable as it dynamically adapts to network conditions.
An HLS stream is addressed through an HLS playlist .m3u8 file, which is a manifest that links to chunks of media files that are played in sequence. For example, a playlist file. The technology also allows the creation of a primary playlist that links to different playlists, for example, to have multiple streams with different resolutions. HLS allows the playlist to be determined based on the network conditions.
, the used codecs, resolution, and framerate (among others). This information is then used to determine the appropriate stream for playback. A primary playlist is only checked once though. Once the variations are evaluated, it is assumed that the data is not changing.
HTTP Live Streaming (HLS) with SwiftUI and VideoPlayer
The beauty is, non of this matters very much when using the AVPlayer as HLS is supported out of the box without any additional steps required. The only difference is that the URL for the media element directs to the .m3u8 playlist file. The rest works "automagically".
import SwiftUI import AVKit struct SimpleVideoPlayer: View { private let player = AVPlayer(url: URL(string: "YOUR-URL.m3u8")!) var body: some View { VideoPlayer(player: player) .onAppear() { player.play() } } }
The leverage different bandwidth options on deeper levels of, also consider our other article about Switching between HLS streams with AVKit.. | https://www.createwithswift.com/hls-streaming-with-avkit-and-swiftui/ | CC-MAIN-2021-49 | refinedweb | 480 | 52.6 |
Should I use `app.exec()` or `app.exec_()` in my PyQt application?
I use Python 3 and PyQt5. Here's my test PyQt5 program, focus on the last 2 lines:
from PyQt5.QtCore import * from PyQt5.QtWidgets import * import sys class window(QWidget): def __init__(self,parent=None): super().__init__(parent) self.setWindowTitle('test') self.resize(250,200) app=QApplication(sys.argv) w=window() w.show() sys.exit(app.exec()) #sys.exit(app.exec_())
I know exec is a language keyword in Python. But code on Official PyQt5 Documentation (specifically the Object Destruction on Exit part). I see that example shows use of app.exec() which confuses me.
When I tested it on my machine. I found there is no any visible difference from my end. Both with and without _ produces the same output in no time difference.
My question is:
- Is there anything wrong going when I use app.exec()? like clashing with Python's internal exec? I suspect because both exec's are executing something.
- If not, can I use both interchangeably?
Answers
That's because until Python 3, exec was a reserved keyword, so the PyQt devs added underscore to it. From Python 3 onwards, exec is no longer a reserved keyword (because it is a builtin function; same situation as print), so it made sense in PyQt5 to provide a version without an underscore to be consistent with C++ docs, but keep a version with underscore for backwards compatibility. So for PyQt5 with Python 3, the two exec functions are the same. For older PyQt, only exec_() is available.
On the question of whether to prefer one over the other: using exec_ means you have one less thing to worry about if you ever decide to add support for PyQt4 and/or Python >= 2.6, and want to maintain a single code-base.
Need Your Help
how can I use Android dexOptions?
Are there any downsides to using UPX to compress a Windows executable?
c++ delphi winapi compression upxI've used UPX before to reduce the size of my Windows executables, but I must admit that I am naive to any negative side effects this could have. What's the downside to all of this packing/unpackin... | http://www.brokencontrollers.com/faq/22610720.shtml | CC-MAIN-2019-51 | refinedweb | 372 | 68.26 |
I'm observing different behavior regarding what I think is part of the C standard between
clang
gcc
clang
gcc
#include <stdio.h>
int inner(int *v) {
*v += 1;
return 1;
}
int outer(int x, int y) {
return y;
}
int main(int argc, char *argv[]) {
int x = 4;
printf ("result=%d\n", outer(inner(&x), x));
}
$ clang -o comseq comseq.c && ./comseq
result=5
$ gcc-4.8 -o comseq comseq.c && ./comseq
result=4
$ gcc-5 -o comseq comseq.c && ./comseq
result=4
clang
gcc
--std=
a , b (§5.18) (in func(a,a++) , is not a comma operator, it's merely a separator between the arguments a and a++. The behaviour is undefined in that case if a is considered to be a primitive type)
Commas in argument lists are not sequence points — they are not comma operators within the meaning of the term.
The section of the standard (ISO/IEC 9899:2011) on function calls (§6.5.2.2) says:
¶3 A postfix expression followed by parentheses
()containing a possibly empty, comma- separated list of expressions is a function call. The postfix expression denotes the called function. The list of expressions specifies the arguments to the function.
¶4 An argument may be an expression of any complete object type. In preparing for the call to a function, the arguments are evaluated, and each parameter is assigned the value of the corresponding argument.
…
¶10 There is a sequence point after the evaluations of the function designator and the actual arguments but before the actual call. Every evaluation in the calling function (including other function calls) that is not otherwise specifically sequenced before or after the execution of the body of the called function is indeterminately sequenced with respect to the execution of the called function.
(I've omitted a couple of footnotes, but the contents are not germane to the discussion.)
There is nothing about the expressions being evaluated in any particular sequence.
Note, too, that a comma operator yields a single value. If you interpreted:
function(x, y)
as having a comma operator, the function would have only one argument — the value of
y. This isn't the way functions work, of course. If you want a comma operator there, you have to use extra parentheses:
function((x, y))
Now
function() is called with a single value, which it the value of
y, but that is evaluated after
x is evaluated. Such notation is seldom used, not least because it is likely to confuse people. | https://codedump.io/share/Mw6TBGg7bxKt/1/why-is-gcc-not-treating-comma-as-a-sequence-point | CC-MAIN-2017-30 | refinedweb | 417 | 54.42 |
Because each song is so well written, and the lyrics are so clever and poignant, this central 69 Love Songs node has been constructed to index each song (**not** namespaced).
This particular noder is not really predisposed to noding the lyrics to every song he's ever heard, but because Merritt has been able to so wonderfully depict every stage of love in these 69 songs, I hope is that they will not only beautify Everything but also provide a handy source of nodes that you can softlink to in order to very nicely express a particular feeling.
Editor's note: In September 2003, we removed cpoyrighted texts. The lyrics to Stephen Merrit's 69 Love Songs fell victim to that change in policy.
69 Love Songs Volume 1:
Stephin Merritt, the mad genius responsible for The Magnetic Fields, was struck by inspiration in a midtown Manhattan gay piano bar. Originally conceived as 100 Love Songs, a musical revue or cabaret, Merritt compromised in number when he realized that 100 2-minute songs, with no downtime or intermissions, would still be a bit lengthy. Eventually, the logistical absurdity of putting on a cabaret with rotating singers and dozens of songs led Merritt to put his ideas on tape (DAT? I have no idea), and 69 Love Songs was born.
Like most of Merritt's work, 69 Love Songs is thoroughly toungue-in-cheek, although many of the songs are incredibly poignant. Merritt places some of his narrators fairly bizarre settings -- a Scotsman leaving for war ("Abigail, Belle of Kilronan"), an encounter with Ferdinand de Saussure ("The Death of Ferdinand de Saussure") -- and writes heartfelt songs of passion, confusion, and loss. Other songs are unapologetically horny and silly, or saccharine. There is a whole set of songs -- "Love Is Like Jazz", "Experimental Music Love", "Punk Love", "World Love", "Acoustic Guitar", and "Xylophone Track" (about death by the blues) -- in which Merritt toys with specific musical styles, pairing them with totally incongruous subjects. Merritt also keeps the genders of his narrators and their lovers (partners, stalkees, whatever) ambiguous -- Merritt is a really, really flaming homosexual -- or turns the expected roles on their head, by writing queer country songs ("Papa Was A Rodeo") and the like.
69 Love Songs is Merritt's masterpiece. It still astounds me that a man cut 2:50:00 of music I like, music that manages to be hilarious, embittered, heartfelt, and playful in two consecutive songs. Some noders have made comparisons between Stephin Merritt and Morrissey, kind of apt given their tendencies for drama, but Merritt's ability to balance self-parody with earnestness makes 69 Love Songs a real pleasure (whereas The Smiths, one of my favorite bands, can be pretty grating).
As for comparisons to Merritt's other work: I really like The 6ths's Wasps' Nests (another album of rotating singers] and The Charm of the Highway Strip (another theme album), although both of those lack the variety and depth of 69 Love Songs. "Take Ecstacy With Me" is the one song that ought to be appended. Really, there is nothing, and will never be anything, quite like this album.
I am not going to append a whole song list; rather, I am going to node songs (not whole lyrics, don't shoot) about which I have non-stupid things to say. Right now, that's none of them.
Log in or register to write something here or to contact authors.
Need help? accounthelp@everything2.com | https://everything2.com/title/69+Love+Songs | CC-MAIN-2019-35 | refinedweb | 582 | 53.95 |
Concurrency is a big topic in programming. The concept of concurrency is to run multiple pieces of code at once. Python has a couple of different solutions that are built-in to its standard library. You can use threads or processes. In this chapter, you will learn about using threads.
When you run your own code, you are using a single thread. If you want to run something else in the background, you can use Python's
threading module.
In this article you will learn the following:
Thread
Note: This chapter is not meant to be comprehensive in its coverage of threads. But you will learn enough to get started using threads in your application.
Let's get started by going over the pros and cons of using threads!
Threads are useful in the following ways:
Now let's look at the cons!
Threads are not useful in the following ways:
The Global Interpreter Lock is a mutex that protects Python objects. This means that it prevents multiple threads from executing Python bytecode at the same time. So when you use threads, they do not run on all the CPUs on your machine.
Threads are great for running I/O heavy applications, image processing, and NumPy's number-crunching because they don't do anything with the GIL. If you have a need to run concurrent processes across multiple CPUs, use the
multiprocessing module. You will learn about the
multiprocessing module in the next chapter.
A race condition happens when you have a computer program that depends on a certain order of events to happen for it to execute correctly. If your threads execute something out of order, then the next thread may not work and your application can crash or behave in unexpected ways.
Threads are confusing if all you do is talk about them. It's always good to familiarize yourself with how to write actual code. For this chapter, you will be using the
threading module which uses the
_thread module underneath.
The full documentation for the
threading module can be found here:
Let's write a simple example that shows how to create multiple threads. Put the following code into a file named
worker_threads.py:
# worker_threads.py import random import threading import time def worker(name: str) -> None: print(f'Started worker {name}') worker_time = random.choice(range(1, 5)) time.sleep(worker_time) print(f'{name} worker finished in {worker_time} seconds') if __name__ == '__main__': for i in range(5): thread = threading.Thread( target=worker, args=(f'computer_{i}',), ) thread.start()
The first three imports give you access to the
random,
threading and
time modules. You can use
random to generate pseudo-random numbers or choose from a sequence at random. The
threading module is what you use to create threads and the
time module can be used for many things related to time.
In this code, you use
time to wait a random amount of time to simulate your "worker" code working.
Next you create a
worker() function that takes in the
name of the worker. When this function is called, it will print out which worker has started working. It will then choose a random number between 1 and 5. You use this number to simulate the amount of time the worker works using
time.sleep(). Finally you print out a message that tells you a worker has finished and how long the work took in seconds.
The last block of code creates 5 worker threads. To create a thread, you pass in your
worker() function as the
target function for the thread to call. The other argument you pass to
thread is a tuple of arguments that
thread will pass to the target function. Then you call
thread.start() to start running that thread.
When the function stops executing, Python will delete your thread.
Try running the code and you'll see that the output will look similar to the following:
Started worker computer_0 Started worker computer_1 Started worker computer_2 Started worker computer_3 Started worker computer_4 computer_0 worker finished in 1 seconds computer_3 worker finished in 1 seconds computer_4 worker finished in 3 seconds computer_2 worker finished in 3 seconds computer_1 worker finished in 4 seconds
Your output will differ from the above because the workers
sleep() for random amounts of time. In fact, if you run the code multiple times, each invocation of the script will probably have a different result.
threading.Thread is a class. Here is its full definition:
threading.Thread( group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None, )
You could have named the threads when you created the thread rather than inside of the
worker() function. The
args and
kwargs are for the target function. You can also tell Python to make the thread into a
daemon. "Daemon threads" have no claim on the Python interpreter, which has two main consequences: 1) if only daemon threads are left, Python will shut down, and 2) when Python shuts down, daemon threads are abruptly stopped with no notification. The
group parameter should be left alone as it was added for future extension when a
ThreadGroup is added to the Python language.
Thread
The
Thread class from the
threading module can also be subclassed. This allows you more fine-grained control over your thread's creation, execution and eventual deletion. You will encounter subclassed threads often.
Let's rewrite the previous example using a subclass of
Thread. Put the following code into a file named
worker_thread_subclass.py.
# worker_thread_subclass.py import random import threading import time class WorkerThread(threading.Thread): def __init__(self, name): threading.Thread.__init__(self) self.name = name self.id = id(self) def run(self): """ Run the thread """ worker(self.name, self.id) def worker(name: str, instance_id: int) -> None: print(f'Started worker {name} - {instance_id}') worker_time = random.choice(range(1, 5)) time.sleep(worker_time) print(f'{name} - {instance_id} worker finished in ' f'{worker_time} seconds') if __name__ == '__main__': for i in range(5): thread = WorkerThread(name=f'computer_{i}') thread.start()
In this example, you create the
WorkerThread class. The constructor of the class,
__init__(), accepts a single argument, the
name to be given to thread. This is stored off in an instance attribute,
self.name. Then you override the
run() method.
The
run() method is already defined in the
Thread class. It controls how the thread will run. It will call or invoke the function that you passed into the class when you created it. When you create your own
run() method in your subclass, it is known as overriding the original. This allows you to add custom behavior such as logging to your thread that isn't there if you were to use the base class's
run() method.
You call the
worker() function in the
run() method of your
WorkerThread. The
worker() function itself has a minor change in that it now accepts the
instance_id argument which represents the class instance's unique id. You also need to update the
print() functions so that they print out the
instance_id.
The other change you need to do is in the
__main__ conditional statement where you call
WorkerThread and pass in the name rather than calling
threading.Thread() directly as you did in the previous section.
When you call
start() in the last line of the code snippet, it will call
run() for you itself. The
start() method is a method that is a part of the
threading.Thread class and you did not override it in your code.
The output when you run this code should be similar to the original version of the code, except that now you are also including the instance id in the output. Give it a try and see for yourself!
There are several common use cases for using threads. One of those use cases is writing multiple files at once. It's always nice to see how you would approach a real-world problem, so that's what you will be doing here.
To get started, you can create a file named
writing_thread.py. Then add the following code to your file:
# writing_thread.py import random import time from threading import Thread class WritingThread(Thread): def __init__(self, filename: str, number_of_lines: int, work_time: int = 1) -> None: Thread.__init__(self) self.filename = filename self.number_of_lines = number_of_lines self.work_time = work_time}') if __name__ == '__main__': files = [f'test{x}.txt' for x in range(1, 6)] for filename in files: work_time = random.choice(range(1, 3)) number_of_lines = random.choice(range(5, 20)) thread = WritingThread(filename, number_of_lines, work_time) thread.start()
Let's break this down a little and go over each part of the code individually:
import random import time from threading import Thread class WritingThread(Thread): def __init__(self, filename: str, number_of_lines: int, work_time: int = 1) -> None: Thread.__init__(self) self.filename = filename self.number_of_lines = number_of_lines self.work_time = work_time
Here you created the
WritingThread class. It accepts a
filename, a
number_of_lines and a
work_time. This allows you to create a text file with a specific number of lines. The
work_time is for sleeping between writing each line to simulate writing a large or small file.
Let's look at what goes in
run():}')
This code is where all the magic happens. You print out how many lines of text you will be writing to a file. Then you do the deed and create the file and add the text. During the process, you
sleep() to add some artificial time to writing the files to disk.
The last piece of code to look at is as follows:
if __name__ == '__main__': files = [f'test{x}.txt' for x in range(1, 6)] for filename in files: work_time = random.choice(range(1, 3)) number_of_lines = random.choice(range(5, 20)) thread = WritingThread(filename, number_of_lines, work_time) thread.start()
In this final code snippet, you use a list comprehension to create 5 file names. Then you loop over the files and create them. You use Python's
random module to choose a random
work_time amount and a random
number_of_lines to write to the file. Finally you create the
WritingThread and
start() it.
When you run this code, you will see something like this get output:
Writing 5 lines of text to test1.txt Writing 18 lines of text to test2.txt Writing 7 lines of text to test3.txt Writing 11 lines of text to test4.txt Writing 11 lines of text to test5.txt Finished writing test1.txt Finished writing test3.txt Finished writing test4.txtFinished writing test5.txt Finished writing test2.txt
You may notice some odd output like the line a couple of lines from the bottom. This happened because multiple threads happened to write to stdout at once.
You can use this code along with Python's
urllib.request to create an application for downloading files from the Internet. Try that project out on your own.
You have learned the basics of threading in Python. In this chapter, you learned about the following:
Thread
There is a lot more to threads and concurrency than what is covered here. You didn't learn about thread communication, thread pools, or locks for example. However you do know the basics of creating threads and you will be able to use them successfully. In the next chapter, you will continue to learn about concurrency in Python through discovering how
multiprocessing works in Python!
Python 101 - Creating Multiple Processes
Python 201: A Tutorial on Threads
This article is based on a chapter from Python 101: 2nd Edition. You can purchase Python 101 on Amazon or Leanpub. | https://www.blog.pythonlibrary.org/2022/04/26/python-101-creating-multiple-threads/ | CC-MAIN-2022-27 | refinedweb | 1,923 | 66.64 |
[C#] if(conn.State != ConnectionState.Closed) conn.Close();
In the following example, an exception is thrown if the connection is not closed.
Try conn.Close() Catch ex As InvalidOperationException 'Do something with the error or ignore it. End Try [C#] [C#] public class MyFileNotFoundException : Application the Managed Extensions.
Do not derive user-defined exceptions from the Exception base class. For most applications, derive custom exceptions from the ApplicationException class., File Sub Open() Dim stream As FileStream = File.Open("myfile.txt", FileMode.Open) Dim b As Byte ' ReadByte returns -1 at EOF. While b = stream.ReadByte() <> True ' Do something. End While End Sub End Class [C#] class FileRead { void Open() { FileStream stream = File.Open("myfile.txt", FileMode.Open); byte b; // ReadByte returns -1 at EOF. while ((b == stream.ReadByte()) != true) { // Do something. } } } [C#].
See Also
Handling and Throwing Exceptions | https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-1.1/seyhszts(v=vs.71)?redirectedfrom=MSDN | CC-MAIN-2022-27 | refinedweb | 138 | 62.64 |
Flutter Progress Bar - A widget that graphically controls the component which shows the progress of a task
>>IMAGE.
In Flutter, we can define the progress bar of widgets inside the scaffold. Therefore before adding a progress bar of a widget we need to define a Scaffold. When we create a sample flutter app, it comes with the default scaffold.
So, are you ready to make use of this widget package in the Flutter application? This Flutter widget visualizes the work done percentage in graphically. If so, then let's quickly jump into the usage and the ways a Progress Bar can be modified and used to make user-friendly apps. Here I am going to use an open-source UI Library known as GetWidget to build this Progress Bar widget in Flutter.
GetWidget Progress Bar Progress Bar widget and how we implement this on Flutter app to build awesome Flutter Progress Bar widget for an app.
How to Start:
Now here is the guide about how we should start developing the GFProgressBar Widget with the help progress bar shows us the amount of work done by a component that shows in a percentage form.
It can be of two types: Linear Progress Bar and Circular Progress Bar.
Linear Flutter Progress Bar Indicator With Percentage
Linear GFProgressBar is straight and it will cover the screen width. we can use the below code to build the Flutter Progress Bar Widget with many custom properties.
import 'package:getwidget/getwidget.dart'; GFProgressBar( percentage: 0.9, backgroundColor : Colors.pink, progressBarColor: Colors.red, )
Flutter Circular Progress Bar Indicator with Getwidget
A circular Flutter progressbar is of a circular structure. Here we use width and radius properties to make it circular.
we can use the below code to build the Circular Flutter Progress Bar indicator with Percentage Widget.
import 'package:getwidget/getwidget.dart'; GFProgressBar( percentage: 0.6, width:150, radius: 100, backgroundColor : Colors.black38, progressBarColor: Colors.green, )
Flutter Custom ProgressBar with child property
The Flutter Custom progress bar can be customized to show the percentage of work completed. By using the child property we can graphically add some enhancements to it. We can use the below code to build the GFProgressBar with child property.
import 'package:getwidget/getwidget.dart'; GFProgressBar( percentage: 0.4, lineHeight: 30, child: const Padding( padding: EdgeInsets.only(right: 5), child: Text('40%', textAlign: TextAlign.end, style: TextStyle(fontSize: 17, color: Colors.white), ), ), backgroundColor: Colors.black26, progressBarColor: Colors.green, )
GF Flutter ProgressBar with leading and trailing icons
The GFProgress bar can be customized to show the percentage of processes completed. By using the leading and trailing property we can identify the percentage of work done. we can use the below code to build the custom GFProgressBar.
import 'package:getwidget/getwidget.dart'; GFProgressBar( percentage: 0.7, lineHeight: 30, alignment: MainAxisAlignment.spaceBetween, child: const Text('70%', textAlign: TextAlign.end, style: TextStyle(fontSize: 18, color: Colors.white), ), leading : Icon( Icons.sentiment_dissatisfied, color: Colors.red), trailing: Icon( Icons.sentiment_satisfied, color: Colors.green), backgroundColor: Colors.black12, progressBarColor: Colors.blue, )
GF ProgressBar Custom Properties
The Look and feel of GFProgressBar can be customized using the following properties:
How can I fix the height of the GFProgressBar?
By using the lineHeight property we can fix a height to the progress bar.
Can we use animation in the progress bar?
Yes we can use animation here. There are many properties like animation, animationDuration, etc. to customize it.
Are there any specified child components to use in it?
No, there isn't any specification of child components that we use here. We can use text, icons, images, etc.
How can we use linear-gradient in the progress bar?
Yes, we can add linear gradient by using the linearGradient property which gives gradient to the progress line. We also have a clipLinearGradient property to show a particular part of the linear gradient. For that, we have to set true to clipLinearGradient.
What is the use of mask property?
Mask property will create a filter that makes the progress shape being drawn and blurs it.
Flutter Forum: if any Find any questions let's discuss them on Forum.
GitHub Repository: Please do appreciate our work through Github start
Conclusion:
Here we discuss, what Flutter ProgressBar Widget is? And how we can use and implement it into our Flutter app through the GetWidget ProgressBar component. Here, there are options to customize and use other types of ProgressBar.. | https://www.getwidget.dev/blog/flutter-progress-bar-indicator/ | CC-MAIN-2022-27 | refinedweb | 731 | 51.95 |
The Challenge
Recently I was challenged with the task of connecting a web application to Twitter and sending out a tweet. This article will focus on the connection to Twitter, saving the talk about sending out a tweet for another article. Having used TweetSharp last year, I thought I would check for an updated version of it and be on my way. When I got to CodePlex, I learned that support for TweetSharp had pretty much stopped in May and the developers had moved onto Hammock.
After reading their explanation, and suggestions for future development, I decided to use Hammock to connect my web application to Twitter. What is Hammock you ask, in their own words, it is a REST library for .NET that greatly simplifies consuming and wrapping RESTful services. In plain English, it makes integrating REST APIs a snap. If you want an explanation of what REST is, please check out Wikipedia.
I have to give credit to ColinM, author of this forum post on CodePlex, for giving me the basis of this code.
Before The Code
Before you can connect your web application (or desktop application) to Twitter, you need to register with Twitter. This is not the same as creating a new Twitter account, which you will need, instead this is telling Twitter that your application is going to want to interact with it. To do this, go to.
Let’s talk about some of the settings you will need to configure when you register your application.
- Application Type – For this example, choose Browser (Web). If you choose Client (Desktop), you will see the Callback URL option go away.
- Callback URL – This is the URL Twitter will send your users to after they Allow or Deny your request to connect your application to Twitter. I would recommend entering this as your production URL. In this article I will show you how to override this setting in your code.
- Default Access type – If your application is only going to consume data from Twitter, you can leave it at Read-only, but if you intend on posting tweets you will need to select Read & Write
- Use Twitter for login – If you want to allow users to authenticate via Twitter, check this box.
After you register your application, Twitter will give you the information you need to connect. You will need to take note of your Consumer key and Consumer secret. This key/secret combination is unique to your application. The Request token URL, Access token URL and Authorize URL are the same for pretty much everyone. Now that we’ve established your secret identity with Twitter, we can get started.
A Four Step Process
To make my example as simple as can be, I broke it down into four steps. Also, I set up this example using two web forms. Steps One and Two are called from GetTwitterRequest.aspx and Steps Three and Four are called from ProcessTwitterResponse.aspx. You can do this from the same form if you wish. If you’re not into web forms, you can call it from an ASP.NET MVC View as well.
For simplicity, I have setup a couple of private strings called CONSUMER_KEY & CONSUMER_SECRET. Yeah, you guessed it, those are the values we needed from Twitter. You can store these in a database, in your web.config, or hard code them right in your C# code, that’s all up to you.
For the purpose of making a fast, lightweight example, I used Session to store certain information. You will probably want to store the accessKey and accessSecret in a database. You will want to associate these values with your user in your system. We will talk about each key later on.
Here are the related “usings”:
using System.Net; using Hammock; using Hammock.Authentication.OAuth; using Hammock.Web;
Also, many developers have found the need to include the following line of code when talking to Twitter. I can’t explain why.
ServicePointManager.Expect100Continue = false;
Step One: Identify Your Application
var credentials = new OAuthCredentials { Type = OAuthType.RequestToken, SignatureMethod = OAuthSignatureMethod.HmacSha1, ParameterHandling = OAuthParameterHandling.HttpAuthorizationHeader, ConsumerKey = CONSUMER_KEY, ConsumerSecret = CONSUMER_SECRET, CallbackUrl = "YOUR_CALLBACK_URL_GOES_HERE/ProcessTwitterResponse.aspx", }; var client = new RestClient { Authority = "", Credentials = credentials }; var request = new RestRequest { Path = "/request_token" }; RestResponse response = client.Request(request);
Before you can connect your application with Twitter, you need your application to identify itself. Above you will find a pretty standard piece of code that you can use to do that. You won’t have to change much of this code to get it working with your application.
First, you need to instantiate your credentials. To do this, you’ll need to provide your CONSUMER_KEY, CONSUMER_SECRET, and Callback URL. Use your key/secret combination provided by Twitter. Your Callback URL is the URL of the page you want to process the response from Twitter. As a note, Twitter only supports hmac-sha1 signatures. After you’ve created your credentials, you’ll need to instantiate a RestClient and RestRequest.
In short, the RestClient uses your Credentials to execute your RestRequest. When you execute your RestRequest you will need to capture the RestResponse for use in Step Two.
Step Two: Ask For Permission To Connect
var collection = HttpUtility.ParseQueryString(response.Content); Session["requestSecret"] = collection[1]; Response.Redirect("" + collection[0]);
In step two, we are going to parse the RestResponse from our RestRequest in Step One. If Twitter recognizes your application, you will receive a temporary key/secret combination that we’ll call requestKey and requestSecret. This key/secret combination will be used to request authorization to connect your application to your user’s Twitter account. It is important to note that this combination is good for one request. Once you use them, you’ll have to get a new requestKey and requestSecret to make new authorization requests.
I used HttpUtility.ParseQueryString to break apart the querystring in the RestResponse. The first part is going to be your requestKey, and the second part is your requestSecret. To actually make the request, you are going to send your requestKey back to Twitter. You will want to store your requestSecret for use in Step Three. For this example I stored the requestSecret in Session. You can store this in a database if you want, but due to it’s temporary nature, storing it in Session or a Cookie should work just as well.
When you redirect your user to Twitter for authorization to connect your app to their Twitter account, they should see a screen similar to the one below.
Step Three: Wait For Twitter’s Response
var requestToken = (String)Request.QueryString["oauth_token"]; var requestSecret = (String)Session["requestSecret"]; var requestVerifier = (String)Request.QueryString["oauth_verifier"]; var credentials2 = new OAuthCredentials { Type = OAuthType.AccessToken, SignatureMethod = OAuthSignatureMethod.HmacSha1, ParameterHandling = OAuthParameterHandling.HttpAuthorizationHeader, ConsumerKey = CONSUMER_KEY, ConsumerSecret = CONSUMER_SECRET, Token = requestToken, TokenSecret = requestSecret, Verifier = requestVerifier }; var client2 = new RestClient() { Authority = "", Credentials = credentials2 }; var request2 = new RestRequest { Path = "/access_token" }; RestResponse response2 = client2.Request(request2);
At this point, your application will be waiting for Twiiter to send back a response. It will do so by redirecting the user to the URL you sent Twitter in Step Two. This step is very similar to Step One, with the exception that we will be sending more data. Besides your CONSUMER_KEY and CONSUMER_SECRET, you will need to provide your requestToken and requestVerifier, which you get from Twitter’s call to your Callback URL. You will also need your requestSecret which you stored in Step Two.
Again you will use a RestClient to execute your RestRequest. When you execute your RestRequest you will need to capture the RestResponse for use in Step Four.
Step Four: Remember Your Secret Handshake
Now all we need to do is parse the response from Twitter and save the token and secret they return.
var accessResponseCollection = HttpUtility.ParseQueryString(response2.Content); Session["accessToken"] = accessResponseCollection["oauth_token"]; Session["accessSecret"] = accessResponseCollection["oauth_token_secret"];
Twitter will respond, if the user allowed the connection, with a permanent accessToken and accessSecret. This IS your secret handshake with Twitter. You will want to store the accessToken and accessSecret in your database. I know I stored it in Session, but that’s because I was too lazy to wire this example to a database. Using you accessToken and accessSecret in future Twitter API calls is how you connect to your user’s Twitter account to your application. This token and token secret do not expire unless the user removes the connection to your application via the Twitter web site.
In closing, all this article really does is help you connect with Twitter, you will have to find something to do with this connection. It should also give you a light understanding of REST API calls as well as some insight on the OAuth authentication process. There will be future articles to help you tweet from your application or get data from Twitter to display.
To find out more about the technologies in this article, check out the following links.
Hammock –
OAuth –
Twitter API – | http://byatool.com/tag/oauth/ | CC-MAIN-2019-13 | refinedweb | 1,531 | 57.37 |
Dear PhycopPy developers,
I need to adapt a script to trigger from a Serial Port. Could you provide a demo or some test script so I can understand the syntax and how the trigger data is retrieved?
Thank you very much in advance.
Best wishes,
Catarina
Dear PhycopPy developers,
Hello,
General purpose communication with serial devices using Python is usually done with the PySerial library.
Something like this will write a byte to the port and read the response.
import serial def main(): # open the port port = serial.Serial("COM1", 9600) port.write('a') port.flush() while not port.inWaiting(): print(port.readline()) port.close() return 0 if __name__ == "__main__": main()
Dear mdc,
Thank you for the response. I have trial-ed this out on our scanner (also changed the port to COM3 which is the active port) and unfortunately I didn’t get any print of an ‘a’. I was then made aware that I should be using the serial port option anyway.
In alternative we have a National Instruments Card that is connected to the stimulus computer. I have also installed the drivers for this ( but how can I now communicate with my stimulus psychopy code?
Thank you very much in advance.
Best wishes,
Catarina
Hello,
The code I provided is an example. You need to replace ‘a’ with whatever bytes the device is expecting.
I’m not familiar with PyDAQmx, but you should be able to call the API within your experiment’s main loop as you would any other Python module. The authors of PyDAQmx provide documentation here:
Hi, I hope you can help,
i have a similar problem that I haven’t solve yet. i have 3 different triggers, but when I write the code sometimes trigger 3 changes to 224 or trigger 2 to 192.
it records all the 80 trials, but with this different numbers. What can I do?
this is the code
begin experiment
import serial
port = serial.Serial(port = ‘COM4’, baudrate = 115200)
Begin routine
port.write(trigger)
if trigger ==1:
port.write(1)
elif trigger ==2:
port.write(2)
elif trigger ==3:
port.write(3)
port.write(str.encode(chr(trigger)))
end experiment
port.close() | https://discourse.psychopy.org/t/triggering-from-serial-port/3277 | CC-MAIN-2022-21 | refinedweb | 364 | 67.35 |
25 June 2012 16:03 [Source: ICIS news]
WASHINGTON (ICIS)--?xml:namespace>
In its monthly report, the department said that sales of new, single-family homes last month were at a seasonally adjusted annual pace of 369,000 compared with the April rate of 343,000.
The May sales pace also marked a 19.8% improvement on the May 2011 estimate of 308,000.
The 7.6% jump in May and April’s 3.3% gain appear to have halted what many economists had feared could be yet another slump in the long-troubled
Sales of new one-family homes had fallen nearly 1% in January, declined by 1.6% in February and then tumbled 7.3% in March.
The housing market – especially construction of single-family homes –12,000) worth of chemicals and derivatives used in the structure or in production of component materials.
The department said that the seasonally adjusted estimate of new homes for sale at the end of May was 145,000, representing an inventory supply of 4.7 months at current sales rates.
That inventory figure, the lowest in more than a year, comes close to the 3- to 4-month supply of new homes for sale that would be considered normal in regular economic conditions.
In May last year the inventory of unsold new homes was a 6.6-month supply.
The May advance in new home sales follows other recent positive reports for the housing sector.
Construction of single-family homes rose in May, and
( | http://www.icis.com/Articles/2012/06/25/9572445/us-sales-of-new-single-family-homes-shoot-up-7.6-in-may.html | CC-MAIN-2015-06 | refinedweb | 252 | 64.41 |
Rightdown:
is almost syntactically identical to markdown
has a modern, class-based Python implementation that:
has CSS guidelines for rendering
Rightdown is part (half) of a PyPi project called “OctoBase”.
Assuming any reasonable Python v3.x environment, install with
pip:
$ sudo pip install base
From then, turning a string of markdown text into HTML is as easy as:
import base text = '***every markdown file is _already_ a rightdown file***' html = base.RightDownData.Process(text).Html() print(html)
The result should look like:
<!DOCTYPE html> <html> <head><meta charset="utf-8"></head> <body> <section><p><b><i>every markdown file is <u>already</u> a rightdown file</i></b></p></section> </body> </html>
Whoops! Our string was wrapped in a whole HTML document. This is probably correct, but not quite what we expected. Instead, let’s do this:
html = base.RightDownData.Process(text, html_add_head=False).Html() print(html)
The result now should be:
<section><p><b><i>every markdown file is <u>already</u> a rightdown file</i></b></p></section>
That’s better.
For now, please see our older Markdown Style Guide.
We’ll get the rightdown-specific version of this content online really soon.
TODO – get these pages online…
RightDownData
The
RightDownData class has several useful methods:
.Process(text, **options)
.Text()
.Html()
.Metadata(html=False)
.Fields(html=False)
.Links(html=False)
(name, target)tuples for links
.Taxonomies(html=False)
RightDownOptions
The other high-level class is
RightDownOptions, which lets you adjust how parsing and rendering are done.
For example, say you’re building a rightdown editor, and you need to render into HTML but also preserve the rightdown style marks at the same time. There is a flag for this, and you can specify it in a couple different places.
Method 1:
html = base.RightDownData.Process(text, html_include_formatting=True).Html()
Method 2:
with base.RightDownOptions(html_include_formatting=True): html = base.RightDownData.Process(text).Html()
These two methods are equivalent. When using the
with syntax, options are cumulative, so this works as you would expect:
with base.RightDownOptions(html_add_head=False): with base.RightDownOptions(html_include_formatting=True): html = base.RightDownData.Process(text).Html()
For a full list of options, see the file
base/rightdown/highlevel.py
A rightdown document is divided into fragments at hard-break lines (
--- in markdown syntax). Each fragment in a document can be rendered or have structured metadata extracted separate from the others.
Each of the above
RightDownData methods also accepts an optional argument
fragment, which takes a zero-based integer for the fragment you want to access.
We could not log you in, reset your password, sign you up, please try again. | https://octoboxy.com/rightdown/ | CC-MAIN-2021-39 | refinedweb | 434 | 50.23 |
27 September 2013 17:59 [Source: ICIS news]
LONDON (ICIS)--High density polyethylene (HDPE) pipe buyers have paid increases of €50/tonne ($68/tonne) in September, in line with the ethylene contract price for that month but not by as much as sellers had initially targeted, sources said on Friday.
The focus of attention was now October pricing, and the €35/tonne decrease in the October ethylene contract price was expected to be passed through to the HDPE pipe sector without question.
Some buyers expected to be able to achieve a larger decrease than €35/tonne but it was not yet clear whether this would be possible.
“We will give the monomer, but no more,” said a producer.
Lower naphtha prices and a weaker dollar had left producers’ margins at their best level since June.?xml:namespace>
Another HDPE closure was announced in Europe this week, with Repsol planning to close its HDPE line in Puertollano, Spain in | http://www.icis.com/Articles/2013/09/27/9710551/europe-hdpe-pipe-buyers-pay-more-in-september-in-line-with-c2.html | CC-MAIN-2015-06 | refinedweb | 158 | 54.56 |
HIE (.HI Extended) FilesHIE (.HI Extended) Files
.hie files are a proposed new filetype that should be written by GHC next to .hi files.
The ProblemThe Problem.
As a proof of concept, haddocks --hyperlinked-source feature will be rewritten to make use of .hie files, such that it doesn't need to recompile the source.
File ContentsFile Contents
The data structure is a simplified, source aware, annotated AST derived from the Renamed/Typechecked Source
We traverse the Renamed and Typechecked AST to collect the following info about each SrcSpan
Its assigned type(s)(In increasing order of generality), if it corresponds to a binding, pattern or expression
- The
idin
id 'a'is assigned types [Char -> Char, forall a. a -> a]
The set of Constructor/Type pairs that correspond to this span in the GHC AST
Details about all the identifiers that occur at this SrcSpan
For each occurrence of an identifier(Name or ModuleName), we store its type(if it has one), and classify it as one of the following based on how it occurs:
- Use
- Import/Export
- Pattern Binding, along with the scope of the binding, and the span of the entire binding location(including the RHS) if it occurs as part of a top level declaration, do binding or let/where binding
- Value Binding, along with whether it is an instance binding or not, its scope, and the span of its entire binding site, including the RHS
- Type Declaration (Class or Regular) (foo :: ...)
- Declaration(class, type, instance, data, type family etc.)
- Type variable binding, along with its scope(which takes into account ScopedTypeVariables)
It should be possible to exactly recover the source from the .hie file. This will probably be achieved by including the source verbatim in the .hie file, as recovering the source exactly from the AST might be tricky and duplicate the work on ghc-exactprint.
The first line of the .hie file should be a human readable string containing information about the version of the format, the filename of the original file, and the version of GHC the file was compiled with. Example: (v1.0,GHC8.4.6,Foo.hs)
The format should be fairly stable across ghc versions, so we need to avoid capturing too much information. More detailed information about the exact haskell syntactic structure a part of the tree represents could be obtained by inspecting the tokens/keywords in that part.
The RichToken type used in haddock:
Efficient serialization of highly redundant type infoEfficient serialization of highly redundant type info
The type information in .hie files is highly repetitive and redundant. For example, consider the expression
const True 'a'
The type of the overall expression is
Boolean, the type of
const True is
Char -> Boolean and the type of
const is
Boolean -> Char -> Boolean
All 3 of these types will be stored in the .hie file
To solve the problem of duplication, we introduce a new data type that is a flattened version.
Fix HieType is roughly isomorphic to the original GHC
Type
Scope information about symbolsScope information about symbols
A simple scope is defined as
data Scope = NoScope | LocalScope Span | ModuleScope
Value bindings are assigned a single
Scope.
For pattern bindings, things get a bit more complicated, with bindings in do notation and -XViewPatterns
do (b, a, (a -> True)) <- bar -- ^ ^^^^^^^^^^^^ ^^^ a is not in scope here or in the span of the first `b` -- ^ but a is in scope here foo a -- ^^^^^ a is in scope here
So pattern bindings are assigned two
Scopes, one for the span of the pattern binding itself, and another for the rest.
The story is most complicated for type variables, in the presence of -XScopedTypeVariables and -XInstanceSigs
foo, bar, baz :: forall a. a -> a
a is in scope in all the definitions of
foo,
bar and
baz, so we need a list of scopes to keep track of this. Furthermore, this list cannot be computed on the first go, and thus type variable scopes are defined as
data TyVarScope = ResolvedScopes [Scope] | UnresolvedScope [Name.Name] (Maybe Span)
UnresolvedScopes are resolved in a separate pass, by looking up the identifier binding sites.
Consider the following case
instance Foo Int where foo :: forall a. ... foo = ... -- a is in scope here instance Foo Bar where foo = ... -- a is not in scope here
To handle this case, we must store the Span of the instance/class definition along with the names.
Validation of ASTValidation of AST
There are a few simple validation tests enabled by
-fvalidate-hie
- The shape invariants of the AST are checked(parent node spans completely contain children node spans which are arranged in left to right order without any overlaps)
- Scope information collected is validated(by checking all symbol occurrences are in the calculated scope)
- The AST is round-tripped through the binary serialization and checked for consistency
Use casesUse cases
Haddocks hyperlinked source and haskell-ide-engine
- Type information on hover
- Local(in file) usage sites for symbols
- Supporting global go to/view definition for every symbol in the Package Db
- Viewing info about arbitrary nodes in the AST - does it have a type? What language construct does it correspond to?
- Recovering the scopes of symbols, for use in completion etc.
Along with an indexer that scans .hie files
- Viewing the usage sites of symbols across the entirety of hackage or a local Package Db
- Dependency analysis of symbols - what other symbols does something depend on
- Searching for symbols, and restricting search by type. Example: search for usages of
readwith type
String -> Intto find out where the instance for
Read Intis being used.
More sophisticated analysis of the AST
- Diffing changes to the AST
- Viewing typical invocations/example usages of functions
Modifications to GHCModifications to GHC
- HIE file generation will be controlled by a GHC flag(-fenable-ide-info)
- The file will be generated as soon as GHC is done typechecking a file(maybe in hscIncrementalCompile?)
- Need to coordinate with the Hi Haddock project(Including docstrings in .hi files) as that may push the burden of resolving Names/Symbols in haddock comments onto GHC.
- Other than this, little interaction with the rest of GHC should be needed.
Why should we be able to recover file contents exactly?Why should we be able to recover file contents exactly?
Consider the case when the .hs source file that exists on disk doesn't compile, but with still have a stale .hie file generated the last time the source compiled. We would like to recover as much information as possible from the
stale .hie file to aid the user working on the .hs file. This is possible if we recover the original, compiling source from the .hie file and cross-reference/diff it with the edited file, so that we can still answer user queries for
portions of the file that haven't been edited(Indeed, this is how haskell-ide-engine currently works, but instead of reading from a .hie file, it maintains an in-memory cache of the last good
TypecheckedModule corresponding to the source)
Links to additional discussionLinks to additional discussion
Initial discussion on #ghc (The .hie(.hi Extended) name suggested by mpickering, cbor serialisation suggested by hvr)
Making use of .hie files as a tooling developerMaking use of .hie files as a tooling developer
Structure of .hie filesStructure of .hie files
The HIE file AST is essentially an interval tree, where the intervals are
SrcSpans from the code which correspond to nodes in the internal GHC ASTs.
Each
Node in the tree has a
Span, some information associated with it, and
some children, the invariant being that the spans of the children are wholly
contained in the parent span. Additionally, the elements of
nodeChildren
are sort with respect to their spans.
Node { nodeInfo :: NodeInfo a , nodeSpan :: Span , nodeChildren :: [HieAST a] }
The information contained in each nodes includes:
- The type(s) assigned by GHC to this
Node, if any
- The name of the GHC AST constructors that this Node corresponds to
- The identifiers that occur at this span
- Information about the identifiers, like:
- Are they names or modules
- Their type, if any
- The context in which they occur: Are they being defined or used, imported, exported, declared etc..
- If they are being defined, the full span of the definition, and an approximated Scope over which their definition can be used.
Reading .hie filesReading .hie files
To read
.hie files, you must use a
NameCache. This is so that if you
are using the GHC API and already have some
Names,
Names assigned to
identifiers in the .hie file can be consistent with those.
To create a fresh
NameCache, you can do something like:
makeNc :: IO NameCache makeNc = do uniq_supply <- mkSplitUniqSupply 'z' return $ initNameCache uniq_supply []
Once you have a
NameCache, you can use the
readHieFile function
from
HieBin.
do nc <- makeNc (hiefile, nc') <- readHieFile nc path ...
Recovering and printing typesRecovering and printing types
The type information that needs to be serialized in
.hie files is highly
repetitive and redundant. For example, consider the expression:
const True 'a'
The type of the overall expression is
Bool, the type of
const True is
Char -> Bool and the type of
const is
Bool -> Char -> Bool.
All 3 of these types will be stored in the .hie file.
To solve the problem of duplication, we introduce a new data type that is
a flattened version of GHC. In the AST, all types are stored as references
into this array
Fix HieType is supposed to be approximately equivalent to the original GHC
Type.
To recover the full type, you can use the following function in
HieUtils:
recoverFullType :: TypeIndex -> A.Array TypeIndex HieTypeFlat -> HieTypeFix
To print this type out as a string, you can use the following function:
renderHieType :: DynFlags -> HieTypeFix -> String
If you don't have a GHC session set up, you will need to construct some
DynFlags to pass to this function. To do this, you will need to have path
to the GHC
libdir. You can get this using the
ghc-paths package.
import SysTools ( initSysTools ) import DynFlags ( DynFlags, defaultDynFlags ) import GHC.Paths (libdir) dynFlagsForPrinting :: IO DynFlags dynFlagsForPrinting = do systemSettings <- initSysTools libdir return $ defaultDynFlags systemSettings ([], [])
Looking up information for a point/span in a fileLooking up information for a point/span in a file
It is easy to look up the AST node enclosing/enclosed by a particular
SrcSpan. You can use the following functions from
HieUtils:
selectSmallestContaining :: Span -> HieAST a -> Maybe (HieAST a) selectLargestContainedBy :: Span -> HieAST a -> Maybe (HieAST a)
Looking up information for a symbol in the fileLooking up information for a symbol in the file
To look up information for a particular, already known symbol, it is a good idea
to generate a "References Map" using the following function in
HieUtils:
generateReferencesMap :: HieASTs a -> M.Map Identifier [(Span, IdentifierDetails a)]
Using the map generated by this, you can lookup all the spans a given identifier occurs in, as well as whatever information is collected about the occurrence at that location.
Using hiedb to work with a collection of .hie filesUsing hiedb to work with a collection of .hie files
hiedb offers a library interface to query
.hie files for references,
and to generate index databases.
You can also use the library to lookup the
.hie file associated with
a given
Module(as long as that file is indexed in the db), and then run
queries on the file yourself.
Upcoming developmentsUpcoming developments
Use HIE files to understand typeclass evidence and implicit variablesUse HIE files to understand typeclass evidence and implicit variables
Recently, I extended
.hie files to capture information about typeclass
evidence that is generated by GHC. This can help you debug generated evidence
for your code, as well as enable features like "jump to implementation", which
will take you to the definition of the instance(s) that will be actually used
when you invoke a class method or any other method that takes some evidence
as a parameter.
To understand this, it is best to consider an example:
class C a where f :: a -> Char instance C a => C [a] where -- Line 27 f x = 'a' foo :: C a => a -> Char foo x = f [x] -- Line 31 -- ^ We want to query information for this point
With the new information, you can write a query on
.hie files to ouput the
following:
Evidence from SrcSpanOneLine "HieQueries.hs" 31 1 14 of type: C [a] Is bound by a let, depending on: Evidence of type: forall a. C a => C [a] bound by an instance at RealSrcSpan SrcSpanOneLine "HieQueries.hs" 27 10 22 Evidence from SrcSpanOneLine "HieQueries.hs" 31 1 14 of type: C a Is bound by a signature
This probably won't make it into GHC 8.8.1 though. You can track the progress of the MR here: !1286 (closed)
More type information in the ASTMore type information in the AST
GHC doesn't save type information for all the nodes in its AST. This
means that to report type information, tools like
ghc-mod,
intero,
haskell-ide-engine and GHCi's
:set +c desugared every subexpression in the
AST in order to access its type. However, this has extremely poor performance
characteristics due to repeatedly desugaring the same expression many times.
To avoid this, currently
.hie files only store type information for
nodes where it is already precomputed for GHC, and for leaf nodes.
The plan is to fix this so that accessing type information for arbitrary nodes in the typechecked AST is fast and efficient, by including the relevant type information on the AST nodes where required.
Easier, faster pretty printing for
HieType's
Currently, if you want to print a HieType, you have to go through GHC's
pretty printer via conversion to
IFaceType. If you want to print a large
number of types, this also forces you to unroll all the types in the
.hie
file, and pretty printing doesn't take any advantage of the sharing.
It should be possible to write a specialized pretty printer for
HieType's
that is fast and is able to share its output, so that it is efficient to
print out large numbers of types. | https://gitlab.haskell.org/ghc/ghc/-/wikis/hie-files | CC-MAIN-2022-21 | refinedweb | 2,352 | 57.71 |
SpecialEventAdd data
On 25/08/2014 at 10:58, xxxxxxxx wrote:
I cant seem to find the correct way to get the personal data from a SpecialEventAdd()
This is what I have:
Outside of plugin:
c4d.SpecialEventAdd(PLUGIN_ID,p1 = 1)
In plugin:
def CoreMessage(self, id, msg) : if id==PLUGIN_ID: print msg
This will print out the container but I cannot seem to find where the private data is located in the container.
how do I get the p1 value?
On 26/08/2014 at 09:36, xxxxxxxx wrote:
So I managed to get this to work! After finding A post HERE. I Knew that it was possible but there was no way to sift through that amount of data in an efficient was.
So checking the C++ documentation I found that p1 and p2 actually stand for c4d.BFM_CORE_PAR1 and c4d.BFM_CORE_PAR2 this resulted in much excitement!
I was then able to get somewhere and I feel this kind of information should be included in the docs and freely available. So I hope this will help anyone in the future trying to do the same thing and with that share their own findings.
So here's how to make it work...
Outside of the plugin: (In this case p1 is either 1 or 2 but can be any integer)
c4d.SpecialEventAdd(PLUGIN_ID,p1 = 1)
Within the plugin:
def CoreMessage(self, id, msg) : if id == PLUGIN_ID: #) if P1MSG_EN == 1: # If p1 = 1 #Do Something if P1MSG_EN == 2: # If p1 = 2 #Do Something else else: pass return True | https://plugincafe.maxon.net/topic/8098/10538_specialeventadd-data/1 | CC-MAIN-2021-10 | refinedweb | 257 | 71.04 |
wifi antenna default says pycom modules default to the internal antenna for wifi but when I run
from network import WLAN wlan=WLAN(mode=WLAN.STA) print('antenna', wlan.antenna())
I get
antenna 2
since 0=internal & 1=external, 2 seems a tad ambiguous. I'm wondering if I need to run
Pin('P12', mode=Pin.OUT); wlan.antenna(WLAN.INT_ANT)
just to be sure?
I will add an entry to the documentation and a micropython constant for
MAN_ANTto make this more clear, thanks!
Okay I looked into it in more detail and was able to reproduce it (I accidentally set it in a previous applications, and did not power off in between)
so, antenna = 2 refers to
ANTENNA_TYPE_MANUALif you did not use its keyword argument in
wlan= WLAN()or
wlan.init(...)or the function
wlan.antenna(..), meaning you can select the antenna manually by setting pin P12. In most cases, this defaults to the use of the internal antenna, as P12 is not asserted by default. To be sure, you should set the antenna type, but it is not necessary
Gijs
@Gijs tried it on 3 different devices
(sysname='LoPy4', nodename='LoPy4', release='1.20.0.rc13', version='v1.9.4-94bb382 on 2019-08-22', machine='LoPy4 with ESP32', lorawan='1.0.2', sigfox='1.0') (sysname='GPy', nodename='GPy', release='1.20.1.r1', version='15b6d69 on 2019-11-02', machine='GPy with ESP32')
all give 2 as the result, no pybytes.
That is quite odd, as when I run the same code on my device:
>>> from network import WLAN >>> wlan=WLAN(mode=WLAN.STA) >>> print('antenna', wlan.antenna()) antenna 0
Refering to the internal antenna. Which firmware version are you running and are you perhaps using pybytes on boot?
Gijs | https://forum.pycom.io/topic/6594/wifi-antenna-default | CC-MAIN-2021-31 | refinedweb | 294 | 57.87 |
»
Swing / AWT / SWT
Author
'Moving' a circle along a line
Harold Lime
Ranch Hand
Joined: Jul 20, 2009
Posts: 38
posted
Jul 22, 2009 11:51:59
0
I am tinkering with a bit of
Java
and would like to 'move' a circle along a curved line to simulate a free-kick in football (soccer).
I know how to draw a curve based on three sets of coordinates and I know how to draw a circle and I can make a circle 'move' by re-drawing it in a slightly different position.
But I can't figure out a way of making the circle move along the line.
The only way I can think of doing it is to get the coordinates of each pixel on the line and then use those to repeatedly draw a circle.
Is there a way to get this information without being a maths genius? Or is there a better way?
Craig Wood
Ranch Hand
Joined: Jan 14, 2004
Posts: 1535
posted
Jul 22, 2009 12:14:13
0
There are two fairly straightforward ways:
1 — use a
FlatteningPathIterator
with a suitably small flatness, say 0.01 to start, to get the coordinates along the curve. You can get a PathIterator from both the
QuadCurve2D
and
CubicCurve2D
classes.
2 — use the parametric form of the curve to get (x,y) for [0<= t <= 1.0]
These equations are given in the Field Detail section of the PathIterator interface for the SEG_QUADTO and SEG_CUBICTO fields.
Harold Lime
Ranch Hand
Joined: Jul 20, 2009
Posts: 38
posted
Jul 22, 2009 12:50:06
0
I've no idea what 2 means... but the first one works perfectly.
Thanks
Harold Lime
Ranch Hand
Joined: Jul 20, 2009
Posts: 38
posted
Jul 25, 2009 04:58:25
0
Is it possible to get a set of equally spaced coordinates along curve?
Craig Wood
Ranch Hand
Joined: Jan 14, 2004
Posts: 1535
posted
Jul 25, 2009 09:01:18
0
I would try to get points closer together than the distance increment along the curve that you want for your animation. Then you can move along the curve and collect points that are close to your desired distance increment.
In the example here it looks like the parametric form is more amenable to this.
import java.awt.*; import java.awt.geom.*; import javax.swing.*; public class CloseUp extends JPanel { Point2D.Double[] points; CubicCurve2D.Double curve; boolean firstTime = true; public CloseUp() { points = new Point2D.Double[4]; points[0] = new Point2D.Double(355.0, 268.0); points[1] = new Point2D.Double( 20.0, 179.0); points[2] = new Point2D.Double( 77.0, 158.0); points[3] = new Point2D.Double(288.0, 32.0); curve = new CubicCurve2D.Double(); curve.setCurve(points, 0); }(curve); g2.setPaint(Color.red); for(int i = 0; i < points.length; i++) { g2.fill(new Ellipse2D.Double(points[i].x-1.5, points[i].y-1.5, 4, 4)); } if(firstTime) { exploreCurve(); exploreBezier(); firstTime = false; } } private void exploreCurve() { double flatness = 0.0001; PathIterator pit = curve.getPathIterator(null, flatness); double[] coords = new double[2]; double max = -Double.MAX_VALUE; double min = Double.MAX_VALUE; Point2D.Double lastPoint = new Point2D.Double(); while(!pit.isDone()) { int type = pit.currentSegment(coords); switch(type) { case PathIterator.SEG_MOVETO: break; case PathIterator.SEG_LINETO: double dist = lastPoint.distance(coords[0], coords[1]); if(dist < min) min = dist; if(dist > max) max = dist; break; default: System.out.println("Unexpected type: " + type); } lastPoint.setLocation(coords[0], coords[1]); pit.next(); } System.out.printf("PathIterator: min = %f max = %f%n", min, max); } /** * P(t) = B(n,0)*P0 + B(n,1)*P1 + ... B(n,n)*Pn * 0 <= t <= 1 * * B(n,m) = mth coefficient of nth degree Bernstein polynomial * = C(n,m) * t^(m) * (1 - t)^(n-m) * C(n,m) = Combinations of n things, taken m at a time * = n! / (m! * (n-m)!) */ private void exploreBezier() { double max = -Double.MAX_VALUE; double min = Double.MAX_VALUE; Point2D.Double lastPoint = new Point2D.Double(); int n = points.length; // Usually use component width for calculating t. // Choose a multiplier (3) to get desired min/max ranges. int w = 3*getWidth(); for(int j = 0; j <= w; j++) { double t = (double)j/w; // [0 <= t <= 1.0] double x = 0; double y = 0; for(int k = 0; k < n; k++) { x += B(n-1, k, t)*points[k].x; y += B(n-1, k, t)*points[k].y; } if(j > 0) { double dist = lastPoint.distance(x, y); if(dist > max) max = dist; if(dist < min) min = dist; } lastPoint.setLocation(x, y); } System.out.printf("Parametric: min = %f max = %f%n", min, max); } private double B(int n, int m, double t) { return C(n, m) * Math.pow(t, m) * Math.pow(1.0-t, n-m); } private long C(long n, long m) { if(m > n/2) { m = n - m; } if(m <= 0 || n <= 0) { return 1; } else { return C(n-1, m-1)*n/m; } } public static void main(String[] args) { JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.add(new CloseUp()); f.setSize(400,400); f.setLocation(100,100); f.setVisible(true); } }
I agree. Here's the link:
subject: 'Moving' a circle along a line
Similar Threads
applet x/y coordinates
Creating Java applet
How to reset jpanel...
Draw a curve in Java if only have 3 coordinates known.....Help !!
how do i rotate a point from a center point??
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
JForum
|
Paul Wheaton | http://www.coderanch.com/t/455284/GUI/java/Moving-circle-line | CC-MAIN-2015-06 | refinedweb | 912 | 68.26 |
LineTicks is a simple class that I put together to add tick marks and labels to a plotted line (not the axes, which Matplotlib already handles well with lots of methods for customization). The code is available on github.
The tick marks stick out perpendicular to the plotted line and move around when the plot is dragged, resized or its limits are changed.
It's a bit simple and requires the indexes of the data points on which to add tick marks. Labels should be given as a sequence of strings of the same length as the index list.
An example usage is given here.
import numpy as np import matplotlib.pyplot as plt from lineticks import LineTicks # Acceleration due to gravity, m.s-2 g = 9.81 # Initial speed (m.s-1) and launch angle (deg) v0, alpha_deg = 40, 45 alpha = np.radians(alpha_deg) # Time of flight tmax = 2 * v0 * np.sin(alpha) / g # Grid of time points, and (x,y) coordinates of trajectory n = 100 t = np.linspace(0, tmax, n) x = v0 * t * np.cos(alpha) y = - g * t**2 / 2 + v0 * t * np.sin(alpha) fig, ax = plt.subplots(facecolor='w') fig.suptitle('Trajectory of a projectile launched at {} m/s at an angle' ' of {}°'.format(v0, alpha_deg)) traj, = ax.plot(x, y, c='purple', lw=4) ax.set_xlabel('Range /m') ax.set_ylabel('Height /m') ax.set_xlim(-20,x[-1]+10) # Add major ticks every 10th time point and minor ticks every 4th; # label the major ticks with the corresponding time in secs. major_ticks = LineTicks(traj, range(0, n, 10), 10, lw=2, label=['{:.2f} s'.format(tt) for tt in t[::10]]) minor_ticks = LineTicks(traj, range(0,n), 4, lw=1) plt.show()
NB For resizing to work properly with an interactive chart using the MacOSX backend, you will need a recent version of Matplotlib which includes this patch which fixes a bug in the
resize_event handler.
Comments are pre-moderated. Please be patient and your comment will appear soon.
There are currently no comments
New Comment | https://scipython.com/blog/adding-ticks-to-a-matplotlib-line/ | CC-MAIN-2021-39 | refinedweb | 342 | 69.38 |
New in Symfony 3.2: Console Improvements (Part 1)
The Console component will receive a lot of new features in Symfony 3.2, mostly related to improving its DX (developer experience). In this first of a three-part series, we introduce four of those new features.
Read the part 2 and part 3 of this series of articles explaining the new features of the Console component in Symfony 3.2.
Command aliases are no longer displayed as separate commands¶
Contributed by
Juan Miguel Rodriguez
in #18790.
Best practices recommend to define namespaced commands to avoid collisions and improve your application organization. However, for frequently executed commands, it's convenient to define shortcuts:
In the above example, the command can be executed as
./bin/console app:very:long:name
and as
./bin/console foo. Although there is just one command, Symfony will
show it as two separate commands:
In Symfony 3.2 aliases are now inlined in their original commands, reducing the clutter of the console output:
Errors are now displayed even when using the quiet mode¶
Contributed by
Olaf Klischat
in #18781.
If you add the
-q or
--quiet option when running a Symfony command, the
output is configured with the
OutputInterface::VERBOSITY_QUIET level. This
makes the command to not output any message, not even error messages.
In Symfony 3.2 we've improved the
-q and
--quiet options to keep
suppressing all the output except for the log messages of
Logger::ERROR
level. This way you'll never miss an error message again.
Better support for one command applications¶
Contributed by
Grégoire Pineau in #16906.
Building a single command application in Symfony is possible but it requires
you to make some changes to not pass the command name continuously. In Symfony
3.2 we've improved the base
Application class to support single command
applications out-of-the-box.
First, define a command as usual and create the console application. Then, set
the only command as the default command and pass
true as the second argument
of
setDefaultCommand(). That will turn the application into a single command
application:
Simpler command testing¶
Contributed by
Robin Chalas
in #18710.
Testing a Symfony command is unnecessarily complex and it requires you to go
deep into PHP streams. For example, if your test needs to simulate a user typing
123,
foo and
bar, you have to do the following:
In Symfony 3.2 we've simplified command testing by adding a new
setInputs()
method to the
CommandTester helper. You just need to pass an array with the
contents that the user would type:
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
New in Symfony 3.2: Console Improvements (Part 1) symfony.com/blog/new-in-symfony-3-2-console-improvements-part-1Tweet this
__CERTIFICATION_MESSAGE__
Become a certified developer! Exams are online and available in all countries.Register Now
To ensure that comments stay relevant, they are closed for old posts.
Mickaël Andrieu said on Jul 7, 2016 at 09:03 #1 | https://symfony.com/blog/new-in-symfony-3-2-console-improvements-part-1 | CC-MAIN-2021-39 | refinedweb | 517 | 56.76 |
What, you want answers too?
This page addresses general FAQ's. More specific FAQ's can be found in the FAQ Category
Wicket architecture
What about performance and scalability?
Wicket performance is actually quite good under stress. Remember though that in many real-world application your bottleneck will be in business or database layer.
Wicket benchmark can be found here: wicket-1.3.x-benchmark.
You should also search wicket-user mailing list for performance and scalability or simply use performance-scalability-tipsas your starting point.
Versioning
Wicket stores versions of pages to support the browser's back button. Because this concept is difficult to understand, we'll present a simple use case that describes the problem and how versioning helps.
Suppose you have a paging ListView with links in the ListItems, and you've clicked through to display the third page of items. On the third page, you click the link to view the details page for that item. Now, the currently available state on the server is that you were on page 3 when you clicked the link. Then you click the browser's back button twice (i.e. back to list page 3, then back to list page 2, but all in the browser). While you're on page 2, the server state is that you're on page 3. Without versioning, clicking on a ListItem link on page 2 would actually take you to the details page for an item on page 3.
(This was taken from an IRC discussion with Martijn.)
How does Wicket know when a new browser window is opened?
Wicket uses the Javascript window.name property to detect if a new window (or tab) was opened. This property is blank by default .
How do I provide the page map for bookmarkable pages?
You do this by providing it as part of the URL. How exactly this looks depends on the 'encoding' of the request. The common cases are (myPageMap is the page map):
- a normal request, where the page map name parameter is provided as a part of the bookmarkable page request parameter:
myapp?wicket:bookmarkablePage=myPageMap:somepackage.MyPage
- a request to a mounted URL, where the page map parameter is provided as a path encoded parameter:
/myapp/mountedpage/param1/value1/wicket:pageMapName/myPageMap
What is the future of onAttach and onDetach methods?
Igor Vaynberg in wicket-dev:
We are trying to consolidate the methods. We have a bunch of
internalOnAttach/internalAttach/attach/onattach methods. it's a big mess.
what this refactor does is give you one method you can override - onattach()
but forces the call to super.
Doing it like it has been done doesn't work. users assume onattach() is a
template method, they can override and not have to call super - but this
fails if you go more then one method deep!
if i create a custom component and do something in onattach(), then the user
subclasses it and they do something in onattach() and don't bother to call
super() they will break my functionality. My only choice of action is to
make onattach() final in my custom component and provide yet another
template for the user, onattach2() ? This just doesn't scale. Better to have
a simple and clear contract - onattach and ondetach always require the call
to super.
Unfortunately the only way to do that at this point and keep the same
method names is to do what i did.
OT there is a JSR for software defect annotations that includes something
like @MustCallSuper (forget what its called), that combined with an apt
builder in an ide will make these kinds of contracts very easy to enforce at
compile time. we are just not there just yet.
How can I use wicket to develop webapps that target mobile devices?
Write clean HTML with CSS targeted toward the various mobile clients that you wish to support. More info can be found on the Mobile Devices page.
Maven
How do I skip the tests when doing a Maven build?
Add a
-Dmaven.test.skip=true parameter to your Maven command line.
Other information about building wicket can be found on the Wicket from source page.
Is Wicket available in the central Maven 2 repository?
Yes, it is. However, we must rely on the Maven project to update their repository with the latest releases, resulting in some lag. If you need them hot and fresh, you can use the wicket-stuff's Maven 2 repository by adding the the following to your project's pom.xml:
<repositories> <repository> <id>org.wicketstuff</id> <name>Wicket Stuff Repo</name> <url></url> </repository> </repositories>
Working with the Wicket API
Why are so many methods final?.
Why no common init() method on pages?
A "two-phase init" is a pattern that deals with this and other use cases. The big downside to that pattern is that you have to transfer all your constructor arguments into fields so they can be accessed by the second phase' init method, and for a framework concerned with size of the objects this does not mesh very well. It also adds a lot more code you have to write. so as far as making this change in Wicket we won't do that. Moreover, it is simple enough to add a private init() into your basepage and forward both constructors to it.
How do I add custom error pages?
see Error Pages and Feedback Messages
How can I have images/files uploaded to and downloaded from my wicket app?
In short, use the wicket.markup.html.form.upload.FileUploadField component in your form (set as multiPart) in order to allow file uploads. Use an implementation of the wicket.markup.html.DynamicWebResource to provide downloads of the content. For a longer description with examples see Uploading and Downloading Files
What is the difference between setResponsePage(new MyWebPage()) and setResponsePage(MyWebPage.class)
setResponsePage(new MyWebPage()) (or setResponsePage(new MyWebPage(myPageParameters))) can be used if you want to have a bookmarkable url in the browser (your page must have default constructor or PageParameter constructor).
setResponsePage(MyWebPage.class) can be used if you want to pass information to pages on the serverside. This generates a session specific url (most of the time you can use hybrid url coding strategy).
The view layer, markup etc.
My markup element does not get rendered
If a tag's written like this,
<span wicket:
the tag's not rendered, whereas if it's written like this
<span wicket:name</span>
it is.
The rationale is that we do not automatically convert
<span/>
into
<span></span>
because that's too much "behind-the-scenes" magic for user to be happy with. As a result, as a
<span/>
has no body,
onComponentBody() isn't called and nothing is rendered!
How can I change the location of Markup files?
Wicket reads the html template from the same location as the Page class (java class name + ".html"). Can this be changed?
Yes. See Control where HTML files are loaded from
How can I render my templates to a String?
public class PageRenderer extends BaseWicketTester { private final Locale locale; public PageRenderer(Locale locale) { this.locale = locale; } public PageRenderer() { this.locale = null; } private String renderStartPage() { if (this.locale != null) { getWicketSession().setLocale(locale); } return getServletResponse().getDocument(); } public synchronized String render(Class<? extends WebPage> pageClass) { startPage(pageClass); return renderStartPage(); } public synchronized String render(Class<? extends WebPage> pageClass, PageParameters parameters) { startPage(pageClass, parameters); return renderStartPage(); } public synchronized String render(WebPage page) { startPage(page); return renderStartPage(); } }
For different approach please check Use wicket as template engine.
How to add #-anchor (opaque) to page url?
I don't know universal solution, but for mounted pages you can override particular url coding strategy to encode a parameter in special way. Say, I named parameter "#" and my strategy:
public CharSequence encode(IRequestTarget requestTarget) { if (!(requestTarget instanceof IBookmarkablePageRequestTarget)) { throw new IllegalArgumentException("this encoder can only be used with instances of " + IBookmarkablePageRequestTarget.class.getName()); } IBookmarkablePageRequestTarget target = (IBookmarkablePageRequestTarget)requestTarget; AppendingStringBuffer url = new AppendingStringBuffer(40); url.append(getMountPath()); final String className = target.getPageClass().getSimpleName(); PageParameters pageParameters = target.getPageParameters(); if (target.getPageMapName() != null) { pageParameters.put(WebRequestCodingStrategy.PAGEMAP, WebRequestCodingStrategy .encodePageMapName(target.getPageMapName())); } final String fragment = pageParameters.getString("#"); if(fragment != null) pageParameters.remove("#"); url.append("/"); url.append(className); if(!pageParameters.isEmpty()) { url.append("?"); appendParameters(url, pageParameters); } if(fragment != null) url.append("#").append(urlEncodePathComponent(fragment)); return url; }
Now you can add parameter named "#" in PageParameters bookmarkable page link or so and it will be rendered as anchor.
More on the view: AJAX
I get errors when I use Ajax in Opera Browser (before Version Beta 9 of Opera)
If you want to use wicket's Ajax implementation with Opera Browser you have to do
Application.getMarkupSettings().setStripWicketTags(true);
to get it work.
Because of a Bug which is in all Opera Browsers before Version 9 Beta, the ajax stuff will not work with wicketTags enabled.
Keywords:
Opera Ajax Wicket Strip wicket:id
Which browsers have been tested with Wicket AJAX?
To test it use the AJAX examples.
- Google Chrome - latest two stable versions
- Firefox - latest two stable versions
- Safari 5.x and 6.x
- Opera 12.x and 15.x
- Internet Explorer 8+
Wicket.replaceOuterHtml gives weird result on Firefox
There are certain cases when you replace markup in FireFox where some of the nodes are not placed right in the DOM tree. This happens when the markup is invalid, e.g. you have somewhere a block element inside an inline element, such as <table> or <div> in <span>.
How to repaint a (List/Grid/Data/Repeating)View via Ajax?
See How to repaint a ListView via Ajax.
Wicket community
What do you look like?
You can see some of the Wicket committers in action at the Wicket gathering in 2005 in Deventer, Holland. You'll see Eelco, Johan, Juergen, Martijn and Jonathan, and emeritus committer Chris.
Miscellaneous
What is the meaning of life, the universe and everything?
42
Deployment
My application says "DEVELOPMENT MODE", how do I switch to production?
Add the following to your web.xml, inside your <servlet> definition (or <filter> definition if you're using 1.3.x):
<init-param> <param-name>configuration</param-name> <param-value>deployment</param-value> </init-param>
You can alternatively set this as a <context-param> on the whole context.
Another option is to set the "wicket.configuration" system property to either "deployment" or "development". The value is not case-sensitive.
The system property is checked first, allowing you to add a web.xml param for deployment, and a command-line override when you want to run in development mode during development.
You may also override Application.getConfigurationType() to provide your own custom switch, in which case none of the above logic is used. See WebApplication.getConfigurationType() for the default logic used above.
How do I know in what mode (DEVELOPMENT/DEPLOYMENT) my application runs?
As of Wicket 1.3.0, you can call Application.getConfigurationType(). Prior to that, there is no flag telling you in which mode you are. If you want a flag subclass Application.configure() store the "configurationType" parameter in a variable.
if (DEVELOPMENT.equalsIgnoreCase(configurationType)) { log.info("You are in DEVELOPMENT mode"); getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); getDebugSettings().setComponentUseCheck(true); getDebugSettings().setSerializeSessionAttributes(true); getMarkupSettings().setStripWicketTags(false); getExceptionSettings().setUnexpectedExceptionDisplay( UnexpectedExceptionDisplay.SHOW_EXCEPTION_PAGE); getAjaxSettings().setAjaxDebugModeEnabled(true); } else if (DEPLOYMENT.equalsIgnoreCase(configurationType)) { getResourceSettings().setResourcePollFrequency(null); getDebugSettings().setComponentUseCheck(false); getDebugSettings().setSerializeSessionAttributes(false); getMarkupSettings().setStripWicketTags(true); getExceptionSettings().setUnexpectedExceptionDisplay( UnexpectedExceptionDisplay.SHOW_INTERNAL_ERROR_PAGE); getAjaxSettings().setAjaxDebugModeEnabled(false); } | https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27763 | CC-MAIN-2019-26 | refinedweb | 1,903 | 50.02 |
Subject: [boost] [Boost.Config] Stlport patch for Sun compilers on Linux
From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2008-09-09 15:42:53
Hi,
I've attached a patch to fix this error with the sun compilers on Linux.
I'm not well versed with the subtleties of Stlport (there may be
better ways to code this). The patch merely avoids defining macro
BOOST_NO_EXCEPTION_STD_NAMESPACE as the Stlport bundled with the Sun
compilers on Linux seems to correctly put all type_info into the std
namespace. The Sun compilers on Solaris still require this macro
definition.
I've tested that this fixes the type_info error with sun-5.9 on Linux
and that it doesn't break the Sun tests on Solaris, okay to commit?
-- Noel
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/2008/09/142099.php | CC-MAIN-2019-39 | refinedweb | 147 | 68.97 |
Deno can bundle JavaScript
Lately I’ve been experimenting with Deno to help me need less tooling when building for the browser. Deno can be used to create servers and scripts, and we do use it for those purposes, but what I am interested in is getting back to building in the browser without needing so much tooling like Babel or npm. Those are not bad tools, but I feel much more productive when I’m just writing code that runs in the browser.
Just a quick aside: Deno has a built in
deno bundle CLI command which I’m not using. It is intended to bundle code intended to be used as a server or script and not for the browser. To bundle for the browser, one must use the unstable emit API. There are a lot of discussions in various GitHub issues about how the bundling CLI command should work, if you are curious to read more about it.
All modern browsers support features like
Promises,
async/
await, ES modules or
import/
export, and almost any other JavaScript features you can think of. When I’m developing, I like to use these features and not transpile everything all the time.
I’ll make a little script that periodically counts upward to illustrate using these new features directly in the browser and then show how one could use Deno to bundle that script for “production” or what-have-you.
Initial little script
You can find all the files related to this post in a repo on GitHub, so no need to copy and paste from the article 🤓. Also, you’ll need to have the latest version of Deno installed, which as of writing is
v1.11.5.
To keep things simple, this will be the three files (one HTML, and two JavaScript):
index.html:
<!doctype html> <html> <head> <title>Example using ES modules both locally and remotely</title> </head> <body> <p id="current-count">000</p> <script src="index.js" type=module></script> </body> </html>
index.js:
import { periodiclyCount } from './local-lib' import numeral from '' const p = document.getElementById('current-count') periodiclyCount(count => { const num = numeral(count) const formatted = num.format('000') p.innerText = formatted })
local-lib.js:
let current = 0 let timeout = 0 export function periodiclyCount(cb) { timeout = setTimeout(() => { current += 1 cb(current) periodiclyCount(cb) }, 5000) } export function stopCounting() { clearTimeout(timeout) }
OK, some things to call attention to:
- The HTML includes the JavaScript in a
<script>tag with the attribute
type=module, which is important. This enables the ability to
importand
export
- The code is not just including a local library file, it’s also including an
npmmodule named
numeralusing
esm.sh, and I’ll write a bit more aobut
esm.shbelow
- This won’t currently work 😢
If you drag the
index.html file into your browser and then look in the Console, you’ll see an error similar to:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at. (Reason: CORS request not http).
Ah yes, CORS again! I am often mad at CORS; I end up fighting it pretty frequently. Either way, the problem is we can’t make a “request” for other files if we are not on
http. So we need a server to serve the files for us.
Little server
Since we are already planning to use Deno to bundle things into one file, we can also use Deno to make a little server so we can serve our files over
http and not have to deal with the CORS problems anymore.
A quick server could be (this is also in the repo):
server.ts:
import { Application, send } from '[email protected]/mod.ts' import loggerMiddleware from '[email protected]/mod.ts' const app = new Application() app .use(loggerMiddleware.responseTime) .use(loggerMiddleware.logger) .use(async c => { await send(c, c.request.url.pathname, { root: '.', index: 'index.html' }) }) .addEventListener('listen', ({ port }) => { console.log(`Listening{port}`) }) app.listen({ port: 10000 })
The server’s code is a bit longer than it needs to be because I like to see some logs print out when a request is made, just to make sure things are working 😉
Now, Deno is “everything off” by default. So, when we run this server have to enumerate what it should be able to do. We need this server to be able to hit the network (to request the files from...) and to read from our local disk (to read and serve our files to the browser). The command to run the server looks like this:
$ deno run --allow-net --allow-read --unstable server.ts
I always package commands like this up into a file like
run-server.sh and in the repo you can find such a file.
OK, we can now run the server and see our files in the browser.
What is
esm.sh?
If you run the little server and load
localhost:10000 you can look in the developer tool’s Network panel to see what’s happening:
You can see we are loading our local library from our local server and we are loading the
numeral
npm module from esm.sh which uses a tool called
esbuild to bundle every
npm module targeting browsers and serves those bundles through a CDN. So, we can load almost any
npm module into our browser by
import-ing it. There are other websites that do this like unpkg.com or snowpack.dev, but I prefer using
esm.sh for one reason: they also serve TypeScript definitions.
The special
x-typescript-types header
TypeScript types don’t matter at all in the browser, but they do matter a lot in my editor. I like to see the autocomplete or be able to get some help when writing my JavaScript and/or TypeScript. When using Deno, it fetches and caches all remote code once so it doesn’t have to be reloaded over and over again. When fetching the code to cache it, Deno will see this
x-typescript-types header, and it will also fetch and cache the
.d.ts file. This means when I
import from something like
react, my editor can show me what imports are available and their type signatures. See this example:
This is not at all necessary to build in the browser, but I very much prefer it.
Fine, but are we going to ever bundle our code into one file or not?
Sure, let’s do it. Let’s write the code necessary to “emit” a single file which would include all our dependencies.
bundle.ts:
const encoder = new TextEncoder() const { files } = await Deno.emit('./index.js', { bundle: 'classic', compilerOptions: { target: 'es2018' } }) const result = files['deno:///bundle.js'] await Deno.writeFile('./dist/bundle.js', encoder.encode(result))
A few things to note:
- Choosing the bundle type of
'classic'means it will remove any
imports or
exports and package everything as an IIFE
- I’ve chosen the target of
'es2018'but there are [many possible targets][] one can choose
- When bundling many files into one, the “result file” always has the name
deno:///bundle.js
Is this as good as Webpack or Rollup? No.
Deno isn’t doing any treeshaking or other nice things for us. For example, the bundle includes all of the
numeral library, even the parts we are not using, so it weighs in at 23 KB:
$ exa -l dist/ .rw-r--r-- 23k myobie 5 Jul 09:23 bundle.js
However, for something small or for development and testing purposes, this has been working really great for me. I just want to write code that goes to the browser, without a step 2. Having a little Deno dev-server has been great for that. I feel much more productive when I don’t have to wrestle tooling everyday 🙂
Deno supports TypeScript and JSX natively. In the future I’ll write more about how to augment this tiny server to support building something like a React app with TypeScript without needing
npm,
node,
webpack or any of the usual tooling.
Thanks for reading. What do you think about using Deno as a development server for JavaScript apps? Let me know. | https://shareup.app/blog/deno-can-bundle-javascript/ | CC-MAIN-2022-40 | refinedweb | 1,358 | 63.59 |
In this example we will connect an SHT30 shield to our MH ET LIVE ESP32 MINI KIT, here is the shield
SHT30 Shield For WeMos D1 mini SHT30 I2C Digital Temperature and Humidity Sensor Module
SHT3x-DIS is the next generation of Sensirion’s temperature and humidity sensors. It builds on a new CMOSens® sensor chip that is at the heart of Sensirion’s new humidity and temperature platform..
Code
This example uses the adafruit sht31 library –
#include <Arduino.h> #include <Wire.h> #include "Adafruit_SHT31.h" Adafruit_SHT31 sht31 = Adafruit_SHT31(); void setup() { Serial.begin(9600); Serial.println("SHT31 test"); if (! sht31.begin(0x45)) {); } else { Serial.println("Failed to read humidity"); } Serial.println(); delay(1000); }
Output
Open the serial monitor
Temp *C = 27.09
Hum. % = 38.13
Temp *C = 29.39
Hum. % = 42.54
Temp *C = 30.67
Hum. % = 52.62
Temp *C = 31.08
Hum. % = 58.37
Temp *C = 31.05
Hum. % = 60.80
Temp *C = 29.83
Hum. % = 50.91
Temp *C = 29.50
Hum. % = 44.09
Link
SHT30 Shield For WeMos D1 mini SHT30 I2C Digital Temperature and Humidity Sensor Module | http://www.esp32learning.com/code/mh-et-live-esp32-mini-kit-and-the-wemos-sht30-shield.php | CC-MAIN-2021-39 | refinedweb | 182 | 62.44 |
Bug #8457
Function arguments: Is this intended?
Description
Related issues
Updated by matz (Yukihiro Matsumoto) about 7 years ago
- Status changed from Open to Closed
I am not sure what you meant, but I am sure you are fooled by side-effect of #concat method.
a = [1, 2]
a.tap {|*p| # p is an array that wraps a i.e. p=[a]
a.clear # a is cleared; now p=[[]]
a.concat p # you concat p, that contains reference to a to a, make it circular
} # => a = [a]
This is not a bug.
Updated by phluid61 (Matthew Kerwin) about 7 years ago
=begin
boris_stitnicky (Boris Stitnicky) wrote:
a = [1, 2, x: 3]
a.tap { |*p, q| a.clear.concat p } #=> [1, 2]
but
a = [1, 2, x: 3]
a.tap { |*p, **q| a.clear.concat p } #=> ...
and also
a = [1, 2]
a.tap { |*p| a.clear.concat p } #=> ...
???
Is this the problem?
a = [1,2,x:3]
a.tap { |p,*q| puts "p=#{p.inspect}, q=#{q.inspect}" }
# prints: p=[[1, 2, {:x=>3}]], q={}
# expected: p=[1, 2], q={:x=>3}
as per:
a = [1,2,x:3]
def foo(p,*q) puts "p=#{p.inspect}, q=#{q.inspect}"; end
foo *a
# prints: p=[1, 2], q={:x=>3}
?
Note that the same behaviour occurs if the block has a (({**})) parameter.
(Tried on ruby 2.1.0dev (2013-04-24 trunk 40439) [x86_64-linux] )
=end
Updated by marcandre (Marc-Andre Lafortune) about 7 years ago
- Category set to core
- Status changed from Closed to Open
- Assignee set to matz (Yukihiro Matsumoto)
I'm wondering too if there isn't something strange?
I'd expect a proc to either do an implicit splat or not, but right now it looks for options before doing the implicit splat. Should it not do it after doing the implicit splat?
I thought that when a proc had an argument list with more than one element, it was the same to call it with a single array argument than with the same array splatted:
Proc{|a, ...| ... }.call([...]) == Proc{|a, ...}| ... }.call(*[...]) # => Because of implicit splat
But we have currently:
Proc.new{|a, *b, **c| p a, b, c}.call(1,2, bar: 3)
# => 1, [2], {:bar=>3} : OK
Proc.new{|a, *b, **c| p a, b, c}.call([1,2, bar: 3])
# => 1, [2, {:bar=>3}], {}: Expected same as above
Proc.new{|(a, *b), **c| p a, b, c}.call([1,2], bar: 3)
# => 1, [2], {:bar=>3} : OK
Proc.new{|(a, *b), **c| p a, b, c}.call([[1,2], bar: 3])
# => [1, 2], [{:bar=>3}], {}: Expected same as above
So, Matz, what do you think of these simplified examples?
Updated by marcandre (Marc-Andre Lafortune) about 7 years ago
As an additional note, this affects some methods of Enumerable when yielding multiple arguments.
For example:
def each; yield 1, 2, bar: 3; end include Enumerable each{|a, *b, **c| p a, b, c} # => 1, [2], {:bar => 3}: ok detect{|a, *b, **c| p a, b, c} # => 1, [2, {:bar => 3}], {}: should be the same, no?
Updated by matz (Yukihiro Matsumoto) about 7 years ago
- Status changed from Open to Closed
I admit there's a bug which Matthew mentioned, but it's not described in the OP.
Do you mind if I close this, and ask you to resubmit as a new bug report for the record.
Matz.
Updated by marcandre (Marc-Andre Lafortune) about 7 years ago
Also available in: Atom PDF | https://bugs.ruby-lang.org/issues/8457 | CC-MAIN-2020-29 | refinedweb | 579 | 74.79 |
Welcome to the tenth State of the Perl Onion. For those of you who are unfamiliar with my methods, this is the annual speech wherein I ramble on about various things that are only marginally related to the state of Perl. I've gotten pretty good at rambling in my old age.).
Speaking of chess, how many of you recognize this?
Does this help?
This is, of course, the mnemonic for the old Linnean taxonomy of biological classification.
Those of you who understand computers better than critters can think of these as nested namespaces.
This is all about describing nature, so naturally, different languages care about different levels.
For instance, PHP isn't much into taxonomy, so everything in PHP is just its own species in a flat namespace. Congratulations, this is your new species name:
Ruby, of course, is interested primarily in Classes.
Python, as the "anti-Perl," is heavily invested in maintaining Order.
Now, you might be smart enough to program in Haskell if you've received a MacArthur Genus award.
... used to be I couldn't spell "genus," and now I are one ...
Moving right along toward the other end of the spectrum, we have JavaScript that kind of believes in Phyla without believing in Classes.
And at the top of the heap, playing king of the mountain, we have languages like C# and Java. The kingdom of Java only has one species.
The kingdom of C# has many species, but they all look like C#.
Well, that leaves us with families.
I expect I have a pretty good excuse for thinking a lot about families lately, and here is my excuse:
This is Julian, my grandson. Julian, meet the open source hackers. Open source hackers, meet Julian.
Many of you will remember my daughter Heidi from previous OSCONs. A couple years ago she married Andy, and Julian is the result. I think he's a keeper. Julian, I mean.
Well, and Andy too.
Andy obviously has his priorities straight. I would certainly recommend him as a son-in-law to anyone. (Wait, that doesn't quite work ...)
There are many definitions of family, of course. Here's a mommy and a daddy truck. They live on a truck farm, and raise little trucks.
Out in California, the word "family" keeps leaping out at me from various signs. People use the word "family" in some really weird ways.
There was a Family Fun Center, with a miniature golf course. I believe that sign. At least for the golf. As a parent, I'm not sure the game arcade is for the whole family. I'm an expert in staying out of loud places.
But the sign that said "Farmers Feed America--Family Water Alliance" ... I suspect the word "family" is in there more for its PR value than anything else.
And, of course, "family planning" is for when you plan not to have a family. Go figure.
All of my kids were unplanned, but that doesn't mean they were unwanted.
Many of you know that I have four kids, but in a strange way, I really have five, if you count Perl.
Geneva thinks of Perl as more or less her twin sister, since they were both born in 1987. But then, Geneva is strange.
Some people think Perl is strange too. That's okay--all my kids are a little strange. They come by it naturally.
Here's a self-portrait of the other end of Geneva.
Here's what you usually see of Lewis.
Here's some of Aron, pulling the door that says "push."
And here's Heidi.
She always was a pale child.
Actually, here's the real picture.
You can see she's actually quite sane. Compared to the rest of us.
Here's a picture of my wife Gloria.
Here's another picture of my wife. Well, her arms. The feet are my mom's. Actually, this is really a picture of my granddog, Milo. He's the one on the right.
I've talked before about how the stages in Perl's life are very much like that of a kid. To review:
This extended metaphor can be extended even further as necessary and prudent. Actually, it's probably unnecessary and imprudent, but I'll extend it anyway, because I find the metaphor useful. Perl, my fifth child, is showing various signs that she is about to grow up, and as a pseudo-parent, that makes me pseudo-proud of her. But there are other ways the metaphor makes me happy. For instance, it gives me another argument about the name of Perl 6.
From time to time, people have suggested that Perl 6 is sufficiently different from Perl 5 that she should be given a new name. But we don't usually rename our kids when they grow up. They may choose to rename themselves, of course. For the moment I think Perl would like her name to stay Perl.
Now, I know what some of you are thinking: in anthropomorphizing Perl this way, Larry has gone completely off the deep end. That's not possible--I started out by jumping off the deep end, and I haven't noticed the water getting any shallower lately.
But in justification of my metaphor, let me just say that when I say "Perl" here, I'm not just talking about the language, but the entire culture. There are a lot of people who worked hard to raise Perl up to where she is today, and a bunch more people working hard to send her off to college. It's the collective aspirations of those people that is the real personality of Perl.
When we first announced the Perl 6 effort back in 2000, we said it would be the community redesign of Perl. That continues to be the case today. It may look like I'm making all these arbitrary decisions as the language designer, but as with a teenager, you somehow end up making most of your decisions consistent with what they want. With what the Perl community wants, in this case.
If a teenager doesn't want to listen to you, you can't make 'em.
The fact is, Perl would be nothing without the people around her. Here's a new acronym:
or if you like:
It really helps to have an extended family to raise a kid well. American culture has been somewhat reductionist in this respect, but a lot of other cultures around the world understand the importance of extended family. Maybe it's just because Americans move around so much. But it's a healthy trend that young people these days are manufacturing their own extended families. At the church I go to, we call it "Doing Life Together." Here in the extended Perl family, we're doing life together too.
We have people in our family like Uncle Chip and Aunt Audrey. There's Cousin Allison, and Cousin Ingy, and Cousin Uri, and our very own Evil Brother Damian. I think Randal occasionally enjoys being the honorary black sheep of the family, as it were.
It all kind of reminds me of the Addams family. Hmm.
I watched The Addams Family a lot when I was young. Maybe you should call me Gomez, and call Gloria, Morticia. I must confess that I do love it when my wife speaks French. It gives me déjà vu all up and down my spine.
It's okay for me to tell you that because I live in a fishbowl.
I'm not sure who gets to be Lurch. Or Thing. Anybody wanna volunteer? We're always looking for volunteers in the Perl community. Don't be scared. The Addams family can be a little scary, and so can the Perl family, but you'll notice we're also affectionate and accepting. In a ghoulish sort of way.
We could take this TV family metaphor a lot further, but fortunately for you I never watched the Partridge Family or The Brady Bunch or All in the Family or Father Knows Best. Those of you who were here before know I mostly watched The Man From U.N.C.L.E.
I also watched Combat, a World War II show. But I was kind of a gruesome little kid that way.
I like gruesome shows. Maybe that explains why I liked the Addams family. Hmm. I once sat on the lap of the Santa Claus at Sears and asked for all five toy machine guns listed in the Sears catalog that year. For some reason I didn't get any of them. But I suppose my family loved me in spite of my faults. My role models in parenting obviously didn't come from TV. Or maybe they did. You know, that would explain a lot about how my family turned out. In actual fact, the picture above is another self-portrait done by my daughter Geneva.
Anyway, I love my own family, even if they're kind of peculiar at times. Last month we were staying at a Motel 6 in Medford, Oregon. Gloria kindly went off to fetch me a cup of coffee from the motel lobby, and then she came to this door and stood there for a while wondering how to pull the door open with her hands full. Then she realized that the door must have been designed by someone who thinks there should be only one obvious way to do it. Because, the fact is, you can either pull or push this door, despite what it says. I suggested we should start marking such pushmepullyu doors with a P*. We obviously need more globs in real life.
Anyway, back to my weird family--this summer as we were driving around, we had a great literary discussion about how Tolstoy debunks the Great Man theory of history in War and Peace. After discussing the far-too-heavily overloaded namespace in Russian novels and the almost complete absence of names in the Tale of Genji, we tried to decide if the Tale of Genji was the first novel or not, and decided that it was really the first soap opera. Of course, then there had to be a long discussion of what really was the first novel--Tale of Genji, Madame Bovary, or Sense and Sensibility. Then there's the first romance, first mystery, first fantasy, first science fiction, first modern novel, etc. One interesting fact we noted was that the first in a genre almost always has to officially be some other genre too. For example, the Tale of Genji was written in the existing form of explication of some haiku. Transitional forms are important in biological evolution as well, as one species learns to become another species. That's why we explicitly allow people to program babytalk in Perl. The only way to become smart is to be stupid first. Puts a new spin on the Great Man theory of history.
So then, as we were driving we saw a cloud formation resembling Thomas Jefferson, which led us to speculate on the Great Documents theory of history. "Liberty, Equality, Fraternity" brought up the Great Slogans theory of history.
Back to Tolstoy: "Moscow didn't burn because Napoleon decided to burn it. Moscow burned because it was made of wood." Those of you who attended YAPC Chicago may recognize that as the Great Cow theory of history. Or maybe the lantern was really kicked over by a camel, and there was a coverup.
Anyway, back to the family again, presuming the house hasn't burned down. They say that "A family is where, when you have to go there, they have to take you in." Arguably, regardless of your viewpoint, many people have been, um, taken in by Perl culture.
Sorry. I have a low taste for taking people in with puns.
But hey, taking people in is good. And stray kitties.
Some families just naturally accumulate strays. My wife and I were both fortunate enough to grow up in families that took in strays as a matter of course. We have a number of honorary members of our own family. I think a good family tends to Borg people who need to be taken in. It's a lot like the way Audrey hands out commit bits to Pugs left and right. It all one big happy hivemind. Er, I mean family.
Now, it's all well and good to get people in the door, but that's only the beginning of accessibility. Whenever you get someone new in the family, either by birth or by adoption, where do you go from there? You have to raise your kids somehow, and they're all different. Raising different kids requires different approaches, just like computer problems do.
So, then, how do we raise a family according to the various computing paradigms?
Imperative programming is the Father Knows Best approach. It only works at all when Father does know best, which is not all that often. Often Mother knows "bester" than Father. Hi, Gloria. And a surprising amount of the time, it's the kids who know "bestest."
For some reason the Von Trapp family comes to mind. I guess you have to structure your family to make the Sound of Music together.
"Look, if you hit your sister, she will hit you back. Duh."
Obviously anyone who doesn't program their family functionally has a dysfunctional family. But what does it mean to have a functional family? "Being hit back is a function of whether you hit your sister." On the surface, everything appears to be free of side effects. Certainly when I tell my kids to mind their manners it often seems to have no lasting effect. Really, though, it does, but in the typical family, there's a lot of hidden state change wound in the call stack. We first learn lazy evaluation in the family.
"Don't take the last piece of candy unless you really want it."
"Please define whether you really care, and exactly how much you care."
"I'm sure I care more than you do."
That's almost a direct quote from Heidi when she was young: "But I want it more than you do."
Functional programming tends to merge into declarative programming in general. I married into a family where you have to declare whether you want the last piece of cheesecake, or you're unlikely to get it.
Unfortunately, I grew up in more of a culture where it was everyone's responsibility to let someone else have the cheesecake. This algorithm did not always terminate. After several rounds of, "No, you go ahead and take it, no you take it, no you take it ..."
In the end, nobody was really sure who wanted the cheesecake. I guess you say it was a form of starvation. But when I married into my wife's family I found out that I definitely wouldn't get the cheesecake until I learned to predeclare.
Let's see, inheritance is obviously important, or you wouldn't have a family in the first place. On the other hand, the family is where culture is handed down in the form of design patterns. A good model of composition is important--a lot of the work of being a family consists of just trying to stay in one spot together. As a form of composition, we learn how to combine our traits constructively by playing various roles in the family. Sometimes those are fixed roles built at family composition time, and sometimes those are temporary roles that are mixed in at run time. Delegation is also important. I frequently delegate to my sons: "Lewis, take the trash out."
That's Design By Contract. "Keep your promises, young man!"
Metaprogramming. "Takes one to know one!"
Aspected-oriented programming comes up when we teach our kids to evaluate their methods in the broader context of society:
"Okay kid, now that you've passed your driver's test, you still have to believe the stop signs, but when the speed limit sign says 65, what it really means is that you should try to keep it under 70. Or when you're in Los Angeles, under 80."
But I think the basic Perl paradigm is "Whatever-oriented programming."
Your kid comes to you and says, "Can I borrow the car?"
You say: "May I borrow the car?"
They say: "Whatever ..."
Should I push the door or pull it?
Actually, "whatever" is such an important concept that we built it into Perl 6. This is read, "from one to whatever."
You might ask why we can't just say "from one to infinity":
The problem is that not all operators operate on numbers:
Not all operators are ranges. Here's the sibling argument operator, which repeats the same words an arbitrary number of times:
Perl has always been about letting you care about the things you want to care about, while not caring about the things you don't want to care about, or that maybe you're not quite ready to care about yet. That's how Perl achieves both its accessibility and its power. We've just baked more of that "who cares?" philosophy into Perl 6.
A couple of years ago, Tim O'Reilly asked me what great problem Perl 6 was being designed to solve. This question always just sat in my brain sideways because, apart from Perl 0, I have never thought of Perl as the solution to any one particular problem. If there's a particular problem that Perl is trying to solve, it's the basic fact that all programming languages suck. Sort of the concept of original sin, applied to programming languages.
As parents, to the extent that we can influence the design of our kids, we design our kids to be creative, not to solve a particular problem. About as close as we get to that is to hope the kid takes over the family business, and we all know how often that sort of coercion works.
No, instead, we design our kids to be ready to solve problems, by helping them learn to be creative, to be socially aware, to know how to use tools, and maybe even how to manufacture the tools for living when they're missing. They should be prepared to do ... whatever.
Trouble is, it takes a long time to make an adult, on the order of 20 years. Most insects don't take 20 years to mature.
Apparently it takes you ten years to become an expert in being a kid, and then another ten years to become an expert in not being a kid. Some people never manage the second part at all, or have a strange idea of adulthood. Some people think that adulthood is when you just bake all your learning into hardware and don't learn anything new ever again, except maybe a few baseball scores. That's an oversimplified view of reality, much like building a hardwired Lisp machine. Neoteny is good in moderation. We have to be lifelong learners to really be adults, I think.
No, adulthood is really more about mature judgment. I think an adult is basically someone who knows when to care, and how to figure out when they should care when they don't know offhand. A teenager is forever caring about things the parents think are unimportant, and not caring about things the parents think are important. Well, hopefully not forever. That's the point. But it's certainly a long process, with both kids and programming languages.
In computer science, it is said that premature optimization is the root of all evil. The same is true in the family. In parenting terms, you pick your battlefields, and learn not to care so much about secondary objectives. If you can't modulate what you care about, you're not really ready to parent a teenager. Teenagers have a way of finding your hot buttons and pushing them just to distract you from the important issues. So, don't get distracted.
There are elements of the Perl community that like to push our collective hot buttons. Most of them go by the first name of Anonymous, because they don't really want to stand up for their own opinions. The naysayers could even be right: we may certainly fail in what we're trying to do with Perl 6, but I'd just like to point out that only those people who put their name behind their opinions are allowed to say "I told you so." Anonymous cowards like the "told you so" part as long as it doesn't include the "I." Anonymous cowards don't have an "I," by definition.
Anyway, don't let the teenage trolls distract you from the real issues.
As parents we're setting up some minimum expectations for civilized behavior. Perl should have good manners by default.
Perl should be wary of strangers.
But Perl should be helpful to strangers.
While we're working on their weaknesses, we also have to encourage our kids to develop where they have strengths, even if that makes them not like everyone else. It's okay to be a little weird.
Every kid is different. At least, all my kids are really different. From each other, I mean. Well, and the other way too.
I guess my kids are all alike in one way. None of them is biddable. They're all arguers and will happily debate the merits of any idea presented to them whether it needs further discussion or not. They're certainly unlikely to simply wander off to the slaughter with any stranger that suggests it.
This is the natural result of letting them fight as siblings, with supervision. It's inevitable that siblings will squabble. Your job as parent is to make sure they fight fair. It helps a lot if the parents have already learned how to fight fair. What I mean by fight fair is that you fight about what you're fighting about--you don't fight the other person. If you find yourself dragging all sorts of old baggage into an argument, then you're fighting the person, you're not fighting about something anymore. Nothing makes me happier as a parent than to hear one of my kids make a logical argument at the same time as they're completely pissed off.
If you teach your kids to argue effectively, they'll be resistant to peer pressure. You can't be too careful here. There are a lotta computer languages out there doing drugs. As a parent, you don't get into a barricade situation and isolate your kids from the outside world forever. Moving out and building other relationships is a natural process, but it needs some supervision.
Perl is learning to care deeply about things like:
This final point is crucial, if you want to understand the state of Perl today. Perl 6 is all about reconciling the supposedly irreconcilable.
Reconciling the seemingly irreconcilable is part of why Perl 6 taking so long. We want to understand the various tensions that have surfaced as people have tried to use and extend Perl 5. In fact, just as Perl 1 was an attempt to digest Unix Culture down into something more coherent, you can view Perl 6 as an attempt to digest CPAN down into something more coherent. Here are some of the irreconcilables we run into when we do that:
OO brings us a world of choices:
Do we even have classes at all?
And if we do, how do they inherit and dispatch?
Is our type system more general than our class system?
Plus a grab bag of other issues:
And finally, the biggie:
Reconciling these known conflicts is all well and good, but our goal as a parent must be a bit larger than that.
Just as a child that leaves the house today will face unpredictable challenges tomorrow, the programming languages of the future will have to reconcile not only the conflicting ideas we know about today, but also the conflicting ideas that we haven't even thought of yet.
We don't know how to do that. Nobody knows how to do that, because nobody is smart enough. Some people pretend to be smart enough. That's not something I care about.
Nevertheless, a lot of smart people are really excited about Perl 6 because, as we go about teaching Perl how to reconcile the current crop of irreconcilables, we're also hoping to teach Perl strategies for how to cope with future irreconcilables. It's our vision that Perl can learn to care about what future generations will care about, and not to care about what they don't care about.
That's pretty abstruse, I'll admit. Future-proofing your children is hard. Some of us get excited by the long-term potential of our kids. But it's also exciting when you see their day-to-day progress. And we've make a lot of progress recently.
In terms of Audrey's Perl 6 timeline, we're right at that spot where it says "hack, hack, hack." In a year or so we'll be up here saying, "What's the big deal?"
This is the year that Perl 6 will finally be bootstrapped in Perl 6, one way or another. Actually, make that one way and another. There are several approaches being pursued currently, in a kind of flooding algorithm. One or another of those approaches is bound to work eventually.
Now, anyone who has been following along at home knows that we never, ever promise a delivery date for Perl 6. Nevertheless, I can point out that many of us hope to have most of a Perl 6 parser written in Perl 6 by this Christmas. The only big question is which VM it will compile down to first. There's a bit of a friendly race between the different implementations, but that's healthy, since they're all aiming to support the same language.
So one of the exciting things that happened very recently is that the Pugs test suite was freed from its Haskell implementation and made available for all the other implementations to test against. There are already roughly 12,000 tests in the test suite, with more coming every day. The Haskell implementation is, of course, the furthest along in terms of passing tests, but the other approaches are already starting to pass the various basic sanity tests, and as many of you know, getting the first test to pass is already a large part of the work.
So the plan is for Perl 6 to run consistently on a number of platforms. We suspect that eventually the Parrot platform is likely to be the most efficient way to run Perl 6, and may well be the best way to achieve interoperability with other dynamic languages, especially if Parrot can be embedded whole in other platforms.
But the other virtual machines out there each have their own advantages. The Haskell implementation may well turn out to be the most acceptable to academia, and the best reference implementation for semantics, since Haskell is so picky. JavaScript is already ubiquitous in the browsers. There are various ideas for how to host Perl 6 on top of other VMs as well. Whatever.
But the VM that works the best for Perl right now is, in fact, Perl 5. We've already bootstrapped much of a Perl 5 compiler for Perl 6. Here's a picture of the approach of layering Perl 6 on Perl 5.
Here in the middle we have the Great Moose theory of history.
Other stuff that's going on:
In addition to lots of testing and documentation projects, I'm very happy that Sage La Torra is working on a P5-to-P6 translator for the Google Summer of Code. Soon we'll be able to take Perl 5 code, translate it to Perl 6, and then translate it back to Perl 5 to see how well we did.
Another bootstrapping approach is to take our current Haskell codebase and translate to Perl 6. That could be very important long term in keeping all the various implementations in sync.
There are many, many other exciting things going on all the time. Hang out on the mailing lists and on the IRC channels to find out more.
If you care.
Perl is growing up, but she's doing so in a healthy way, I think. Those of us who are parents tend to try to discourage our kids from getting married too young, because we know how much people change around their twentieth year. Around the age of 19 or 20 is when we start that last major rewiring of our brains to become adults. This year, Perl will be 19 going on 20. She's due for a brain rewiring.
In previous years, Perl was just trying to act grownup by ignoring her past. This year, I'm happy to report that instead of just trying to act grownup, Perl is going back and reintegrating her personality to include the positive aspects of childhood and adolescence. I don't know where Perl will go in the next ten or twenty years. It's my job to say, "I don't care anymore," and kick her out of the house. She's a big girl now, and she's becoming graceful and smart and wise, and she can just decide her future for herself.
Whatever. Thanks for listening, and for learning to care, and for learning to not care. Have a great conference! I don't care how! | http://www.perl.com/pub/2006/09/21/onion.html?page=3 | CC-MAIN-2014-15 | refinedweb | 4,985 | 73.68 |
Better way to extract data from stringIn a C socket program I have created I need to extract data from a string sent from the Windows clie...
Simple program segment faultingThank you.
Simple program segment faultingDoing :-
[code]
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *...
Simple program segment faultingI have the following simple C program giving segmentation fault and for the life of me I cannot see ...
Small curses program not displayingIt is not EOF and until it is EOF, in my opinion, each character should end up in InputString.
This user does not accept Private Messages | http://www.cplusplus.com/user/straygrey/ | CC-MAIN-2014-35 | refinedweb | 103 | 68.77 |
How in general should I know what to test?
Whenever we're deciding how to test a component, the main challenge is choosing which tests to write. That's because even a simple function like
add(a: number, b: number) has a potentially infinite number of input values it can receive. And since we have limited time and budget we can't do them all. Thus we need to be able to choose a small number of inputs, out of all the possible inputs, that will reveal as many bugs as possible.
To solve this issue, I've been using an approach that combines Input Space Partitioning and Whitebox testing.
Input space partitioning
To put it simply, the idea behind Input Space Partitioning is that by analyzing the desired outputs of a piece of code, we can group its inputs such that if the code works for an input of a group, it will also work for any input of that same group. Therefore, we only need to write one test for each group.
Note that inputs include everything that affects the behavior of a component (e.g. props, user action, API response values, etc...), and outputs everything it produces (e.g. rendered elements, API requests, values persisted to storage, etc...).
Take as an example a FizzBuzz inspired React component. The component should allow users to type numbers. When given a number that's a multiple of 3 the component should show
Fizz, a number multiple of 5 should show
Buzz, a number multiple of 3 and 5 should show
FizzBuzz, and a number that's multiple of neither 3 or 5 shows the given number.
Following the logic of Input Space Partitioning, the FizzBuzz input domain can be split into four different categories which are represented by the left column of the table above. This means that we only need to write four tests, one for each of the input categories.
WhiteBox testing
You might be wondering how can we be sure, just by looking at the description of the behavior of the FizzBuzz component, that we've chosen the minimal amount of tests that will reveal as many bugs as possible. The answer is we can't. And that's why we also rely on Whitebox testing.
Whitebox testing, in this context, means we'll use the knowledge of how a component is implemented to decide which tests to write. By looking at the implementation, we can have a better idea of what bugs we might have and thus allow us to choose tests more cost-effectively.
Example 1 - Implementation matches the Input Space Partitioning analysis
If the FizzBuzz code is written as follows, then for each input category, we only need to write one test assertion.
function FizzBuzz() { const [value, setValue] = useState(1) function fizzBuzz(number: number) { if (number % 3 === 0 && number % 5 === 0) return "FizzBuzz" if (number % 3 === 0) return "Fizz" if (number % 5 === 0) return "Buzz" return number } return ( <> <label htmlFor="fizzBuzz">Enter a FizzBuzz number:</label> <input type="number" id="fizzBuzz" name="fizzBuzz" value={value} onChange={e => setValue(Number(e.target.value))} /> <p>{fizzBuzz(value)}</p> </> ) }
The corresponding tests for this implementation would be as follows:
test.each` number | result | description ${"15"} | ${"FizzBuzz"} | ${"Multiples of 3 and 5"} ${"6"} | ${"Fizz"} | ${"Multiples of 3 but not 5"} ${"10"} | ${"Buzz"} | ${"Multiples of 5 but not 3"} ${"7"} | ${"7"} | ${"Multiples of neither 3 or 5"} `("$description - $number", ({ number, result }) => { render(<FizzBuzz />) userEvent.type(screen.getByLabelText("Enter a FizzBuzz number:"), number) expect(screen.getByText(result)).toBeVisible() })
We don't need to write more than one assertion per input domain because with just one assertion we cover all the input domains we determined in the Input Space Analysis, and we cover all the relevant code branches.
Example 2 - Implementation has more branches than Input Partitions
function FizzBuzz() { const [value, setValue] = useState(1) function fizzBuzz(number: number) { if (number === 1) return "1" if (number === 2) return "2" if (number % 3 === 0 && number % 5 === 0) return "FizzBuzz" if (number % 3 === 0) return "Fizz" if (number % 5 === 0) return "Buzz" return number } return // rest as it was... }
If we're given an implementation like the one above, then one test assertion per input domain won't be enough, since the first two branches of the
fizzBuzz function won't be covered. So we'll need to adjust the test assertions so we cover everything in the
Multiples of neither 3 or 5 partition.
test.each` number | result | description ${"15"} | ${"FizzBuzz"} | ${"Multiples of 3 and 5"} ${"6"} | ${"Fizz"} | ${"Multiples of 3 but not 5"} ${"10"} | ${"Buzz"} | ${"Multiples of 5 but not 3"} ${"7"} | ${"7"} | ${"Multiples of neither 3 or 5"} ${"1"} | ${"1"} | ${"Multiples of neither 3 or 5 - special case 1"} ${"2"} | ${"2"} | ${"Multiples of neither 3 or 5 - special case 2"} `("$description - $number", ({ number, result }) => { render(<FizzBuzz />) userEvent.type(screen.getByLabelText("Enter a FizzBuzz number:"), number) expect(screen.getByText(result)).toBeVisible() })
One might argue that those first two assertions are simple enough that they're obviously correct and thus not worth testing. That's a fair observation and one of the advantages of this way of testing is exactly that we can take the implementation into account to write fewer tests. I'd still argue that it's a good principle to have every bit of code run at least once during tests, but I wouldn't reject a PR due to this.
In case you're wondering, changing
fizzBuzz so we only need one assertion per test is an option. So if you're ever in a situation like this, take the opportunity and try to simplify the code.
Example 3 - Implementation uses a production-grade library
Imagine this implementation that uses a library underneath that's been battle-tested. Which tests should we write for it?
function FizzBuzz() { const [value, setValue] = useState(1) function fizzBuzz(number: number) { return battleTestedFizzBuzz(number) } return // rest as it was... }
I'd argue we only need one. Since the underlying library gives us confidence that the FizzBuzz logic works as expected, and the React-specific code is straightforward, just one test to see that the code runs should be enough.
test("Runs as expected", () => { render(<FizzBuzz />) userEvent.type(screen.getByLabelText("Enter a FizzBuzz number:"), "15") expect(screen.getByText("FizzBuzz")).toBeVisible() })
Example 4 - Really complex implementation
To finish these examples, take a look at the project FizzBuzzEnterpriseEdition. Imagine that somehow the React component communicated with a running instance of that project to know what it should show the user based on its input. What tests would you write for it?
My answer is that I don't know. Aside from picking one test assertion per partition determined in the Input Space Analysis, I have no idea what other inputs to pick. The code is so complex that it hides the bugs it might have.
All of these examples give us an interesting insight. The harder the code is to understand, the more test we'll have to write to be confident it works. Therefore, having a clear logic for what we're implementing is essential to enable effective testing.
Put it into action
If you were not familiar with any of the ideas in this article, this can be a lot to process. So here's a summary of how you can put these ideas into practice next time you have to test a component.
- Start by explicitly defining the behavior of the component.
- Make sure that for every possible input you know what the output should be.
- Partition the inputs based on the characteristics of the produced outputs.
- Look at the implementation of the component.
- Verify if one test per input partition is enough or too much.
- Write the tests.
Would you like to see a more complex example?
I wrote a follow-up article to this one where I go over a more complex component and test it using the methodology described in this article. It is available for subscribers of my newsletter. So if you'd like to see it, be sure to subscribe here.
Discussion (2)
Are you using TypeScript here? I've heard that you can't do things like
number: numberin normal JavaScript (and yes ik this is React but React is built on either plain JS and JSX or TypeScript and JSX), but this is only tagged as JavaScript and not TypeScript so I'm a bit confused
It's Typescript yes. Thanks for letting me know, I've updated the tag. | https://practicaldev-herokuapp-com.global.ssl.fastly.net/thevaluabledev/how-to-write-fewer-tests-but-find-more-bugs-1736 | CC-MAIN-2021-49 | refinedweb | 1,413 | 60.55 |
- NAME
- SYNOPSIS
- DESCRIPTION
- METHODS
- CREATING A CHECK MODULE
- AUTHOR
NAME
CGI::ValidOp::Check - base class for CGI::ValidOp checks
SYNOPSIS
package CGI::ValidOp::Check::demo; use base qw/ CGI::ValidOp::Check /; sub default { ( qr/^demo$/, # validator '$label must equal "demo."', # error message ) } sub color { my $self = shift; ( sub { my( $value, $color ) = @_; $self->pass( $1 ) if $value =~ /^($color)$/i; $self->fail( "\$label must be the color: $color." ); }, ) }
DESCRIPTION
CGI::ValidOp::Check contains all the code to validate data from CGI::ValidOp::Param objects, and enables simple creation your own checks. Unless you're creating or testing your own checks, you should use and read the documentation for CGI::ValidOp instead.
How checks are used
Each check module must contain at least one check, and can contain as many as you care to create. This document walks through the creation of one module containing mutliple checks. Some of ValidOp's default checks are organized by types of data (e.g. 'text', 'number'), but there's nothing to say you must also do this. You may find it convenient to package all the checks for one project in a single module.
Your check can be used in three ways. The first is with a simple scalar corresponding to the module name:
$validop->param( 'price', [ 'mychecks' ]);
The second is by calling a particular check within the package:
$validop->param( 'price', [ 'mychecks::robot' ]);
The third is by passing parameters to either the module or a check:
$validop->param( 'price', [ 'mychecks(3,6)' ]); $validop->param( 'price', [ 'mychecks::robot("Robbie")' ]);
METHODS
Unless you're creating or testing your own checks, this reference is not likely to help you. You can use ValidOp's public API without knowing a thing about ValidOp::Check's internals.
params()
The 'params' method returns a list passed to the check by the user:
$validop->param( 'price', [ 'mychecks(3,6)' ]);
These parameters are captured by splitting the contents of the parenthesis on commas. The resulting list is made available with the 'params' method.
validator( $regexp_or_coderef )
Sets or returns the validator.
errmsg( $error_message )
Sets or returns the error message. When CGI::ValidOp::Param parses these error messages, it replaces every isntance of
$label with the parameter's 'label' property or, if that does not exist, with the parameter's 'name'.
check( $tainted_value )
check() runs its calling object's validator against the incoming tainted value. It returns the resulting value on success, or
undef on failure. check() itself does very little work; it finds what type of validator it has (regex and coderef are the only types currently allowed) and farms out the work to the appropriate method.
check_regexp( $tainted, $validator )
check_regexp() captures the result of matching $tainted against $validator, using code similar to this:
$tainted =~ /($validator)/; return $1;
Note that the return value is untainted. Also note that the code does not anchor the regular expression with ^ (at the beginning) or $ (at the end). In other words, if you used this quoted regex as a check:
qr/demo/
any string containing "demo" (e.g. "demographics," "modemophobia") would pass. This may or may not be what you intend.
check_code( $tainted, $validator )
check_code() passes $tainted to the anonymous subroutine referenced by $validator and returns the result. The two most notable differences from regex checks are that the value of params() is passed into the validator subroutine and that the entire thing croaks if the return value is tainted.
ValidOp's default behavior is to die like a dog if your coderef returns a tainted value. This safe default can be changed by returning a third list item from your check subroutine, a hashref of additional properties:
sub should_allow_tainted {( sub { $_[ 0 ] }, 'This should be an error message', { allow_tainted => 1, } )}
is_tainted
CREATING A CHECK MODULE
Starting a check module
For the moment, your check module must be in the CGI::ValidOp::Check namespace; future versions will allow more flexibility. The module must be in Perl's search path.
package CGI::ValidOp::Check::demo;
You must subclass CGI::ValidOp::Check for your module. It contains methods that the rest of the code uses to perform the validation.
use base qw/ CGI::ValidOp::Check /;
Creating checks
Each check is completely defined by a single subroutine. If you define only one check in your module, it should be called 'default'. Using only the module name as a check, the 'default' subroutine is called. There's nothing to stop you calling your single check something else, but it does mean less intuitive use.
Checks return one to three scalar values. The first value is the check itself, and is required. The second value is an optional error message. The third is an optional list of additional properties, defined for the check and made available as methods.
sub check_name { ( $check, $errmsg, \%options ) }
Types of checks
Quoted regular expression
The simplest checks are quoted regular expressions. These are perfect for relatively static data. This one checks that the incoming value is "demo" and sets a custom error message. Any instance of '$label' in an error message is substituted with the parameter's 'label' property, if you define one, or the parameter's 'name' property (which is required and thus guaranteed to exist).
sub default { ( qr/^demo$/, # validator '$label must equal "demo."', # error message ) }
Parameters are validated against Regex checks with the check_regexp method.
You cannot pass parameters to a regex check (more to the point you can, but they'll be ignored).
Subroutine reference
These checks can be much more powerful and flexible, but require a little extra work.
sub color { my $self = shift; ( sub { my( $value, $color ) = @_; return $1 if $value =~ /^($color)$/i; $self->errmsg( "\$label must be the color: $color." ); return; }, ) }
You'll note that the check only returns one item, an anonymous subroutine. This coderef sets the check's error message with the 'errmsg' method, allowing it to pass incoming parameters into the error message. (You could supply an error message here as the second array element, but it would be overridden.)
Parameters are validated against coderef checks with the check_code method:
Right now the only additional property available ValidOp checks is 'allow_tainted.' ValidOp's stock 'length' check uses this, reasoning that just knowing the length of an incoming value isn't reason enough to trust it.
package Main; my $demo = CGI::ValidOp::Check::demo->new; is( $demo->check( 'failure' ), undef ); is( $demo->check( 'demo' ), 'demo' ); my $value = $demo->check( 'demo' ); ok( ! $demo->is_tainted( $value )); my $demo_color = CGI::ValidOp::Check::demo->new( 'color', 'red' ); is( $demo_color->check( 'green' ), undef ); is( $demo_color->errmsg, '$label must be the color: red.' ); is( $demo_color->check( 'red' ), 'red' );
AUTHOR
Randall Hansen <legless@cpan.org>
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
See | https://metacpan.org/pod/release/EXODIST/CGI-ValidOp-0.56/lib/CGI/ValidOp/Check.pm | CC-MAIN-2021-17 | refinedweb | 1,122 | 53.31 |
269 Sports Tampa Bay Buccaneers. Packers to snap losing streak. PAGE 1B C)D > - CI T R U S It C .O) N I "L HIGH 88 LOW 72 FORECAST: Partly cloudy. South winds around 5 mph except onshore. PAGE 2A S am o -ab Copyrighted Material o Syndicated Content Available from Commercial News Providers ; -1 ag w~oo- w-ww---mew 4ftu *" ,. em-*"** am Longtime resident returns for short reunion Mattie Mae Pipgras DAVE PIEKLIK dpieklik@chronicleonline.com Chronicle When Mattie Mae Pipgras returns home today, the argument could be that she never left. Pipgras, 91, an Inverness resident for 90 years, is heading back to her new home in Jacksonville after returning for a month to her native city. She has busied herself vis- iting old friends still living in the area, and catching up. While she may have left, Pipgras said she still loves her old city. 'As long as I'm here, I don't care if I'm in a shack," she said. Pipgras has been staying at the Crown Court Assisted Living Facility after her visits lifelong friends son and daughter-in-law, with whom she lives in Jacksonville, went to Connecticut to be there for her granddaughter's birth. She sat down recently to reminisce about how times have changed. '"A lot of changes," she said, describing her old home. Shops have come and gone, some still remain. Even Crown Court, the former Crown Hotel, has been relocated from its original site on Main Street. Back then, she was Mattie Mae Cooper, the daughter of John James and Emma Georgia Cooper. She's been married twice since then, including to the late New York Yankees pitcher George Pipgras. Despite some changes, she said down- town Inverness still looks relatively the same. There's the Old Courthouse, which Please see REUNION/Page 5A Challenge to wetland permit not supported WALTER CARLSON/For the Chronicle Mattie Mae Pipgras nears the end of her month-long visit to Inverness, her home for 90 years. The 91-year-old has spent the past month at the Crown Court Assisted Living Facility in Inverness visiting old friends and catching up. County to adopt next year's budget Springs protection scrutinized TERRY WITT terrywitt@chronicleonline.com Chronicle Citrus county commissioners will give final approval the next year's $177 million budget today after weathering consid- erable public scrutiny a week ago about a $3.3 million sur- plus. Responding to public pres- sure, commissioners voted to eliminate the surplus from the budget by reducing the tax rate by about a half mill. The tax rate can't be raised today, but it could be lowered. The budget hearing begins at 5:01 p.m. in the commission chambers .on the first floor of the courthouse. The regular Please see /' >F/Page 4A Foundation says JIM HUNTER jhunter@chronicleonline.com Chronicle The regional water district is discounting the basis of a recent challenge to an environ- mental surface water permit that would allow destruction and mitigation of some wet- lands on the RealtiCorp prop- erty just south of Crystal River. The Foundation for the Advancement of Mesoamer- ican Studies Inc. (FAMSI) issued the challenge. FAMSI owns property near the RealtiCorp property on U.S. 19 just north of Ozello Road. FAMSI claims the proposed destruction of some of the wet- lands on the RealtiCorp prop- erty would affect connected wetlands on the FAMSI prop- erty. RealtiCorp is proposing some destruction and mitiga- tion of wetlands for a commer- cial strip along U.S. 19, which contains the wetlands in ques- tion, and for some residential wetlands linked development on the eastern section of the property. The problem, said Dr. Sandra Noble, executive direc- tor of the foundation, is that the wetlands on the FAMSI property are planned to bean integral part of a 17,., sqtiare-foot Mesoamerican museum and education/ research center that could be operational in two years. The wetlands are being con- sidered as a part of the muse- um, both inside and outside it, and would display the natural flora and fauna of the area. The foundation's architect, however, has expressed con- cern that if RealtiCorp disturbs wetlands that feed FAMSI's wetlands, the design will be in jeopardy The Southwest Florida Water Management district, though, has taken the position that the changes in the wet- lands on the RealtiCorp tract would not affect the wetland Please see PERMIT/Page 5A X Annie's Mailbox .. 6B W Movies ...... ... 7B o Comics ......... 7B Crossword . . . 6B S Editorial ........ 10A Horoscope ... . 7B. Obituaries ....... 6A Community ...... 8A Two Sections 1111111 II 11111111111111111111 Flightplan lands first Jodie Foster piloted "Flightplan" to its No. 1 debut in theaters this weekend./2A Seeking shelter After Rita makes landfall, experts speculate about the U.S.'s ability to handle widespread emergency events./12A Fruits and veggies To stay healthy, people should eat five to nine servings of fruits and vegetables each day, health professionals say./Tuesday Recovery Is a long road IA year later, residents still recovering from Hurricane Jeanne./3A A King Tut exhibit raises ire of activists./3A * Eglin Air Force Base faces plant invasion./3A a,. .~ S. 19 IF YOU GO N The county budget hearing will begin at 5:01 p.m. today in the commission on the first floor of the courthouse. The regular meeting will be at 1 p.m. AMOL IWR CITRus COUNTY (FL) CHRONICLE ENTERTAINMENT 2A MONDAY, Si Florida S Here are the winning numbers selected Sunday in the Florida Lottery:. CASH 3 9-3-8 PLAY 4 2-1-8-6 FANTASY 5 6 9 31 33 35 SATURDAY, SEPTEMBER 24 Cash 3:0 3 -1 Play 4: 3 1 5 9 Fantasy 5: 2-7-24-29-35 5-of-5 No winner 4-of-5 258 $1,085.50 3-of-5 9,787 $11 Lotto: 9 -711- 18- 27- 38- 39 6-of-6 2 winners $12 million 5-of-6 123 $3,666.50 4-of-6 6,397 $57 3-of-6 118,218 $4 FRIDAY, SEPTEMBER 23 Cash 3:5-8-4 Play 4:7 9 8 5 Fantasy 5:11 16 18 26 27 5-of-5 3 winners $76,054.57 4-of-5 334 $110 3-of-5 10,528 $9.50 Mega Money: 13- 14- 28- 35 Mega Ball: 1 4-of-4 MB 1 winner $2 million 4-of-4 14 $1,772 3-of-4 MB 54 $1,004.50 3-of-4 1,530 $105.50 2-of-4 MB 1,881 $60.50 2-of-4 46,605 $4 1-of-4 MB 15,826 $7.50 THURSDAY, SEPTEMBER 22 Cash 3: 8 -1 5 Play 4: 0 4 5- 0 Fantasy 5: 3 12 19 31 33 5-of-5 3 winners $67,774.16 4-of-5 231 $141.50 3-of-5 7,4915 $12 to tp em a. . vMN*pf a rU...S*S...S4 "iee Young album fiedwith rrA flcctxo a a Aw "" * . U. %a a& . SAA i~m INSIDE THE NUMBERS * To verify the accuracy of winning lottery numbers, players' sheuttd:coubOtecheeKr thiE6si'nbei wprnutaelrtaieed with riumbers ,pjf, .y.ppJ.e.d by .thI.Floridaq t r ,, ,.p..t eb, go to lottery .coin; by telephone, call (850) 487.-'7" . ag I somw^^d^^ C a po f a WhOM MA- N f l *A oo 1mww V Mwm mman mmmwn e , e a.m -mlmm mme 6 amme ..a 1wSP Today in HISTORY Today is Monday, Sept. 26, the 269th day of 2005. There are 96 days left in the year. Today's Highlight in History: On Sept. 26, 1960, the first tele- vised debate between presidential candidates John F. Kennedy and Richard M. Nixon took place in Chicago. On this date: In 1914, the Federal Trade Commission was established. In 1991, four men and four women began a two-year stay inside a sealed-off structure in Oracle, Ariz., called Biosphere Two. (They'emerged from the Biosphere on this date in 1993.) Ten years ago: Bosnia's war- ring factions agreed on guidelines for elections and a future govem- ment. Five years ago: Slobodan Milosevic conceded that his chal- lenger, Vojislav Kostunica, had fin- ished first in Yugoslavia's presi- dential election and declared a runoff a move that prompted mass protests leading to Milo- sevic's ouster. One year ago: Hurricane Jeanne struck near Stuart, Fla., with 120 mph winds, causing an estimated six fatalities. 0 Pakistani forces killed a suspected top al- Qaida operative wanted for his alleged role in the 2002 kidnap- ping and beheading of Wall Street Journal reporter Daniel Pearl. Today's Birthdays: Fitness expert Jack LaLanne is 91. Actor Philip Bosco is 75. Actor Kent McCord is 63. Singer Bryan Ferry is 60. Former Environmental Protection Agency Administrator Christie Whitman is 59. Singer Lynn Anderson is 58. Singer Olivia Newton-John is 57. Actor James Keane is 53. Rock singer-musician Cesar Rosas (Los Lobos) is 51. Country singer Carlene Carter is 50. Country singer Doug Supemaw is 45. Recording execu- tive Andre Harrell is 45. Actress Melissa Sue Anderson is 43. Actor Patrick Bristow is 43. Rock musi- cian Al Pitrelli is 43. Singer Tracey Thom (Everything But The Girl) is 43. Weather reporter Jillian Barberie is 39. Actor Jim Caviezel is 37. Singer Shawn Stockman (Boyz II Men) is 33. Jazz musician Nicholas Payton is 32. Actor Mark Famiglietti is 26. Singer-actress Christina Milian is 24. Tennis play- #,eSerena Wijlrpsj,) Lf,.,,.; Thought for Today: "The poet s ,y9ypp.eed not merely be,the : record of man; it can be one of the props, the pillars to help him endure and prevail." William Faulkner (1897-1962). bw -. fat -te**'0 1 grilelam mm a- - --- I 0 a" *- -PIPl p n l 0,.m. mew a PA ., . --a 4Wl4W Copyrighted Material - roarSyn0tdicated Content = ailalefrom Commercial News Providers adn* t~. - ab / .,,. i i A ........... .S. - ...ffllllllll. -..HN/f a - *4ff e 4f a! M~ ::.w.. : '~'w r -* EPTFM 3ER 26, 2005 .... . ................................... so, ibh..i- * dilms an ::::- . ............< '.1 /1 __ .. K r'~ 3A VIONDAY SEPTEMBER 26, 2005 County BRIEFS How YOUR LAWMAKERS VOTED 0 C z C CD ID 0 C- U CD N (n z Head Start Renewal: Members passed, 231-184, a bill extending the Head Start program for preschool children through fiscal 2010, at a cost of $36 billion over live years yes - The bill stresses academics and allows publicly financed hiring based on religion A yes vote was to pass HR 2123. Religion-Based Hiring: Members voted. 220-196, to amend HR 2123 (above) to allow faith-based Head Start sponsors to use federal funds to hire only those of the same yes - religion A yes vote was to expand a law that now requires sponsors to use their own funds for religion-based hiring Veterans' Counseling: Senators refused, 48-50, to add $10 million to the fiscal 2006 budget for counseling services for did veterans returning from Iraq and Alghanistan The underly- not yes ing bill (HR 2528) already raised the budget by $4 million vote A yes vote backed the $10 million increase. Pork Barrel: SenaloNr voted, 55-39. tc require public dis- closure of pork-barrel items in the final version of the agri. culture appropriations bill for fiscal 2006 At present. such yes yes 'earmarks" typically are hard or impossible to find in spend- ing bills. A yes vote backed the disclosure bid. (HR 2744' Horse Slaughter: Senators voted, 68-29 to bar meat inspections of U.S horses slaughtered tor human con- sumption abroad. The amendment to the 2006 budget yes yes was designed to slop horse killing 10 feed humans over- seas. A yes vote backed the amendment. (HR 2744) Japanese Beef: Senators voted, 72-26, to block an impending trade rule that would allow Japan to export whole cuts ol boneless beet to the United States on a large no yes scale The rule is part ot a larger pact between the two countries A yes vote opposed the beef imports (HR 2744) S2005 Thomas Reports Inc. Telephone: (202) 737-1888 Copyrighted Material S-- Syndicated Content - *0 . -- Available from Commercial News Providers Biybn~ - B - b NN ITw In- - m. AN- ~. 0~ ~ - * *p-O a~ - --use* - a-- - - - qw 41 iKm~73 oft -No 4b- wo- a-- 4D-M 0 w -W -dlmp --- 4m ow-Emp aa - 40 -dodw b - D 4. a- M.0 S qd. -o- -P41 mm- -C m- .a - Fjhn - mw 4mm - w hv--w % .40 o .4b - 4w.- lb ft- b 40 0-m t*OE- Ar. a - -- w .4AP.fo. 41.C 4w _a -4 b. 400.4- &- ..m I- - - qdw- vw a.0b~mo. - - a 4. - --. - S. - - .5 a. ~ -do C- a - - - a a. a-- - a - - - w - - a - ~ - = - a- - - a - .0 - -- -~ = -- a a a. - - o -,"a 040am, s MMIN a a.. C. a- 0 a ~- a ~. * 5 - - -~ a .5- -- - ~a~u--- -a a .a.. ~ - ~,a - * - a -.- ~a - Aomd k MA"db od -mo M -4 ob- - ~- -. ~- a Mow - ~ .5 - a S - (Aw -wloop 404= ---I ab 400 0 40. tmw - a a -.. * a- a. S C - . m . 0 .5 ~ ~0 a-.- =0 a - - 0 - 4 m - 0~ - ft""'Iduo a - * ' WALTER CARLSON/For the Chronicle Maureen Locher, left, a volunteer for the Citrus County Sheriff's Office Community Affairs Division, works with 9-month-old Emma Buscemi as she is fingerprinted while her mother Wendy looks on. The Children's ID Program was held Saturday during the Citrus County Safety Exhibition held at the Crystal River Mall. don- a4b, Key votes for the week ending: Sept. 9 By Roll Call i Report Syndicate Q _ 4 0 Q * * 0 0 O * * "What matters." "I am the Executive Sec- retary in the Dep- artment of Co Michelle. munity Ser. vices. Board of County Com. Michelle mission- King ers. I believe the United Way is a vital resource, not only during a disaster, but on a daily basis as well. They need every- one's support Community is what matterss" GET INFO: For more information about United Way of Citrus County, call 527 8894 or visit the Web site at. CFCC computer club to meet today The CFCC computer club will meet from 4:30 to 6 p.m. today, in Room L2-210B at the Le- canto complex. The meeting's guest speaker will be Karen Stephenson from Toner Patrol. The public is welcome to attend. No preregistration in required. Call Dave Lanzilla at 746-6721, Ext. 1371. Planning group to meet Thursday The City of Crystal River Planning Commission will meet at 6:30 p.m. Thursday in city council chambers, City Hall, 123 N.W. U.S. 19, Crystal River. The meeting's purpose is to review. the,'Evaluatini and Appraisal Report. Any person requiring reasonable accommodation at this meeting should contact the city manager's office at 795- 4216 at least two days before the meeting. Volunteers needed for Taste of Citrus The 2005 Taste of Citrus seeks decorating committee vol- unteers and donations. Volun- teers are needed to help plan the decorating of the event venue, including the use of donated floral centerpieces. Donated floral centerpieces will be judged and awarded prizes for style and quality. Florists interest- ed in donating arrangements for the event are eligible for awards and should contact Michele Wirt at 746-6721. Taste of Citrus is an annual event benefiting local stu- dents attending Central Florida Community College. From staff reports am oam 4A MONDAY, SEPTEMBER 5 BUDGET Continued from Page 1A meeting starts at 1 p.m. Earlier in the meeting, repre- sentatives of the Florida Department of Community Affairs will review the county's comprehensive plan and point out strengths and weaknesses in springs protection. DCA Project Manager Richard Deadman and DCA consultant Gail Easely will explain voluntary amendments the county could make to the comprehensive plan and land development regulations to fur- ther protect the springs. The agency has drafted a Guidebook for Protecting Florida Springs that contains ~- S - S model codes for comprehensive plans and land development codes counties can adopt volun- tarily. Citrus County has three first magnitude springs groups on the coast. They are Chassa- howitzka Springs, Crystal River (Kings Bay) and Homosassa Springs. The county has eight second-magnitude coastal springs in Blue Springs, Bluebird Spring, Echo Spring, Hunter's (or American Legion) Spring, Pumphouse Spring, Ruth Spring and Three Sisters Spring. The three large springs receive their water from expan- sive springsheads. The primary springshead for the three first- magnitude springs lies west of County Road 491, although the entire county is thought to con- tribute water to the springs. One option commissioners can consider is adopting a spe- cial chapter or element in the comprehensive plan for spring protection. County Develop- ment Services Director Gary Maidhof likened it to the mana- tee protection plan, which is a chapter in the plan. He said cluster developments also can be used to ensure more green space. The springs' quali- ty depends on receiving clean water from inland areas. The more green space preserved, the better the filtration. One challenge lies in the fact that the county's Planned Services Area lies on top of the coastal springsheads. The PSA is designated as an area where 'high-density residential devel- opment can occur Syndicated Content .... The Suncoast Parkway, depending on where it is built, could cross a portion of the springsheads, or could cut through them. All three first-magnitude springs are fed by the aquifer, an underground porous layer of limestone rock filled with fresh water. The aquifer provides Citrus County with its drinking water supply. One of the justifications often given for protecting springs and the areas that drain into them is to ensure the quality of the drinking water supply. The springsheads in Citrus County are high-recharge areas where rainwater and stormwater flow quickly through the porous soil into the aquifer. Recharge areas are more vulnerable to pollu- tion. dw - Available from Commercial News Provider 411W- a- .- 4 -- -Ow .w b- ft qpm -4m 1b a" amp OR4a W - e 44M ~ 4p- - S.. -.e The Fire Place We do more than just Gas Logs! CUSTOM BRICK WORK FIREPLACES/OUTSIDE BBO KITCHENS REPAIRS SMALL OR BIG SCHIMNFY SWEEPS & INSPECTIONS DRYER DUCT CLEANING 1921 S. Suncoast Blvd., Homosassa 352-795-7976 t Blvd DISCOUNIWAUMPIRPLUSL 74||2990 CP37-711 INTERIOR SUERS STARTNGAT$1995S0 FNSTALLED 1 neime LanService OneimePest C BEST SELECTION, BEST PRICES Just west of the intersection of41 &491 Beverly Hills/Holder 1.800531.1808 489.0033 I I 29.00* *29.00* t* 1 *Fertilizer only up to 5,000 s.f. *Bathroom, kitchen, garage & outside Digital MHearing 'UA Expert Expires 9/30/05 New Customers Only I Expires 9/30/05 New Customers Only '.[ TERMITES ARE -- I 1 I Any Termitee Service - L Expires 9/30/05 New Customers Only Dan Gardner M.S. Free _Consultation 33ears .pr, le",' -", J 820 S. Bea Ave., Inverness, FL 552-795-5700 700 SE 5th Ter., Crystal River, FL 3M 5 79I5-57 | "' i B__QUALITY AN SHUlTERS Includes deluxe track, 4 valance, and installation . MI ut-oo el-ectioA 10 lai or Deoaive * Miue10^ LuniichQ U- --"- /-- -| 3pdgillLLI VW l ICilI Udll -" ille IDU JdlIUWi..II I, 726-4457 Grilled Chicken Sandwich Taco Salad Exellences10, Hours: Sun Thurs. I I a.m 10 p.m FrL. & Sat. I I am. Midnight S(3 52344-4545 1674 N. Hwy.41 A Inverness, FL J SALE ON I 2" Faux-Wood with Free Crown Valance Free Estimates! Call Today I -il I 0 mmMi gllIll MI mmmmEi am1i1;M WIIIA rash Barnk On A New Trane Heat Pump System! It's Hard To Stop .I TranL Buy a Trane Comfort System before October 31, 2005 and get a Smail-in rebate up to 51,000. '. Fresh Clean Air yam2 AsCah v' Peace of Mind 1 ) for 10 Years m',u 1 AlU ~ i a ill , Save up to 67% of Your Cooling Costs L The Cream of the Crop: Trane Comfort Specialist" Dealers These a l elers meet Trans a highest standards for pfessioalism and tachnloglcal expertlme DANIEL'S HEATING & AIR CONDONING INC. 4581 S. Florida Ave., Inverness, FL 352-726-5845 Li. #CAe042673 I (-k. I -. .. -~ i~~~'7E/1. ~ I -F=o= For the RECORD----== Crystal River Police DUI arrest Ashlea Brandyn Rhea, 30, 12 Michael Drive, Beverly Hills, at 12:42 a.m. Sunday on a charge of driving under the influence. Her bond was set at $500. Dunnellon Police Arrest Jason Aaron Jones, 23, 7032 W. Dunklin St., Dunnellon, at 3:33 a.m. Sunday on charges of posses- sion of a controlled substance and resisting/obstructing an officer with- out violence. Police requested that Jones be held without bond because he has prior convictions for failure to appear and is listed as a career criminal by the Citrus County Sheriffs Office, according to an arrest report. No bond was set. Citrus County Sheriff Arrests N Kevin Michael Brady, 20, 2057 N. Cedarhouse Terrace, S Crystal River, at 8:11 p.m. Saturday on charges of fugitive from justice stemming from a warrant for failure to appear and possible active war- rants out of Missouri, according to R.~1 ON THE NET For more information about arrests made by the Citrus County Sheriff's Office, go to and click on the link to Daily Reports, then Arrest Reports an arrest report. His bond was set at $30,500 per the warrant. Adam Berger, 19, 961 N. Hollywood Circle, Crystal River, at 12:19 a.m. Saturday on a charge of possession of marijuana. He was released on his own recognizance. Cierra Lerosa Moore, 18, 1304 N.E. 10thAve., Ocala, at 12:19 p.m. Saturday on a charge of driving without a valid, driver's license. Her bond was set at $250. Louis Eugene Free, 23, 583 LaSalle St., Hemando, at 7:26 p.m. Saturday on a charge of resisting/obstructing an officer with- out violence. His bond was set at $500. C. ,0 V f' T Y LHRlONICLL Florida's Best community newspaper Serving F orida's Best Ce nmunity To start your subscription: Call now for home delivery by our carriers: Citrus County: (352) 563-5655 Marion County: 1-888-852-2340 or visit us on the Web at .htmi to subscribe. 13 wks.: $33.50* 6 mos.: $58.S6 -. 1 year: $103.`00 * *Plus 6% Florldasales :,,, 41 44 -1 1624 N. Meadowcrest Blvd. 106 W. Main St., Crystal River, FL 34429 Inverness, FL 34450 Beverly Hills office: Visitor Trumar. Boilevera .. Copyrighted Material First Saturday Festivals Starting THIS Saturday October 1 at 9am In Dunnellon's Historic Village Handmade jewelry Antiques Art Crafts Garage sale Plants, Festive foods 13 great shops and eateries - most open 10-5 (restaurants later) West Pennsylvania Ave & Cedar Street 465-1460 or 465-6982 for info Trane KL19i Be e l HilHillsINWN.MPREDBE &CG r NI S1AGRAM'S 10 CANE I- li -/O/ I CiTRus CouNTY (FL) CHRoNicLE A A NA --- -I ... ..- - ?Ar ?0 - b . s Co nT ( M)DA, HPEMLN26I2055 PERMIT Continued from Page 1A on the FAMSI property. Noble said Friday, however, that the very maps being used for the project clearly indicate that the water from the RealtiCorp wetlands along U.S 19 flow into the FAMSI property. She said when the Home REUNION Continued from Page 1A she used to rollerskate around with friends. Those days, she said, are some of her fondest memories. "We had so much fun," Pipgras said. She said she has missed her friends and the gatherings she used to go to, so it was good to see everybody again. As she talked, Crown Court resident Paul Donnelly, sitting across a table from her, joked she's always going out on dates, say- ing, "She's never here." Minutes quietly ticked away and soon two hours passed as the two recounted days gone by. Before SUVs rumbled along highways, Ford Model Ts puttered down city streets. Dancing and going to school banquets at the "Crown" were a favorite pastime. Pipgras recalled a summer Depot project was done, the aquifer was broken into behind the building in a drainage retention area; which basically formed a new spring there, and that had a negative effect on the flow to the adjacent FAMSI property wetlands. Noble said a soil scientist told her the situation on the FAMSI property could be improved enough so the wet- land display could be a part of the museum, but he added trip she took with high school friends to a cottage in St. Petersburg, and a promise she made upon their return. "When I hit the Citrus County line, I started crying. And I said, 'I will never leave Citrus County again!'" she said. For nine decades, she near- ly kept her promise as more memories were made. In 1933, at the age of 19, she was crowned Miss Citrus County, though that was years before swimsuit competitions and elaborate speeches. "All we had to do was go out onto the stage with an evening that if the proposed RealtiCorp wetland distur- bance was allowed and flows changed as indicated in the permit application, then that would likely further affect the FAMSI wetland. That, in effect, would render the display idea not feasible and could jeopardize the whole museum project, she said, which is why the founda- tion had to speak up. Michael Molligan, spokes- dress on and turn around and smile," Pipgras said. There were cookouts and picnics, and movies and music in the old Masonic building. Pipgras would eventually cele- brate her 85th birthday at the Crown Hotel. She remembers the reception as being "real nice." All along, she always kept on the go, and kept to her routine. Pipgras was still driving at 90, stopping only after promising a friend. She admits she does miss it. She did have to sell her two- bedroom house on Trout Avenue, where she lived for 50 BL/NIDSI SAVE SAVE SAVE SAVE FAST DELIVERY PROFESSIONAL STAFF FREE .-1 l adimia, | *In Home Consulting I Donald j. Valances i,' i Donald J. .Installation a -gy ^ -14 rrey February 1, 1959-'-a September 22, 2004" fe "B Verticals Wood Blinds Shutters Crystal Pleat Silhouette -.LECANTO ~-TREETOPS PLAZA 1657W. GULF TO LAKE HWY S 527-. 0 I012 _2 HOURS: MON.-FRI. 9AM' 5 PM r.w i Evenings and Weekends byAppointment *must present written estimate from competitor for like product man for the water district, said that the district person saw no connection between the two wetlands and added that the rate of flow from the RealtiCorp property wetlands would not be changed under the permit. Noble said that Gainesville engineer David Bruderly told her that the RealtiCorp wet- land was connected to the FAMSI wetland. Bruderly, contacted at his years, before moving in with her son. However, in between walking, reading, cooking and other activities, her routine hasn't changed much. Donnelly said his new friend has become everyone's office, said that he hasn't done studies about elements of the situation, such as adjacent monitoring wells or potentio- metric surfaces. However, by looking at the U.S. Geological Survey maps, walking the property, studying the drainage and looking at what happened behind Home Depot, he is convinced that the wetlands are all connect- ed, and he is surprised the water district doesn't see that. favorite, and they tried getting her to stay. He stopped for a minute, wiping tears from his eyes and thought of her leav- ing soon. "She has been a blessing," he said. Noble said it appeared that the foundation will apparently have to hire a hydrologist to press its case to the water dis- trict. The county has had its own objections to the RealtiCorp proposal and the company has agreed to a postponement of final action on the permit by the water district governing board until the end of November so the issues can be discussed. While Pipgras admitted she was ready to return home, say- ing she has a loving family, she likely will never be away for long. Said Pipgras, "They said I can come back any time." Dress Up Your HOME! with Siding, Soffits, & Facias Baa.--,BEST,. .............. Hwy. 44 Crystal River ;l; ST 795-9722 Toll Free 1-888-474-2269 ^I*N w vwl Open Bowli Only $1.5 P Per Gam, onl o Peo 'erC112 Pric I Rer ghoe I Ocobr14-3,00 Come is*ittis odl admoe. -~ <~" C it ru s P a rad eOf Hoames. corn The Mcintosh Open floor plan with lots of storage starting in the $ 130's 3 bedrooms 2 baths Model Location 2575 W. Paragon Lane, Citrus Springs Model Hours Daily 1 OAM-5PM Uc.RR22811251 Optional Mater Bath 2215 total sq. ft. 1542 total living space DRIVING DIRECTIONS TO MODEL: Hwy. 491 to Pine Ridge Blvd. to Elkcam. Turn right on Elkcam. Turn right on Paragon. Model is at the border of Citrus Springs and Pine Ridge. 352-527-7022 I j* O : ** S' CILt BuyT~' I B:r n; Goth* I E E~ i1 Smolre- Free Environment MI Coffee 1, lea .it.r, for Your Convenience - Sandwiches & Snacks 1 MONDAY, SrPTEMBER 26, 2005 SA C- Mrn IV7V FL C147~~r CITRUS COUNTY (FL) CHRONICLE 6A MONDAY, SEPTEMBER 26, 2005 James Daley, 78 BEVERLY HILLS James K Daley, 78, Beverly Hills, died Sunday, Sept 25, 2005, in Beverly Hills. Born in Detroit, Mich., he came here 26 years ago from Detroit, Mich. He was self-employed in the residential construction industry in Detroit, Mich. He served in -1 S the U.S. Navy in the South Pacific during World War II. He was Catholic. He volunteered for Beverly Hills Surveillance unit for 25 years and the Citrus County Sheriff's Crime Watch unit for 10 years. He enjoyed building projects and landscaping. He was preceded in death by his brothers, Cal Daley and John Daley. He was survived by his com- panion of 30 years, Stella Walker of Beverly Hills. Memorial contributions may be made to Hospice of Citrus County. Fero Funeral Home with Crematory, Beverly Hills. Jesus "Ping" Alberdi, 72 CRYSTAL RIVER Jesus "Ping" Alberdi, 72, Crystal River, died Sunday, Sept 25,2005, at North Florida Regional Medical Hospital in Gainesville, after a brief battle with cancer Born Jan. 19, 1933, to Jesus and Concepcion (Gonzalez) Alberdi in Tampa, he moved to the. area in 1971 from St. Petersburg, where he had lived for 13 years. He graduated from Hillsborough High School and received a degree in mechani- cal engineering from the University of Florida, and his MBA degree from the Florida Institute of Technology. He worked as a manager with Fossil and Nuclear Operations for Florida Power Corporation and retired in 1993 after 35 years of service. He served in the U.S. Army. He was a member of St. Benedict Catholic Church and a member of Knights of Columbus. He was very involved with his family and friends. He loved to cook and everyone considered him to be a gour- met chef. He was a first mate on the fishing vessel, Amy Lynn, and an instructor for Elder Hostel. He sang with the Sound of the Sunshine Barbershop Quartet and was a wonderful entertainer. He was an avid Gator football fan and was a ticket holder for more than 40 years. Survivors include his wife of 42 years, Sharon Scott Alberdi of Crystal River; son, Michael James Alberdi of Jacksonville Beach; two daughters, Katherine Alberdi Smyder and her husband, Greg, of Gainesville, and Mary Alberdi Swan and her husband, C.H., of Ponte Vedra Beach; sister, Carmen Alberdi Farina and her husband, Buster, of Tampa; grandchildren, Charles Hal Swan Jr., Anna Gladys Swan, Sarah Daley Swan and Elizabeth Cecilia Gertrude Smyder; and several aunts and many cousins. Strickland Funeral Home, Crystal River. 4A 0 UsO 4 b" lost ow Am as79 - a -~ - - - - aa. ft. - .NNWa . - - -a a. -1. - Obituaries Syndicated Content " Available from Commercial News Providers we Hm -^^^9 - b--rn vm -m lc-i a a 6 - - - w - rnu Oi - a -~ - a - a..- a John March R 8 -L Mi dw qD- - C 011 0 a 0. S- AWHOLENEW - r -- -I S Jerillyn Clark Board Certified "n MemoryI H. Debusk Advanced Family I 1930 Sept. 26, 2002. Hearing Aid Center i S"A Unique Approach Toflearing Services" love and 644 est orel Bryant Hwy. iiss you rystal River 795-1775 I >ur Family, I THE PATIENTAND ANY OTHER PERSON RESPONSIBLE FOR PAYMENT HAS A RIGHT TO REFUSE TO PAY, CANCEL ,Peter & Nancy PAYMENT, OR BE REIMBURSED FOR PAYMENT FOR ANY OTHER SERVICES, EXAMINATION, OR TREATMENT THAT ISPERFORMEDASARESULTOFANDWITHIN72HOURS OF RESPONDING TO THE ADVERTISEMENT FOR THE . ,a FREE, DISCOUNTED FEE, OR REDUCED FEE SERVICE, . I EXAMINATION ORTREATMENT. 11m m m m mm1 - __ a - a *. ~. FORMS AVAILABLE The Chronicle has forms . available for wedding and engagement announce- ments. anniversaries, birth announcements and first birthdays. Call Linda Johnson at 563.566Q for copies. HENZ FUNERAL HOME & Cremation Accounting & Tax Services Monthly Write Ups start at $99.00 Small Business Includes Bank Reconciliation, Payroll Analysis and Tax Return, IncomeAnalysisand SaesTax Return. *Corporations, Partnerships Many Other Services are available Initial Consultation FREE!!. " Individuals * Tax Filings for all 50 states (Specializing in NY, NJ, CT, and FL), * Incorporations, LLC's, LLP's, PLLC's DC Accounting and Tax Services Tel: 917-498-6680 352-527-91771 An - A Dentures Implants Cro\ ns H.giene Bridges Partials Root Canals DENTURE LAB ON PREMISES NO CHARGE FOR I'.Ti.AL COVSI. 'LT .IO, OR SEC.Ai) OPI,VIO CITRUS HILLS - DENTAL - Located in tlhe Hampton Sqcuio-c lt ('Citi H-ill/ r_,,...,,,L (352) 527-1614 Fall is in the air Beautiful Fall Fashions Arriving Daily kyj 111 W Oll i F.- 37388 Gulf to Lake Hwy., I w 4 in Hours: Ilwy. 44, Fountain Sq., Inverness Thes-Fri 10 5 un 'a 11 sl (352) 344-0804 Sat 10 4 Copyrighted Material VERTICAL BLIND OUTLET 649 E Gulf To Lake Lecanto FL n vl 637-1991 -or- 1-877-202-1991 ALL TYPES OF BJLINDS al:ce 7ia. E. !ia(U., Funeral Home With Crematory Burial Shipping Cremation wMemb ernwtio Order of the G LDEN For Information and costs, call 635274 726-8323 S "BIG BILL ANDERSON" Beloved father, grandfather, great-grandfather and friend On September 26,2004, our Lord took you home to be with him. It has been a long lonely year and if tears could build a stairway, and memories a lane, I'd walk right up to heaven a and bring you home again. , Love,your son, Shane Anderson -- JS I Mello Arts Oil Painting Shop 8 Gallery Oil Painting Classes & Supplies *Gift Certificates Available Homosassa, Florida on U.S. 19 (In front of Howard's Flea Market) Margaret Messina Certified Bob Ross Instructor (352, 628-4001 *,. Watch Mello Arts Painting Show on WYKE Mondays at 9-30am SHARE YOUR THOUGHTS * Follow the instructions on today's Opinion page to send a letter to the edi tor. * Letters must be no longer than 350 words, and writers will be limit- ed to three letters per month. I. * ~ o - - a wull 0, 1 We rE yo lickey . m MW . Q -* - 4 I I 'de, A411vf T-Tou, ' UITTTUr) 1XTJrY ( MONDAY SIlv'IEMLr'tV26, 2005 7 low mo 40- Amp0 a m . .w 4bw fm f. -aw IS so lk- OOO 4 -low "IMP 400 -.-Imo 440 4 a "-q NIS, - 0.-aNib No-64 & 4 40 qv **- qgm g-nz h - 4h am a - Copyrighted Material ,syinaicated~jC'3'ntent . -al - - - -G Available from Commercial News Providers -Avalbefo m - -- 0-b- - d d m - n 4WD O f- AIRPORT ........ .....- M wwplabotbatsoom m riEbutbathscm obdo-dft 0 -No o 4M m- -% do- 4w -to * - a 4 im m . -,obW 4 41-1 Amp fb 4 4-1 OO 0 MM- ft -am - Im m m m Get Your Car In Gear For Football Season Since 1955 _______T Since 1955 N ALU W Ni 11Alu1i What's New at White AluminumPl Awolulmns.PollsCovers Corio -ueNs e nslooms Wiutws SstIotimsea ~~ 'hVinl Wlinu Poul Capses -Skirtlug Siupllus '-ls-IT-YgIJSELF KITS wwwiuluhfa~ummulmuumc"u to 756-3332 TOll Free 8001128-1I9J4 40M a *0asa *- mme E- a 4-dp so -a ..--a .Noml mp *m 4 -a 4 mulo tb 0m qm-a - - -a o ..-e - - - --a 'a - - -.~, -a- * - -- - * *- 0 -a w-*0 -a -* * a -a "I'm Wearing One.!' "The Qualitone CIC gives you better hearing Oa...7 Beverly Hills 746-1133 Wallpaper Blowout Everything Must Go Hurry! Limited ,IQ entities! ten i " '^ .On A Instock Wallpaper 499 per Single Roll Crystal River and Ocala locations only. All sales final. No special orders. While supplies last. Citrus Paint & Decor -- DECORATING CENTER 8:00 AM- 2:00 PM A Salute 'i n Concerts lv An Intimate Performance of America's [ apha a C.Lews, a P 4, w I, p *.*. a I.. 2f'.' Most Beloved Music ... The Music of Elvis Curtis Peterson Auditorium Lecanto, Florida 8:00 pm November 4th 8 Sth For Local Sales and Group Sales 352.4899380 *Your Check is Welcome. _ Presented by Rick Stines Productions, Inc. For Information & Group Sales 352489.9380 The late J D. Sumner of the legendary "Stamps Ouartet" iho sang back up and recorded wiIht Eiis, said, "Eddie Miles is TIC'ETMASTER OUTLETS. TO CHARGE TICKETS BY PHONE, CALL (813) 2P7- R 44. GROUP DISCOUNTS AVAILABLE. MONDAY, SEPTEMBEiz 26, 2005 7A /TirrTRyq CODUNTY (FL CHRO^NrtICLE "WEIID.TR 1WIR] ftw 0 41M M dM 8A MONDAY SEPTEMBER 26, 2005 ne. ,:r, t r .: -.l,, Y,,T /. I : ' .- -. -.---. -.-- I ____ I i / ii, I Bike ride follows 46-mile trail Special to the Chronicle The 11th annual Rails to Trails of the Withlacoochee Bike Ride will be Sunday, Oct 2. This ride spotlights the Withlacoochee State Trail, which runs from Citrus County on the north to Pasco County on the south. The asphalt trail 46 miles has been converted from railroad track on even or slightly hilly terrain. Participants can ride from one mile to 100 miles and there, is no mass start. Registration/packet pickup is from 7 to 9 a.m. at the main trailhead at North Apopka Avenue in Inverness. Six SAG Learn to clog Beginners' clogging class set for Oct. 3 Special to the Chronicle 7 Classes are set For beginning and experienced loggers. Instructor Sonya Alien will start a new class at 6 p.m. Monday, Oct. 3 at the Citrus The cost County Audi- is t toriuin. Reg- s 0 istration will$ S be taken at per the first class. class The cost is $3 per class per per person The inter- person. mediate classes will be ongoing from 7 to 9:30 p.m. The cost is $3 per class. The Citrus County Audi- totium is at 1310- S. Florida AVe.; adjacent to the county fairgrounds. Call Citrus County Parks and Recreation at 527-7677. Any person requiring rea- sonable accommodation at this program because of a disability or physical impairment should Mei contact the Citrus County a n Parks and Recreation office 72 Wil hours prior to the activity. * WHAT: 11th annual Pails to Trails of day Oct. 2. the Withlacoochee Bike Ride. 0 APPLICATIONS: Available at area * WHEN: 7 to 9 a.m. Sunday, Oct. 2. Chamber of Commerce offices and at libraries, online at * WHERE: Main trailhead at North trailsonline.corn or e-mail har- Apopka Avenue, Inverness. nage@atlantic.net. SREGISTRATION: $20 through ride 0 GET INFO: Call 527 3263. stops are provided along the Trail. A continental breakfast and a light lunch will be served at the main trailhead. Registration is $20 and continues through ride day Oct. 2. Applications are available at area Chamber of Commerce offices and at libraries. To download an application for the ride, go to. Also, you can e-mail harnage@atlantic.net or call 527-3263 for more information. The Rails to Trails of the Special to the Chronicle Recently, the new board of directors for Nature Coast EMS were named. From left are: Steve Kuhn, vice chair; Dr. Bradley Ruben, treasurer; Holly Martin; Emery Hensley, chair; CDR Robert Blume, secretary; and Dr. Joseph Bennett Jr. New Jersey club to host reverse mortgage speaker Special to the Chronicle The regular meeting of the New Jersey and Friends Club of Citrus County will be at 1 p.m. Monday, Oct 3, at VFW Post 4252, County Road 200, Hernando. Bill Dowell of American Reverse Mortgage Company will present information about this form of aid to seniors. During the meeting, we will elect new officers for the 2005- 06 year. Activities for October will be: Oct. 5: lur, neon at Joe's Restaurant in .Inverness. Oct 19: Annual Picnic at * WHAT: New Jersey and Friends Club of Citrus County meeting. WHEN: 1 p.m. Monday, Oct. 3. WHERE: VFW Post 4252, County Road 200, *Hernando. GET INFO: Call Joe at 746-7782. Whispering Pines Park, Inverness, from 10 a.m. to 5 p.m. A lunch buffet will be at 12:30. Members wishing to join us Thanksgiving Day at the Show Palace in Hudson for the Christmas Show, contact Frank Sasse at 489-0053. Visit the Web site njclubfl.tripod.com for information about these and other activities. Due to Hurricane Katrina, the annual bus trip to Biloxi is cancelled. We are sponsoring an 11-day cruise to the Panama Canal on April 17. Call MaryAnne at 746- 3386 for details. The club is open to all. You don't have to be a native ;h,-',,,*aii" or even have lived there to join our active and friendly club. Call Joe at 746- 7782. Withlacoochee Citizen's Support Organization has an active volunteer roster. The volunteers work year-round to keep the trail in great condition for users. The bike ride is the only fundraising event of the year and all monies received from this ride are turned back in to improve the trail. Previous rides have allowed a new pavilion to be built at the North Apopka Trailhead, two large canopies to be installed, the securing of a 1930s caboose for that trailhead, as well as the addition of more benches, covered picnic tables and trees. Special to the Chronicle Honored Guests who attended the Beverly Hills Garden Club Tea on Sept. 13, from left, are: Dick Stefany; Doris Stefany; Kay Dinsmore; Kay Schreiner; Ted Vogt; Dot Bristol, charter member; Arlene Watson; Jean Cooper; and Matt Ryan. The tea was hosted by Ways and Means: Sally Manoly, Regina Multer, Christine Small, Chairwoman Darlene Drafts, Connie Lockman and Jane Maiwald. Guda Taylor presented the program at and discussed a variety of plants from Taylor Garden Nursery. Past presidents attend- ing the tea were Pete Peterson (2005-06), Kay Dinsmore (1991-92), Ted Vogt (1994-96), Darlene Drafts (2000-02) and Christine Small, (2002-04). Advocate group seeks board members Special to the Chronicle Advocating for Kids Inc. is seeking community-minded and proactive board and advisory members in Citrus, Hernando and Sumter counties who are passionate about issues affect- ing children that have been abused, abandoned or neglect- ed and committed to the Guardian ad Litem Program. Prior fundraising, grant writ- ing or nonprofit board experi- ence is a plus. Our mission is to insure every abused, neglected or abandoned child in the Fifth Judicial Circuit Court has a court-appointed advocate to speak on his or her behalf and Our mission is to insure every abused, neglected or abandoned child ... has a court-appointed advocate. never that we never have to say no to a child in need. For information, visit the Web site at g4kids.org or e-mail to info@ad vocating4kids.org. News NOTES Artist of the month Marines replace flag at museum I 4 WALTER CARLSON/For the Chronicle rmbers of the Marine Corps League Citrus Detachment 819 recently presented the Ted Williams Museum in Hernando with ew Marine Corps Flag to replace the old one. From right are: Robert Deck, commandant of 819; Sue Colabelli, secretary Ted iams Museum; and Jim Coulon, member of 819. New NCEMS directors Garden club tea - sf, ni ' Special to the Chronicle i At the September meeting of. the Art League, members. voted Trisha Thurlow Artist of 1 the Month for her watercolor painting, "Family Outing." Thurlow's painting is on exhib- it, from i to 4 p.m. Tuesday to Saturday to Oct. 11 in the Art & Education Building. The art league Web site,, awards a cash prize to the winners of the Artist of the Month com- petitions. The Art League is at the corner of Annapolis Avenue and County Road 486, in Citrus Hills, Hernando. View "Family Outing". on the Internet at nfo click on Gallery. Sugar Babes to meet Special to the Chronicle The Sugar Babes Doll and Teddy Bear Club will con- duct its September meeting at 10:30 a.m. Wednesday, at the home of Ruthe Smith, president, in Sugarmill Woods. For directions, call her at 382-1826. Fixings for a salad and sandwich lunch will be provided. Ruthe will present the program on the summer con- vention of the AFDC, the club's national doll organiza- tion. She will have sou- venirs, and information about some of the mini- workshops held, with an eye to include these workshops in future meetings of the Sugar Babes. There will also '# be Show and Tell from all the members about special dolls in members' collec- tions. Member information and meetings dates will be presented. The ladies of the Sugar' Babes Doll Club welcome new members and guests at meetings. Meetings are on the fourth Wednesday :S monthly with location to be ^ announced. Snowbirds are welcome when in the area. : Contact Ruthe Smith at 382- 3 1826 or Betty Hearn at 382- 2513. The club project for the 1 year is providing dressed :, dolls and teddy bears or i stuffed animals for distribu- . tion to youngsters in the Head Start Program in this ' area. It is a fun project for all. PET SPOTUGHT The Chronicle invites readers to submit pho- 9 tos of their pets for the daily Pet Spotlight fea- ture. Photos need to be in sharp focus. Include a short description of the pet and owners, includ- ing names and home- towns. Photos cannot be returned without a self-addressed, stamped envelope. Grojp photos of more than two pets cannot be printed. Pets * should be alive and belong to local owners, Send photos and Infor- mnation to Pet Spothlight, c/o Citrus County Chronicle, 1624 N.. Meadowcrest Blvd., Crystal River, FL 34429. 4 ,-.._ ouNTY (FL) CHRONICLE Finding words George Bush's speech last night would be much more appreciated if he had spoken from his heart instead of the teleprompter. Don't fix it About the woman with four chil- dren who rented an apartment for two months: One thing she should never do in a rented apartment is redo it and put in new carpet. She should have known better than that. I wish her good luck, though. Katrina blame President Bush says he takes full responsibility for the Katrina thing. Isn't that wonderful? You mean to tell me that he's humbling himself? I'd like to say Bush should put his money where his mouth is. Has he donated any of his money from all the oil companies that he's making plenty of money on? Has he donated any money to them? " Denny Dingier Audloprosthologist BC-HIS No, but he's going to make a big deficit again to show that he's going to rebuild New Orleans. You know what? I don't care what any- body says; that shouldn't have ever happened. Youthful looks This is in reference to the front page on Sept. 17, Saturday, "Who pays for cost of Katrina?" Now just who do you think is going to pay? The taxpayers, we're paying for it. It's all our fault that it happened. Instead of taking Congress and taking away some of the money for these stupid things that they do, like finding how long a lizard lives and stuff like that, that could help pay for it. And this is another com- ment about the obituaries: Nothing bad intended here; I'm terribly sorry that these people passed away. But when they are in the obituaries, why do they put a pic- ture of when they were 20 years CALL TODAY! Professional Hearing Centers 211 S. Apopka Ave. Inverness 352-726-4327 r----- ------- FREE Hearing Check ($75.00value) FREE Check & Clean (on any brand aid) Not valid with other offers. Expires 9/30/05 LI L m LENNOX U to $1 600 INDOOR COMFORT SYSTEMS A better place- In REBATES 10% DISCOUNT For full payment upon completion SLPH 4811 S. Pleasant Grove Rd., Inverness, FL 726-2202 795-8808 LIC #CMC039568 l STANLEY STEEMER FALL SPECTACULAR RAKE IN TIHE SAVINGS!! r------------------- I CLEAN ANY FIVE $ 0Ei ROOMS & A GET 13 S ONE HALL (Cleaned & Protected... 235) . MUST PRESENT COUPON. RESIDENTIAL ONLYG IAEA EE ROOM IS AN AREA UP TO 300 SO FT. LIVINGIDINING CLEANED FREE COMBOS OR GREAT ROOMS COUNT AS TWO ccO ROOMS COUPON EXPIRES 10131105. r------------------------n TILE& ~" $1 000 GROUT MU OFF CLEANINGMUST PRESENT COUPONRESIDENTIAL OR C LEA NIl COMMERCIAL. MINIMUM CHARGE IS REQUIRED. COUPON EXPIRES 10/31/05. L. -- - -J ------- J CLEAN ONE SOFA $ 800 1 (Up to7 ft.) AND TWO (Cleaned & Protected.. 153) A I MUST PRESENT COUPON. RESIDENTIAL OR CHA S COMMERCIAL. EXCLUDING LEATHER & HAITIAN CHA AIRS COTTON. COUPON EXPIRES 10/31/05. L-------c-------------------J LIVING BRINGS IT IN.WETAKE IT OUT. SM CLEANING EXPERTS WWI Call 726-4646 1-800-STEEMER or schedule online atstanleysteemer.com STANLEY STEEMEREE _-__---Sound OFFF--- old and they're 80 when they passed away? Now surely they have a lovely picture in their older years. I think it would have been more appropriate to put those in there. God bless them all.. House of cards Three-and-a-half months go an ... automobile dealer advertised a $25 gas card with every test drive. I was told that the $25 gas card did not come in yet. The receptionist had me put my name on the list and said I would be contacted, when they arrived. After a month, I called the (dealer) and was told by the receptionist that they did not come in yet. This excuse continued for another two months. I then asked to speak with a manager. The manager informed me that they could not get any cards. I guess I'm a victim of false advertis- ing by the (dealer). If I cannot trust them to make good on their adver- tisement in reference to the $25 gas card, how could I trust them to purchase a new automobile for myself? This is very poor. Beware scammers Let the public beware. Tree peo- ple from Sumter County are pulling a scam. If you give them tree work, (they) beg for advances to repair their equipment, cut off a few limbs and leave them and then are never heard from again. They've pulled this several times. ZMore 3eauiiful SOne iRoom at a Time. Custom Window Treatment Sale Window Treatments Fine Furnishing Lighting and Accessories Area Rugs INTERIORS L b y DecoratiRng Den" 564-9001 Leave or stay? This is regarding the weather forecast: "Surge forecast for Crystal River." Three days after Katrina had passed New Orleans and was in North Carolina, the Chronicle ran an announcement to expect 4- to 6-foot tidal surge above normal high tide. That would have been 7-1/2-foot tide in Kings Bay. That is at or above the "no name" storm. All through the time of Katrina, Monday, Tuesday and Wednesday, the talking heads on TV were predicting up to 7-foot storm surges. Today, the Chronicle announced a possible 6-foot tidal surge. The surge was somewhere around 8 to 9 inches. So when do we leave and when do we stay? Pay off debt National debt is $1.3 trillion high- er than when (President) Bush took office. If this is a conservative party, that's way out of line, (Bill) Clinton and the liberals had a surplus. Let's go back to the liberal party, get back on our feet and get that debt paid off. I- U -- Accent Furniture Accessories Artwork Lamps Mirrors Wallpaper & Window Treatment Showroom Mon-Fri 9-5 Sat (ByAppointment Only) 352-560-0330 Historic Merry House, Downtown Inverness Behind Wendy's opti-ma rt Completely Affordable Eyecare Brands You Know Value You Can See! Don't be fooled by unbelievable "sale" prices, tricky percentages off, or "Lowest Prices of the Year!" At' Opti-Mart we make it simple, easy & clear. We offer the widest selection of brand names you want at the prices You deserve EVERYDAY! THE PATIENTAND OTHER PERSONS RESPONSIBLE FOR PAYMENT HAS A RIGHT TO REFUSE PAY,. TREATMENT, WHICH IS PERFORMED AS A RESULT OF AND WITHIN 72 HOURS OF RESPONDING TI NATION OR TREATMENT OFFER EXPIRES 10131105. NOT VALID WITH PRIOR PURCHASES. PRICE LAND STANDARD FRAMES. MAY NOT BE COMBINED WITH ANY OTHER OFFER OR INSURANCE UN COMPLETE TREE SERVICE QUALITY WORKMANSHIP REASONABLE RATES Owner: JOHN WEINKEIN Tree Removal Topping Trimming Stump Grinding FREE ESTIMATES LIC. & INSURED Member Better Bus. Fed & Chamber of Comm. Call Today for all your Tree Needs! 344-2696 CAING Douglas CREATIVE COATINGS Custom Screens ..r. .: SlipReesitant '; i ''f'- f' '. -' No Resealing .O R- yo, ?ust s by Mildrew E WDirE Wde Range Garage Doors, French Doors, Entryways... of Colors & All Types of Screen Repairs Driveways Pool Decks Any Design S1./ Walk Ways 352-860-0997 --- FREE Servicing Citrus, Hemando, Pasco, Border & Stencil with Ad SPinellas &AlachuaeL Expires 10/15/05 - E-Mail: Doug@NeedAScreen.comg 352-628-1313 AAA Roofing .Call the "Leakbusters" Licensed Insured FREE Estimates Lic. CCC057537 CASEY PAINTING PAINTING InteriorlExterior Free Estimates Dependable LEWIS CASEY (352) 794-5035 *Terms Available* *. SO ** (Snge VisonLese &Otnar rms ) W 0- ro Pricing! We~iarBi~focTS'als? Save p t 0', ff"Tpcl Retai Pries EveydyOnNireBra( SCREEN SPECIAL Who are you going to call when you need screen? 352.S64 98 ,4 TRACK GARAGE SCREEN $'68 500 (ON MOST HOMES) I .... OFFER EX1RES SOON r Sept rmter Only 0 I10% OFF I L 1... Renew Any Existing Concrete! DESIGNS COLORS PATTERNS Lic./Ins. 352.527-9247 I CITRUS C Call 1-800-683-EYES or visit optimart.com for a store near you. Inverness 2623 E. Gulf to Lake Hwy. 352-637-5180 Crystal River 1661 US Hwy 19 S. (Kash & Karry Shopping Center) 352-563-1666 Including Medicare & Medicaid i CANCEL, OR BE REIMBURSED FOR PAYMENT FOR ANY OTHER SERVICE, EXAMINATION OR O THE ADVERTISEMENT FOR THE FREE, DISCOUNTED FEE, OR REDUCED FEE SERVICE, EXAMI- ES ILLUSTRATIVE OF COMPLETE PAIR PURCHASE OF GLASSES WITH STANDARD CLEAR LENSES LESS OTHERWISE NOTED. POWER OVER STANDARD AND PRISM ADDITIONAL. MONDAY, SFPTFMBER 26, 2005 9A PInd ONrff - .,.v I SCREENS I 10A MONDAY SEPTEMBER 26, 2005 % W&rn u '"l*:ie-:1 r .irice ..:i. "The things taught in schools and colleges are not an education, but the means of education." Ra I p -'!a Wa?.f.3 Es"C.; a F C TRUS COUNTY CHRONICLE EDITORIAL BOARD Gerry Mulligan .......................... publisher Charlie Brennan ............................. editor Neale Brennan ...... promotions/community affairs Kathie Stewart ....... advertising services COST OF EDUCATION More teachers translates to more money T he old saying, "There ain't no free lunch" has never been truer than when it is applied to educational concerns in the state of Florida. All the desires are there. Nearly everyone wants smaller classrooms, top-quality teachers, better-paid teachers and a high- quality education for children. But all those desires cost money and the money is not there. help matters and the situation is compounded by a reduced inter- est in teaching as a profession. If we reduce requirements to entice more people to become teachers, we reduce the quality of the education provided. If we reduce administration expens- es, a bigger chunk of nonteach- THE ISSUE: The need for teachers. ing duties fall on teachers. State education officials have to fig- ure this out quickly. Florida voters OUR OPINION: A much bigger passed a law to piece of the state limit the number of More teachers spending pie must children that can be means more go to education. in any school class- public spending Plans mustbe put in room, hoping that on education. place to recruit smaller populations teachers and make would result in better education. it worth their while to come to That law will result in more than Florida. Florida voters must -. o ^newr ..Halize they asked for this man- 06--O ,no', n the must pay..for it. .education officials are scram- ,All the good intentions in the bling to find teachers to fill those world won't make it happen. positions. Education isn't free and it isn't The fact that Florida is on the cheap. Everyone must step up low end of the pay scale doesn't and pay the bill. Katrina warning 0 Regarding the Saturday, Sept. 17's Sound Off titled "Blame game," the person calling is accusing the Democrats of doing north ing but placing blame and never doing any work. However, there is no photo CALL on any Democratic site 563 that shows a Democrat 563- watching Hurricane Center Director Mayfield give a briefing on Aug. 28, a day before Katrina smashed ashore. And the president, sitting in his ranch in Crawford, was warned that there could be a.breach in the levee sys. tem and greater New Orleans could .be overtopped, flooded and it would be months before New Orleans would be livable again. Seeking tranquility It's very nice finally to see in the Chronicle, in Sunday morning's (Sept. 18) paper, that there's some issues being discussed about air" boat noise. We moved here thinking this would be the tranquility and peaceful quiet that we really were hoping for. But evidently, airboat problems have been going on for years and years. It's nice to see something headlined in the paper in your articles there about the airboat noise. We certainly hope our county administrators will do something to rectify the problem. Trying to help An apology from an old grandfa- ther. On Sept. 20 at about 11 a.m., I was in the checkout line at the Winn-Dixie store in Inverness. I wvas standing behind a young mother with a small baby in the shopping cart. The little one was crying its heart out while the flustered mother was trying to check out and pay for her groceries. Having been the father of 12 children and 18 grandchildren and eight great-grandchildren, with- out thinking, I reached down and picked up the baby's bottleand started to feed it. It quieted down and gently held onto my little finger. When the mother was finished, she took the cart and the baby and start. ed out of the store. And I said to her, "Don't forget to burp the baby," and "God bless you." The moth- er turned and looked at me like she didn't know what to say. When I got home, I realized I shouldn't have done this. I wasn't in the small community that I lived in and these people didn't know me. Where I came from, I was known 0579 well. But if I caused this young lady any discomfort, you have a sincere apology .from an old grandfather. Old habits are hard to break. Donation challenge The Nature Coast Corvair Club of Inverness has donated $500 to the Salvation Army to aid those in need from catastrophic Hurricane Katrina. The club challenges all other clubs and car enthusiasts to do the same. Just put yourself in their shoes; wouldn't you want help? Please give want you can to the Salvation Army. They do wonders for all those in need. Delayed reactions A few months ago, a roadside bomb in Iraq proved to be a sarin gas artillery shell. Since the weapon blew up in an appropriate manner, only minute amounts of the gas (escaped) and only one soldier needed any treatment. Now, sarin gas is a weapon of mass destruc- tion. The question is, was this the only weapon of mass destruction in all of Iraq? I don't think so. So where are the remaining artillery shells? My guess is they are buried like many of the conventional weapons recently found in the deserts of Iraq. Probably the only man who knows where they are buried is "Chemical Ali." But you would have to torture him to get that kind of information out of him and of course we are too, too civi- lized for that, are we not? Never- theless, someday they will probably be stumbled .upon, but that might be a long time from now. In Charleston, S.C., a kid in the late 1940s found a Civil War cannon shell and he tried to open it using some tools. He was killed when it exploded almost 100 years after the Civil War. Poor is pxir, aMd _lorblid we *G I - & - Copyrighted Material Syndicated Content Available from Commercial News Providers - - - 4m low-. 4b - - - -~ - .- e.- .. - - - a - e -- - -~ . .--eO -- a - a a _ .- .. - - -- -. a - - - - a S S 4 0 41. .0 am 4. - LETTERS / to the Editor . . Freedom for religion In June 2002, the Ninth Circuit Court of Appeals in San Francisco ruled that the words "under God" in the Pledge of Allegiance constituted "an endorsement of religion... a pro- fession of religious belief.., in monotheism... "Recently that ruling was upheld. This decision presumes that the estab- lishment clause of the First Amendment is evidence that America is a secular nation. This is not quite true. America was founded as a Protestant society. The original set- tlers created colonies built upon the same Anglo-Protestant value system that compelled them to leave monar- chial England. Samuel Huntington of Harvard defines Anglo-Protestantism as composed of "The English lan- guage, Christianity, English concepts of the rule of law ... and the Protestant values of individualism, the work ethic and the belief that humans have the ability and the duty to create a heaven on earth," These have been modified by sub- sequent immigrations, but they remain the core values of present-day America. Imagine the difference it would have made had 15th century Italian or French Catholics colonized this land. The framers of our Constitution believed that the republic would fail unless buttressed by Christian ideals. Samuel Adams wrote, "The Bible offers the only system that ever did or ever will preserve a republic in the world." They crafted a state that was politically secular, but governed according to Anglo-Protestant values a delicate balance that has worked well. Non- Christians can participate fi.-v1,l as long as they assimilate its values, The establishment clause was intended to protect these values froI. government interference. William McLaughlin of Yale notes, "It was not to establish freedom from religion, but to establish freedom for religion. The phrase "under God" in the pledge is not, then, an "endorsement of religion," but an affirmation of the importance of religion. To deny the existence of God is one thing, but to reject as unconstitutional the religious foundation of our state is not only a radical departure from what America is all about, it's bad law. Prof McFadden holds a PhD in Comparative Politics, International Relations from George W, .shintvgln [ ail ri il John H. McFadden Inverness Seize the moment Now that il1 storm has passed and the water is subsiding, this is an oppor- tune time to properly rebuild city. If the federal government can stay in control and possibly avoid corrup- tion, this is the time to develop a pris- tine city. First, though, it must be determined whether it is feasible to rebuild in a bowl, and, if so, how to make it secure. If there is a strong potential for anoth- er disaster from flooding, then rebuild- ing the below-sea-level part of the city should be abandoned. Now, the real rebuilding is to build a city of largely independent resi- dents rather than a city mainly dependent on welfare-type support A first step will be to disperse the heavi- ly dependent former residents to the many cities in our country that have large blocks of the same dependent residents. Then start working with the displaced people who would like to return to New Orleans. Teach them how to improve their lives instead of being resigned to a life of meager existence. When they are ready, bring them back to New Orleans as happy and ambitious residents. As.they suc- ceed, their peers and relatives will be able to see the advantage of success- ful living. As this progresses, New Orleans can become a model city and other cities can look at the example and start their own renewal process. I realize social liberals will be aghast at the suggestion since they will lose their reason to exist The advantages of this revolution will be tremendous. I know that never will there be complete success but it is much more positive than herding so many unfor- tunate people into a depressed area and convincing them that there is nolhiiiiw: better for them. Try it; it might just work! Robert E. Hagaman Homosassa THE CHRONICLE invites you to call "Sound Off" with your opinions on any subljet, You do not need to leave your name and have up to 30 seconds to record. COMMENTS will be edited for length, personal attacks and good taste. This does not, hinlif criticism of ,,ii figures, i a .. wilt cut ,'i,-' material, OPINIONS xprvssd ar puty p v Hi.. of the callers. - ..M -"a 41. -o- o 4lJ -- 4b . 4b .1 mI RTI US OU ( Copyrighted Material ft4m . - 0 Syndicated Content SAvailable from Commercial News Providers ~- --- 4 - - l - mmw A- - -vivo -. S -WCitrus Hills Lodge t In the middle of "Nature's Paradise" 350 E. Norvell Bryant Hwy. Hernando, FL 34442 Next to Ted Williams Museum _ (352) 527-0015 1 (888) 424-5634 I Get A $1200 Summer Rebate On The World's Smartest Air Conditioner! Introducing the Florida Five Star InfinityTM System with Puron-. aln : * 10-Year Factory Parts & Labor Guarantee * 25% Minimum Cooling & Heating Cost Savings *fiN41M ale L-e *- )-) BIe * 100% Satisfaction Guarantee * 10-Year Rust Through Guarantee * 30 Times More Moisture Remov.al Visit us at: 1803 US 19 S, Crystal River 1-352-795-9685 1-352-621-0707 Toll Free: 1-877-489-9686 or visit Ids MI "W F- N(rfyi p n141 gsee rae ako C rirC rprto Ifnt s rdmrko arerCroaio.Foia ieSa Sse sopinl a I: Ied11/10 :al eiaAr odtoig .C rie atr rzdD alrfrdtal srsritosapl olmtd af nis Air Boat Rides Boat Rentals Pontoon Boat Tours SGallery &ift:o ik IF YOU THINK THAT'S A GREAT DEAL, CHECK OUT ADELPHIA CLASSIC CABLE FOR ONLY $24.95 A MONTH UNTIL 2006. BUT YOU BETTER HURRY, THIS GREAT DEAL ONLY LASTS 1 WEEK. ORDERADELPHIA CLASSIC CABLE BYOCTOBER u S' c [ , F,,- Ttj if I I x, GOING ONCE ... GOING TWICE ... CALL NOW! la 1-866-5-ADELPHIA Get More Than You Pay For. 1-866-(523-3574) $24s95,mo UNTIL 2006 SAVE UP TO S125 fix 726-8822 H1eroppne 1-800-832-8823 ]eritage Propane $ 99 oo Serving America With Pride $ w INSTALLATION SPECIAL 2700 N. Florida Ave., Hernando, FL Serving All Of Citrus County 25 WANTED to try newly developed Digital Hearing Technology Beltone has, developed new digital EDGE technology which automatically eliminates feedback or whistling; uses digital processing and directional microphone technology to improve understanding in background noise; automatically adjusts to sounds around you and eliminates occlusion or the "plugged-up" feeling. Video Ear Inspection Performed by Factory Technicians at Beltone Hearing Center The most trusted named in hearing healthcare for over 60 years 9/26 9/27 9/28 9/29 9/30 Hurry, call now to schedule your appointment. CUSTOM FULL SHELL AUDIOMETRIC TESTING* I"S" Series Digital Find out what you're hearing and what you're not, the benefits of i4 DAYS ONLY ON SALE hearing aids vary with type and degree of hearing loss, noise, environment, accuracy of hearing evaluation and proper fit. That's why it's important to have a thorough evaluation to measure what you're hearing and what you're not. FREE adjustment to maximize your hearing aid I Retail price of $2400 performance. Digital Save 50% OFF Audometric testing for proper ampllcation selection only. L Expires 9/30/05 | MBeltone HEARING CARE CENTER SPECIAL OFFER 5 DAYS ONLY! All Beltone Hearing Aids include FREE Lifetime Service INVERNESS 726-9545 CRYSTAL RIVER 563-1400 3812 E. Gulf to Lake Hwy. 441 S.E. Kings Bay Dr. Times Square Plaza Kings Bay Plaza Comer. U.S. 19. 640180 MONDAY, SEPrEMBER 26, 2005 IIA NATION C C NTY FL) CHRONIC - -w- 0 a - ft.ow - 4w - - 12A MONDAY SEPTEMBER 26, 2005 . IL Crime rate Mst at ow Copyrighted Material Syndicated Content ~. ~ a..- a- ~ * 4.- - - -~ 4.- ..~ ~ -in-... - ..Available from Commercial News Providers Rita expoes dedIy ecuationiuues I VVg &owe a 01-:r N: 40. e" f dam doom - ~. 0 ft- -do 0 # N D =n m b- asm ... .... 4. 0 - -Iylllw -. w 011,MM .. (Allowdw -W mm I*& mmomm- da w m --q MuJL% cNhlzrw 6 Vrv chikk* ' Inrnt raignit I in Sd City m -4omu n so , S 'eaf S - -NINM ow "EN oamao- -. *0WWW -t WW -- 5- .-. 77- OEM oq *00 I Wild-card race heats up Astros take on the Cubs. PAGE 2B Is B MONDAY SEPTEMBER 26, 2005 vwwa. .k~ ~...*'. - "0: .- S ~ ~. a a..- - a- S a * N' .~* Atvsm~m mamdomw04 .J(hiMu)nt itakt*, h1' Nvr O-m.. Copyrighted Material Syndicated Content - Available romCommercial News Providers S.... a N Provid rs A L .. .. mI a 0" "I * . .. : .. S Q. m Alb V im. "a S " .... a .- :* k "" "tS " * ..... .. H- .- a" -i. ai a a- * , ". M l-rs a4 a.4a jllllel *a- l a 1a in- ar a* a- -k S Owe. .Am '. .- -* -> .5 .. ,, - a-. a .::. *.. - o = .:... .a a t.. ~ r ..*..t ~..aH. e - * we - a *- - . . S:1 ~0 e nI -- a a-I' -- - - - 4wow-elooa m NRMam&a *m -OP I&eia I.: ".. ..... .. .a i" ... 4 -.. .-i < .-. a.. .... a.. 4 S- .4-- AD . .... . .. . . - 'S ~ '~ ~ a - a a-s. A 0o Devil bats quiet Angels we A11" qP 'lp ... Wa -s C. S.- awa *~ - 5, -: .. A 4 am r krmrans in Fs&'ti (up. rrxiNrkaubd~aa v rur Afiini n.mteup**nNwkL t4TiL --1I'lo .... .... HAS S - a - a, o- .*. "w ' m~m-04ASNe Com0 0 --------------------------------------------------------------------------------------------------------------f.L * V e m-m oqqW I .. I::-. : : ' .w...:Wf. I t m AO VAP 2B flIONL)AY, SEP ITEMBER ~ 5J A''. down Copyrighted Material Syndicated Content - a I Available from Commercial News Providers S - ,f --. .. - *-4. 0 * 4 e**1 ," e ,t .e aa1h .-...a. 's . .a l-iS **- - NL trim is NL ('uh tnm Astnm% wildc , r. *a. *.. . - S .'*, ma n ..... ... - 40 1 ":" f " ... ..^ .. f ~ . ,B. a % .. 41 ww ftvoa b am e -W me a4w S. a-0 . a.Jdbi a S fs * ,, * S.. .., 4s- -s a A.. -- --: : .--::: ait * 41111 4 1 =:. da. a. a a agm aI 4 f * w. a Boston New York Toronto Baltimore Tampa Bay Chicago Cleveland Minnesota Detroit Kansas City Los Angeles Oakland Texas Seattle Atlanta Philadelphia Florida New York Washington x-St. Louis Houston Milwaukee Chicago Cincinnati Pittsburgh Sox W L Pc San Diego 77 78 .49 San Francisco 73 82 .47 Arizona 72 84 .46 Los Angeles 69 86 .44 Colorado 64 91 .41 x-clinched division z-first game was a win AMERICAN LEAGUE Sunday's Games Detroit 8, Seattle 1 N.Y. Yankees 8, Toronto 4 Boston 9, Baltimore 3 Kansas City 5, Cleveland 4 Chicago White Sox 4, Minnesota 1 Tampa Bay 8, L.A. Angels 4 Texas at Oakland, 8:05 p.m. Monday's Games Toronto (Bush 5-10) at Boston (Schilling 7- 8), 7:05 p.m. N.Y. Yankees (R.Johnson 15-8) at Baltimore (Lopez 14-11), 7:05 p.m. Chicago White Sox (Garland 17-10) at Detroit (Robertson 6-18), 7:05 p.m. Kansas City (Howell 2-5) at Minnesota (Baker 2-2), 8:10 p.m. L.A. Angels (Lackey 12-5) at Oakland (Blanton 11-11), 10:05 p.m. Tuesday's Games Toronto at Boston, 7:05 p.m. N.Y. Yankees at Baltimore, 7:05 p.m. Tampa Bay at Cleveland, 7:05 p.m. Chicago White Sox at Detroit, 7:05 p.m. Kansas City at Minnesota, 8:10 p.m. Texas at Seattle, 10:05 p.m. L.A. Angels at Oakland, 10:05 p.m. Devil Rays 8, Angels 4 TAMPA BAY LOS ANGELES ab rhbi ab r hbi Lugoss 3 22 1 Figginscf .4 .21 0 Crwfrd If 3 01 1 OCbera ss 4 1 2 0 Cantu 2b 5 11 2 GAndsn dh-3 0.0 1 Huff rf 4 11 1 VGrerorf '4 0 1 2 Hollins rf 0 00 0 Quinlan 3b 4 0 0 0 Gomesdh 513 1 BMolna c 4 1 1 0 TLee lb 5 01 0 Erstad lb 4 0 1 0 NGreen 3b 522 0 JRivra If 3 02 1 Lafrst c 4 000 AKndy 2b- 4 0 1 0 THallc 0 0 0 0 Gthrghtcf 4 12 1 Totals 38813 7 Totals 34 4 9 4 Tampa Bay 103 112 000- 8 Los Angeles 100 120 000- 4 E-Quinlan (6). DP-Tampa Bay 1, Los Angeles 1. LOB-Tampa Bay 8, Los Angeles 6. 2B-Lugo 2 (36), NGreen (14), Gathright (7), OCabrera (27), JRivera (15). 3B-Gomes (6). HR-Cantu (28); Huff (21), Gomes (21). SB-Crawford (46). CS-Gathright (4), JRivera (8). S-Lugo. SF-GAnderson. IP H RERBBSO Tampa Bay HndrckW,11-7 8 8 4 4 1 3 DBaez 1 1 0 0 1 1 Los Angeles Colon L,20-8 5 10 6 6 1 5 Donnelly 2-3 2 2 1 0 2 Christiansen 0 0 0 0 1 0 Gregg 21-3 0 0 0 2 2 GJones 1 1 0 0 0 3 Christiansen pitched to 1 batter in the 6th. T-3:00. A-41,733 (45,037). Braves 5, Marlins 3 FLORIDA ATLANTA ab rhbi ab r hbi Pierre cf 5 11 0 Furcal ss 4 1 1 0 Coninelf 3 03 1 MGiles 2b 3 1 1 3 CDIgdolb 4 11 1 CJones3b 2 1 1 0 MiCbra 3b 3 000 AJones cf 4 0 0 1 Lowell2b 4 01 1 LaRche lb 2 0 1 0 Hrmida rf 2 00 0 JuFrco lb 1 0 0 0 Tranor c 2 00 0 Frncur rf 3 0 0 1 Wlnhm c 1 00 0 Hlndsw If 2 0 0 0 Andino ss 2 00 0 BJordn ph 1 0 0 0 LHarrs ph 1 00 0 Lngrhn If 0 000 Burnett p 3 12 0 McCnn c 4 1 3 0 Mssngr p 0 00 0 JoSosa p 1 0 0 0 Villone p 0 00 0 Orr ph 1 0 0 0 Dillon ph 1 00 0 Davies p 0 0 0 0 'Mcbrde p 0 0 0 0 Boyer p 0 0 0 0 Jhnson ph 0 1 0 0 Ritsma p 0 0 0 0 AMrte ph 1 0 0 0 Frnswr p 0 00 0 Totals 313 8 3 Totals 29 5 7 5 Florida 102 000 000- 3 Atlanta 000 120 20x- 5 E-Treanor (4). DP-Atlanta 3. LOB- Florida 7, Atlanta 7. 2B-CDelgado (41), Lowell (35). 3B-Pierre (13). HR-MGiles (13). SB-Conine (2), AJones (4), Francoeur (3). SF-MGiles, Francoeur. IP H RERBBSO Florida Burnett L,12-12 6 6 5 4 4 8 Messenger 2-3 0 0 0 1 0 Villone 11-3 1 0 0 0 3 Atlanta JoSosa 5 7 3 3 4 0 Davies 1 0 0 0 2 1 Mcbride 2-3 1 0 0 0 1 Boyer W,4-2 1-3 0 0 0 0 1 Reitsma 1 0 0 0 0 2 Farnsworth S,10 1 0 0 0 0 0 Burnett pitched to 2 batters in the 7th. T-3:00. A-48,147 (50,091). Yankees 8, Blue Jays 4 TORONTO NEW YORK ab rhbi ab r hbi Adams ss 5 01 0 Jeter ss 5 1 2 1 Ctlnotto If 3 00 0 ARod 3b 3 1 1 0 Rios rf 1 00 0 JaGbi lb 3 0 0 0 VWells cf 3 00 0 Bilhorn pr 0 1 0 0 Koskie 3b 4 120 TMrtnz lb 0 0 0 0 Hlnbrn lb 3 00 0 Shffield rf 3 1 1 4 Grifn ph 1 00 0 Lawton rf 0 0 0 0 Hinske dh 4 232 Matsui dh 4 0 0 0 Zaun c 2 10 0 Posada c 4 2 2 0 Jhnson rf 4 01 0 Cano 2b 4 1 3 2 AHill 2h 4 02 2 BWllms cf 4 1 1 0 L'A' I I =JLfA&- Away Intr 41-40 12-6 38-36 11-7 35-42 8-10 35-43 8-10 25-53 3-1-5 Away Intr 47-27 12t6 50-31 15-3 38-43 8-10 32-46 9-9 19-55 9-9 Away Intr 40-34 12-6 41-37 10-8 32-45 9-Q 30-51 10-8 1-, AMERICAN LEAGUE East Division W L Pct GB L10 91 64 .587 6-4 91 64 .587 z-8-2 76 79 .490 15 4-6 70 85 .452 21 1-9 65 91 .41726% 5-5 Central Division W L Pct GB L10 94 61 .606 z-6-4 92 64 .590 2% z-8-2 78 77 .503 16 3-7 69 86 .445 25 2-8 53102 .342 41 5-5 West Division W L Pct GB L10 89 66 .574 8-2 85 69 .552 3% 5-5 76 79 .490 13 z-6-4 67 89 .429 22% 3-7 NATIONAL LEAGUE East Division W L Pct GB L10 89 67 .571 z-6-4 84 72 .538 5 6-4 80 76 .513 9 2-8 78 77 .50310% 7-3 78 78 .500 11 z-3-7 Central Division W L Pct GB L10 97 60 .618 z-4-6 85 71 .54511% z-7-3 77 78 .497 19 z-5-5 77 79 .49419Y 5-5 72 83 .465 24 z-4-6 63 93 .4Q433% z-5-5 West Division NATIONAL LEAGUE Sunday's Games , Atlanta 5, Florida 3 N.Y. Mets 6, Washington 5 Philadelphia 6, Cincinnati 3 St. Louis 2, Milwaukee 0 Chicago Cubs 3, Houston 2 San Francisco 6, Colorado 2 ' L.A. Dodgers 9, Pittsburgh 2 Arizona 4, San Diego 3, 10 innings Monday's Games N.Y. Mets (Seo 7-2) at Philadelphia (Myers 12-8), 7:05 p.m. . Washington (Carrasco 4-3) at Florida (Vargas 5-4), 7:05 p.m. Colorado (Esposito 0-1) at Atlanta (Ramirez 11-9), 7:35 p.m. Cincinnati (Ra.Ortiz 9-11) at Milwauk~ee (Ohka 11-8), 7:35 p.m. San Francisco (Hennessey 5-8) at San Diego (Peavy 13-7), 10:05 p.m. Pittsburgh (K.Wells 7-17) at L.A. Dodgers (Jackson 1-2), 10:10 p.m. Tuesday's Games Washington at Florida, 7:05 p.m. N.Y. Mets at Philadelphia, 7:05 p.m.. Colorado at Atlanta, 7:35 p.m. Cincinnati at Milwaukee, 7:35 p.m. Pittsburgh at Chicago Cubs, 8:05 p.mn, Houston at St. Louis, 8:10 p.m. San Francisco at San Diego, 10:05 p.hi. Arizona at L.A. Dodgers, 10:10 p.m. CrosbyIf 4 0,2 1 Totals 344 9 4 Totals 34 812 8 Toronto 000 030 001- 4 New York 100 010 24x- 8 E-JaGiambi (61 DP-New Yorl 1. LOB-Toronto 6, New York 5. 2B-Adams (26), Koskie (19), AHill (23), Posada (22). HR-f-4inske (13), Sreffreld 2li, Cano (14). SB-Koskie (4). CS-Johnson. (6). SF-Sheffield. Toronto Towers L,12-12 Chulk League NeY VYrk IP H RERBBSO New YorK Wang W,8-4 7 6 3 3 1 3 Gordon 2-3 1 0 0 0 '0 MRivera S,42 11-3 2 1 1 2 3 Chulk pitched to 3 batters in the 8th. T-2:46. A-55,136 (57,478). Red Sox 9, Orioles 3 BOSTON BALTIMORE ab rhbi ab r'hbi Damon cf 5 11 2 BCstro 2b 4 0' 0 Hyzdu cf 0 00 0 Mora-3b 4 1,2 1 Rnteria ss 5 02 0 Tejada ss 4 1 1 1 DOrfiz dh 2 10 0 Gbbons rf 4 0,'0 0 MRmrz If 5 11 2 JvLopzdh 400 0 Nixon rf 5220 Byrnes If 4 1:1 0 Varitek c 2 21 1 Matos cf 3 0.1 0 Olerud lb 5 11 2 Freire lb 2 0O1 0 Mueller3b 4 03 2 WYong lb 1 0.1 1 Grffnno 2b 5 11 0 GGilc 3 0 0 0 Cora 2b 0 00 0 Whtsde c 0 0,0 0 Totals 38912 9 Totals 33 3 7 3 Boston 500 040 000- 9 Baltimore 200 000 100-~- 3 E-Tejada (22). DP-Boston c, 1, Baltimore 1. LOB-Boston 10, Baltimore 3. 2B-Nixon (28), Varitek (30), Mueller (04), Byrnes (22), Matos (17). 3B-Renteriq4). HR-Damon (10), MRamirez (41), Mora (23), Tejada (26). SF-Mueller. IP H RERBBSO Boston DWells W,14-7 62-3 6 3 3 0 3 Bradford 11-3 1 0 0 0 0p Harville 1 0 0 0 0 1 Baltimore Maine L,2-3 31-3 5 5 5 4 2 Baldwin 12-3 4 4 2 1 '1 Julio 2 2 0 0 1 ,1 Kline 1 0 0 0 1 '1 Grimsley 1 1 0 0 0 0 T-2:49. A--46,559 (48,290). Mets 6, Nationals 5 NEW YORK WASHINGTON ab rhbi ab r'hbi Reyes ss 5 00 0 Wlkrsn If 3 2 2 0 Cairo 2b 5 01 0 Carroll 2b 3 1 2 1 Beltran cf 4 10 0 Baerga ph 1 0 0 0 Floyd If 3 10 0 Hughs p 0 0-00 0 Wright 3b 4 12 2 Eschen p 0 0 0 0 Piazza c 3 22 3 JGillen ph 1,0-0 0 GeWIm pr 0 00 0 NJhnsn lb 3 0-2 3 Heilmn p 0 000 Zmrmn 3b 5 0-0 1 Jacobs lb 4 11 1 PrWIsn cf 4 0O0 0 Wdwrd lb 1 00 0 Church rf 4 0,0 0 Diaz rf 3 01 0 CGzmn ss 4 0 1 0 Benson p 3 00 0 GBnnttc 2 0(1 0 JuPdIa p 1 01 0 Watson ph 0 1'0 0 RCstroc 0 00 0 DCruz2b 1 0.0 0 JoPttsn p 2 0, 0 Stanton p 0 0.0 0 Vidro ph 1 0-1 0 Spivey pr 0 1.- 0 Osik c 1 0.0 0 Totals 366 8 6 Totals 35 5 9, 5 New York 010 201 020- 6 Washington 201 000 200-2 5 E-Reyes (15), Cairo (6), CGuztnan (15). DP-New York 2. LOB-New York 10, Washington 8. 2B-Wright (42), Wilkerson 2 (38), Carroll (7), NJohnson (34). HR-Wright (23), Piazza 2 (18), Jacobs (7). SB-Floyd (12), Diaz (6). IP H RERBBSO New York Benson 61-3 8 JuPadilla W,2-1 12-3 1 Heilman S,3 1 0 Washington JoPatterson 6 4 Stanton 1 0 Hughes L,1-1 2-3 4 2 Eischen 11-3 0 HBP-bv Eischen (Wright). 5 5 3 ,1 0 0 0 .2 0 o 2 1 4 4 0 0 2 0 0 Home 50-24 53-28 41-37 35-42 40-38 Home 47-34 42-33 40-34 37-40 34-47 Home 49-32 44-32 44-34 37-38 Home 52-26 45-33 " 42-33 45-32 41-37 Home 47-29 51-26 43-34 38-41 42-39 32-46 Home 41-33 36-42 36-45 39-38 40-41 MLB SCOREBOARD 1:We up al dm a wam *ae a o ae no a -. = =lnl a af a.. a - * - .. - a4/ - - .-, a C - Ch-Rus CouNTY (FL) CHRoNicLE SPOrTn>s 4!bn A4-- Q ?A ?00', Away Intr 50-31 10-5 34-45 7-8 34-44 8-7 39-38 6-9 30-44 7-8 31-47 5-7, Away Inti 36-45 7-11 37-40 6-12 36-39 8-10 30-48 5-13 24-50 6-9 M. "-ff" ilittF Ills ,CITRUS COUNTY (FL) CHR E _ BASEBALL Cubs 3, Astros 2 HOUSTON CHICAGO ab rhbi ab r hbi rTverascf 3 00 1 Macias 2b 4 0 0 0 siggio 2b 4 00 0 NPerez ss 4 00 0 ,Ensbrg 3b 3 01 0 DeLee 1lb 3 1 2 1 -rkmn If 2 01 0 Grcprr 3b 4 0 1 0 Lamb 1 b 3 000 Barrett c 4 1 0 0 L,ane rf 4 02 0 Bumitz rf 4 1 1 2 jAEvrtt ss 2 10 0 Murton If 2 0 1 0 ,Scott ph 1 000 CPttson cf 2 00 0 .Asmus c 1 000 JeWms p 2 0 0 0 Gipson pr 0 00 0 McClin ph 0 0 0 0 Pettitte p 1 00 0 Wuertz p 0 0 0 0 OPImro ph 1 11 1 Dmpstr p 0 0 00 Quails p 0 00 0 JGallo p 0 00 0 lWheeir p 0 00 0 Bgwell ph 1 00 0 'Totals 262 5 2 Totals 29 3 5 3 Houston 000 000 200- 2 Chicago 100 000 20x- 3 "-DP-Chicago 1. LOB-Houston 7, Chicago 6. 2B-Lane (34). 3B- OPalmeiro (2). HR-DeLee (45), Bumitz- "(24). SB-Murton (2). CS-Ensberg (7). 'S-Ausmus, Pettitte. SF-Taveras. IP H RERBBSO Houston Pettitte 6 2 1 1 0 4 Qualls 2-3 1 1 1 0 0 OalloL,0-1 0 1 1 1 2 0 Wheeler 11-3 1 0 0 2 1 Chicago JeWilliams W,6-9 7 4 2 2 6 3 Wuertz 1 10 0 0 0 Dempster S,31 1 0 0 0 1 2 ,Gallo pitched to 3 batters in the 7th. Umpires-Home, Paul Nauert; First, Ron rulpa; Second, Mark Wegner; Third, Larry Poncino. 1T-2:36. A-38,121 (39,538). Phillies 6, Reds 3 PHILA CINCINNATI ab rhbi ab r hbi Rollins ss 5 23 1 Freel cf 3 0 0 0 Mchels cf 4 11 0 FLopez ss 4 1 1 0 BAbreu rf 5 11 1 Dunn If 4 0 2 0 Burrell If 5 02 1 Aurilia 2b 4 0 1 1 Chavez cf 0 000 Vlentin lb 4 0 1 0 Utley 2b 4 12 1 Kearns rf 4 1 1 0 DaBell3b 3121 LaRuec 4 01 0 Howard lb 5 01 1 EEcrcn 3b 3 1 1 1 Lbrthal c 3 00 0 Keisler p 1 0 1 0 Lidle p 4 00 0 HIbrt ph 1 0 0 0 "-Urbina p 0 00 0 Stnrge p 0 0 0 0 BWgnrp 0 00 0 Smpson p 0 0 0 0 ',." JaCruzph 1 0 0 0 Hncock p 0 00 0 -*Totals 38612 6 Totals 33 3 9 2 Philadelphia 201 012 000- 6 "Cincinnati 000 011 100- 3 E-Utley (14), Aurilia (9). 'DP- Philadelphia 3, Cincinnati 1. LOB-- Philadelphia 10, Cincinnati 4. 2B-BAbreu -'=(35), Burrell (26), Howard (16), Kearns (24), Keisler (2). 3B-Rollins (11). HR- Rollins (11), Utley (25), EEncarnacion (8). IP H RERBBSO Philadelphia Lidle W,12-11 7 8 3 2 1 4 Urbina 1 1 0 0 0 2 BWagnerS,36 1 0 0 0 0 1 ,Cincinnati KeislerL,2-1 5 8 4 4 3 5 Standridge 1, 3 2 2 1 0 Simpson 1 0 0 0 0 2 +fancock 2 1 0 0 1 1 W: P-Lidle. Umpires-Home, Tim McClelland; First, Chuck Meriwether; Second, Mike Everitt; Third. Tim Timmbns .' -- S' r-303 A-23 072.42,271 -I : ,3 Giants 6, Rockies 2-- . -"SAN FRAN COLORADO ab rhbi ab r hbi 'Vinn cf 5 23 1 Barmesss 4 0 0 0 .Vizquel ss 4 11 0 Sllivancf 5 0 0 0 Snow lb 301 0 Helton lb 4 1 1 1 ,.JRmrz rf 1 11 1 Hlliday If 3 0 0 0 S"Bonds If 3 00 0 Atkins 3b 4 0 1 0 Ellison If 1 00 0 Hawpe rf 2 000 ,Alou rf 5 13 2 LuGnzl 2b 3 02 0 bClark pr 0 10 0 Ardon c .2 1 0 0 Benitez p 0 00 0 Closser ph 1 0 0 0 Drham2b 1 01 2 BKimp 2 0 0 0 Feliz 3b 5 01 0 Wright p 0 0 0 0 Haad c 3 01 0 Willms p 0 00 0 Ortmerph 1 00 0 Miles ph 1 0 1 1 ,I Mtheny c 0 00 0 Dhmnn p 0 0 0 0 (Cain p 3 (0 0 Fentes p 0 0 0 0 SHwkins p 0 00 0 Cortes p 0 0 0 0 ,Eyre p 0 000 Shealy ph 0 0 0 0 Alfonzo ph 1 00 0 j .TyWikr p 0 00 0 P rNiekro lb 0 00 0 5 'Totals 36612 6 Totals 31 2 5 2 ,1 San Francisco 110 000 004- 6 Colorado 000 100 100- 2 E-Alou (8). DP-Colorado 1. LOB-' (San Francisco 10, Colorado 9. 2B-Haad 1). 3B-Alou 2 (3), Miles (3). HR-Winn (12), Helton (19). SB-Alou (5), Durham 2 (6). CS-Hawpe (2). S-Ardoin. SF- Durham 2. IP H RERBBSO '"an Francisco (:'Cain 6 3 1 1 3 4 '"'awkins 1-3 1 1 1 2 0 Eyre ,2-3 00 0 0 2 9"yWalkerW,5-4 1 0 0 0 0 0 Benitez 1 1 0 0 1 0 'Colorado BKim 5 7 2 2 2 3 'Wright 12-3 1 0 0 0 2 Williams 1-3 0 0 0 0 0 -Dohmann 1 1 0 0 1 3 ,Fuentes L,2-5 1-3 3 4 4 0 0 Cortes 2-3 0 0 0 0 0 BKim pitched to 2 batters in the 6th. HBP-by Fuentes (Vizquel), by BKim (Snow). Umpires-Home, James Hoye; First, Brian Gorman; Second, Travis Reininger; ., .Third, Joe West: T-3:13. A-31,746 (50,449). Cardinals 2, Brewers 0 ST. LOUIS MILWAUKEE ab rhbi ab r hbi E, JSckstin ss 400 0 BClark cf 4 0 0 0 'Edmndcf 4 22 1 Hardy ss 4 0 1 0 r Pujolslb 3 00 0Ovrbaylb 4 0 2 0 RSndrs If 3 01 1 CaLee If 3 0 0 0 SSchmkr If 0 000 Jenkins rf 3 0 1 0 o ,Tguchi rf 4 00 0 BHall 3b 3 0 1 0 'Grdzln 2b 3 000 Weeks 2b 3 0 0 0 Mlina c 3 00 0 DMiller c 3 0 1 0 Luna 3b 3 01 0 DDavis p 2 00 0 -Nunez3b 0 00 0 Fildrph 1 00 0 'Suppan p 3 01 0 KDavis p 0 0 0 0 Ismghs p 0 00 0 -Totals 302 5 2 Totals 30 0 6 0 S'St. Louis 000 101 000- 2 Milwaukee 000 000 000- 0 DP-St. Louis 3, Milwaukee 1. LOB-St. Louis 3, Milwaukee 3. 2B-Luna (10). .3B-Edmonds (1). HR-Edmonds (29). .SB-Luna (10). CS-Luna (2). SF- RSanders. IP H RERBBSO CSt. Louis Suppan W,16-10 8 6 0 0 0 7 Jdrnghs S,37 1 0 0 0 0 0 Milwaukee ;DDavis L,11-11 8 4 2 2 1 7 * KDavis 1 1 0 0 0 0 Umpires-Home; Bill Welke; First, Brian * O'Nora; Second, Tim Welke; Third, Gary 'Cederstrom. T--220. A-20,150 (41,900). * I Tigers 8, Mariners 1 SEATTLE DETROIT Fot Otherecord On the AIRWAVES TODAY'S SPORTS BASEBALL 7 p.m. (FSNFL) MLB Baseball Washington Nationals at Florida Marlins. From Dolphins Stadium in Miami. (Live) FOOTBALL 9 p.m. (9 ABC) (20 ABC) (28 ABC) NFL Football Kansas City Chiefs at Denver Broncos. From INVESCO Field at Mile High in Denver. (Live) (CC) Prep CALENDAR ab rhbi ab r h bi ISuzuki rf 4020 Grndsn cf 4 2 2 2 YBtcrtss 4 10 0 Planco2b 3 01 1 Ibanez If 401 1 Shltn dh 2 000 Sexson lb 2 000 CGillen dh 2 1 1 0 Bubela ph 1 000 CPena lb 4 1 1 2 Beltre3b 2 010 Monroe rf 4 1 2 0 Dobbs ph 1 000 Thmes If 3 1 1 0 JoLpez2b 4 01 0 Logan cf 1 0 0 0 Morse dh 3 000 Inge 3b 2 0 0 0 Choo cf 3 000 VWilsn c 3 1 2 1 Trralbac 3 00 0 JMcDId ss 3 1 1 1 Totals 311 5 1 Totals 31 811 7 Seattle 000 100 000- 1 Detroit 100 050 02x- 8 DP-Seattle 2. LOB-Seattle 5, Detroit 1. 2B-ISuzuki 2 (20), Ibanez (31), Beltre (35), JoLopez (17), Monroe (29), JMcDonald (6). 3B-Granderson (3). HR-CPena (16). S-Inge. SF-Polanco. IP H RERBBSO Seattle Meche 2 3 1 1 0 1 Hasegawa L,1-3 3 5 5 5 0 0 RSoriano 2 1. 0 0 0 4 Harris 1 2 2 2 0 2 Detroit MarothW,14-13 7 4 1 1 2 3 FGerman 1 1 0 0 0 0 Karnuth 1 0 0 0 0 0 WP-FGerman. Umpires-Home, Adam Dowdy; First, Tim Tschida; Second, Dale Scott; Third, Chad Fairchild. T-2:17. A-26,128 (40,120). White Sox 4, Twins 1 MINNESOTA ab rhbi Tyner If JCastro 3b Cddyer rf LeCroy dh LFord cf Tiffe lb Heintz c Rivas 2b Bartlett ss CHICAGO 4 01 0 Pdsdnk If 4 00 0 Iguchi 2b 4 00 0 Rwand cf 4 00 0 Knerko lb 3 12 0 Gload lb 301 0 Dyerf 3 00 0 CEvrtt dh 3 00 1 Przyns c 3 00 0 Crede 3b, Uribe ss ab r h bi 3 01 0 4 1 00 3 1 1 1 4 1 1 2 0000 3000 3000 3 0 1 1 2 00 0- Totals 311 4 1 Totals 29 4 5 4 Minnesota 000 010 000- 1_ Chicago 013 000 00x- 4. SE- LFord ( U Lnrtl',E i1.i Puerrire 121 C'F'-Chi'cago I LOB-Mirnecol .3 Chicago .A 2B-Tffee (8). 3B-Royvan. (5). HR-Konerko (38). SB-RPc.,anda i- , Dye (11), Uribe (4). IP H RERBBSO Minnesota FLiriano L,0-2 6 5 4 4 3 8 Crain 1 0 0 0 0 0 JRincori 1 0 0 0 0 2 Chicago BuehrleW,16-8 9 4 1 1 0 6 Umpires-Home, Rob Drake; First, Wally Bell; Second, Jim Reynolds; Third; Lance Barksdale. T-1:53. A-30,402 (40,615). Royals 5, Indians 4 CLEVELAND KANSAS CITY ab rhbi ab r hbi. Szmore cf 4 11 0 Guiel cf 4 0 1 0 Crisp If 5 00 0 Long If 3 0 1 1 JhPIta ss 4 12 0 Ambres If 0 1 0 0 Hafnerdh 3 00 0 Brown rf 4 1 1 2 VMrtnz c 4 12 3 Stairs dh 4 0 0 0 Blliard 2b 3 11 0 Teahen 3b 4 1 1 0 Brssrd lb 4 02 0 Berroa ss 3 1 1 0 Boone 3b 3 00 0 Huber lb 3 0 0 0 Blake rf 4 00 1 McEng lb 0 0 0 0 PPhllps c 4 1 3 1 ABInco 2b 3 0 1 0 Totals 344 8 4 Totals 32 5 9 4 Cleveland 300 000 001- 4 Kansas City 000 003 101- 5 One out when winning run scored. E-JhPeralta (19), Teahen (20). DP- Cleveland 1, Kansas City 1. LOB- Cleveland 7, Kansas City 5. 2B- Broussard (28), Teahen (29), PPhillips (3). 3B-JhPeralta (4). HR-VMartinez (20), Brown (16). SB-Ambres (3). S-Boone, Berroa, McEwing. IP- Cleveland Westbrook 8 Howry L,7-4 1-3 Kansas City H RERBBSO 7 4 1 1 8 2 1 1 0 0 Greinke 7 5 3 0 1 6 Burgos 1 1 0 0 1 0 McDgalW,5-6 1 2 1 1 0 1 HBP-by MacDougal (Sizemore). WP- Westbrook. Umpires-Home, Paul Emmel; First, Ed Montague; Second, Tony Randazzo; Third, Jerry Layne. T-2:34. A-11,453 (40,785). Dodgers 9, Pirates 2 PITTSBURGH LOS ANGELES ab rhbi ab r hbi TRdmn cf 4 01 0 Aybar 3b 3 1 1 1 JWilsn ss 3 01 0 Choi lb 3 0 1 0 Frmnkss 0 00 0 JPhllps ph 1 1 1 2 Snchez 2b 5 01 0 Edwrds 3b 1'0 0 0 Bay If 4 00 0 Robles ss 5 2 2 3 Ward lb CWilsn rf Mckwk 3b Cota c Paulino c Snell p McLth ph Fogg p Grabow p Vglsng p Capps p Mdows p JBtsta ph 4000 JoCruzrf 3 11 1 Perez 2b 4 12 0 Schmll p 3 01 1 Grbwsk ph 1 00 0 Brzban p 2 00 0 Nvarro c 1 00 0 WerthIlf 0 00 0 Repko cf 0 00 0 DLowe p 0 00 0 Myrow lb 0 00 0 0 00 0 1 00 0 Totals 352 7 2 Totals 34 911 8 Pittsburgh 010 001 000- 2 Los Angeles 000 026 10x- 9 E-TRedman 2 (7), Perez (9). DP- Pittsburgh 1. LOB-Pittsburgh 11, Los Angeles 9. 2B-JWilson (23), Cota (18), Aybar (6), JoCruz (21), Werth (21). HR-' CWilson (4), Robles (4). SB-Repko (5). IP H RERBBSO Pittsburgh Snell Fogg L,6-11 Grabow Vogelsong Capps Meadows Los Angeles DLowe W,12-14 Schmoll Brazoban 5 2 2 1 2 2 2 3 3 1 1 1 2 1 1 0 0 0 5 2 2 3 4 1 0 0 1 1 1 0 0 1 1 Grabow pitched to 3 batters in the 6th, Vogelsong pitched to 3 batters in the 6th. HBP-by Vogelsong (Perez). WP- Fogg, Vogelsong. PB-Cota. Umpires-Home, Bruce Dreckman; First, Ed Hickox; Second, Gerry Davis; Third, Bill Hohn. T-2:56. A-37,846 (56,000). Diamondbacks 4, Padres 3, 10 innings SAN DIEGO ARIZONA ab rhbi Fick lb 4 00 0 Cunsell 2b Loretta 2b 4 00 0 LGnzlz If BGilescf, 4 11 0 Tracy rf Klesko If 2 10 0 TCark lb Jkson If b 000 Terrero cf I Rand 3b 4 1 1 3 SnGrer. .-f Lnbmt'p 0 8ydr c Hnsley p 0 00 0 Mrtl."n pph MaS'A,' pri 1 0'0 0 Sinei c OlsuPa p 0 C'00 0 J'v'zqez p Alxndrss 4 00 0 Glaus ph WWvims p 2 00 0 Worrell p Seanez p 0 00 0 VIverde p. RaHrdz c 1 00 0 AGreen ph ab r h bi 4000 4 01 0 5 1 3 1 3 000 1 1 00 4 C' 1 0 5 C0 2 1 4 11'" 3 0 2 C0 1 0 ( 1 1 0 0 0 C 0 2 1 1 000 0 0 00 0 0.0 0 .1 1:1 0. Totals 333 2 3 Totals 39 413 4 San Diego 000 300 000 0- 3 Arizona 011 000 100 1- 4 No outs when winning run scored. E-Otsuka (1). LOB-San Diego 2, Arizona 17. 2B-BGiles (38), LGonzalez (33), JVazquez (1). HR-Randa (17). S- Counsell, JVazquez. IP H RERBBSO San Diego WWilliams 51-3 9 2 2 2 3 Seanez 1 1 1 1 1 2 Linebrink 2-3 0 0 0 1 1 Hensley 2 1 0 0 1 2 Otsuka L,2-8 0 2 1 1 1 0 Arizona JVazquez 7 2 3 3 1 12 Worrell 2 0 0 0 1 0 Valverde W,3-4 1 0 0 0 0 1 Otsuka pitched to 4 batters in the 10th. HBP-by WWilliams (ShGreen). WP- Seanez, JVazquez. Umpires-Home, Greg Gibson; First, Tom Hallion; Second, Chris Guccione; Third, Angel Hernandez. T-3:03. A-26,838 (49,033). GOLF Presidents Cup Results Sunday At Robert Trent Jones Golf Club Gainesville, Va. Yardage: 7,335 Par: 72 UNITED STATES 18%, INTERNATIONAL 15% Singles United States 7%, International 4%V Justin Leonard, United States, def. Tim Clark, International, 4 and 3. David Toms, United States, def. Trevor Immelman, International, 2 and 1. Retief Goosen, International, def. Tiger Woods, United States, 2 and 1. Kenny Perry, United States, def. Mark Hensby, International, 4 and 3. Fred Couples, United States, def. Vijay Singh, International, 1 up. Mike Weir, International, def. Scott Verplank, United States, 3 and 2. Jim Furyk, United States, def. Adam Scott, International, 3 and 2. Peter Lonard, International, def. Stewart Cink, United States, 3 and 2. Michael Campbell, International, def. TODAY'S PREP SPORTS VOLLEYBALL 6 p.m. Seven Rivers at Crystal River 7 p.m. South Sumter at Lecanto * - - Fred Funk, United States, 3 and 2. Davis Love Ill, United States, def. Nick O'Hern, International, 4 and 3. Phil Mickelson, United States, halved with Angel Cabrera, International Ctiris DiMarco, United States, def. Stuart Appleby, International, 1 up. AUTO RACING NASCAR Nextel MBNA RacePoints Dover 400 Results At Dover International Speedway Dover, Del. Lap length: I, acci- dent $110986 36 16 Scon Wmn,,er Dodge, 293, 'accident $70 900 '. 37 1251 Jeff Gordon. Chevrolet 9 1, a ,c id e r ,! t 111 5 11 38 39Tr,, Ra.nes Dodge. 283 acci- aenr I~:.2 650 39 133) Robby Gordon, Cnevroiet, 279, engine failure, $62,525. 40. (35) Kevin Lepage, Ford, 197;, acci- dent, $62,350. 41. (14) Sterling Marlin, Dodge 190, engine failure, $90,068. 42.' (41) Carl Long, Crevroleit 144, engine failure, $62,035. 43. (40) Stanton Barrett, Chevrolet, 8, accident, $61,886. Time of Race: 3 hours, 30 minutes, 41 seconds. Margin of Victory: 0.080 seconds. Caution Flags: 11 for 50 laps. Lead Changes: 15 among 7 drivers. Lap Leaders: R.Newman 1-30; J.Johnson 31-70; G.Biffle 71-75; J.Johnson 76-108; K.Busch 109; M.Waltrip' 110; K.Busch 111-177; GBiffle 178-186; K.Busch 187-203; E.Sadler 204-229; K.Busch 230-319; M.Martin 320; K.Busch 321-337; J.Johnson 338-370; M.Martin 371-376; J.Johnson 377-404. Top 10 in Points Standings 1. J.Johnson 5,362. 2. R.Wallace 5,355. 3. R.Newman 5,350. 4. M.Martin 5,341. 5. T.Stewart 5,339. 5. G.Biffle 5,339. 7. J.Mayfield 5,281. 8. C.Edwards 5,259. 9. M.Kenseth 5,238. 10. K.Busch 5,192. HOCKEY Sabres 3, Lightning 2 Buffalo 0 2 0 0 3 Tampa Bay 1 0 1 0 2 Buffalo won shootout 3-2 First Period-1, Tampa Bay, Artukhin 2 (Sydor, Helbling), 18:19 (pp). Second Period-2, Buffalo, Hecht 1 (Fitzpatrick), 12:49. 3, Buffalo, Vanek 5 (McKee, Gaustad), 18:08. Third Period-4, Tampa Bay, Artukhin 3 (Soucy), 19:40. Overtime-None. Shootout-Buffalo, Hecht scored decid- ing goal. Shots on goal-Buffalo 8-2-6-4-20. Tampa Bay 7-11-10-1-29. Goalies-Buffalo, Biron. Tampa Bay, Grahame. A-14,376. Copyrighted Material -- Syndicated Content Available from Commercial News Providers a - - = C - 0 - - .* - .. -- ft4. f *- am "W 41b- --ob. *w 41 N C-.0 m--ft ft-- 40-~ -.0 -.00 .11W - - -00 4D 0 - C a- ~- - 0 .40 0 C - -~ p - -~ ~ - .- -~ - SC.- C.-~ ~ - :2w- - -.~ -- ~.. - * C- a - OW - -e a - a ~0 S C - a l d-C-4b .. MN- . a~b- - am- ow - - - -a S C -C * * 0 5 C- ~ a = - 0w - 4.- -- U S C a, 4wC - I% q a - -Now a - 411b Sb- Pies ed b Citrus iC/i.un Hiom e Conmutinuu Eduii, ii .n October 1 8 a.m. to 2 p.m. Citrus County ,I Auditorium I ':' ,. US 41, Inverness *SOLATUDE. A. rcv(lutlonar v' iW way to think AM)out. installed in 2 hotirs 090-5 eOKWe *. - S - MONDAY, SEPTEMBER 26, 2005 3B SPOR:ToS --. -- f^.. ,~ WT'T \ umn/^T/ -f ,1 ' - --Nb * - - a - -W - qb- - * - 4bb 'law - o Q 4 NA" S PC)MONDACm>EPCOUNTYR(ZL),CHRONICL NFL SCOREBOARD AMERICAN CONFERENCE - -a - ~ * ~- - e a - - ~ 4- -W -0 Copyrighted Material ~0 - *. - S indicated Conten Available from Commercial News ",=.=- - -m __ ~ 71 - -Alba. ft .40 a 0 - -- e-o -m - - ~ - 0 -* ~ -- - Providers Pro viders '0 - oS - ~ -om -fm f - 40 NFL Late Fr hfts E 4m- qol dmq-- S - d ql wS .- -m 4- a 0.4 =.a &p 0 -0.4b On tm -% -now ObOS MP0 4b - dooms. 4on 40 op . qlm 4D .Mp aw 4D qp-q an -amam w- -m -l 4 do* _o"dim- -dm 0 m o- a m 0w 0 q0p w4b0 40 - -qm o - -adwqmgo 4 ____ apa nm so 41m GED M- 0 do. qa 0 q o'gw-a ft 41100 40.NM u .- 4 -No--- MW -11. .0NE -m 0aw lo- -a -, m 410 -=f M b AM- d 40 do b n ftom g Ow d- 01- AI AM 40w-___ ft, 0 -goft~ 0mM~P -cd Om- esi- Ab4'0 o a wsd Q-wwlmw am 1M-401 411D40domos-q M -qun04ip P lw mpo db ftdw 4 4111 bw- -ON Ma W- 40 a* D ba -U LAWN RENOVATION SPECIALISTS NEW CONSTRUCTION BLOW OUT 30* PER SQ. FT. FLORATAM SOD INSTALLED 5,000 SQ. FT. MINIMUM RE-SOD SPECIAL Services include Round-up, Removal of Old Sod and Installation of New Sod SOD SOLD BY THE PIECE (352) 795-6500 / 6834 W. Rich St. Crystal River Hwy 44 Corner of Hwy 44 & 486 ft 4 4D0 Nw ap a 4 do w -m . -w 4b 4*ftume*1 -oft 4m 4- d - .40 mm- Q 40"Im- 4- o0 4up-4- al.*- m ~"W -.p UI IL CHANGE & FILTERK I 22 Most Cars Frequent, Vital Engine /Most Cas Maintenance Includes NNZIL Refill Of Up To5 Quarts 49 Of Quality 10W-30 O/. i' NotJust OiPENZOL* WHEEL ALIGNMENT1 Most Cars.......... $39.95 Trucks & Vans ....$59.95 I 4 Wheel..............$5s995 I AlNIAdullblaAnglesi StTo Manulacturet'B Specifcation. ,No ,rl Char ForCaa Wiath Factory ATh Or TorsionBot I d-a 1 - quompw do__ dom m 00% m f a --q alb- a mw- 4w - -4w MW - quo- - w ROTATE & BALANCE WHEEL BALANCE For a smoother ride and longer tire wear. Plus we inspect tire tread, air pressure, and valve stems. Most Cars 2 4 COMPUTER DIAGNOSTIC Don't Know Why That Service Engine Light Is On? IComputer $ 95 I Scan I$ 1 Detroit Chicago Minnesota Green Bay St. Louis Seattle San Francisco Arizona East L T Pct PF PA 1 0 .667 68 51 1 0 .667 70 67 2 0 .333 41 50 2 0 .333 44 60 South L T Pct PF PA 0 01.000 47 16 1 0 .667 55 44 2 0 .333 59 75 2 0 .000 14 49 North L T Pct PF PA 0 01.000 88 28 1 0 .667 81 37 2 0 .333 45 64 2 0 .000 17 49 West L T Pct PF PA 0 01.000 50 24 1 0 .500 30 51 2 0 .000 41 48 HomeAway 2-0-00-1-0 1-0-01-1-0 1-1-00-1-0 1-1-00-1-0 HomeAway 2-0-01-0-0 1-0-01-1-0 1-0-00-2-0 0-1-00-1-0 HomeAway 1-0-02-0-0 1-1-0 1-0-0 0-1-01-1-0 0-1-00-1-0 HomeAway 1-0-0 1-0-0 1-0-00-1-0 0-1-00-1-0 Miami New England Buffalo N.Y Jets Indianapolis Jacksonville Tennessee Houston Cincinnati Pittsburgh Cleveland Baltimore Kansas City Denver San Diego Oakland N.Y. Giants Washington Dallas Philadelphia Tampa Bay Atlanta Carolina New Orleans L T Pct PF PA 0 01.000 '69 29 0 01.000 23 20 1 0 .667 75 69 1 0 .667 75 37 South L T Pct PF PA 0 01.000 60 32 1 0 .667 56 47 2 0 .333 71 67 2 0 .333 49 80 North L T Pct PF PA 1 0 .500 23 41 2 0 .333 52 39 2 0 .333 54 77 3 0 .000 43 60 West L T Pct PF PA 1 0 .667 73 67 1 0 .667 72 56 2 0 .333 62 101 3 0 .000 43 96 Sunday's Games Miami 27, Carolina 24 Atlanta 24, Buffalo 16 Cincinnati 24, Chicago 7 Indianapolis 13, Cleveland 6 St. Louis 31, Tennessee 27 Jacksonville 26, N.Y. Jets 20, OT Tampa Bay 17, Green Bay 16 Philadelphia 23, Oakland 20 Minnesota 33, New Orleans 16 Seattle 37, Arizona 12 Dallas 34, San Francisco 31 New England 23, Pittsburgh 20 N.Y. Giants at San Diego, 8:30 p.m. BYE: Baltimore, Detroit, Houston, Washington Monday's Game Kansas City at Denver, 9 p.m. Buccaneers 17, Packers 16 Tampa Bay 710 0 0-17 Green Bay 6 7 0 3- 16 First Quarter TB-Galloway 5 pass from Griese (Bryant kick), 5:08. GB-Ferguson 37 pass from Favre (kick failed), 2:06. Second Quarter TB-Galloway 10 pass from Griese (Bryant kick), 10:35. TB-FG Bryant 42, 6:48. GB-Chatman 20 pass from ,Favre (Longwell kick). 4:27. ,. FourthQua I aA-s B-FG Longwell 32, 7:18. " A-70,518. TB GB First downs 19 15 Total Net Yards 293 260 Rushes-yards 41-161 25-75 Passing 132 185 Punt Returns 2-23 3-23 Kickoff Returns 4-68 4-86 Interceptions Ret. 3-29 1-38 Comp-Att-Int 17-26-1 14-24-3 Sacked-Yards Lost 2-7 2-10 Punts 6-47.3 2-49.0 Fumbles-Lost 1-0 1-1 Penalties-Yards 8-103 8-65 Time of Possession 34:22 25:38 INDIVIDUAL STATISTICS RUSHING-Tampa Bay, Williams 37- 158, Pittman 1-3, Griese 3-0. Green Bay, Green 19-58, Chatman 1-10, Favre 1-7, Davenport 3-5, Henderson 1-(minus 5). * PASSING-Tampa Bay, Griese 17-26-1- 139. Green Bay, Favre 14-24-3-195. RECEIVING-Tampa Bay, Galloway 5- 53, Clayton 5-44, Hilliard 2-14, Cook 1-11, Becht 1-9, Alstott 1-4, A.Smith 1-4, Williams 1-0. Green Bay, Ferguson 4-68, Green 3-27, Driver 2-49, Chatman 2-37, Henderson 2-4, Martin 1-10. MISSED FIELD GOAL-Green Bay, Longwell 42 (WL). Dolphins 27, Panthers 24 Carolina 3 14 0 7-24 Miami 14 7 0 6-27 First Quarter Mia-Brown 1 run (Mare kick), 10:09. Car-FG Kasay 52, 7:11. Mia-McMichael 18 pass frorti Frerotte (Mare kick), 0:10. Second Quarter Car-S.Smith 1 pass from Delhomme (Kasay kick), 5:44. Mia-Chambers 42 pass from Frerotte (Mare kick), 3:39. Car-S.Smith 3 pass from Delhomme (Kasay kick), 0:54: Fourth Quarter Mia-FG Mare 27, 7:32. Car-S.Smith 53 pass from Delhomme (Kasay kick), 7:12. Mia-FG Mare 32, 0:04. A-72,288. Car Mia First downs 23 16 Total Net Yards 299 315 Rushes-yards 26-61 30-144 Passing 238 171 Punt Returns 3-17 1-4 Kickoff Returns 4-85 4-80 Interceptions Ret. 1-0 1-37 Comp-Att-Int 19-35-1 14-33-1 Sacked-Yards Lost 4-47 0-0 Punts 5-45.4 6-44.7 Fumbles-Lost 3-2 0-0 Penalties-Yards 4-39 13-138 Time of Possession 32:13 27:47 INDIVIDUAL STATISTICS RUSHING-Carolina, Davis 16-36, Foster 8-27, S.Smith 2-(minus 2). Miami, Brown 23-132, Morris 5-10, Welker 1-5, Frerotte 1-(minus 3). PASSING-Carolina, Delhomme 19-35- 1-285. Miami, Frerotte 14-33-1-171. RECEIVING-Carolina, S.Smith 11-170, Foster 3-48, Mangum 2-32, Davis 2-16, Proehl 1-19. Miami, Chambers 6-93, Brown 3-15, Booker 2-15, McMichael 1-18, Morris 1-18, Gilmore 1-12. MISSED FIELD GOALS-None. Jaguars 26, Jets 20 Jacksonville 3 7 3 7 6-26 N.Y. Jets 0 7 7 6 0-20 First Quarter Jac-FG Scobee 32, 4:37. Second Quarter Jac-Wilford 21 pass from Leftwich (Scobee kick), 5:50. NY-Sowell 1 run (Nugent kick), 1:51. Third Quarter NY-Reed 33 fumble return (Nugent kick), 12:17. Jac-FG Scobee 40, 5:05. Fourth Quarter Jac-Taylor 3 run (Scobee kick), 14:57. NY-FG Nugent 35, 9:43. NY-FG Nugent 25, 1:14. Overtime Jac-J.Smith 36 pass from Leftwich, 8:55. A-77,422. Jac NY HomeAway 1-0-01-0-0 1-0-0 1-0-0 0-1-02-0-0 2-0-00-1-0 HomeAway 1-0-02-0-0 1-0-01-1-0 1-1-00-1-0 0-1-0 1-1-0 HomeAway 1-0-00-1-0 1-1-00-1-0 1-1-00-1-0 0-2-00-1-0 HomeAway 1-0-01-1-0 2-0-00-1-0 1-1-00-1-0 0-1-00-2-0 Sunday, Oct. 2 - Buffalo vs. New Orleans at San Antonio, 1 p.m. St. Louis at N.Y. Giants, 1 p.m. Seattle at Washington, 1 p.m. ' Denver at Jacksonville, 1 p.m. Indianapolis at Tennessee, 1 p.m. Houston at Cincinnati, 1 p.m. Detroit at Tampa Bay, 1 p.m. San Diego at New England, 1 p.m. N.Y. Jets at Baltimore, 4:05 p.m. Minnesota at Atlanta, 4:15 p.m. Dallas at Oakland, 4:15 p.m. Philadelphia at Kansas City, 4:15 p.m. San Francisco vs. Arizona at Mexico City, 8:30 p.m. BYE: Chicago, Cleveland, Miani-,, Pittsburgh - Monday, Oct. 3 Green Bay at Carolina, 9 p.m. 01 First downs 16 1 Total Net Yards 308 168 Rushes-yards 47-139 25-89 Passing 169 74, Punt Returns 5-31 3-(-S) Kickoff Returns 4-93 3-75 Interceptions Ret. 2-9 1'0 Comp-Att-Int 16-24-1 11-22,1J Sacked-Yards Lost 2-8 4-1'' Punts 6-50.0 7-48.6- Fumbles-Lost 3-2 321 Penalties-Yards 9-85 6-44 Time of Possession 40:31 25:34 ,.INPIVID,UAL.STATISTICS . FUSHING-Ja.-.'iornrile Taylor 37-98- Pearrh',an4-22. Leftvcn ,2-.12 Gjones -7.. New York, Martin 18-67 Penninglon 3.15 Blaylock 6, Sowell 1-1. PASSING-Jacksonville, Leftwich 16- 23-1-177, M.Jones 0-1-0-0. New YorkN' Pennington 9-19-2-76, Fiedler 2-3-0-19. RECEIVING-Jacksonville, R.Williarqs 5-54, M.Jones 4-31, J.Smith 2-41, Wilforq 2-35, B.Jones 2-8, Pearman 1-8. NeW' York, Coles 4-17, Baker 3-45, Martin 2-, McCareins 1-16, Chrebet 1-13. MISSED FIELD GOALS-None. Colts 13, Browns 6 Cleveland 0 3 0 3 '6 Indianapolis 7 3 3 0 113 First Quarter j"'1 Ind-James 2 run (Vanderjagt kick), 4:11. Second Quarter Cle-FG Dawson 40, 13:13. Ind-FG Vanderjagt 20, 3:14. Third Quarter , Ind-FG Vanderjagt 23, 7:07. Fourth Quarter Cle-FG Dawson 22, 14:09. I" A-57,127. % Cle InQ First downs 14 29 Total Net Yards 263 33, Rushes-yards 23-75 33A 111 Passing 188 228: Punt Returns 1-12 2-1Bi Kickoff Returns 4-61 3-6t- Interceptions Ret. 1-0 0- Comp-Att-Int 22-29-0 19% 23-1 Sacked-Yards Lost 4-20 0- Punts 5-41.8 40.0 % Fumbles-Lost 1-0 1-f Penalties-Yards 7-62 3-1i Time of Possession 28:22 31:3k, INDIVIDUAL STATISTICS % RUSHING-Cleveland, Droughns 22-7Z Green 1-(minus 1). Indianapolis, Jameq, 27-108, Carthon 3-6, Manning 3-(minus 3) PASSING-Cleveland, Dilfer 22-29-07. 208. Indianapolis, Manning 19-23-1-228. RECEIVING-Cleveland, Bryant 7-75N Edwards 4-43, Droughns 3-32, F.JacksoI 2-29, Heiden 2-12, Suggs 2-7, Northcutt 1% 7, Green 1-3. Indianapolis, Wayne 6-971 Harrison 6-53, James 2-29, Fletcher 2-261 Clark 2-14, Stokley 1-9. ' MISSED FIELD GOALS-None. % Bengals 24, Bears 7 Cincinnati 10 0 7 7- 2k Chicago 0 0 0 7- First Quarter Cin-C.Johnson 18 pass from Palrni% (Graham kick), 13:46. Cin-FG Graham 33, 5:31. Third Quarter Cin-Henry 36 pass from Palmk. (Graham kick), 7:03. Fourth Quarter Chi-T.Jones 2 run (Brien kick), 13:30. Cin-C.Johnson 40 pass from Palm r (Graham kick), 11:56. ' A-62,045. Cin Cbi First downs 11 1p Total Net Yards 244 255 Rushes-yards 34-83 28-106 Passing 161 149 Punt Returns 3-17 4-12 Kickoff Returns 2-56 5-.8 Interceptions Ret. 5-2 0-0 Comp-Att-Int 16-23-0 17-39-S Sacked-Yards Lost 1-8 0-0 Punts 9-40.0 6-42. Fumbles-Lost 2-1 4 Penalties-Yards 9-77 7-8B Time of Possession 31:08 28:2 INDIVIDUAL STATISTICS RUSHING-Cincinnati, R.Johnson 24- 84, Perry 1-2, J.Johnson 1-1, C.Johns7n 1-(minus 1), Palmer 6-(minus 3). Chicago, T.Jones 27-106, Orton 1-0. PASSING-Cincinnati, Palmer 16-23-0- 169. Chicago, Orton 17-39-5-149. *' RECEIVING-Cincinnati, Henry 4-5(, C.Johnson 3-77, Perry 3-20, Houshmandzadeh 2-13, R.Johnson 2i (minus 2), Stewart 1-6, Schobel 1-4., Chicago, T.Jones 5-8, Muhammad 4-5_ Wade 4-47, Bradley 2-26, Peterson 1-7,,. Edwards 1-3. * MISSED FIELD GOALS-Chicago,, Brien 39 (WL). - - ~. ~ 3 0 .000 57 76 0-1-00-2-0 NATIONAL CONFERENCE East CiTRus CouNTY (FL) CHRoNiciE AIR mnNnAv qFp-rFMBFR 26. 2005 d SpolTrs AFC NFC Div 1-1-0 1-0-0 0-1-0" 2-0-0 0-1-0 0-0-CQ 1-0-0 0-2-0 0-0-0 -, 1-2-0 0-0-0 1-0-0 AFC NFC DIv-, 3-0-0 0-0-0 1-0-0q 1-1-0 1-0-0 0-1-0 1-1-0 0-1-0 0-0-0,, 0-2-0 0-0-0 0-0-0 AFC NFC Div,:-. 1-0-0 2-0-0 1-0-0 2-1-0 0-0-0 0-0-0' 0-2-0 1-0-0 0-1-0 0-2-0 0-0-0 0-0-0- ' AFC NFC Div,, 2-0-0 0-0-0 1-0-q- 1-1-0 0-0-0 1-0-0 0-1-0 0-1-0 0-1-0 0-2-0 0-1-0 0-1-0.' NFC AFC Div 2-0-0 0-0-0 0-0-0' 2-0-0 0-0-0 1-0-0,: 1-1-0 1-0-0 0-1-09. 1-1-0 1-0-0 0-0-0- NFC AFC Div - 2-0-0 1-0-0 0-0-4, C 1-1-0 1-0-0 0-0-0.' 0-1-0 1-1-0 0-1-0 1-2-0 0-0-0 1-0-0., NFC AFC Div'" 1-1-0 0-0-0 1-1-0." 1-1-0 0-1-0 1-0-0 1-1-0 0-1-0 0-0-0o- 0-2-0 0-1-0 0-1-0-. II. J NFC AFC Div 1-1-0 1-0-0 1-1-0 2-0-0 0-1-0 1-0-0 1-2-0 0-0-0 1-o-q. 0-3-0 0-0-0 0-2-0,,. -1 ictc cuwrr(F c MOEY EPEBR26 05 NFL SCOREBOARD Rams 31, Titans 27 Tennessee 10 0 14 3-27 St. Louis 017 7 7-31 First Quarter Ten-Troupe 16 pass from McNair (Bironas kick), 6:21. Ten-FG Bironas 41, 4:01. Second Quarter StL-Archuleta 85 interception return (Wilkins kick), 12:28. StL-FG Wilkins 46, 7:55. (tL-M.Faulk 13 pass from Bulger ilkins kick), 2:08. Third Quarter StL-Holt 32 pass from Bulger (Wilkins kick), 9:30. Ten-B.Jones 4 pass from McNair (Bironas kick), 3:22. Ten-Odom 25 fumble return (Bironas kick), 2:37. Fourth Quarter StL-Curtis 10 pass from Bulger (Wilkins kick), 14:54. . Ten-FG Bironas 39, 6:02...... .... A-65,835. I T n QIL First downs Total Net Yards Rushes-yards Passing Punt Returns Kickoff Returns Interceptions Ret. Comp-Att-Int Sacked-Yards Lost Punts Fumbles-Lost Penalties-Yards Time of Possession Ten 18 335 24-87 248 1-0 4-109 1-1 24-39-2 2-13 5-43.2 1-1 11-80 32:50 StOIL 22 360 21-101 259 1-1 4-94 2-109 21-28-1 4-33 4-42.5 4-3 11-75 27:10 INDIVIDUAL STATISTICS RUSHING-Tennessee, Brown 20-83, McNair 1-4, Henry 3-0. St. Louis, M.Faulk 6-50, S.Jackson 12-48, Bulger 3-3. PASSING-Tennessee, McNair 24-39-2- 261. St. Louis, Bulger 21-28-1-292. RECEIVING-Tennessee, Kinney 7-64, SBennett 6-96, B.Jones 5-40, Troupe 2-22, Brown 2-5, Calico 1-18, Henry 1-16. St. Louis, Holt 9-163, Curtis 5-56, M.Faulk 3- 31, Looker 2-25, Bruce 1-11, S.Jackson 1- 6., Falcons 24, Bills 16 Atlanta 7 10 0 7-24 Buffalo 310 3 0-16 First Quarter Buf-FG Lindell 36, 9:32. .At. Third Quarter Buf-FG Lindell 30, 10:10. Fourth Quarter Atl-Duckett 12 run (Peterson kick), 12:07. A-72,032. Atl Buf First downs 24 18 Total Net Yards 403 208 RUshes-yards 36-236 35-172 Passing 167 36 Punt Returns 2-14 2-24 Kickoff Returns 4-56 2-55 Interceptions Ret. 1-3 1-17 Comp-Att-Int 15-27-1 10-23-1 Sacked-Yards Lost 0-0 .4-39 Punts 4-36.0 3-47.0 Fujbles-Lost 1-1 1-1 Penalties-Yards 7-75 3-35 Trme of Possession 29:11 30:49 INDIVIDUAL STATISTICS rBUSHING-Atlanta, Dunn 15-97, Duckett 12-75, Vick 9-64. Buffalo, IrpGahee 27-140, Losman 5-20, Williams 2,11, J.Smith 1-1. ,PASSING-Atlanta, Vick 15-27-1-167. BEffalo, Losman 10-23-1-75. 4.ECEIVING-Atlanta, Finneran 4-57, Jenkins 4-48, Crumpler 3-35, Bjakley 2-11, Grffith 1-11 Dunn 1-5 Buffalo, Moulas 3- 18. Reed 2-24. Evans 2-7 A.ken 112, , Sielrton 1-8 J Smitn 1-6. , Vikings 33, Saints 16 New Orleans 0 6 3 7-16. Minnesota 17 7 0 9-33 First Quarter .l44in-Taylor 24 pass from Culpepper (linger kick), 14:47. "4in-FG Edinger 24, 7:18. ,Min-Taylor 13 .pass. from .Culpepper (Edinger kick), :33. Second Quarter Min-Williamson 53 pass from Oulpepper (Edinger kick), 5:37. : IJO-Conwell 13 pass from Brooks (pass failed), 1:54. i Third Quarter NO-FG Carney 22, 5:38. Fourth Quarter NO-McAllister 1 run (Carney kick), 11:40. Min-FG Edinger 28, 6:17. Min-FG Edinger 48, 4:29. Min-FG Edinger 34, 1:08. A-63,952. NO Min First downs 15 21 Total Net Yards 296 420 Rushes-yards 20-114 38-147 Passing 182 273 Punt Returns 3-9 3-8 Kickoff Returns 8-193 4-91 Interceptions Ret 0-0 2-2 Comp-Att-lnt 12-32-2 21-29-0 Sacked-Yards Lost 3-17 7-27 Punts 6-41.7 5-48.4 Fumbles-Lost 2-2 0-0 Penalties-Yards 14-84 8-60 Time of Possession 21:47 38:13 INDIVIDUAL STATISTICS RUSHING-New Orleans, McAllister 14- 63, Brooks 3-29, A. Smith 3-22. Minnesota, Moore 23-101, Culpepper 8-36, M.Williams 4-2, Bennett 2-4, K.Robinson 1-4. PASSING-New Orleans, Brooks 12-32- .2-199.-Minnesota;, Culpepper21-29-0-300: RECEIVING-New Orleans, McAllister 4-19, Henderson 3-95, Conwell 3-65, Horn 1-11, Poole 1-9. Minnesota, Wiggins 6-60, Williamson 3-83, Taylor 3-40, M.Williams 3-4, M.Robinson 2-80, Owens 2-18, Kleinsasser 1-12, Moore 1-3. MISSED FIELD GOAL-Minnesota, Edinger 33-. (WR).. Eagles 23, Raiders 20 Oakland 7 3 010- 20 Philadelphia 0 6 14 3- 23 First Quarter Oak-Jordan 8 pass from Collins (Janikowski kick), 12:22. Second Quarter Phi-Westbrook 18 run (kick blocked), 4:33. Oak-FG Janikowski 28, :49. Third Quarter Phi-Owens 4 pass from McNabb (Akers kick), 10:20. Phi-Westbrook 5 pass from McNabb (Akers kick), :45. Fourth Quarter Oak-FG Janikowski 26, 12:54. Oak-Gabriel 27 pass from Collins (Janikowski kick), 2:17. Phi-FG-Akers 23, :09. A-67,735. Oak Phi First downs 18 26 Total Net Yards 365 448 Rushes-yards 22-21 18-83 Passing 344 365 Punt Returns 5-17 3-17 Kickoff Returns 4-44 4-98 Interceptions Ret. 1-3 0-0 Comp-Att-Int 24-42-0 30-52-1 Sacked-Yards Lost 1-1 1-0 Punts 6-41.3 7-37.3 Fumbles-Lost 2-0 1-1 Penalties-Yards 13-94 10-81 Time of Possession 29:57 30:03 INDIVIDUAL STATISTICS RUSHING-Oakland, Jordan 16-19, Crockett 3-9, Fargas 1-2, Collins 1-(minus 1), Porter 1-(minus 8). Philadelphia, Westbrook 13-68, McNabb 3-8, Lewis 1-8, Gordon 1-(minus 1). PASSING-Oakland, Collins 24-42-0- 345. Philadelphia, McNabb 30-52-1-365. RECEIVING-Oakland, Anderson 5- 100, Moss 5-86, Jordan 5-53, Porter 5-40, Gabriel 2,-34, Whitted 2-31. Philadelphia, Owens 9-80, Westbrook 6-140, Lewis 6- 70, Smith 5-50, Gordon 3-19, Brown 1-6.. MISSED FIELD GOALS-Oakland, Janikowski 49 (WL), 37 (WL). Seahawks 37, Cardinals 12 Arizona 3 6 3 0--12 Seattle 7 3 1413-37 First Quarter Ari-FG Rackers 54, 9:46. Sea-Alexander 25 run (Brown- kick), 4:20. Second Quarter Ari-FG Rackers 39, 14:07. Sea-FG Brown 33, 6:43. Anr-FG Rackers 50 341 Third Quarter Sea-Alexander 1 run (Brown kick), 11 51 Sea-Alexander 1 run (Brown kick), 11:21. Ari-FG Rackers 39, 5:06. Fourth Quarter Sea-Alexander 1 run (Brown kick), 14:56. Sea-FG Bro*n 23, 8:50. -Sea-FG-Brown-47, 1:28- A--64,843. First downs ' Total Net Yards Rushes-yards Passing Punt Returns Kickoff Returns Interceptions Ret. Comp-Att-Int Sacked-Yards Lost Punts Arn 15. 266 21-90 176 2-16 8-142 0-0 18-36-1 3-26 5-48.6 Sea 29 447 37-163 284 4-14 2-57 1-17 21-32-0 0-0 4-36.3 Fumbles-Lost 2-1 0-0 Penalties-Yards 12-71 3-25 Time of Possession 26:31 33:29 INDIVIDUAL STATISTICS RUSHING-Arizona, Shipp 10-41, Boldin 2-18, Warner 1-13, McCown 1-10, Arrington 5-9, Fitzgerald 2-(minus 1). Seattle, Alexander 22-140, Strong 2-11, Weaver 2-8, Morris 11-4. PASSING-Arizona, McCown 10-23-1- 97, Warner 8-13-0-105. Seattle, Hasselbeck 20-31-0-242, Wallace 1-1-0- 42. RECEIVING-Arizona, Boldin 6-88, Fitzgerald 3-41, Lee 3-29, Shipp 2-16, B.Johnson 1-10, Bergen 1-9, Ayanbadejo 1-5, Arrington 1-4. Seattle, D.Jackson 8- 125, Engram 5-54, Stevens 3-34, Jurevicius 2-16, Warrick 1-42, Strong 1-8, Hannam 1-5. Cowboys 34, 49ers 31 Dallas 012 715-34 San Francisco 7 17 7 0- 31 S... .. First Quarter SF-Battle 15 pass from Rattay (Nedney kick), 3:29. Second Quarter Dal-Bledsoe 6 run (kick failed), 8:46. SF-Lloyd 89 pass from Rattay (Nedney kick), 7:43. SF-Parrish 34 interception return (Nedney kick), 6:42. Dal-Witten 6 pass from Bledsoe (pass failed), 3:33. SF-FG Nedney 20, :15. Third Quarter Dal-J.Jones 1 run (Cortez kick), 9:24. SF-Lloyd 13 pass from Rattay (Nedney kick), :40. Fourth Quarter Dal-J.Jones 1 run (Cortez kick), 14:51. Dal-K.Johnson 14 pass from Bledsoe (K.Johnson pass from Bledsoe), 1:51. A-68,247. First downs . Total Net Yards Rushes-yards Passing Punt Returns Kickoff Returns .Interceptions Ret. Comp-Att-Int Sacked-Yards Lost Punts Fumbles-Lost Penalties-Yards Time of Possession Dal 26 443 32-95 348 2-8 6-114 ...2-7 24-38-2 2-15 3-42.0 2-1 6-45 32:05 SF 19 390 25-124 266 1-10 5-94 2-34 21-34-2 2-3 5-39.8 2-1 8-67 27:55 INDIVIDUAL STATISTICS RUSHING-Dallas, J.Jones 26-85, Bledsoe 3-5, .Thompson 1-3, Polite 1-2, Crayton 1-0. San Francisco, Barlow 12-65, Gore 7-42, Rattay 4-21, Battle 2-(minus 4). PASSING-Dallas, Bledsoe 24-38-2- 363. San Francisco, Rattay 21-34-2-269. RECEIVING-Dallas, Witten 6-85, T.Glenn 5-137, K.Johnson 5-74, Crayton 4-39, J.Jones 4-28. San Francisco, Battle 6-68, Lloyd 4-142, Barlow 4-28, Morton 4- 19, Hetherington 1-7, Gore 1-5, TSmith 1- 0. Patriots 23, Steelers 20 New England 7 0 016- 23 Pittsburgh 10 0 3 7-20 First Quarter NE-Dillon 4 run (Vinatieri kick), 9:47. Pit-Ward 85 pass from Roethlisberger (Reed kick), 9:32. Pit-FO Reed 33, 4:42. Third Quarter Pit-FG Reed 24, 6:08. NE-FG Vinatieri 48, :14. Fourth Quarter NE-Dillon 7 run (Vinatieri kick), 10:37. NE-FG Vinatieri 35, 3:19. Pit-Ward 4 pass from Roethlisberger (Reed kick), 1:21. NE-FG Vinatieri 43, :01. A-64,868. NE Pit First downs 24 14 Total Net Yards 425 269 Rushes-yards 30-79 23-79 Passing 346 190 Punt Returns '4-55 3-20 Kickoff Returns .7",128 4-79 Interceptions Ret. 0-0 1-5 Comp-Att-Int 31-41-1 .12-28-0 Sacked-Yards Lost 3-26 4-26 Punts 4-45.0 6-44.2 Fumbles-Lost 3-2 1-1 Penalties-Yards 10-118 5-35 Time of Possession 35:23 24:37 INDIVIDUAL STATISTICS RUSHING-New England, Dillon 22-61, Faulk 7-13, Pass 1-5. Pittsburgh, Parker 17-55, Roethlisberger 3-17, Haynes.2-7, Wilson 1-0. PASSING-New England, Brady 31-41-1- 372. Pittsburgh, Roethlisberger 12-28-0-216. RECEIVING-New England, Givens 9- 130, Faulk 7-71, Branch 6-78, Brown 4-43, Dillon 2-23, Pass 1-14, Watson 1-10, Johnson 1-3. Pittsburgh, Ward 4-110, Randle El 2-56, Wilson 2-16, Haynes 1-18, Miller 1-13, Morgan 1-9, Parker 1-(minus 6). DoIim top Pantkme . 4D .- - - o ~, - - ~- - a 4b. 4b- d- .900-- 0 41b- - a 0 - S - a- -p * a a-- * ~ Sa-.. _-. Copyrighted Materia * -~ Syndicated Content S 0- - a ~ a -- 'a iI~ ~ -- a S - Available from Commercial News Providers _ ,.NOW - 0- ma--a - 0 a-a- 0.e a- -a - a- - - - ..~ -~ - 0. -. - a- a- - a-b - 4-1b 4D~0 - 4b 41-. 41b - -00. -Ema -- a-p - a- --O loomp -Nf .of 4a- 0- 10 *d a--q 0 -4 ..mm - o- o- * m.~ -a- a- waou fo .dm- ..m 41b f .f qhw a =0dip a- , -: Itt 0 .. t - -ow a a 4 b-S - b- - *0-map, dom0 400.. am a "MS a ..No a a db 40- -a41b -'"D ~ - ..090h. 411 - do a disk. - a- --4a -l lb- a- 4mM - -do a---- ---1 Prevue of Holiday Ideas Presented by Citrus Counmv Home Community Education I November 4-5 9 a.m. to 2 p.m.- ,Citrus County Canning Cente 3405 W. Southern Street off Rt. 44, Lecanto, Homemade crafts Food Raffle Bake Sale CIGil(QN For more information q please call Citrus County Extensions Office 527-5700 Nature Coast to show because of the high quality of their work. Expect to see Fine Art prints and paintings in acrylic, pastel, pen & ink, graphite & charcoal and watercolor. Stained and Fused Glass, Pottery, Unique Wooden B6ies, Lampwork Glass Beads, Pine Needle Baskets, Copper and Brass sculpture & Fountains, Nature, Wildlife & Digital Photography, Oil Paintings on wood, Gyotaku (animal printing on rice paper), Handcrafted jewelry in brass, copper, silver and pewter...and more. ..ON...R. Need more information, call 352-628-5222 W01 Let Us Be Your #1 Source of TOSHIBA Products! STOSHIBA Add Some Toshiba Style to your S home! Image is Everything 52H.1 4 CHECK US OUT FIRST HtD Moib,.' DLP Proict'o. Thevwim vAth H MW 'ALEN' OLP'Engire 51" Projection HDTV CHECK OtystalScan Ha HSs Wow 4-Iem I Sum 52 DLF -taind CHECK US OUT FIRST / 4IL.EN EPure '102 i MP14 Chi v illFui! 1280?0 Mpcsirrs wt1h 541WVias H 3PRS' WOW with 40-Watts Total wearn DVO/V-' Hcrin: .t CKUS OUT FIRST SirDiscDTbPw-141VH MI) 52mm Sv,,e. rn TitchS Sree., 0-zr svim Pr tW No Sive s-ar carryr'rsnW VOW(O I) MCAINI.Trck 1080;)w!UerUSetS~tctud 40~lp Oomby' igal, oibyiPro Logic'! 1, nd WS' Ioxt,-m 400 wars Taia System TOWC( 2Tunv PGys 2May Satedile SycawrSya~sted wthmim C r W s T' lant Uliversal tnn~e W! OVO Cnniro CHECK US OUT FIRV55H CHECKUSOUTFIRS' * Bill Montaltos, owner of Crown TV for over 40 years. Now in our 15th year in Citrus County, 8020 W Gulf to Lake Hwy., Crystal River 563-0034 Toll Free 1-877-652-3474 COAST RV MOBILE HOME SUPPLIES RVDefiling. Call Kafhy for info. Airport Plaza Crystal River 563-2099 Closed Mondays 'til further notice. SKIDMORE'S'4 Sports Supply OPEN 7 DAYS A WEEK 5 Blocks East of Hwy. 19 Crystal River 795-4033 s s MONDAY, SEPTEMBER 26, 2005 -SB SPoIrrs /Ri ) 1-149nPirrip . 6 . . o * . . 4b- dip 4ra- qpqmr dw - . U M VIONDAY, StEME 2 *L tc.---- .UU. .2. .... . MONDAY EVENING SEPTEMBER 26, 2005 A: Adelphia,Citrus B: Bright House D: Adelphia,Dunnellon I: Adelphia, Inglis A IBD I 6:00 6:30 7:00 7:30 8:00 8:30 9:00 9:30 10:00110:30 11:00 11:30 Fs U -19 19 19 News 249 NBCNews Ent. Tonight Access Surface (N) (In Stereo) Las Vegas'Fakethe Medium'The Song News Tonight tBC 19 1919Hollywood 'PG' 3355 Money and Run' '14' Remains the Same' '14' 6494881 Show (WED__ BBC World Business The NewsHour With Jim Antiques Roadshow Pop American Masters Archive footage of Bob Dylan's Eric Clapton: Sessions fo V 0 3 3 News 'G' Rpt. Lehrer 9B 1133 collectibles. 'G' 9751 childhood and life on the road. 'PG, L' U9 4828 Robert J 'G' 49539 FT BBC News Business The NewsHour With Jim Antiques Roadshow Pop American Masters Archive footage of Bob Dylan's Being Tavis Smiley S5 5 5 7591 Rpt. Lehrer (N) 62881 collectibles. 'G' 48201 childhood and life on the road. (N) 'PG, L' 58688 Served 41423 8WFLA News 3571 NBCNews Ent. Tonight Extra (N) Surface (N) (In Stereo) Las Vegas"Fake the Medium (N) (In Stereo) News Tonight NBC 8 8 8 8 'PG' [ 'PG' [ 71539 Money and Run' '1 4' BB 54862 5317404 Show WFTV News [9 ABC Wd Jeopardy! Wheel of Wife Swap NFL Football Kansas City Chiefs at Denver Broncos. From INVESCO Field at ABC G 20 20 20 20 5797 News 'G' N 9862 Fortune (N) 'Collins/Matlock 'PG, Mile High in Denver. (In Stereo Live) Z 615626 TSP 10 10 10 10 News 8249 CBS Wheel of Jeopardyl The King of How I Met Two and a Out of CS: Miami 'Blood in the News Late Show S 10 10 10 10 Evening Fortune (N) 'G' ]1713 Queens Halt Men Practice Water" (N) '14'93210 4595249 (wvf 1 News [l 73572 A Current The Bemie. Arrested Kitchen Prison Break (N) '14, News N 34046 M'A'S'H The Bemie FOX 13 13Affair 'PG' Mac Show Dev. Confid. DL.IV B 31959 'PG' 29626 Mac Show (wB CJB 1 News 47997 ABC WId Ent. Tonight Inside Wife Swap NFL Football Kansas City Chiefs-at Denver Broncos. From INVESCO Field at ABC I News Edition 'Collins/Matiock' 'PG, Mile High in Denver. (In Stereo Live) CC 437336 WCLF Richard and Lindsay Touch of Zola Levitt Gregory Possess the Life Today Manna-Fest The 700 Club 'PG' [c Pentecostal Revival Hour N 1 2 2 22 2 Roberts G' 2382930 Fire Presents Dickow 'G' 'G' 8117510 'G' 9235171 4066133 wFTns 11 News 25713 ABCWId Inside The Insider Wife Swap NFL Football Kansas City Chiefs at Denver Broncos. From INVESCO Field at ABC 11 11 News Edition 12249 'Collins/Matiock" 'PG, Mile High in Denver. (In Stereo Live) B9 503978 WMOR Will & Grace Just Shoot Will & Grace Access Movie: "After the Storm" (2001, Adventure) Fear Factor 'Favorite Access Cheaters IND 12 12 12 12 '14,D' Me 'PG' 'PG' Hollywood Armand Assante, Jennifer Beals. 'PG' 9 73539 Winners' 'PG' BB 52046 Hollywood 'PG'35065 WTTA Seinield Every- Every- Sex and the 7th Heaven 'Home Run" Just Legal 'The Runner" News Yes, Dear Seinfeld Sex and the IPiD S 6 6 6 6 'PG' Raymond Raymond. City'14, 'G' [ 6035201 (N) 'PG' c 6055065 3019220 'PG, L' 'PG' City'14, WTOG' E 4 1 The Malcolm in The Friends'14' One on One All of Us B] Girlfriends Half & Half The King of The King of South Park South Park IND 4 4 4 4 Simpsons the Middle Simpsons 9 6607 2978 4713 (N) 15423 (N) 83959 Queens Queens '14' 27268 '14'24355 WYKE 16 16 16 ANN News CCTV 93317 County Few Let's Talk Golf 79713 We Have Rock It TV Janet Parshall's America! Connect ANN News ~ 16 16 16 16 85715 Court Minutes Issues 25539 69336 Zone 42355 WOGX Friends'14' Friends'PG'King of the The Arrested Kitchen Prison Break (N) '14, News (In Stereo) 9[ A Current Home POX 13 13 g5775 9 9355 Hill 'PG' Simpsons Dev. Confid. DL,V' [ 43779 93256 Affair (N) Improvemen m Variety 9959 The 700 Club 'PG' [ Pastor Dr. Dave Possessing This Is Your R. Praise the Lord cR 44997 IND 21- 21 21 I540143 Loren 2423 Martin the Day 'G' Scarboroug_ (WIEA) 15 15 15 15 Noticias 62 Noticiero Inocente deTi764713 Contra Viento y Marea La Esposa Virgen 760997 Cristina Una hora con Noticias 62 Noticiero UNI 15 15 15 412713 Univisn 740133 Chavanne.763084 134846 Univisi6n (WRXP-X Shop Til On the Pyramid 'G' Family Feud Doc The clinic helps an Diagnosis Murder (In Early Edition "Psychic' (In It's a Backpn PAX 17 You Drop Cover 'G' 51626 'PG' African village. 'PG' 99539 Stereo Stereo) PG''PG' c 72862 Miracle 'G' Brktlrh o 54 54 City Confidential 'PG' ] Cold Case Files 'PG' Bullied to Death 'PG' Growing Up Growing Up Airline (N) Airline 'PG, Crossing Jordan (In I ) 54 48 54 54 925336 672607 681355 Gotti 'PG' Gotti 'PG, L' 'PG, L' IL' 294978 Stereo) '14' cc 261775 AMC 5 6 55 Movie: ** "Fletch" (1985, Comedy) Chevy Movie: *** "National Lampoon's Animal Movie: **, "The Naked Gun 2 "Animal 55 64 55 55Chase, Joe Don Baker. c 640242 House" (1978) John Belushi. 515797 1/2: The Smell of Fear" 4401713 House" 5213 2 52 c ,The Crocodile Hunter 'G' The Most Extreme Lethal Wild Down Under (N) 'G' Zoo Babies 'G' cc Animal Precinct "Terrier Wild Down Under 'G' IIJ 52 35 02 5 ] 9 2391688 injections. 'G' 9205930 9221978 19234442 Rescue" 'PG' 9204201 4068591 RAVO 77 All-Star Reality Reunion The West Wing 'Han' Movie: ** "Apollo 13" (1995, Drama) Tom Hanks, Bill Paxton. Based Movie: * __ U___ 77 'PG' 2 932152 'PG' a 580713 on the true story of the ill-fated 1970 moon mission. 404336 "Apollo 13" 495688 S27 2 0 7 Movie: * "A Mighty Wind" (2003, Comedy) Daily Show David Green South Park Blue Collar Blue Collar. Daily Show Daily Show (CC. 27 61 27 2 Bob Balaban. c9 63152 Spade Screen 'MA, L' TV '14 DL' TV '14, D' C1 S a45 98C 98 o CMT Music 11336 Dukes of Hazzard 'PG' Wynonna: Her Story Crossroads"Heart & Gretchen Wilson Dukes of Hazzard 'PG' (____ 98 45 98 98 68607 77355 Wynonna" 57591 J Undressed 67978 73713 Dr. 90210 New begin- E! News (N) El News Brooke Shields: The El. It's So Over: 50 Biggest Celebrity Break-UpsI 745688 High Price of Fame V) 95 60 60 nings. '14' 685620 'PG' 766046 'PG' 494317 True Hollywood Story "_Tempted" '14' 348959 .... 9 One-Hearts Catholic- Daily Mass: Our Lady of The Journey Home 'G' Super The oly Abundant Life 'G' The World Over 1752336 g(EWT)) 96 65 96 96'England the Angels 6067751 4067571 Saints Rosary ,7417292 F 29 52 2912 7th Heaven "'Dropping Smallville'Reduix (In Beautiful People "Blow Beautiful People "Photo Whose Whose The 700 Club 'PG' [ -29 52 29 29 Trou' 'G' 9c114268 Stereo) 'PG' c 755539 Up' c 731959 Finish" 744423 Line? Line? 443317 30 60 30 130 1 King of the King of the That'70s That'70s Movie: * "Tears of the Sun" (2003) Bruce Willis, Monica Bellucci. Movie: "Tears of "3 0 30 3 Hill 'PG Hill 'PG, Show 'PG, Show 'PG, Commandos lead a doctor and African refugees to safety. 1278881 the Sun" 1269133 FHG-V 23 57 23 23 Weekend Landscaper Curb Appeal House Todd Landscape Generation Designed to Debbie Travis' Facelift (In Design on a Painted ______ 2 5" 2_ Warriors 'G' s 'G' Hunters Oldham Smart Renovation Sell Stereo) 3980201 Dime 'G' House .I T 51,25 51 51 The Last Days of WWII Modem Marvels UFO Files'The Day After Decoding the Past Jesus' Weird U.S. "Fact or Ancient Discoveries ,,,lJ_ .. .1 2 51 1 'PG' ] 4741510 'Bulletproof 'G' 4362323 Roswell' 'PG' 2362143 return. 'PG' 8962387 Fiction' 'PG' c] 5712864 2I4\ 38 24 24 Golden Girls Will & Grace Movie: "Dirty Little Secret" (1998) Tracey Movie: "Forbidden Secrets" (2005) Kristy Will & Grace How Clean 24 38 24 24 'PG' Gold. Jack Wagner. 'PG, LV 9 (DVS) 450607 Swanson, David Keeley. Premiere. c 730220 'PG, S' ICK 283 ,c 8 All Grown Danny Fairly Jimmy SpongeBob Zoey 101 Full House IFresh Fresh The Cosby Roseanne Roseanne ,II 2 __ __ ZU__ Up 'Y' Phantom Oddparents Neutron 'Y7' 680591 'G' 958539 Prince Prince Show 'G' 'PG' 953084 'PG' 541423 C I ,31 59 3.1 ,31 Stargate SG-1 'Learning The Dead Zone "The The Dead Zone 'Double The Dead Zone (In The Dead Zone Battlestar Galactica _"_ 31 59 31... Curve' 'PG' 5867423 Collector PG' 6672317 Vision" 'PG' 6681065 Stereo) 'PG' 9 6661201 'Vanguard' 'PG' 9 "'Pegasus" 'PG' 9474510 -P- ,37 43 3 7 37 World's Wildest Police CSI: Crime Scene CSI: Crime Scene WWE Monday Night Raw (In Stereo Live) '14, D,L,V The Ultimate Fighter (In SPIK 37 Videos 'PG' cc 398794 Investigation '14, L,V Investigation '14'338715 [9 8902305 Stereo) 41793539 49 23 49 49 Seinfeld Seinfeld Every- Every- Friends'PG' Friends 'PG' Friends'14, Friends 'PG' Family Guy Family Guy Movie: *k* "Blade" 4 'PG' 869171 'PG'850423 Raymond Raymond 111046 123881 D'581881 573997 '14, D,L,S' '14, D,L,S,V (1998) 600864 T(CM1.. 53 Movie: *r* "The Trouble With Harry" (1955, Movie: "Phantom Lady" Movie: *** "The Prizefighter and the Lady" "Green ____ Comedy) Edmund Gwenn. 9 30288201 (1944) cc 3843591 (1933, Comedy) Myma Loy. 2c 5547084 Years" f 53 34 I 3 53 Real Miami Cops 'PG' ] The World's Most Monster House (N) 'PG, Monster Garage 'PG' American Chopper (N) To Be Announced 276607 5_ 3 3. J J 3 O5 930268 gDangerous Car Chases L' 663959 676423 'PG' 9 679510, (T 50 46 50 50 Martha 9c 383862 Incredible Medical Trauma 939853 Untold Stories of the E.R. Two Headed Baby 'PG' Trauma 629201 Mysteries '14, S' 717633 'PG' 9 633387 483864 4T T 48 33 48 48 Alias 'Authorized Law & Order "Refuge" Law & Order "'Refuge" Law & Order "'Veteran's Law & Order "Mammon" Without a Trace "The Personnel Only' '14, S,V '14', 9 (DVS) 833305 '14' 9S (DVS) 833125 Day '14' 433369 '14' 283848 Bus" 'PG' g 650171 fTA 9 54 9 9 Grand Canyon: Nature's Fort Knox & USS World's Best Ancient Strand- Stranded- Anthony Bourdain 'PG' World's Best Ancient ,__ Great Escape 'PG' Washington 'PG' 3990688 Cultures 'PG' 3009336 Peters Cash 3999959 Cultures 'PG' 2226065 UIS 47 32 47 47 Movie: *** "Dirty Law & Order: Special Law & Order: Criminal Movie: *** "Carlito's Way" (1993, Drama) Al Pacino, Sean Penn. An ex- 4732 Harry"832152 Victims Unit '14 216065 Intent '14' 9 225713 con finds it hard to escape his former life of crime. BM 402684 18 18 18 18 Home Home America's Funniest Home Movie: ** "Split Decisions" (1988, Drama) WGN News at Nine (In Sex and the Becker'PG, S Improvemen Improvemen Videos 'PG, L' 584539 Gene Hackman. Craig Sheffer. 564775 Stereo) 576510 City '14. L' 549591 MONDAY EVENING SEPTEMBER 26, 2005 A: Adelphia,Citrus B: Bright House D: Adelphia,Dunnellon I: Adelphia, Inglis A B D -6:00 6:30 7:00 7:30 8:00 8:30 9:00 9:30 10:00 10:30 11:00 11:30 4640A 46 46 Sister, Philofthe That'sSo That'saSo Movie: ** "Lilo & Stitch" (2002, Comedy) Naturally Sister, That'sSo That's So __ _) 46 4 -46 46 Sister 'G' Future 'G' Raven 'G' Raven 'G' Voices of Daveigh Chase. cc 579607 Sadie 'Y7' Sister 'G' Raven 'G' Raven 'G' ..... 6 :. M'A'S'H M A*S*H Walker, Texas Ranger Walker, Texas Ranger Movie: ** "Perry Mason: The Case of the M'A*'SH M'A'S'H ,,, 6 8 \ 'PG' 'PG', i 'PG, V 9 9238268 'PG, V' 9214688 Maligned Mobster' (1991) Paul Anka 'PG' 9217775 'PG' 'PG' H B Making I Movie:. ** "Shark Tale" (2004) Movie: **- "Men in Black" Like Heaven Movie: **' "I, Robot" (2004) Will Smith, Bridget Robot Voices of Will Smith. 346930 (1997) Tommy Lee Jones. 1288046 1Moynahan. (In Stereo) B9 312713 MAX Movie: ***9 "Witness" (1985) Harrison Ford, Movie: ** "Flight of the Phoenix" (2004, Movie: "Ghost Ship" (2002, "Spiderbab Kelly McGillis. (In Stereo) B9 70664336 Adventure) Dennis Quaid. 20 740607 Horror) Julianna Margulies. 796046 e" 9 - fMW, 97 66 97 The Real The Real Direct Effect (In Stereo) Laguna Laguna Laguna Laguna Laguna My Super Punk'd 'PG, Punk'd 'PG, [T 97 66 97 97 World '14' World '14' 'PG'746881. Beach Beach Beach Beach Beach Sweet 16 L' 216274 L' 718133 NC 71 Mega-Weather World's Best Implosions Monsters of the Deep 'G' Naked Science "Angry Mega-Weather 'G' Monsters of the Deep 'G' 71 'Megalightning' 'G' 'G' 3350268 3336688 Skies" 'G' 3349152 3359539 1211404 2 Movie: ** "For Love of Ivy" (1968) Sidney Movie: * "Reunion at Fairborough" (1985) Movie: ** "Relative Values" "Mother, SPoitier, Abbey Lincoln. B! 38332201 Robert Mitchum, Deborah Kerr. 'PG' 4222591 (2000) Julie Andrews. 9 4887404 May I" C ,nBC 43 42 43 43 Mad Money 4937442 I Hurricane Katrina: Crisis Late Night With Conan Mad Money 8936341 The Big Idea With Donny The Apprentice: Martha 3 and Recovery O'Brien '14' 8831797 Deutsch Stewart 'PG' 8046959 .C/N 40 29 40 40 Lou Dobbs Tonight [i Anderson Cooper 360 9B Paula Zahn Now 9 Larry King Live 9[ NewsNight With Aaron Lou Dobbs Tonight 574626 221997 207317 210881 Brown %C 220268 829713 S25 55 25 25 o NYPD Blue "Girl Talk" '14' Cops '14, Cops 'PG, The Investigators '14' Forensic North Psychic Psychic Al Roker Investigates __. ... 55 .5 [25 4922510 D,L,S' L,V' 8364075 Files'14' Mission Detectives Detectives A 39 50 39 39 House of Representatives (Live) 94084 Tonight From Washington 961978 Capital News Today I .. .1945930 44 37 44 44 Special Report (Live) BB The Fox Report With The O'Reilly Factor (Live) Hannity & Colmes (Live) On the Record With The O'Reilly Factor 443 44 44 5852591 Shepard Smith XB C9 6676133 CC 6696997 Greta Van Susteren 9476978 M 42 41 42 42 The Abrams Report .(Hardball c9 6670959 Countdown With Keith Rita Cosby Live & Direct Scarborough Country The Situation With Tucker 5865065 Olbermann 6689607 6692171 6662930 Carlson fESH 33 27 33 33 SportsCenter (Live) 2] 212143 Monday Night Countdown (Live) 9[ Figure Skating State Farm U.S. Championships. From Portland, Ore. 9 .... ... J 1293220 851794 2 3 OA 4ESPN Quite Frankl With NFL Films 2005 Monster Shark Billiards: Florida Classic Billiards: Florida Classic Billiards: 2005 WPBA SESPNj2 34 28 34 34 Hollywood Stephen A. mith Presents Tournament 3992046 Semifinal Semifinal Florida Classic Final 3 39 35 -5 Totally Marlins on MLB Baseball Washington Nationals at Florida Marlins. From Dolphins Stadium Best Damn Sports Show Nothin' But Best-Sports FSNRE 35 3 35 T Football Deck (Live) in Miami. (Live) 310423 Period 103688 Knockouts N 36 31 Ship Shape Inside the Sports Talk Live (Live) Road to the Stanley Cup 2004 Stanley Cup Finals Football Wrap 87794 Sports Talk Live 93539 I.I..31 I TV 'G' Lightning 88423 Game 7. 75959 ____=____= Local RADIO WJUF-FM 90.1 WHGN-FM 91.9 WXCy-FM 95.3 WXOF-FM 96.3 National Public Radio Religious Adult Contemporary Adult Mix J'AiLJ~E~d WRGO-FM 102.7 WIFL-FM 104.3 WGUL-FM 106.3 WRZN-AM 720 - & & a a Oldies Adult Mix Oldies Adult Standards' -- i '9 lb.4 a. * * * ,~ -~ a Alm- a 9~9999.9999 a a asa a a a .aa e, p ~ *' ~- 0 0 ~- .3 - 'e a a S --a 0 0 -'- 'a '7~ C F * a S - a ~.a a ~' 0 0 a - - a a- b =MOD 41.- a - 4D- .1. - -'a --a -.a a-a .- a a .- ~- -a . a a'~ a- - -- a n - a ~ a - ~. a. _____ a - a S - - -a a - - 'a 0 - he PlusCode number gram is for use with th tem. If you have a VC ture (identified by the VCR all you need to do to reco printed next to each pro- PlusCode number, cable channels with the g he Gemstar VCR Plus+ sys- If you have cable service, please make sure that the convenient chart pri ;R with the VCR Plus+ fea- your cable channel numbers are the same as the procedure is described Plus+ logo on your VCR), channel numbers in this guide. If not, you will need to Should you have question rd a program is enter its perform a simple one-time procedure to match up the tern, please contact your The channel lineup for LB Cable customers is in the Sunday Viewfinder on page 70. guide channel numbers using nted in the Viewfinder. This in 'your VCR user's manual. is about your VCR Plus+ sys- VCR manufacturer. .cmv I U ea m d .... -%.-y-g-te M ate r:--- ;- Copyrighted Material - Ql- -- I r. Syndicated Content B a@ 6 , *Available from Commercial News Providers -~~N Op- ~~ a- aw me - 8a - - '~- - a- -p a -o - - a - a. -. 5- a ~ .~. -~ - - w -. . -a - 1 v - - n-s- 4M t '- d 0' 0 0 0 0 * * * * I 0 0 iT~ a * Q I * I " w- Ah 77 1 CiTRus CouN7-Y (FL) Cm!N.Icu EN'F]F-]FtTAJINMIF-NT AR xA --- q..,mnvu ?.i,, ?nns * * . WUc r k(ri CTunnuivMB 2 - .- * - . ee 'I ~~j~ga~4*.ai.eq a * e . ~ S 10 0 t 4 * . .w '~;164. -mww Von . Copyrighted Material .- ..; Syndicated Content ._ S Available fromCommercial News Providers R~fe~feasarf~a-: 4 a 4mb w P 4mo-map e 0 w 64, - S. ~ S t*~ t1. me 1 S I S.7'- p. 2 .~ - "Po w. v - A 4wvP. S 4w -Mo 44P. 4'W 4b T 0 v 'Imb IU ~WI - P- 4b0d wpm daa Aw ot 4 ~ 1 .. -0 1. doom.me th iwwT P.4 9 - Today's MOVIES Today's HOROSCOPE Citrus Cinemas 6 Inverness Box Office 637-3377 "Lord of War" (R) 1 p.m., 4 p.m., 7 p.m. "Just Like Heaven" (PG-13) 1:20 p.m., 4:20 p.m., 7:30 p.m. "Exorcism of Emily Rose" (OG,.13) 12:50 p.m., 3:50 p.m.,, 710 p.m. "40-Year-Old Virgin" (R) 1:05 p.m., 4:05 p.m., 7:05 p.m. "Flight Plan" (PG-13) 1:15 p.m., 4:15 p.m., 7:20 p.m. .,"Corpse Bride" (PG) 12:45 p.m., 2:50 p.m., 5 p.m., 7:40 p.m. Crystal River Mail. Digital. Visit for area movie listings and entertainment information. I .& 0 A Times subject to change; call ahead. Your Birthday: Chances are you will devote much energy in the year ahead to building upon the financial base you already have going for you. Stick to what you know best. 4 Libra (Sept. 23-Oct. 23) When it comes to non- related business involvements with associates today, don't feel that you are obligated to pay for their share of the expenses. Let each ante up their part. Scorpio (Oct. 24-Nov. 22) Big ambitions can be fulfilled today but only if you get started working on them as early as possible. Don't waste time. Sagittarius (Nov. 23-Dec. 21) Today in your deal- ings with a friend you may have to give more than you're likely to receive. If there's a good reason for it, fine, but let it be known you expect to be repaid later. Capricorn (Dec. 22-Jan. 19) Conditions early in the day should run like clockwork, but as time ticks on and people get a bit tired, they could also become a bit unreasonable. Don't wait to formulate agreements. Aquarius (Jan. 20-Feb. 19) Rely upon your own intellect and abilities today rather than on Lady Luck or promises made to -you by others. If you are self-suffi- cient, you aren't apt to experience letdowns or failures. Pisces (Feb. 20-March 20) Regardless of how good or clever your ideas are today, they aren't likely to count for anything unless you are fully prepared to put them in action. Be both a thinker and a doer. Aries (March 21-April 19) In order to succeed today, it is important that you are able to distinguish between optimistic judgments and wishful thinking. Taurus (April 20-May 20) Much can be accom- plished today provided you get your juices flowing by getting off to an early start. Gemini (May 21-June 20) This is one of those days where you might be better at managing things for others than you will be at handling your own affairs. Cancer (June 21 -July 22) It's good that you have such lofty desires for you and your family, but don't pur- chase things at the expense of your budget. Keep your checkbook in balance by being consistently prudent. Leo (July 23-Aug. 22) You're usually pretty ingenious about getting yourself out of tight scrapes, but today you might let your guard down and get caught up in a fracas. Virgo (Aug. 23-Sept. 22) You'll receive the returns you desire today from keeping your nose to the grindstone and making a good impression. Become lax with either one and your luck will fly out the window. - - * -maw * * 6 I I ~'- a * T 4doft W * "RO 41 *4 4D 4 wp .4.'. I / * S I amp*JY~,. 4w * MONDAY. SEPTEMBER 26, 2005 7B 47R S COUNTY (FL) C E U rIZ COMtICS I W dw h mown, .0 P Cx~ssIFIEDs CITRUS CoUNIY (FL~ CHRONICLE SB MONDAY, SEPTEMBER 26, 2005. 342 o .- Fi SC P. .Mo.- Fri. 83 a .- 2 AA -00.-be S- a *gg- S I II 563-5966 726-1.4................. 1 pm Friday 6 Lines for 10 Days! 2 items totaling '1 150...................550 '151 -'400............ 1050 M401 -CA O ICE 02-65HEPANTD15-6 I ANC AL 8-9 EVCS2116A NIA LS 00- 15 OBLEHOMSFO*EN RSAE50 4 r ARE YOU A WF? .FREE JENNAIRE COOK TOP Slender 30/501 am 53 Works fine successful & handsome WM. let's talk 476-8657 (352) 382-3322 FREE NEW GUY IN TOWN Kittens Black male,50yrs old (352) 447-4009 6'5" Looking for serious Free Puppy, 7 mos. old, relationship. ULives in housebroken, mix' Beverly Hills, Looking for breed, male, red w/blk female companion spots. Eve. 563-1905- S35-47yrs old Race unimportant. FREE REMOVAL OF Enjoys swimming, boat- Mowers, motorcycles, [ ing, movies and more. Cars. ATV's, jetski's. Call (352) 746-1659 3 wheelers, 628-2084 or 1-310-989-1473 FREE TO GOOD HOME 4-yr old Boxer mix, PLAY TENNIS LADIES? beautiful brindle SWM, 52, college grad, coloring, excellent slim, NS, seeks lively lady temperament, house for singles-doubles trained, spayed & tennis in evening. Fall current on all shots. hiking- -ii-rr.g trip: a::. Need a home by Wed. Friendship first then ? 9/28, must see Richard (352) 726-6243 (352) 726-0663 or (352) 344-9093 SWM, 5'10", 170 lbs. FULLBLOODED RED looking for white MALE PITBULL PUPPY female, slim,- with gold eyes 65+ or younger. (352) 795-0351 SLeave message (352) 726-4497 KATRINA CATS. Rescued by Humane ------ Society of Inverness. Available at Elleen's ""Foster Care (352) 341-4125 FREE SERVICEw** KEN BELL Cars/Trucks/Metal 352-302-6813 Removed FREE. No title OK 352-476-4392 Andy Tax Deduclible Receiot . Automatic Coarwash You disasemble (352) 621-1944 CAT LOVERS ONLY 3 male cats, 1 Maine Coon, 2 blk. & whts. (352)563-5415 .A Free Home Warranty COMMUNITY SERVICE forBuyers & Sellers The Path Shelter Is No Transaction Fee; available for people kntelL: who need to serve cenlur21.com their community service. (352) 527-6500 or -, - (352) 794-0001 NATURE COAST - Leave Message 352-302-6813 FREE KITTENS FREE Book shelf Wall unit. TO GOOD HOMES (352) 302-6931 (352) 697-2446 KITTENS PURRFECT PETS FREE GROUP spayed, neutered, COUNSELING ready for permanent Depression/ Anxiety loving homes. Available (352) 637-3196 or at Eileen's Foster Care 628-3831 (352) 341-4125 L VOLUNTEERS For caring, helping, repairing & maintenance for animals, One person only. Possible room & board. Community Services possible without room & board, cifr 1 1 -,am LOST AMERICAN PIT Black & white and Brown red nose Pit. Vicinity: Scofield & Charles, Inverness Family really misses 3 PUPPIES FOUND In mini farm area. Call to identify. (352) 564-0764 = Anoneet *CHRONICLE* INV. OFFICE 106 W. MAIN ST. Courthouse Sq. next to Angelo's Pizzeria Mon-Frl 8:30a-5p Closed for Lunch REAL ESTATE CAREER Sales Lib. Class $249. Now enrolling 10/25/05 CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060. ATTRACTIVE SWF 'eeL,'ina mle , c .in p ori:.r, Candi, 352-628-1036 IN HOME HEALTH AID for prominent Prince- ton, NJ gentleman, relocating to FLA, seeking similar pos, 17 yrs. exp. w/ mental & physical diss. Ref.avail. (215) 262-1042 INFANT TO TODDLER SExp. & fulltime day care. My Inv. home. JOBS GALORE!!! EMPLOYMENT.NET LOOKING FOR SELF MOTIVATED & ENERGETIC LIC. INSURANCE AGENT Salary & high commis- sion, (352) 427-6914 WEEKEND RECEPTIONIST 10-6 Fun, positive person needed. Tasks include: customer relation, multi-line phone system and data entry. Dependability a must. Please come see us at: Arbor rail 611 Turner camp Rd Inverness, Fl EOE Regal Nails Now hiring nail tech. Commission 60/40. Contact Dustin Lee at (352) 860-2911 $$$$$$$$ SIGN-ON BONUS NEW OPPORTUNITIES PAY SCALE & BONUSES LPN's FT/PT 5AM-i1:30PM PT 1:30PM-10:15PM For ALF. Benefits after 60 days Vacation After Jan 1st. Apply In Person: Brentwood Retirement Community Commons Build. 1900 W. Alpha Ct. Lecanto 352-746-6611 DFWP/EOE Come visit Crystal River Wildlife ,. Refuge and help us celebrate National Wildlife Refuge Week. Saturday, October 15 10 a.m. 4p.m. Crystal River National Wildlife Refuge ,(next to Port Paradise Resort) Cherokee Indian blessing ceremony 9:30 a.m. 1502 S.E. Kings Bay Drive, Crystal River Fl 563-2088 Sponsored by: Friends of the Clit.~wdulivi.Li National Wtilllic Iefitge Cotnplex (A 9 era I v0u0, 'i "E l 98.5 KTK Sky 97.3 FM Iron - I I e-% .7-1 $$$$$$$$ SIGN-ON BONUS NEW OPPORTUNITIES PAY SCALE & BONUSES CNA's FT/PT 2:45PM- 11:15PM LICENSED MED TECHS FT/PT 6AM- 1:30PM FT/PT 2:45PM-1 1:15PM For ALF. Benefits after 60 days Vacation After Jan 1st. Apply In Person: Brentwood Retirement Community Commons Build. 1900 W. Alpha Ct. Lecanto 352-746-6611 DFWP/EOE CDM Join an exciting team. We now have an opening for a Certified Dietary Manager with minimum of 2 years experience in LTC. We are a 116 Bed ,:.ie 1 L.a ; J i:ul level a must. : Excellent salary and benefits. Apply in person or fax resume Arbor Trail Rehab 611 Turner Camp Rd Inverness EOE Fox: 352-637-1921 COOK Part-Time Weekends Day Shift Experienced preferred Apply in person Arbor Trail Rehab 611 Turner Camp Rd Inverness EOE DENTAL ASSISTANT F/T, Busy practice, experienced only to work with different Dr's. Exc. benefit package (352) 726-5854, ask for Elizabeth DENTAL ASSISTANT Quality dental practice In Dunnellon needs experienced F/T dental assistant, excellent pay & benefits. Must be a team player, Fax Resumes to: (352) 331-0439 FLOOR TECH Avante at Inverness a skilled Nursing Facility, Is currently accepting applications for a Floor Tech, experience with floor and carpet care is preferred but not required. Avante offers excellent benefits for all full time staff. person at: 304 S. Citrus Ave. Inverness Your World . M ,u.t.b CHO NICLE aclutifng" WWaeplnicatunlins fom -A- FULL CHARGE BOOKKEEPER Quick Books Pro Exp Preferred. Good .Working Environment. Pay & benefits. Mon-Fri 8am-5pm Apply at 352-726-7474 REAL ESTATE CAREER Sales Lic. Class $249. Now enrolling 10/25/05. CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060. *LICENSED, EXP. PROPERTY MGR. *EXP. REAL ESTATE SECRETARY 352-795-0784 $$$$$$$ MANAGEMENT POSITIONS Benefits Available. Back ground and -A"':UT'^ - Crystal Riv., 7956L6116 Inverness, 726-4880 $7.15 PER HOUR Par-tlme job opportunities. Servers & cook needed. 12-20 hrs per week. 352-302-6882 BARTENDER Energetic & enthusiastic bartender for nights & weekends. Apply in person to Lars-Manatee Lanes. DFWP *BARTENDERS *COOKS -SERVERS High volume environment. Exp. preferred. Positions available in Inverness & Dunnellon. COACH'S Pub&Eaterv 114 W. Main St., Inv. 11582 N. Williams St., Dunnellon EOE Black Diamond. .Club-Lecanto Now accepting applications for exp. line cooks & utility persons. Hours to suit. Excel. working condition. Drug free work place. EOE Call Chef Perry before 11am (352) 746-3449 DISHWASHERS/ SERVERS Apply at: Fisherman's Restaurant, 12311 E Gulf to Lake Hwy, Inverness 352-637-5888 EXP COOK & PREP COOK Scampl's Restaurant (352) 564-2030 Exp. Line Cook . & Wait Staff Exc. wages. Apply at: CRACKERS BAR & GRILL Crystal River FT WAIT STAFF & FT COOK For Retirement living facility. Positions Include vacation after Jan. 1st. Health insurance available after 60 days Apply In person Breltwood Retirement Community Commons Building 1900 W. Alpha Ct Lecanto 746-6611 EOE, DFWP VAN DER VALK ' FINE DINING HIRING LINE COOK DAY TIME SERVER RECEPTIONIST . Please contact (352) 637-1140 R-- $$$ SELL AVON $$$ I FREE gift. Earn up to 50 Your own hrs, be your own boss. Call Jackle-1. 1,tS,R 1-866-405-AVON ' $$$$$$$$$$$$$$$5 --- - .... EXP. t RV SALES PERSONS, See Jerry Laverne COMO AUTO SALES 1601 W. Main St. Hwy. 44, Invern '.5 "I .4', EARN AS YOU LEARN CNA Test Prep/CPR Continuing Education 341-2311/Cell 422-3656 * DON (F/T) * RN F/T/PT *N Needed for busy Primary Care/Pain Management practice. Team player, work well independently & with/instruction Fax resume & salary req to: 352-746-1972 MRI/CT TECHNOLOGIST Advanced Imaging Center at the Villages Position immediately available for MRI/CT Technologist. Competitive salary with benefits. Fax resume to 352-205-7551 or call 352-750-1551. gIn l Ily- & w it/instrucio Fax esum & slar re o 5-7617 (HARGEIII All ads require prepayment. M c I AIVATE PARTY SP(ALJS I -I Nurse Practitioner F/T with Benefits, for a busy GI doctors office, Fax resume to (352) 563-2512 NOW HIRING CNA's/HHA's or People who would like to become a CNA Homel! & Apply at: BARRINGTON PLACE 2341 W. Norvell Bryant Hwy. Lecanto No Phone Calls P/T X-RAY TECH Orthopedics Office. Call Nettle, 746-0654 PT/FT POSITION IN ORTHO. OFFICE Ins. Billing & Acct. Receivable exp. necessary. Immediate opening. Fax resume to Nettle email resume to: tcvpret@avante group.com RN'S LPN'S CNA'S Facility Staffing Instant Payl Great Payl Apply online BOOKKEEPER P/T POSITION WORKING FOR ACCOUNTANT. COMPUTERIZED WRITE-UP AND BANK REC EXPERIENCE NECESSARY. FAX RE- SUME 352-746-6203 OR MAIL TO PO BOX 641510 BEVERLY HILLS 34464 LAND SURVEYING SIGN UP BONUS PARTY CHIEFS *All phases *Construction INSTRUMENT PERSONS CADD TECH Must be Experienced Heallh/Dontal/lns, Retirement P1lan NATURE COAST LAND SURVEYING 1907 Hwy, 44 W, Inverness. FL 34483 PH: 382-860-2626 nlistompabay. rfr.com CITRUS COUNTY (FL) CHRONICLE CLASSIFIED ! CITRUS COUNTY (FL) CHRONICLE A/CE.[ .T. I FRAMERS CABINET SHOP Local-Steady CABINET SHOP EXPEIENE 352-302-3362 HELP e c A/C LEA Laminator experienced only (352) 6(352) 266-2814 -LTopgE o or 634-4304 SImmediately Cable Modem INDEPENDENT TIeotle SALES REPS lyHDTV, VOIP. S(352) 628-5700 Truck/Van/SUV req. Air/ water purification Start now $800-$1000 Retirees welcome. A/C LEAD wk. Will train hard (352) 684-1373 INSTALLER FOR working individuals. Looking for Career CHANGEOUTS & Call 386-785-0911 Minded Self Starter SERVICE DELIVERY DRIVER Dependable with Needed Building Supply Co. Flexible schedule. Immediately! Looking for exp'd Mail resume to $15 Hourly & Up! Building Supply Delivery 455 E. Highland Blvd. + (352) 628-5700 Driver w/Class B CDL. V Inverness 34452 Heavy lifting r AC INSTALLATION required. Mon-Fri REAL ESTATE CAREER WILL TRAIN 7AM-5PM. Paid ales Lic. Class $249. WILL TRAIN vacation & holidays. SI Now enrolling o352- 527-0578 S0/2505 CITRUS REAL Alpha Air, 344-9509DFWP STATE SCHOOL, INC. AUTOMOTIVE S(352)795-0060. MECHANICDRIVER SEASONAL Local company looking P/T SALES Needed with tools & a for Class B Driver Smin. 5-yrs exp. Immed. w/clean Ic, Local Includes weekends. opening, 795-7477 routes, labor involved. Retail boutique exp. BLOCK MASONS Salary negotiable. refe sd.ax sume: & HELPERS after 8pm (msg) DFWP Exp'd and reliable. DRIVER, 2 YRS EXP fA.eTads Masons starting at DRIVER, 2 YRS EXP $18/hour. Helpers starting at $10.50/hour. Class A or B, local 352-400-0274 work, benefits. i$$$$$$$$$$$$$$ 352-220-9000 (352) 799-5724 LCT WANTS YOU! BOXBLADE Is$$SS$$$S$$$$$S$ OPERATOR ELECTRICIAN S Experienced with clean APPRENTICE Immediate driving record. processing fdr OTR 352-621-3478 dfwp Immediate openings!l drivers, solos or C PROGRAMMER Will train if necessary teams, CDLA/Haz. C Gaudette Electric Inc. Required Great Additional skills Apply in person S benefits referred, Apache, or on-line 99-04 equipment PHP, MYSQL, Pyton, S Call Now Please call Electric.com 00-362-0159 24 hours (352) 344-5618 Or call 352-628-3064 I -A 0 1-.L- m I-L I AN EXP. FRAMER & LABORERS NEEDED (352) 637-3496 FRAMERS & LABORERS NEEDED (352) 726-2041 LATHERS 40+ hrs. Exp. a plus/ will train. Transp. a must! Top $$ (352) 400-2512 PLASTERERS/ APPRENTICES I CIIRtONI-CLE~ i 10% OFF NEW ACCTS JOE'S TREE SERVICE All types of tree work 60' BUCKET c.& Ins. (352)344-2689 Split Fire Wood for Sale WHOLE HAULING i & TREE SERVICE 352-697-1421 V/MC/D ww.ataxidermist.com 1 AFFORDABLE, t e DEPENDABLE: I HAULING CLEANUP, I PROMPT SERVICE I I Trash, Trees, Brush, SAppl. Furn, Const, 1 II Debris & Garages | COLEMAN TREE SERVICE Atemove, trim & clean p. Lic. Ins. No job too n. or too Ig. Guar. 10% tower than any written proposal. 344-1102 DAVID'S ECONOMY TREE SERVICE, Removal, '& trim. Ins. AC 24006. 052-637-0681 220-8621 Vs Landscape & Expert Tee' Svce Personalized designer. Cleanups & Bobcat work. Fill/rock & I Sod: 352-563-0272. Dwayne Parlier's Tree Removal. Free estimate Satisfaction guaranteed I Lic. (352) 628-7962 WRIGHT TREE SERVICE, I grind, trim, lns,& Lic #0256879 352-341-6827 STUMP GRINDING Lic. & Ins. Free Est. I Billy (BJ) McLaughlin I 352-212-6067 STUMPS FOR LE$$ 'Quote so cheap you Won't believe it!" (352) 476-9730 TREE SURGEON Lic#000783-0257763 & Ins. Exp'd friendly serv. I Lowest rates Free. $stimates,352-860-1452 COMPUTER TECHMEDICS On. site Computer Repair. Internet & Network Specialist. S (352) 628-6688 ,Chris Satchell Painting 81 Wallcoverlng.AII work 2 full coats.25 yrs. Exp. iExc, Ref. Llc#001721/ Ins. (352) 795-6533 I. (oiLWorld first Need a job or a qualified employee? This area's #1 employment source! CHRONh ;if pg.0 .28-2245 INTERIOR & EXTERIOR 25 yrs. exp. also Kitch- en/Cabinet, Lic. & Ins. Jimmy 352-212-9067 INTERIOR/EXTERIOR & ODD JOBS. 30 yrs J. Hupchick Uc./Ins. (352) 726-9998 Mike Anderson Painting Int/Ext Painting & Stain- ing, Pressure Washing also. Call a profession- l1, Mike (352) 628-7277 PICK YOUR COLOR PAINTING Interior- Exterior*Faox Fair Prices, Owner on Job. Free Est., Insur. (352) 212-6521 RELIABLE Interior & ex- terior painting & more. Reasonable rates. Lic,# 99990003108 795-3024 Unique Effects-Painting, In Bus, since 2000, Interior/Exterior 17210224487 One Call ,To Coat It All 352-344-9053 WILL YOUR GENERATOR START? MOWER REPAIR Hernando, Don Mead (352) 400-1483 BATHTUB REGLAZING Old tubs & ugly ceramic tile is restored to new cond. All colors avanil O. 67TUBS IR827\ CUSTOM UPHOLSTERY Modern & antique. Denny, 628-5595 or 464-2738 IN HOME HEALTH AID for prominent Prince- ton, NJ gentleman, relocating to FLA, seeking similar pos. 17 yrs. exp., w/ mental & physical diss. Ref.avail, (215) 262-1042 LINDA'S HOME CARE, compassionate care, certified CNA HHA, State License 20 yrs. exp. affordable rates, free evaluations. 352-697-9006 v'Chris Satchel! Painting & Wallcovering.All work 2 full coats.25 yrs. Exp. Exc. Ref. Lic#001721/ Ins. (352) 795-6533 CHERYL'S IN HOME ,- ;CLEANING .. Weekly & Biweekly, Licensed, 352-344-8826 FAITH DEAN'S Cleaning Family Busn. Since '96 Free Est. Lic# 0256943 Insured. (352) 341-8439 Cell 476-4603 HOMES & WINDOWS Serving Citrus County over 16 years. Kathy (352) 465-7334 Liz's Quality Cleaning Service Reliable, Affordable, Weekly, Bi Monthly, Licensed (352) 489-4512 MRS CLEAN I can do cooking house cleaning and take you shopping. call me @ 352 795-4228 COUNTER TOP Resurfacing & repair, Sr. citizen disc. Lic. 28417 (352) 212-7110 Handcrafted Custom Cabinets - Hardwoods specialist (352) 795-5444 Additions/ REMODELING New construction Bathrooms/Kitchens Lic. & Ins. CBC 058484 (352) 344-1620 ROGERS Construction Additions, remodels, new homes. Most home repairs. 637-4373 CRC 1326872 W.F. GILLESPIE CONST. Inc. Additions/garages, kitchens & baths Uc CRC1327902 344-1591 FL RESCREEN 1 panel or comp. cage. 28yrs exp 0001004. Ins, CGC avail 352-563-0104/228-1281 FREEDOM RESCREEN Pool Cages, Window Scrns, etc. Will beat all estimates. Lic# 2815. (352) 795-2332 Screen rms, rescreening Carports, vinyl & acrylic windows, awnings. Lic# 2708 (352) 628-0562 Amen Grounds Maint. Complete lawn care & pressure washing.Free Est. (352) 201-0777 PANIN "HOME REPAIRS" Painting, power wash jobs big & small #1453 (Eng./ Spanish p --- U.ii AFFORDABLE I DEPENDABLE HAULING CLEANUP. I PROMPT SERVICE I I Trash, Trees, Brush, | Appl. Furn, Const. , Debris & Garages I 352-697-1126 All Around Handyman Free est. Will Do Any- thing. Lic.#73490257751 352-299-4241/563-5746 ALL IN ONE We do it all, give us a call. Free est. Sen. Disc. 99990002980 Art, (352) 726-6675 ALL TYPES OF HOME IMPROVEMENTS & REPAIRS #0256687 352-422-2708 Andrew Joehl Handyman. General Maintenance/Repairs Pressure & cleaning. Lawns, gutters. N9 job too small Reliable. Ins 0256271 352-465-9201 Get My Husband Out Of The Housel Custom woodwork, furniture repairs/refinish, home repairs, decks, Finish trim, etc. Lic. 9999 0001078 (352) 527-6914 GOT STUFF? You Call We Haul CONSIDER IT DONEI Moving,Cleanouts, & Handyman Service Uc. 99990000665 (352) 302-2902 HOME REPAIR ....u need it done, we'll do it. 30 yrs. exp. Lic., Ins. #73490256935,489-9051 HUSBAND & WIFE TEAM, 30 yrs exp Sm. jobs. Sr. citizen disc. Lic. 28415 (352) 212-7110 NATURE COAST HOME REPAIR & MAINT. INC. Offering a full range of servlces.Uc.0257615/Ins. (352) 628-4282 Visa/MC Wall & Ceiling Repairs Drywall, Texturing, Painting, Vinyl. Tile work.-30 vrsn x r------- CITRUS ELECTRIC All electrical work. Uc & Ins ER13013233 352-527-7414/220-8171 CUSTOM LIGHTING, fans, remotes. Dimmers, etc. Professionally Installed. Lic#0256991 (352) 422-5000 r AFORDABLE, DEPENDABLE, . HAULING CLEANUP, I PROMPT SERVICE I Trash, Trees, Brush, Appl. Furn, Const, Debris & Garages S 352-697-1126 GOT STUFF? You Call We Haul CONSIDER IT DONEI MovlngCleanouts. & Handyman Service Uc.99990000665 (352) 302-2902 All of Citrus Hauling/ Moving Items delivered, clean ups.Everything from A to Z 628-6790 HAULING & GENERAL Debris Cleanup and Clearing. Call'for free estimates 352-447-3713 WE MOVE SHEDS : 564-0000C ' Lic./Ins. L05000028013 A I" 'T, 4-7A -A I.11 John Gordon Roofing Reas. Rates. Free est. Proud to Serve You. ccc 1325492. 628-3516/800-233-5358 Benny Dve's Concrete Concrete Work All types! Lic. & Insured, RX1677. (352) 628-3337 E--i, Lic. lns.(352)302-7096 FILL, ROCK, CLAY, ETC. Allf pes of Dirt Service Call Mike 352-564-1411 Mobile 239-470-0572 FLIPS TRUCK & TRACTOR, Fill Dirt, Rock, Top Soil, Mulch & Clay. You Need It, I'll Get Itl (352) 382-2253 Cell (352) 458-1023 VanDykes Backhoe Pond Digging & Ditching (352) 344-4288 or (352) 302-7234 cell All Tractor & Truck Work, Deliver/Spread. Clean Ups, Lot & Tree Clearing Bush Hog. 302-6955 HAMM'S BUSHHOG SERVICE. Pasture Mowing, lots, acreage. Licensed & Insured (352) 220-8531 PCS Landclearing Lic. & Ins. (352) 564-9262. Uc./Ins. (352) 613-0528 A DEAD LAWN? BROWN SPOTS? We specialize in replugging your yard. Lic/ins. (352) 527-9247 AFFORDABLE, I DEPENDABLE, HAULING CLEANUP, I PROMPT SERVICE I I Trash, Trees, Brush, | Appl. Furn, Const, . Debris & Garages 352-697-1126 Amen Grounds Maint. Complete lawn care & pressure washing.Free Est. (352) 201-0777 Bill's Landscaping & Complete Lawn Service Mulch, Plants, Shrubs, Sod, Clean Ups, Trees Free est. (352) 628-4258 SDIUU n KUIrIIsI LaWI Maintenance. Uc/Ins, Affordable, Free Est. (352) 563-0869 DOUBLE J STUMP GRINDING, Mowing, Hauling,Cleanup, Mulch, Dirt. 302-8852 DOUBLE J STUMP GRINDING, Mowing, HaullngCleanup, Mulch, Dirt. 302-8852 Happy Cuts Lawncare Be happy with your lawn again! Remember if your lawn isn't becoming to RAINDANCER Seamless Gutters, Soffit Fascia, Siding, Free Est. ULe. & Ins. 352-860-0714 Violin Lessons Flexible Hours (352) 726-2449 EXP. CONCRETE FINISHER NEEDED M ust past back- ground check, must have own hand tools, pay rate based on exp. & skills, contact 352-637-9225 for interview _ EXP. ELECTRICIAN For Service Work Must have valid Florida drivers license, top pay w/ retire- ment package. Call 352-465-4569 To set up interview EXP. PRESSMAN Wanted Immediately to run Ryobl 3302 Press For Process Color Fax Resume to: 352-795-2980 Exp'd Plasterers, Apprentice; Lathers & Non-Experienced Laborers Wanted Steady work and paid vacatlon.Transportatlon a must. No drop offs. 527-4224, Iv msg. EXPERIENCED BUCKET TRUCK OPERATOR For Busy Tree Service. Must have CDL. Good benefits & pay, (352) 637-0004 EXPERIENCED MAYCO CONCRETE PUMPER WANTED Start at $13. hr. & up Call for interview, (352) 726-9475 FRAMERS & CARPENTERS Must be dependable & exp. Own tools and ride a must. 352-279-1269. HEAVY EQUIPMENT TRANSPORT OPERATOR Must be familiar w/ Florida and must be experienced. In the state hauling. Home every night. Based in Citrus County. 352-302-4371 MASONS & MASdN TENDERS Steady Citrus Co. work. $10/hour to start. Start Immediately 352-302-2395 METAL BUILDING Erectors, Laborers All phases pre- engineered bldgs. Local work. Good starting salary. Paid holidays & vacation. Call Mon-Fri, 8-2, toll free, 877-447-3632. PLASTERERS & LABORERS Must have transportation. 352-344-1748 Advertise Here for less than you think!!! Call Today! 563-5966 Copyrighted Material Syndicated Content Available from Commercial News Providers q sa w m aMW ( m* - 50 352-302-7925 PLUMBERS & HELPERS For Commercial Work Call 1-800-728-6053 Plywood Sheeters & Laborers Needed in Dunnellon area. (352) 266-6940 PROFESSIONAL DRIVERS WANTED Will train. Must have clean CDL w/ 2 years driving exp. Good attitude, hard working & dependable need only apply. 24/6 shift.. Good Pay. Long Hours. Call 352-489-3100 SERVICE TECHNICIAN For Large Kitchen & Bath Distributorship needs cabinetry background. Must have pleasant personality, be over 21, clean Driving record and work well with Clients. Company phones, Insurance & benefits. Pay commensurate with experience. Fax resume to Deem's Kitchen & Bath 352-628-2786 or E-mail eariffith@aodeem.com POOL CAGE INSTALLERS EXo. Only. Too Pay. MUST HAVE CLEAN " DRIVER'S LICENSE. Call:(352) 563-2977 STUCCO LABORERS PLASTERERS (352) 302-5798 Stucco Plasterers and Laborers Local work. Must have transportation (352)628-5878 or Iv msg 2 LOT PORTERS O S See Jerry COMO AUTO SALES | 1601 W. Main St. Hwy. 44, Inverness A/C LEAD INSTALLER FOR CHANGEOUTS & SERVICE Needed Immediately! S$15 Hourly & Up! (352) 628-5700 + CARE TAKER NEEDED For Central Florida Mini Farm. New furnished home will be provided. Horse experience helpful. Background check reqd. Great for retiree's. Send complete resume to: Pinnacle Country Club PO Box 589 Milan IL., 61264 Email vhever@revealed.net 309-787-4100. Dump Truck Mechanic Top wages Bailey's Trucking 352-585-6455 EXP. SET UP BLOCK MASON Apply In person El Diablo Golf & Country Club FACTORY HELP Mon-Fri $6.75/Hr. Assemble mechani- cal parts. Prior exp. w/hand tools a MUST. VE Power Door, 3516 E. Norvel Bryant Hwy., Hernando FL (352)344-8181 FULL TIME MAINTENANCE To rehab vacant apartments at (2) 60 unit complexes. Community. Inverness & Brooksvllle $8/hour. 726-6466 Tues Thurs. 10:30-2:00 GENERAL MAINTENANCE Part Time/Full Time Hours Vary. Able To Work Weekends, Able To Lift 50 lbs. Relate Well To People. Accepting Applications. Rainbow Rivers Club 20510 The Granada Dunnellon (352)489-9983 GLAZIERS Experienced MIDSTATE GLASS (352) 726-5946 Fax Resume to 352-726-8959, Inverness HOUSEKEEPER/ LAUNDRY Position available for qualified applicants. Come work where everyone is a team player, you're not lost in the crowd. Apply in person to: SURREY PLACE 2730 W. Marc Knighton Court, Lecanto EOE/ DFWP BeA DoeB efore Most JOBS GALORE! ' EMPLOYMENT.NET LABORERS NEEDED No exp. necessary Benefits offered. Valid Drivers Uc. & Heavy Lifting Required Gardners Concrete 8030 Homosassa Trl. MAINTENANCE WORKER WANTED Apply in person. oD/F/W/P OE El DIabla Golf & Country Club No Phone Calls CLASSIFIED MONDAY, SFPI'F-MI31--R 26, 2005 9B MUNRO'S LANDSCAPING is seeking exp'd land- scaping personnel. Must have valid driver's license. (352) 621-1944 PATIENT TRANSPORT DRIVER MUST HAVE CLEAN DRIVING RECORD, F/T & P/T positions available. On call pay. Nights, week- ends, days. Starting pay $6.25 hr. Must be 21 yrs. old. Must be people oriented. 352-637-3736 "God is our CEO" POOL MAINT. TECHNICIAN Needed Full Time w/ benefits. Experience necessary. Apply in person: 2436 N. Essex Ave (352) 527-1700 SATELLITE INSTALLER Company Truck, Overtime + Commission, Paid Vacation. 860-1888 TOWER HAND Bldg Communication Tpwers. Travel, Good Pay & Benefits. OT, DFWP. Valid Driver's License. Steady Work. Will Train 352-694-8017 Mon-Fri Truck Driver/Rolloff Equip. Operator Sand Land of Florida (352) 489-6912 WE BUY HOUSES CaSh........Fast ! 352-637-2973 Ihomesold.cgm ACCOUNTING Also Gen. office duties. Corp. tax. prep, Using Peachtree & Pro Series, (352) 489-0202 WEEKENDS I-.IJ ,,, p c . 9- 11am Golf exp. help- ful, but not required, IGCC, 637-2526 ADVERTISING NOTICE: This newspaper does not knowlingly accept ads that are not bonafide employment offerings. Please use caution when responding to employment ads. REAL ESTATE CAREER Sales Lic. Class $249. Now enrolling 10/25/05. CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060. TELLER POSITION AT CENTER STATE BANK CRYSTAL RIVER OFFICE Previous bank or cash handling experience preferred. Please call 813-780-4274 for application. EOE CTRUS COUNTY (FL) CHRONICLmG OB MONDAY. SEPTEMBER 26, 2005 W uins 3p otniis ABSOLUTE GOLD MINE! 60 Vending Machines All for $10,995. 800-234-6982 AIN #B02002039 KETTLE CORN BUSINESS Complete pkg. Kettle- tanks- tent- trailer. Everything you need to make money Ideal for young to retired couple church or organization. Very lucrative. No waste. 352-212-5555 or 352-212-3653 LIQUOR LICENSE 4 COP Citrus County On-slte Consumption Pkg. sales 352-220-3422 "UVE AUCTIONS" For Upcoming Auctions 1-800-542-3877 2 Antique High chairs Cane bottoms, $200 each. (352) 621-0286 ANTIQUE BRASS BED with rails, fullsize, $400 obo (352) 726-8021 -S HOT TUB/SPA, 5 person, like new, 24 jets, Red-. wood cabinet, 5 HP pump. Sacrifice $1475 (352) 286-5647 SPA W/ Therapy Jets. 110 volt, water fall, never used $1795. (352) 597-3140 20 Cubic Ft. Sears Upright Freezer, frostfree ULike new, $175. (352) 795-5228 " After 6pm ALL APPLIANCES. NEW & USED, Warranteed Refrig, washers, dryers etc. Parts & Service Buy/Sell 352-220-6047 APPLIANCE CENTER Used Refrigerators, Stoves, Washers, Dryers. NEW AND USED PARTS Dryer Vent Cleaning Visa, M/C., A/E. Checks 352-795-8882 ELECTRIC STOVE, almond color, $25. Refrigerator, $20. 352-344-5049 KENMORE 21.5 CU. FT. REFRIGERATOR Bisque, 3 years old, like new cond. $350. (352) 527-0347 Kenmore Lg. Upright Freezer, $150. OBO, Heat/Air Unit 17,000 BTU In box, never used $700. OBO (352) 621-0856 REFRIGERATOR, Magic Chef, Side by side, 22 cubic ff, water in door, almond, Exc cond, $325 obo (352) 860-2945 WASHER & DRYER ULike new, $250 or best offer. Citrus Springs, (352) 489-7142 Whirlpool Washer & Dryer, white, $150.00 (352) 465-2148 Beautiful Rosewood Office ensemble. 2 desk spaces, book- shelves, glass disp. cab., lots of shelves. $1500. (352)726-6791 ----Autios r ;ABSOLUTE 7' LIQUIDATION of Douglas Ridenour Repair *SAT. OCT. 1* 5645 Pine Tree Pt. LECANTO (491 So. of Grover Cleveland, West into Leisure Acres, follow double yellow line to Left on Glenn to Rt. on Pine Tree Pt. Sale on Left) I PREVIEW: 8 AM SALE: 9AM Highlights include Rotary lift, RTI ref. reclaimer, air, power & hand tools. 12-ton press, AMMCO I brake lathe, torch set, Powcon AC/DC Migtig welder. Troy I chipper, collector car parts, + more! Photos /Web: www. dudleysauction.com DUDLEY'S AUCTION (352) 637-9588 AB1667 AU2246 10% Buyers Premium AUCTION -SUN. OCT. 2 I 4000 S. Fla. Ave. Hwy. 41-S, Inverness PREVIEW: 10 AM AUCTION: 1 PM English, German & I American clocks, Jewelry, rugs, marble top furn. silver, art, glassware. +++ I See Web: www. dudleysauction.com DUDLEY'S AUCTION (352) 637-9588 AB1667 AU2246 12% Buyers Premium I 2% disc. cash/check I =. =- - Jl Tag Sale/ Auction Sept. 28 @ 8am edandsuemesser.com AU252 AB1015 AIR COMPRESSOR, horizontal tank, recent motor, $65. :xt. ladder, very good cond, $40. (352) 746-7856 Mechanics Tool Box, standing on wheels Craftsman, 13 drawer, $250. (352) 341-2259 2 AUDIO SPEAKERS, Polk, model r15, black ash Vinyl, 105/8"H x61/2"Wx71/4"D $20. FM STEREO, Sony, FM/AM Receiver, mode D\STR-DE185 $30. (352) 746-9504 Complete Entertain- ment Center, Toshiba 36" free standing TV, w/ pioneer tuner, double cassette playermulti -play compact 6 disc player, VCR. 3 design acoustic speakers. , S$400. (352) 382-0022 HEADREST TFT LCD MONITOR Great for car trips: New. $159.99 (Retails for $399.99). 352-726-8508 STEREO CASSETTE DECK , VIDEO CASSETTE RECORDER Mitsubishi Model HS-359UR $20. (352) 746-9504 TV 19" Magnavox $25 (352) 746-9504 DIESTLER COMPUTERS Internet service, New & Used systems, parts & upgrades. Visa/ MCard 637-5469 NEVER USED MP3 DIGITAL PLAYER, many features, $65 (352) 344-0293 PC COMPUTER Complete, Internet ready. WIN,98, $100 (352) 726-3856 '05 FARMTRAC w/loader, 5' bushhog, 5' boxblade, 13 hrs. 27HP diesel, $14,000 (352) 637-3188 Lanai Furniture 4 chairs w/ rollers, 4/2' table, 2 lounge chairs. 1 straight back chair w/i ottoman, roller cart & outdoor lamp $400. (352) 527-9735 PATIO SET, 10 pc. PVC, hexagon 43" table w/4 chairs, 1 lounge chair w/ottoman, 1 coffee table, 1 loveseat, 1 lamp tbl. white, $300 352-746-5051 9a-3p ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 BED: 155, New Queen. No Flipped Pillow Top Set. 5 yrs warr. King Set $195. Delivery 352-597-3112 BED: 495 Nassa Memory Foam Set, Seen on T.V. 20yr Warr. Never Used.. Cost $1399. Can Deliver 352-398-7202 Bedroom set 4pc Uke New Including mattress and box spring, $600 obo (352) 228-0460 BEDS BEDS BEDS Beautiful fact closeouts. Nat. Advertised Brands 50% off Local Sale Prices.Twin $78 Double $98-Queen $139 King $199. (352)795-6006 Brown Suede Leather Couch & 2 Loveseats, 3 matching tables, $500 or offer. (352) 746-0867 CHEST OF DRAWERS $50; COMPUTER DESK, $25. Both in good cond. (352) 465-1934 COUCH, brown & blue w/ 2 built in recliners, nice cond, $100. Wood Bar & 2 matching stools $75. (352) 628-5358 Curved Sectional Excellent condition 35yrs. new, multi colored tapestry $350. Noritike China Set $150. (352) 628-5008 FULLSIZE MATTRESS like new cond. $100 (352) 637-6310 FURNITURE CORNER Quality Furniture at Wholesale Prices Why Pay More? This Week's Special at Furniture Corner. 50% off all Bedroom Sets. While Supplies Last! Hurryl Visit Us At: Furniture Corner 1031 E. Norvell Bryant Hwy Hernando, Fl 352-860-0711 co-rnrnet Girl's Bedroom Furniture 6 & 3 drawer dressers, desk, hutch, chair, mirror, $350. ORO. (352) 344-4505 GREEN BROCADE COUCH. Exc. cond. Ask- ing $350. Exceptional style mirror table + wall mirror, exc cond, asking $450. (352) 746-5445 KING KOIL FULLSIZE Mattress, boxspring & frame. Spotless, $65 obo (352) 726-8021 Kitchen Set $60. obo Grill $o70. obo (352) 564-0195 LARGE SOLID LITE OAK, Entertainment Center Only 1 year old, perfect condition. Paid $1100, will sell for $750. (352) 447-4270 Lazy Boy Recliner & Rocker, excel. cond. $150. (352) 527-7114 LIKE NEW LIVING ROOM SET & OTHER HOUSE FURNITURE (352) 344-4711 ^ WOW! If really pays o work for If you would like to run your own business with a focus on customer service, we would like to talk to you. ,, As an independent distributor delivering the Citrus County Chronicle, you know --- you re providing a quality product backed by a company thai's been in business [or more man 100 years You must have reliable Iranspornalion be at least 18 years old and be serious aboul working early morning ours /E , seven days a week If this sounds like a .' tl ( business opponunily or that s rgrit for you. call ihe d/f Chroncle al 1-352-563-3282. K nit i(:L in,, CA3 C" Furniture metal 5-pc. New, $1,200 or sell $300. Power Washer, $60 (352) 860-1731 Xerox copier XC 830 $75. Misc. office supplies, $50. (352) 860-1731 REMODELING Carpet, approx. 100 yards, mauve, like new with pad. $200. REFRIGERATOR, gd. for garage, very cold, $30. (352) 250-1616 SLEEPER SOFA, 6'61L, lime green with flocked white & yellow flowers, spindle arms good cond, $80. Pro-Form treadmill, model 565 Space Saver, used very little, $200. 746-5516 STORM SCREEN SECURITY DOOR, while ilum, 36X80, ail hardware & framer Induclud. 190, (352) 746-6277 Sofa Table for Sale Glass top w/ granite bass & wrought iron marble w/ glass top, $100 each. (352) 860-0444RI CITRUSCOUNT 1 Premier Skeet, 12 go, vent rib, ported, $600 MOSSBERG Silver Re- serve 0/U, 12-ga. vent rib, $525 (352) 726-5890 T.C. HAWKEN CAP LOCK MUZZLE LOADER 54 caliber, $295. (352) 489-1955 WIND SURFER Nice board, sail as Is, $95. (352) 795-0553 23FT TRAVEL TRAILER, exe. shape, $2,900 '96 ENCLOSED 20'x8'x9' exc, $4,500 (352) 726-4710 302-4310 6X112 LAWN TRAILER with ramp door & side door, $2,000. (352) 637-4794 BUY, SELL, TRADE, PARTS REPAIR, CUSTOM BUILD llers cam Hwy 44 & 486 LIVING ROOM SET NEW. Couch, loveseat, light multl- recllner, light blue, like new, $50. (352) 746-7856 PAUL'S FURNITURE We're Open Again Store Full of Bargainsi Tues-Sat. 9am-2pm Homosassa 628-2306 PIANO, needs tuning, $70 SLEEPER COUCH, $35 352-344-5049 Preowned Mattress Sets from Twin $30; Full $40 Qn $50; Kg $75. 628-0808 QUEEN SLEIGH BED headboard, footboard side rolls ville chair, Org., $1300 Asking $595 OBO. (352) 746-0688 Rock Maple two pc. dining hutch & buffet, $350. obo Ethen Allen Qn. sz. Sofa Bed $150. obo (352) 382-5756 SOFA/LOVESEAT Bassett. Contemporary, Exc Cond. $300 both or make offer. TABLE & 4 Chairs, $50 S-(352) 476-8828 Solid Light Oak China Cabinet $200. or best offer. (352) 628-5038 Solid Teak Dining Table, 8 chairs, very unusual $1,500. ,(352) 795-0527 TABLE, 4 CHAIRS, suede mocha color, 2 match- ing bar stools, $900 obo OAK CHINA CABINET $500 obo All exc. cond. (352) 746-0196 Table, 59x35, beveled glass top, 4 padded chairs, excel, cond., very pretty $250. (352) 726-4304 The Path's Graduates, Single Mothers, Needs your furniture. Dining tables, dressers & beds are needed. Coil (352) 527-6500 Trundle Bed with headboard Uke new $75. (352) 795-5228 After 6pmr White Leather Sofa & Loveseat $300. 2 yellow upholstered chairs 2 for $125.(352) 527-8868 Wood Bar With Tile To & 4 Stools $1,500. ' (352) 795-0527 32" Torro Rider w/ bagger, 8HP Brigg's engine. $350. (352) 527-0749 FREE REMOVAL OF Mowers, motorcycles, Cars. ATV's, jet ski's, 3 wheelers. 628-2084 Lawnboy6 Riding Mowers, 30"Murray 10hp, $200. 36" Bolens, 1 lhp, $200, * New Batteries, (352) 637-1937 Rotatiller, new motor, new paint, $85. (352)465-9132 SEARS RIDER 8HP, 30" cut, rope start, runs good, $150. firm (352) 302-6069 TROY-BILT LAWN TRACTOR 42" 16HP Kohler engine, w/bagger, exc. cond., $700 (352) 726-4715 i EXTRA LARGE CENTURY PLANT, $30 LARGE CENTURY PLANT $20. (352) 726-8361 FLORAL CITY Estate Sale. Too much to list. Good quality 9a-9p (352) 860-1885 (352) 697-2290 PAUL'S FURNITURE We're Open Again Store Full of Bargainsl Tues-Sat. 9am-2pm Homosassa 628-2306 IHP PAINT SPRAYER needs comp., good motor, tank & gauges. $20. (352) 628-5708 18FT ABOVE GROUND POOL, brand new Hay- ward filter, all access. Must take down. $500 abo (352) 726-0289 ANTENNA TOWER, 50'. First $75 takes it. (352) 628-7050 S CARPET 1JQis of Yards/In Stock. Many colors. Sacrifice. LiUc0256991 (352) 422-5000 FIREPLACE. Vent free gas log with remote control, only 4-yrs old, exc. cond. $100 obo (352) 527-3577 FLOATING DOCK w/2 ramps. $150.00 Computer desk stain- less & oak look $50.00 795-1140 GE Washer Dryer Large capacity, $395. Like new (352) 746-2382 GENERATOR HONDA 13HP, 6800/7800 4 hours, extension cord, $999. (352) 795-3091 GENERATOR 4kw, Bns/Coleman, used very little w/ manuals.$270. (352) 628-4522 GOT STUFF? You Call We Haul CONSIDER IT DONEI Movlng,Cleanouts, & Handyman Service Uc. Pallet Jack $175. (352) 726-6034 PATIO FURNITURE. POOL COVER blue plastic, large size $20. (352) 344-4591 VALLEY weight distributing hitch and Reese straight tongue adapter with instruction sheets. $150. (352) 746-0321 WE MOVE SHEDS 564-0000 Xerox copier XC 830 $75. Misc. office supplies, $50. (352) 860-1731 JAZZY ELEC. WHEELCHAIR, $650: THRESHOLD ALUM. Portable ramp, $50. (352) 527-3276 LIFT CHAIR electric, like new, hardly used, Cost new $800 Asking $345. Firm. Pine Ridge (352) 212-9593 Electric Organ Yamaha Electone Upper & lower key- boards w/ bench & books: Lots of extra functions. Excel. Cond. Moving must sell. $175. (352) 382-0725 Hobart M Cable Spinet Piano good condition $450. (352) 621-8027 PEAVEY POWER AMPS CS 400 Stereo -$150 M-3000 Mono $125 Both A-1 362-628-9838 PIANO Kimball Spinet, exc cond., $850. (352) 382-0622 VIOLIN plus case Good condition $50 (352) 382-2149 VIOLIN, $500 or trade for banjo- ???? 352-397-5007 2 Station Weilder Weight Machine $100. OBO Call Greg (352) 628-4250 BO-FLEX, one year old, like new, $575. (352) 564-4-1'9.' or 422-4468 S(352) 637-2153 CLUB CAR Loaded $2,900. (352) 795-0527 FLYFISHING EQUIP- Teton 1'0 wt reel w/9 wt rod. 350 + saltwater flies,box full of fly tying equip. $400. (352) 527-2792 Go Ped Needs Battery, good cond. $100. (352) 628-2954 GO-CARTS EAGLE BOW "LIghtspeed", like new $200 (352) 527-2792 GOLF CART Club Car '98, 48V, 3.75HP, lighting package, charger? full enclosure $2,000. (352) 628-7267 Older Golf Cart Good Cond., new batteries w/charger $1000. (352) 637-6557 POOL TABLE 8 ft. Slatetron, for sale $500. (352) 341-0015 POOL TABLE, Gorgeous, 8', 1" Slate, new in crate, $1350. 352-597-3519 REMINGTON 1187 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. AKC GERMAN SHEPHERD PUPS Ready on 10/04 (352) 489-7031 Canaries, females $55. males $65, Singers garaunteed. (352) 489s. $60. ea. parents on premises lic. #esc 7203 (352) 726-5422, 9-3pm (352) 212-6225, 3-8pm Humanitarians of Florida Low Cost Spay & Neuter by Appt. Cat Neutered $20 Cat Soaved $25 Doa Neutered & Saved start at $35 (352) 563-2370 LIONHEAD RABBITS New Dwarf Breed. Show & Pet quality All colors, both sexes Pedigree, Great for 4H or FFA projects, $50-$75 352-344-5015/476-3843 ROTTWEILER PUP Beautiful large boned female. Reasonable. (352)447-2072 Shih Tzu 9 wks, Cute & Cuddly (352) 465-6659 SHIH TZU PUPPIES S. CKC-Reg-,-w/ ist shots- & papers, unOique colors $500. (352) 628-5249 3 YR. OLD BUCKSKIN FILLY, ready to train your way, $700/obo 16 MO. OLD PAINT male, $1,000/obo (352) 795-4525 REG. PAINT GELDING 4 yrs. old, very sweet & entle w/no bad habits 2,800. 352-302-3901 or 352-726-9928 ALPACAS The Huggable Investment, Call for information, 352-628-0156 PIGS, 8 wks. old, $35. Also Sow & Boar, $150. (352) 564-0258 C.RIVER/HERNANDO Rent/sale. 2/2, First, last, & deposit. No pets. 352-795-5410 DW 2/2 $525 up 1 BRfurn w/carport $450 up. No smoking, no pets. (352) 628-4441 HIGHWAY 488 Lg., extra clean 3/2, Ig. FI rm., no pets. $700 mo, + deposit. 352-795-6970 -410901 E $500.00 DOWN FHA Financing 1st time buyer, poor credit, recent bankruptcy, we have financing available. New 3 & 4 bedroom homes up to 2300 sq.ft, with land available. Call 352-621-9181 12X60 MOBILE HOME Ready for you to move.$150. (352) 726-0321 2/2 BDRM 24'X50' needs some work. $5000+Moving expenses. (352)489-2063 (352)219-0057 Baby Rocker wooden, excel. cond., works great. $50. (352) 726-4304 CONVERTIBLE BED From Crib to Toddler to Regular daybed. Mattress not Inc.$60. (352) 795-5905 Fisher Price Aquarium Cradle Swing, like new condition. $75. Infant boy clothes & sleepers, 0-9 mo. $75. (352) 341-6920 -4 COLLECTOR BUYING TOY TRAINS Any kind any amount, top cash paid call (352) 257-3016, If no answer leave message., TOOLS OF ANY value, rods, reels, tackle, collectibles, hunting equipment, Classified Ads from 575 through 660 are- sorted by town nams. to assist you In your property. House, Cabins, Travel Trailers & RV spots avail. Short or long term. Excel, cond. on- River w/ boat access.'. Big Oaks River Resort, -, (352) 447-5333 Property Management &, Investment Group, Inc. Licensed R.E. Broker > Property & Comm." Assoc. Mgmt. Is our,',, dnly Business )P Res.& Vac. Rental Specialists > Condo & Home owner Assoc. Mgmt. Robbie Anderson LCAM, Realtor 352-628-5600 nfo@orooerv . manaamentarouno. , FLORAL CITY '..- - Lakefront 1BR. WkIy/MQ SNo Pets. (352) 344-1025 A.4 Crystal Palms A5pts.-- 1& 2 Bdrm Easy Terms..,- Crystal River 564-0882 HERNANDO ' 2/1 $500 1st, lost & sec; 352-527-0033 or Iv. msg. HOMOSASSA 2/1, completely remod. eled, pool. Quiet, treed 'dreamWater. garbog6; - maintenance incl.,,., Year lease $650 a mo. 1st, last, sec. No Pets! -: 352-628-6700 - INV/HERNANDO-'- , Very nice 1 BR qpts: Many lakefront Boat' docks, boat ramp, ,. fishing. etc. $495 mo. -E BEAUTIFUL 5 ACRES Includes 3Bed 2Bth, Fenced & Gated. Just off Citrus Ave. Call 352-302-3126 New 2005' 3/2 on 1/2 Acre off Billows Lane. Finacing Available. Call 352-746-5912 PRIVATE OWNER Needs to sell 2000 Homes of Merit, 28X80, 4/2, Country kitchen, needs some work. Only $35,000, delivered & set up. 352-621-1617 REPOS AVAILABLE in your area. ,ao1 ro.0/ .I-eo r'J :, 352-795-2618 4 LOTS ON AIRBOAT CANAL to Witala.. Rvr. Compleftey 3/2 24'X52' on 6/10UAc. Bruce at 795-5112 or Jeanne at 564-4158 DOUBLEWIDE 3/2 on 1.32 acres, in-ground pool, Jacuzz Great Country Setting 3/2 on 2 acres in the Mini Farms. Easy to Qualify. $4,000 down and $560 mo. (352) 795-1272 Just what you've been looking for. New 4/2 on 5 acres. Zoned for agriculture. Horses Welcome. $6,000 Down $750 mo. (352) 795-8822 Excel. Cond. 100' x 200' behind Wal-Mart, $47,500. (352) 422-0605. Call for directions 352621-0119 -l 1 carport, $16,000. (352) 628-4608 CRYSTAL RIVER 55+ Park, like new inside & out. 2/1 2. By owner. Never smoked in, $116,500. (423) 476-3554 CRYSTA'IRtrV VILlAGE Fully furnisthe6d'2/2 dollhouse, must see. Large double carport. $75,000. (352) 795-6895 Immac. DW 2/2 Cmptr. rm. Scrn. prch. dbl-crprt shed, W&D, turn. 55+ pk $39,900 352-628-5977 Over 3,000 Homes and Properties listed at homefront.com Inverness 2/1 duplex near Whispering Pines .-..... ..$47 2/1duplex in downtown...$595 2/2 condo in inverness Landings..... 31..$600 Gorgeous Condo in Laurel Ridge, 2/2..............$850 3/2 newer home on Stewart Way.. .................. $1000 3/2 home on Liberty. Possible 4" room.....$1100 Other Areas 3/2 on 3 acres in Floral City........... ................. $1000 Pine Ridge 3/2 new home........... .................$1200 Landmark Realty & Property Management 352-726-9136 645217 "1- ,g. Copyrighted Material 'b * - f* Syndicated Content P o Available from Commercial News Providers Advertise Here for less than you think!!! Call Today! 563-5966 *~~ -.- w am 0 4w -4b -Am.4 g9aug9e4414. __- 4b . Needajob _ or a qualified employee?" This area's #1. employment source! - Classifieds MONDAY. SEPTEMBER 26, 2005 11B Crystal Palms Apts 14 2 Bdrm Easy Terms. Crystal River. 564-0882 INGLIS 1/1 'Furn/Unfurn. On river. 1425 mo. 352-447-2240 SINVERNESS Inverness Landings 2/2 eat-in kitchen, ,' enclosed porch. i500/month. 1st, last, sec. dep. 352-341-1847 SUpARMILL WOODS r 2/2/1 Villa on Golf louise, Furn. Lawn Serv, Inc! $850, 1st, last & Sec. S, (352) 422-6030, SU&ARMILL WOODS Beautiful, 2 bed/2 bath, donrdo, Immed. Occu- 'poncy, 352-628-3899 VILLA FOR RENT i /2, Carport, Gar. Full Appl. $700 mo. 92-628-5980 Mon-Fri r3S2-628-7946 Sat-Sun CRYSTAL RIVER /1, with W/D hookup, I~(, wtr/garbage Incl. $60pmo., 1st, Last & sec. No pets. 352-465-2797 C EYSTAL RIVER 2/2 492N EImwood Pt. $495 -+se' $990 352-795-7028 - INVERNESS $411 2/1 w/ garage w/ W. hookup, $580mo, $P sec. 352-344-9334 'FLORAL CITY 1/1 S400 mo. $600 sec. No gets. 352-637-9036 HOMOSASSA Stdilo apt.suitable forl 352-613-2332 Sf Daily/Weekly l Monthly n Efficiency $600-$1800/mo. Maintenance Services Available Assurance Property Management 2-726-0662 | -4EVERLY HILLS JACKSON ST. $675 1, Lg, Family Room, Living Room. Nice Yard. %5 California St. $675 S 51 Living & Family -barge 2/2, family rcoom plus extra .Florida room, garage, new appliances, freshly painted, etc, etc. $850. Good area. .0 CllI 746-3700$ Ral Estate Agent , BEVERLY HILLS 2/1'1, FIRm, remodeled new carpet & paint, $695/mo, 832-444-7796 1 own, 30 yrs. @5.5% bdrm. HUDI Ustings 1-749-8124 Ext F012 i~)anice Holmes-Roy Property Mgmnt. S52-795-0021 We need units furnished & unfurnished 352-795 0021 S21,. 'NATURE COAST -'bEVERLY HILLS 10/1 CH/A, Fla. rm, Com- plete Long/short lease '$650+ (352) 637-3614 -BEVERLY HILLS 2/1/1, quiet area,1st., 1st., sec., $725. mo. 352-795-6525 SHOMOSASSA large 2/1, $200 weekly. atean, 1st., last, security. ; ,(352) 628-7862 OZELLO ; Crhrmrr,.: 2 2 cot- 'lage rr. .,.aier aDc.,ii- -ar..: .: er,..: -. i. .r' .n i Jprr. 813-920-6544. YOU'LL L THIS Llvil, il~~ I 3/2:' 11,.2 on i Tamerlsk Ave. $875. mo Please Call: (352)341-3330 For more Info. or I visit the web at: Scitrusvillaages BEV.HILLS 3/2+ FamRm $740+ $ 1,000 dep. 795-1722 BEVERLY HILLS 1-2ft, Carport, commu- pool, $650. mo. 4W613-2238, 613-2239 BEVERLY HILLS 2/3/2, complete window coverings, carpet, $900. 1st & 1st Collect, 561-964-5722 BEVERLY HILLS 3/1, clean, carpet, laundry Rm, 382-3525 BRAND NEW HOUSE SUGARMILL WOODS New 4/2/2 $1250 River Links Realty 628-1616/800-488-5184 Cit.Hills Presidential Brand New 3/2/2. $955/mo 344-2796 CITRUS HILLS 3L/2L2Citrus Hills $1200 3/2/2 Laurel Rdg $1300 3L2aPool, Oaks $1500 3/2 Pool, Kensington $1300; 3/2 Canterbury $1500; I/2.Laurel Ridge, $1300; 2/2 Bev. Hills $850 All include lawncare Greenbriar Rentals, Inc. (352) 746-5921 CITRUS SPRINGS Brand new 3/2/2, for- mal living & dining rms, great rm, kitchenette. No smoking/pets. $950 mo. + security, credit check. 989-644-6020 CRYSTAL RIVER 3/1 Stilt, outside pets neg. $750+ sec. 746-3073 CRYSTAL RIVER Beautiful 2002, 3/2/Lrg fenced yard, boat storage, $1300mo. Contact Usa/BROKER (352) 634-0129 CRYSTAL RIVER Lg. 2/2/2, No pets. $800/mo + 1st, last, sec. Call Matt 352-228-0525 HOMOSASSA NEW 3/2 Nice area of homes, near community parks, $900. (352) 621-3949 INVERNESS' 2/2, No pets, No smoking. $690 mo. + sec. (352) 860-2055 INVERNESS 3 bedroom, nice, quiet, clean, avail. immediately $950 mo. 352-613-6262 INVERNESS 3,'0.12 on.n a.:r 1-:. I :. Sappl,'L r.e-,. poinl rn.r, 352-489-6729 7-i4-2t4-32fe, i-.-,- ON LAKE Inverness, Beautiful 3/2/2, Lrg Oaks, no pets. $850 mo. 908-322-6529, PINE RIDGE 3/2/2, 1800 sq. ft., 1 acre, $1,000.mo. + utilities. (352) 527-2441 SUGARMILLWOODS Home & Villa Rentals Call 1-800-SMW-1980 or SUGARMILL WOODS On golf course, 3/2/2, Fresh paint, extra clean, $1250 mo. 352-621-0143 CRYSTAL RIVER Efficiency w/dock. Furn. $500mo, 1st & Sec. No smoking! 129 Paradise Pt 352-422-6883 House, Cabins Travel Trailers & RV spots avail. Short or long term. Excel. cond, on River w/ boat access. Big Oaks River Resort (352) 447-5333 WITHLACOOCHEE River, 3/2. Avail Oct. 1 Call 904-334-1738 YANKEE TOWN 2/1 River House, W&D, NQ PET, $650 + 1mo. sec. dep. Wtr. & grbg. incl. 352-543-9251 HOMOSASSA. Bed/bath, background check, $500 mo. (352) 503-3298 CRYS. RIVER 2/1/1 Furn. Slps 6. 3125 N Eagle Pt. Pwr Boat lift, gorg. view. Canal to Crys. Rvr Lease by Wk. Mo..or Seas. Call for details (352) 369-6666 CRYSTAL RIVER Furn. I I I MR cm cau & ALAN NUSSO BROKER Associate. Real Estate Sales Exit Realty Leaders (352) 422-6956 BECAUSE THERE IS NO SUBSTITUTE FOR FXFIYD:|rr Plantation Reality Inc. Usa VanDeBoe Broker (R)/Owner (352) 422-7925 See all of the listings in Citrus County at realtvlnc.com Becky Wein (352) 422-7176 Free Home Warranty No Transaction Fee Personalized Service For All Your Real Estate Needs Onaw, Nature Coast Bweln.c21nature. OPEN HOUSE BY OWNER SUN. OCT. 2, 12-4 5745 N LENA DR. ,won't be disappointed. OPEN HOUSE SUNDAYS from 1-5. Or call for a showing, (352) 621-4602 AMERICA'S CHOICE MORTGAGE Self Employed No No Income Loans Commercial Loans- Stated Income Good or Bad Credit Construction Loans Equity Lines of, Credit Call for a Free Quote (352) 382-2004 My Loan Service added $2A00.00 to my client's bank account this year If your bank says NO Call me, Kira at 352-795-5626 and ask for Program 99 SOLUTIONS FOR MORTGAGE Compeittive Ratesil Fast Pre-Approvals By Phone. SSlow Credit Ok. ,m Purchase/Ref. FHA, VA,and Conventional. Down Payment Assistance. Mobile Homes Call for Details! Tim or Candy (352) 563-2661 Lic. Mortgage Lender oi --I DWELLING UNITS. Currently 4 rentals. 2400 liv. area total, 4BR/4BA CH/A, country setting 1-AC mol $250,000 (352) 726-1909 Brokers welcome 5 ACRES= 7 Lots, 3 doublewldes= 4/2. d 1 2 singlewides. Barn, DONNA HUNTER ponds. $270,000. Realtor (352) 795-3019 Selling or Buying, (352) 212-4737 call me today. For the EXIT way of GOT INCOME? exceeding your Real NO DOWN PAYMENT? Estate expectations. 7ZERO EXIT REALTY ZERO LEADERS DOWN LOANS (352) 422-4235 2002 4/2/2 POOL HOME Great family home, near schools. $218,900. Also lot available next door @ additional cost. (352) 489-9418 2003, NEW 3/2/2 Lg corner lot, cath. ceil- ings, Ig. eat-In kit, scrn. lanai, move in perfectly Asking $176,500. (352) 302-4847 3/11/2 Central heat and air, new roof $102,000. obo (352) 212-3997 3/2/2 2614 sq.ft. Fam. rm., pool, cath. ceilings, tile throughout, lots of new upgrades, privacy fence, must see. Call -for appt.$189,900 (352) 465-5576 Servlce/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & Compare $150+Million SOLDII! Please Call for Details, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. Richard Max Sims 352--27-1A67 I .r "-,g , List with me and get a Free Home Warranty & no transaction fee 352-527-1655 -21. Nature Coast 'Your Neglahborhood call Cindy Bixler REALTOR 352-613-6136 cblxler15@tampa Craven Realty, Inc. 352-726-1515 -a~IB 4053 W Alamo Dr. 3/2/2 Open Floor Plan on acre. Relocating, 1700 sq.ft. AC. $225,000 (352) 249-0850/2/2 Split Level Open Floor Plan, Ranch Style 3125sf. under roof on 1+ well landscaped acres, fenced, ready for horses. Pool, oversized rooms, master suite w/jacuzzl, recently re- modeled "Old World" style gourmet kitchen, entire home newly painted. $369,900. (352) 746-5771+Millllon SOLDIII Please Call for Details, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. Nature Coast For Sale By Owner, Clean 2/2/1, fam, rm. C/H/A, 7 Mellssa Dr., $107,500. 352-527-7191 HOMES FOR SALE BY OWNER www. bvownercitrus.com Newly Remodeled 3/2 on 1/3 acre, all appls., .$127,900. (352) 746-5969 RENT TO OWN - NO CREDIT CK. 2/1/2 $725 mo. 321-206-9473 visit jademisslon.com. KENSINGTON ESTATES Beautiful 3/2/2 CBS on 1 plus acre. Renovated, Lots of storage. Split Plan, Vaulted ceilings, Screened lanai & pool Tile, carpet, laminate, Therm. wndws & doors Shown by appt. only. $295 back yard, to much more to mention. Shown by Appt only. $318,500. (352) 341-4582 TERI HANSON 352-220-8399 Free Home Warranty for Buyers & Sellers No Transaction Fee. 352-220-8399 NATURE COAST CITRUS REALTY GROUP 3.9% Listing Full Service/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & compare S$150+Milllon SOLDIII Please Call BEAUTIFUL FAIRVIEW ESTATE HOME Situated on a secluded, wooded 114 ac. 3/3+ den pool home with oversized 2 car garage. Must see to appreciate Call for appointment No brokers please, $349,900 637-5005 or 464-0647. FREE REPORT What Repairs Should You Make Before You Sell?? Online Email debbie@debbie rector.com Or Over The Phone 352-795-2441 DEBBIE RECTOR Realty One Swww:buyflorlida homesnow.com I LINDA WOLFERTZ I/2V2/2+, Ig. encl. heated self cleaning pool, close to tennis court, dock & boat ramp, all apple. many upgrades $264,900. (352) 341-1618 (2) CBS FINISHED DWELLING UNITS. Currently 4 rentals. 2400 liv. ared total, 4BR/4BA CH/A, country setting 1-AC mol $250,000 (352) 726-1909 Brokers welcome 2002, 3/2/1, new apple, new carpetcul-de-sac, clean, $134,900. (352) 564-1764. Investment C= PrOL C" Pro erties (Some Restnclons May apply) Carol Scully 2930.,n92.AO9 P 1x List with me and get a Free home warranty & no transaction fees 352-302-6912 SN--te aet1, Nature Coast CHRONICLE Steve & Joyce jonnson Realtors Johnson & Johnson Team Call us for all your real estate needs. Investors, ask about tax-deferred exchanges. ERA American Realty and Investments (352) 795-3144 David Bramblett . (352) 302-0448 Ust with me & get a Free Home Warranty & No Transaction Fee (352) 302-0448 Nature Coast Donna Raynes (352) 476-1668 "Here to help you through the Process" homesandland.com donna@silverkina proPerties.com CLASSIFIED BY OWNER /22/screened porch, new CH/A, Irg. lot $84,500. Leave msg. (352) 860-1189 or (352) 212-2737 /2 acre, 1726 sq. ft., island kit., Ig. MBR suite, $198,000. Priced to sell! (352) 344-2711 . CITRUS REALTY GROUP 3.9% Listing Full Service/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & Compare $150+Mllllon SOLDl!l Please Call for Details, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. FOR SALE BY OWNER Inverness Highlands West,, 2/1, 1431 sq. ft. under rf. 1087 llv., completely fenced yd. newer AC, $116,000. (352) 461-6973, Cell. GOT INCOME? NO DOWN PAYMENT? ZERO DOWN LOANS 1-800-233-9558 x 10051 Recorded Message Get your FREE copy of "Five Easy Steps To Buying a Home" cir@fhhmc.com a correspondent lender HIGHLANDS 3/2/2 , Block home, 2004 sq.ft. under roof. 1200 sq.ft. living. Newly carpeted & painted Inside,screen porch. $140,000 (352) 603-2741 or (352) 461-6973 HOME FOR SALE .On Your Lot, $103,900. 3/2/1 w/ Laundry Atkinson Construction 352-637-4138 Uc.# CBC059685 HOMES FOR SALE BY OWNER byownercitrus.com JACKIE WATSON WHERE IS RIVERHAVEN? A quiet community located at the end of U. BYOWNER hT,,r...:ul' 3/2/- p r :.l. r, .., or ,l rm, screened patio, on oversized lot. Tile/ carpet. AC w/heat pump, 5 ceiling fans, W/D, refrigerator, dishwasher, disposal, range w/oven. Asking $189K neg. Immediate occupancy. 352-382-5780 CITRUS REALTY GROUP 3.9% Listing Full Servlce/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & Compare $150+Mllllon SOLD!!! LUXURIOUS SWEETWATER POOL HOME In the ENCLAVE. 2746 sq.ft. in model home condition. On corner lot with many extras, $389,000 (352) 382-3879 SUGARMILL WOODS Golf Course Home 3/2, pool, fireplace, on Oaks Course, must see!! $275,500. CITRUS REALTY GROUP (352) 795-0060 WAYNE CORMIER (2) CBS FINISHED DWELLING UNITS. Currently 4 rentals. 2400 liv. area total, 4BR/4BA CH/A, country setting 1-AC mol $250,000 (352) 726-1909 Brokers welcome HOMES FOR SALE BY OWNER www. bvownercitrus.com KATHY TOLLE (352) 302-9572 -- _.wSS Custom Built House 3/2'/2/3 car detached garage, in ground pool, many extra's $289,000. (352) 212-3613 HOMES FOR SALE BY OWNER www. bvownercitrus.com Sharlene Croud 352-613-3699 Over 3,000 Homes and Properties listed at homefront.com SEENTHIE REST? WORK with the DEMII I Ile Licerd MU. Broker '(Waterfront, Golf Investment, Vacantn Land and Relocationnr Citrus, Marion andnd Hernando .'c Call for free CMA Dave Schmitt Realtor (R) 352-503-415 352-628-5500 dave@prorealtor.us "Here to Help you Through the Proce]ss" HBeverly Hills omes 3 BED 3 BATH BANK FORECLOSURE Only $24,000! For listings 800-749-8124 Ext H796 $184,900 FLORAL CITY 3/2/2, GR/DR Eat-in-Kit Grdn. Patio, W/ Fountain, Lanai, Generator wired Great location. Rear pasture view, Adult Community, For Details 352-726-0995. floralcitvlic@aol.com VM crRysCOUN7Ti ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 Call Me PHYLLIS STRICKLAND (352) 613-3503 EXIT REALTY LEADERS. FREE REPORT What Repairs Should You Make Before You Sell?? Online Email d6bbie@debbie Or Over The Phone 352-795-2441 DEBBIE RECTOR Really One' homesnov.corn HIGH & DRY, 488 & 495 3 miles to future Park- way exit, 3/1, 10 acres, blacktop road, $350K 5 lots all connected to 10 acres, homes only $35K ea. Or make offer on whole package (352) 601-2727 HOME FOR SALE On Your Lot, $103,900. 3/2/1, w/ Laundry Atkinson Construction 352-637-4138 Lic.# CBC059685 List with me and get a Free Home Warranty & No transaction fees 352-613-3699 Nature Coast C=1 **4 Real Estate Ic= for Sale I v -If 32B MONDAY, SEPTEMBER 26, 2005 CitrusCont *f ro nt C= Hmes co Hms Homes from $7.0001 Foreclosures 1-3 bdrm. For Listings 800-749-8124 Ext 9845 REAL ESTATE CAREER Sales Uc. Class $249. Now enrolling 10/25/05. CITRUS REAL ESTATE SCHOOL, INC. (352)795-0060. SUGARMILL WOODS Golf Course Home 3/2, pool, fireplace, on Oaks Course, must see!! $275,500. CITRUS REALTY GROUP (352) 795-0060 Vic McDonald (352) 637-6200 ...- k - t Realtor My Goal is Satisfied Customers REALTY ONE < OntsiandiagAgents Oulxbnding RtaSlit (352) 637-6200 We're Selling Citrus!! NO Transaction fees to the Buyer or Seller. Call Today Craven Realty, Inc. (352) 726-51515 Rainbow Springs Desirable Woodlands, 3/2/2, 1+ acre, 1990 sq.briar 1-AC mol $250,000 (352) 726-1909 Brokers welcome -I Over 3,000 Homes and Properties listed at homefront.com SUGARMILL woobS Golf Course Home 3/2, pool, fireplace, on Oaks Course, must seell $275,500. CITRUS REALTY GROUP (352) 795-0060 WAYNE CORMIER Here To Help! Visit: waynecormler.com (352) 382-4500 (352) 422-0751 Gate House Realty CITRUS REALTY GROUP 3.9% Listing Full Service/MLS Why Pay More??? No Hidden Fees 20+Yrs. Experience Call & Compare $150+Milllion SOLDIII Please Call for Details, Listings & Home Market Analysis RON & KARNA NEITZ BROKERS/REALTORS CITRUS REALTY GROUP (352)795-0060. 3/2 CONDO Furnished. Gated community- Boatsllp on Crystal River.Clubhouse, pool, tennis court. $295,000.(352) 564-0376 CRYSTAL RIVER, 3/2, over 175ft on water, $575,000. Contact Lisa BROKER/Owner (352) 422-7925 I Evelyn Surruncy Lst with me & Get a Free Home Warranty & No transaction fees 352-634-1861 Nature Coast LET OUR OFFICE GUIDE YOU ! Plantation Realty, Inc. (352) 795-0784. Cell 422-7925 Lisa VanDeboe Broker Licensed R.E. Broker ,r Leading 'Indep. Real Estate Comp. -w Citrus, Marion, Pasco and Hernan- do ' Investment, Farms & Relocation a- Excep. People. Except'nal Properties Corporate Office properties.com :---.21.Co Nature Coast 1st Choice Realty wvon't be disappointed. OPEN HOUSE SUNDAYS from 1-5. Or call for a showing (352) 621-4602 YANKEETOWN 2/1 On deep water canal, woodburning fireplace. encl. Fl. rm. boat house w/ lift, 24x25 wkshp. Seawall & dock. $369,000. OBO (352)447-1758 WE BUY HOUSES & LOTS Any Area or Cond. 1-800-884-1282 or 352-257-1202 OLDER COUPLE wants fix-up type home,' Cash- fast closing. (352) 628-4391 WE BUY HOUSES AND LOTS Cash....fast closing 727-347-1099 WE BUY HOUSES Any situation Including SINKHOLE. Cash, quick closing. 352-596-7448 WE BUY HOUSES CaSh........Fast I 352-637-2973 lhomesold.com CITRUS HILLS, 1 acre $74,900; CITRUS HILLS 1/2 acre, $68,900; INVERNESS 1/4 acre + $26,900 Great An, r ,I :.il, & 3Ir .',2-,I 3. 7i-3 l 352-637-3800 Upscale Inverness High- lands neighborhood. Wooded. $30,000 OBO. (352) 726-7586 eves. CITRUS SPRINGS 2 side by side lots, 1 large corner lot. $41K ea. obo (386) 793-3980 Citrus Soringas. Beautiful Corner Lot w/ adJ. lot, many new homes in area. Near new school. City water, both lots 100K or 55K each. (239) 593-1335 (239) 591-1287 CITRUS SPRINGS, two duplex lots, side by side, N. Travis Dr. Also N Sandree Dr lot. $38,000 ea. (352) 666-1128 mi. to public ramp on river, $59,900 Parsley Real Estate, Inc. (352) 726-2628 HOMOSASSA 3 acres high & dry close to shopping & river ac- cess 15 minutes to gulf REDUCEDI$ 150,000 call 352-286-4482 very motivated to sell INVERNESS Heatherwood, 1 1A ac., 167 x 306 ft. Fenced, quiet near forest, $40,000 (352) 341-1901 KENSINGTON ESTATES Great Acre, corner lot Steal at $79,500 nego. Call (954) 629-5516 LOTS FOR INVESTORS/ BUILDERS, Residential Lots for Sale, $35,000. ea., 407-697-9967 realestatelandsales@ hotmall.com Pine Ridge 1 acre lot on West Toll Oaks Drive $100,000. (352) 628-1425 PINE RIDGE 2.75 acres, by owner. 2692 N. Sheriff Drive $175,000. 610-756-4033 PINE RIDGE ESTATES Prime 1.06A Level Lot large Oaks. 4563 N. Lena $113,000. (352) 621-6621 WANT BETTER RETURN ON YOUR MONEY? CONTACT US. - WATERFRONTI Over one beautiful acre in Floral City just off Hwy. 41. Call (352) 302-3126 RAINBOWS END .46 acre lot located in Dunnellon, non restrict- ed deed comm., close to two golf courses. 6^s nnn (521Ac -n 35cc 1.22 ACRES in Inverness $49,900. Call Brian, (352) 299-6369 4 LOTS, HOMOSASSA Well & septic. Off 490. Nice dry area. (352) 341-0459 7 Rivers Golf Course ready to build on, 150 x 150, $100.000, firm (352) 795-0527 Building Lots in inverness Highlands, River Lakes & Crystal River. From $16,900. Call Ted at (772) 321-5002 Florida Landsource Inc CAROL JEAN YOUNT 352-476-6954 Free Home Warranty for Buyers & Sellers No Transaction Fee. 352-476-6954 NATURE COAST CITRUS BUSHHOG Bobcat/Debris removal Llc.#3081, 352-464-2701 CITRUS SPRINGS 20 LOTS FOR SALE 30K-34K each, 407-617-1005 CITRUS-OCALA-PORT CHARLOTTE, OVER- SIZED & 1/2 AC. Call 888-345-1668 TCHTRE greafflorldalots.com CITY OF INVERNESS New dead restricted development. Beautflul 1/4 acre lots, Paved r. ,., ,1 Itill .- 'i 4 I,..1 ) (35;) 2 J- 006 FOXMEADOW '. i l i I r .. I I .11 1 n Yii , I [ 1 .1 1 I rV^f t M'-\, 6,; INVERNESS HIGHLAND S By owner, 80x120 Excellent location $27,500 (516) 445-5558 INVERNESS LOT $18,500 (352) 422-0605 Inverness over RIVERHAVEN VILLAGE 85x183 11754 W Fisherman Ln $60,000. (352) 628-7913 SUGARMILL WOODS Oak Village South. Call (352) 382-4054 SUGARMILL WOODS Lots for Sale By Owner (352) 228-7710 WAYNE CORMIER Here To Help! Visit: waynecormler.com (352) 382-4500 (352) 422-0751 Gate House Realty 1/2 ACRE CANAL LOTS $29,900-$39,900 Great American Realty & Investments Inc. 352-637-3800 -U- 1994 Merc Outboard 7.5 w/ 9.8 carb. new stator, trigger switch & water pump. Low hrs. mostly fresh water. $700, (352) 564-6847 PONTOON BOAT TRAILER Scissor Type Single Axle,'$650 352-422-6471 SEA DOOS 2000 2-milllnium edition SEA DOO GTX's. 1 has depth finder. Trir incl $7,500/obo (352) 860-0299 Single Jetski Dock $650 Call Lisa . (352) 422-7925 0000 THREE RIVERS MARINE We need Clean used Boats NO FEES II AREAS LARGEST SELECTION OF CLEAN PRE OWNED BOATS U. S. Highway 19 Crystal River 563-5510 2000 PRO-LINE 18SU, CC, 130 Johnson, Bimini, Dual Batt., Electronics, VHF $12,000 795-8014 14' AIRBOAT rod boxes, polymer, c/f prop, 0480 angle Valve Lycoming $10,995.00 (352) 726-5774 24' Pontoon Boat Suntracker, 2 Honda motors, $7000, (352) 548-1507 AIRBOAT 2001, GTO, 15 ft., Alum, Seats 4, stainless riggin. 2003 crate eng, GM 350, w/ 330HP, 55hrs. 3 blade carbon prop, reduction gear, polimier, tandem trir., 40gal fuel tank, sr. owned $17,995 Inverness 352-341-0509 Cell 434-489-1384 AQUA SPORT 17' CC, alum. I-beam trir. New Nomex string- ers flat. Lots of extras. $2400/obo, 795-4959 BANDIT 14ft. Air Boat, 2 dbl. 350HP, polymer, gear box, everything new, $10,500. w/ out prop $12,500. w/ prop. (352) 341-5900 BAYLINER 17FT '88 Capri, 85HP + trailer $1,200 (352) 637-3614 BAYLINER 1986 16FT Capri, con- vert, top, fish finder, 50HP Mere. Never In salt water, extras, 637-7142 BOWRIDER 18' W/trailer, 1989,4.3 V-6, In/out, great .go many xtraos, ' C A l', r n. J,;lll. **. CANOE 16 Old Town Camper Modeil, Paddle and criJ or roof I l II Il -' I'j ,n th, t,, .4I iv,8i 114i / H ANDYMAN SPECIALS 10 PONTOON BOATS 18'-30' Priced From $995,-$8,450. 2 DECKBOATS Priced From $1,995.-$2,995. CRYSTAL RIVER MARINE HONDO Rare Ski Boat, 300 merc, mint cond. 100mph. too many extras, all custom, must see $28,000. Invested, make offer (352) 341-5900 HOUSEBOAT 1970, 34', NAUTA-LITE, Fi- berglass, Yamaha 85hp, Hydrolic steering, A/C, needs finishing, Handymans dream, $7,900. Take it away. (352) 795-0678 HOUSEBOAT 22', new, fiberglass over wood, 8' beam, no motor, $6800. (352) 621-0574 IMPERIAL 1987 24' walkaround cuddy, Merc I/O, galv. trailer, electronics, $4500 352-795-7044 JON BOAT 14', Aluminum, 1998, w/ 1995 15hp Yamaha & trailer, $900. (352) 220-6055 JON BOAT 15', Aluminum w/ swivel seat, 25hp EvinrUde, trolling motor, trailer, and Accessories $1500. OBO. (352) 302-9835 JON BOAT 9 .POLAR. BAY BOATS Crystal River Marine 352-795-2597 Kayaks 2 Pungo 120's, all accessories plus helmets excel. cond. $1100. (352) 795-9384 MAKO 26' CC, 2200 HP Mariners, tandem trlr. Plus extras, $20,000. (352) 628-7525 MERCURY MARINE 360 RIB, 11FT dinghy, 9.9 Mercury engine, boat, motor & trailer, $2,800 (352) 795-4222 PONTOON 20FT, all alum. deck, fish or cruise, 80HP Mariner, runs, but needs some work, no trailer, a must see, $4,200 209-6070 or 637-0145 PONTOON BOAT 20' New floor & carpet, no trailer, $1800 OBO Ph: 352-212-9718 or 726-7116 PONTOON BOAT 20' with trailer, 2004 40HP Mercury, $8000 obo. (352) 628-5349 PROSPORT 20', 2002, 90hp Suzuki 4 stroke, approx. 100 hrs. on boat & motor.,Elec. & trlr. V- clean. $14,500. (352) 527-4224 READY TO FISH 18' ctr console alum. vhull 1988 Fischer Boat w/ 1990 -60hp Johnson $2800. (352)795-6692 RIVIERA 15' pleasure boat. New fiberglass, 50HP rebuilt Mercury. $500. (352) 564-9575 ROUGHNECK 1996,17', Yamaha 70hp, trailer, bimini ,CD, duel batt. elec tilt/trim $4,200 (352) 220-4543 Shipoke 15' Custom Made, flats boat, 90HP, inboard Jet engine, manatee friendly, magic tilt trailer, pole platform, 60" new trolling motor, $6,500. (352) 489-5472 SPORTCRAFT 20' '84 CC, 175HP Johnson O bd rebuiltt 03) tandem trlr, BIm. T-top. $4500/ obo. (352) 628-2954 STARCRAFT 1968, 14FT. 15HP motor, All redone with receipts, as of 8/05. Boat, motor & trailer, $850 obo (352) 860-0892 STINGRAY 17ft, fiberglass boat w/2003 trailer, 120HP I/O engine, asking $1825 (352) 527-1263 THOMPSON 1990 28' w/10' beam, too many new parts to list. Runs great, $8,000 352-637-5262 Wellcraft 1994 20', V-6, inboard/ outboard, galvanized trailer, needs repair. $2,500. (352) 344-1413 76 DODGE COBRA MOTOR HOME completely remodeled Inside runs well $4,500.00 obo 352-220-1751 ALLEGRO 1991, 31', class, A, base- ment, 57k ml., Onan gen., rear qn. bd. non smoker, newer tires, $16,600., 352-422-4706 COACHMAN ',' 'l ,. II IIH I .I I 'H i hi e. -7 , ', FI EETWOO 3,80I0 ri N19 Many ( [ I. w. 7110 f, 9 ,I ',., in 1 if,dtta v' di~ll lc= fBoats TOPS, (352) 949-0094 -M WE.FNANCE.YOU 100 + CLEAN DEPENDABLE CARS ROM-'350-DOWN 30 MIN. E-Z CREDrIT 1675. US19-HOMOSASSA *odeM/lS m, Incl, sunroof. 60,000 mi. Exc. condition. $9700. (352) 795-6886 MUSTANG 1997 GT convertible White/ beige, like new, 27,000 mi. $10,000. (352) 344-0399 or 422-6695 MUSTANG COBRA '97 Turbo, BIk. cr. coat, Ithr, 44k, 5spd, new clutch & alum eng. 18 & 25MPG, 352-560-4279 PORSCHE 944 1985, auto, red & black runs great, sharp inside & out $4,995. obo (352) 465-2070 Cl-A.SSI[FICED:S FLEETWOOD '94 Prowler 5th wheel, 26FT, very good cond., $7,000 obo (352) 476-8315 GULFSTREAM '02, Cavalier excellent condition reduced, $18.000. obo (352) 527-1836 HOLIDAY 1998, 34' Rambler, w/ all toys, 44k, $38,500. (352) 422-4548 Search 100's of Local Autos Online at wheels.com COACHMAN 25' w/CHA, new tires, everything works, $3500. (352) 726-1187/650-2601 COACHMAN '94 Fifth Wheel, 24FT, 1 slide out, light weight, Irg. kitchen w/dinette & couch, sleeps 6 easy. New canopy, $5,900 (352) 422-1026 JAYCO 1996,26', good cond. New tires & brakes. Equalizer hitch & extras. $6000. (352) 527-3409 ABSOLUTE v LIQUIDATION of Douglas Ridenour Repair *SAT. OCT. 1* 5645 Pine Tree Pt. LECANTO (491 So. of Grover Cleveland, West into Leisure Acres, follow double yellow line to left on Glenn to Rt. on Pine Tree. Sale on Left) PREVIEW: 8 AM SALE: 9AM Highlights include Rotary lift, RTI ref. reclaimer, air, power & hand tools. AMMCO brake ' lathe, 12 ton press, torch set, Powcon AC/DC migtig welder, collector car parts, Troy chipper + more! See Photos on Web: www. dudleysauction.com. DUDLEY'S AUCTION (352) 637-9588 AB1667 AU2246 10% Buyers Premium 1989 Ford 302 Motor w/transmission, runs great, $500. OBO (352) 302-9957 MASTER TOW DOLLY 2005 Master Tow dolly used twice. Great shape. Model 77T-14. GVWR 3500 Ibs. $825.00. 527-8376 RACK FOR SMALL TRUCK Steel, 1" sq tube over cab, $100. (352) 564-0690 evenings TOW DOLLY 2002, Like new, under 1,000 miles on it. $650. NICHE RIMS & NEW TIRES, 5 lug, Chrm set of 4, $500/ obo, MUST SELL (352) 302-9443 -U 1993 CHEVY CAPRICE CLASSIC 72k, 5,0 Wgn. AC, Trailer Hitch, $3500 OBO 352-795-5965 2005 CHEVY CORVETTE 12500 MILES, $49,500 MUST SELL, WHITE, MAN. 6 SPEED, 4MOS, CASHMERE LEATHER, 2 CITRUS COUNTY (FL) CHROVLLE Ra GMC SONOMA 1999 SLS, 61K mi. 5spd. Alloy wheels, AC, CD player, Fiberglass top. $7400.(352) 465-8233 NISSAN 1987, SE V6, 5spd, cold air, sun roof, $1895. (352) 341-2259 1995 DODGE INTREPID 100,000, $1,000.00 Motor & Body In great shape, trans. issues only(352)746-7309 00 + CLEAN DEPENDABLE CARS FROM-1350-DOWN 30 HMN. E-Z CREDIT 1675- US19-HOMOSASSA -*BIG SALE- CARS. TRUCKS. SUVS CREDIT REBUILDERS $500-$ 1000 DOWN Cledn, Safe Autos CONSIGNMENT USA 909 Rt44&US19Airport 564-1212 or 212-3041 BUICK 1995 Roadmaster station wagon. Excellent cond. $3500. (352) 465-3683 BUICK '94, Century, 4 DR. auto, cold AC, 102k, 1 own, runs perf., needs paint, $1,350. (352) 422-0126 AFFORDABLE CARS 1oo00 + CLEAN DEPENDABLE CARS FROM-350-DOWN 30 MIN. E-Z CREDIT 675 US 19 HOMOSASSA BUICK LACROSSE 2005. MUST SELL DUE TO ILLNESS, low mileage. (352) 266-3765 Cadilac 1997 Fully loaded, new tires, g cond. $8900. (352) 344-1482 or 212-8661 mi., $6,250. (352) 637-1132 CORVETTE 1991, exc. cond. Serious buyers only. $13,500. Rick, 352-560-7413 after 6pmr CORVETTE '99, white convertible, tan top & interior, abso- lutely immaculate, only 32,500 mi., chrome rims Must see, asking $28,500.(352) 270-3077 '90, Mustang, 5.0 car- bolated, many extras $3,200. obo 352-697-1355 FORD CROWN VIC. 1989, Runs good, looks good, air is cold. $850/ obo (352) 860-2207 FORD TAURUS 1994, 110K, runs well. $900/obo (352) 382-7391 S HONDA 2000, Odyssey, 7 pass, full pwr, great shape, 66,500mi, new brakes/ tires, alloy wheels, $13,000 obo 726-5256 MAZDA RX7 '91, Rotary engine, 5 spd, pwr sunrf, PW, P/S, P/B, 140k mi, runs great. $2,200firm. 352-637-3811 MERCURY "MBCSTR SCOVNTf Caaa,-.2.6, . ALAN NUSSO BROKER Associate Real Estate Sales Exit Realty Leaders (352) 422-6956 CHEVY 2000, Venture, well maintained good cond. good tires, cold Air, rear air, CD, white, gray interior $5,800. (352) 697-1613 CHRYSLER LXi '96 Town & Country, 3.8 V-6, all pwr, Ithr, dual rear air, great cond, $3895. (352) 637-3550 DODGE 1990 Van, needs transmission filter, $500 (352) 637-4794.com ATV + ATC USED PARTS Buy-Sell-Trade ATV, ATC. Go-carts 12-5pm Dave's USA (352) 628-2084 Honda 200 3 wheeler, late model, excel. cond., w/ramps, $795. (352) 563-2583lll $4000 (352) 422-1466 HONDA 1985 for parts, $500 (352) 726-4785 Search 100's of Local Autos Online at wheels.com TOYOTA 1985 Camry, hatch- back, runs good, $400 (352) 726-4710 (352) 302-4310 VOLKSWAGON 1986, Cariola Connv., red, runs good, $2000. OBO (352) 527-3519 '95 Lincoln Town Car Exec. Drk Green,vory Leather, Nice...$4,980 '98 Cadillac DeVille WitewlGrey Leal r,L aded.......,. 95 '99 Dodge Ram 1500 Ext. PIU 4DM Lealher, Topper, Loaded ...$8,975 '02 Isuzu Rodeo SUV 50Dr.,AllPower, Extra Clean ................$8,980 MANY MORE IN STOCK ALL UNDER WARRANTY AUTO/SWAP/CAR CORRAL SHOW Sumter Co. Fairgrounds Florida Swap Meets October 2nd 1-800-438-8559 MUSTANG 1965 289 V-8, $2,400 obo (352) 628-2769 PLYMOUTH 1937 Street Rod. 350 eng. Auto trans. AC, PS, tilt wheel, custom paint with flames. Loaded Search 100's of Local Autos Online at wheels.comr t.H^A-tl ' Notice to Creditoas- Estate of Concetta CaccavTe, PUBLIC NOTICE, "' IN THE CIRCUIT COURT FOR CITRUS COUNTY FLORIDA ', PROBATE DIVISION," CASE NO. 2005-CP1'172 IN RE: THE ESTATE OF - CONCETTA CACCAVALE a/k/a CONNIE CACCAVALE Deceased. NOTICE TO CREDITORS The administration of the Estate of Concetta Caccavale a/k/a Coinle Caccavale, decreased, whose date of death was July 10, 2005, Is pending In the Circuilf Court for.Citrus County, Florida, Probate Division, the addrets-of which Is 110 North Apopka Avenue, oInver- ness, Florida 34450.'. The names and addresses of the personal representa- tive and the personae THEE-TIME OF FIRST PUBLICATION,tOF THIS NOTICE OR 30. DAYS AFTER THE DATE OF-SERV- ICE OF A COPY OF, THIS NOTICE ON THEM. All other creditors ofcthe decedent and other iper- sons having claims op.xle- mands against dece- dent's estate must- file h'liHiIn J r 1.: [JTH -n i :. THE DATE OF THE FRST PUBLICATION OF THIS NO- TICE, ALL CLAIMS NOT .fILED WITHIN THE TIME PERIODS SET FORTH IN SECTION 733.702 OF THE FLORIDA PROBATE CODE WILL BE FOREVER BARRED. NOTWITHSTANDING .THE TIME PERIOD SET FORTH ABOVE, ANY CLAIM JILED TWO (2) YEARS OR MORE AFTER THE DECEDENT'S DATE OF DEATH IS BARRED. The date of first publica- tion of this notice Is'-Sep- tember 19,2005. . Personal RepresentatJve: -s- PAUL FELIX MONTEZ 505 LaderaStreet Pasadena, California 91.104) timps In the Citrus County Chrjeni- cle, September 19,,and 26,2005. ".- 453-0926 MCRN'( Notice to Creditors Estate of Theresa Pdite PUBLIC NOTICE.-, IN THE CIRCUIT COURT FOR CITRUS COUNTY? FLORIDA .' PROBATE DIVISION File No. 2005-CPT179 IN RE: ESTATE OF THERESA POLITO, Deceased. NOTICE TO CREDITORS The administration of the estate of Theresa Polito, deceased, File Number 2005-CP-1179, Is pending In the Circuit Court foartit- rus OP THE FIRST PUBLICATION OF THIS NOTICE. ALL CLAIMS NOT SO FILED WILL BE FOREVER BARRED: The date of first publica- tion of this Notice IsSep- tember 19, 2005. ,, Petitioner: -s- GERALDINE CIOQNO c/o 452 Pleasant Grove Rd. Inverness, FL 34452 (352) 726:0901 Attorney for Personal " Representative: -s- MARIE T. BLUME Attorney Florida Bar No. 0493181u Haag, Frledrich & Blume, P.A. 452 Pleasant Grove Rd. , Inverness, FL 34452 , Phone No. (352) 726-0901 Published two (2) times In the Citrus County Chroni- cle, September 19 and CHEVROLET 2003, Silverad, 3rd door, loaded, 99toolbox, bedlinerX B. $7995 Beautiful, $17,500. 352-628-3609/400-3648 CHEVY 2500 LS '00, ext. cab, LWB, 5.7L, V8, auto, AC, Cruise, Tilt , 1986 Ranger, longbed 78K miles, 4 cyl, good condition. $1500. (352) 726-9342 FORD 1999, Ranger XL, auto. 6 cycle, A/C, needs engine, $2,200. OBO (352) 628-5700 FORD 2001 F 50 XLT. Super cab. 5.3 liter V-8,factry tow pkg. rated 8,400 Ibs, 5th wheel hitch rated 15,000 Ibs, 5 disc CD player. Alum tool- box. 46,000 mi. $13,000. (352) 382-7316 FORD '97, F150 XLT, 5.4 liter, 176k mi., excel, cond. w/ topper $5,500. 99F 1997 Sierra, extra cab, 3rd DR 73k mi. 1 owner, good cond. $7000. (352) 382-5005 GMC 1500 SIERRA 1987, 350 eng. Cold air, New tires, runs perfect, needs paint. $1500. (352) 344-3183 GMC 2000, Sonoma SLS, 6 cycle, 3 drs, fully equipt, good cond, $8,500, (352) 637-1174 mil Leather bags, custom seats, total chrome-pkg $5750. 352-382-0029 or 352-382-7233, Iv. msg. KAWASAKI CLASSIC,805 Vulcan, 1998, Lthr bags, custom seats, wind- shield, bkrst. 5700 rril. $3995. 352-382-0029'6r 352-382-7233, Iv. msg. Search 100's of Local Autos" Online at :- wheels.comr YAMAHA ' New, 2005, Majesty Scooter, 400cc, low mileage, great gas, saver, $5,200.,, ,, (352) 382-3014 CITRUS COUNTY (FL) CHRONICLE Ii m pf 2,.2005. 454-0926 MCRN Notice to Creditors Estate of Marlan Frances Browne PUBLIC NOTICE -:IN THE CIRCUIT COURT SFOR CITRUS COUNTY, FLORIDA PROBATE DIVISION CASE NO. 2005-CP-1173 IN RE: THE ESTATE OF MARIAN FRANCES BROWNE, Deceased. NOTICE TO CREDITORS The administration of the Estate of Mariaon Frances Browne, deceased, 'wdiose date of death was July 4. 2005. is pending In .the Circuit Court for Citrus ,Cpunty, Florida, Probate Dlylsion, the address of which Is 110 North _-Apopka Avenue, Inver- -'sess, Florida 34450. The .,pames and addresses of the. personal representa- tive and the personal rep- resentative's attorney are s forth below. -All creditors of the dece- -7dent and other persons h'eving claims or de- mands against dece- dert's estate on whom a copy of this notice has Ileen served must file their - claims with this Court WITHIN THE LATER OF 3 MONTHS AFTER THE TIME Q O FIRST PUBLICATION OF "THIS NOTICE OR 30 DAYS '-AETER THE DATE OF SERV- T CE OF A COPY OF THIS NOTICE ON THEM. All other creditors of the decedent and other per- sons having claims or de- mands against dece- dent's estate must file their claims with this Court WHIN 3 MONTHS AFTER DATE OF THE FIRST .ULICATION OF THIS NO- .-- CATHERINE NOEL BLAIR - .2935 West Elm Blossom St. ,,:-,Beverly Hills, Florida 34465 .,i Attorney for Personal s-Representative: p HAAG, FRIEDRICH & LIME, P.A. -.452 Pleasant Grove Road e-Inverness, Florida 34452 (352) 726-0901 S:(352) 726-3345 (Facsimile) -Florlda Bar No.: 0196529 -,, s- JEANNETTE M. HAAG '" Attorney for Estate O. Published two (2) times In '-the Citrus County Chroni- "cle, September 19 and 26,2005. 455-0926 MCRN Notice to Creditors Estate of John A. Marqua ---- PUBLIC NOTICE tTHE CIRCUIT COURT FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION File No.: 2005-CP-T 170 IN RE: ESTATE OF -'"JOHN A. MARQUA A/K/A -'JOHN ALFRED MARQUA, ',".' Deceased. S NOTICE TO CREDITORS The administration of the estate of JOHN A. MAR- ,"'QUA A/K/A JOHN ALFRED I'MARQUA, deceased, 41whose date of death was "At'gust 21,. 2005. 'Is pend- -"ing In the Circuit Court for l1,,j .* :,jrr, F]:[.-y3 .- e,-:.' I ,: le I'.i.i I_ r,-, mir- *~ 1 r- .or rl r, I I 1 I 11-i. S-Apopka Avenue, Inver- ness, Florida 34450. The "'hames and addresses of 'the. personal representa- i'"'ve and the personal rep- ,",refentatlve's attorney are y set forth below. All creditors of the dece- *':de'nt and other persons 'f., ir.- 'claims or de- a,'. 3; against dece- S.3.r.i : estate on whom a i epy of this notice Is re- f.ifed to be served must 'file' their claims with this court WITHIN THE LATER OF 3 MONTHS AFTER THE TIME .'OF, THE FIRST PUBLICATION * -Q O THIS NOTICE OR 30 ;r -AYS AFTER THE DATE OF SERVICE OF A' COPY OF TRI IMfE PERIODS SET. FORTH ABOVE, ANY CLAIM FILED TWO (2) YEARS OR MORE AFTER THE DECEDENT'S DATE OF DEATH IS BARRED. The date of first publlca- tiroft of this notice Is Sep- tember 19, 2005. Personal Representative: -s- John T. Marqua '19334 E. Sweetwater Drive ":, Inverness, Florida 34450 Attorney for Personal SRepresentative: "s-. -Thomas E. Slaymaker, ,Esquire j'Attorney John T. Marqua SFlorida Bar No. 398535 a Slaymaker and Nelson, *P.A. -2218 Highway 44 West '-Inverness, Florida 34453 SRublished two (2) times in *.the Citrus County Chroni- cle, September 19 and .26,'2005. '- 456-0926 MCRN Notice to Creditors S Estate of " Ruth E. Cramer S PUBLIC NOTICE '" IN THE CIRCUIT COURT 'FOR CITRUS COUNTY,. S' FLORIDA PROBATE DIVISION CASE NO. 2005-CP-1168 -1 'IN'RE: THE ESTATE OF UTH E. CRAMER, '- "' Deceased. NOTICE TO CREDITORS The administration of the Estate of Ruth E. Cramer, Sdeceased, whose date of 'death was August 1, 2005, i- pending in the Circuit -CoUrt for Citrus County. '.'lerida, Probate Division, the address of which Is ' 110 North Apopka Ave- '~nue, Inverness, Florida "34450. The names and -'"addresses of the personal '"representative and -the, personal representative's ' attorney are set forth be- IbW. -'All creditors of the dece- -dent and other persons having claims or de- 11mbnds against dece- 'cd nt's estate on whom a S" eopy of this notice has ',been served must file their claims s- t, nds against dece- deht's estate must file T heir claims with this Court WITHIN 3 MONIH5 AIt-IER- SUSAN H. DOUGHERTY 319 Davidson Avenue Inverness, Florida 34450. September 19 and 26, 2005. 457-0926 MCRN Notice to Creditors Estate of Robert Hall McDougald PUBLIC NOTICE IN THE CIRCUIT COURT FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION CASE NO. 2005-CP-1167 IN RE: THE ESTATE OF ROBERT HALL McDOUGALD, Deceased. NOTICE TO CREDITORS The administration of the Estate of Robert Hall Mc- Dougald, deceased, whose date of death was June 29, 2005, is pending in the Circuit Court for Cit- rus County. Florida, Pro- bate Division, the address of which Is 110 North Apopka Avenue, Inver- ness, Florida 34450. The names and addresses of the personal representa- tives and the personal representatives'. ,,galnst dece- der- tlon of this notice Is Sep- tember 19,2005. :Personal Representatives: '1, s- ROBERT H. -AxvsAst McBQU1GAQD I -"_ I.: :','.3 -. I',j- L-. II- I.- .. 6 1.1 :,I.3 1:1- -s- DARLA D. DELROSARIO ... 2041 Garwood Drive Orlando, Florida 32820 Attorney for Personal Representatives: (1) times In the Citrus County Chroni- cle, September 19 and 26, 2005. 458-0926 MCRN Notice to Creditors (Summary Administration) Estate of Edward L. Bava PUBLIC NOTICE IN THE CIRCUIT COURT FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION FILE NO. 2005-CP-1162 IN RE: ESTATE OF EDWARD L. BAVA, DECEASED. NOTICE TO CREDITORS (Summary Administration) TO ALL PERSONS HAVING CLAIMS OR DEMANDS AGAINST THE ABOVE ES- TATE: You are hereby notified that an Order of Summary Administration has been entered In the Estate of EDWARD L. BAVA, de- ceased, File Number 2005-CP-1162, 3, 2005; that the total value of the estate Is $NONE and that the names and addresses of those' to whom it has been assigned by such or- der are: SUSAN CATONE 33 BERKELEY STREET STATEN ISLAND. NEW YORK 10312 DOROTHY OTTINO 9745 N. JOURDAN DRIVE CITRUS SPRINGS, FLORIDA 344 Sep- tember 19, 2005. Person Giving Notice: -s- SUSAN CATONE, September 19 and 26.2005. 459-0926 MCRN- Notice to Creditors Estate of Ellen J. Goode PUBLIC NOTICE IN THE CIRCUIT COURT OF THE FIFTH JUDICIAL CIRCUIT, IN AND FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION CASE NO. 2005-CP-866 IN RE: ESTATE OF ELLEN J. GOODE A/K/A EL- LEN JOSEPHINE GOODE, Deceased. NOTICE TO CREDITORS The Administration of the Estate of ELLEN J. GOODE a/k/a ELLEN JOSEPHINE GOODE, Deceased, whose date of death was June 17, 2004. Is pending In the Circuit Court for Cit- rus County, Florida, Pro- bate Division, File Number 2005-CP-866; Sep- tember 19,2005. Personal Representative, the Estate of Ellen J. Goode a/k/a Ellen Josephine Goode, Deceased: -s- LORI HILL 2509 S. Shelly Avenue Inverness, FL 34450 Attorney for Personal Representative: Published two (2) times In the Citrus County Chroni- cle, September-19 and 26, 2005. 460-0926 MCRN Notice to Creditors Estate of Jean B. Gibbons PUBLIC NOTICE . IN THE CIRCUIT COURT FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION File No.: 2005-CP-1049 IN RE: ESTATE OF JEAN B. GIBBONS, Deceased. NOTICE TO CREDITORS The administration of the estate of .JEAN B. GIB- BONS, deceased, whose date of death was July 24, 2005, Is pending in the Circuit Court for Citrus 'County, Florida, Probate Division, the address of which Is 110 North Apopka Avenue, Inver- ness, Florida 34450. The names and addresses of the personal representa- 41 ls .ar,Jur, i: ..:,.-,3i -1- '. , r 311t .- rn:. -ii ,. 1i- John Jeffrey Gibbons 901 King Street Stroudsburg, Pennsylvania 18360 Attorney for Personal Representative: -s- Thomas E. Slaymaker, Esquire Attorney for John Jeffrey Gibbons Florida Bar No. 398535 Slaymaker and Nelson, P.A. 2218 Highway 44 West Inverness, Florida 34453 Published two (2) times In the Citrus County Chroni- cle, September 19 and 26, 2005. 461-0926 MCRN Notice to Creditors Estate of John Ronald Rankin PUBLIC NOTICE IN THE CIRCUIT COURT FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION Flle No.: 2005-CP-1080 IN RE: ESTATE OF JOHN RONALD RANKIN, Deceased. NOTICE TO CREDITORS The administration of the estate of John Ronald Rankin, deceased, whose date of death was Sep- tember 12, 2004, and whose Social Security Number Is 281-32-4024, is pending In the Circuit Court for Citrus County, Florida. Probate Division,- Joan M. Salveson 1562 Stormway Court Apopka, Florida 32712 Attorney for Personal Representative: -s- Robert W. Anthony, Esquire Florida Bar No. 346918 Fasselt, Anthony & Taylor, P.A. 1325 W. Colonial Drive Orlando, Florida 32801 Telephone: 407-872-0200 Published two (2) times In the Citrus County Chroni- cle. September 19 and 26,2005. 462-0926 MCRN Notice to Creditors Estate of Edward H. Stevens PUBLIC NOTICE IN THE CIRCUIT COURT FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION File No. 2005-CP-1100 IN RE: ESTATE OF EDWARD H. STEVENS, Deceased. NOTICE TO CREDITORS The administration of the estate of Edward, H. Ste- vens, deceased, File Number 2005-CP-1100, Is pending in the Circuit Court for Citrus County, Florida, Probate Division, the address of which Is 110 N. Apopka Ave., In- 19, 2005. Lineal Descendant: -s- JAMES STEVENS c/o 452 Pleasant Grove Rd. -u _.ir,. r : a r i- :e i,.I cle, September 19 and 26, 2005. 463-0926 MCRN Notice to Creditors Estate of Mary Hill PUBLIC NOTICE IN THE CIRCUIT COURT FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION File No.: 2005-CP-1152 IN RE: ESTATE OF MARY HILL, Deceased. NOTICE TO CREDITORS The administration of the estate of MARY HILL, de- ceased, File Number 2005-CP-1152, PUBLICATION OF THIS NOTICE. ALL CLAIMS NOT SO FILED WILL BE FOREVER BARRED. The date of the first pub- lication of this Notice is September 19, 2005. Personal Representative: -s- Barbara A. Maloney 3896 N. Blazlngstar Way Beverly Hills, FL 34465, September 19 and 26, 2005. 464-0926 MCRN 10/08/2005 Sale Contents of Storage Units PUBLIC NOTICE THIS IS TO NOTIFY: KATHY A. BLACKERBY-B71 JOYCE BREWTON-D164 DONNA BROADHURST-A48 RICHARD BROCK-D156 DONALD MABESOONE-B87 DANIELLE M. SAVAGE-A25 STEVEN SAWYER-B59 JACK A. SHORT-A45 SUDIE MAY STATEN-A43 That the entire contents of these storage units will be consigned to auction, 10:00 a.m., 08 OCTOBER 2005, if payment in full is not received by 6:00 p.m. 07 OCTOBER, 2005, at Cit- rus Springs Mini-Storage & U-HAUL Dealer, 7465 N. Florida Avenue, Citrus Springs, Florida 34434. We reserve the right to refuse any and all bids, -s- GARY AYRES Citrus Springs Mini-Storage & U-HAUL Dealer Published two (2) times in the Citrus County Chroni- cle, September 19 and 26, 2005. 468-1003 MCRN CLASSIFIED Notice to Creditors Estate of Harold W. Chapman. Sr. PUBLIC NOTICE IN THE CIRCUIT COURT FOR CITRUS COUNTY, FLORIDA PROBATE DIVISION File No. 2005-CP-901 IN RE: ESTATE OF Harold W. Chapman, Sr., Deceased. NOTICE TO CREDITORS The administration of the estate of Harold W. Chap- man, Sr., deceased, File Number 2005-CP-901, is pending in the Circuit Court for Citrus County, Florida, Probate Divisidn,26 26005. Personal Representative: Doris Chapman 4340 E. Alabama Lane Hernando, Florida 34442 Attorney for Personal Representative: Rasenkranz Law Firm By: -s-Jack M. Rosenkranz, N Esquire P. 0. Box 1999 Tampa, Florida 33601 (813) 223-4195 Florida Bar No. 815152 Published two (2) times in the Citrus County Chroni- cle, September 26,. and October 3,. 2005. 469-1003 MCRN Notice to Creditors Estate of Margaret S. Fox PUBLIC NOTICE IN THE CIRCUIT COURT FOR CITRUS COUNTY. FLORIDA PROBATE DIVISION File No.2005-CP-1226 IN RE: ESTATE OF MARGARET S. FOX, Deceased. NOTICE TO CREDITORS The administration of the estate of MARGARET S. FOX, deceased,, whose date of death was July 15, 2005, and whose So- cial Security Number Is 034-14-6643; creditors of the dece- .dent and other persons having claims or de- :. ni -'r. r dece- e,',a- -.rore Including unmatured, contingent or unliquidaterd 26, 2005. Personal Representative: -s- RUSSELL FOX 65 Davis Road Southwick; MA 01077, September 26, and October 3, 2005. 470-1003 MCRN Notice to Creditors Estate of Raymond T. Foster PUBLIC NOTICE IN THE FIFTH JUDICIAL CIRCUIT COURT OF FLORIDA, IN AND FOR CITRUS COUNTY IN PROBATE FILE NO:. 2005-CP-1 185 IN RE: ESTATE OF RAYMOND T. FOSTER, Deceased. NOTICE TO CREDITORS The administration of the Estate of RAYMOND T. FOSTER, deceased, File Number 2005-CP-1185,- lication of. this notice Is September 26, 2005., . Personal Representative: -s- BEVERLY ANN STEM, September 26, and October 3, 2005. 465-0926 MCRN PUBLIC NOTICE STATE OF FLORIDA DEPARTMENT OF ENVIRONMENTAL PROTECTION NOTICE OF INTENT TO ISSUE PERMIT The Department of Environmental Protection gives no- tice of Its intent to Issue an air pollution construction permit for the installation of a new loading/unloading portable material 'transfer unit (Permit File No. 0170034-011-AC) to Boral Material Technologies, Inc. for the existing fly ash storage and transfer facility lo- cated at 15760 Powerline Road, Crystal River, Citrus County. MAILING ADDRESS Boral Material Technolo- gies, Inc., 45 Northeast Loop 410, Suite 700, San Anto- nio, Texas, 78216, to the attention of Mr. Terry Peterson, President. The Department will issue the permit with the attached conditions unless a timely petition for an administrative hearing Is filed pursuant to Sections 120.569 and 120.57, F.S., before the deadline for filing a petition. The pro- cedures for petitioning for a hearing are set forth be- low. A person whose substantial Interests are affected by the proposed permitting decision may petition for an administrative proceeding (hearing) under Sections 120.569 and 120.57, F.S. The petition must contain the Information set forth below and must be filed (received) In the Office pf General Counsel of the De- partment at 3900 Commonwealth Boulevard. Mall Sta- tion 35, Tallahassee, Florida, 32399-3000. Petitions filed by the permit applicant or any of the parties listedbe- low must be filed within fourteen days of receipt of this notice of Intent. Petitions filed by any persons mall a copy of the petition to the appli- cant at the address indicated above at the time of fil- ing. The failure of any person to file a petition within the appropriate time period shall constitute a waiver of that person's right to request an administrative determi- nation , F.A.C. A petition that disputes the material facts on which the Department's action is based must contain the follow- Ing peti- tioner's substantial interests will.be affected by the agency determination; (c) A statement of how and when petitioner received notice of the agency action or proposed action; (d) A statement of all disputed issues of material fact. If there are none, the petition must so Indicate; (e) A concise statement of the ultimate facts alleged. Including the specific facts the petitioner contends warrant reversal or modification of the agency's ac- tion; and (f) A statement of specific rules or statutes the petition- er contends require reversal or modification of the agency's proposed action; and (g) A statement of the relief sought by the petitioner, stating precisely the action petitioner wishes the agen- cy to take with respect to the agency's proposed ac- tion. A petition that does/not dispute the material facts upon which the Department's action is based shall state that no such facts are in dispute and otherwise shall contain the some Information as set forth above, as required by Rule 28-106.301, F.A.C. Because the administrative hearing process Is designed to formulate final agency action, the filing of a petition means that the Department's final action may be dif- ferent from the position taken by it in this permit. Per- sons whose substantial interests will be affected by any such final decision of the Department on the applica- tion have the right to petition to become a party to the proceeding, in accordance with the requirements set forth above. Mediation Is not available in this proceeding. -i- The application is available for public inspection during normal business hours, 8:00 a.m. to 5:00 p.m.. Monday through Friday, except legal holidays, at 8407 Laurel Fair Circle, STE 214, Tampa, Florida. Any person may request to obtain additional informa- tion, a copy of the application (except for Information entitled to confidential treatment pursuant to Section 403.111, F.S.), all relevant supporting materials, a copy of the amendment/modification, and all other materi- als available to the Department that are relevant to the permit decision. Additionally, the Department will accept written comments concerning the proposed permit issuance action for a period of 14 (fourteen) days from the date of publication of "Public Notice of Intent to Issue Permit." Requests and written comments tiled should be provided to the Florida Department of Environmental Protection at 3804 Coconut Palm Drive, Tampa, FL 33619 to the attention of Mr. Jason Waters (phone no. 813-744-6100 ext. 107) referencing Permit File No. 0170034-011-AC. Any written comments filed shall be made available for public Inspection. If written comments received result In a significant change In the proposed agency action, the Department shall re- vise the proposed permits and require, if applicable, another Public Notice. Published one (1) time In the Citrus County Chronicle, September 26, 2005. 466-1003 MCRN Notice of Action Green Tree Servicing LLC vs. Ellsha Lea Crites, et al. PUBLIC NOTICE IN THE CIRCUIT COURT OF THE FIFTH JUDICIAL CIRCUIT IN AND FOR CITRUS COUNTY. FLORIDA CIVIL DIVISION Case No.: 2005-CA-625 GREEN TREE SERVICING, LLC, Plaintiff, vs. ELISHA LEA CRITES f/k/a ELISHA LEA CHARETTE f/k/a ELISHA LEA HAWS, including any unknown spouses of the above Defendants, as well as their unknown heirs, devisees, grantees, assignees, creditors, Ilenors, and/or trustees and all other persons claiming by, through, under or against the above Defendant(s), UNKNOWN OCCUPANT #1, UNKNOWN OCCUPANT #2, and all parties having any right, claim, title or interest In the real property herein described, Defendantss. NOTICE OF ACTION TO: Defendantss, ELISHA LEA CRITES f/k/a ELISHA LEA CHARETTE f/k/a ELISHA LEA HAWS, Including any un- known spouses of the above Defendant, as well as their unknown heirs, devisees, grantees, assignees, creditors, Ilenors and/or trustees and all other persons claiming by, through, under or against Defendant(s), ELISHA LEA CRITES f/k/a ELISHA LEA CHARETTE f/k/a ELI- SHA LEA HAS, whose last known address is: 7515 HOLABIRD AVENUE DUNDALK, MARYLAND 21222 YOU ARE HEREBY NOTIFIED that an action to foreclose on the following real property and to replevy the fol- lowing personal property In CITRUS County, Florida: REAL PROPERTY: The North 133 feet of the West 1/2 of Lot 23, GREEN ACRES, Unit 3, as recorded in Plat Book 5, Page 60, Citrus County, Florida Subject to a 10 foot easement along the East boundary thereof for a road right-of-way (hereinafter "real property") PERSONAL PROPERTY: ONE 2001 Doublewide Mobile Home (Serial #VIN #GAFLY39A15503F221 and #GAFLY39B15503F221) (hereinafter "personal property") has been filed against you and you are required to serve a copy of your written defenses, if any, to It on Edward B. Pritchard, Plaintiff's attorney, whose address Is 5509 Gray Street, Suite 203, Tampa. Florida 33609, on or before thirty (30) days from the date of the first publi- cation of this Notice, and file the original with the Clerk of the Court, either before service on Plaintiff's attorney or Immediately thereafter; otherwise a default will be entered against you for the relief demanded In the Complaint. DATED this 19th day of September, 2005. Betty Strifler CLERK OF THE CIRCUIT COURT (CIRCUIT COURT SEAL) By: -s- M. A. Michel Deputy Clerk Published two (2) times In the Citrus County Chronicle, T.-lT, : 3.,d October,3, 205. , 467-1003 MCRN Notice of Action-Foreclose Agreement for Deed James H. Alvis v. Vincent J. Melanson, et al. PUBLIC NOTICE IN THE CIRCUIT COURT OF THE FIFTH JUDICIAL CIRCUIT IN AND FOR CITRUS COUNTY, FLORIDA CASE NO. 2005-CA-3428 JAMES H. ALVIS, Plaintiff, v. VINCENT J. MELANSON and TERRI L. MELANSON, Defendants. NOTICE OF ACTION TO: VINCENT J. MELANSON 6093 S. Sundial Drive Floral City, FL 34436 .YOU ARE NOTIFIED that an action to foreclose an Agreement for Deed on the following described prop- erty In Citrus County: Lot 53, LAKE MAGNOLIA ESTATES UNIT 2, as recorded in Plat Book 14, Pages 42 and 43, of Lake Magnolia Es- tates Unit 2 In Section 3, Township 20 South, Range 20 East, Public Records if Citrus County, Florida has been filed against you and you are required to serve a copy of your written defenses, If any, to 'It on Plaintiff's attorney, DONALD F PERRIN, Donald F. Perrin, PA., Post Office Box 250, Inverness, FL 34451-0250, on or before the 26th day of October, 2005, and file the origi- nal with the Clerk of this Court either before service on Plaintiff's attorney or Immediately thereafter; otherwise a default will be entered against you for the relief de- manded In the Complaint. DATED this 19th day of September, 2005. BETTY STRIFLER Clerk of the Court By: -s- M. A. Michel Deputy Clerk Published two (2) times In the Citrus County Chronicle, September 26, and October 3, 2005. 438-0926 MCRN Notice of Action-Dls, P.A., 2303 West Highway 44, Inverness, FL 34453-3809, the attorney for the Petitioner, on or before October 5, 2005,- cuit,. 445-1003 MCRN Notice of Action Quiet Title Stephen L. Norris, et al. v. Roger De Vos PUBLIC NOTICE IN THE CIRCUIT COURT OF THE FIFTH JUDICIAL CIRCUIT OF THE STATE OF FLORIDA, IN AND FOR CITRUS COUNTY CIVIL ACTION Case Number 2005-CA-3740 STEPHEN L. NORRIS and GENA M. NORRIS, Plaintiff, v. ROGER DE VOS, Defendant. NOTICE OF ACTION TO: ROGER DE VOS, no known address: YOU ARE HEREBY NOTIFIED that an action to Quiet, Ttie to the following described property in Citrus County, Florida: Lot 5, Block 290, CITRUS SPRINGS UNIT 3, according to the map or plat thereof as recorded in Official Records Book 389, page 283, of the Public Records of Citrus County, Florida has been filed against you and you are required to serve a copy of your written defenses, If any, on Henry W. Hicks, Esq., attorney for Plaintiffs, whose address is 3003 West Azeele Street, Suite 200, Tampa, Florida 33609, on or before October 13, 2005, and file the origi- nal with the Clerk of this Court either before service on plaintiffs' attorney or immediately thereafter; otherwise a default will be entered against you for the relief de- manded In the Complaint. This action was instituted In the Circuit Court of the Fifth Judicial Circuit of the State of Florida and is styled: Ste- phen L. Norris an Gena M. Norris v. Roaer De Vos. DATED on September 2,2005. BETTY STRIFLER As Clerk of the Court By: -s-.M. A. Michel As Deputy Clerk Published four (4) times In the Citrus County Chronicle, September 12, 19, 26 and October 3, 2005. 449-1010 MCRN Notice of .: :.i f riri... :. r -.ir, .- -.: Gordorn IJ rr i- l. ._ 3--,. .. I ,i PUBLIC NOTICE ,.~,. IN THE CIRCUIT COURT FIFTH JUDICIAL CIRCUIT OF FLORIDA IN AND FOR CITRUS COUNTY CIVIL DIVISION CASE NO. 2005-DR-3202 GORDON J. BEATTIE, Petitioner, vs. LEANNE NELSON, Respondent. NOTICE OF ACTION TO: Leanne Nelson 6321 15th Avenue N.E. Seattle. WA 98115 YOU ARE NOTIFIED that a Petition for Paternity, Custody, Child Support and Other Relief has been filed against you and that you are required to serve a copy of your written defenses, if any. to it on PATRICIA M. MORING, Florida Bar 0 712809, Moring & Moring, P.A., 7655 W. Gulf to Lake Highway, Ste. ,12, Crystal River, FL 34429, the attorney for the Petitioner, on or before October 19, 2005, and file the original with the clerk of this court be- fore service on the Petitioner or immediately thereaf- ter. of your current address. Future papers In this law- suit: September 9, 2005. BETTY STRIFLER Clerk of the Circuit Court By: -s- M. A. Michel Deputy Clerk Published four (4) times In the Citrus'County Chronicle, September 19, 26, October 3 and 10, 2005. 450-1010 MCRN Notice of Action Citrus Sod, etc. vs. R.E. Graham Contracting. Inc., etc. PUBLIC NOTICE IN THE CIRCUIT COURT OF THE FIFTH JUDICIAL CIRCUIT IN AND FOR CITRUS COUNTY, FLORIDA SMALL CLAIMS DIVISION CASE NO,: 2005-SC-2022 Citrus Sod, Landscaping & Sprinklers, Inc. A Florida Corporation c/a Michael T, Kovach, Sr. 106 North Osceola Avenue Inverness, Florida 34450, Plaintiffs, vs, R.E. Graham Contracting, Inc. A Florida Corporation c/o Robert E, Graham, Registered Agent 4997 NW 56th Boulevard Lake Panasoffkee, Florida 33538, Defendants. NOTICE OF ACTION TO: R.E. Graham Contracting, Inc. A Florida Corporation c/o Robert E. Graham, Registered Agent 4997 NW 56th Boulevard Lake Panasoffkee, Florida 33538 and all parties claiming Interests by, through, under or against R.E. Graham Contracting, Inc. YOU ARE HEREBY NOTIFIED that a Complaint has been filed in this court. You are required to serve a copy of your written defenses, if any, to it on petitioner's attor- ney, whose name and address are: Michael T. Kovach. Sr., Esq. KOVACH, KOVACH & RODRIGUEZ 106 N. Osceola Avenue Inverness, FL 34450 Telephone: (352) 344-5551 on or before October 25. 2005. and file the original of the written defenses with the clerk of this court either before service or immediately thereafter. Failure to serve and file written defenses as required may result in a judgment or order for the relief demanded, without further notice. Dated September 8, 2005. Betty Strifer, Clerk of the Court By: S. Woford As Deputy Clerk Published four (4) times In the Citrus County Chronicle, September 19, 26. October 3 and 10, 2005. CITRUS COUNTY (FL) CHRONICLE Jq. MONDAY, SEPTEMBER 26, 2005 005S's Oti All Makes. All Models. One Event. One Location. TO DAY 0 LY! Atlantic Infiniti .^ 1 in ii CHESTERFIELD 0 DODGE ,0 OCALA NISSAN CAPITOL @ LINCOLN Mercury @ I1YUNDR1I fl1HUGGINS !cEcE '05 ACCORD $16,999 '05 CAVALIER -8,950 '05 F150 -16,950 '05 PATHFINDER s23,999 '05, GRAND AM 11,999 '05 TOWNCAR 125,950 II 'Ir ii '05 ALTIMA '14,999 'I :)5 '05 TAURUS S10,995 '05 CAMRY '15,999 '05 SEBRING '13,999 '0A5 GALANT '14,999 '05 SENTRA '9,999 II I '05 TITAN $17,950 '05 DAKOTA *16,950 '05 RAM QUAD CAB '18,950 '05 SONATA '10,950 '05 LANCER $9,950 '05 SILVERADO 17,950 .11. ii In U. ~ U. U. II II 'OE MOUNTAINEER '20,950 \ '05 MUSTANG 117,9050- '05o GRAND CARAVAN 114,950 '05 MURANO $21,950 '05 TAHOE s24,950 II ih ii U. U. Up It II *L '05 MERCEDES C230 $27,950 U. up II '05 QUEST '18,950 '05 INFINITI G35 26,950 105 YUKON 126,950 '05 DURANGO 199,950 '05 NEON '8,950 '05 EXPLORER 118,950 OCA A 2200 SR 200 I SAN * OCALA * 622-4111 PRICES GOOD DAY OF PUBLICATION. ALL PRICES W/'1000 CASH OR TRADE EQUITY PLUS TAX, TAG & *195 DEALER FEE AND SUBJECT TO AVAILABILITY. W.A.C. OCALA MITSUBISHI A l go ................ J. .. .. .11 11 on I am I L. IIIL I I I I Is 11 -1 L I I I. I I w IL I I -6 AM '14 ">rtnl- DENBIGH OTOYOTA 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/00269 | CC-MAIN-2017-30 | refinedweb | 44,139 | 75.71 |
Hello!
>Tobias asks:
>>Does anyone know the status of namespace support for Xalan?
>
>That's quite a broad question. The latest version of Xalan has
>been subjected to over 100 tests that involve namespaces in
>some way, and has a couple minor bugs reported in the release
>notes. That's not to say there aren't other bugs yet to be
>found, or bugs seen by stylesheet developers that would be
>fixed in the parser rather than Xalan.
Ok I will be more precise. I have used XSLTProcessor as a DocumentHandler to
process an XML document produced by a home-made parser. The DocumentHandler
interface do not support namespaces. The output from the XSLTProcessor is
handled by another DocumentHandler. I would like to use the interface
ContentHandler which have namespace support to do this.
>Were you asking about recognizing namespaces on the input
>side or inserting namespace declarations in the output?
>If you think you have a bug to report, send details to the
>xalan-dev list, or xerces-dev if it's a parsing problem.
I miss the namespace support in the layer after the XSLT processor.
I have not found a bug.
>>SAX 2.0 support?
>
>This is planned for Xalan 2.0, which is progressing.
>.................David Marston
Any idea when there will be an beta release or so?
Regards,
Tobias | http://mail-archives.apache.org/mod_mbox/xml-general/200007.mbox/%3C4F4BB798A659D31183E800508B2C0ECD976421@outland.cellicd.se%3E | CC-MAIN-2014-41 | refinedweb | 223 | 74.79 |
Keeping with the theme of my previous data visualization blog post, I’m going to use my Data Visualization Gutenberg Block plugin to create a summary of the data from the Mapping Police Violence project.
Here’s the finished visualization, continue below for a few quick thoughts on what the data is showing and a brief walkthrough of how I put the chart together.
Here are the basic steps for recreating the dataset, which you can also find in this GitHub repo.
- Download
MPVDatasetDownload.xlsxfrom mappingpoliceviolence.org.
- Open the file, remove unnecessary columns, export to
MPVDatasetDownload.csv.
- Run
python data-cleanup.pyto create
data-summary.csv.
- Upload the data using my Data Visualization Gutenberg Block plugin.
The cleanup script is pretty straightforward.
import csv import json # Helper function for retrieving the year from the dataset def get_year( item ): return item["Year"] # Convert CSV files to a dictionary data = {} with open( "MPVDatasetDownload.csv", encoding = "utf-8" ) as csvf: csvReader = csv.DictReader(csvf) key = 0 for rows in csvReader: key += 1 data[key] = rows stats = [] for index in data: year = "20" + data[index]["Date of Incident (month/day/year)"][-2:] # Skip data for 2021 that's still in progress if year != "2021": years_processed = map( get_year, stats ) if year not in years_processed: stats.append ( { "Year": year, "Killings": 0, "Charges": 0, "Convictions": 0 } ) current_index = len( stats ) - 1 else: for i, item in enumerate( stats ): if stats[i]["Year"] == year: current_index = i stats[current_index]["Killings"] += 1 if "Charged" in data[index]["Criminal Charges?"]: stats[current_index]["Charges"] += 1 if "Charged, Convicted" in data[index]["Criminal Charges?"]: stats[current_index]["Convictions"] += 1 stats.reverse() print( json.dumps( stats, indent = 4, sort_keys=True ) ) # Save the dataset to a CSV file data_file = open( "data-summary.csv", "w" ) csv_writer = csv.writer( data_file ) count = 0 for item in stats: if count == 0: header = item.keys() csv_writer.writerow( header ) count += 1 csv_writer.writerow( item.values() ) data_file.close()
And here’s our CSV with just the data we need. I omitted data for 2021 to keep things a bit more clean, since we’re still very early into the year and what we have here is sufficient for our purpose of showing how incredibly rare it is to convict a cop for murder and how much effort it takes to do that.
Year,Killings,Charges,Convictions 2013,1087,19,6 2014,1049,20,11 2015,1102,25,9 2016,1070,19,5 2017,1091,16,4 2018,1144,14,1 2019,1094,21,1 2020,1125,16,1
Once we have our dataset ready, using the Data Visualization Gutenberg Block plugin is pretty simple. To make the final visualization more interesting, and to show that there are real people behind these numbers, I added a new option to my plugin that lets you create animated borders.
| https://stefanbohacek.com/blog/exploring-the-mapping-police-violence-dataset/ | CC-MAIN-2022-40 | refinedweb | 462 | 55.03 |
37573/how-do-i-find-out-the-sum-of-digits-of-a-number-in-python
Hi all, pretty simple question. Let me explain with an example:
Let us say my input is a number - 545.
I want the output to be 14 (5+4+5)
What is the quickest and the easiest way to go about doing this?
I was checking up online and I found that using the sum function helps. This is what I used:
sum(map(int, str(number)))
I want to know what is the best method to use if speed is my priority and if there are any other methods which I could make use of.
All help appreciated!
nbr = str(545)
lst = list(nbr)
sum=0
for i in lst:
k=int(i)
sum=k+sum
print (int(i))
print(sum)
Hi, good question. If you are considering to only work with integers then you can go about using the following syntax to do it in the most efficient way possible. Check it out:
def sum_digits(n):
s = 0
while n:
s += n % 10
n //= 10
return s
However, the same can be done using the divmod function as well. Check this:
def sum_digits2(n):
s = 0
while n:
n, remainder = divmod(n, 10)
s += remainder
return s
Also, wanted to tell you that whatever you have posted is perfectly right to solve the purpose. but there is a faster way to go about doing it and this is by using a version without any augmented assignments. Check it out:
def sum_digits3(n):
r = 0
while n:
r, n = r + n % 10, n // 10
return r
Hope this helps!
You can use the exponentiation operator or ...READ MORE
You probably want to use np.ravel_multi_index:
[code]
import numpy ...READ MORE
lets say we have a list
mylist = ...READ MORE
There are several options. Here is a ...READ MORE
if you google it you can find. ...READ MORE
Syntax :
list. count(value)
Code:
colors = ['red', 'green', ...READ MORE
can you give an example using a ...READ MORE
n = list(range(10))
b = list(filter(lambda i:i%2!=0,n))
print(b) READ MORE
Hi, it is pretty simple, to be ...READ MORE
You can use np.maximum.reduceat:
>>> _, idx = np.unique(g, ...READ MORE
OR
Already have an account? Sign in. | https://www.edureka.co/community/37573/how-do-i-find-out-the-sum-of-digits-of-a-number-in-python | CC-MAIN-2020-16 | refinedweb | 388 | 75.61 |
i have a problem in spring - Spring
i have a problem in spring spring Aop: how to configure proxyfactorybean in xml file for providing advices for one particular class
Spring
Crystal Reports with Spring: problem
Crystal Reports with Spring: problem Hi all,
having successfully used the Crystal Reports' API - JRC version 11.8.4.1094 - in a Java environment... tool,
I would like to integrate Crystal Reports into my existing spring MVC
index Duplicate submit - Spring
Spring Duplicate submit hi, i have problem in spring, i am pressing back or refresh my request get submitted again what i can do to avoid this,i am using only spring not struts
Index Out of Bound Exception
Index Out of Bound Exception
Index Out of Bound Exception are the Unchecked Exception... the
compilation of a program. Index Out of Bound Exception Occurs when
Spring Tutorial
:
Spring framework allows you to do focus only on your business problem...Spring Tutorial
In this section we will read about the Spring framework.
This section will describe about the various aspects of Spring framework security
spring security Hello,
first i would say sorry don't speak english very good...
I use the Spring framework 2.5 to apply the security rules for hand... only when the user is connected.
The problem is that when I do:
security
What is Index?
What is Index? What is Index. Hi friend,
Code to help in solving the problem
spring hibernate - Hibernate
spring hibernate can u tell me how we can integration of spring with hibernate? Hi friend,
For solving the problem Spring with Hibernate visit to : rmi - Log4J
spring rmi HI, iam using eclipse for developing spring based rmi application.
my problem is whenever a method is called in a server the log should...,
. Spring tries to
alleviate this problem by providing a comprehensive framework...
SPRING Framework... AN
INTRODUCTION...;
(PUBLISHED IN DEVELOPER IQ -
September2005)
Spring is an open-source
Spring framework implementation
Spring framework implementation Hi,
I am new to springs.
Can someone help me in implementing the below case in spring?
Coffee Take out problem... at the coffee shop.
Create a technology solution for this problem to automate with Crystal report
Spring Framework with Crystal report here is my problem
I have spring framework and I want to integrate Crystal report
the problem is when Report call the servlet CrystalReportViewerServlet, the spring dispacher don't find
spring
spring sir how to access multiple jsp's in spring
spring
spring i am a beginner in java.. but i have to learn spring framework.. i know the core java concepts with some J2EE knowledge..can i learn spring without knowing anything about struts
Save a pdf with spring as below code
Save a pdf with spring as below code
c:/report.pdf
All work in the same way, but never save the report to disk.
How to solve this problem? please reply me
spring
spring package bean;
public interface AccountsDAOI{
double... normally.
i set the classpath=D:\java softwares\ST-IV\Spring\spring-framework-2
.5.1\dist\spring.jar;D:\java softwares\ST-IV\Spring\spring-framework-2.5.1\lib
the following links:
Spring
the following links:
Spring
Spring I understand spring as dependency injection. It can avoid object creating and can directly inject values. But i am comfusing that Dependency... are created. By the same way i want to know how spring injected property
array, index, string
array, index, string how can i make dictionary using array...please help
server problem - Hibernate
server problem dear sir please give me best soloution how run hibernate and spring application on jboss and weblogic10.1.0 sever and compile
thanks
$
DOM paring problem
:
65: <%=getStat_list(nodeList).get(index)%>
66...:
68: <%
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
for(int index=0; index < nodeList.getLength(); index++)
{
%>
checking index in prepared statement
checking index in prepared statement If we write as follows:
String query = "insert into st_details values(?,?,?)";
PreparedStatement ps = con.prepareStatement(query);
then after query has been prepared, can we check the index
Ask Spring Questions Online
Ask Spring Questions Online
Spring is an open source application Framework for Java platform and .NET Framework. The prime feature of Spring
Insertion Sort Problem
. It is supposed to be an insertion sorter:
int min, index=0, temp;
for(int i=0;i<...;sorted.length;j++){
if(sorted[j]<min){
index=j;
min=sorted[j];
}
}
temp=sorted
Hibernate code problem - Hibernate
Hibernate code problem Hai, iam working on simple login application using hibernate in spring.
I've used Spring dependency injection too.I... is my spring-servlet.xml-----------------
.jsp
index - Java Beginners
myfaces,hibernate and spring integration - Hibernate
myfaces,hibernate and spring integration sorry, in the previous...).
i wll be obliged.
Might be you have deploying problem.
deploy... getting problem discuss with me through gtalk
rajanikant.misra@gmail... and how do i need to bind to solve the problem.
Thanks,
ak1234ak MVC JQuery Integration
Spring MVC JQuery Integration
In this section, you will learn about Spring MVC JQuery Integration by
deployment descriptor.
PROBLEM
When you are including... locate the .js file
SOLUTION
You can eliminate the above problem by adding .js
ClassNotFound Exception:DispatcherServlet in spring application?
ClassNotFound Exception:DispatcherServlet in spring application? **I...?
could you please tell me the resolution for this problem?**
Feb 11, 2011 10:54:49...
Java arraylist index() Function
Java arrayList has index for each added element. This index starts from 0.
arrayList values can be retrieved by the get(index) method.
Example of Java Arraylist Index() Function
import
Spring Security Logout
Spring Security Logout
.style1 {
margin-left: 40px;
}
In this section, you will learn about adding logout in Spring Security
Application.
Before going forward , you must aware of Spring Security login.
Spring Date Property
Spring Date Property
Passing a date format in the bean property is not allowed.../schema/beans/spring-beans-3.0.xsd">
<bean id="...; <constructor-arg
java problem - Java Beginners
. After each Room has been instantiated, we will assume that the array
index... will
be in array cell with index 2, room numbered 5 will be in array cell with index 5, etc
Form Processing Problem
the index of file
pos = file.indexOf("filename...;
<%
}
%>
</table>
</html>
The problem while
autocomplete(): Spring mvc with jquery: I am not getting correct value in the text filed. Please help me
autocomplete(): Spring mvc with jquery: I am not getting correct value...)
public ModelAndView index() {
ModelAndView mv=new ModelAndView...;/div>
</body>
</html>
Problem:
whenever we send the request
Validaton(Checking Blank space) - Spring
Validaton(Checking Blank space) Hi i am using java springs .I am having problem in doing validation.
I am just checking blank space.
This is my controller. I named it salescontroller.
package controller;
import
Advertisements
If you enjoyed this post then why not add us on Google+? Add us to your Circles | http://roseindia.net/tutorialhelp/comment/60443 | CC-MAIN-2015-48 | refinedweb | 1,136 | 57.67 |
SNEAK PEEK INTO CSS4
Internet is a medium which evolves constantly and it is very hard to believe that CSS is nearing release of version 4. CSS4 has emerged as a buzzword in web technology arena with CSS Working Group’s release of first working draft on the same. World Wide Web Consortium, the governing body that oversees the development of web standards is already plotting the future of CSS with CCS4. Although CSS4 will not replace CSS3, the work on specifications will go on parallel with CSS3 modules. There are many innovative proposals in CSS4 including parent selector, UI states pseudo classes, reference combinators, logical combinations and namespaces. It has been reported that there is a proposal for responsive design in CSS4 and it will let a web developer apply preload states for slow connections.
Cascading script sheet is another much talked about feature of CSS4 and it will be extremely useful for enhancing interaction. According to seasoned web developers, CSS4 technology uses unobtrusive and function style syntax. CLISS (Command Line Interface Styling Script Sheet) is another best feature and it follows a very similar syntax to the CSS. Another fascinating attraction of CSS4 is proper email styling support and it is almost similar to CSS3. With the introduction of this web technology, some old properties have been reintroduced and some are introduced for the first time.
Parent Selector
Parent selector allows a web designer to style a parent element based on its child element and it is one of the favorite selectors of passionate web developers.
Reference Combinators
Reference combinator consists of two slashes in between CSS qualified names and these slashes are used to define the association between two compound selectors.
Location Pseudo-Classes
CSS4 has added few interesting pseudo classes to handle links such as :any-link, :local-link, :target, :scope, :link and :visited.
UI States Pseudo Classes
CSS4 introduces a set of UI states that will allow us to style elements depending on their user interface state. :enabled, :checked, :default, :valid and :invalid are the pseudo classes introduced in CSS4.
Logical Combinations
New logical combination pseudo class called: matches ( ) is one of the innovative attractions of CSS4.
It is learnt that some more features will be added to CCS4 very soon and they will undoubtedly make the experience of web developer easier. Variable declaration feature in CSS4 will reduce the amount of code redundancy experienced in previous versions of CSS4. It is brand new and no web browser actually supports these features of Cascading Style Sheet 4 yet. As CSS4 is built on CSS3, it is desirable to continue mastering CSS3, its features and applications.
As CSS4 is a work in progress, many of the new features may be removed in a later stage. As per industry reports, its new media features will probably include script, pointer, hover and luminosity. When CCS3 was introduced, neither its developers nor others thought that it would become so popular. It is perceived that the same miracle will happen in the case of CSS4 too. Web developers are quite fascinated by the elegant features of CSS4 and they are eagerly anticipating for its official release. | http://www.pro-tekconsulting.com/blog/category/css4/ | CC-MAIN-2017-43 | refinedweb | 526 | 51.07 |
Marc van Grootel writes: > > Marc, you argued for having an explicit metadata structure; do you > > want to respond to this? > > Not quite, Fred. I proposed the meta tag approach. You came up with > metadata as a wrapper for multiple meta elements. I liked it. I Marc, Sorry; I wasn't trying to saddle you with the specific structure, just that there was an explicit structure. > believe that info like it is can extend the lifetime of the DTD, and > it can also be an escape-hatch for new bookmark apps. I guess the need > for some sort of metadata is apparent, it was there from the start ... > <info> > <meta name="xbel:owner">dma</> > <meta name="a:foo">bar</> ... > We can claim the xbel namespace and put essential info stuff in it. We cannot "claim" namespaces; namespaces are declared using processing instructions, as indicated in Greg's example. Namespaces don't need to be changed to be usable; they actually fit the need fairly well, but I'm not convinced they're exactly what's needed by themselves. I propose that <info> remains as a sequence of <metadata> elements, each of which uses an attribute to indicate an application or scheme of some sort. <metadata> can be declared to hold #PCDATA or whatever, and then namespaces are used to describe the structure of the contents. This would allow multiple applications to use the same DTD as the source of their information (hence the same namespace), while the distinction between applications is made clear. (It's entirely possible that multiple RDF schemes would be stored, so ownership of various chunks may well need to be identified separately from the namespace specifications. > I regret losing id from folder. Why is an alias to a folder stranger > then an alias to a bookmark. NS has the latter but not the first. MSIE > supports both. NS has a separator, MSIE doesn't know such a thing, I did not know this. I'll add it back. This does introduce the possibility of circular data structures, so applications will need to be careful about traversing aliases to folders. That can be dealt with in the documentation. How does MSIE deal with aliases to folders (including in the user interface)? I think the dominant requirement is that XBEL be sufficient for storing all information currently stored in browser bookmarks for at least the major browsers, and preferably minor players as well. -Fred -- Fred L. Drake, Jr. <fdrake@acm.org> Corporation for National Research Initiatives 1895 Preston White Dr. Reston, VA 20191 | https://mail.python.org/pipermail/xml-sig/1998-October/000406.html | CC-MAIN-2017-09 | refinedweb | 424 | 65.73 |
How to write a string to the Output Window in Visual Studio?
Here’s a simple tip that lets you write the data / string to the output window when debugging a Windows Phone Application.
This is not specific just to the Windows Phone Development but works for other project types too in Visual Studio.
You can use the method used Debug.WriteLine defined in the System.Diagnostics namespace to write the string to the Output Window like the sample line given below.
Debug.WriteLine("This is a test message");
When this line is executed, you should see the string “This is a test message” in the Output Window.
Make sure that “Show Output from” is set to Debug in the Output Window. | https://developerpublish.com/how-to-write-a-string-to-the-output-window-in-visual-studio/ | CC-MAIN-2020-45 | refinedweb | 122 | 73.58 |
Supposed you have collected a list item known as ip_collections, and you want to write the list to a temp file.
import tempfile with tempfile.TemporaryFile() as tf: for ip in ip_collections: tf.write(bytes(ip + '\n', 'utf-8')) tf.seek(0)
Need to convert the string in byte, the tf.seek(0) is to re-wind the pointer back to the start of the file.
After the code exits the with context the temp file is removed.
Supposed you want to store the values of temp file into a variable for some other purpose before removal.
import tempfile base_list = [] with tempfile.TemporaryFile() as tf: for ip in ip_collections: tf.write(bytes(ip + '\n', 'utf-8')) tf.seek(0) base_list = tf.read().decode().split() tf.seek(0) print(base_list)
Need to rewind the start of file with tf.seek(0) so that all items in the temp file will be transferred to base_list. Need to take note that tf.seek(0) has to be put outside for loop otherwise the values will be overwritten on each iteration.
the print statement is for testing if the list is stored.
Advertisements | https://cyruslab.net/2018/05/24/pythonwriting-to-temporary-file/ | CC-MAIN-2019-22 | refinedweb | 189 | 78.75 |
jndi lookup fails in user-threadGuenther Bodlak Oct 4, 2011 9:33 AM
Hi,
I have a ServletContextListener which creates and starts a new Thread when the servlet context gets initialized.
In that Thread I'm trying to lookup an ejb. The jndi-lookup fails with a NameNotFoundException.
This code works in Glassfish 3.1 but not in jboss 7.0.2?
The code is attached.
Is there a problem with my code or this a bug in jboss 7.0.2?
Thanks for your help
Günther
- TestEjb.java.zip 332 bytes
- TestThread.java.zip 628 bytes
- StartupListener.java.zip 614 bytes
1. Re: jndi lookup fails in user-threadRiccardo Pasquini Oct 4, 2011 9:05 AM (in response to Guenther Bodlak)1 of 1 people found this helpful
Quite strange that it works in glassfish, as far as i know, the jndi name is "modular" (same module...but war is a different module or do you deploy the ejb in the war?)... you should use "application" if they (jar and war) are packaged in the same ear or "global" if not...
startup logs shows the jndi names available for that ejb...
anyway, i would ilke to suggest you the timer service instead of running a thread in the context listener, in the listener lookup for the timed object and use the jee service... let the application server to be the owner of threading
bye
2. Re: jndi lookup fails in user-threadGuenther Bodlak Oct 4, 2011 9:14 AM (in response to Riccardo Pasquini)
Hi Riccardo,
all 3 classes are deployed in a war. So the JNDI-Name should be o.k.
In the application I am working on we need to have the control over some threads - it is not possible to use the timer service ...
Günther
3. Re: jndi lookup fails in user-threadRiccardo Pasquini Oct 4, 2011 9:21 AM (in response to Guenther Bodlak)
can you try the lookup in a managed bean? just for test purposes...
4. Re: jndi lookup fails in user-threadGuenther Bodlak Oct 4, 2011 9:43 AM (in response to Riccardo Pasquini)
Hi,
I updated the code of StartupListener. It now calls StartupListener.doLookupTest() where I perform the same JNDI-lookup as in TestThread.callTestEjb().
It works in StartupListener, but it doesn't work in TestThread.
Here are parts of the server.log:
the jndi bindings:
15:28:21,342 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named TestEjb in deployment unit deployment "webtest1.war" are as follows:
java:global/webtest1/TestEjb!gbo.ejb.TestEjb
java:app/webtest1/TestEjb!gbo.ejb.TestEjb
java:module/TestEjb!gbo.ejb.TestEjb
java:global/webtest1/TestEjb
java:app/webtest1/TestEjb
java:module/TestEjb
...
the lookup performed in StartupListener which works:
15:28:25,420 INFO [gbo.servlet.StartupListener] (MSC service thread 1-1) before lookup of TestEjb
15:28:25,435 INFO [gbo.servlet.StartupListener] (MSC service thread 1-1) after lookup of TestEjb
15:28:25,435 INFO [gbo.servlet.TestThread] (Thread-20) TestThread started
15:28:25,435 INFO [gbo.servlet.TestThread] (Thread-20) before lookup of testEjb
the lookup in the new Thread which doesn't work:
15:28:25,435 WARNUNG [gbo.servlet.TestThread] (Thread-20) naming-Exception: javax.naming.NameNotFoundException: java:module/TestEjb
at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:55)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:209)
at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_27]
at gbo.servlet.TestThread.callTestEjb(TestThread.java:37) [classes:]
at gbo.servlet.TestThread.run(TestThread.java:24) [classes:]
Thanks for your help
Günther
5. Re: jndi lookup fails in user-threadRiccardo Pasquini Oct 4, 2011 11:05 AM (in response to Guenther Bodlak)
good you can pass the InitialContext instance to a concrete implementation of Runnable interface... build the Thread from that Runnable and... ?
6. Re: jndi lookup fails in user-threadGuenther Bodlak Oct 4, 2011 11:40 AM (in response to Riccardo Pasquini)
Hi,
passing the InitialContext instance into the thread does not work.
It ends up in a NameNotFoundException
Günther
7. Re: jndi lookup fails in user-threadRiccardo Pasquini Oct 4, 2011 11:41 AM (in response to Guenther Bodlak)
i surrender, i'm sorry
8. Re: jndi lookup fails in user-threadjaikiran pai Oct 6, 2011 7:56 AM (in response to Guenther Bodlak)1 of 1 people found this helpful
Creating threads from within the servlet or any EE component isn't recommended by the spec. The JNDI lookup of "app", "module" and "comp" won't work in those threads. See this for details
9. Re: jndi lookup fails in user-threadGuenther Bodlak Oct 7, 2011 7:29 AM (in response to jaikiran pai)
Hi,
It works with the global namespace: "java:global/webtest1/TestEjb"
I appologize not trying that earlier . Sorry!
I'm new to JEE and do not really understand the different namespaces.
Do you know a good documentation about that topic?
Do you think I can get problems using that global namespace in my user-thread?
In the user-thread I'd like to delegate all work to an ejb. That ejb depends on other ejbs (using hibernate or jdbc for db-access).
Many thanks for your time!
Günther | https://developer.jboss.org/thread/173179 | CC-MAIN-2018-17 | refinedweb | 882 | 58.89 |
This page contains TensorFlow glossary terms. For all glossary terms, click here.
C
Cloud TPU
A specialized hardware accelerator designed to speed up machine learning workloads on Google Cloud Platform.
custom Estimator
An Estimator that you write yourself by following these directions.
Contrast with premade Estimators.
D.
device
A category of hardware that can run a TensorFlow session, including CPUs, GPUs, and TPUs..
Estimator
An instance of the
tf.Estimator class, which encapsulates logic that builds
a TensorFlow graph and runs a TensorFlow session. You may create your own
custom Estimators (as described
here)
or instantiate premade Estimators created by
others.
F
in the TensorFlow Programmers Guide.
"Feature column" is Google-specific terminology. A feature column is referred to as a "namespace" in the VW system (at Yahoo/Microsoft), or a field..
G.
I
input function
In TensorFlow, a function that returns input data to the training, evaluation, or prediction method of an Estimator. For example, the training input function returns a batch of features and labels from the training set.
L.
M
metric
A number that you care about. May or may not be directly optimized in a machine-learning system. A metric that your system tries to optimize is called an objective.
model function
The function within an Estimator that implements machine learning the Creating Custom Estimators chapter in the TensorFlow Programmers Guide.
N
node (TensorFlow graph)
An operation in a TensorFlow graph.
O.
P
Parameter Server (PS)
A job that keeps track of a model's parameters in a distributed setting..).
root directory
The directory you specify for hosting subdirectories of the TensorFlow checkpoint and events files of multiple models.
S... | https://developers.google.com/machine-learning/glossary/tensorflow?authuser=1 | CC-MAIN-2021-17 | refinedweb | 274 | 50.02 |
- Author:
- whiskybar
- Posted:
- March 19, 2008
- Language:
- Python
- Version:
- .96
- newforms
- Score:
- 2 (after 2 ratings)
Inherit your forms from model from this ModelForm and it will check all the database fields with unique=True in
is_valid().
This is a hack around #5736. It is actually a part of a grand problem mentioned in #4895. You can use this hack until the issue is fully resolved.
More like this
- remove the annoying "Hold down control..." messages by arthur 5 years, 4 months ago
- Automatic stripping textual form fields by nail.xx 7 years, 11 months ago
- CustomChoiceField, Selectable label field version of ModelChoiceField by mauro 8 years, 4 months ago
- More admin clock time increments by robharvey 9 years, 3 months ago
- Hidden Date Display Widget for Admin by andrew.schoen 7 years ago
line 30 self.name doesn't handle i18n dunno why
#
from django import newforms as forms
class CleanUniqueField: """Wrap the clean_XXX method."""
class ModelForm(forms.ModelForm): """A hack around the Django ticket #4895."""
#
I've not commented what the code above is the verbose_name is introduced because self.name isn't the real name to display in the error message
#
Thanks visik7, this is a valid point indeed. Is verbose_name unicode safe? I am confused a little because you put a #FIXME there.
How about
Will it solve the issue? Visik7 do you have a way of testing it?
#
Please login first before commenting. | https://djangosnippets.org/snippets/649/ | CC-MAIN-2016-30 | refinedweb | 238 | 75.5 |
The Slider Widget. More...
#include <qwt_slider.h>
The Slider Widget.
QwtSlider is a slider widget which operates on an interval of type double. Its position is related to a scale showing the current value.
The slider can be customized by having a through, a groove - or both.
Position of the scale
Construct vertical slider in QwtSlider::Trough style with a scale to the left.
The scale is initialized to [0.0, 100.0] and the value set to 0.0.
Construct a slider in QwtSlider::Trough style
When orientation is Qt::Vertical the scale will be aligned to the left - otherwise at the the top of the slider.
The scale is initialized to [0.0, 100.0] and the value set to 0.0.
Handles QEvent::StyleChange and QEvent::FontChange events
Draw the thumb at a position
Draw the slider into the specified rectangle.
Determine what to do when the user presses a mouse button.
Implements QwtAbstractSlider.
Mouse press event handler
Reimplemented from QwtAbstractSlider.
Mouse release event handler
Reimplemented from QwtAbstractSlider.
Qt paint event handler
Qt resize event handler
Determine the value for a new position of the slider handle.
Implements QwtAbstractSlider.
Change the slider's border width.
The border width is used for drawing the slider handle and the trough.
En/Disable the groove
The slider can be cutomized by showing a groove for the handle.
Set the slider's handle size.
When the size is empty the slider handle will be painted with a default size depending on its orientation() and backgroundStyle().
Set the orientation.
Set a scale draw.
For changing the labels of the scales, it is necessary to derive from QwtScaleDraw and overload QwtScaleDraw::label().
Change the position of the scale.
En/Disable the trough
The slider can be cutomized by showing a trough for the handle.
Specify the update interval for automatic scrolling.
The minimal accepted value is 50 ms.
Timer event handler
Handles the timer, when the mouse stays pressed inside the sliderRect(). | http://qwt.sourceforge.net/class_qwt_slider.html | CC-MAIN-2016-18 | refinedweb | 329 | 68.97 |
pysfmpysfm
Structure from Motion Algorithms in Python.
Eventually, this is intended to be a collection of factorization based structure from motion algorithms. Currently, it only contains a standard rigid factorization algorithm and a state of the art non-rigid shape basis factorization method (Dai et al. 2012) that won the best paper at CVPR2012.
NOTE: This is extremely beta, and no claim is made about the correctness of these implementations. There are likely bugs, and thus contributions and/or friendly comments are welcome. See below for contact information.
RequirementsRequirements
- setuptools (you likely have this)
- numpy
- scipy
- CVXOPT (for the shape-basis method)
- matplotlib (for viewing results)
- nose (if you want to run the test suite).
InstructionsInstructions
To run Dai et al. 2012 on an observation matrix W
import sfm # Run Dai2012 with 3 basis shapes. inferred_model = sfm.factor(W, n_basis = 3) # Get the Fx3xN tensor of points in the # cameras reference frame. Ps = inferred_model.Ps # To view the recovery (using matplotlib) inferred_model.visualize()
ContactContact
To contact the author email jtaylorFOOcs.toronto.edu where FOO is replaced with the at symbol. | https://giters.com/gurpreetshanky/pysfm | CC-MAIN-2022-40 | refinedweb | 180 | 50.63 |
nn_device - Man Page
start a device
Synopsis
#include <nanomsg/nn.h>
int nn_device (int s1, int s2);
Description
Starts a device to forward messages between two sockets. If both sockets are valid, nn_device function loops and sends any messages received from s1 to s2 and vice versa. If only one socket is valid and the other is negative, nn_device works in a "loopback" mode — it loops and sends any messages received from the socket back to itself.
To break the loop and make nn_device function exit use the nn_term(3) function.
Return Value
The function loops until it hits an error. In such a case it returns -1 and sets errno to one of the values defined below.
Errors
- EBADF
One of the provided sockets is invalid.
- EINVAL
Either one of the socket is not an AF_SP_RAW socket; or the two sockets don’t belong to the same protocol; or the directionality of the sockets doesn’t fit (e.g. attempt to join two SINK sockets to form a device).
- EINTR
The operation was interrupted by delivery of a signal.
- ETERM
The library is terminating.
Example
int s1 = nn_socket (AF_SP_RAW, NN_REQ); nn_bind (s1, "tcp://127.0.0.1:5555"); int s2 = nn_socket (AF_SP_RAW, NN_REP); nn_bind (s2, "tcp://127.0.0.1:5556"); nn_device (s1, s2);
See Also
nn_socket(3) nn_term(3) nanomsg(7)
Authors
Martin Sustrik
Referenced By
nanomsg(7), nn_getsockopt(3), nn_setsockopt(3). | https://www.mankier.com/3/nn_device | CC-MAIN-2021-21 | refinedweb | 234 | 65.62 |
Convert a string into a time
#include <time.h> char * strptime( const char *buf, const char *format, struct tm *timeptr );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The strptime() function converts the character string that buf points to into a time and stores the time in the tm structure pointed to by timeptr, using the specified format.
Formats
The format is composed of zero or more directives, each of which is composed of one of the following:
The strptime() function supports the following conversion specifications:
Modified conversion specifiers
You can modify some conversion specifiers by adding the E and O (Oh) modifier characters to indicate that an alternative format or specification should be used rather than the one normally used by the unmodified conversion specifier. If the alternative format or specification doesn't exist in the current locale, the function behaves as if you used the unmodified conversion specification.
A conversion specification composed of whitespace characters is executed by scanning input up to the first character that isn't whitespace (which remains unscanned), or until no more characters can be scanned.
A conversion specification that is an ordinary character is executed by scanning the next character from the buffer. If the character scanned from the buffer differs from the one comprising the directive, the directive fails, and the differing and subsequent characters remain unscanned.
A series of conversion specifications composed of %n, %t, whitespace characters, or any combination is executed by scanning up to the first character that isn't whitespace (which remains unscanned), or until no more characters can be scanned.
Any other conversion specification is executed by scanning characters until a character matching the next doesn't scan any more characters.
A pointer to the character after the last character parsed in the string, or NULL.
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> int main( void ) { struct tm my_tm; char in_buffer[ 80 ] ="July 31, 1993 11:00:00", out_buffer[ 80 ]; time_t t; /* Convert the string to a struct tm. */ memset (&my_tm, 0, sizeof(struct tm)); strptime( in_buffer, "%b %d, %Y %T", &my_tm ); /* Convert the struct tm to a time_t (to fill in the * missing fields). */ t = mktime (&my_tm); /* Convert the time back to a string. */ strftime( out_buffer, 80, "That's %D (a %A), at %T", localtime (&t) ); printf( "%s\n", out_buffer ); return EXIT_SUCCESS; }
This produces the output:
That's 07/31/93 (a Saturday), at 11:00:00 | http://www.qnx.com/developers/docs/7.0.0/com.qnx.doc.neutrino.lib_ref/topic/s/strptime.html | CC-MAIN-2018-22 | refinedweb | 417 | 50.26 |
Debugging Serverless Application Errors
When a customer reports an issue that you can’t replicate, but you still need to solve, what do you do? You can release a change with a log statement, then start monitoring logs to try and catch the customer’s function, and hope you see the error again. That can be a long and fruitless task.
We’ve been there ourselves! That’s why we’ve added tags to the Serverless Framework dashboard’s debugging tool, the explorer.
Our new tag filters can do the tracking for you. Now, when you’re trying to debug an issue that’s hard to track or hard to replicate, try this: log when you’re in the error state, tag that log line, and output a JSON object that represents some state of your application. Open the explorer, filter on that tag and view the invocations the explorer finds for you.
Here’s an example of how we’ve used it; the API that powers the Serverless Framework dashboard is monitored within the dashboard (yes, we eat our own dogfood). One of our customers reported a query error, but no actual errors were being raised. We created a tag, and used it to find their invocation logs, so we could study the state of our application during the time their functions were invoked.
Instead of trying to track their invocations ourselves, we let the explorer do it. The time we spent was entirely focused on understanding the issue, not hunting for logs.
If you want to try tags in the explorer, you’ll first need to add some to your Serverless.yml file.
Tagging with NodeJS
If you’re using NodeJS, update serverless with npm update -g serverless
Add this code to your Serverless.yml file:
module.exports.hello = async event, context => { context.serverlessSdk.tagEvent('customerId', 5, { newCustomer: true, isDemo: true, demoExpire: '2019-12-01' }) tagEvent('200 OK') return { statusCode: 200, body: JSON.stringify( { message: 'Go Serverless v1.0! Your function executed successfully!', input: event, }, null, 2 ), }; };
Tagging with Python
If you’re using Python, add this:
def hello(event, context): context.serverless_sdk.tag_event('customerId', 5, { 'newCustomer': True, 'isDemo': True}) body = { "message": "Go Serverless v1.0! Your function executed successfully!", "input": event } response = { "statusCode": 200, "body": json.dumps(body) }
If you’d like to learn more about tagging Lambda functions, check out Jeremy Daly’s blog post, “How to tag your Lambdas for smarter serverless applications“.
Learn more about debugging with the explorer, and open up your Serverless Framework Dashboard and explore tags for yourself! | https://awsfeed.com/whats-new/serverless/resolve-serverless-errors-the-easy-way-with-tags | CC-MAIN-2021-31 | refinedweb | 427 | 64.61 |
Snow Screen on HP EliteBook 8460
Hi Fog fans,
We got Fog working well with all our desktops and older laptops. We are having an issue with new i7 laptops we are getting. They are HP EliteBooks 8460p. PXE loads the kernel but gives this output…
[QUOTE]
[LEFT][FONT=arial][COLOR=#555555]Loading fog/kernel/bzImage …[/COLOR][/FONT][/LEFT]
[LEFT][FONT=arial][COLOR=#555555]Loading /fog/images/init.gz … ready [ 1.103619] tps65010: no chip? [ 1.289172] acpiphp_ibm: ibm_acpiphp_init: acpi_walk_namespace failed [ 1.259533] Cound not find Carillo Ranch MCH device. [ 1.259820] uvesafb: failed to execute /sbin/v86d [ 1.259872] uvesafb: make sure that the v86d helper is installed and executable [ 1.259923] uvesafb: Getting VBE info block failed (eax=0x4f00, err=-2) [/COLOR][/FONT][/LEFT]
[LEFT][FONT=arial][COLOR=#555555][ 1.259973] evesafb: vbe_init() failed with -22[/COLOR][/FONT][/LEFT]
[/QUOTE]
Then the screen goes to snow. Similar issue in this [URL=‘ from the old forum.
I tried the Kitchen Sink kernel and that gets past the snow but it fails with Quick Host Registration, and snagging the image. I also tried the most recent kernel ‘Kernel-3.1-rc8.core’ and that gives me snow also.
Seems to be a video/GPU issue?
Any ideas?
Thanks
Have you tried using kernel arguments like nomodeset?
I have moved the thread for you
Sorry, posted this in the wrong area. Saw it titled ‘Help!’ and went straight for it. I’ll post it in the correct place. | https://forums.fogproject.org/topic/155/snow-screen-on-hp-elitebook-8460 | CC-MAIN-2022-21 | refinedweb | 247 | 78.96 |
|
My Account
More Articles
Excerpt from Professional ASP.NET 2.0 Databases
by Thiru Thangarathinam
One of the advanced features of ADO.NET 2.0 you can utilize from an ASP.NET page is creating and working with strongly typed DataSets. Using the DataSet class provided by the System.Data namespace, in a typical DataSet, you might access the name of a category like this:
DataSets.
DataSet
System.Data
DataRow row = categoriesDataSet.Tables["Categories"].Rows[0];
Response.Write(row["Name"]);
With strongly typed DataSets, you will be able to access your data in a much more programmer-friendly fashion:
DataSets
Response.Write(categoriesDataSet.Categories[0].Name);
As you can see, the second method is much easier to understand and write. The functionality just described is made possible by a convention in the .NET Framework known as strongly typed DataSets. Strongly typed DataSets are classes that inherit from a DataSet, giving them a strongly typed nature based on an XSD structure you specify.
DataSet,
DataTable
DataRow
As you may have guessed by now, strongly typed DataSets require you to write XSD schemas. In fact, not every XSD schema qualifies to be a DataSet, so it may be argued that you need to know specifically what is allowed in an XML schema that controls what aspect of a DataSet. The good news, however, is that for a majority of your needs, Visual Studio makes it extremely easy to author strongly typed DataSets. So as you add a new DataTable, it creates and maintains an XSD schema underneath for you. In the case of strongly typed DataSets, an XML schema provides a rich definition of the data types, relationships, keys, and constraints within the data it describes. The next section provides you with a discussion on how to create strongly typed DataSets.
There are several ways to create strongly typed DataSets. This article will illustrate the creation of strongly typed DataSets in Visual Studio 2005.
Strongly typed DataSets are merely generic DataSets that have their columns and tables defined in advance, so the compiler already knows what they will contain. Each version of Visual Studio has made the process of strongly typing a DataSet easier, and Visual Studio 2005 has lived up to this expectation by providing an easy-to-use interface for creating and managing strongly typed DataSets. In this example, you will use the Production.Product table in the AdventureWorks database to demonstrate this feature. Simply perform the following steps:
ProductDataSet.xsd
App_Code
As you can see from Figure 1, for each table that is added to the designer, Visual Studio creates a strongly typed DataTable (the name is based on the original table) and a TableAdapter. The DataTable has all of its columns already defined. The table adapter is the object you will use to fill the table. By default, you have a Fill() method that will find every row from that table.
TableAdapter
Fill()
This strongly typed DataSet, as is, will return all of the records in the Product table. Since the Product table contains a lot of information, let us modify the default query to return only the products that belong to the supplied product category. To do this, right-click the ProductTableAdapter and select Add Query. Pick Use SQL statements and click the Next button. Then, choose SELECT, which returns rows, and click Next. Finally, enter the following query in the window (or use the Query Builder to accomplish the same task):
SELECT ProductID, Name, ProductNumber, MakeFlag
FROM Production.Product
Where ProductSubcategoryID = @ProductSubcategoryID
This SQL query is a simple SELECT query with an @ProductSubcategoryID parameter to narrow down the results. This will enable you to return the products that belong to the supplied category. Leaving the Fill a DataTable and Return a DataTable check boxes checked, click Finish. After adding this SELECT statement, your designer should now have an extra query added to the ProductTableAdapter, as shown in Figure 2.
@ProductSubcategoryID
ProductTableAdapter
Note that you can also build strongly typed DataSets using a command-line utility called xsd.exe. To create the strongly typed DataSet based on the Categories.xsd schema, use the following command:
xsd.exe
Categories.xsd
xsd /d /l:CS Categories.xsd
Now that you have created the strongly typed DataSet, the next step is to utilize it from an ASP.NET page.
With the strongly typed DataSet created, you can easily display this data in an ASP.NET page with just a few lines of code. Listing 1 discusses the ASP.NET page that utilizes the DataSet created in the previous section.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
ProductDataSetTableAdapters.ProductTableAdapter adapter = new
ProductDataSetTableAdapters.ProductTableAdapter();
ProductDataSet.ProductDataTable table = adapter.GetDataBy(1);
gridResults.DataSource = table;
gridResults.DataBind();
}
</script>
<html xmlns="" >
<head id="Head1" runat="server">
<title>Using a Strongly Typed DataSet</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView
</asp:GridView>
</div>
</form>
</body>
</html>
This code is very simple. You create an instance of the ProductTableAdapter, which you will use to fill the DataTable. Notice that instead of declaring a generic DataTable, you declare an object of type ProductDataTable. To fill this DataTable, you call the GetDataBy() method and pass it a category ID. Figure 3 illustrates the result of the above code sample.
ProductDataTable
GetDataBy()
In addition to binding the results to the GridView through code, you could also use an ObjectDataSource, setting its TypeName property to ProductDataSetTableAdapters.ProductTableAdapter and its SelectMethod to GetDataBy().
GridView
ObjectDataSource
TypeName
ProductDataSetTableAdapters.ProductTableAdapter
SelectMethod
Note that strongly typed DataSets are not just limited to read-only scenarios. You can easily use strongly typed DataSets for insert, update, and delete scenarios the same way you would do with untyped DataSets.
There are additional methods to accomplish strong typing in your applications, outside of using strongly typed DataSets. For example, you can create custom classes that are more lightweight than DataSets and correspond exactly to your database.
So far, you have seen examples demonstrating how strongly typed DataSets make the jobs of creating and consuming DataSets far easier. Typed DataSets are easier to maintain, have strongly typed accessors, provide rigid data validation, and, because they can still be serialized, can be exposed as the return types of web service function calls.
It would be reasonable to ask, however, whether these things are any faster or slower than regular DataSets. Unfortunately, the answer is far from clear. You may already know that throwing exceptions incurs a slight overhead from the runtime, as does typecasting. All of the properties and functions in a strongly typed DataSet are wrapped in exception-handling calls, and a great many are wrapped in typecasting code. This leads some people to believe that they are slightly less efficient than standard DataSets. However, in any production application, you'll be wrapping your DataSet in exception-handling and typecasting code anyway, so the fact that the typed DataSet does this for you should be considered an advantage and not a performance drain.
Because of the inherent advantages of strongly typed DataSets and their role in making your code easier to develop and maintain, you should consider the feasibility of using strongly typed DataSets for your applications.
This article is excerpted from Chapter 13, "Advanced ADO.NET for ASP.NET Data Display" of Professional ASP.NET 2.0 Databases (Wrox, 2007, ISBN: 978-0-470-04179-6), by Thiru Thangarathinam. Thiru works for Intel Corporation where he focuses on enterprise applications and service oriented architecture. He is a Microsoft Certified Application Developer (MCAD) specializing in architecting and building distributed n-tier applications using ASP.NET, C#, VB, ADO.NET, and SQL Server. Thiru's other recent articles on Wrox.com are excerpts from Professional ASP.NET 2.0 XML (Wrox, 2006, ISBN: 978-0-7645-9677-3): "Atlas" Foundations: ASP.NET 2.0 Callback and Using SOAP Headers with ASP.NET 2.0 Web Services. | http://www.wrox.com/WileyCDA/Section/id-302833.html | crawl-001 | refinedweb | 1,319 | 57.06 |
If your only source of information is the Internet, you may be under the impression that Windows desktop development is pretty much dead. Yet according the telemetry data in Visual Studio, there are roughly 2.4 million developers actively working on desktop applications each month, up 50% from 20 months ago. (Metrics as of May, 2018.) With such a large community to support, Microsoft is looking at way to help developers integrate those assets into Windows 10.
XAML Islands
One of the biggest complaints about Microsoft Windows development is the lack of investment in Winforms and WPF; most of the new features exposed by Windows 10 are built soley for UWP. And despite the fact that we can now call UWP APIs from the .NET framework, that only works when the UI isn’t involved.
To address this, two new controls are being created: WinForms XAML Host and WPF XAML Host, which allow you to embed a UI written for UWP inside your existing WinForms/WPF application.
Wrapped UWP and Windows 7 Fallbacks
One of the reasons developers continue to use WinForms or WPF is support for Windows 7. Subsequently, a requirement for the new XAML Islands is the ability to function correctly when the application isn’t running on Windows 10.
One example is a WebView, which is available now. If the application is running on Windows 10, the web view will host the Edge browser. If you are instead running on Windows 7, an IE browser control will be loaded.
Other controls in the planning stages include MediaPlayer, InkCanvas/InkToolBar, Map, and SwapChainPanel.
Airspace
Developers who have had to mix WinForms with WPF are familiar with the concept known as “airspace”, which deals with the problem of overlapping controls from difference UI frameworks within the same window.
In Win32 development, each object on the screen gets its own window handle (HWND) registered at the OS level. This HWND is associated with a rectangle on the screen where the object can render its content. Generally speaking, each WinForms control each gets its own HWND, while most WPF controls just share one HWND for the whole window.
For XAML islands (WinForms and WPF), a HWND is created for use by the UWP control. This can have some repercussions that aren’t obvious. For example, if you rotate the UWP control the HWND doesn’t rotate with it, which means the HWND needs to be larger to accommodate it.
Popup context menus can be especially difficult to deal with. These usually have their own HWND, but that HWND may not necessarily be stacked correctly with the HWND for the XAML island causing the menu to appear behind another control.
Threading Model
Currently with UWP, each top-level window is expected to have its own dedicated UI thread. Say, for example, you have a master-detail view where the detail view is written in UWP. There are several ways you can implement this:
- Detail view shares the master view’s window: no problem.
- Detail view has its own top-level window and doesn’t share objects: no problem.
- Detail view has its own top-level window but shares objects with the master view: possible race conditions, UI cross-threading issues, etc.
Eventually this problem will be resolved with the introduction of lightweight windows.
>
Why WinForms is really still used
by Jeff Jones,
Re: Why WinForms is really still used
by Carlos Osuna,
Why WinForms is really still used
by Jeff Jones,
Your message is awaiting moderation. Thank you for participating in the discussion.
WinForms is still popular because the tools support rapid development - a feature that is not mature, or in the case of Xamarin.Forms, does not even exist in the XAML UI world of VS. It takes far less time to make a WinForms UI than UWP, WPF, or Xamarin UIs.
And there is no reason for that. VB developers going back to VB1 in 1991 - 27 years ago - had a better UI designer than exists for XAML today! Existing XAML designers need to brought up to the standards and capabilities of WinForms in order to entice developers off WinForms.
I have heard the excuse that "XAML is too complicated for a designer" - but such an excuse is a non-sequitur considering the existing XAML designers in VS.
Come on Microsoft, put someone in charge who understands what rapid application development is, why VB gained its huge market share in the first place (hint: it wasn't the language), and understands the role that value engineering plays in making a successful, disruptive product.
Re: Why WinForms is really still used
by Carlos Osuna,
Your message is awaiting moderation. Thank you for participating in the discussion.
What really happened was a change of heart inside Microsoft they wanted to build a better browser and a more structured one, but still be as free as HTML.
So XAMLs motto was “if you can code, we will render it” and not the other way as Visual Baic accustomed us from day 1. So actually creating a usable designer from that perspective is virtually impossible just like there’s never been a successful HTML UI designer.
So that’s part of the reason WinForms still lives on.
The other reason has more to do with a mistake made within Microsoft with XAML. Ever since WPF, MSFT has been too stubborn to understand that the flexibility of HTML is actually a hinderance not asset for modern XAML. The fact they haven’t changed the XML namespace since the sad days of Framework 3.5 prevents the designer from actually knowing if you’re coding for WPF, Silverlight (long gone), Metro (also gone), or UWP. They thought they were creating this “mighty morphing markup language” (MMML) that they forgot that not even the Use Cases were similar. WPF runs in a conventional Window, Silverlight inside a browser, Metro full screen, and UWP is back to WPF but more in a blob than an actual Win32 screen. Only Xamarin was wise enough to change the namespace.
With that in mind you would need an extremely complex designer to even achieve basic rendering. | https://www.infoq.com/news/2018/08/Modern-Desktop-Applications/ | CC-MAIN-2021-25 | refinedweb | 1,025 | 61.06 |
Project 0: Unix/Python/Autograder Tutorial
Table of Contents
Introduction
The projects for this class assume you use Python 3.6..
Files to Edit and Submit: You will fill in portions of
addition.py,
buyLotsOfFruit.py, and
shopSmart.py in
tutorial.zip during the assignment. You should submit these files with your code and comments. Please do not change the other files in this distribution or submit any of our original files other than these files..
Due: Monday 1/28 at 11:59 pm highlighting to help you distinguish items such as keywords, variables, strings, and comments. Pressing Enter, Tab, or Backspace may cause the cursor to jump to weird locations: this is because Python is very picky about indentation, and Emacs is predicting the proper tabbing that you should use.
Some basic Emacs editing commands (
C- means "while holding the Ctrl-key"):
C-x C-sSave the current file
C-x C-fOpen a file, or create a new file it if doesn't exist
C-kCut a line, add it to the clipboard
C-yPaste the contents of the clipboard
C-_Undo
C-gAbort a half-entered command
You can also copy and paste using just the mouse. Using the left button, select a region of text to copy. Click the middle button to paste.
There are two ways you can use Emacs to develop Python code. The most straightforward way is to use it just as a text editor: create and edit Python files in Emacs; then run Python to test the code somewhere else, like in a terminal window. Alternatively, you can run Python inside Emacs: see the options under "Python" in the menubar, or type
C-c ! to start a Python interpreter in a split screen. (Use
C-x o to switch between the split screens, or just click if C-x doesn't work).
If you want to spend some extra setup time becoming a power user, you can try an IDE like Eclipse (Download the Eclipse Classic package at the bottom). Check out PyDev for Python support in Eclipse.
Python Installation.
Creating a Conda Environment
Run the following command, and press y to install any missing packages.
[cs188-ta@nova ~/python_basics]$ conda create --name cs188 python=3.6
Entering the Environment.
Leaving the Environment!
Using the Lab Machines
At the moment, students do not have the right permissions to download Python 3.6 or Conda on the lab machines. For P0, Python 3.5 (which is already installed) will suffice.:
>>>>> dir(s)
['_']
>>> help(s.find)
Help on built-in function find::
>>> dir(list)
['__add__', '__class__', '__contains__', '__delattr__', '__delitem__',
'__delslice__', '__doc__', '__eq__', '__ge__', '__getattribute__',
'__getitem__', '__getslice__', '__gt__', '__hash__', '__iadd__', '__imul__',
'__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__',
'__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__',
'__rmul__', '__setattr__', '__setitem__', '__setslice__', '__str__',
'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse',
'sort']
>>> help(list.reverse) Help on built-in function reverse: reverse(...) L.reverse() -- reverse *IN PLACE*
>>> lst = ['a','b','c']
>>>):
>>> setOfShapes
set(['circle','square','triangle'])
>>> setOfShapes.add('polygon')
>>> setOfShapes
set(['circle','square','triangle','polygon'])
>>> 'circle' in setOfShapes
True
>>> 'rhombus' in setOfShapes
False
>>> favoriteShapes = ['circle','triangle','hexagon']
>>> setOfFavoriteShapes = set(favoriteShapes)
>>> setOfShapes - setOfFavoriteShapes
set(['square','polygon'])
>>>.
>>> studentIds = {'knuth': 42.0, 'turing': 56.0, 'nash': 92.0 }
>>> studentIds['turing']
56.0
>>> studentIds['nash'] = 'ninety-two'
>>> studentIds
{'knuth': 42.0, 'turing': 56.0, 'nash': 'ninety-two'}
>>> del studentIds['knuth']
>>> studentIds
{'turing': 56.0, 'nash': 'ninety-two'}
>>> studentIds['knuth'] = [42.0,'forty-two']
>>> studentIds
{'knuth': [42.0, 'forty-two'], 'turing': 56.0, 'nash': 'ninety-two'}
>>> studentIds.keys()
['knuth', 'turing', 'nash']
>>> studentIds.values()
[[42.0, 'forty-two'], 56.0, 'ninety-two']
>>> studentIds.items()
[('knuth',[42.0, 'forty-two']), ('turing',56.0), ('nash','ninety-two')]
>>> len(studentIds)
3
As with nested lists, you can also create dictionaries of dictionaries.
Exercise:, which should contain the following code:
# This is what a comment looks like fruits = ['apples', 'oranges', 'pears', 'bananas'] for fruit in fruits: print(fruit + ' for sale') fruitPrices = {'apples': 2.00, 'oranges': 1.50, 'pears': 1.75} for fruit, price in fruitPrices.items(): if price < 2.00: print('%s cost %f a pound' % (fruit, price)) else: print(fruit + ' are too expensive!'):
nums = [1,2,3,4,5,6] plusOneNums = [x+1 for x in nums] oddNums = [x for x in nums if x % 2 == 1] print(oddNums) oddNumsPlusOne = [x+1 for x in nums if x % 2 ==1] print(oddNumsPlusOne)Prices = {'apples':2.00, 'oranges': 1.50, 'pears': 1.75} def buyFruit(fruit, numPounds): if fruit not in fruitPrices: print("Sorry we don't have %s" % (fruit)) else: cost = fruitPrices[fruit] * numPounds print("That'll be %f please" % (cost)) # Main Function if __name__ == '__main__': buyFruit('apples',2.4) buyFruit('coconuts',2)
FruitShop:
class FruitShop: def __init__(self, name, fruitPrices): """ name: Name of the fruit shop fruitPrices: Dictionary with keys as fruit strings and prices for values e.g. {'apples':2.00, 'oranges': 1.50, 'pears': 1.75} """ self.fruitPrices = fruitPrices self.name = name print('Welcome to has. """ totalCost = 0.0 for fruit, numPounds in orderList: costPerPound = self.getCostPerPound(fruit) if costPerPound != None: totalCost += numPounds * costPerPound return totalCost def getName(self): return self.name
The
FruitShop class has some data, the name of the shop and the prices per pound of some fruit, and it provides functions, or methods, on this data. What advantage is there to wrapping this data in a class?
-:
import shop shopName = 'the Berkeley Bowl' fruitPrices = {'apples': 1.00, 'oranges': 1.50, 'pears': 1.75} berkeleyShop = shop.FruitShop(shopName, fruitPrices) applePrice = berkeleyShop.getCostPerPound('apples') print(applePrice) print('Apples cost $%.2f at %s.' % (applePrice, shopName)) otherName = 'the Stanford Mall' otherFruitPrices = {'kiwis':6.00, 'apples': 4.50, 'peaches': 8.75} otherFruitShop = shop.FruitShop(otherName, otherFruitPrices) otherPrice = otherFruitShop.getCostPerPound('apples') print(otherPrice) print('Apples cost $%.2f at %s.' % (otherPrice, otherName)) print("My, that's | https://inst.eecs.berkeley.edu/~cs188/sp19/project0.html | CC-MAIN-2019-18 | refinedweb | 958 | 61.73 |
Issue with Xerces URLInputSource
Discussion in 'XML' started by Mani, Dec 2,
Xerces Classpath IssuePraveen Chhangani, Oct 17, 2003, in forum: Java
- Replies:
- 1
- Views:
- 523
- David Zimmerman
- Oct 18, 2003
Upgrade of Xalan 1.2.2 and Xerces 1.4.4 to Xalan 2.6 and Xerces 2.6.2cvissy, Nov 16, 2004, in forum: XML
- Replies:
- 0
- Views:
- 667
- cvissy
- Nov 16, 2004
Fixed attribute and multiple namespaces issue (Xerces-C 2.7.0)Nicolas, Feb 22, 2006, in forum: XML
- Replies:
- 3
- Views:
- 845
- Joseph Kesselman
- Feb 22, 2006
Xerces Compilation Issuemearvk, Oct 3, 2007, in forum: C++
- Replies:
- 5
- Views:
- 452
- tragomaskhalos
- Oct 5, 2007 | http://www.thecodingforums.com/threads/issue-with-xerces-urlinputsource.168348/ | CC-MAIN-2015-14 | refinedweb | 109 | 80.31 |
Naive parser for the Drudge Report
Project Description
Release History Download Files
A pretty simple parser for Drudge Report. I find the site impossible to look at and wanted a way to more easily digest the information, as I like to keep tabs on lots of differing news outlets.
This library has no external dependencies and supports Python 2.7+ (targeted for Python 3+)
Installation
PyPI
pip install drudge_parser
Usage
Example:
import drudge_parser # You can use and feed the parser directly if you would like: parser = drudge_parser.DrudgeParser() parser.feed('<html string>') print(parser.articles) # Or just use the helper to scrape the current site: articles = drudge_parser.scrape_page() print(articles)
Articles is a list of article groupings. These are ordered down the page, so they will always be TOP_STORY, MAIN_HEADLINE, followed by COLUMN{1,3}.
An article grouping looks like:
{ "images": [str], # This often is just empty, never None "articles": [ # These will be ordered by appearance, in some cases drudge # builds related titles on each other to make one link across # multiple lines. { "title": str, "href": str } ], # Never None "location": str # One of the drudge_parser.Location 'enumeration' }
Additional Contributors
- [jamesjackson69]()
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/drudge_parser/ | CC-MAIN-2017-39 | refinedweb | 211 | 54.63 |
Stackery Supports Python
Originally published at.
I’m excited to announce support for Python in Stackery! Python is our third supported language, along with Node.js and .NET.
Our Python support enables easy integration with all the other Stackery nodes, like Rest Apis, Docker Services, and Object Stores. Here’s a simple example Python function that takes in a request to the path /users/{name} and responds back with “Hello, <name>!”:
def handler(message): return { 'statusCode': 200, 'body': 'Hello, ' + message['resourceParams']['name'] + '!' 'headers': { 'Content-Type': 'text/plain' } }
Like our other supported languages, Stackery also makes it easy to develop Python functions with package dependencies. At deployment preparation time, Stackery looks for a requirements.txt file in your function’s source code. Stackery uses pip to install dependencies listed in the file.
Stackery supports Python version 3.6. You can find the full integration documentation in the Python section of our Function documentation. | https://medium.com/stacks-on-stacks/stackery-supports-python-50db2f9e9a56 | CC-MAIN-2018-47 | refinedweb | 152 | 51.14 |
Image on Frame in Java AWT
Image on Frame in Java AWT
Introduction
In this section, you will learn how to display image on the frame. This
program shows you how to display image in your application... listbox representing values male and female.
Write a code which will accomplish
Inserting Image(s) - JSP-Servlet
Inserting Image(s) Hello, I need sample code using java servlet and html form and explanation on how to insert and retrieve image from mysql. ...;This is retrive image code from database.import java.sql.*;import java.io.IOException
Inserting Image in Database Table
Inserting Image in Database Table
In this section, you will learn to insert an image...). For inserting an image in table, we
have used the SQL statement ?INSERT
Setting the Icon for the frame in Java
Setting the Icon for the frame in Java
... to the frame. Toolkit
class has been used to get the image and then the image... the permission to use and then retrieves the
image in pixels format.
Here is the code
Setting an Icon for a Frame in Java
an icon for
the frame in Java Swing.
This program helps us to set the icon (image... Setting an Icon for a Frame in Java
... for the frame or
window after getting the image using the Image class method named
Iconifying and Maximizing a frame in Java
Iconifying and Maximizing a frame in Java
... and maximizing a frame in
java. Iconifying means to show a frame in minimized... will be in the minimized form.
Following is the image of the
frame which has
Creating a Frame
of example code:
What is java swing?
...
Java Swing
In this section we are giving many tutorial example
of Java..., calender, combobox checkbox and many more
for creating GUI in Java based
Removing the Title Bar of a Frame
. Following is the image of the frame without title bar:
Code Description... bar of a frame
or window in java. That means show the frame or window without... and if you passes the false then the frame
will show the title bar.
Here is the code
inserting image into database
inserting image into database how to insert image into database using struts frame work and spring JDBC
Day for the given Date in Java
Day for the given Date in Java How can i get the day for the user input data ?
Hello Friend,
You can use the following code:
import...");
String day=f.format(date);
System.out.println(day
Image on frame
Image on frame Hi,
This is my code. In this I am unable to load... java.awt.event.*;
public class AwtImg extends Frame
{
Image img;
public...();
}
AwtImg()
{
super("Image Frame");
MediaTracker mt=new
How to create CheckBox On frame
will learn how to create CheckBox on the frame. In the Java AWT, top-level
windows... for the procedure of
inserting checkboxes on the Java AWT Frame. You can understand very easily...
How to create CheckBox On frame
Exception while inserting image in oracle using java
Exception while inserting image in oracle using java import java.sql.*;
import java.io.*;
class Oracle2
{
public static void main(String args...());
System.out.println("Image length: "+f.length());
System.out.println("No.of rows
Create a Frame in Java
Create a Frame in Java
... in java AWT package. The frame in java works like the main window where your... windows are
represented by the Frame class. Java supports the look and feel
Learn Java in a day
Learn Java in a day
..., "Learn java in a day" tutorial will
definitely create your... are the list of topics that you can learn easily in a day:
Download and install
Removing the title bar of the Frame in Java
Removing the title bar of the Frame in Java
Introducion
Here, you will learn how to display the frame or window without title bar in
java. This type..."));
document.open();
Image image = Image.getInstance("C:/image2.png");
Image
Get first day of week
Get first day of week
In this section, we will learn how to get the first day
of ..._package>java FirstDayOfWeek
Day of week: 7
Sunday
Frame query
Frame query Hi,
I am working on Images in java. I have two JFrame displaying same image. We shall call it outerFrame and innerFrame.In innerFrame i am rotating the image.After all the rotations i need to display this image
Inserting Image in a database Table
Inserting Image in MySql Database
Table... understand the concept
of inserting a image in the database table, so go through... the
method getWriter() of the class PrintWriter. To insert a image
from our java
Find Day of Month
Find Day of Month
This example explores how to find
the day of a month and the day of a week This example sets the year as 2007
and the day as 181. The example
urgent help for inserting database in a project
urgent help for inserting database in a project I need some urgent help
i have made java application for conducting a quiz which displays 25 mcq's... at the end of all the participants
here is my code:
import java.awt.
Java get Next Day
Java get Next Day
In this section, you will study how to get the next day in java...()
provide the string of days of week. To get the current day, we have used
Java Frame
Java Frame What is the difference between a Window and a Frame
How to Create Button on Frame
; frame the topic of Java AWT
package. In the section, from the generated output... a
command button on the Java Awt Frame. There is a program for the best... the setLayout() method of the Frame
class.
Here is the code of
JDBC Training, Learn JDBC yourself
:
Learn Java in a Day and
Master....
Insert Image into Mysql Database through
Simple Java Code
This is detailed simple java code that how save image
into mysql database
Move Image in Java Swing
How to Move Image in Java Swing
In this section, you will learn how to move an image using mouse. For this purpose, we have specified an image and using... class then rendered this image on frame through the method drawImage(). Now
Inserting Image into table
Inserting Image into table
In this section , we will insert a image into a table. For inserting image,
table's field (in which image...))
For inserting whole image, we have to create an 'InputStream'
Java Image On JFrame Title
How to set Image On JFrame
In this section, you will learn how to set an image on JFrame title using Java program. For
this, we have created an object...()
that will load the specified image and the method setIconImage() of JFrame class
Java Swing drag image
Java Swing drag image
Java Swing provides several classes that will allows us..., the image will get displayed on panel2.
Here is the code:
import java.awt.... ,label, text field etc.) from one frame to another frame.
inserting an path of an image in database - JDBC
inserting an path of an image in database hello
kindly help related... an image using web cam....
and when the image is saved in a project at the same... to save it in folder..but can you plz tell me how an the full path of image can
TextArea Frame in Java
TextArea Frame in Java
Introduction
In this section, you will learn how to create TextArea on the frame. This
program uses the TextArea class of java.awt package. Here
Find the Day of the Week
Find the Day of the Week
This example finds the specified date of an year and
a day... time zone, locale
and current time.
The fields used:
DAY_OF_WEEK
image effects - Java Beginners
image effects hey can u help me in loadin an image file... with comments whereever possible Hi Friend,
We are providing you a code that will show you image crop effect:
import java.sql.*;
import java.awt.
Inserting data in Excel File - Java Beginners
Inserting data in Excel File Dear Sir,
How can we fill the excel with fetched data from the database like Oracle, DB2? Is it possible to create........
Thanks & Regards,
Karthikeyan. K Hi friend,
Code to solve
learn
learn how to input value in java
Creating a Frame
;
This program shows you how to create a frame in Java Swing
Application. The frame
in java works like the main window where your components... and decoration for the frame.
For creating java standalone application you
must
Remove Minimize and Maximize Button of Frame in Java
Remove Minimize and Maximize Button of Frame in Java
In this section we are going to learn... of a frame. We know that the title bar contains icon, minimize, maximize and close
call frame again - Java Beginners
call frame again d,
thank's for your answer, but i can't combine to my script. I will give you a complete code and please check this. the program can run ,first i have one frameA in this frame have one jTextfield1,one
ZodiacSign with an image - Java Beginners
the following code:
import javax.swing.*;
import java.awt.image.*;
public...="";
int month, day;
String input1=JOptionPane.showInputDialog(null,"Enter day(1-31): ");
day=Integer.parseInt(input1);
String input2
learn
learn i need info about where i type the java's applet and awt programs,and how to compile and run them.please give me answer
Display Image in Java
the image on the frame.
Here is the code of the program...
Display
Image in Java
... it on a frame
using ImageIO class. User enters the name of the image
Inserting a value to an Enum field in Table
Inserting a value to an Enum field in Table I'm writing a code that creates a user account and sends the result to the user table in a mysql...,
password varchar (10),
is_Admin enum('Y','N'),
In the Java code I have a user
Where can I learn Java Programming
Learn Java in a Day
Master Java
in a Week
More links for Java... and
time to learn Java in a right way. This article is discussing the most asked
question which is "Where can I learn Java Programming?". We
have
Implementation of Day Class
to be returned is Monday.
Here is the code:
public class Day {
final static int...Implementation of Day Class
Here we are going to design and implement the class Day. The class Day should store the days of the week. Then test the following
Hiding Frame in Java
Hiding Frame in Java
Introduction
This section illustrates you how to hide the Java Awt
frame... code of the program.
Description of program:
In this program, program you
Move text on the frame
Move text on the frame using Java Program
In this section, you will learn how to move text on the frame. As you have already learned about the html marquee tag. Here we are going to do the same thing in Swing. We have used Timer image slider or code 4 java-image slideshow
java image slider or code 4 java-image slideshow plz help me out with java code for running an application in which images wil slide automatically... image slider using java
Java Image Watermarking
Java Image Watermarking
A watermarking is a technique that allows..., or a combination of both. In this section, you will learn how to watermark an image using java swing.
Here is the code:
import java.io.*;
import java.awt.
Java Code - Java Beginners
Java Code Write Java Program to create a JFrame having JPanel on it that display an on JPanel Image. Hi Friend,
Try the following code... {
JFrame frame = new JFrame("Display image");
Panel panel =
Image Size
;
This Java awt (Abstract Windowing Toolkit)
tutorial describes about the image size.... For setting an image on the frame, you will need an image that have to
be added... of image. You will try and get it.
Description of code:
Toolkit of the frame.
The setResizable()
method has been used to make the frame resizable
Inserting a Column in JTable
Inserting a Column in JTable
In this Java programming tutorial, you will learn how... section for inserting rows in JTable through using the insertRow()
method
Java Code - Java Beginners
Java Code A Java Program to load Image using Swings JFileChooser... the following code:
import java.awt.*;
import java.io.*;
import javax.swing.... javax.imageio.ImageIO;
public class UploadImage extends JPanel {
static BufferedImage image
Java Code - Java Beginners
Java Code Write a Java Program using JFrame that display Image on JPanel Hi Friend,
Try the following code:
import java.awt.... javax.swing.*;
public class BackgroundImage
{
private BufferedImage image
displaying image in awt - Java Beginners
displaying image in awt Hi All,
I have downloaded the code to display image using awt from here and when I execute the code I am getting... ImagePanel("D:/Sunset.jpeg");
JFrame frame = new JFrame("Image Frame
Java Code - Java Beginners
Java Code Write a Java Progam to create a frame using JFrame having JPanel on it and display an Image on it and cut Some Portion of that image and save that image by clicking on Save(JMenuItem) on JMenuBar Hi Friend
Inserting Text Trapezoid Using Java
Inserting Text Trapezoid Using Java
... on PowerPoint slide,
then we are inserting text using
java.
In this example, we...;The code of the program is given below:
import
Getting Previous, Current and Next Day Date
Getting Previous, Current and Next Day Date
In this section, you will learn how to get previous,
current and next date in java. The java util package provides
code for image to key generation - JDBC
code for image to key generation plz help me
how cud i convert image into key using sha1 algorithm in java....
plz give me the code to write it...
i m doing image based registration
Compute the image processing - Java Beginners
code here to find the averaging of the image (grey image) also, How do i compute...Compute the image processing Hi,
Question 1:
I have some... the subtraction of the image using hte g(x,y) = |f1(x,y) - f2(x,y) How do i change
Where to learn java programming language
fast and easily.
New to programming
Learn Java In A Day
Master Java Tutorials...Where to learn java programming language I am beginner in Java and want to learn Java and become master of the Java programming language? Where
image - Java Beginners
image how to identify the watermarked image? or how to convert the watermarked image into original image? can you send that corresponding java code
setbackground image to JFrame - Java Beginners
setbackground image to JFrame how to setbackground image to JFrame. Hi Friend,
Try the following code:
import java.awt.*;
import... TransparentBackgroundImage
{
public static void main(String[] args) {
JFrame frame = new
to learn java
to learn java I am b.com graduate. Can l able to learn java platform without knowing any basics software language.
Learn Java from the following link:
Java Tutorials
Here you will get several java tutorials
Inserting Image In Excel Sheet Using JSP
Inserting Image In Excel Sheet Using JSP... and display
image on that. We can request that the browser open the results... we insert the image and the output will display in excel format
with image.You
How to design a day and night process, design a day and night process, day and night process
How to design a day and night process
You will be able to make a day process by this
example, It will teach you to convert a day to night by
animation.
how display jsp frame - Java Beginners
how display jsp frame Hi all,
I am creating two jsp in frame... in another frame,you have to use target attribute of tag in your footer.jsp.
1)In the code, you have provided,we have created another jsp 'new.jsp' in order
Learn java
Learn java Hi,
I am absolute beginner in Java programming Language. Can anyone tell me how I can learn:
a) Basics of Java
b) Advance Java
c) Java frameworks
and anything which is important.
Thanks
execution of image example program - Java Beginners
execution of image example program sir. The example for the demo of image display in java,AwtImage.java,after the execution I can see only the frame used, but not the image to be displayed over it, even after selecting
Learn Java - Learn Java Quickly
Learn Java - Learn Java Quickly
.... This is a software process that converts the compiled Java byte code to
machine code. Byte code is an intermediary language between Java source and the
host system code - Java Beginners
java code how to insert more than images into a mysql database through a frame? Hi Friend,
We are providing you a code that will insert multiple image in the database from frame.
import java.sql.*;
import
read an image in java
read an image in java qns: how we can read an image tell me about its code
How To Create Internal Frames In Java
How To Create Internal Frames In Java
In this tutorial we will learn about how to create a frame within a frame.
Some times you will need to display a frame... lying within the internal frames.
To create internal frames in Java you may
error while inserting millions of records - EJB
error while inserting millions of records Hello, I am using ejb cmp and inserting 1 millions of records but it won't work because trancation time... problem
my code is
public void insertData(){
Context context
adding background image - Java Beginners
adding background image how do i add background image to this code...();
JFrame frame = new JFrame();
public sampleProg (String str){
super(str... static void main (String[]args){
sampleProg frame = new
inserting text into text file using java application
inserting text into text file using java application Hi,
I want to insert a text or string into a text file using java application
PDF to Image
PDF to Image Java code to convert PDF to Image
add button to the frame - Swing AWT
table with database data
JFrame frame = new JFrame("View Patients...);
}
Hi chitra,
Plz implement this code... for more information.
How to learn Java easily?
If you are wondering how to learn Java easily, well its simple, learn...
Java learning.
The students opting to learn Java are of two types, either... a simple language and
easy way to understand and learn the language. Java on its
Advertisements
If you enjoyed this post then why not add us on Google+? Add us to your Circles | http://www.roseindia.net/tutorialhelp/comment/100409 | CC-MAIN-2015-18 | refinedweb | 3,107 | 63.09 |
Re: Surrogate factoring works very well
- From: "Joseph Ashwood" <ashwood@xxxxxxx>
- Date: Wed, 21 Mar 2007 04:29:37 GMT
<jstevh@xxxxxxxxx> wrote in message
news:1174437391.159293.307780@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
After running some simple tests, it appears to fail on a wide range of
numbers. For my testing purposes I made a few inconsequential changes. In
Factor.java I changed the return type of main to int, and the println
"Couldn't find factors" to return 0, before the catch I put a return 1, and
after the catch return 0, this doesn't affect the factoring at all. I then
created a wrapper class:
import java.io.FileOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.security.SecureRandom;
public class BigMain {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
//build composite
BigInteger prime1 = null;
BigInteger prime2 = null;
BigInteger composite = null;
SecureRandom rand = new SecureRandom();
int realBits = 0;
FileOutputStream fout = new
FileOutputStream("output"+System.currentTimeMillis()+".csv");
for(int bits = 6; bits < 256; bits++)
{
prime1 = BigInteger.probablePrime(bits, rand);
prime2 = BigInteger.probablePrime(bits, rand);
composite = prime1.multiply(prime2);
realBits = composite.bitCount();
String [] whatever = new String[1];
whatever[0] = composite.toString();
int ret = 0;
long time1 = System.currentTimeMillis();
ret = Factor.main(whatever);
long time2 = System.currentTimeMillis();
String bigout = "";
if(ret == 1)
bigout =
realBits+","+composite+","+prime1+","+prime2+","+(time2-time1)+",TRUE\n";
else
bigout =
realBits+","+composite+","+prime1+","+prime2+","+(time2-time1)+",FALSE\n";
fout.write(bigout.getBytes());
}
}
}
It's small enough to just put the entire text here. It of course generates a
CSV file that can be easily viewed in most spreadsheets. Starting at 10 bits
of actual input length it generated the first failure for 53762053 which
should factor to 6599 and 8147. After that it solved one at 14 bits, and one
at 15 bits, after that I stopped it at bits=60 (from the loop in BigMain)
where it had a 67 bit long attempt that it failed. So it appears that the
code does not work properly for large values.
Joe
.
- Follow-Ups:
- Re: Surrogate factoring works very well
- From: Douglas A. Gwyn
- References:
- Surrogate factoring works very well
- From: jstevh
- Re: Surrogate factoring works very well
- From: Mark Murray
- Re: Surrogate factoring works very well
- From: rossum
- Re: Surrogate factoring works very well
- From: Joseph Ashwood
- Re: Surrogate factoring works very well
- From: jstevh
- Prev by Date: Re: What surrogate factoring theory now says
- Next by Date: Re: Removing extra padding.
- Previous by thread: Re: Surrogate factoring works very well
- Next by thread: Re: Surrogate factoring works very well
- Index(es): | http://www.derkeiler.com/Newsgroups/sci.crypt/2007-03/msg00627.html | crawl-002 | refinedweb | 428 | 57.16 |
Feds Rule PayPal Is Not A Bank 228
dthable writes "CNet has posted an article update describing the Feds latest ruling - PayPal is not considered a bank. The article describes the effects of not being a bank which includes the lack of government regulations."
Perhaps what they meant was... (Score:5, Funny)
Re:Perhaps what they meant was... (Score:3, Interesting)
I've used the service for probably close to a couple years. I've used to to send and receive money for ebay auctions, I've used to it transfer money between myself and friends, and now I've even got their MasterCard version of the visacheckcard (it works like an ATM or a mastercard, but draws from my paypal balance and doesn't actually have a creditline (and is not a creditcard)). I transfer a bit of money from each paycheck I get into paypal, and use my paypal card for a lot of day-to-day expenses like fuel and so on. I really like paypal.
They've never fucked me, and they've never fucked anyone I know, or anyone who knows someone I know. They have, allegedly, fucked some people I don't know, however. But I'm skeptical of the claims of frozen accounts; I'm sure it's happened on occasion, but I don't think the messageboard posts I read told the whole story. All the same, it's made me paranoid enough to not keep any large ammounts in my account, but to me the convenience of their unique service makes the slight risk of a small ammount of funds worth it. And until I see some solid proof of wrongdoing, I'm going to go on believing they're an OK company.
So bravo for the (possibly) beneficial "not a bank" ruling from the FDIC. I hope the states follow suit.
Be careful... (Score:3, Interesting)
Try this, have someone send you money using PayPal and a freshly stolen but not yet reported-stolen credit card. After you've received the money have the card reported stolen. what what occurs to YOUR account even though you weren't involved in the theft. By all accounts YOUR funds and those of the person who sent you money will BOTH be frozen. Ouch.
For fun try this - goto PayPal and try to find a phone number that will lead you to a real live living human being that can help. It used to be, and migh still be, somewhat hard to find a phone number on the site. I tried something over a year ago whe nstories first seemed to be filtering out about problems with the service and had a hard time fincing a number. That did NOT bode well IMO.
I DO use the service, somewhat often (sent the roller coaster guy money today:-) BUT I do NOT keep money in there. These guys are apparently being ruled "not a bank" so protections I'd expect from such a thing don't exist never mind the crap they supposedly pull. They're just too shaky for me to trust using them as you do - I've got credit cards and debit cards for insured accounts already thanks. YMMV - just please be careful and wary. Claims of thousands of dollars being frozen are WAY too common IMO...
No FDIC insurance? (Score:2, Insightful)
Re:No FDIC insurance? (Score:2, Informative)
Re:No FDIC insurance? (Score:2, Informative)
Re:No FDIC insurance? (Score:2)
You're incorrect. When you have a PayPal balance on the account when someone paid you, it is essentially a deposit in their system, as it's not in any of your other accounts. In fact, PayPal even wants you to earn an interest on this deposit. So it is not a money transfer in all cases.
Re:No FDIC insurance? (Score:3, Insightful)
Re:No FDIC insurance? (Score:2)
1) Have accounts
2) Deposit money
3) Earn interest
4) Pay bills online
5) Have a credit card through it
PayPal does all these things, so why are they not a bank? I've read some other posts, and no one seems to definitively point out what "real" banks have that PayPal does not, and which should disqualify them from this status. You can use words like "escrow" instead of deposit, but I believe that is just semantics.
Re:No FDIC insurance? (Score:3, Informative)
This is true, but at the bottom of the article, it states that PayPal inquired about FDIC protection. They have recently begun depositing the money they receive for transactions into accounts in an FDIC-insured bank. The FDIC responded to their inquiry with an advisory letter indicating that the amounts deposited would indeed be insured up to the standard $100,000 per customer per bank. This would mean that as long as PayPal opens a separate account for each customer, they should be insured. Note that it would probably NOT insure money "lost-in-transit."
Re:No FDIC insurance? (Score:5, Informative)
From the article:.
Re:No FDIC insurance? (Score:2, Interesting)
That doesn't sound quite right.
Thoughts?
Re:No FDIC insurance? (Score:2, Insightful)
Re:No FDIC insurance? (Score:2)
Chris Beckenbach
Re:No FDIC insurance? (Score:2, Interesting)
I believe what he meant was that by the not insured by FDIC was that if PayPal was continuing to hold the funds, it does not seem that it would be insured, as they are not classified as a bank. Now that PayPal is depositing the funds into FDIC insured accounts, those user balances are insured.
Re:No FDIC insurance? (Score:4, Insightful)
Think that's an impossible scenario? I remember a payroll-processing company where that is almost exactly what happened, almost 30 years ago. The company president disappeared, $5 million was missing, eventually they found his airplane at a remote airstrip in Venezuala, but they never found him.
Re:No FDIC insurance? (Score:2, Informative)
Re:No FDIC insurance? (Score:2)
PayPal should be considered . . . (Score:4, Interesting)
Also, note that this doesn't get it out from under the couple of states that (correctly) think PayPal should be regulated like a bank.
I don't know what kind of crack this court was on, but it must have been some good stuff.
Re:PayPal should be considered . . . (Score:4, Informative)
Re:PayPal should be considered . . . (Score:3, Insightful)
Re:PayPal should be considered . . . (Score:2, Flamebait)
This is a false statement by someone who did NOT read the article. PayPal IS insured by FDIC. In fact, PayPal even asked the FDIC their opinion on the matter.
From the article:
Re:PayPal should be considered . . . (Score:2, Informative)
This is a false statement by comeone who did NOT comprehend the article. PayPal IS NOT insured by the FDIC. PayPal claims and the FDIC has not refuted the idea that PayPal's INDIVIDUAL CUSTOMERS are insured when AND ONLY WHEN PayPal deposits their funds into an FDIC insured account, i.e. ONE IN A REAL BANK!
Are you just one of those bitter cretins that are jealous that someone smarter than you made an observation? bigger PayPal accounts. individual bigger PayPal accounts.
Re:PayPal should be considered . . . (Score:3, Informative)
Actually, it doesn't. I have a few bucks in my paypal account that are not earning interest - mainly because I don't want to become verified and give PP access to my bank account. You can have paypal put your money in a money market account (which may earn or lose $). From the prospectus [paypal.com]: note - you have to login to see this page
Although the Fund seeks to preserve the value of your investment at $1 per share, it is possible to lose money by investing in the Fund.
Re:PayPal should be considered . . . (Score:3, Insightful)
Re:PayPal should be considered . . . (Score:2)
Uhm, that's not what the poster meant. PayPal uses the money *YOU* have on deposit with them, invests it, and earns interest on that investment.
Therefore, they use YOUR money to invest, keep the interest, and give you none.
Hence, they earn money on cash on deposit.
Re:PayPal should be considered . . . (Score:5, Insightful)
No longer true... (Score:5, Insightful)
So, Paypal has the same opportunity to make profits with your money the way banks do, by investing it. This and their poor customer service says to me they're a bank.
(Amazing that in this age when all banking systems are interconnected that your transfers and deposits can still take up to a week... that's something the banks didn't want written out of the system during the last revision of banking laws.)
Re:No longer true... (Score:2)
So, Paypal has the same opportunity to make profits with your money the way banks do, by investing it.
Sounds like an insurance company too, doesn't it? They keep a "float" of other people's money until they need to pay something out (ie, a customer withdraws their money). The rest of the time they have the money to play with.
I think I agree with the FDIC, PayPal is NOT a bank. But they DO need to be regulated. They need to be regulated as a "payment service". If the regulations haven't been written yet, somebody needs to do it.
Re:PayPal should be considered . . . (Score:2)
Re:PayPal should be considered . . . (Score:2)
Which PayPal really doesn't do...
They are what is known as a clearing house. Basically they do in proxy for other institutions. This is what I said last time this came up. Seems, while the Fed's didn't state it as such per se, they seem to feel the same way.
Now then, are they a "wire" service...sounds like...and as such, some states are going to make them become licensed money transfer services...which is more or less what they are doing.
Re:PayPal should be considered . . . (Score:5, Funny)
What, if it weighs the same as a duck, then it's a bank... and we can burn it?!
have you tried calling them? (Score:3, Insightful)
There is no duck test (Score:2)
You're taking it as a given that the functions of a bank are obvious, and that any institution that replicates these functions is also a bank. But lots of non-banks do bank-like things. Mortgage brokers, insurance companies, pawn brokers, assurance bond companies, wire service companies, re-insurance pools... The differences are obscure, but they are recognized by law.
If you compare PayPal with all the different pre-Internet financial institutions, the closest analogy would seem to be wire services, like Western Union [westernunion.com]. These don't actually do anything that banks don't do (though they do handle small transfers more cheaply and conveniently than banks). But they are not considered banks.
Here's one important difference between Western Union and PayPal. To do business with Western Union, all you need is a pile of cash and someone to send it to. But there aren't any PayPal offices where you can send or receive payments. In order to do business with PayPal, both sender and recipient must have an existing bank account! I suspect that requirement separates PayPal even further from banks in the eyes of the FDIC.
I don't like their attitude... (Score:5, Insightful)
These guys really need to back down and start telling people how they will fix the numerous [slashdot.org] complaints [slashdot.org] about their service [paypalsucks.com] instead of acting so arrogant, IMHO.
Re:I don't like their attitude... (Score:2)
Paypal of course (Score:2, Interesting)
WTF? (Score:2, Insightful)
That being said, I think Paypal has some shady stuff going on so I will discontinue the use of their service.
Re:WTF? (Score:3, Interesting)
Re:WTF? (Score:2)
plus, there are specific guilines in what a bank is, and point in fact they don't have to give you most services you would expect to be considered a bank. there are banks that done have any "storefronts" that you would expect, they deal in big dollars, lending money to countries, or bailing out other banks, etc...
Paypal doesn't have the laws on its side (Score:2, Insightful)
Re:Paypal doesn't have the laws on its side (Score:2)
Nonsense. Paypal doesn't exit in the ether, it exists at 6201 15th Avenue, Third Floor, Brooklyn, NY 11219.
Egg [egg.com] are an online or telephone-only set up too, but they are governed by laws. So are Smile [smile.co.uk] and IF [if.com]. PayPal aren't in a unique situation.
Cheers,br Ia
Re:Paypal doesn't have the laws on its side (Score:2)
What an interesting point of view. You say that if laws don't cover that type of business, then they don't have law on their side. Whereas I would say that if laws don't cover that type of business, then they don't have law against them.
Re:Paypal doesn't have the laws on its side (Score:2)
More of This Story at Nando Times (Score:4, Informative)
NandoTimes [nandotimes.com]
Paypal's own fault... (Score:2, Insightful)
It wasn't until PayPalSucks [] and PayPal Warning [paypalwarning.com] became well-known and the horror stories became more abundant that Paypal found itself in the sights.
GEN-DEX Bank (Score:4, Interesting)
Before long, he was sought after [monkey.org] for other reasons.
Daniel has also created some articles of government [gen-dex.com] and a logo [gen-dex.com].
It is interesting to see how fate chose PayPal over GenDex, at least thusfar.
Paypal Warning! (Score:5, Informative)
Your Paypal account can be frozen at any time, without advance notice leaving you without your money for weeks (if not forever), and there isn't much you can do about it.
Paypal Warning [paypalwarning.com]
Re:Paypal Warning! (Score:2)
My little brother was doing a lot of business on Ebay and using Paypal for a lot of it. He sold some stuff, and got paid 600$ for it, directly into his Paypal account, he then took the 600$ out to pay for other stuff. A few weeks later Paypal sends him an e-mail saying that the 600$ he got might have originated from a fraudulent source, as a result they claimed he owed them $600. Luckily he had already taken the money out, and he immediately notified his bank not to let them take any action against his bank account and blew them off. But if he had been a few days slower taking his money out he would have been out $600!
Kintanon
Moving away... (Score:2)
Unfortunately, refusing paypal puts the burden on the buyers who have to wait for their check to clear up or take the time to send a money order. What are the other companies I could use beside paypal for my auctions?
PPA, the girl next door who says "Screw Paypal"
Re:Moving away... (Score:2)
but...that might be a wee bit expencive.
Re:Moving away... (Score:2)
I wonder if PayPal picked these offices themselves (Score:4, Funny)
PayPal, Inc.
11128 John Galt Blvd
Omaha, NE 68137
Subdivision planners reading Ayn Rand, apparently...
-carl
Banks (Score:4, Informative)
Everyone knows about bank notes and coins, they are minted by the government. However, this is only a small fraction of the money in circulation - around 4% in most big economies. Most money is in bank accounts of one sort or another and circulates through cheques, debit cards etc. Cash is a minor part of the money supply and becoming less important by the day. So, where does most money really come from ? The answer is very simple: money is invented by banks when people take out loans.
This is not a secret, it's just not widely known. Most people think that banks lend you other people's money and charge more interest to borrowers than the lenders receive, but this picture is fundamentally wrong. If you borrow £5000 from the bank, nobody is sent a letter saying that their money is temporarily unavailable because they have lent it to someone else. A more accurate picture is that this £5000 didn't exist until the bank lent it to you.
This is hard to believe, so let me show you how it works. It simplifies matters to imagine that there is only 1 bank, or if that strains your imagination, just imagine that A,B and C all bank with Wells Fargo.
Let us start with people A,B,C and a bank and keep track of how much money they have. The bank keeps separate accounts for A,B,C and itself
1. We'll start everybody off with no money, and nothing in their bank account
except for C who has $5000
External funds A: 0, B: 0, C 5000
Bank a:0 b:0 c:0 bank:0
2. C pays his money into his bank account
External A: 0 B: 0 C: 0
Bank a:0 b:0 c:5000 bank:0
3. A asks to borrow from bank so it breaks A's account of 0
into $5000 of money for his current account and a debt of -$5000
External A: 0, B: 0, C: 0
Bank a:(5000,-5000) b:0 c:5000 bank:0
4. The bank transfers the money to A
External: A: 5000, B: 0, C: 0
Bank a:-5000 b:0 c:5000 bank:0
5. A pays this money to B
Exernal A: 0, B: 5000, C: 0
Bank a:-5000 b:0 c:5000 bank:0
6. B pays the money into his account
External A: 0, B: 0, C: 0
Bank a:-5000 b:5000 c:5000 bank:0
7. A obtains money from elsewhere (easier said than done)
External A: 5500, B: 0, C: 0
Bank a:-5000 b:5000 c:5000 bank:0
8. A repays 5000 to bank, plus interest of 500
External A 0, B 0, C 0
Bank a:0 b:5000 c:5000 bank:500
9. The bank pays some interest to C
External A: 0, B: 0, C: 0
Bank a:0 b:5000 c:5300 bank:200
So far, the bank has done nothing strange, and this actually corresponds to the understanding that most people have about the way banks work. One thing to notice is that when A received $5000, nothing happened to C's account. Theoretically C could withdraw his money at any time.
The clever bit is that step 4 never needs to actually happen. A doesn't remove $5000 in cash from his bank - he just writes a check out to B, who never takes out the money either - he just pays it into his account. So in order to "lend money" to A, all that the bank needs to do is change it's accounts from saying:
Bank a:0 b:0 c:5000 bank:0
to saying:
Bank a:5000,-5000 b:0 c:5000 bank:0
Which means: A has $5000 in his current account and also has a debt of $5000 in a separate account.
and as far as A is concerned he has borrowed $5000 from the bank.
But there is nothing to stop the bank from "lending" lots of people money in this way. Why not lend D $5000 too, just change the accounts to say:
Bank a:5000,-5000 b:0 c:5000 d:5000,-5000 bank:0
The money that it lends out does not have to exist before it lends it out - the bank invents the money. In fact, almost all the money in circulation has been invented in this way.
Are banks allowed to do this - isn't there a law against this ? No, not at all, banks are expected to do this - in fact without the banks providing credit, the money supply drys up and the economy goes into recession. There used to be laws specifying a limit - banks could only lend out X times as much money as they received, but these laws have been scrapped in most modern economies. The only constraint is market confidence. If people start to lose confidence in the bank, too many people demand to physically get their hands on their money at the same time, then the whole facade comes tumbling down.
The central misunderstanding is that banks charge interest because they themselves are borrowing money from somewhere, as in fact they are if the money actually leaves their control. Banks compete with one another to lend you money because it is their principle source of revenue. They compete by charging less interest. If they charge too little, lend too much to people who have trouble paying it back then people lose confidence, and move their funds to another bank, the bank goes bust. They lend as much as they dare though, because it's immensly profitable: they are inventing the money they lend you.
So, money is created by banks in the form of debt. Now, lets think about this a moment. What would happen if everybody tried to pay off their debts to the banks, and nobody took out new loans. Well, the money supply would dry up, there would be far less money in circulation. Money's primary function is a to facilitate trade, if nobody has any money then nobody would be able to trade, the economy would grind to a halt.
More fundamentally, it is absolutely impossible that all debt could be paid off. THERE IS MORE DEBT THAN MONEY. It's easy to understand this when you think about where money comes from. Every time a bank lends people money it increases the gap between the amount of money in the world and the amount of debt. The bank lends you $5000, and demands you repay $5500. $5000 is temporarily added to the amount of money in circulation, but it must eventually return to the bank - plus an additional $500 that must go back to the bank too. When the debt is finally paid off, $500 more must have been extracted from the system than went into it. The only way to keep the system going is with increasing debt. Of course, banks spends money too - they have employees and shareholders who buy cars and houses, yachts etc, this pumps money back into the system, which slows down the debt spiral. (A very fat, and almost entirely parasitical segment of the economy that creates nothing real, but that's not my point). Even if the bank spends all the money it receives in interest, there is still a discrepency, because the money must be returned to the bank before it can spend it - at any one time there has to be more debt than money.
The value of our assets (in money terms) is proportional to the amount of money existing. Our debts to the banks are in terms of money. As credit collapses, the amount of money goes down, the "value" that people put on real items goes down (nobody can pay much if they don't have much money). If banks suddenely refused any further loans the banks would end up owning everything. (In fact - I strongly suspect that one or two of the biggest banks would end up owning everything, including all smaller banks). Nobody would have money to pay off their debts and the money they could obtain from selling their assets wouldn't cover it - not enough money would exist. The banks would own all the money AND all the property. This is not just a theoretical problem, it's an exaggeration of what happens during recession. Extending it to the logical conclusion highlights how much power lies with banks in the current system.
When banks lend people money, they increase the amount of money in circulation. This changes the balance between the amount of money in the world and the amount of stuff in the world. This slightly decreases the value of all money - it is the root cause of inflation. Effectively banks steal money off everybody else by lending out more money than they have. It's just a form of legalized forgery. A private individual would have exactly the same effect on the economy if he produced perfectly forged money that he was allowed to add to the system on the condition that he removed and destroyed the same amount at a later date.
An expanding economy needs an ever increasing amount of money. The more stuff in the world, the more money is needed. This money is invented by private banks in the form of debt. Even governments borrow their money from private banks. So we have this paradoxical situation where the most successful countries have the largest amounts of debt. Amazingly the USA has recently been able to start decreasing it's national debt, but this has been achieved by a massively expanded amount of private sector debt. People are more confident, they believe their shares are worth more, they borrow more money and invest more. More is collected in taxes due to increased wages, and for a short time the government debt can decrease, but overall debt always increases.
During boom times - the credit supply increases. The system keeps afloat by ever increasing amounts of debt. In order to service this debt, the economy *must* expand - it is completely impossible for the monetary system to stay afloat with a stable economy, because the only way the debts can be serviced is by creating new debts.
Obviously this debt cycle cannot quite go on forever. At some stage people lose confidence, and it becomes harder to get credit. Then businesses go bankrupt, banks foreclose on the assets, and we go into recession or depression. Then gradually things improve and we start over again - the only difference being that now more of the actual assets in the world (rather than just the money), are then owned by the banks.
So the boom/bust cycle is inevitable when all money is created in the form of debt. The system is inherently unstable. We end up with rather large debts. For instance, the national debt of USA is $5,673,018,308,921 (last time I checked). The estimated population of the United States is 276,004,098 so each citizen's share of this debt is $20,554.11. The money to service this debt is extracted (taxed) with menaces by the government and paid to the banks. If you wanted to be alarmist about it, you could say we are selling our children into slavery (or at the very least indentured servitude) to the owners of the private institutions that invent our money.
Whose idea was this wonderful mechanism for inventing money ? Amazingly enough, it was the bankers. In 1694, Britain's King William was having trouble with money and probably did not understand it too well. At the time governments were scratching their heads over how to pitch the speed of money supply to the economy so as to avoid periods of inflation and at the same time finance their wars, build their palaces and even, from time to time, make life bearable for their people. The bankers convinced King William that the bankers were the "experts" who understood money and that the job of issuing currency should be handed to them.
As the amount of stuff in the world increases, the amount of money needs to increase. An artist paints a picture and wants to sell it - the amount of stuff in the world has just increased. Either: more money has to be created everything; the price of everything needs to reduce slightly; or we have a world where their is plenty of stuff, but nobody can buy it. In fact, this is pretty much the situation we live in: there is plenty of stuff, but everyone is short of money.
Letting the banks invent all money in the form of debt is not the only possible system. For instance, the government could invent money and give everybody a certain amount each year. This scheme was advocated by Douglas in the 30s and was making progress before war broke out. The introduction of more debt free money into the economy would reduce the need for loans and gradually eliminate the boom and bust cycle. Of course if the government invents too much we end up with inflation. But we have inflation already because the banks are inventing money all the time. If people were given money, they would borrow less from the banks so we wouldn't need inflation. A lot of inflationary pressure comes from the need to make interest payments. This scheme is far less inflationary than you might think.
The reason that the current system (where money is invented by banks) has become dominant is that the current monetary system is pretty good at creating a vibrant thriving economy where enterprise is encouraged and financed - it undeniably encourages growth, in fact, it can't live without it. A stable economy is absolutely impossible in the current system, people must be perpetually taking out loans and investing. Without constant investment and new loans the money dissappears and we sink into recession. That's why the idea has spread so wide - it's the most competitive model so far seen.
It's not exactly perfect though. The tendancy to enslave populations into the service of bank owners is one flaw. An insatiable need to expand economies until the whole planet is covered in concrete is another. The necessity for people to work like mules their whole lives, scraping a living amongst plenty when automation should provide us with leisure is another. The maintenance of a huge parasitical segment of the economy that creates virtually nothing of value is another... I could go on, but I think you see my point - the current system is not ideal.
One good thing about the current system is that the wastefulness of private institutions is bounded by the fact that if they become too bloated, corrupt and stupid then they go bankrupt. Governments don't have the same market-place correction. Elections change the spokesmen, but the permanent institution that grows up behind our "elected representitives" is much harder to displace. It can reach far greater levels of stupidity and incompetence than is possible for private organisations. But the market place competition between banks doesn't help us much. When banks fold they get taken over by other banks. Banks have an even greater motivation to merge than other businesses - the larger they are, the less likely that money ever leaves their control, so the larger their possible debt/credit ratio. What this means is that larger banks can invent more money than smaller banks, thus stealing more from the rest of the world. The fact that stupid banks get taken over by clever banks doesn't help. It just makes the resulting mega banks more powerful than ever.
You can't really blame banks - they are just making the most of a preposterous situation. It should be the responsibility of government to create the money we need and distribute it amongst us. Counter-intuitively this would make governments less powerful. The present system gives them the power to do whatever they like, or more accurately the power to not do whatever they like. They control the
rate of the economy by controlling interest rates. They can obtain as much money as they want by increasing the national debt, and they can avoid doing things that people want by just saying they can't afford it.
An intelligent and informative book that explains this stuff and related ideas quite thoroughly is "Grip of Death" by Mike Rowbotham, Jon Carpenter Publishing; ISBN: 1897766408
Re:Banks (Score:5, Informative)
Banks must keep a certain percentage of all "deposits" in the bank so pay for withdrawals. If they didn't, people would lose confidence, panic and pull out all their deposits and it turns into a rush to pull out the money. This is why the FDIC was created - to tell citizens their deposits are guaranteed federally, so there is no need to get your money out before others do.
Now, as for lending, again banks must balance their books. They borrow the money from another bank. Only at the top level (the Federal Reserve), is money "made up" per se - and this is per the directive of the Federal government. If too much money is "made up", it loses value, and inflation happens (supply & demand where money has too much supply). Alan Greenspan is presently responsible for monitoring this process, upon a board of recommendation from the FR. Last year, companies slowed down borrowing money, jobs were lost, etc. So it was combated by droping the Prime interest rate (the interest rate that banks charge each other for borrowing money) to make up more money, because the money was too scarce.
In other words, only the Federal Reserve makes up money. All other banks must balance their books between deposits from customers, loans to customers, and loans from other banks.
Not really... (Score:2)
In the event that the bank didn't have enough reserves on hand, then they borrow from other banks overnight, and this is where the Fed Funds market and everything comes into play.
Anyway, the point is, Banks DO create money. When they lend out the $90, the don't have to borrow $90 from another bank to "balance" it. The balance is between assets and liabilities, the bank has a $100 liability with the deposit, but they also have the assets of the $10 in reserve and the $90 loan. So it does balance out, cept there is now $190 in the the money supply when there was only $100 before the deposit was made.
Re:Banks (Score:2)
The reason the banks books balance is because the loan balances the credit they create. When the bank splits the account into
Bank a:5000,-5000 b:0 c:5000 d:5000,-5000 bank:0
in my explanation above - it still balances. But the fact that someone can spend $5000 which they didn't have before increases the money in circulation.
The banks are supposed to keep a fraction of the money they lend in reserve. In the US the fraction is 8.5% (last I heard).
This reserve is an additional requirement to the need to "balance their books". Even this requirement gets broken from time to time.
Re:Banks (Score:2)
Re:Banks (Score:2)
No, the poster is essentially correct. The banks actually create the money through loans and reserves at the fed. The Fed certainly does enforce a reserve requirement on the banks, and that's one of the tools they have to affect the economy: they can increase reserve requirements on banks and the money supply will contract. But that's rarely used because it's a very drastic measure.
As for the discount rate, that's used more often, but it's not what really manipulates the money supply. It's treated as an indication of what the Fed intends to do with open market operations, the buying and selling of treasury bonds. This is their main policy tool to contract or expand the money supply.
You may have taken several econ classes, but I'm not surprised you never ran into this. This is typically covered in intermediate macro and money & banking courses and if you weren't an econ major you probably didn't take those courses.
Re:Banks (Score:2)
I use "loans to B, who pays C, who deposits" only because I don't know if this would apply if B simply kept the money in their account...
It seems that it would let a bank (and perhaps a few helpers) create a nearly infinite supply of money which is legal tender, despite how it came to exist. The person at the end of this chain hops to another country and the bank defaults on all their loans.
What prevents this from happening?
Re:Banks (Score:2)
they only have the capacity to loan $50, because
that's all they have on hand in tangible assets. The $5 that A loaned the bank is a tangible asset, stored as gold or a federally backed piece of paper ("legal tender"). The $50 that C deposits in the bank is a number in the system, but it isn't a tangible asset.
The bank must have 10% of their total exposure on hand in tangible assets. Futher, the bank's exposure is already the $50 it has loaned to B, so C's deposit of $50 does not mean that the bank may make any new loans until it either collects from B or has futher tangible assets deposited.
Nice theory though.
Re:Banks (Score:2)
I mean, if A and C deposit $100 each, the bank has $200 with which to loan $2000...
So how does the bank distinguish A and C both having money from the following scenario? A deposits $100, B borrows $100, pays C, and C deposits it? Giving the bank $200 in assets, and $100 paid out...
How do they determine that when A gives them $100 that this is "tangible assets" and when C gives them $100, that this is really their own money, despite being an anonymous $100 bill?
Re:Banks (Score:2)
* A has deposited $5 in a tangible form (i.e. cash)
* B has taken out a loan for $50.
Note that this $50 may NOT be taken out as cash, because the bank doesn't have that cash. If B tries to withdraw $50 cash, then the bank must obtain that full $50 from elsewhere. This only works if the bank has a float of cash sufficient to allow them to give B that $50 and still have 10% of their total exposure as tangible assets. This means they'll have to be slightly above 10% to allow for withdrawls.
Now, presuming that B has transferred the $50 within the same bank - to C. That means that the bank isn't receiving any more tangible assets.
On the other hand, if C was to insert another $50 in tangible assets, then the bank would be able to loan an additional $500 - raising their total exposure to $550, for which they have $55 tangible backing.
----
I think the problem you've having visualising this may be that we're making up very unrealistic examples. This doesn't work unless these little transactions are backed by a large pool of money, hence allowing that $50 to be withdrawn from this bank without breaking the 10% barrier. The smaller the bank, the larger the percentage of their exposure they need to keep in tangible assets.
Yes - this does mean that if everyone tried to withdraw their money at once from all the banks in the world, that money wouldn't exist and the system would fail. The statisical probability of this is considered low enought that governments are willing to back these banks against the posibility. Because they are backed by the governments, people trust the banks.
It does make sense, really. Do what the flock does and you'll be safe.
Re:Banks (Score:2, Funny)
Continue the charade.
John Sarek
Re:Banks (Score:2, Informative)
You're 100% right about the money supply growing primary due to bank loans. What you have missed is that, by volume, the great majority of bank loans are secured by real assets.
Most bank loans (by volume) are in the form of mortages and commercial lending. These loans are secured by claims on the underlying assets. When the bank gives you a mortgage to buy a home, the bank is in effect a partial owner of the home. Only once you pay off the mortgage do you have the title free and clear.
Let's suppose you build a home and get a bank loan on it in the form of a mortage. You borrow $200,000 and put $20,000 of your own money into it, and in the end you have a home worth $220,000. The money supply has been increased by $200,000, but the bank also gained an asset, the claim on your new home, worth $200,000. And further, society has gained a new asset worth approximately $200,000.
The point is that to a close approximation, bank loans increase the money supply only when society creates new property to buy and sell with that money. The increase in the money supply is not inflationary, because the total value of all goods increases along with the money.
This is not just hypothetical; check the Statistical Abstract of the United States and you will see that the total value of mortgages is very close to the total money supply.
Almost all the money created by bank loans is backed by real assets. These loans are not inflationary and are based on the increased value of the goods created by society.
Re:Banks (Score:4, Interesting)
The reason why that doesn't work is that the banks have to borrow money to lend person A! Suppose, person C took out his $5k and wrote a check to Home Depot. And, Person A took his $5k loan and wrote a check to Home Depot. When Home Depot comes to collect on those checks, where does bank A get the money to pay the $10k bill? That money has to come from somewhere. Other banks, that's where! Banks borrow money from other banks to cover your loan! In your example, bank A would borrow $5k from bank B @ 5% interest (prime rate). Lend it to person A @ 10% interst. When person A repays the loan, bank A pays back its loan to bank B, and pockets the difference. If person A defaults on that loan, bank A must come up with the money from its own money supply to bank B. If enough people default on bank A, bank A will default. That might cause bank B to be in financial trouble, which might affect bank C, D, etc. This is the exact situation that caused the Asia financial crisis years ago.
Re:Banks (Score:2)
The effect of the loan is to temporarily increase the money in circulation by $5000. This extra $5000 disappears when the money is paid back. The $500 interest that is paid back has to be extracted from the system elsewhere. Where from ? - well, effectively from some other sucker taking out a loan that must eventually be paid back. The $500 may be spent by the bank, or it may add it to it's reserves. The point is - the only way the system can work is if people are continually taking out more loans. Or else the borrower defaults on the loan and the banks end up with more. This means that a stable economy is impossible. The economy *has* to grow or else some people are going to have to default.
Hurts paypal (Score:3, Insightful)
I think this hurts paypal. the Feds basicly said "Paypal is not a bank, because they do not have a bank charter." States can now say to paypal "You are not a bank, quit acting like a bank."
In other words, they are either a bank or not. If they are a bank, then they can handle money for other people. If they are not a bank, then they cannot.
Now bank regulations vary from state to state. There are banks in the US that I cannot legally get a loan with, because they are not licensed in my state. (It gets complex in ways I don't know when I want a loan from something that isn't in my state)
Wrapper (Score:3, Insightful)
Lord knows.
If you still use pay-pal (Score:2)
suppose you live in a world with out electronics.
now, you want to buy something thats far away.
so you go to this guy who says he'll take the money, and give it to the seller, who then uses some other company to send you the goods.
and most of the time he's true to his word, and most transaction go off with out a hitch.
then more and more people start using him to carry there money.
one day the guy has a million dollars he's carring and decides with that much money, I could retire, so he just goes out of businss one day.
what recourse do you have? none.
Re:If you still use pay-pal (Score:3, Insightful)
Re:If you still use pay-pal (Score:2)
Because of the regulaton, if a CC company said "we quit", they would be investigated, and (in all likely hood)the merchants would get a bail out from the Government.
What happens if you find a 200 dollar charge you did not make on your CC?
what happens if Paypal looses you money?
The CC companies did all sorts of thing when they started to have merchants feal comfortable with the risk.
Re:If you still use pay-pal (Score:2)
If PayPal loses your money, they are still held liable. Let's look at it this way, if I give you my wallet to hold while I'm playing basketball and you lose it, you are still responsible for paying me back. Just because you are not a bank and just because there are no regulations on a friend holding a friends wallet, doesn't mean that you can get off with stealing my money. Now in terms of PayPal, if they were to take your money, it constitutes fraud. You can get your money back through court.
Now, according to what you are saying about the lack of regulations, the thousands of people in the class action lawsuit have no basis to sue because "there are no regulations?" Try telling that to them. A criminal offense is still a criminal offense regardless of whether there is a regulating body over that exact action. Regulations are there to further limit already set regulations regarding an action.
Secondly, up until a year ago there were no regulations on online banks. But places like Citibank, Charles Schwab, and others have had online presence for many years. Are you saying that since there is no regulations on "online banks" these online banking portals were unsafe and unregulated? No! They are still regulated from the brick and mortar standpoint. Regulations should not change because of the shift to a new platform or technology. A good regulation would be wide enough to cover current and future technologies.
> The CC companies did all sorts of thing when they started to have merchants feal comfortable with the risk.
Quite true. But in the beginning, a whole lot of people were hesitant about using Credit Cards, the same way that people have been hestitant about purchasing online. I think places like PayPal has done a good deal to ease people into the PayPal idea. It is just that they are going to lose some public faith in light of the recent incidents. But in the next couple of years, I'm sure you will see more and more people using companies like PayPal
Why doesn't Paypal WANT to be a bank? (Score:2, Interesting)
This seems *amazingly* short sighted. Sure there is some regulation and the requisite overhead and hassle. However, if I were in charge of Paypal I'd be screaming for getting legitimized as a real bank. How many people who do not use Paypal already due to security concerns would if it carried the legitimacy of being labeled an official bank. Also, how many current users would use it with more money on deposit? Since Paypal already has an established customer base of people who are accustomed to dealing with online money, why NOT pull out all the stops and offer real banking services? Paypal checking accounts, Paypal brokerage services, Paypal mortgage, Paypal etc, etc, etc. There is serious money to be made in these endeavors!
One questions, Why the hell does /. use Paypall? (Score:2)
Is it really that hard to take cc sales over the net? I've never programed a cc transaction, but the rest is rather simple, encrypted page, database, etc. One to two days of work, pluss the time it takes to get the sales use of a credit card.
Now
Re:One questions, Why the hell does /. use Paypall (Score:2, Informative)
The programming of the transaction is not difficult. What is difficult is the fact that in order to accept a CC you have to have a Merchant Account. Merchant Accounts are not free, and you still have to use a service for CC validation.
Granted, for large businesses which take in thousands of transactions per year, this is a cost effective method. However, for the smaller businesses and "Mom and Pop" type things (even in the brick and mortar world), such accounts can be cost prohibitive.
PayPal allows anyone to be able to take CC payments for pretty much any reason. Yeah, they charge you 3% or 4%, but there's no monthly fee (Merchant Accounts can run $60 a month or more).
Regardless of the reports of fraud, etc., I still think the PayPal idea, if not the company itself, is a good one. Besides, I've had my brick and mortar bank "accidentally" charge me 6 times for the same transaction (thanks Y2K "upgrade"). Just because there's a "regulatory body" doesn't mean that there won't be any fraud or other bad behavior.
Sorta like the crematorium in Georgia (Score:3, Funny)
-Miko
The other face of this issue... (Score:3, Interesting)
That is one of the main purposes of the FDIC insurance of banks is to provide legitimacy to the accounts they maintain so that I can trust that if I want my money back, I can get it back. I would really prefer to have my bank acting as PayPal than have PayPal acting as my bank.
-Rothfuss
Re:The other face of this issue... (Score:2, Informative) [c2it.com]
Unfortunately (or maybe fortunately), it is not nearly as easy to setup an account. They send you information that you are required to return (with a voided check) to activate the service.
This is even true if you have a Citibank account and not a third party account.
I haven't actually returned my paperwork yet, so I don't know how easy or convenient the service is.
Snowdog
Deposit only bank accounts (Score:3, Interesting)
I don't know a lot about how banks work, however, so I'd be interested to hear the opinions of some bank-smart people.
-Miko
This is just the FDIC talking (Score:5, Informative)
Banks are regulated either by the Comptroller of the Currency (that's what "National Bank" means) or by individual states. Savings and loan institutions are regulated by the Office of Thrift Supervision. [treas.gov] Money transfer firms are regulated by states. Credit card issuers are regulated by Federal law. Broker/dealers are regulated by the Securities and Exchange Commission.
It's not clear what PayPal is, but because they appear to accept deposits, they're subject to regulation. Even if they store the money somewhere else, that doesn't help; that may make them either a broker or a mutual fund.
In the early days of money-market funds that offered check-writing privileges, there was a real question how they would be regulated. But that's been worked out. PayPal will end up being regulated as some kind of financial institution, even though it's not yet clear which kind.
Re:Not a bank means (Score:3, Interesting)
Re:Not a bank means (Score:2)
They want to do everything a bank does, but they don't want to be considered a bank.
Of course thats now, in the beginings they where pretty much a different idea, but once creedit uniouns started loosining up on who could join, they pretty much became a bank.
Re:Not a bank means (Score:2)
CUs have all of the advantages of banks (and more so, given usually higher interest rates for savings and lower rates for loans), but none of the disadvantages (like the high taxes, and like being bought out -- no public shares means no-one can acquire enough to buy the place out).
Egold.com (Score:2, Informative)
Too Few Regulations Even Worse Than Too Many (Score:2, Insightful)
Do what Osama does
Personally, I'm not fond of banking, or of banks, or of excessive regulation (and sometimes corrupt regulation that facilitates, for example, the "legitimate" seizure of an accounts assets for simply remaining idle for a few years), but what you propose is a recipe for another 1929 followed by a decade or more of depression. Not the soft-market, oh-no-I-can't-by-a-new-BMW-and-my-condo-didn't-do
Thaks, but with as annoying as I find regulated banks, I'll take that "disease" any day over your proposed "cure."
(Having said all that, I would like to see regulations eased and brought into line with those that a credit union has to obey
Re:Too Few Regulations Even Worse Than Too Many (Score:3, Informative)
Banks cannot and are not required to seize an account if it is just dormant for a few years. They are first required to contact you. If they successfully contact you (be it by phone, mail, whatever) they cannot do anything with your accounts. If, however, they cannot find you they are required by law to give your money and account information to the state government. The state government is then required by law to again try to find you. Sometimes you may even see classified ads put in the paper by your state government saying they have accounts/property and are looking for owners. The state will hold your money indefinitely and you are able to claim it anytime.
In my mind, this is a good regulation because without it the banks would just keep your money and not bother to try to find you. I'd rather my money go back to the state government which is a.) more accountable and b.) if the money is never claimed they can use the money for the good of the state instead of the bank.
ps. Most states have online databases with this information that you can freely search through. Just go to google and search for "unclaimed property" plus your statename.
Whoops forgot the source(s) (Score:2, Insightful)
First [fff.org]
Second [fff.org]
The Depression was caused by... (Score:2)
In that light, it's probably a good thing that Enron happened. It's the canary that died, and told us all to ventilate the mines and clean up business accounting practices. This type of thing *was* on the way to becoming more widespread.
Re:The Depression was caused by... (Score:2)
Enron is TOTALLY different. Enron committed fraud (alledgely) against their investors. The investors are probably due some money, but nowhere near what they lost, because all investments are a gamble, including even being lied to by the company. Don't put all your eggs in one basket.
Re:Too Few Regulations Even Worse Than Too Many (Score:3, Interesting)
Do you have anything at all to back this up? Or is this a Montana Militia style "The Feds are out to get us, they're installing listening devices in people's heads and marking the backs of road signs for the oncoming military coup" style tosh?
What the hell went up in price 20% last year? Did the dollar lose that much in value, if so who to? My phone bill still seems to be the same, my electricity bill seems to be lower if anything, gas prices have been up and down like a yo-yo, but 2001 certainly wasn't worse than 2000.
My food bill barely changed and my browse through the supermarkets didn't notice anything rocketing by those kinds of prices. My rent went up a whopping 2.5%. The dollar is up against the GBP and the Euro.
So what the hell went up in price, not merely by 20%, but by the gazillion % needed to make up for the fact that nothing else was going up in price, and some things actually dropped?
Re:Who cares? Regulations don't help us anyway. (Score:2)
Re:Who cares? Regulations don't help us anyway. (Score:2)
Re:Who cares? Regulations don't help us anyway. (Score:2)
Banking regualations help consumers.
They put many measures into place that protect consumers from a great many lending practices that would hurt consumers.
ow would you like to have a 0 day default? check got lost in the mail, too bad give me your home. even thought we got your home, you still owe us the money which we're going to garner from your wages, at an additional fee, and oyur now going to pay the "defaulters" interest rate of 50%.
or
we decided to take your money and not give it back, thanks for playing.
If a bank closes up, and is backed by a private insurance company, there is a point where the insurance company will just fold instead of pay. ask people in California about the large and trusted insurance companies that carried their earthquake insurance.
thats the kind of crap that goes on in non-regulated banking countries.
And if you think a non-regualted banking industry would have less reporting to the feds, you are wrong. There are very specific guidlines that the feds play by, unlike non-regulated countries.
I've scene how various banking industry work in many countries, its scary.
The Big Brother reference clearly shows the fact that you did not understand 1984.
Re:Who cares? Regulations don't help us anyway. (Score:5, Insightful)
I say give us more non-bank banks. If I could find an unregulated money-holder for me, I'd use it immediately IF they had good third party insurers, better interest, and less government big brother intrusion into my transactions.
Hey, I don't mean to undercut your frothing-at-the-mouth anti-regulatory libertarian fervor, but Credit Union deposits are insured by the government [ncua.gov].
Don't let facts get in the way of your rant, tho. Moderators, a 5 rating for that post is silly.
Yes--you ARE federally insured (Score:3, Informative)
You're correct--perhaps a bit too precisely correct--when you write that you're not insured by the FDIC. That's because credit unions are not insured by the Federal Deposit Insurance Corporation--credit union deposits are insured by the National Credit Union Administration (NCUA [ncua.gov]). I don't know which three "seperate" [sic] insurance companies you're referring to, but deposits in any federally-insured CU in the U.S. are insured to $100,000. That insurance is backed by the NCUA Insurance Fund, which in turn is backed by the full faith and credit of the United States.
There are some CUs that are not federally-insured. States vary on how they regulate financial institutions--there are very sophisticated, completely sound institutions that only have state charters. There are also "institutions" that are little more than investors clubs with extra paperwork to file at the end of the year. There isn't any annual cost of federal deposit insurance--the deposit insurance funds are based on "lifetime" deposits (as opposed to premium-paid insurance). Yes--there are costs associated with banking regulation: regulations that ensure, among other things, that the bank actually has cash necessary to fund its continuing obligations.
Since you mention that your deposits are insured by three different international investors, it might well be that you are not a depositor in a federally-insured CU. In that case, you're wasting money. Federally-insured CUs do not pay deposit insurance: CUs deposited 1% of their assets in 1970 to form the NCUA Insurance Fund, and with one exception there has never been a need to assess member institutions any fees for insurance since. If your deposits are privately insured, your institution is paying deposit insurance--which costs you money.
Should the U.S. government be building water projects in districts of politically influential congressmen? Nope. Should the government promote commerce by ensuring a sound currency? Absolutely. Deposit insurance is a big part of that--and unquestionably a very good thing.(Disclosure: I'm the president of a small software company. We have developed software for credit unions, both federally-insured and state-chartered. If you have a car loan from your CU there's a good chance it was processed with our software. We like the CU movement a bunch.)
Re:inCorrect link (Score:2)
CNet owns the domain news.com.com and the link in the article works, but yeah, the CNet link does not. Who clicks on the "top site" links anyway, we just want to see the article
Re:I believe the word is "hawala". (Score:2)
Already done [oldcatholic.net].
Excerpt from the site: "it appears PayPal is the largest money laundress for organized crime and pro-terriorist organizations" | https://slashdot.org/story/02/03/14/144259/feds-rule-paypal-is-not-a-bank | CC-MAIN-2018-13 | refinedweb | 10,305 | 71.65 |
IRC log of rdf-wg on 2011-04-13
Timestamps are in UT
08:06:50 [pfps]
Introductions
08:06:51 [sandro]
Ivan Herman
08:06:54 [sandro]
Mischa
08:06:57 [sandro]
Dan Brickley
08:07:03 [sandro]
Chris
08:07:10 [sandro]
Paul Groth (guest)
08:07:15 [sandro]
PFPS
08:07:23 [sandro]
Jan W.
08:07:30 [sandro]
Jean Paul Inria
08:07:34 [sandro]
Nick Humphrer
08:07:37 [sandro]
Yves
08:07:44 [davidwood]
davidwood has joined #rdf-wg
08:07:47 [sandro]
Cygri
08:07:47 [Zakim]
+ +33.4.92.38.aadd
08:07:57 [sandro]
Pierre-Antoin
08:08:00 [sandro]
Fabien
08:08:05 [sandro]
Steve Harris
08:08:05 [OlivierCorby]
zakim, aadd is me
08:08:05 [Zakim]
+OlivierCorby; got it
08:08:10 [ivan]
s/Antoin/Antoine/
08:08:19 [sandro]
Bonati
08:08:21 [yvesr]
Sandro
08:08:28 [sandro]
Sandro Hawke
08:08:33 [sandro]
David Wood
08:08:36 [sandro]
Guus)
08:11:55 [mischat]
Guus: are we happy with the agenda ?
08:12:11 [mischat]
Guus: does anything need to be amended?
08:12:46 [mischat]
so thomas is not here so Marco (?!?) will be giving the json roundup
08:12:54 [mischat]
s/^so/as/
08:13:20 [tomayac]
s/marco/matteo/]
Guss:]
dave]
dave where we should have graph literals
08:56:57 [mischat]
s/where/whether/]
danbri::10 [danbri]
s/danbri/davidwood/]
mishat: is a g-text (sort of)
09:57:04 [pchampin]
s/construct is a/construct returns:03 [sandro]
s/davidwood:/davidwood,/ian:c ?
11:39:06 [pchampin]
sandro: now speaking about deprecation
11:39:36 [pchamp
11:43:12 [gavinc]
+1
11:43:20 [pchampin]
sandro: who likes proposal on issue-12?
11:43:39 [pchampin]
peter: there might be consequences with the semantics
11:43:53 [sandro]
unanmous support
11:44:01 [pchampin]
s/unanmous/unanymous/
11:44:09 [pchampin]
s/unanymous/unanimous/:46:50 [mischat]
any objections ?
11:47:00 [sandro]
RESOLVED: Mark xs:string as archaic for use in RDF, recommending use of plain literals instead. Recommend that systems silently convert xs:string data to plain literals.
11:47:07 [yvesr]
+1
11:47:37 [davidwood]
Yvesr: It is still minuted :)
11:47:51 [SteveH]
I was +1 too for hte:48:54 [pchampin]
sandro: now talking about issue-13:53 [pchampin]
@prefix ☃: <
>
surf3.html"> ...
13:53:50 [NickH]
eavesdropping!
14:03:21 [Zakim]
+[IPcaller]
14:03:26 [webr3]
zakim, i am IPcaller
14:03:26 [Zakim]
ok, webr3, I now associate you with [IPcaller]
14:04:34 [Zakim]
+ +1.603.897.aahh
14:05:05 [Zakim]
+zwu2
14:05:19 [Zakim]
+PatH
14:05:23 [gavinc]
Yes, yes they do. Have we ALL used that for Triple stores now? :D
14:05:51 [webr3]
those ec2 gpu powered instances are awesome
14:06:07 [gavinc]
Intels new cpu supports 256 GB of ram :D
14:06:15 [webr3]
manu, outpace this:
14:07:29 [pfps]
topic: JSON task force
14:07:39 [Zakim]
+LeeF
14:08:28 [sandro]
scribe: NickH
14:08:44 [NickH]
matteo: has been tracking the disussions using a mind map
14:08:49 [mischat]
do we have a link to the slides ?
14:09:13 [NickH]
slides are not currently on the web
14:09:49 [sandro]
zakim, list attendees
14:09:49 [Zakim]
As of this point the attendees have been +1.707.861.aaaa, gavinc, +1.404.978.aabb, tomayac, +31.20.592.aacc, +33.4.92.38.aadd, OlivierCorby, AZ, David, Wood, Sandro, Mateo, Steve,
14:09:51 [NickH]
matteo is mailing the slides now
14:09:53 [Zakim]
... Harris, Fabien, Pierre, Antoine, Cygri, Yves, Nick, Jean-François, Jan, PFPS, Paul, Groth, Chris, Matheus, Dan, Brickley, Misha, Tuffield, Ivan, +1.408.642.aaff, zwu2,
14:09:55 [sandro]
zakim, who is on the call?
14:09:55 [Zakim]
... mischat, Meeting_Room, +1.617.553.aagg, LeeF, EricP, manu, [IPcaller], +1.603.897.aahh, PatH
14:09:59 [Zakim]
On the phone I see manu, [IPcaller], +1.603.897.aahh, zwu2, PatH, LeeF, OlivierCorby, OlivierCorby.a, OlivierCorby.aa, OlivierCorby.aaa, gavinc, Meeting_Room
14:10:07 [Souri]
Souri has joined #rdf-wg
14:10:37 [ivan]
ivan has joined #rdf-wg
14:12:02 [NickH]
matteo: there are two presentations, the second presentation is Thomas's one
14:12:42 [Guus]
Guus has joined #rdf-wg
14:13:04 [NickH]
matteo: has made a timeline from the start of the discussions (slide 4)
14:13:08 [zwu2]
Did matteo send out slides to the wg mailing list?
14:14:09 [cygri]
slides attached here:
14:14:23 [NickH]
matteo: on the 6th of march manu produced the JSON design requirements
14:14:24 [zwu2]
thanks
14:14:41 [NickH]
matteo: there were two main reactions
14:15:03 [mischat]
14:16:01 [NickH]
1. make a simple way to transform JSON objects into RDF
14:16:07 [Zakim]
+Ronald
14:16:19 [NickH]
2. to provide an RDF serialisation in JSON
14:16:23 [AZ]
Zakim, Ronald is me
14:16:23 [Zakim]
+AZ; got it
14:16:29 [manu]
zakim, mute Ronald
14:16:29 [Zakim]
sorry, manu, I do not know which phone connection belongs to Ronald
14:16:29 [AZ]
zakim, mute me
14:16:30 [Zakim]
AZ should now be muted
14:16:36 [cygri]
zakim, mute them all
14:16:36 [Zakim]
I don't understand 'mute them all', cygri
14:17:17 [mischat]
14:17:22 [mischat]
json market segments ^^
14:17:28 [mischat]
s/market/user/
14:18:04 [ivan]
ivan has joined #rdf-wg
14:18:31 [NickH]
matteo: there was a Seperate Call for the JSON Taskforce
14:18:56 [NickH]
matteo: and separented the examples into two main groups
14:19:03 [NickH]
1. Government/Enterprice
14:19:15 [NickH]
2. Independent Web Developer
14:19:42 [mischat]
<-- elephant in the room thread
14:19:51 [NickH]
matteo: At the end of the March there was an interesting discussion on the mailing list about 'What *is* JSON'
14:20:27 [PatH]
PatH has joined #rdf-wg
14:21:40 [cygri]
Souri, the webcam can't zoom ... the slides are here, in an attachment:
14:23:35 [NickH]
matteo: (slide 5) looking at the existing work on JSON
14:23:40 [NickH]
no single input document
14:24:08 [NickH]
(slide 6) looking at the use cases for JSON + RDF
14:26:08 [NickH]
matteo: the use cases have made it clearer what the job of the Task Force is
14:27:28 [NickH]
(slide 7) there are two open issues in the tracker about what the starting point and source of JSON specification reference
14:29:54 [mischat]
fwiw, i generated a list of triplestores and the RDF serialisations they support, this includes current practice in the world of JSON RDF
14:29:56 [mischat]
14:30:00 [ivan]
Slides on the web (and not as an attachment):
14:30:03 [NickH]
matteo: tomorrow I am going to try and complete the mind-map that will issulrate all the different issues and serialisations approaches
14:30:27 [ivan]
actually:
14:31:08 [NickH]
guus: I am not sure what issues are open for discussion now
14:32:03 [manu]
I really like Sandro's simplification on the big Level/Group thing
14:32:32 [Souri]
s/issulrate/illustrate/
14:32:53 [NickH]
looking at:
14:32:53 [NickH]
14:33:10 [NickH]
sandro: Matrix is too complex
14:33:18 [NickH]
sandro: lets focus on what the users want
14:34:14 [NickH]
sandro: there is also a group D - users who want some of RDF, but not all RDF features (eg blank nodes)
14:34:28 [webr3]
subset-of-B appears to be A ..
14:34:29 [manu]
q+
14:34:38 [NickH]
sandro: Group A and C wants something that looks like JSON
14:34:47 [ivan]
ack manu
14:34:48 [NickH]
sandro: Group B and D want something that looks like RDF
14:35:37 [NickH]
manu: I believe we can do Group A,B,C,D as a single serialisation
14:35:53 [manu]
Here's how we can do Group B: [{}, {}, {}]
14:36:01 [manu]
Group A: {}
14:36:25 [NickH]
sandro: I am giving up on trying to solve for all groups with a single solution
14:36:52 [gavinc]
A) Non RDF aware developers B) RDF aware developers?
14:37:00 [NickH]
matteo is now continuing with his slides
14:37:44 [zwu2]
sandro, does group C has a JSON view like B?
14:38:55 [sandro]
zwu2, Group C uses an API to get RDF-triples. It doesn't really care what the JSON looks like.
14:39:29 [webr3]
minor point: everybody who follows their nose around the web of data requires an API regardless, they have to
14:39:30 [NickH]
(slide 12) shows a document from several years ago that compares and contrasts XML and RDF
14:39:30 [pgroth]
just curious - does anyone have a good pointer to a "popular" site that pushes json based on an rdf backend?
14:39:44 [zwu2]
I see, Sandro
14:39:59 [PatH]
Slide 12 is cute
14:40:04 [sandro]
pgroth, maybe some of the UK Gov't stuff using Linked Data API.
14:40:10 [NickH]
matteo: perhaps we should make a similar diagram explaining the differences between RDF and JSON
14:40:27 [cygri]
pgroth, dbpedia?
14:40:46 [gavinc]
not popular, but oreilly.com
14:40:54 [pgroth]
cygri, do lots of people use the json end of dbpedia?
14:41:06 [NickH]
pgroth: the BBC World Cup website was built using JSON from a Triplestore
14:41:19 [cygri]
pgroth, i have no numbers about that
14:41:33 [webr3]
pgroth, nytimes
14:41:59 [pgroth]
webr3, best example so far :-)
14:42:34 [gavinc]
Huh, I had no idea the nytimes RDF came as JSON too
14:42:55 [mischat]
ok
14:43:12 [pgroth]
that is some ugly urls
14:43:20 [NickH]
now showing "JSON Syntax Options" PDF by Thomas Steiner
14:43:27 [yvesr]
webr3: i wonder why that example doesn't use native json datatypes (for lat/long)
14:43:30 [mischat]
is the syntax a named syntax, the nytimes one ? does it related to any of the json syntaxes up on our wiki?
14:43:52 [SteveH]
jsonlint seems to believe that the / escaping is neccesary
14:44:04 [webr3]
yvesr, I'm unsure, it doesn't use /any/ native types
14:44:35 [NickH]
yvesr:
14:45:11 [danbri]
ivan,
" Allowing \/ helps when embedding JSON in a <script> tag,"
14:46:45 [webr3]
comments re nytimes data: note no nested objects, subject as key, all values always in an array (this is something Joe Presebrey from MIT also said was most useful for consuming), doesn't use any native types, bad slashing style, uses namespaces
14:46:52 [zwu2]
like the matrix one
14:48:13 [NickH]
first, a object based approach, which is close to what Web Developers expect from JSON
14:48:31 [mischat]
there is a widely deployed json-triple format in the wild at the moment iirc
14:48:34 [NickH]
second, a triple-based approach which is very close to RDF
14:48:47 [webr3]
more comments re nytimes: this actually appears to be more machine optimized than developer friendly (looses dot notation, no usage of basic types, will require pre-processing before using in most cases)
14:50:01 [NickH]
sandro: is confused by the _:id in the example
14:50:06 [manu]
Sandro: We need to discuss why we used '@' - there was a reason :P
14:50:23 [NickH]
not clear if id is a real string or a placeholder
14:50:24 [webr3]
re "Findings - subjects (object-based)" the first allows nested objects, the second pretty much precludes it
14:50:50 [danbri]
IRIs can contain spaces, right?
14:51:03 [NickH]
sandro: it is totally necessary to be able to distinguish between URIs and strings
14:51:04 [PatH]
Is the example being discussed web-visible?
14:51:16 [webr3]
PatH,
14:51:25 [NickH]
sandro: don't take the lack of mails on the mailing list as agreement
14:51:26 [webr3]
(slide 11 now)
14:51:31 [PatH]
Ta.
14:52:27 [manu]
It says "Findings - IRIs" at the top, NickH
14:52:43 [NickH]
short dicussion about wether IRIs can contain whitespace
14:52:49 [manu]
Also - I have a solution for the language tags and IRIs via @context...
14:53:05 [manu]
haven't had a chance to put that out to the mailing list - we could have a trigger in the @context
14:53:11 [NickH]
webr3: it isn't on the projection
14:53:25 [manu]
"@context" : { "@microsyntaxes" : true }
14:53:26 [sandro]
(I really really dont like the microsyntax approaches.)
14:53:43 [NickH]
question about how to escape @ sign in the micro format for languages
14:53:51 [danbri]
related:
14:53:52 [manu]
I don't like the Microsyntax approaches either, but when you take the Web-developer-friendly object-based approach, you paint yourself into a corner.
14:54:22 [NickH]
SteveH: why is '@' being used for datatypes as well as languages
14:54:30 [manu]
q+
14:54:39 [webr3]
unsure whether lang or datatype necessary for /all/ use cases..
14:54:52 [NickH]
sandro: doesn't like the Microformat approach, don't like parsing both
14:54:57 [ivan]
ack manu
14:55:20 [sandro]
sandro: I think microparsing is the worst of both worlds....
14:55:25 [NickH]
manu: agrees but thinks microformats may be needed for the edge cases
14:55:31 [cygri]
sandro +1
14:56:13 [PatH]
meta-comment, we ought to avoid trying to police how the planet uses JSON...
14:56:20 [NickH]
manu: even if we hate micro syntaxes, there are ways that we can hide them from the mainstream approach
14:56:34 [NickH]
webr3: +1
14:56:55 [Zakim]
-[IPcaller]
14:56:58 [gavinc]
Do ANY of the Web Developer JSON syntax methods provide the BENEFITS of RDF to the JSON developer?
14:56:58 [NickH]
ivan: we should be optimising for web developers
14:57:13 [manu]
q+
14:57:42 [NickH]
ivan: joking aside, being readable isn't as important as making it easy to use for web developers
14:57:44 [PatH]
+1 to speaker. Readers count less that developer code.
14:57:49 [PatH]
that/than
14:57:54 [NickH]
danbri: it is about code readability not data readability
14:57:55 [ivan]
ack manu
14:57:59 [gavinc]
+q
14:58:00 [mischat]
s/speaker/danbri/
14:58:09 [davidwood]
ack manu
14:58:11 [NickH]
manu: the only microformat we need is for languages, not for datatypes
14:58:12 [danbri]
s/not/as well as/ (well I can't remember what I said, but that's what I meant :)
14:58:16 [ivan]
s/to speaker/to Danbri/
14:58:26 [Zakim]
+??P7
14:58:37 [webr3]
zakim, i am ??P7
14:58:37 [Zakim]
+webr3; got it
14:59:19 [pgroth]
manu, aren't you just saying, we should make this context with a bunch of default interpretations
15:00:00 [NickH]
manu: you can use the context to work out the type or datatype instead of microsyntaxes
15:00:18 [manu]
{"value": "5", "type": "xsd:integer"}
15:00:24 [NickH]
manu: for example when using foaf:homepage, you can guess that the value is an IRI
15:00:29 [manu]
{"value": "foo", "lang": "fr"}
15:00:40 [webr3]
or arcs..
15:00:49 [webr3]
I don't have much to say bar -> we can have two simple syntaxes, one v simple w/ no datatypes or langs, and another one just like jtriples w/ full rdf support, I see no need to complicate this - although we can and have a hybrid that covers every use cases, just worries me having one complex spec that can cover everything, vs two simple specs that people can grok in a few minutes / w/ one example
15:01:10 [ivan]
q?
15:01:28 [ivan]
ack gavinc
15:01:32 [SteveH]
q+
15:01:50 [sandro]
sandro: you could have foaf_name_en and foaf_name_gr etc....
15:02:10 [pgroth]
q+
15:02:13 [pfps]
+1 to gavinc
15:02:25 [PatH]
Because they might need to interact with RDF data whether htey like it or not.
15:03:14 [NickH]
manu: it is about convicing the publishers that they don't need to change their JSON too much to make it RDF compatible
15:03:26 [webr3]
and I want to cover (in one case):
15:03:29 [manu]
q+ to discuss PaySwarm use case.
15:03:30 [cygri]
gavinc: possible answer here:
15:03:48 [manu]
q-
15:03:57 [manu]
q+ to discuss Twitter/Facebook/etc.
15:04:07 [cygri]
q+
15:04:12 [ivan]
q+
15:04:21 [NickH]
manu: the target for the specification is not for developers, but for publishers
15:04:39 [sandro]
q?
15:04:42 [webr3]
manu, example re facebook: <
> If you somehow said "stick
before each property, and use the URL as the subject, you've got RDF", then I believe that would cover a large portion of the "JSON as RDF" A/D user segments.
15:05:35 [sandro]
ack SteveH
15:05:39 [ivan]
ack SteveH
15:05:51 [NickH]
s/manu/gavin/
15:05:58 [NickH]
(sorry!)
15:06:25 [manu]
What six syntaxes do they publish their API in?
15:06:26 [NickH]
SteveH: we don't want the JSON from the Twitter API to return RDF triples
15:06:32 [manu]
JSON, XML - what else?
15:06:33 [mischat]
q+
15:06:33 [sandro]
SteveH: My concern is similar gavin's. I think there is very small audience for this. This doesnt provide anything anyone needs. Who wants the twitter API as JSON...? And Twitter is willing to produce other formats as well!
15:06:36 [pgroth]
q-
15:06:43 [webr3]
manu, formerly atom and rss too iirc
15:06:51 [NickH]
SteveH: there just aren't enough consumers to justify the work
15:06:55 [sandro]
q?
15:07:05 [manu]
webr3: but their API in Atom/RSS?
15:07:15 [Guus]
q?
15:07:17 [webr3]
manu: previously ya, unsure now
15:07:20 [manu]
webr3: They publish /some/ data in Atom/RSS - but not all of it.
15:07:25 [yvesr]
q+
15:07:35 [sandro]
SteveH: Also, on microsyntaxes -- if the data is not in RDF, how would get language tags, etc?
15:07:41 [NickH]
SteveH: if the data is not being held in RDF, I don't see why you need to encode the RDF datatypes into JSON, just use JSON types
15:07:42 [ivan]
ack manu
15:07:42 [Zakim]
manu, you wanted to discuss Twitter/Facebook/etc.
15:07:47 [sandro]
sandro: Manu is trying to address groups A, and B (and C) at the same time,
15:07:52 [davidwood]
ack manu
15:07:52 [danbri]
example from twitter:
'Supported formats XML, JSON'
15:08:01 [mischat]
q-
15:08:38 [NickH]
manu: just to be clear, I don't suggest that we suggest to solve Groups A,B,C,D with a single solution, just that there are solutions on the table that are possible
15:08:56 [Guus]
I wonder wehther we should simply start from the proposals: only consider those proposals that already have a substantial user base
15:09:14 [mischat]
i wonder if developers use JSON because of good toolings, and simple code, as mentioned earlier, not because of the fact that the JSON syntax looks a certain way
15:09:21 [sandro]
(I don't think A and B can be satisfied together. There is no format which can be trivially parsed to triples and also is friendly to js app developers, for *all* RDF.)
15:09:25 [yvesr]
mischat: speed is a massive factor
15:09:37 [yvesr]
json parsers are often an order of magnitude faster than xml
15:09:57 [mischat]
indeed, and if the json parser had to understand rdf, i bet it would be less efficient
15:10:05 [sandro]
s/mischat:/mischat,/
15:10:11 [Guus]
q+
15:10:13 [danbri]
(with Facebook, the single biggest problem w/ RDFa is the disconnected namespace declaration --- publishers constantly screw that up)
15:10:15 [LeeF]
I don't think it's the WG's job to "place a bet" on what will get the rest of the world to adopt Semantic Web technologies.
15:10:23 [yvesr]
mischat: yes, you'd have to add a layer on the top casting that to a graph
15:10:32 [mischat]
s/mischat:/mischat,/
15:11:32 [gavinc]
Yeah, I write 30 lines of Python ... and produce triples at the other end
15:11:40 [sandro]
steve: who would want to consume this stuff in preference to consumer normal json? We're an RDF shop, and we'd rather just consume JSON and turn in to RDF itself.
15:11:49 [MacTed]
rather frustrating to have the wiki say the next meeting is not until next week....
15:11:54 [sandro]
ack
15:11:55 [davidwood]
ack cygri
15:12:17 [manu]
q+ to talk about decentralized systems
15:12:29 [pfps]
steve - is there a document that says how you process vanilla JSON and turn it into RDF
15:12:35 [sandro]
cygri: For sindice it would be great if it could just be indexing all these json data feeds without per-source coding.
15:12:35 [davidwood]
MacTed: When do you want the next meeting to be?
15:13:25 [mischat]
cygri: speak up
15:13:35 [mischat]
s/:/,/
15:14:19 [NickH]
cygri: do we have anything to offer in the Group A just care about JSON and don't actually care about RDF? Yes, we do. RDF has a number of advtanages as a data model.
15:14:25 [yvesr]
q-
15:14:26 [SteveH]
cygri's point is reasonably persuasive, but were a few hops from that in the tech world curently
15:14:30 [NickH]
cygri: in RDF, URIs are explicitly marked up
15:14:33 [webr3]
question: if you took jtriples or talis-rdf as one serialization (to cover rdf), and created a way for the opengraph data to say "append the property names to
and use the GET uri as a subject" (to bring linked data/rdf basic benefits to the wild web), then what segment would not be covered?
15:14:35 [webr3]
.. also, if JSON-schema was merged w/ owl in some way, surely that'd cover everything possible?
15:14:44 [mischat]
q+
15:14:53 [NickH]
cygri: terms in the data dictionary are unique and resolvable
15:15:03 [NickH]
cygri: in RDF it is easy to mix data dictionaries
15:15:27 [NickH]
cygri: there are number of properties that RDF has that JSON doesn't have, that can benifits the JSON community
15:15:56 [danbri]
(seems to be some discussion of RDF on the JSON schemas list - )
15:15:59 [NickH]
cygri: it could make JSON a tiny bit better without implementing full RDF
15:16:40 [cygri]
the mail i mentioned is here:
15:16:42 [davidwood]
ack ivan
15:16:43 [sandro]
cygri: These has to be a benefit to JSON producers and JSON consumers to this work, or it's not worth doing.
15:16:50 [webr3]
danbri, I've been talking to kris zyp too, and he's def got interest there, I've offered to help mix in benefits of rdf/owl/linked-data to json-schema
15:17:10 [NickH]
ivan: the semantic web community has produced huge amount of data on the web
15:17:38 [mischat]
+1 to ivan's point. I went to the UK government hack day, and NOT ONE of the web developers uses any of the RDF on data.gov.uk
15:17:42 [manu]
+1 to Ivan!!
15:17:46 [pgroth]
+1
15:17:48 [mischat]
they ONLY used the JSON data
15:17:48 [sandro]
ivan: The problem is that the web developers ignore what the LOD community has produced.
15:17:50 [NickH]
ivan: there is a large community of web mashup developers out there that today ignores the data that the linked open data community produces
15:17:54 [danbri]
q+ to suggest that consuming apps and useful tooling are more important than syntax tweaks
15:18:01 [yvesr]
althouth the web dev community likes linked data when it's *also* available as JSON
15:18:08 [yvesr]
we have quite a lot of people using our BBC JSON feeds
15:18:09 [cygri]
q+
15:18:10 [NickH]
ivan: today they are unwilling to go outside of their world and use Turtle
15:18:25 [sandro]
sandro: Why doesn't the SPARQL JSON Result format work for them, Ivan?
15:18:28 [sandro]
ivan: It might.
15:18:29 [pgroth]
what we need, is if I expose my data as linked data, I get for free a json api
15:18:32 [NickH]
ivan: that they need, is very clearly, a simple JSON view on the data
15:18:41 [PatH]
+1 to pgroth
15:18:47 [pchampin]
what about a JSON-CONSTRUCT keyword in SPARQL, then?
15:18:59 [yvesr]
pgroth, yes, exactly
15:19:03 [davidwood]
ack guus
15:19:14 [NickH]
davidwood: I agree that they are two completely different communities
15:19:23 [yvesr]
pgroth, the inverse transformation is still interesting though
15:19:31 [PatH]
SOunds like the most urgent JSON need is for a simple API for JSON developers, to lure them into using RDF. Focus on this?
15:19:49 [pgroth]
PatH, agree
15:20:08 [pgroth]
what about the RDFapi group for this?
15:20:31 [zwu2]
If people need to use rdf, they use it. If there is no real business need, they won't.
15:20:32 [sandro]
Yes, Pat -- that would address Ivan's needs, probably. A very nice rdf.js.
15:20:39 [yvesr]
PatH, agree
15:20:52 [NickH]
Guus: I don't see making simple JSON based API for this group. Still after two months we have not made any progress.
15:20:54 [sandro]
q?
15:20:58 [davidwood]
ack manu
15:20:58 [Zakim]
manu, you wanted to talk about decentralized systems
15:21:02 [LeeF]
zwu2++ -- if people don't need to use RDF and are happy with JSON, then there's no problem to be solved there
15:21:09 [SteveH]
+1
15:21:44 [danbri]
q-
15:21:51 [NickH]
manu: at one point it was asked "What can we offer Group A?". The JSON community doesn't current have a way to build de-centralised systems.
15:22:11 [MacTed]
davidwood - the "next meeting" is apparently today.
15:22:12 [NickH]
manu: at the moment you have to re-invent the wheel every time you want to talk to a different service
15:22:40 [NickH]
manu: there is a need to have a de-centralised, simple, communication protocol
15:22:46 [davidwood]
MacTed: We are at F2F1 now, but if you want to change the wiki you certainly may.
15:22:58 [Zakim]
+ +1.781.273.aaii
15:22:59 [ivan]
q?
15:23:00 [davidwood]
q?
15:23:08 [NickH]
Guus: is this better suited to the RDF API group?
15:23:08 [davidwood]
ack mischat
15:23:15 [ivan]
q+
15:23:20 [danbri]
15:23:51 [NickH]
mischat: The UK Government has lots of data. Recently went to a Hack the Government day. Lots of good developers but none of them know how to use RDF.
15:23:57 [danbri]
15:23:58 [NickH]
mischat: JSON offers simplicity
15:24:00 [LeeF]
That sounds like success to me. RDF was valuable to bring the government data together (right?), and yet didn't have to cause anyone to change their toolchains to consume the data. That's a good thing, right?
15:24:06 [pchampin]
q+ to ask if we can bring the benefits of RDF to people that will stick to JSON objects
15:24:11 [davidwood]
ack cygri
15:25:00 [NickH]
cygri: we have 3 distinct problems that we are trying to solve. And we need to handle them seperately.
15:25:13 [NickH]
cygri: 1) we need to make simple JSON more RDFy
15:25:24 [pchampin]
s/simple/existing simple/
15:25:54 [NickH]
cygri: 2) If we already have RDF on the publisher side, we should make it available as JSON for JavaScript consumers
15:25:55 [mischat]
15:25:58 [webr3]
there is a huge quantity of non rdf data in the world, and a lot of that in json, a way to see that data as simple rdf and mash it up with data from other non rdf sources would be, well huge imho - easiest way is shared property names and uris as ids
15:26:07 [sandro]
cygri: three distinct problems. we have to separate them. (1) trying to get data out of current JSON APIs, making them more RDFy. (2) if we have data in RDF at the publisher and the consumer wants RDF. Eg for SPARQL Construct result in JS. rdf-2-rdf. (3) You have data in RDF and you want web developers to use this..
15:26:14 [sandro]
+1 cygri
15:26:19 [davidwood]
q?
15:26:20 [SteveH]
q+ JSON APIs to RDF
15:26:26 [NickH]
cygri: 3) Developers don't need to know anything about RDF, just make it easy for them to consume data that is already in RDF
15:26:37 [webr3]
1 = 3 ?
15:26:38 [davidwood]
ack ivan
15:26:40 [SteveH]
q+ to talk about JSON APIs to RDF (3)
15:26:43 [ivan]
ack ivan
15:27:04 [danbri]
some numbers:
15:27:13 [cygri]
webr3: no, not at all. in 1, the publisher has json and the consumer wants rdf. in 3, the publisher has rdf and the consumer wants json
15:27:25 [NickH]
ivan: comment on the API stuff. What the other working group is working on is a JavaScript API for RDF people.
15:27:37 [webr3]
cygri, yes, but the solution for one, serializationwise, would suit both 1 and 3
15:28:05 [NickH]
ivan: the type of API that you see in Jena or rdflib in Python is being implemented in JavaScript for RDF savy people
15:28:10 [Zakim]
-webr3
15:28:34 [Zakim]
+[IPcaller]
15:28:40 [webr3]
zakim, i am IPcaller
15:28:40 [Zakim]
ok, webr3, I now associate you with [IPcaller]
15:28:57 [NickH]
danbri: :(
15:29:06 [davidwood]
ack pchampin
15:29:06 [Zakim]
pchampin, you wanted to ask if we can bring the benefits of RDF to people that will stick to JSON objects
15:29:08 [cygri]
webr3, you keep saying that but i don't believe it
15:29:26 [sandro]
-1 I think a *good* RDF JS API would allow web developers to get at RDF data.
15:29:42 [davidwood]
I think Web developers want useful data, not to learn RDF.
15:29:44 [sandro]
That is: -1 Ivan, because I think a *good* RDF JS API would allow web developers to get at RDF data.
15:29:59 [webr3]
cygri, can you think of one feature that oen would have that the other would not?
15:30:03 [manu]
Sandro - I don't think that's what Ivan was saying? Or I don't understand your response...
15:30:08 [davidwood]
ack SteveH
15:30:08 [Zakim]
SteveH, you wanted to talk about JSON APIs to RDF (3)
15:30:10 [NickH]
pchampin: seperate out the problems
15:30:52 [cygri]
webr3, the 1 solution needs uris, the 3 solution doesnt
15:31:13 [webr3]
cygri, uri's for properties?
15:31:22 [sandro]
steve: To expose RDF data to web developer, pre-write some canned SPARQL queries and serialize the output as native engineered JSON.
15:31:27 [NickH]
SteveH: provide pre-canned SPARQL queries to expose JSON to web developers
15:31:29 [cygri]
webr3 for properties and instances
15:31:42 [sandro]
steve: No need for stds here.
15:31:54 [NickH]
SteveH: give them a data format that web developers want to consume - give them pure JSON, not RDF disguised as JSON
15:32:32 [NickH]
ivan: eveything that Linked Data community is doing is being ignored
15:32:34 [webr3]
cygri, so if there was a way to say "append
to all properties and use the GET URI as a subject" in both solutions, what would the difference be?
15:32:48 [cygri]
webr3, that doesn't work for 3
15:33:07 [webr3]
cygri, why not, the uri isn't in the data in both cases..
15:33:18 [sandro]
q?
15:33:20 [ivan]
q?
15:33:47 [cygri]
webr3 maybe i don't understand what you mean by "there is a way"
15:33:53 [SteveH]
q+
15:34:09 [NickH]
danbri: there is all this beautiful data being pubished by the linked data world. But it isn't being used. But I don't think a new standard is the way to solve this.
15:34:32 [LeeF]
SWEO was the right place for this sort of thing. Not the RDF WG.
15:34:35 [NickH]
ivan: nobody is doing anything significant to get out of the chicken and egg problem
15:34:51 [webr3]
cygri, it'd just be like
perhaps with one addition { vocab:
} in the data
15:35:07 [danbri]
examples:
15:35:12 [webr3]
cygri, although i can't see any reason for that not to be in a json-schema like doc..
15:35:30 [davidwood]
ack SteveH
15:35:32 [danbri]
vs
15:35:36 [danbri]
vs
15:35:55 [pgroth]
q+
15:36:08 [NickH]
yvesr: the BBC offers both RDF and JSON but most people are consuming the JSON, including danbri
15:36:33 [NickH]
yvesr: the JSON is the same model as the RDF with the namespaces stripped out - very simple
15:36:52 [mischat]
ivan: this is a pretty printed version of the BBC json :
15:37:32 [danbri]
this google sgapi eats rdf/xml with a real (raptor) parser -
15:37:45 [NickH]
ivan: what are the real big success stories of linked data?
15:37:57 [danbri]
(ie. every FOAF file they found in the Web, via standard Google Web crawl)
15:38:06 [davidwood]
ack pgroth
15:38:11 [manu]
q+ on needing a publisher in the middle
15:38:23 [PatH]
Seems to me that I keep hearing that people want to use JSON because it is simple, and not use RDF because it is complicated. In which case, a complicated embedding of full RDF into JSON seems like a shot in the foot.
15:38:33 [NickH]
davidwood: how do we take the linked data cloud and make it available to web developers, without something re-publishing it in the middle
15:38:40 [webr3]
.. ivan,all publish my data from bill roberts does that..
15:38:42 [sandro]
(agreed, PatH.)
15:38:46 [manu]
q-
15:39:00 [mischat]
+1 to PatH
15:39:04 [manu]
q+ to talk about democratization of data and not needing SPARQL publishers.
15:39:33 [pgroth]
q-
15:39:37 [NickH]
pgroth: there just needs to be recipies for publishing RDF as simple JSON
15:39:39 [davidwood]
q?
15:40:12 [PatH]
Being able to just see Paul's right hand is kind of amusing.
15:40:31 [PatH]
ta
15:40:59 [gavinc]
So extend it! And if someone uses it!
15:41:15 [danbri]
so slideshare.com is a good example; they do publish RDFa in various vocabs. Invalid markup at various other levels, though.
15:41:24 [danbri]
q+ to work through slideshare situation
15:41:30 [NickH]
SteveH: what would help is if you could provide a JSON template for exporting RDF as JSON using SPARQL
15:41:43 [davidwood]
ack manu
15:41:43 [Zakim]
manu, you wanted to talk about democratization of data and not needing SPARQL publishers.
15:41:47 [webr3]
PatH +10 to that
15:42:09 [danbri]
('complicated' is a complicated notion)
15:42:24 [NickH]
manu: havn't a publisher in the middle is a fail stategy for Linked Data
15:42:29 [SteveH]
like CONSTRUCT JSON { { "name": ?name, "dob":?dob } } WHERE { ?x :name ?name ; :dob ?dob }
15:42:31 [SteveH]
or whatever
15:42:42 [davidwood]
+1 to manu
15:42:42 [sandro]
-1 manu. Actually, I think having services which gateway RDF to WebApps is okay.
15:42:44 [pfps]
+1 to manu
15:42:53 [SteveH]
-1 to manu
15:42:53 [pgroth]
popular web technologies provide easy reciepes
15:42:58 [SteveH]
q+
15:42:59 [PatH]
danbri, it all depends on what 'is' is.
15:43:09 [webr3]
pgroth, +1 easy recipes
15:43:29 [cygri]
q+
15:43:46 [webr3]
-1 we should be addressing both, seperately - and can, easily
15:43:54 [NickH]
manu: we do want people to be currating the data, but we should focus on the Web Developers not on the few people with a big triplestore
15:43:54 [sandro]
+1 to manu: we should be addressing (small) web developers
15:44:28 [sandro]
I'm not suggesting the gateways do any curating.
15:45:12 [pgroth]
manu, you want to just only use the json pipeline for rdf?
15:45:17 [PatH]
lol
15:45:20 [davidwood]
ack danbri
15:45:20 [Zakim]
danbri, you wanted to work through slideshare situation
15:45:29 [SteveH]
q-
15:45:48 [danbri]
15:46:01 [danbri]
15:46:41 [webr3]
following nose /SHOULD/ be huge, many people wants shared schema's between domains and the ability to look up id's easily, it just isn't hugely popular because RDF is way too complicated for most, and linked data currently focuses a lot of time on RDF, or SPARQL
15:46:45 [davidwood]
ack SteveH
15:47:01 [NickH]
danbri: SlideShare do publish RDF but they are using RDFa, not JSON
15:47:06 [sandro]
q?
15:47:11 [mischat]
here is more triples when you tell rapper it that the file contains rdfa :
15:47:12 [davidwood]
ack cygri
15:47:27 [manu]
pgroth: Yes.
15:48:30 [danbri]
+1
15:49:18 [sandro]
(I'm starting to reluctantly agree with Richard.)
15:49:20 [NickH]
cygri: solving the problem of getting lots of developers to consume Linked Data is not a job for a standardisation group
15:49:25 [cmatheus]
+1
15:49:29 [SteveH]
+1
15:49:35 [sandro]
q?
15:49:38 [danbri]
well, except if millions of otherwise smart developers are ignoring our tech, it might be worth exploring why
15:49:46 [NickH]
Guus: we can start with a minimum solution
15:49:50 [LeeF]
cygri +1
15:49:57 [PatH]
+1. KISS.
15:50:05 [yvesr]
not sure i agree, standards should be made to be useful to a large extent...
15:50:06 [zwu2]
+1 to a minimum solution
15:50:10 [webr3]
+1, simple as possible
15:50:13 [PatH]
(another Clinton quote, FWIW)
15:50:20 [manu]
+1 to a minimal solution
15:50:21 [yvesr]
where useful means a large number of devs using them
15:51:02 [NickH]
cygri: I would peronally like to see these problems solved but I am not convinced that we have a good solution for peoplems number 1 and 2
15:51:05 [NickH]
cygri: I would peronally like to see these problems solved but I am not convinced that we have a good solution for peoplems number 1 and 3
15:51:12 [danbri]
semweb = standards + community + tools + data; if the outside world is ignoring, I'd suggest refocussing as semweb = data + tools + community + standards. The data's the prize, everything else is a means to an end.
15:51:34 [yvesr]
danbri, +1
15:51:39 [danbri]
jsonld =
15:51:42 [webr3]
danbri, +1
15:51:44 [danbri]
'JSON-LD - Expressing Linked Data in JSON '
15:51:46 [PatH]
danbri, +10
15:51:46 [NickH]
1: JSON-LD object style.
15:51:50 [sandro]
q?
15:51:58 [NickH]
2: Talis JSON/RDF
15:52:16 [NickH]
3: Linked Data API - we have triples but want to expose them as JSON
15:52:53 [danbri]
I don't think most JSON enthusiasts care about NOTE vs REC
15:53:04 [mischat]
+1 to danbri
15:53:12 [NickH]
cygri: problem 2 is fairly clear how to solve
15:54:08 [PatH]
'Note' is a black hole to drop overenthusiastic WG ideas into.
15:54:31 [PatH]
:-)
15:54:32 [cygri]
PathH lol
15:54:41 [NickH]
CSV=
15:54:44 [danbri]
zakim, who is ringing?
15:54:44 [Zakim]
I don't understand your question, danbri.
15:54:49 [danbri]
zakim, who is speaking?
15:54:49 [manu]
zakim, who is making noise?
15:54:59 [Zakim]
danbri, listening for 10 seconds I heard sound from the following: Meeting_Room (45%), zwu2 (10%), OlivierCorby.aa (54%), +1.781.273.aaii (54%)
15:55:09 [Zakim]
manu, listening for 10 seconds I heard sound from the following: gavinc (9%), Meeting_Room (50%), OlivierCorby.aa (40%), +1.781.273.aaii (15%)
15:55:43 [MacTed]
Zakim, aaii is OpenLink_Software
15:55:43 [Zakim]
+OpenLink_Software; got it
15:55:43 [MacTed]
zakim, OpenLink_Software is temporarily me
15:55:43 [MacTed]
zakim, mute me
15:55:44 [Zakim]
+MacTed; got it
15:55:44 [Zakim]
MacTed should now be muted
15:55:55 [zwu2]
zakim, mute me
15:55:55 [Zakim]
zwu2 should now be muted
15:57:07 [manu]
I think guidance isn't going to do anything significant to change Linked Data's position in the world.
15:57:09 [danbri]
q+ to ask about json schemas
15:57:26 [NickH]
davidwood: if we are going to give up on developers in terms of devloping a standard for consuming RDF as JSON
15:57:46 [NickH]
SteveH: I don't like using the phrase 'giving up on developers'
15:57:58 [manu]
I think that's exactly what we're doing - "Giving up on developers"
15:57:58 [danbri]
q-
15:58:01 [webr3]
danbri, thanks.. json-schema + owl2 == success imo
15:58:21 [danbri]
webr3, i didn't follow all the list - did it get any discussion in this wg yet?
15:58:25 [SteveH]
manu, where are these developers that want to consume JSON as RDF? I don't know any
15:58:37 [NickH]
davidwood: we can still help developers by offering advice, rather than creating a standard
15:58:45 [SteveH]
manu, ah, except cygri's Sindice usecase
15:58:46 [pchampin]
@web3: just a pronostic, or have you any experience on that?
15:58:48 [webr3]
danbri, not really, I've mentioned it a few times, pushback or nothing was the response
15:58:58 [SteveH]
but they're RDF developers, not "web" developers
15:59:08 [manu]
SteveH: You know one company - that's us. PaySwarm is has these requirements coming down the pike very soon, which will also need this.
15:59:30 [SteveH]
manu, ok, you'll have to explain why the triples help, offline
15:59:37 [PatH]
+1 to speaker
15:59:50 [manu]
SteveH: Yes, I think we'll have to have a phone chat at some point because I think we're speaking past each other.
15:59:55 [sandro]
+1 DavidWood: Do (2), Do (3) if someone wants to, and (1) if a good proposal emerges.
15:59:58 [webr3]
pchampin, owl community are sayign it's a good thing, json schema community is saying it'd be good, just needs to happen (and it seems pretty obvious)
16:00:10 [SteveH]
manu, yeah, I think so too
16:00:26 [manu]
Do you want to setup a time now? I have time on Friday - or early next week.
16:01:21 [SteveH]
manu, I can do monday afternoon, uk time
16:01:28 [webr3]
SteveH, I'm also one, and so are most of the dev's i work with on 3 different non-rdf projects, they all want the simple benefits
16:01:46 [danbri]
so re schema-annotation/grddl-ish approach, ... i hear luke-warm mild curiousity, but no huge enthuasism here yet
16:01:56 [NickH]
Guus: Proposal to do work on Case Type 2, starting with the Talis JSON/RDF
16:02:13 [SteveH]
webr3, but, like danbri said, consuming RDF is a pain, you really need a triplestore (even if in memory)
16:02:25 [PatH]
In favor.
16:02:50 [PatH]
Woot, a proposal to do something.
16:02:56 [NickH]
Guus: Proposal to do work on Case Type 2, starting with the Talis JSON/RDF. Revisit 1 in the future
16:03:30 [webr3]
danbri, see
(half way down)
16:04:22 [webr3]
deiter(?) it doesn't - it's just for a fast light over the wire RDF serialization
16:04:29 [sandro]
PROPOSED: (1) Incubate on something like JSON-LD, (2) make a REC on something like Talis RDF/JSON, and (3) make a Note on current practice stuff like Linked Data API.
16:04:45 [sandro]
(got 12 +1's in the room)
16:04:50 [webr3]
+1
16:05:01 [manu]
wait what? Did we straw-poll already?
16:05:14 [PatH]
+1
16:05:15 [manu]
-1
16:05:21 [davidwood]
Manu: Please vote note
16:05:24 [zwu2]
+1
16:05:25 [davidwood]
s/note/now/
16:05:33 [LeeF]
+1
16:05:37 [gavinc]
+0
16:05:46 [PatH]
+1
16:05:53 [davidwood]
Manu: Is that a formal objection?
16:05:56 [gavinc]
(It's what we can do, not what we should do)
16:05:57 [danbri]
can we try an exercise: compare sample client code for
with a triples JSON syntax
16:05:57 [LeeF]
Can we get the straw poll feeling of the people in the room recorded in the minutes, please?
16:06:16 [manu]
No, not a formal objection - there's much teeth grinding, but no formal objection :)
16:06:49 [webr3]
manu, tis better than a year of fighting because there are different use cases, background, needs etc - at least there's a chance of two decent specs at the end this way
16:06:56 [manu]
but I am a very strong -1 - I think this group is focusing on the wrong thing by focusing on the group that's already sold on using RDF/TURTLE/SPARQL/etc.
16:07:08 [sandro]
LeeF, as I said, "(got 12 +1's in the room) " trying to characterize the room.
16:07:19 [LeeF]
sandro, I don't know who that is though
16:07:44 [LeeF]
thank you!
16:07:56 [sandro]
PROPOSED: (1) Incubate on something like JSON-LD, (2) make a REC on something like Talis RDF/JSON, and (3) make a Note on current practice stuff like Linked Data API.
16:07:59 [webr3]
1st: can you define "incubate on"
16:08:00 [sandro]
+1
16:08:02 [SteveH]
+1
16:08:03 [davidwood]
+1
16:08:04 [pchampin]
+1
16:08:06 [LeeF]
+1
16:08:07 [mbrunati]
+1
16:08:07 [zwu2]
+1
16:08:08 [NickH]
+1
16:08:10 [PatH]
+1
16:08:11 [cmatheus]
-0
16:08:12 [ivan]
+1
16:08:12 [gavinc]
-0
16:08:14 [FabGandon]
+0
16:08:18 [JFB]
+0
16:08:25 [cygri]
+1
16:08:26 [manu]
-1 I think this group is focusing on the wrong thing by focusing on the group that's already sold on using RDF/TURTLE/SPARQL/etc.
16:08:28 [danbri]
manu, do you have any interest to work on json-schema-based approach?
16:08:31 [mischat]
+1
16:08:35 [danbri]
+1
16:08:37 [webr3]
+1
16:08:37 [NickH]
sandro: it means if a good proposal comes back in a few months time, then we can do something about it
16:08:45 [manu]
danbri: Perhaps - it's something we talked about internally
16:08:57 [webr3]
danbri, manu, i really do, so does kris zip who does json schema
16:09:01 [sandro]
sandro: "incubate on" means not spend serious WG time, but we're free to revisit it later in the life of this WG and maybe adopt it.
16:09:03 [cmatheus]
this sounds like it may be the only pragmatic way to proceed but to me it doesn't seem to be going far enough unless we eventully get back to something along the lines of JSON-LD
16:09:04 [NickH]
sandro: but not spend any more working group time on it for the time being
16:09:07 [danbri]
action: danbri follow up with manu regarding schema-based mapping of json into rdf
16:09:08 [trackbot]
Created ACTION-31 - Follow up with manu regarding schema-based mapping of json into rdf [on Dan Brickley - due 2011-04-20].
16:09:31 [NickH]
davidwood: I don't think there is something useful we can do for the comunity for the time being
16:09:46 [pfps]
-1
16:09:48 [PatH]
what is the difference between +0 and -0 ?
16:10:15 [manu]
PatH: +0 - you are smiling while you do it, -0 you're frowning :)
16:10:21 [PatH]
Ah
16:10:22 [gavinc]
-0: 'I won't get in the way, but I'd rather we didn't do this.'
16:10:27 [gavinc]
+0: 'I don't feel strongly about it, but I'm okay with this.'
16:10:28 [manu]
+1 to pfps
16:10:43 [webr3]
+1 to pfps as well
16:10:49 [JFB]
Then I change my vote from +0 to -0
16:11:36 [cygri]
q+
16:11:49 [davidwood]
webr3: That's what "incubate" means :)
16:12:06 [webr3]
davidwood, has been incubating with some for 1 year+ already
16:12:07 [PatH]
Peter's concern is worth noting. If the WG can un-incubate this later, that would be a Good Thing. We should not just let it die.
16:12:46 [cygri]
manu +1
16:12:47 [davidwood]
I agree that the WG should revisit
16:13:41 [pchampin]
q?
16:13:50 [Zakim]
-AZ
16:14:09 [davidwood]
ack cygri
16:14:16 [FabGandon]
FabGandon has left #rdf-wg
16:14:50 [FabGandon]
FabGandon has joined #rdf-wg
16:15:30 [NickH]
cygri: a lot of the JSON discussion as been about the differences between approach 1 and approach 2. Aprooach 3 has hardly been looked at so far. Can the working group look at approach 3?
16:16:31 [danbri]
three versions of the BBC program description from yvesr & co:
16:16:34 [AZ]
AZ has joined #rdf-wg
16:16:58 [PatH]
Sandro, relax. You are making me dizzy.
16:17:06 [sandro]
:-)
16:17:09 [PatH]
BUt thanks.
16:17:24 [PatH]
LOL
16:17:58 [PatH]
is of is not?
16:18:05 [PatH]
of/or
16:18:18 [webr3]
yvesr, it's not it's "RDF Web Applications WG"
16:19:04 [Zakim]
+AZ
16:19:13 [AZ]
zakim, mute me
16:19:13 [Zakim]
AZ should now be muted
16:20:18 [sandro]
RESOLVED: (1) Incubate on something like JSON-LD, (2) make a REC on something like Talis RDF/JSON, and (3) make a Note on current practice stuff like Linked Data API.
16:20:40 [NickH]
manu: I can't accept the decision and plan to go and talk to JSON providers and see what will work with them
16:21:07 [sandro]
s/can't/can/
16:21:08 [danbri]
fyi json-ld list is at
16:21:24 [NickH]
mischat: oops
16:21:38 [NickH]
manu: I can accept the decision and plan to go and talk to JSON providers and see what will work with them
16:21:54 [sandro]
discussing possible public-rdf-json mailing list
16:22:22 [webr3]
which group would it be associated with?
16:22:32 [webr3]
(or none)
16:22:36 [sandro]
ACTION: sandro to make public-rdf-json@w3.org
16:22:36 [trackbot]
Created ACTION-32 - Make public-rdf-json@w3.org [on Sandro Hawke - due 2011-04-20].
16:22:54 [Zakim]
-LeeF
16:22:58 [zwu2]
bye, time to sleep now.
16:23:02 [Zakim]
-zwu2
16:23:05 [NickH]
davidwood: we should create a W3C mailing list for investigation into RDF JSON
16:23:29 [sandro]
manu, or maybe the list should be called something else, to separate it as this kind of JSON....?
16:23:36 [NickH]
guus: brainstorm - what breakout topics should we go for
16:23:43 [NickH]
tomorrow
16:23:48 [sandro]
public-rdf-view-of-json :-)
16:23:58 [webr3]
@sandro, could the list also be used for the owl+json-schema possible work/discussions that are going on too? (re the name)
16:24:19 [sandro]
I think so.
16:24:23 [manu]
I'm concerned about having 'rdf' in the name of the mailing list :)
16:24:30 [webr3]
snap
16:24:33 [manu]
'public-linked-data-json'
16:24:34 [PatH]
name, rjdsfon
16:24:44 [manu]
'public-linked-json'
16:24:57 [sandro]
Yes..... I like that.
16:25:48 [webr3]
likewise
16:26:08 [sandro]
question whether it's a task force of this WG and still covered by the W3C patent policy or not.
16:26:56 [sandro]
in-wg gets patent policy; out-of-wg gets everyone to join.
16:27:07 [sandro]
No, no one is scribing. Trying to figuoure out breakouts.
16:27:12 [webr3]
@sandro, community group for it?
16:27:42 [gavinc]
Which break outs will have a phone?
16:28:04 [sandro]
zakim, who is talking?
16:28:04 [mischat]
zakim, who is making noise ?
16:28:13 [PatH]
Sounds like wqe are now a fax machine
16:28:15 [Zakim]
sandro, listening for 10 seconds I heard sound from the following: gavinc (9%), Meeting_Room (54%)
16:28:26 [Zakim]
mischat, listening for 10 seconds I heard sound from the following: gavinc (35%), Meeting_Room (15%)
16:28:44 [manu]
I have to run - thanks for the meeting all - sorry I couldn't be there F2F :)
16:29:21 [mischat]
bye manu
16:29:23 [sandro]
guus: Start tomorrow with 2 hours on 4 critical issues on GRAPHS.
16:29:40 [PatH]
What time is that 'start' tomorrow?
16:30:30 [webr3]
will skolem breakout be on zakim?
16:30:31 [pfps]
9:30 Amstertam
16:30:45 [sandro]
no clear we'll do the Skolem breakout.
16:30:57 [FabGandon]
FabGandon has left #rdf-wg
16:31:07 [PatH]
So just to be clear, 9.30 Amsterdam for the 2-houir on graph ccritical issues?
16:31:26 [AZ]
enjoy your dinner, bye
16:31:34 [Zakim]
-[IPcaller]
16:31:39 [PatH]
Enjoy your dinner and walks.
16:31:43 [Zakim]
-AZ
16:32:31 [gavinc]
Okay, see everyone in the morning.
16:32:39 [Zakim]
-gavinc
16:32:52 [Zakim]
-PatH
16:32:53 [Zakim]
-MacTed
16:33:35 [Zakim]
-Meeting_Room
16:34:57 [Zakim]
-manu
16:39:10 [Zakim]
- +1.603.897.aahh
18:56:43 [tomayac]
tomayac has joined #rdf-wg
20:32:54 [Scott]
Scott has joined #rdf-wg
20:45:32 [Scott]
Scott has joined #rdf-wg
20:49:20 [tomlurge]
tomlurge has left #rdf-wg
20:54:28 [tomlurge]
tomlurge has joined #rdf-wg
21:00:28 [cmatheus]
cmatheus has joined #rdf-wg
21:24:00 [JFB]
JFB has joined #rdf-wg
21:27:36 [JFB]
JFB has joined #rdf-wg
21:56:38 [pgroth]
pgroth has joined #rdf-wg
21:57:43 [SteveH]
SteveH has joined #rdf-wg
22:09:04 [mischat]
mischat has joined #rdf-wg
22:38:41 [danbri]
danbri has joined #rdf-wg
23:47:37 [LeeF]
LeeF has joined #rdf-wg | http://www.w3.org/2011/04/13-rdf-wg-irc | CC-MAIN-2016-22 | refinedweb | 9,449 | 59.98 |
When you begin using Python after using other languages, it's easy to bring a lot of idioms with you. Though they may work, they are not the best, most beautiful, or fastest ways to get things done with Python—they're not pythonic. I've put together some tips on basic things that can provide big performance improvements, and I hope they'll serve as a starting point for you as you develop with Python.
From 10th to 16th October 2016, we're celebrating Python Week. That means you can save 50% on some of our newest Python products *and* pick up a free Python eBook every single day!
Use comprehensions
Comprehensions are great. Python knows how to make lists, tuples, sets, and dicts from single statements, so you don't need to declare, initialize, and append things to your sequences as you do in Java. It helps not only in readability but also on performance; if you delegate something to the interpreter, it will make it faster.
def do_something_with(value): return value * 2 # this is an anti-pattern my_list = [] for value in range(10): my_list.append(do_something_with(value)) # this is beautiful and faster my_list = [do_something_with(value) for value in range(10)] # and you can even plug some validation def some_validation(value): return value % 2 my_list = [do_something_with(value) for value in range(10) if some_validation(value)] my_list [2, 6, 10, 14, 18]
And it looks the same for other types. You just need to change the appropriate surrounding symbols to get what you want.
my_tuple = tuple(do_something_with(value) for value in range(10)) my_tuple (0, 2, 4, 6, 8, 10, 12, 14, 16, 18) my_set = {do_something_with(value) for value in range(10)} my_set {0, 2, 4, 6, 8, 10, 12, 14, 16, 18} my_dict = {value: do_something_with(value) for value in range(10)} my_dict {0: 0, 1: 2, 2: 4, 3: 6, 4: 8, 5: 10, 6: 12, 7: 14, 8: 16, 9: 18}
Use Generators
Generators are objects that generate sequences one item at a time. This provides a great gain in performance when working with large data, because it won't generate the whole sequence unless needed, and it’s also a memory saver. A simple way to use generators is very similar to the comprehensions we saw above, but you encase the sentence with () instead of [] for example:
my_generator = (do_something_with(value) for value in range(10)) my_generator <generator object <genexpr> at 0x7f0d31c207e0>
The range function itself returns a generator (unless you're using legacy Python 2, in which case you need to use xrange).
Once you have a generator, call next to iterate over its items, or use it as a parameter to a sequence constructor if you really need all the values:
next(my_generator) 0 next(my_generator) 2
To create your own generators, use the yield keyword inside a loop instead of a regular return at the end of a function or method. Each time you call next on it, your code will run until it reaches a yield statement, and it saves the state for the next time you ask for a value.
# this is a generator that infinitely returns a sequence of numbers, adding 1 to the previous def my_generator_creator(start_value): while True: yield start_value start_value += 1 my_integer_generator = my_generator_creator(0) my_integer_generator <generator object my_generator_creator at 0x7f0d31c20708> next(my_integer_generator) 0 next(my_integer_generator) 1
The benefits of generators in this case are obvious—you would never end up generating numbers if you were to create the whole sequence before using it. A great use of this, for example, is for reading a file stream.
Use sets for membership checks
It's wonderful how we can use the in keyword to check for membership on any type of sequence. But sets are special. They're of a mapping kind, an unordered set of values where an item's positions are calculated rather than searched.
When you search for a value inside a list, the interpreter searches the entire list to see whether the value is there. If you are lucky, the value is the first of the sequence; on the other hand, it could even be the last in a long list.
When working with sets, the membership check always takes the same time because the positions are calculated and the interpreter knows where to search for the value. If you're using long sets or loops, the performance gain is sensible. You can create a set from any iterable object as long as the values are hashable.
my_list_of_fruits = ['apple', 'banana', 'coconut', 'damascus'] my_set_of_fruits = set(my_list_of_fruits) my_set_of_fruits {'apple', 'banana', 'coconut', 'damascus'} 'apple' in my_set_of_fruits True 'watermelon' in my_set_of_fruits False
Deal with strings the right way
You've probably done or read something like this before:
# this is an anti-pattern "some string, " + "some other string, " + "and yet another one" 'some string, some other string, and yet another one'
It might look easy and fast to write, but it's terrible for your performance. str objects are immutable, so each time you add strings, trying to append them, you're actually creating new strings.
There are a handful of methods to deal with strings in a faster and optimal way.
To join strings, use the join method on a separator with a sequence of strings. The separator can be an empty string if you just want to concatenate.
# join a sequence of strings, based on the separator you want ", ".join(["some string", "some other string", "and yet another one"]) 'some string, some other string, and yet another one' ''.join(["just", "concatenate"]) 'justconcatenate'
To merge strings, for example, to insert information in templates, we have a classical way; it resembles the C language:
# the classical way "hello %s, my name is %s" % ("everyone", "Gabriel") 'hello everyone, my name is Gabriel'
And then there is the modern way, with the format method. It is quite flexible:
# formatting with sequencial strings "hello {}, my name is {}".format("everyone", "Gabriel") 'hello everyone, my name is Gabriel' # formatting with indexed strings "hello {1}, my name is {2} and we all love {0}".format("Python", "everyone", "Gabriel") 'hello everyone, my name is Gabriel and we all love Python'
Avoid intermediate outputs
Every programmer in this world has used print statements for debugging or progress checking purposes at least once. If you don't know pdb for debugging yet, you should check it out immediately.
But I'll agree that it's really easy to write print statements inside your loops to keep track of where your program is. I'll just tell you to avoid them because they're synchronous and will significantly raise the execution time.
You can think of alternative ways to check progress, such as watching via the filesystem the files that you have to generate anyway.
Asynchronous programming is a huge topic that you should take a look at if you're dealing with a lot of I/O operations.
Cache the most requested results
Caching is one of the greatest performance tunning tweaks you'll ever find.
Python gives us a handy way of caching function calls with a simple decorator, functools.lru_cache. Each time you call a function that is decorated with lru_cache, the interpreter checks whether that call was made recently, on a cache that is a dictionary of parameters-result pairs. dict checks are as fast as those of set, and if we have repetitive calls, it's worth looking at this cache before running the code again.
from functools import lru_cache @lru_cache(maxsize=16) def my_repetitive_function(value): # pretend this is an extensive calculation return value * 2 for value in range(100): my_repetitive_function(value % 8)
The decorator gives the method cache_info, where we can find the statistics about the cache. We can see the eight misses (for the eight times the function was really called), and 92 hits. As we only have eight different inputs (because of the % 8 thing), the cache size was never fully filled.
my_repetitive_function.cache_info() CacheInfo(hits=92, misses=8, maxsize=16, currsize=8)
Read
In addition to these six tips, read a lot, every day. Read books and other people's code. Make code and talk about code. Time, practice, and exchanging experiences will make you a great programmer, and you'll naturally write better Python code.
About the author
Gabriel Marcondes is a computer engineer working on Django and Python in São Paulo, Brazil. When he is not coding, you can find him at @ggzes, talking about rock n' roll, football, and his attempts to send manned missions to fictional moons. | https://www.packtpub.com/books/content/7-tips-python-performance | CC-MAIN-2017-13 | refinedweb | 1,420 | 55.17 |
Understanding Classic COM Interoperability w/.NET Apps
DisclaimerThe information in this article & source code are published in accordance with the Beta 1 bits of the .NET framework SDK.
Ever wondered how all those COM components that we have written through the years play along with the .NET runtime. If you are a diehard COM developer interested in knowing how Classic COM Components (Yikes !.It does hurt to see COM being called Classic COM) are positioned in the .NET world, read on.
Introduction
Getting Started
Generating metadata from the COM Typelibrary
Binding to & Invoking our COM component from a .NET Application
Accessing other supported interfaces and Dynamic Type Discovery
Late Binding to COM Objects
Understanding COM Threading models & Apartments from a .NET application's perspective
COM's position in the .NET world.
After playing around with the .NET Technology Preview & recently the .NET Beta 1 bits , there all those of us who program COM for a living , and for those who live by the 'COM is love' mantra, there is good news. COM is here to stay and .NET framework managed applications can leverage existing COM components. Certainly, Microsoft wouldn't want to force companies to abandon all their existing components, especially components that were written in one of the most widely used object model. In this article, we will focus on how you can get COM components to work with the .NET managed runtime.
So let's get started right away. Let's write a simple COM component using ATL that gives us the arrival details for a specific airline. For simplicity, we always return details for only the 'Air Scooby IC 5678' airline and return an error for any other airline. That way, you can also take a look at how the error raised by the COM component can be propagated back so that it can be caught by the calling .NET client application.
Here's the IDL definition for the IAirlineInfo interface:lineDetails(); }//if else { // Return an error message return Error(LPCTSTR(_T("Airline Timings not available for this Airline" )), __uuidof(AirlineInfo), AIRLINE_NOT_FOUND); } return S_OK; }
So now, since we are ready with our component, let's take a look at generating some metadata from the component's type library so that the .NET client can use this metadata to talk to our component and invoke it's methods.
Generating metadata from the COM Typelibrary :
Figure 1: How the COM interop works
A .NET application that needs to talk to our COM component cannot directly consume the functionality that's exposed by it. So we need to generate some metadata. This metadata layer is used by the runtime to ferret out type information, so that it can use this type information at runtime to manufacture what is called as a Runtime Callable Wrapper (RCW). The RCW handles the actual activation of the COM object and handles the marshallingtable calls into the COM component that lives in the unmanaged world. It's an ambassador of goodwill between the managed world and the unmanaged IUnknown world.
So let's generate the metadata wrapper for our Airline COM component. To do that, we need to use a tool called the TLBIMP.exe. The Type library Importer (TLBIMP ) ships with the .NET SDK and can be found under the Bin subfolder of your SDK installation. The Typelibrary Importer utility reads a typelibrary and generates the corresponding metadata wrapper containing type information that the .NET runtime can comprehend.
From the DOS command line, type the following command :
TLBIMP AirlineInformation.tlb /out:AirlineMetadata.dll
This command tells the TLBIMP to read your AirlineInfo COM typelibrary and
generate a corresponding metadata wrapper called AirlineMetadata.dll. If
everything went off well, you should see a message such as the following :
TypeLib imported successfully to AirlineMetadata.dll
So what kind of type information does this generated metadata contain and how does it look like. As COM folks, we have always loved our beloved OleView.exe, at times when we felt we needed to take a peek at a typelibrary peek at that metadata. So go ahead and open AirlineMetadata.dll using ILDASM. Take a look at the metadata generated and you see that the GetAirlineTiming method is listed as a public member for the AirlineInfo class. There is also a constructor that gets generated for the AirlineInfo class. The method parameters also have been substituted to take their equivalent .NET counterparts. In our example the BSTR has been replaced by the System.String parameter. Also notice that the parameter that was marked [out,retval] in the GetAirlineTiming method was converted to the actual return value of the method (returned as System.String ). Any failure HRESULT values that are returned back from the COM object (in case of an error or failed business logic) are thrown back as exceptions.
Figure 2 : IL Disassembler - a great tool for viewing metadata and MSIL for managed assemblies
Binding to & Invoking our COM component from a .NET Application:
Now that we have generated the metadata that's required by a .NET client, let's try invoking the GetAirlineTiming method in our COM object from the .NET Client. So here's a simple C# client application that creates the COM object using the metadata that we generated earlier and invokes the GetAirlineTiming method. an exception System.Console.WriteLine("Details for Airline {0} --> {1}", strFoodJunkieAirline,objAirlineInfo.GetAirlineTiming(strFoodJunkieAirline)); }//try catch(COMException e) { System.Console.WriteLine("Oops- We encountered an error. The Error message is : {0}. The Error code is {1}",e.Message,e.ErrorCode); }//catch
Under the hood, the runtime fabricates an RCW and this maps the metadata is defined under a namespace called AIRLINEINFORMATIONLib. The .NET client sees all the interface methods as if they were class members of the AirlineInfo class. All we need to do is, just create an instance of the AirlineInfo class using the new operator and call the public class methods of the created object. When the method is invoked, the RCW thunks down the call to the corresponding COM method call. The RCW also handles all the marshalling & object lifetime issues. To the .NET client it looks nothing more than it's actually creating a managed object and calling one of it's interface for this error propagation to work, so that the RCW knows that your object provides extended error information. The error can be caught by the .NET client by the usual try-catch exception handling mechanism and has access to the actual error number, description, the source of the exception and other details that would have been available to any COM aware client.
Accessing other supported
interfaces and Dynamic Type Discovery:
Accessing other supported interfaces and Dynamic Type Discovery:So how does the classic QueryInterface scenario work from the perspective of the .NET client when it wants to access another interface implemented by the COM object. To QI for another interface, all you need to do is cast the current object to the other interface that you need, and voila, your QI is done. You are now ready to invoke all the methods/properties of the other interface. It's that simple. Again, the RCW does the. In our example, suppose you wanted to call the methods on the IAirportFacilities interface which is another interface implemented by our COM object, you then simply cast the AirlineInfo object to the IAirportFacilities interface. You can now call all the methods that are a part of the IAirportFacilities interface. But before performing the cast, you may want to check if the object instance that you are currently holding supports or implements the interface type that you are querying for. You can do this by using the IsInstanceOf method in the System.Type class. If it returns TRUE, then you know that the QI succeeded. You can then safely perform the cast. In case you cast the object to some arbitrary interface that the object does not support, a System.InvalidCastException exception is thrown. This way the RCW ensures that you are casting to only interfaces that are implemented by the COM object and not just any arbitrary interface type.
try { AirlineInfo objAirlineInfo; IAirportFacilitiesInfo objIFacilitiesInfo; // Create a new object objAirlineInfo = new AirlineInfo(); // Check if the object implements the // IAirportFacilitiesInfo interface if(objIFacilitiesInfo.GetType().IsInstanceOf(objAirLineInfo)) { // Peform the cast objIFacilitiesInfo = (IAirportFacilitiesInfo)objAirlineInfo; // Call the method of the other interface System.Console.WriteLine("{0}",objIFacilitiesInfo.GetInternetCafeLocations()); }//if ISomeInterface objISomeJunk; //Will throw an InvalidCastException objISomeJunk = (ISomeInterface) objAirlineInfo; }//try catch(InvalidCastException eCast) { System.Console.WriteLine("We got an Invalid Cast Exception - Message is {0}", eCast.Message); }//catch
Late Binding to COM Objects :All the examples that you saw above used the RCW metadata achieve late binding to a COM object through a mechanism called Reflection. This does not apply to COM objects alone. Even .NET managed objects can be late bound using Reflection. Also, if your object contains a pure dispinterface only, then you are pretty much limited to only using Reflection to activate your object and invoke methods on the interface. For late binding to a COM object, you need to know the object's ProgID. The CreateInstance static method of the System.Activator class, allows you to specify the Type information for a specific class and it will automatically create an object of that specific type. But what we really have is a ProgID and not true .NET Type Information. So we need to get the Type Information from the ProgID for which we use the GetTypeFromProgID method of the System.Type class. The System.Type class is one of the core enablers for Reflection. So now that you have created an object instance, you can invoke any of the methods/properties supported by the object's default interface using the System.Type::InvokeMember method of the Type object that you got back from GetTypeFromProgID. All we need to know is the name of the method or property and the kind of parameters that the method call accepts. The parameters are bundled up in a generic System.Object array and passed away to the method.You would also need to set the appropriate binding flags depending on whether you are invoking a method or getting/setting the value of a property. That's all there is to late binding to a COM object.
try { object objAirlineLateBound; Type objTypeAirline; object[] arrayInputParams= { "Air Scooby IC 5678" }; //Get the type information from the progid objTypeAirline = Type.GetTypeFromProgID("AirlineInformation.AirlineInfo"); // a property String strTime = (String)objTypeAirline.InvokeMember("LocalTimeAtOrlando", BindingFlags.Default | BindingFlags.GetProperty, null, objAirlineLateBound, new object[]{}); Console.WriteLine ("The Local Time at Orlando,Florida is : {0}", strTime); }//try catch(COMException e) { System.Console.WriteLine("Oops- We encountered an Error. The Error message is : {0}. The Error code is {1}", e.Message,e.ErrorCode); }//catch
Understanding COM Threading models & Apartments from a .NET application's perspective :I remember that when I first started programming in COM, I had not yet stepped then waters of COM Threading models & learn how each of those models behaved, how COM managed apartments, and what were the performance implications that arose when calling between two incompatible Apartments. As you know, before a thread can call into a COM object, it has to declare it's it's. So it makes sense to set the thread's ApartmentState as early as possible in your code.
// Set the client thread ApartmentState to enter an STA Thread.CurrentThread.ApartmentState = ApartmentSTate.STA; // Create our COM object through the Interop MySTA objSTA = new MySTA(); objSTA.MyMethod()
COM's position in the .NET world : In this article, you took a look at how you can expose Classic COM components to .NET applications executing under the purview of the Common Language Runtime (CLR). You saw how the COM interop seamlessly allows you to reuse existing COM components from managed code. Then, you skimmed through ways to invoke your COM component using both early binding and late binding along with ways to do runtime type checking. Finally, you saw how managed threads decalare their Apartment affiliations when invoking COM components.. So eventually, we COM developers do not have to despair. Our beloved COM components will continue to play well with .NET applications. The tools provided with the .NET framework and the COM interop mechanism make it seamless from a programming perspective as to whether your .NET application is accessing a Classic COM component or a managed component. So in essence, the marriage between COM & the brave new .NET world should be a happy one and the COM that we all know and love so much will still continue to be a quintessential part of our lives.
How can I get the value of [out/ref] parameter?Posted by Legacy on 07/23/2003 12:00am
Originally posted by: stanley choi
At the moment, I do not have any problem in using COM with .NET client at all.
However I can't get the value of [out/ref] parameter?
Suppose I have 'A' component with 'Get'
'Get' would be like this
-----------------------------------------------------------
VARIANT Get([in]String cUserId, [out/ref]VARIANT * oResult)
-----------------------------------------------------------
At the moment, I have no problem to getting the return and passing [in] parameter. but I can't get the second(out) parameter.
Thanks in advance.
STA apartment modelPosted by Legacy on 04/27/2001 12:00am
Originally posted by: Amir Mousavi
It was wonderfull to read aboy COM and .NET. Here is what I still have problem with STA apartment threading. I have 10 clients calling same STA object. The object is a VB developed COM server running within MTS environment. How many copy of STA threads are in the same MTX process? Is there a way for me to look what thread is been used by what STA apartment?Reply | http://www.codeguru.com/cpp/com-tech/complus/interop/article.php/c4803/Understanding-Classic-COM-Interoperability-wNET-Apps.htm | crawl-003 | refinedweb | 2,283 | 56.35 |
Hello. Didn't find a similar topic, so....
I was wondering what you people -- especially the gurus 'round here -- think about this language: .
Personally, I think it sounds like a very attractive language. Too bad there isn't much support for it (yet?).
Emotion is thus peace is not.
I have done some work with it, and it does have some nice features. Alas, a language without a major support structure behind it is very unlikely to gain any mainstream acceptance.
At last count [about 3 years ago] I totaled at least 87 different languages (counting significantly different dialects) that I have had at least some direct experience with over the years. Fewer than 15 of them accounted for 95%++ of the programming have done in nearly 35
It is a programming language with a some nice features. However, like many other nice languages, not many people are using it. This is due to many factors like no strong marketing (unlike MS), companies have already heavily invested on tools and code written in earlier languages (e.g. C, it is still used in many embedded application), etc. In other words, these languages have not gain enough critical mass to start a programming language 'revolution'.
Anyway, it is always nice to look at these new languages so that we can pick up something useful and put that into our code.
quoted from C++ Coding Standards:
KISS (Keep It Simple Software):
Correct is better than fast. Simple is better than complex. Clear is better than cute. Safe is better than insecure.
Avoid magic number:
Programming isn't magic, so don't incant it.
Only if you have the patience - have'nt yet seen any company using it for their product development.
Regards,
Ramkrishna Pawar
Originally Posted by exterminator
Only if you have the patience -
That's a lot o' patience required there, heh heh
I have a question: do you think D will overthrow C++, or will C++ ever be overthrown and if so which language would replace it? Or will C++ be used for a long time to come even if it hypothetically would be replaced in the future?
I found a nice comparison list, by the way if anyone's interested:
Cheers
That comparison is flawed. The list is very long but here are some of the wrong statements made there.
Complex and Imaginary - C++ library supports complex types (<complex>)
Hash (C++ has unordered_map in tr1 that will be part of C++ 0x - is part by dinkumware STL, gcc, and some other libraries provide hash based collections as well),
Function delegates - C++ as well as C have function pointers, function objects,
Function literals - don't know what they are pointing to - but platform based dlsym and variants exist where you can get an exported function's pointer using its name.
Inner classes - C++ has them as well
Generics - C++ doesn't have them (not considering C++/CLI that has them)
Reflection/Introspection - C++ has RTTI - there are libraries with more advanced features like xRTTI (extended RTTI).
Modules/Namespaces - namespaces are supported.
array bounds checking - not inbuilt but you can have classes like vector do that. That is, its optional and not mandated on all arrays for performance reasons.
There are things that I am not sure of what they mean like Design by Contract (? is it not a design issue than a language issue?), strong typedefs, dynamic closures and currifying.
Finally, nothing prevails till eternity. But D won't throw C++, for sure..
Still, it looks like D is a better C/C++ (I am excluding C#, Java, etc.). What if D got into the gaming industry? Isn't it a worthy competitor to C++ in that regard? Also a good choice regarding system programming? From what I see it looks like D spans the whole area from low to high, more than C++ it seems. It also looks like migration from C/C++ to D would be no problem for all those guru programmers out there. I bet even beginning programmers would have an easier time learning D than C++.
I'm just so interested in it, heh heh All the evolutions and such of languages...
I've been looking at this D for a while now, and the more I read about it the more I like it. In my learning and practice code I've even been using D instead of C++ and it just feels right and it's almost the same anyway.
One little thing I like is the dynamic character array and the absence of #including 'string' or any "string" type
Originally Posted by Bijo
One little thing I like is the dynamic character array and the absence of #including 'string' or any "string" type
Sorry, not worth the migration. C99 has support for VLAs not just char arrays and C++ has vector/string/array (boost::array actually). You need to find more serious reasons to the migration.
Btw, you could learn any language that you want but if you are not targetting the same as for professional work - you are asking for an extra byte of effort competing there.
Agh, that little piece of text you took out....
From what I've read there are already people busy using D. There's even a game being written using D as the base language and seems like a very good project.
Way I see it everything evolves. Even a standard mainstream low-level systems and high-level programming language like C++ could be made better, and D is where it's at. It'll just take some time before it becomes popular and better supported.
Just imagine D and a good scripting language: would make good stuff for games.
I hear compile times are a lot faster than C++ too. Well, I could list more reasons but if you go through the D newsgroup () I'm sure you'll find enough info.
Cheers
Language comparisons with feature comparison tables are utterly stupid, especially when they ignore the standard library and focus on the core language.
With these comparisons, python would be a very poor language, while Perl would be rich... Even for all the things where they perform identically!
Moreover, it's very biaised.
The choice of features is arbitrary.
It's easy to claim that language X is better than language Y by listing in the table only features that X has and that Y doesn't have, and ignoring features that both have, or features that Y has but not X.
Moreover, it's easy to list many minor or useless features which adds a lot of "features that X have but not Y", but which are irrevelant.
Language comparisons are usually not clever, but language comparisons through table of features are the most utterly stupid comparison possible.
A good language don't need a big core. It doesn't even need a big standard library. It needs to be able to do many things, in a convenient way. Either through core features, or through portable open source libraries, or through the capacity of directly interacting with the system API.
()!
Forum Rules | http://forums.codeguru.com/showthread.php?345879-What-happen-to-them-where-are-they&goto=nextnewest | CC-MAIN-2015-40 | refinedweb | 1,190 | 71.44 |
Hi:
What is an easy way to export user-defined roles from one database and import it into another database instance?
Thanks,
Una.
nop, you cant import roles unless FULL=Y is used in export
Possible thru a script.
Otherwise export and import only Object definitions with ignore=y option which grants all the privileges and grants.
* export with full=y and rows=n and import with ignore=y
I'm trying to only import 2 specific users (objects and all the roles/privileges granted to these users). I can't import the entire database as it is a development database and has a lot of test users and objects that I don't need in my production database...
export full with no data and import only Object definitions of the users you wanted with ignore=y option which grants all the privileges and roles to those users.
export userid/password full=y or users=user1,user2 and rows=n
import userid/password ignore=y
fromuser=user1,user2
touser=user1,user2
[Edited by sreddy on 01-02-2001 at 04:42 PM]
Forum Rules | http://www.dbasupport.com/forums/showthread.php?5356-error-ORA-01555-snapshot-too-old-while-Insert-amp-upd&goto=nextoldest | CC-MAIN-2017-13 | refinedweb | 184 | 56.89 |
Making Web Requests (Windows Phone)
Windows Phone is designed for network connectivity, and this ability can be used in games to make web requests using the Hypertext Transport Protocol (HTTP).
This topic will describe how to add HTTP web requests to your game to retrieve data, using an example that demonstrates retrieving an avatar image from XboxLIVE.com.
To make a web request on Windows Phone
Add a reference to the System.Net namespace in your game project.
- Open your project in Visual Studio, right-click References in Solution Explorer, and click Add Reference.
- In the .Net tab, select System.Net in the list, and click OK.
You should see System.Net in the list of References in your project.
Add the System.Net namespace to any source files that will use its classes and methods.
Call HttpWebRequest.Create with a Uniform Resource Identifier (URI) to use for the request.
Call HttpWebRequest.BeginGetResponse with a callback function that will receive the response from the web server in the URI.
In the callback, use HttpWebRequest.EndGetResponse to get a WebResponse object, which can be used to retrieve the data returned in the response.
void GetAvatarImageCallback(IAsyncResult result) { HttpWebRequest request = result.AsyncState as HttpWebRequest; if (request != null) { try { WebResponse response = request.EndGetResponse(result); avatarImg = Texture2D.FromStream( graphics.GraphicsDevice, response.GetResponseStream()); } catch (WebException e) { gamerTag = "Gamertag not found."; return; } } } | https://msdn.microsoft.com/en-us/library/hh221581.aspx | CC-MAIN-2017-47 | refinedweb | 226 | 52.36 |
18 March 2009 13:26 [Source: ICIS news]
(Releads and updates throughout)
By Mark Watts
DUSSELDORF (ICIS news)--LANXESS will save €250m ($325m) through wage and production cuts as it battles the downturn, the company said on Tuesday.
The ?xml:namespace>
“There is no sign yet of a turnaround or recovery in demand. One thing is clear: 2009 will be a highly unsatisfactory year for the entire chemical industry,” he added at the group’s annual press conference.
The company reported a loss in earnings before interest and tax (EBIT) of €46m in the fourth quarter of 2008 and Heitmann said there was no clear way the first quarter would see an improvement in the company’s operations.
LANXESS made a fourth-quarter 2008 net loss of €41m ($53m), compared to a €5m profit for the same period the previous year, due to falling customer demand amid the global economic downturn, it said on Wednesday.
The company also suffered a 53% fall in its pre-exceptionals operating profit to €24m from €51m in the fourth quarter of 2007.
LANXESS said the global recession was having a negative impact on many of its customers. It said there had been sharp falls in demand from the automotive, construction and leather industries.
Heitmann said the company was responding to the “demanding situation”, with a group-wide package of measures called ‘Challenge09’.
"With the initiatives contained in this package we aim to achieve savings of €250m over the next two years and in this way mitigate the effects of the expected drop in demand,” he said.
The measures would include wage cuts and reduced operating rates at unprofitable plants.
The company has agreed to global pay reductions of about 10%, which it said would account for €65m in savings in 2009 alone.
The working week for over 5,000 non-managerial employees at LANXESS’ German sites has been lowered to 35 hours from 37.5 hours starting in March, initially for one year. Workers would also lose out on bonus payments.
Salary reviews for managers and board members scheduled for 2009 would be suspended for at least six months, the company added.
LANXESS said short-time working had also been agreed for sites outside
“We are achieving further reductions in costs by way of numerous individual technical measures and process improvements in all areas of production,” Heitmann said.
“We can very largely adhere to our price-before volume strategy, even during the crisis. So rather than generating unprofitable production volumes, we prefer to temporarily shut down the affected plant – as we are doing in
LANXESS said it would propose a dividend of €0.50 per share for 2008. Its 2007 dividend was €1.00 per | http://www.icis.com/Articles/2009/03/18/9201393/lanxess-cuts-output-and-wages-has-bleak-outlook-for-chems.html | CC-MAIN-2014-42 | refinedweb | 451 | 58.82 |
Using the Flickr API
One the first and most comprehensive application interfaces of the Web 2.0 era, the Flickr API was in no small part responsible for the site’s success.
There were dozens of photo sharing sites clamoring for attention when Flickr first launched, but thanks its flexible API, developers began building and extending the site far beyond the capabilities of others.
The Flickr API exposes almost every piece of data stored on the site, and it offers near limitless possibilities for mashups, data scraping, tracking friends — just about anything you can think of.
For examples of some of the more popular applications using Flickr’s API, check out the various desktop uploaders available on all platforms. Also have a look at some of the tag-based Flickr mashups people have created, like Earthalbum and Flickrmania. Perhaps the most prolific of Flickr API users is John Watson (Flickr user fd) who has an extensive collection of tools and mashups available.
Getting Started
The nice thing about Flickr is that the API is very mature. There are already client libraries available for most languages — several libraries in some cases. That means you don’t need to sit down and work out the details of every method in the API, you just need to grab the library for your favorite programming language.
For the sake of example, I’m going to use a Python library to retrieve all the photos I’ve marked as favorites on Flickr.
First grab Beej’s Python Flickr API library and install it on your Python path (instructions on how to do that can be found in the documentation). I like Beej’s library because it handles the XML parsing without being dependent on any other libraries.
Now let’s write some code.
Accessing Flickr with Python
Fire up a terminal and start Python. Now import the flickrapi and set your API key:
import flickrapi api_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
Now we’re going to create an instance of the flickrapi client:
flickr = flickrapi.FlickrAPI(api_key)
OK, now let’s grab all the photos we’ve marked as favorites. Accessing all the methods of the Flickr API takes the general form:
flickr.method_name(params)
So to grab our favorites we’ll use:
favs = flickr.favorites_getPublicList(user_id='85322932@N00')
The favs variable now holds our list of images as parsed XML data. To print it, we just loop through and pull out what we want:
for photo in favs.photos[0].photo: print photo['title']
To access the actual images, for instance to generate some HTML, we just need to build a URL:
for photo in favs.photos[0].photo: print '<img src="'+"" % (photo['farm'], photo['server'], photo['id'], photo['secret']) +'" />'
Mashups
If all you want to do is put images on your website, there’s probably already a widget that can handle the task. And of course you can DIY if you like by extending the method above.
But what if you want to plot all the Favorites we just retrieved on a Google Map? That’s exactly the sort of mashup task where the Flickr API excels.
To make our retrieved photos mappable, we would just need to add a parameter to our original method call. We’d need to tell Flickr to include the photos’ geo coordinates, for instance:
favs = flickr.favorites_getPublicList(user_id='85322932@N00', extras='geo')
Now we can parse through our set and grab the coordinates:
for photo in favs.photos[0].photo: print photo['latitude'] + photo['longitude']
From there, we can pass that over to the Google Maps API and plot the images.
In this particular case, only a couple of the returned photos actually have lat/long info. Flickr’s tagging system lets users add geo coordinates to photos, but most casual users don’t go to the trouble to add the location info to their images. Because of this, it’s a good idea to test for non-zero values before passing the data to the Google Maps API.
Tip: The Flickr API will return data formats other than XML. For instance we could use this method to get a JSON response:
favs = flickr.favorites_getPublicList(user_id='85322932@N00', extras='geo', format='JSON')
The Flickr API exposes nearly every aspect of the site, which makes it both limitless and daunting. Thankfully Flickr has excellent documentation. As for what you can do with the Flickr API, the best mashups seem to start with the thought, “you know what would be cool…” | http://www.webmonkey.com/2010/02/Get_Started_With_the_Flickr_API | CC-MAIN-2015-22 | refinedweb | 748 | 69.92 |
After launching an app to the app stores, internationalization is the next step to further your audience reach. Over 20 countries and numerous people around the world use Right-to-Left (RTL) languages. Thus, making your app support RTL for them is necessary.
We're glad to announce that React Native has been improved to support RTL layouts. This is now available in the react-native master branch today, and will be available in the next RC:
v0.33.0-rc.
This involved changing css-layout, the core layout engine used by RN, and RN core implementation, as well as specific OSS JS components to support RTL.
To battle test the RTL support in production, the latest version of the Facebook Ads Manager app (the first cross-platform 100% RN app) is now available in Arabic and Hebrew with RTL layouts for both iOS and Android. Here is how it looks like in those RTL languages:
#Overview Changes in RN for RTL support
css-layout already has a concept of
start and
end for the layout. In the Left-to-Right (LTR) layout,
start means
left, and
end means
right. But in RTL,
start means
right, and
end means
left. This means we can make RN depend on the
start and
end calculation to compute the correct layout, which includes
position,
padding, and
margin.
In addition, css-layout already makes each component's direction inherits from its parent. This means, we simply need to set the direction of the root component to RTL, and the entire app will flip.
The diagram below describes the changes at high level:
These include:
- css-layout RTL support for absolute positioning
- mapping
leftand
rightto
startand
endin RN core implementation for shadow nodes
- and exposing a bridged utility module to help control the RTL layout
With this update, when you allow RTL layout for your app:
- every component layout will flip horizontally
- some gestures and animations will automatically have RTL layout, if you are using RTL-ready OSS components
- minimal additional effort may be needed to make your app fully RTL-ready
#Making an App RTL-ready
To support RTL, you should first add the RTL language bundles to your app.
Allow RTL layout for your app by calling the
allowRTL()function at the beginning of native code. We provided this utility to only apply to an RTL layout when your app is ready. Here is an example:
iOS:
// in AppDelegate.m [[RCTI18nUtil sharedInstance] allowRTL:YES];
Android:
// in MainActivity.java I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance(); sharedI18nUtilInstance.allowRTL(context, true);
For Android, you need add
android:supportsRtl="true"to the
<application>element in
AndroidManifest.xmlfile.
Now, when you recompile your app and change the device language to an RTL language (e.g. Arabic or Hebrew), your app layout should change to RTL automatically.
#Writing RTL-ready Components
In general, most components are already RTL-ready, for example:
- Left-to-Right Layout
- Right-to-Left Layout
However, there are several cases to be aware of, for which you will need the
I18nManager. In
I18nManager, there is a constant
isRTL to tell if layout of app is RTL or not, so that you can make the necessary changes according to the layout.
#Icons with Directional Meaning
If your component has icons or images, they will be displayed the same way in LTR and RTL layout, because RN will not flip your source image. Therefore, you should flip them according to the layout style.
- Left-to-Right Layout
- Right-to-Left Layout
Here are two ways to flip the icon according to the direction:
Adding a
transformstyle to the image component:
<Image source={...} style={{transform: [{scaleX: I18nManager.isRTL ? -1 : 1}]}}/>
Or, changing the image source according to the direction:
let imageSource = require('./back.png');if (I18nManager.isRTL) { imageSource = require('./forward.png');}return <Image source={imageSource} />;
#Gestures and Animations
In Android and iOS development, when you change to RTL layout, the gestures and animations are the opposite of LTR layout. Currently, in RN, gestures and animations are not supported on RN core code level, but on components level. The good news is, some of these components already support RTL today, such as
SwipeableRow and
NavigationExperimental. However, other components with gestures will need to support RTL manually.
A good example to illustrate gesture RTL support is
SwipeableRow.
#Gestures Example
// SwipeableRow.js_isSwipingExcessivelyRightFromClosedPosition(gestureState: Object): boolean { // ... const gestureStateDx = IS_RTL ? -gestureState.dx : gestureState.dx; return ( this._isSwipingRightFromClosed(gestureState) && gestureStateDx > RIGHT_SWIPE_THRESHOLD );},
#Animation Example
// SwipeableRow.js_animateBounceBack(duration: number): void { // ... const swipeBounceBackDistance = IS_RTL ? -RIGHT_SWIPE_BOUNCE_BACK_DISTANCE : RIGHT_SWIPE_BOUNCE_BACK_DISTANCE; this._animateTo( -swipeBounceBackDistance, duration, this._animateToClosedPositionDuringBounce, );},
#Maintaining Your RTL-ready App
Even after the initial RTL-compatible app release, you will likely need to iterate on new features. To improve development efficiency,
I18nManager provides the
forceRTL() function for faster RTL testing without changing the test device language. You might want to provide a simple switch for this in your app. Here's an example from the RTL example in the RNTester:
<RNTesterBlock title={'Quickly Test RTL Layout'}> <View style={styles.flexDirectionRow}> <Text style={styles.switchRowTextView}>forceRTL</Text> <View style={styles.switchRowSwitchView}> <Switch onValueChange={this._onDirectionChange} style={styles.rightAlignStyle} value={this.state.isRTL} /> </View> </View></RNTesterBlock>; _onDirectionChange = () => { I18nManager.forceRTL(!this.state.isRTL); this.setState({ isRTL: !this.state.isRTL }); Alert.alert( 'Reload this page', 'Please reload this page to change the UI direction! ' + 'All examples in this app will be affected. ' + 'Check them out to see what they look like in RTL layout.' );};
When working on a new feature, you can easily toggle this button and reload the app to see RTL layout. The benefit is you won't need to change the language setting to test, however some text alignment won't change, as explained in the next section. Therefore, it's always a good idea to test your app in the RTL language before launching.
#Limitations and Future Plan
The RTL support should cover most of the UX in your app; however, there are some limitations for now:
- Text alignment behaviors differ in Android and iOS
- In iOS, the default text alignment depends on the active language bundle, they are consistently on one side. In Android, the default text alignment depends on the language of the text content, i.e. English will be left-aligned and Arabic will be right-aligned.
- In theory, this should be made consistent across platform, but some people may prefer one behavior to another when using an app. More user experience research may be needed to find out the best practice for text alignment.
There is no "true" left/right
As discussed before, we map the
left/
rightstyles from the JS side to
start/
end, all
leftin code for RTL layout becomes "right" on screen, and
rightin code becomes "left" on screen. This is convenient because you don't need to change your product code too much, but it means there is no way to specify "true left" or "true right" in the code. In the future, allowing a component to control its direction regardless of the language may be necessary.
Make RTL support for gestures and animations more developer friendly
Currently, there is still some programming effort required to make gestures and animations RTL compatible. In the future, it would be ideal to find a way to make gestures and animations RTL support more developer friendly.
#Try it Out!
RTLExample in the
RNTester to understand more about RTL support, and let us know how it works for you!
Finally, thank you for reading! We hope that the RTL support for React Native helps you grow your apps for international audience! | https://reactnative.dev/blog/2016/08/19/right-to-left-support-for-react-native-apps | CC-MAIN-2021-39 | refinedweb | 1,253 | 55.13 |
Talk:Bureaucracy
From Uncyclopedia, the content-free encyclopedia
PLS
This would be a rewrite, as an article on "Bureaucracy" already exists. Therefore, you rewrote it, regardless of how much content from the current article is in this version. --Hotadmin4u69 [TALK] 03:22, 27 June 2007 (UTC)
am I missing a joke?
Either I'm missing a pretty decent joke here, or this text looks like it belongs in an unbooks page. It's too well written to be a mistake, but it doesn't seem at all related to the topic.--Concernedresident 18:48, 24 November 2007 (UTC)
It's intentional, I'm going "outside the box" with this one.
No matter how much people think this should be an unbook, they will not change my mind. EVER.--Gubby 19:58, 27 February 2008 (UTC)
OK: someone's moved this article to UnBooks. It seems like I'm going to have to explain myself more clearly on this one.
This is not an unbook. Why? Because the content is intentionally somewhat at a tangent to the title. If you opened a book that called itself "bureaucracy" you'd expect something in it to refer directly to bureaucracy, or at least explain the title. For instance, in the book "A Clockwork Orange" you learn that the book is named after a point in the story where there is a guy who's writing a novel which is called "A Clockwork Orange". If that bit of the story had been left out, you'd be left thinking, "whaa? I read through it all and not once was there an explanation as to why this book was called what it was! I only reason I bought the book was to find that out anyway!" So as to prevent this sort of thing, the writer has to create some lame excuse for having written a title that was blatently just an eye-catcher anyway.
Not so here. That "whaa?" factor you get when finding an article which seems to have nothing to do with the title is intentional; it's humour. You come here expecting a wikipedia style article on bureaucracy. BAM! I've hit you where you don't expect it with a story. It's that dissonence between what you expect and what you get -- the conflict between two realities -- which forces laughter out of you, almost as if it were a rejection in the mind of some foreign material.
Said all that, it's not an amazing joke. I don't expect everyone or even many people to get it, but I don't care, I think it's worth keeping it like that despite the protests of however many people who think it should be in the more obvious namespace.
All good? Ok.--Gubby 04:01, 29 February 2008 (UTC)
This is kind of weird
Reminds me of Diaboliad by Bulgakov. Even a little Lewis Carol. Did you do this on purpose or am I imagining shit? 12.29.147.34Me
And By the way, I am from the US, I am not fat, ignorant, or arrogant and I read Bulgakov. So fuck off america bashers | http://uncyclopedia.wikia.com/wiki/Talk:Bureaucracy?oldid=2903328 | CC-MAIN-2015-22 | refinedweb | 526 | 71.04 |
:
Official Builder Extensions
Introduction
We are going to take a close look at some Griffon-related builder extensions that can make your life as a developer easier. SwingBuilder is one of the builders that can be configured on a Griffon application. SwingXBuilder is one of the official builder extensions. We’ll cover each one of them briefly. Let’s start with SwingXBuilder.
SwingXBuilder
SwingXBuilder provides threading facilities in the form of the withWorker() node, an abstraction over Swinglab’s SwingWorker and JDK6′s SwingWorker. There is more to SwingXBuilder that just that. The SwingX project was born as an incubator for ideas and components that may eventually find their way into the JDK. SwingWorker is one of those few that actually made the transition.
You’ll find a good number of interesting components in the SwingX component suite. Many were designed as a replacement for the existing Swing components; for example, JXButton would replace JButton. SwingX offers more than just components; it also provides a painters API that lets you override how a component is painted on the screen without actually needing to create a subclass of said component.
The easiest way to install SwingXBuilder on an application is by installing its companion plugin. That’s right; let the framework do the hard work for you. The plugin will configure the builder on the application’s metadata and config files. It will also copy required libs and dependencies when needed. Invoke the following command on your command prompt to install the plugin and builder:
griffon generate-view-script LoginDialog
Once you have it installed, you’re ready to work. One last piece of information before you begin—remember we just said that some SwingX components were designed as replacements? Well, SwingXBuilder took that into consideration, which means that some of its node names may clash with SwingBuilder’s. That is the reason why this builder is configured with a different prefix—more precisely, jx. This means that whenever you see a node name that starts with that prefix, it’s a node that has been contributed by SwingXBuilder. Alright, figure 1 shows a simple application that contains two main elements: a header and a TaskPane container.
The header component is using the painters API. This painter, in particular, is a compound of three other painters:
- The first painter provides the base color, a very dark shade of gray—almost black.
- The second painter provides the pinstripes. You can change and tweak the stripes’ angle, color, and spacing.
- The last painter provides a glossy look. Everything looks better with a bit of shine.
The second component emulates the behavior seen on earlier versions of the Windows file explorer. It is a TaskPaneContainer and, as its name implies, it serves as a place to embed TaskPanes. There are two TaskPanes on this container. Clicking on Task group 2 will expand its contents (with a smooth animation); clicking it again will collapse it. You may embed any Swing components in a TaskPane. What’s that? What about the code, you say? Sure. It couldn’t be any easier, as listing 1 shows.
Listing 1 Some SwingXBuilder components in action
// create instance of view object widget(new LoginDialog(), id:'loginDialog') #1 noparent { // javax.swing.JTextField usernameField declared in LoginDialog bean(loginDialog.usernameField, id:'usernameField') #2 // javax.swing.JPasswordField passwordField declared in LoginDialog bean(loginDialog.passwordField, id:'passwordField') #3 // javax.swing.JButton okButton declared in LoginDialog bean(loginDialog.okButton, id:'okButton') #4 // javax.swing.JButton cancelButton declared in LoginDialog bean(loginDialog.cancelButton, id:'cancelButton') #5 } return loginDialog #1 Main UI container #2 Username textField reference #3 Password passwordField reference #4 OK button reference #5 Cancel button reference
At #1, you see how each of the painters is defined. SwingXBuilder exposes a node for each of the basic painters you’ll find on the Painters API. The compound painter is created in #2; it only requires a list of painters to be used. At #3, the header component is built. Note that all it takes is to set a few properties on that component. Setting the compound painter is done as with every other property; there is simply no magic to it. Finally, at #4, we see the TaskPanes being added to their container. Note that the first TaskPane refers to a jxlabel node, while the second refers to a label node. This means that the first pane should have a JXLabel instance, while the second should have a JLabel instance. The use of the jx prefix makes switching from one type of node to the other a simple task.
What’s more, the CompositeBuilder makes mixing nodes from two builders a trivial task. We won’t show how you can achieve the same goal by regular SwingBuilder means. After all this is one of the main reasons why Griffon came to be.
Make sure to check SwingX‘s other components. We’re sure you’ll find interesting the following ones:
- JXErrorPane—Useful for displaying errors caused by an exception. Highly configurable.
- JXTitlePanel—A JPanel replacement that comes with its own title area.
- JXTable—Row highlighting and sorting are but a few of the features you’ll find in it. Some of its features have been merged into JDK’s JTable.
- JXHyperLink—A button that behaves like a hyperlink as seen on web pages.
The next builder we’ll cover is also quite popular.
JideBuilder
The announcement of the JIDE Common Layer (JCL) project’s becoming an open source project back in 2007 surprised many. Up to that point, JIDE was a closed-source component suite developed by JideSoft. Many components have been open sourced since the announcement. You’ll find some easily recognizable components like split buttons (a component that is both a button and a menu), lists that can display checkboxes (without the need of a custom renderer made by yourself), comboBoxes that support auto completion; just to name a few. Despite the number of components that you’ll find in the JCL, it only represents close to 35 percent of all components provided by JideSoft; the rest are available through the purchase of a commercial library. Suffices to say those components are not supported by JideBuilder itself; however, adding them is not that difficult, should you chose to purchase a license.
Installing the builder is done by installing its companion plugin. This is a recurring theme, isn’t it? We did mention that plugins came in handy and, as you’ll soon see, all officially supported builders can be installed via plugins. The following command should do the trick:
griffon install-plugin jide-builder
Take a look at the builder’s documentation site () to find out more about the components that are now at your disposal. We’re sure you’ll find SplitButton useful, especially for an application that requires a more enterprise-like behavior. Other components that fall into that category are:
- AutoCompletionComboBox—A comboBox that comes with an auto completion feature. Options will be selected as you type on the comboBox’s input field.
- TriStateCheckBox—When enabled and disabled are just not enough.
- SearchableBar—Adds searching capabilities to tables and trees.
- DateSpinner—A spinner component that knows how to work with Dates.
Figure 2 presents an application that showcases three JIDE components: checkboxList, jideButton, and jideSplitButton.
The list on the left does not require additional properties to be set in order to display a checkbox per entry, just set the data you need and that’s all. The first four buttons on the right belong to the same type but are rendered with different styles. Hovering on Toolbar will make the button draw a raised edge, like the one Toolbox has. The Flat button stays like it currently is, flat. The fourth one, Hyperlink, will draw its text with an underline when the mouse is posed over it. The fifth button is the special button we’ve been talking about: a combination of button and menu. It will trigger a normal action once you click on it, like a regular button. But, if you keep the button pressed, it will not fire that action but rather present a popup menu with more choices. The code is straightforward as listing 2 shows.
Listing 2 JIDE’s CheckboxList and Buttons
widget(new LoginDialog(mainFrame, true), id:'loginDialog') noparent { bean(loginDialog.usernameField, id:'usernameField', text: bind(target: model, targetProperty: "username")) bean(loginDialog.passwordField, id:'passwordField', text: bind(target: model, targetProperty: "password")) bean(loginDialog.okButton, id:'okButton', actionPerformed: controller.loginOk) bean(loginDialog.cancelButton, id:'cancelButton', actionPerformed: controller.loginCancel) } return loginDialog
CheckboxLists (#2) can be created in the same way as regular lists, just pass an array of object (#1) or a model as data. JideButtons have a style property that controls how they are rendered to the screen. You can see a fairly common Groovy trick (#3) used to read a constant field from a Java class that follows a pattern. In our case, each element on the style list serves as the button’s text and the basis to read a constant field on the ButtonStyle class. Creating the menu of a JideSplitButton (#4) is a matter of defining a closure for its customize property. Notice that all menu items are removed first and then some are added. Duplicate menu items would start piling up every time you display the menu if it’s not done this way. This is due to JideSplitButton’s behavior of keeping a reference to the menu it created the first time.
The next builder is sure to catch your eye.
CSSBuilder
Hold on a moment! Is that CSS as in Cascading Style Sheets? As in a technology that is typically associated with web content but not desktop? Happily, the answer is yes! Styling desktop components by means of CSS or a CSS-like solution is one of those goals that desktop developers often look for besides better threading and binding.
CSSBuilder is actually a wrapper on a handful of classes that belong to the Swing-clarity project, whose creators are Ben Galbraith and Dion Almaer, from ajaxian.org fame. That’s true! Those guys used to work on the desktop side before riding the Ajax wave revolution.
The CSS support provided by Swing-clarity is able to parse CSS2 selectors and colors. On top of it, CSSBuilder adds support for 71+ custom properties that are specific to Java Swing. Figure 3 depicts a trivial application where all of its visual components have received a facelift via CSS.
There are two main sections in figure 3. The left section’s background is darker than the right. Labels have an italicized style, while buttons have a bold weight. All buttons share the same background color regardless of the section where they are placed. There is one button and one label with red foreground. Notice that the text on all components is centered. Are you ready to see the CSS style sheet? Listing 3 contains all that we’ve just described in CSS format.
Listing 3 Swing CSS style sheet
* { #1 color: white; font-size: 16pt; swing-halign: center; #2 } #group1 { #3 background-color: #303030; border-color: white; border-width: 3; } #group2 { #4 background-color: #C0C0C0; border-color: red; border-width: 3; } jbutton { #5 font-weight: bold; background-color: #777777; color: black; } jlabel { font-style: italic; } #6 .active { color: red; } #7 <strong>#1 General purpose styles #2 Custom css property #3 Left group style #4 Right group style #5 Style applied to all buttons #6 Style applied to all labels #7 Targeted style</strong>
As you can see, CSSBuilder lets you apply a generic style (#1) to all components. The custom swing-halign (#2) property is but one of the many Swing-specific properties you may use; this one in particular will center the text of a component. Next, we see CSS properties for the left (#3) and right (#4) groups, where background and border settings can be seen. Notice that groups use a selector that starts with a # character; its nature will be revealed soon in the View code. Next, we see button (#5) and label (#6) properties. They are defined using another type of selector; this selector matches the class name of the target component. Lastly, we see another selector (#7) that simply defines a foreground property with red as value. The View code is actually very simple, as listing 4 can attest.
Listing 4 A CSS-styled View
application(id: "mainFrame", title: 'css: 1) panel(name: "group1") { #1 gridLayout(cols: 1, rows: 4) label("Label 1.1") label("Label 1.2") button("Button 1.1") button("Button 1.2", cssClass: "active") #2 } panel(name: "group2") { #1 gridLayout(cols: 1, rows: 4) label("Label 2.1") label("Label 2.2", cssClass: "active") #2 button("Button 2.1") button("Button 2.2") } <strong>#1 Resolves to named selector #2 Resolves to class selector</strong>
There is not a lot of information revealing that this View can be styled with CSS, other than the obvious cssClass (#2) property. Hold on a second, that property is applied to a JLabel and JButton but those components know nothing about CSS. Their node factories also know nothing about CSS. How then, is the application able to apply the correct style? The answer lies in attribute delegates. CSSBuilder registers a custom attribute delegate that intercepts the cssClass attribute and applies the style. Remember, we said that groups used a special selector? Well, now you know how it can be defined (#1). As a rule, any node that has a name property defined (this is a standard Swing property, by the way) will be accessible via the # selector (like #group1 and #group2), whereas any node that defines a cssClass property will be accessible via the . selector (like .active).
There are additional features to be found on CSSBuilder, such as JQuery-like component finders using the $() method. Make sure to review the builder’s documentation () no learn more about all the properties and methods.
You must perform two additional tasks before trying this example for yourself. First, the CSS stylesheet must be saved in a file with a conventional name and location. Save the contents of listing 3 as griffon-app/resources/style.css. Don’t worry, you’ll be able to use a different name and location if needed; placing the file there with that particular name simply saves you the trouble of additional configuration. The second step is to tell the CSS system which elements need to be styled. Look carefully at listing 4 and you’ll see that the application node has an id declared with value mainFrame. We’ll use this id to instruct the CSS system that the frame and its contents need styling. Open up griffon-app/lifecycle/Stratup.groovy on your favorite editor. We’ve chosen this life cycle script because all views have been constructed by the time it is called. This means the mainFrame will be ready to be styled. Type in the following snippet into the script, save it, and run the application.
import griffon.builder.css.CSSDecorator CSSDecorator.decorate("style", app.builders.'css-test'.mainFrame)
So far, we’ve covered component suites and component styling. Let’s jump into graphics and drawings for a change.
GfxBuilder
The JDK comes with a number of drawing primitives and utility classes that are collectively known as Java2D. Every Swing component is drawn using Java2D; it makes sense then to review what you can do with Java2D. That is, if you want to go the long route. Java2D suffers from the same problems you will encounter in plain Swing code. That’s why GfxBuilder was born in the first place, exactly as SwingBuilder was for Swing.
Based on this information, you can expect GfxBuilder to provide a node for each of the Java2D drawing primitives (like Rectangle, Ellipse, and Arc). It also provides nodes for setting antialiasing (remove those ugly jaggies), rendering hints, area operations, and much more. The following is summarized list of the types of nodes that become available to you when using GfxBuilder:
- Canvas—The surface area to place your drawings.
- Standard shape nodes—rect, circle, arc, ellipse, path.
- Additional shape nodes—asterisk, arrow, cross, donut, lauburu, and more. These shapes come from the jSilhouette shape collection.
- Standard and custom strokes—Think of strokes as shape borders.
- Area operations—add, subtract, intersect, xor.
- Utility nodes—color, group, clip, image.
However, what really makes using GfxBuilder a better experience than just plain Java2D (other than the use of Groovy features) is that it comes with a scene graph baked right in. Scene graphs allow graphics to be defined in retained mode, whereas Java2D works in direct mode. Direct mode means that graphics primitives will be drawn to
the screen immediately as soon as the code that defines them is processed. Retained mode means that a scene graph is created and a node is assigned to each drawing instruction. The scene graph controls when the graphics should be rendered to the screen, also when they should be updated. This relieves you of the burden of keeping track of areas that need to be redrawn or updated—the scene graph does it for you.
Figure 4 is a computerized rendition of what many of us drew as children while at elementary school: a red-roof house sitting on a patch of green grass, with the sun shining over it and a clear blue sky.
We know—it’s a bit childish. It will surely never grace the halls of a respected art gallery but one can dream, right? The previous picture is the composition of geometric shapes, colors, and strokes. How complicated can it be? We’ll let the code speak for itself. Listing 5 shows all that there is to it.
Listing 5 Drawing a happy house with Groovy
application(title: 'gfx: [300, 300]) { group { antialias true background(color: color(r: 0.6, g: 0.9, b:0.8)) #1 rect(y: 230, w: 300, h: 70, f: color(g: 0.8), bc: color(g:0.5)){ #2 wobbleStroke() } rect(x: 75, y: 150, w: 150, h: 100, f: 'white') #3 triangle(x: 55, y: 150, w: 190, h: 50, f: 'red') #4 rect(x: 130, y: 190, w: 40, h: 60, f: 'brown') #5 circle(cx: 50, cy: 50, r: 30, f: 'yellow', bc: 'red') #6 } } } <strong>#1 Blue sky #2 Green grass #3 White house #4 Red roof #5 Brown door #6 Bright and shiny sun</strong>
That’s pretty straightforward, isn’t it? A background color (#1) turns out to be the blue sky. A patch of green grass is seen at #2, complete with some grass leaves (the wobbly stroke). The house is composed of a white wall (#3), the red roof (#4), and a brown door (#5). Lastly, the sun shining over the whole scenery is listed at #6.
Perhaps this is lost in the code’s simplicity but notice that Swing nodes and graphics node merge in a seamless way. There is no artificial bridge between them. This is precisely the kind of power that Griffon‘s CompositeBuilder puts at your finger tips.
There are other features to be found on GfxBuilder; however, we must keep things simple. Suffices to say that every gfx node is also an observable bean, almost every property triggers a PropertyChangeEvent, which means you’ll be able to use binding with them. Another powerful feature is the ability to define your own nodes via node composition, and not just by subclassing a node class. Figure 5 is a remake of an example show in the Filthy Rich Clients book (highly recommended if you want to learn the secrets for good looking and well-behaving applications). It is a sphere created from circles and gradients alone, in other words, 2D primitives giving the illusion of a 3D object.
This time, the code is partitioned in two: the View and a custom node that knows how to draw spheres. Let’s see the View first as it’s the simplest of the two (listing 6).
Listing 6 The SphereView view script
application(title:'sphere',: [250, 250]) { group { antialias true background(color: color('white')) customNode(SphereNode, cx: 125, cy: 125) #1 } } } <strong>#1 Custom node definition</strong>
As you can see, the View code is similar to the first GfxBuilder example; however, this time there is a new node (#1) used to render a sphere object. The customNode node takes either a class or an instance of CustomNode, in our case, SphereNode, whose entire definition is found in listing 7.
Listing 7 SphereNode definition
import java.awt.Color import griffon.builder.gfx.Colors import griffon.builder.gfx.GfxBuilder import griffon.builder.gfx.GfxAttribute import griffon.builder.gfx.DrawableNode import griffon.builder.gfx.CustomGfxNode class SphereNode extendsCustomGfxNode { #1 @GfxAttribute(alias="r") double radius = 90 #2 @GfxAttribute double cx = 100 @GfxAttribute double cy = 100 @GfxAttribute Color base = Colors.get("blue") @GfxAttribute Color ambient = Colors.get(red: 6, green: 76, blue: 160, alpha: 127) @GfxAttribute Color specular = Colors.get(r: 64, g: 142, b: 203, a: 255) @GfxAttribute Color shine = Colors.get("white") SphereNode() { super("sphere") } DrawableNode createNode(GfxBuilder builder) { #3 double height = radius * 2 builder.group(borderColor: 'none') { // shadow circle(cx: cx, cy: cy+radius, radius: radius, sy: 0.3, sx: 1.2) { #4 radialGradient { stop(offset: 0.0f, color: color('black')) stop(offset: 0.6f, color: color('black').derive(alpha: 0.5)) stop(offset: 0.9f, color: color('black').derive(alpha: 0)) } } // sphere circle(cx: cx, cy: cy, radius: radius) { #5 multiPaint { colorPaint(color: base) radialGradient(radius: radius) { stop(offset: 0.0f, color: ambient) stop(offset: 1.0f, color: rgba(alpha: 204)) } radialGradient(cy: cy + (height*0.9), fy: cy + (height*1.1)+20, radius: radius) { stop(offset: 0.0f, color: specular) stop(offset: 0.8f, color: specular.derive(alpha: 0)) transforms{ scale(y: 0.5) } } radialGradient(fit: false, radius: height/1.4, fx: radius/2, fy: radius/4){ stop(offset: 0.0f, color: shine.derive(alpha:0.5)) stop(offset: 0.5f, color: shine.derive(alpha:0)) } } } } } } <strong>#1 Must extend from CustomNode #2 Defining an observable property #3 Must implement with custom drawing code #4 The shadow's circle and gradient #5 The Sphere's circle and gradients</strong>
These are the code highlights. First, every custom node must extend the CustomNode class (#1). Second, creating observable properties on custom nodes is similar to creating observable properties on Model classes. The only difference is the usage of @GfxAttribute instead of @Bindable. Third, every custom node must have a drawing code that renders the node (#3); you’ll find that you can use the same nodes as if it were a regular drawing, even other custom nodes! #4 and #5 demonstrate how gradients are created. In particular, #5 shows a unique feature: multipaints. If it were not for multipaints, which are a series of paint instructions all applied to the same shape, we would have to define a circle for each gradient. This would complicate matters because some of those gradients are scaled and transformed according to the base circle. It’s easier to calculate the transformations this way.
Additional builders
There are, in fact, more builders and plugins than the ones we just explained. You’ll find a detailed list of available builders at. A quick survey of the additional builders follows.
FlamingoBuilder
The Flamingo component suite was created and is maintained by Kirill Grouchnikov, the same mastermind behind the Substance Java look-and-feel project that makes Swing applications look great. Perhaps the most interesting component found in this suite is JRibbon, a pure Java implementation of the Ribbon component found in Microsoft Office 2007. There’s also SVG support for creating icons and other goodies that complement the ribbon component.
MacWidgetsBuilder
MacWidgets is a project started by Keneth Orr, whose aim is to provide components that follow Apple’s Human Interface Guidelines. They are 100 percent Java but blend seamlessly with Apple’s look-and-feel, even when not running on Apple’s OSX! That’s true, with MacWidgets, you can create an application that looks like a native OSX application but runs on Windows or Linux. How crazy is that?
TridentBuilder
Trident is a general purpose animation library created and maintained by the powerhouse that is Kirill Grouchnikov. Trident takes off where Chet Haase’s TimingFramework left, and then adds many more things. To be honest, Trident follows TrimingFramework in spirit. It is not based on the latter’s codebase at all. Kirill has put a lot of effort into this animation library; it is very small and practical, up to the point that it is now the one used by both Substance and Flamingo to drive their animation needs. Be sure to follow Kirill’s blog and watch some of the videos2 related to Trident, Flamingo, and Substance that he has created over the years.
SwingxtrasBuilder
This is a collection of projects that do not warrant a builder of their own because their individual set of components is rather small. Here you’ll find xswingx. There’s also l2fprod commons, providing task panes, outlook bar, and a properties table. As fate put it, SwingX‘s task panes are actually based on l2fprod’s; the code was contributed from one project to the other. There’s also BalloonTip. If you ever wanted to have a friendly popup like the ones you can see appearing on your operating system’s task bar, then the components provided by BalloonTip are the way to make it happen.
AbeilleFormsBuilder
This builder is the workhorse behind the Abeille Forms plugin. You may recall that Abeille Forms Designer is an open-source alternative for designing forms and panels that rely on JGoodies FormLayout or the JDK’s GridbagLayout to place their components.
Summary
We surveyed the list of official extensions in the form of builders. There are many third-party component suites. These builders reduce the time gap you’d have to spend hunting for them; they also reduce the learning curve because they follow the same conventions as SwingBuilder.
Speak Your Mind | http://www.javabeat.net/how-to-integrate-legacy-views-with-designer-tools-in-griffon/ | CC-MAIN-2014-42 | refinedweb | 4,350 | 65.32 |
Recently I’ve been playing around with Ultimate Packer for Executables (UPX) to reduce a distributable CLI application’s size.
The application is built and stored as an asset for multiple target platforms as a GitHub Release.
I started using UPX as a build step to pack the executable release binaries and it made a big difference in final output size. Important, as the GitHub Release assets cost money to store.
UPX has some great advantages. It supports many different executable formats, multiple types of compression (and a strong compression ratio), it’s performant when compressing and decompressing, and it supports runtime decompression. You can even plugin your own compression algorithm if you like. (Probably a reason that malware authors tend to leverage UPX for packing too).
In my case I had a Node.js application that was being bundled into an executable binary file using nexe. It is possible to compress / pack the Node.js executable before nexe combines it with your Node.js code using UPX. I saw a 30% improvement in size after using UPX.
UPX Packing Example
Let’s demonstrate UPX in action with a simple example.
Create a simple C application called hello.c that will print the string “Hello there.”:
#include "stdio.h" int main() { printf("Hello there.\n"); return 0; }
Compile the application using static linking with gcc:
gcc -static -o hello hello.c
Note the static linked binary size of your new hello executable (around 876 KB):
sean@DESKTOP-BAO9C6F:~/hello$ gcc -static -o hello hello.c sean@DESKTOP-BAO9C6F:~/hello$ ls -la total 908 drwxr-xr-x 2 sean sean 4096 Oct 24 21:27 . drwxr-xr-x 26 sean sean 4096 Oct 24 21:27 .. -rwxr-xr-x 1 sean sean 896336 Oct 24 21:27 hello -rw-r--r-- 1 sean sean 23487 Oct 21 21:33 hello.c sean@DESKTOP-BAO9C6F:~/hello$
This may be a paltry example, but we’ll take a look at the compression ratio achieved. This can of course, generally be extrapolated for larger file sizes.
Analysing our Executable Before Packing
Before we pack this 876 KB executable, let’s analyse it’s entropy using binwalk. The entropy will be higher in parts where the bytes of the file are more random.
Generate an entropy graph of hello with binwalk:
binwalk --entropy --save hello
The lower points of entropy should compress fairly well when upx packs the binary file.
UPX Packing
Finally, let’s pack the hello executable with UPX. We’ll choose standard lzma compression – it should be a ‘friendlier’ compression option for anti-virus packages to more widely support.
upx --best --lzma -o hello-upx hello
Look at that, a 31.49% compression ratio! Not bad considering the code itself is really small and most of the original hello executable size is a result of static linking.
sean@DESKTOP-BAO9C6F:~/hello$ upx --best --lzma -o hello-upx hello Ultimate Packer for eXecutables Copyright (C) 1996 - 2020 UPX 3.96 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 23rd 2020 File size Ratio Format Name -------------------- ------ ----------- ----------- 871760 -> 274516 31.49% linux/amd64 hello-upx Packed 1 file. sean@DESKTOP-BAO9C6F:~/hello$
Running the packed binary still works perfectly fine. UPX cleverly re-arranges the binary file to place the compressed contents in a specific location, adds a new entrypoint and a bit of logic to decompress the data when the file is executed.
sean@DESKTOP-BAO9C6F:~/hello$ ./hello-upx Hello there.
UPX is a great option to pack / compress your files for distribution. It’s performant and supports many different executable formats, including Windows and 64-bit executables.
A great use case, as demonstrated in this post is to reduce executable size for binary distributions, especially when (for example) cloud storage costs, or download sizes are a concern. | https://www.shogan.co.uk/tag/upx/ | CC-MAIN-2021-49 | refinedweb | 634 | 57.67 |
Here are some example simple programs. Please feel free to contribute, but see notice at bottom, please.
These examples assume version 2.4 or above of Python. You should be able to run them simply by copying/pasting the code into a file and running Python. Or by inserting this line (#!/bin/env python) at the beginning of your file (Unix/Linux), making the file executable (chmod u+x filename.py) and running it (./filename.py).
1 line: Output
2 lines: Input, assignment, comments
3 lines: For loop, builtin enumerate function
4 lines: Fibonacci, tuple assignment
5 lines: Functions
6 lines: Import, regular expressions
7 lines: Dictionaries, generator expressions
8 lines: Command line arguments, exception handling
9 lines: Opening files
10 lines: Time, conditionals
11 lines: Triple-quoted strings, while loop
12 lines: Classes
1 class BankAccount(object): 2 def __init__(self, initial_balance=0): 3 self.balance = initial_balance 4 def deposit(self, amount): 5 self.balance += amount 6 def withdraw(self, amount): 7 self.balance -= amount 8 def overdrawn(self): 9 return self.balance < 0 10 my_account = BankAccount(15) 11 my_account.withdraw(5) 12 print my_account.balance
13 lines: Unit testing with unittest
1 import unittest 2 def median(pool): 3 copy = sorted(pool) 4 size = len(copy) 5 if size % 2 == 1: 6 return copy[(size - 1) / 2] 7 else: 8 return (copy[size/2 - 1] + copy[size/2]) / 2 9 class TestMedian(unittest.TestCase): 10 def testMedian(self): 11 self.failUnlessEqual(median([2, 9, 9, 7, 9, 2, 4, 5, 8]), 7) 12 if __name__ == '__main__': 13 unittest.main()
14 lines: Doctest-based testing
1 def median(pool): 2 '''Statistical median to demonstrate doctest. 3 >>> median([2, 9, 9, 7, 9, 2, 4, 5, 8]) 4 7 5 ''' 6 copy = sorted(pool) 7 size = len(copy) 8 if size % 2 == 1: 9 return copy[(size - 1) / 2] 10 else: 11 return (copy[size/2 - 1] + copy[size/2]) / 2 12 if __name__ == '__main__': 13 import doctest 14 doctest.testmod()
15 lines: itertools
1 import itertools 2 lines = ''' 3 This is the 4 first paragraph. 5 6 This is the second. 7 '''.splitlines() 8 # Use itertools.groupby and bool to return groups of 9 # consecutive lines that either have content or don't. 10 for has_chars, frags in itertools.groupby(lines, bool): 11 if has_chars: 12 print ' '.join(frags) 13 # PRINTS: 14 # This is the first paragraph. 15 # This is the second.
16 lines: csv module, tuple unpacking, cmp() built-in
1 import csv 2 3 # write stocks data as comma-separated values 4 writer = csv.writer(open('stocks.csv', 'wb')) 5 writer.writerows([ 6 ('GOOG', 'Google, Inc.', 505.24, 0.47, 0.09), 7 ('YHOO', 'Yahoo! Inc.', 27.38, 0.33, 1.22), 8 ('CNET', 'CNET Networks, Inc.', 8.62, -0.13, -1.49) 9 ]) 10 11 # read stocks data, print status messages 12 stocks = csv.reader(open('stocks.csv', 'rb')) 13 status_labels = {-1: 'down', 0: 'unchanged', 1: 'up'} 14 for ticker, name, price, change, pct in stocks: 15 status = status_labels[cmp(float(change), 0.0)] 16 print '%s is %s (%s%%)' % (name, status, pct)
18 lines: 8-Queens Problem (recursion)
1 BOARD_SIZE = 8 2 3 def under_attack(col, queens): 4 left = right = col 5 for r, c in reversed(queens): 6 left, right = left-1, right+1 7 if c in (left, col, right): 8 return True 9 return False 10 11 def solve(n): 12 if n == 0: return [[]] 13 smaller_solutions = solve(n-1) 14 return [solution+[(n,i+1)] 15 for i in range(BOARD_SIZE) 16 for solution in smaller_solutions 17 if not under_attack(i+1, solution)] 18 for answer in solve(BOARD_SIZE): print answer
20 lines: Prime numbers sieve w/fancy generators
1 import itertools 2 3 def iter_primes(): 4 # an iterator of all numbers between 2 and +infinity 5 numbers = itertools.count(2) 6 7 # generate primes forever 8 while True: 9 # get the first number from the iterator (always a prime) 10 prime = numbers.next() 11 yield prime 12 13 # this code iteratively builds up a chain of 14 # filters...slightly tricky, but ponder it a bit 15 numbers = itertools.ifilter(prime.__rmod__, numbers) 16 17 for p in iter_primes(): 18 if p > 1000: 19 break 20 print p
21 lines: XML/HTML parsing (using Python 2.5 or third-party library)
1 dinner_recipe = '''<html><body><table> 2 <tr><th>amt</th><th>unit</th><th>item</th></tr> 3 <tr><td>24</td><td>slices</td><td>baguette</td></tr> 4 <tr><td>2+</td><td>tbsp</td><td>olive oil</td></tr> 5 <tr><td>1</td><td>cup</td><td>tomatoes</td></tr> 6 <tr><td>1</td><td>jar</td><td>pesto</td></tr> 7 </table></body></html>''' 8 9 # In Python 2.5 or from 10 import xml.etree.ElementTree as etree 11 tree = etree.fromstring(dinner_recipe) 12 13 # For invalid HTML use 14 # import ElementSoup, StringIO 15 # tree = ElementSoup.parse(StringIO.StringIO(dinner_recipe)) 16 17 pantry = set(['olive oil', 'pesto']) 18 for ingredient in tree.getiterator('tr'): 19 amt, unit, item = ingredient 20 if item.tag == "td" and item.text not in pantry: 21 print "%s: %s %s" % (item.text, amt.text, unit.text)
28 lines: 8-Queens Problem (define your own exceptions)
1 BOARD_SIZE = 8 2 3 class BailOut(Exception): 4 pass 5 6 def validate(queens): 7 left = right = col = queens[-1] 8 for r in reversed(queens[:-1]): 9 left, right = left-1, right+1 10 if r in (left, col, right): 11 raise BailOut 12 13 def add_queen(queens): 14 for i in range(BOARD_SIZE): 15 test_queens = queens + [i] 16 try: 17 validate(test_queens) 18 if len(test_queens) == BOARD_SIZE: 19 return test_queens 20 else: 21 return add_queen(test_queens) 22 except BailOut: 23 pass 24 raise BailOut 25 26 queens = add_queen([]) 27 print queens 28 print "\n".join(". "*q + "Q " + ". "*(BOARD_SIZE-q-1) for q in queens)
Hi, I started this page in May 2007, and I provided the first 10+ or so examples (which may have changed since then). -- SteveHowell
All code on this page is open source, of course, with the standard Python license.
Minor cleanups are welcome, but if you want to do major restructuring of this page, please run them by the folks on the Python mailing list, or if you are impatient for a response, please just make your own copy of this page. Thanks, and I hope this code is useful for you!
Some goals for this page:
- 1) All examples should be simple. 2) There should be a gentle progression through Python concepts.
Examples for discussion
Mensanator, let's agree to disagree. I saw your example on comp.lang.python, but I gently ignored it. Your example was not vetoed, but I also did not see any strong support for
- 30 lines: generator function, list comprehension
1 def partition_generator(depth, width): # a generator (iterates comb(depth - 1, width - 1)) 2 def move_col(c): # move item left 1 bin 3 sv[c-1] += 1 4 sv[c] -= 1 5 def find_c(): # find rightmost bin with >1 items 6 i = -1 7 while i < 0: 8 if sv[i] > 1: 9 return i 10 i -= 1 11 def rollover(c): # move item and swap bins 12 move_col(c) 13 sv[-1] = sv[c] 14 sv[c] = 1 15 if depth < width: # must have at least as many bins as items 16 print 'depth', depth, 'must be greater than width', width 17 return # invalid depth, terminate generator 18 max_element = depth - width + 1 # largest amount held by a bin 19 sv = [1 for i in range(width)] # list comprehension: init all bins to 1 20 sv[-1] = max_element # start with max_element in right bin 21 yield sv # this initial condition is 1st partition 22 while sv[0] < max_element: # terminate when all moveable items in leftmost bin 23 c = find_c() # find rightmost bin that has a moveable item 24 if c < -1: # if not THE rightmost bin, rollover 25 rollover(c) 26 yield sv # and return as next partition 27 else: # otherwise, just need to move item 28 move_col(c) 29 yield sv # and return as next partition 30 for p in partition_generator(6, 4): print p
The program below is more appropriate in a tutorial on truth/falseness IMHO than as an example of a simple program. I'm not saying all the examples above are perfect, but I think this is a little too language-lawyerly for the fifth program. -- Steve
5 lines: Truth | https://wiki.python.org/moin/SimplePrograms?action=diff&rev1=69&rev2=70 | CC-MAIN-2018-26 | refinedweb | 1,415 | 59.64 |
Closed Bug 511754 Opened 12 years ago Closed 12 years ago
make ns
Zip Items point at Zip Central references to mmapped jar area(lazy jar parsing)
Categories
(Core :: Networking: JAR, defect, P3)
Tracking
()
People
(Reporter: taras.mozilla, Assigned: alfredkayser)
References
Details
(Whiteboard: [ts])
Attachments
(2 files, 1 obsolete file)
This will save some ram and allow to lazily parse various fields that are currently being parsed eagerly causing jar-opening slowness for jars with lots of files.
The biggest part of nsZipItem is the name, which is in the jar file not zero-terminated, but it needs to be zero-terminated for ns_Wildcard, but may be that can be done using a temporary copy during FindNext itself.
I'm mostly interested in this from mobile perspective and making jars with lots of files open quicker, so even without doing the filename lazily there should be a bit of a win.
Summary: make nsZipItems point at ZipCentral references to mmapped jar area → make nsZipItems point at ZipCentral references to mmapped jar area(lazy jar parsing)
Whiteboard: [ts]
Priority: -- → P3
Make nsZipItem, by getting the members from the memmapped file on demand, including the name. This saves a lot of allocations and copies. In short nsZipItem is reduced to 12 bytes compared to 30+length of name.
Assignee: nobody → alfredkayser
Status: NEW → ASSIGNED
thanks Alfred! does this need a reviewer, or is a WIP?
I am currently testing this on tryserver to be really sure of the stability of this. A new version of the patch will be there real soon.
Flags: wanted-fennec1.0?
This version is tested on tryserver, and passes the mochitests.
Attachment #406258 - Attachment is obsolete: true
Attachment #406429 - Flags: review?(tglek)
Attachment #406429 - Attachment is patch: true
Attachment #406429 - Attachment mime type: application/octet-stream → text/plain
#define XTOINT(ii) ((PRUint16) ((ii[0]) | (ii[1] << 8))) Alfred, I don't believe that there is a good reason to convert functions to macros..
(In reply to comment #8) >. I doubt inlining matters in that there is only a few hundred ziptimes, so i doubt the cost of a functioncall would be measurable. I'm inclined to trust the compiler's judgement on inlining decisions. On the other hand, why don't we just fix xtoint(this name is so misleading) and xtolong and use platform equivalents ntohl and ntohs. Seems like they are supported on all of our targets.. Also I see that this code introduces additional #defined constants, please use C++ consts instead.
Comment on attachment 406429 [details] [diff] [review] V2: Fixed issue on Unix builds with macro. These changes are pretty awesome. I love how BuidFileList went from being incomphensible in the original code to the minimal state in the current code. in nsZipItem::IsDirectory return isSynthetic ? true : ('/' == Name()[nameLength - 1]); The code does not seem to gurantee that nameLength > 0, this assumtion is also present in BuildSynthetics PRUint16 const nsZipItem::Mode() { if (isSynthetic) return 0755; return ((PRUint16)(central->external_attributes[2]) | 0x100); } nit: this seems like it should be a PRUint8, old code was silly - found = (PL_strcmp(mItem->name, mPattern) == 0); - + found = ((mItem->nameLength == strlen(mPattern)) && + (strcmp(mItem->Name(), mPattern) == 0)); I believe that's supposed to be a memcmp like elsewhere (0*37+p[0])*37+p[1] -static PRUint32 HashName(const char* aName) +static PRUint32 HashName(const char* aName, PRUint16 len) { PR_ASSERT(aName != 0); + const PRUint8* p = (const PRUint8*)aName; PRUint32 val = 0; - for (PRUint8* c = (PRUint8*)aName; *c != 0; c++) { - val = val*37 + *c; + while (len--) { + val = val*37 + *p++; } While on the subject of ugly optimization, I wonder if it'd be more efficient to do const PRUint8* endp = p + len...and then just do while(p != endp) + nsZipItem * next; + const ZipCentral * central; - nsresult FindNext(const char ** aResult); + nsresult FindNext(const char ** aResult, PRUint16 * aNameLen); nit: no spaces before * I think these changes + some demacroing i mentioned above, it's an r+ If you'd like can hold off on hton[ls] until another bug
Attachment #406429 - Flags: review?(tglek) → review+
(In reply to comment #10) > in nsZipItem::IsDirectory > return isSynthetic ? true : ('/' == Name()[nameLength - 1]); This is a use-case for || not ?:. /be
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Flags: wanted1.9.2?
This baked on the trunk for a while, so it should be very safe. It's a Ts/RAM optimization for mobile. Would to take this on 192 in interests of keeping code in sync.
Comment on attachment 406678 [details] [diff] [review] V3: Addressed comments from tglek a=me per discussion w/ beltzner et al.
Attachment #406678 - Flags: approval1.9.2? → approval1.9.2+ | https://bugzilla.mozilla.org/show_bug.cgi?id=511754 | CC-MAIN-2021-25 | refinedweb | 772 | 52.19 |
rxbus 0.0.2
FlutterRxBus #
A Flutter EventBus using RxDart
Usage #
1. Add to pubspec.yaml #
rxbus: latest version
2. Define Event #
Any Dart class or List or any Data can be used as an event.
class ChangeTitleEvent { String title; ChangeTitleEvent(this.title); }
3. Register RxBus #
RxBus
import 'package:rxbus/rx_bus.dart'; RxBus.singleton.register<ChangeTitleEvent>().listen((event) { ···//do something print(event.title); });
4. Send Event #
Register listeners for specific events:
RxBus.singleton.post(ChangeTitleEvent("Changed by event"));
License #
The MIT License (MIT)
0.0.2 #
fix event destroy bug
0.0.1 #
- TODO: Describe initial release.
rxbus_example #
Demonstrates how to use the rxbusxbus: xbus/rxbus.dart';
We analyzed this package on Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.0
- pana: 0.13.4
- Flutter: 1.12.13+hotfix.5
Health suggestions
Fix
lib/rxbus.dart. (-1.49 points)
Analysis of
lib/rxbus.dart reported 3 hints:
line 7 col 18: Close instances of
dart.core.Sink.
line 7 col 18: Name non-constant identifiers using lowerCamelCase.
line 39 col 24: This function has a return type of 'Observable
Maintenance issues and suggestions
Support latest dependencies. (-10 points)
The version constraint in
pubspec.yaml does not support the latest published versions for 1 dependency (
rxdart).. | https://pub.dev/packages/rxbus | CC-MAIN-2020-05 | refinedweb | 219 | 55.2 |
VideoCapture from socket makefile() call?
Hi,
I am streaming video over a network through sockets. I am able to view the video with mplayer so I know it arrives correctly. What I would like to do is capture that video stream over the socket with cv2.VideoCapture. I have tried as shown below but it gives a TypeError (also shown below). Is there a way to capture this video through VideoCapture or some other opencv functionality?
My Capture code:
import socket import cv2 import struct import io import numpy as np import traceback def main(): try: server_socket = socket.socket() server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server_socket.bind(('0.0.0.0', 5001)) server_socket.listen(0) connection = server_socket.accept()[0].makefile('rb') cv2.namedWindow("test-h264", cv2.WINDOW_NORMAL) video = cv2.VideoCapture(connection) while True: ret,frame = video.read() cv2.imshow("test-h264",frame) except Exception as e: traceback.print_exc() finally: connection.close() server_socket.close() if __name__ == "__main__": main()
The error message:
camera$ python testh264.py <socket._fileobject object at 0x2b07cd0> init done opengl support available Traceback (most recent call last): File "testh264.py", line 23, in main video = cv2.VideoCapture(connection) TypeError: an integer is required camera$
The video stream is from a picamera, is 1080p and is in h.264 format. The code above is on a laptop with ubuntu 12.04 installed.
Any suggestions would be appreciated.
Thanks...
Mike
VideoCapture wants either a string or an int. but someone reported, that it works with a named pipe, too (you can pass the name to it). maybe you can build an easy translator. | https://answers.opencv.org/question/42202/videocapture-from-socket-makefile-call/ | CC-MAIN-2019-47 | refinedweb | 264 | 61.53 |
TIFF and LibTiff Mailing List Archive
September 2006
Previous Thread
Next Thread
Previous by Thread
Next by Thread
Previous by Date
Next by Date
The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems
I'm attempting to build libtiff using the freely available Visual C++
2005 Express Edition.
Following the build instructions, I've done the following:
1. Modified libtiff\tiffconf.h to comment-out the entries for
JPEG_SUPPORT, PIXARLOG_SUPPORT, and ZIP_SUPPORT (because, at this
point, I don't have libjpeg or zlib built either).
2. Executed the Visual C++ command-line environment setup script.
@"C:\Program Files\Visual Studio 2005 Express Editions\VC\vcvarsall.bat" x86
3. Changed into the libtiff directory and typed the following:
nmake /f makefile.vc clean
nmake /f makefile.vc
I receive the following error:
tif_unix.c(185) : fatal error C1083: Cannot open include file:
'windows.h': No such file or directory
Looking at tif_unix.c, it contains the following code:
#ifdef __WIN32__
#include <windows.h>
...etc...
I searched the entire installation Visual C++ 2005 Express Edition
directory for windows.h, and nothing came back.
So.... my question is - has anyone successfully built libtiff using
this compiler? If so, can you describe what steps you followed?
Thanks! | http://www.asmail.be/msg0055391657.html | CC-MAIN-2013-48 | refinedweb | 211 | 59.4 |
Introduction
Upcasting and downcasting are an important part of C++. Upcasting and downcasting give a possibility to build complicated programs with a simple syntax. It can be achieved by using Polymorphism.
C++ allows that a derived class pointer (or reference) to be treated as a base class pointer. This is upcasting.
Downcasting is an opposite process, which consists of converting base class pointer (or reference) to derived class pointer.
C++ Upcasting and Downcasting should not be understood as a simple casting of different data types. It can lead to great confusion.
In this topic, we will use the following hierarchy of classes:
As you can see, Manager and Clerk are both Employee. They are both Person too. What does it mean? It means that Manager and Clerk classes inherit properties of Employee class, which inherits properties of Person class.
For example, we don’t need to specify that both Manager and Clerk are identified by First and Last name, have a salary; you can show information about them and add a bonus to their salaries. We have to specify these properties only once in the Employee class:
At the same time, the Manager and Clerk classes are different. The Manager takes a commission fee for every contract, and the Clerk has information about his Manager:
#include <iostream> using namespace std; class Person { //content of Person }; class Employee:public Person { public: Employee(string fName, string lName, double sal) { FirstName = fName; LastName = lName; salary = sal; } string FirstName; string LastName; double salary; void show() { cout << "First Name: " << FirstName << " Last Name: " << LastName << " Salary: " << salary<< endl; } void addBonus(double bonus) { salary += bonus; } }; class Manager :public Employee { public: Manager(string fName, string lName, double sal, double comm) :Employee(fName, lName, sal) { Commision = comm; } double Commision; double getComm() { return Commision; } }; class Clerk :public Employee { public: Clerk(string fName, string lName, double sal, Manager* man) :Employee(fName, lName, sal) { manager = man; } Manager* manager; Manager* getManager() { return manager; } }; void congratulate(Employee* emp) { cout << "Happy Birthday!!!" << endl; emp->addBonus(200); emp->show(); }; int main() { //pointer to base class object Employee* emp; //object of derived class Manager m1("Steve", "Kent", 3000, 0.2); Clerk c1("Kevin","Jones", 1000, &m1); //implicit upcasting emp = &m1; //It's ok cout<<emp->FirstName<<endl; cout<<emp->salary<<endl; //Fails because upcasting is used //cout<<emp->getComm(); congratulate(&c1); congratulate(&m1); cout<<"Manager of "<<c1.FirstName<<" is "<<c1.getManager()->FirstName; }
Manager and Clerk are always Employees. Moreover, Employee is a Person. Therefore, the Manager and Clerk are Persons too. You have to understand it before we start learning upcasting and downcasting.
Both upcasting and downcasting do not change the object by itself. When you use upcasting or downcasting you just “label” an object in different ways.
UPCASTING
Upcasting is a process of creating a pointer or a reference of the derived class object as a base class pointer. You do not need to upcast manually. You just need to assign derived class pointer (or reference) to base class pointer:
//pointer to base class object Employee* emp; //object of derived class Manager m1("Steve", "Kent", 3000, 0.2); //implicit upcasting emp = &m1;
When you use upcasting, the object is not changing. Nevertheless, when you upcast an object, you will be able to access only member functions and data members that are defined in the base class:
//It's ok emp->FirstName; emp->salary; //Fails because upcasting is used emp->getComm();
Example of upcasting usage
One of the biggest advantages of upcasting is the capability of writing generic functions for all the classes that are derived from the same base class. Look at an example:
void congratulate(Employee* emp) { cout << "Happy Birthday!!!" << endl; emp->show(); emp->addBonus(200); };
This function will work with all the classes that are derived from the Employee class. When you call it with objects of type Manager and Person, they will be automatically upcasted to Employee class:
//automatic upcasting congratulate(&c1); congratulate(&m1);
Try to run this program:
Happy Birthday!!!
First Name: Kevin Last Name: Jones
Happy Birthday!!!
First Name: Steve Last: Name Kent
An example of how to use upcasting with virtual functions is described in the “C++ Polymorphism” topic.
Memory layout
As you know, the derived class extends the properties of the base class. It means that derived class has properties (data members and member functions) of the base class and defines new data members and member functions.
Look on the memory layout of the Employee and Manager classes:
Of course, this model is a simplified view of memory layout for objects. However, it represents the fact that when you use a base class pointer to point up an object of the derived class, you can access only elements that are defined in the base class (green area). Elements of the derived class (yellow area) are not accessible when you use a base class pointer.
DOWNCASTING
Downcasting is an opposite process for upcasting. It converts base class pointer to derived class pointer. Downcasting must be done manually. It means that you have to specify explicit typecast.
Downcasting is not as safe as upcasting. You know that a derived class object can be always treated as a base class object. However, the opposite is not right. For example, a Manager is always a Person; But a Person is not always a Manager. It could be a Clerk too.
You have to use an explicit cast for downcasting:
//pointer to base class object Employee* emp; //object of derived class Manager m1("Steve", "Kent", 3000, 0.2); //implicit upcasting emp = &m1; //explicit downcasting from Employee to Manager Manager* m2 = (Manager*)(emp);
This code compiles and runs without any problem because emp points to an object of Manager class.
What will happen, if we try to downcast a base class pointer that is pointing to an object of the base class and not to an object of derived class? Try to compile and run this code:
Employee e1("Peter", "Green", 1400); //try to cast an employee to Manager Manager* m3 = (Manager*)(&e1); cout << m3->getComm() << endl;
e1 object is not an object of the Manager class. It does not contain any information about the commission. That’s why such an operation can produce unexpected results.
Look on the memory layout again:
When you try to downcast base class pointer (Employee) that is not actually pointing up an object of the derived class (Manager), you will get access to the memory that does not have any information about the derived class object (yellow area). This is the main danger of downcasting.
You can use a safe cast that can help you to know if one type can be converted correctly to another type. For this purpose, use a dynamic cast.
Dynamic Cast
dynamic_cast is an operator that converts safely one type to another type. In the case, the conversation is possible and safe, it returns the address of the object that is converted. Otherwise, it returns nullptr.
dynamic_cast has the following syntax
dynamic_cast<new_type> (object)
If you want to use a dynamic cast for downcasting, the base class should be polymorphic – it must have at least one virtual function. Modify base class Person by adding a virtual function:
virtual void foo() {}
Now you can use downcasting for converting Employee class pointers to derived classes pointers.
Employee e1("Peter", "Green", 1400); Manager* m3 = dynamic_cast<Manager*>(&e1); if (m3) cout << m3->getComm() << endl; else cout << "Can't cast from Employee to Manager" << endl;
In this case, the dynamic cast returns nullptr. Therefore, you will see a warning message.
In this article, we have read about C++ Upcasting and Downcasting. In next articles, we will cover more topics on C++. | https://www.tutorialcup.com/cplusplus/upcasting-downcasting.htm | CC-MAIN-2021-39 | refinedweb | 1,271 | 53.1 |
.
In this article you’ll learn how to forge your very own Redux application, not limited to but including:
- Wholegrain server-side rendering
- Extensible routing rich in Omega-3
- Buttery asynchronous data loading
- A Smooth functional after-taste
If that sounds like something you want in your life, read on, if not, don’t bother.
I will say this: it didn’t turn out to be a super small tutorial, so strap yourself in and get ready for a bumpy ride, keep your hands and feet in the vehicle at all times etc etc.
UPDATE (16/09/15): Sorry to people who have had trouble with the router (missing Location and History objects, inconsistent API use) over the past few weeks. I have updated the article (and repo) to reflect react-router@1.0.0-rc3, and since it’s an RC the API surface should be stable with 1.0.0 now. If you spot any inconsistencies I am likely referencing old code, please leave a comment!
Wait, hold up, what’s a Redux?
Oh, I’m glad you asked!
Redux is new Flux framework by Dan Abramov, which removes a lot of unnecessary complication. You can read about why the framework was built here, but the TL; DR is that Redux holds your application state in one place, and defines a minimal but sufficiently powerful way of interacting with that state.
If you’re familiar with traditional Flux frameworks, then the largest difference you’ll notice is the absence of Stores, and presence of ‘Reducers’. In Redux, all the state lives in one place (the ‘Redux’ instance), instead of being split into Separate stores (which can get a little yucky with isomorphism). A ‘Reducer’ is just a description of how that state should change, it doesn’t mutate anything at all, and looks something like this:
function exampleReducer(state, action) {
return state.changedBasedOn(action)
}
As we’ll see more later.
You should probably think of Redux less as a framework and more as a suggestion. It is a very minimal base, which takes all the best ideas of Flux. This article will hopefully teach you how to use it successfully, go forth and prosper with minimal mutation.
Making yourself comfortable
We’re going to use Webpack and Babel to string together our application, because we’re cool, hip and happening, and because they give you hot reloading and hot ES6/7 features, respectively.
Firstly we should create a new directory and lay down a few sick files.
Here’s a package.json I made earlier:
And a webpack.config.js:
And a .babelrc (for added ‘ES7’ syntactic sugar):
{
"optional": ["es7.decorators", "es7.classProperties", "es7.objectRestSpread"]
}
There honestly isn’t much of interest in these files, they are just to set up a sensible dev environment. We’ll need to run npm i to pull in the dependencies and we should be good to go.
Serve me Seymour
The basic structure of this app will look as follows:
client/
shared/
index.js
server.jsx
The vast majority of the code will be in the ‘shared’ directory, but some glue code is needed to separate the client and server cleanly and with future extensibility in mind.
index.js is just a file to bootstrap server.jsx, so we can use ES6/JSX ASAP. We can use something like:
'use strict';
require('babel/register')({});
var server = require('./server');
const PORT = process.env.PORT || 3000;
server.listen(PORT, function () {
console.log('Server listening on', PORT);
});
The server here will be an Express application, because it’s easy, and chances are you know it well. This in server.jsx should do the trick for now:
import express from 'express';
const app = express();
app.use((req, res) => {
const HTML = `
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Isomorphic Redux Demo</title>
</head>
<body>
<div id="react-view"></div>
<script type="application/javascript" src="/bundle.js"></script>
</body>
</html>
`;
res.end(HTML);
});
export default app;
Pretty standard stuff. We set up an Express server with a global middleware, but don’t actually serve much yet, just a blank web page to help us stare into the void of existence. Let’s fix that.
Routing like a pro
You might think it’d be easy to Express’ routing and templating. Unfortunately you’d be wrong, since we want to share as much code between the server and the client for the future’s sake. We’re going to use React Router in this article, since it makes server-side and client-side rendering a cinch.
We’ll have a root component at shared/components/index.jsx, which React Router can inject everything else into. This way we can easily add global app aesthetics (think headers and footers, for instance), nice architecture for a shiny SPA.
import React from 'react';
export default class AppView extends React.Component {
render() {
return (
<div id="app-view">
<h1>Todos</h1>
<hr />
{this.props.children}
</div>
);
}
}
The children prop here will be the component tree that the router gives us after it’s dependency magics. Here we don’t do anything special, just render them as-is.
Note that we are using the 1.0.0 beta of React Router (as defined in the package.json above). The older version has a different API, which is the one you will see by default when visiting their site. A stable version will be released soon, but until then bear this in mind.
Next we should define a route at shared/routes.jsx:
import React from 'react';
import { Route } from 'react-router';
import App from 'components';
export default (
<Route name="app" component={App}
</Route>
);
Here we just tell React Router to render our components/index at /. Sounds good to me! Despite all our hard work both the server and the client are still oblivious to all of this though, so we should tell them next by updating our server, which can now look as below.
server.jsx:
import express from 'express';
import React from 'react';
import { renderToString } from 'react-dom/server'
import { RoutingContext, match } from 'react-router';
import createLocation from 'history/lib/createLocation';
import routes from 'routes';
const app = express();
app.use((req, res) => {
const location = createLocation(req.url);
match({ routes, location }, (err, redirectLocation, renderProps) => {
if (err) {
console.error(err);
return res.status(500).end('Internal server error');
}
if (!renderProps) return res.status(404).end('Not found.');
const InitialComponent = (
<RoutingContext {...renderProps} />
);
const componentHTML = renderToString(InitialComponent);
const HTML = `
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Isomorphic Redux Demo</title>
</head>
<body>
<div id="react-view">${componentHTML}</div>
<script type="application/javascript" src="/bundle.js"></script>
</body>
</html>
`
res.end(HTML);
});
});
export default app;
Here we import some new toys and tell the router to route the request express hands over. Hopefully we get back a renderProps variable and can render the route we were asked for. Then we can use React’s nifty renderToString to render the component out to HTML and pass it to the client in the react-view div we wrote earlier in:
<div id="react-view">${componentHTML}</div>
If we run npm start we should see the route being injected into the HTML at:
If you see a errors in the console about bundle.js not being found, Don’t Panic. This is because the client is trying to load bundle.js, but we haven’t configured Webpack’s entry point yet, so we get nothing.
It looks amazing, and I’ll bet your mind is already blown, but right now we just have a static page. In order to get that juicy React goodness all the cool kids are on about we’ll need to implement the router on the client too.
So go ahead and open client/index.jsx to write something like:
import React from 'react';
import { render } from 'react-dom';
import { Router } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import routes from 'routes';
const history = createBrowserHistory();
render(
<Router children={routes} history={history} />,
document.getElementById('react-view')
);
We tell React to inject the Router component into the react-view div, and give the Router some relevant props. The history object that we don’t see on the server is a necessary part of React Router’s configuration (when rendering it directly), and describes how URLs will look. We want nice, clean ones, so we use the HTML5 history API from createBrowserHistory, though for legacy browsers we could use createHashHistory and get /#/ style URLs.
Now we can start our app with npm run dev (instead of npm start) and Webpack will serve our client a bundle.js, so it can do it’s own routing from here-on-out. It still won’t look very interesting, but visiting should work without errors. Routing’s all set, and we’re ready for some Redux action.
Reduce, Reuse, Redux
A Redux set up looks very much like a Flux one except, as I mentioned earlier, reducers in place of stores. First we’ll write some simple actions to modify the Todo List:
shared/actions/TodoActions.js:
export function createTodo(text) {
return {
type: 'CREATE_TODO',
text,
date: Date.now()
}
}
export function editTodo(id, text) {
return {
type: 'EDIT_TODO',
id,
text,
date: Date.now()
};
}
export function deleteTodo(id) {
return {
type: 'DELETE_TODO',
id
};
}
As you can see, in Redux action creators are just functions that return consistently formatted objects. No magic here, we just need a reducer to handle them.
shared/reducers/TodoReducer.js:
import Immutable from 'immutable';
const defaultState = new Immutable.List();
export default function todoReducer(state = defaultState, action) {
switch(action.type) {
case 'CREATE_TODO':
return state.concat(action.text);
case 'EDIT_TODO':
return state.set(action.id, action.text);
case 'DELETE_TODO':
return state.delete(action.id);
default:
return state;
}
}
Again you’ll notice it’s extremely simple. Here we use an Immutable List object to store our state (though a more complex app would probably have a more elaborate structure), and return a newly transformed version depending on the action.
As you’ve probably gathered Redux isn’t very opinionated, and only has two expectations of its redeucers:
- The reducer has the signature (state, action) => newState.
- The reducer does not mutate the state it is given, but returns a new one
The latter makes it fit snugly with Immuatable.js, as we can see.
Here we use a switch statement catch actions for the sake of simplicity, but if you don’t like it feel free to write some simple reducer boilerplate to gain some abstraction.
So that Redux can pick up multiple reducers in the future, you’ll want also to have a reducers/index.js:
export { default as todos } from './TodoReducer';
Since we only have one reducer in this app, this isn’t that useful, but it’s a nice structure to have.
Annnnd… Action
All this talk of action and reduction is great, but our app still doesn’t know a thing about it! Time to change that.
We need to pass a Redux store instance through the component tree, so we can start dispatching some actions and tie the whole shebang together! The NPM package react-redux provides some useful addons for this, so that’s what we’ll use here.
server.jsx:
...
import { createStore, combineReducers } from 'redux';
import { Provider } from 'react-redux';
import * as reducers from 'reducers';
app.use((req, res) => {
const location = createLocation(req.url);
const reducer = combineReducers(reducers);
const store = createStore(reducer);
match({ routes, location }, (err, redirectLocation, renderProps) => {
if (err) {
console.error(err);
return res.status(500).end('Internal server error');
}
if (!renderProps) return res.status(404).end('Not found.');
const InitialComponent = (
<Provider store={store}>
<RoutingContext {...renderProps} />
</Provider>
);
...
We create a new instance of a Redux store on every request, and inject that bad boy through the component tree (available as <component>.context.redux, if you ever want to access it directly) by wrapping the root component in Provider. We’ll also want to pass an initial state to the client, so it can hydrate it’s stores.
Just grab the state from Redux:
...
</Provider>
);
const initialState = store.getState();
...
Then alter the HTML template to send it off to the client:
<title>Redux Demo</title>
<script type="application/javascript">
window.__INITIAL_STATE__ = ${JSON.stringify(initialState)};
</script>
After this is added, we will have access to our state on the client under window.__INITIAL_STATE__. Pretty neat, huh. All we need to do is transform it back into Immutable.js collections, and pass it to Redux when we instantiate the new store:
client/index.jsx:
...
import { createStore, combineReducers } from 'redux';
import { Provider } from 'react-redux';
import * as reducers from 'reducers';
import { fromJS } from 'immutable';
const history = createBrowserHistory();
let initialState = window.__INITIAL_STATE__;
// Transform into Immutable.js collections,
// but leave top level keys untouched for Redux
Object
.keys(initialState)
.forEach(key => {
initialState[key] = fromJS(initialState[key]);
});
const reducer = combineReducers(reducers);
const store = createStore(reducer, initialState);
render(
<Provider store={store}>
<Router children={routes} history={history} />
</Provider>,
document.getElementById('react-view')
);
This is identical to the server Redux initialization, except that we hydrate the store with the state passed from the server.
We’re actually nearing the finished app now, all we need is a couple of components to connect the dots.
Connecting the Dots
We’re going to use three components to display this information, which might seem a little like overkill (and it might be), but it demonstrates Redux’s distinction between ‘smart’ and ‘dumb’ components, which is important in larger applications.
Smart components are ones which subscribe to Redux’s store instance somehow (here using the @connector decorator syntax), and they can pass it down to their children. They can be at any point in the component tree, but you’ll find when developing more complex apps that they tend to bubble up to shallower layers naturally, as it makes sense for higher order components to hold application state and pass it on.
We’ll only use one here, at shared/components/Home.jsx:
import React from 'react';
import TodosView from 'components/TodosView';
import TodosForm from 'components/TodosForm';
import { bindActionCreators } from 'redux';
import * as TodoActions from 'actions/TodoActions';
import { connect } from 'react-redux';
@connect(state => ({ todos: state.todos }))
export default class Home extends React.Component {
render() {
const { todos, dispatch } = this.props;
return (
<div id="todo-list">
<TodosView todos={todos}
{...bindActionCreators(TodoActions, dispatch)} />
<TodosForm
{...bindActionCreators(TodoActions, dispatch)} />
</div>
);
}
}
We’ll write the two dumb components next, but let’s take a look at what happens here first.
If you’re not familiar with decorators (the @connector section here), then it’s easiest to think of them as a replacement for what you would used to use a ‘mixin’ for. You may have actually seen them in other languages, like Python, for instance.
If not, in Javascript they are just functions that modify another given function (here a ‘class’) in some way. Notice how when defined like this (‘class leading’) they are attached to the following class definition, hence the lack of ;.
Redux’s @connect decorator wraps our class in another component ( <Connector>), giving it access to the requested parts of state as props, hence why we can use todos as we do. It also passes in Redux’s dispatch function which can be used to dispatch actions like so:
dispatch(actionCreator());
Finally we use redux’s bindActionCreators method to pass in… ermm… bound action creators. What this means is that, in the child components, we can just call the action creators directly, without wrapping them in a dispatch() call as above.
See exhibit A, components/TodosView.jsx:
import React from 'react';
export default class TodosView extends React.Component {
handleDelete = (e) => {
const id = Number(e.target.dataset.id);
// Equivalent to `dispatch(deleteTodo())`
this.props.deleteTodo(id);
}
handleEdit = (e) => {
const id = Number(e.target.dataset.id);
const val = this.props.todos.get(id).text
// For cutting edge UX
let newVal = window.prompt('', val);
this.props.editTodo(id, newVal);
}
render() {
return (
<div id="todo-list">
{
this.props.todos.map( (todo, index) => {
return (
<div key={index}>
<span>{todo}</span>
<button data-id={index} onClick={this.handleDelete}>
X
</button>
<button data-id={index} onClick={this.handleEdit}>
Edit
</button>
</div>
);
})
}
</div>
);
}
}
Here we display each todo item in the store alongside edit and delete buttons, which are mapped to our pre-bound action creators.
Also note that we use arrow functions in the class definition, so that this will be bound to the class’ constructor (since arrow functions inherit the scope’s this). If we use ordinary ES6 class functions (like render), then we would need to bind them manually in the constructor, which is wearisome.
Note that you can also still use React.createClass, avoid this problem, and get mixins, though I still prefer to use straight ES6 classes for cleanliness and consistency.
Finally we want to define components/TodosForm.jsx:
import React from 'react';
export default class TodosForm extends React.Component {
handleSubmit = () => {
let node = this.refs['todo-input'];
this.props.createTodo(node.value);
node.value = '';
}
render() {
return (
<div id="todo-form">
<input type="text" placeholder="type todo" ref="todo-input" />
<input type="submit" value="OK!" onClick={this.handleSubmit} />
</div>
);
}
}
This is also a ‘dumb’ component, and just lets the user add a todo to the store.
Now all we need is to define the route in our shared/routes.jsx file:
...
import Home from 'components/Home';
export default (
<Route name="app" component={App}
<Route component={Home}
</Route>
);
Et voilà! You should be able to visit to see a functioning app!
The final frontier: asynchronous actions
I know what you’re thinking.
It can’t be done.
But I promise you, it can.
Another great feature of Redux is the ability to specify dispatcher middleware, which allow you transform actions (asynchronously). As I’m sure you have noticed is a theme with Redux, they’re just functions with a restricted set of signatures.
We’re going to use some custom Redux middleware to help us keep our actions simple (and our action creators synchronous), whilst also giving us the` ability to use shiny and delicious ES6 promises.
shared/lib/promiseMiddleware.js (modified from here):
export default function promiseMiddleware() {
return next => action => {
const { promise, type, ...rest } = action;
if (!promise) return next(action);
const SUCCESS = type;
const REQUEST = type + '_REQUEST';
const FAILURE = type + '_FAILURE';
next({ ...rest, type: REQUEST });
return promise
.then(res => {
next({ ...rest, res, type: SUCCESS });
return true;
})
.catch(error => {
next({ ...rest, error, type: FAILURE });
// Another benefit is being able to log all failures here
console.log(error);
return false;
});
};
}
This means that we can just define a promise key on our actions and have them automatically resolved and rejected. We can also optionally listen in the reducers for auto-generated <TYPE>_REQUEST and <TYPE>_FAILURE if we care about mutating state along the way.
All we need to do to use it is change a couple of lines in client/index.jsx and server.jsx like so:
...
import { applyMiddleware } from 'redux';
import promiseMiddleware from 'lib/promiseMiddleware';
...
const store = applyMiddleware(promiseMiddleware)(createStore)(reducer);
Making sure to pass in the initialState alongside reducer on the client.
And now we can write a magical new createTodo action creator, for instance:
import request from 'axios';
const BACKEND_URL = '';
export function createTodo(text) {
return {
type: 'CREATE_TODO',
promise: request.post(BACKEND_URL, { text })
}
}
After a little change to the reducer:
return state.concat(action.res.data.text);
Todos will now save to my external database (though after 50 it nukes them all… So maybe don’t use it full-time). If we want to load them on application startup we can just add a getTodos action creator:
export function getTodos() {
return {
type: 'GET_TODOS',
promise: request.get(BACKEND_URL)
}
}
Catch it in the reducer:
case 'GET_TODOS':
return state.concat(action.res.data);
And we can call it when the TodosView component mounts:
componentDidMount() {
this.props.getTodos();
}
Since the middleware also fires action for the initial request and possible failure, you can see how we could also catch those in the reducers and update the app state accordingly, for loading or error states respectively.
Wait… Didn’t we break state rehydration?
Yes. Let’s fix it.
The problem is that we added async actions, but don’t wait for them to complete on the server before sending out state to the client. You might think this doesn’t matter much, since we can just display a loading screen on the client. Better than hanging on the server right?
Well, it depends. In fact, one major benefit of server-side rendering is that we can guarantee that we have a good connection to our backend (they could easily be in the same datacenter!). If a user tries to load your site on a dodgy mobile connection, for instance, it’s far better that they wait for your server to bundle the initial data and send it to them than wait on a bunch of different resources themselves.
Solving this problem with the current set up isn’t especially hard. You could do it a few ways, but the way I’ve been doing it so far is as follows:
We define what data the given component needs as an array of action creators to be fired. We can use a static on the class with something like:
static needs = [
TodoActions.getTodos
]
Then have a function which promises to gather all the data and dispatch it (shared/lib/fetchComponentData.js):
export default function fetchComponentData(dispatch, components, params) {
const needs = components.reduce( (prev, current) => {
return (current.needs || [])
.concat((current.WrappedComponent ? current.WrappedComponent.needs : []) || [])
.concat(prev);
}, []);
const promises = needs.map(need => dispatch(need(params)));
return Promise.all(promises);
}
Note that we also need to check a WrappedComponent key, since aforementioned ‘smart’ components will be wrapped in a Connector component.
Now we configure the server to only reply once it has the necessary data:
...
import fetchComponentData from 'lib/fetchComponentData';
match({ routes, location }, (err, redirectLocation, renderProps) => {
if (err) {
console.error(err);
return res.status(500).end('Internal server error.');
}
if (!renderProps) return res.status(404).end('Not found.');
function renderView() {
// ... Rest of the old code goes here still
return HTML;
}
fetchComponentData(store.dispatch, renderProps.components, renderProps.params)
.then(renderView)
.then(html => res.end(html))
.catch(err => res.end(err.message));
});
Make sure to remove the action creator from componentDidMount to avoid duplicating the call, and you will need to re-run npm run dev to pickup changes in the server code.
What have we learned?
It’s a wonderful world.
There is of course always more that can be done. In an application with more routes, for example, you’ll want to use React Router’s onEnter handler to load a component’s needs (there’s an example here), and hook up other actions to an async API.
In spite of all this I hope you’ve enjoyed yourself on your epic quest to a more functional future. If you have any problems or suggestions for the article, make sure to give me a buzz either here or on Twitter.
You can also check out the finished version of what’s here on Github, as well as a version with more up to date dependencies here, and find out more about Redux here. | https://medium.com/front-end-developers/handcrafting-an-isomorphic-redux-application-with-love-40ada4468af4 | CC-MAIN-2017-17 | refinedweb | 3,842 | 56.66 |
Welcome, Guest! Log in | Create account
Another mistake :
(WRONG ) daily_instances func of camera module returns wrong value
(RIGHT) daily_instances func of CALENDAR module returns wrong value
for the bug title !
BR
Cyke64.
02:06PM UTC on Sep 23 2008 in PyS60
Hello ,
On S60 you can use Pdf+ (3rd party software) NOT FREE !
With this one it works perfectly !
BR
Cyke64.
02:00PM UTC on Sep 23 2008 in PyS60
Thanks for this info
Now I know why infopopup doesn't work !
BR
Cyke64.
01:55PM UTC on Sep 23 2008 in PyS60
Hello Carles ,
You can use envy module (not integrated in standard PyS60) for testing capabilities !
You can info about its use HERE
BR
Cyke64 (Author of this free module !)
01:52PM UTC on Sep 23 2008 in PyS60
Sorry Atrant but this is not a patch only a binary 2nd DLL !
Where is the source of this or diff ?.
11:27AM UTC on Dec 24 2007 in PyS60
I have added the same example in an attachment.
File Added: test_infopopup2.py.
11:03AM UTC on Nov 23 2007 in PyS60
Hello ,
I have a strange bug(!)
I have tested this code on N93 , N95 and E61 with PyS60 1.4.1
Steps to reproduce bug:
Choose bug in the menu
Now switch to numeric mode with long press of #
press any key between 0 and 9 , it display brievy 57 9 !!!
Correct behaviour is 'ascii code' followed by key by selecting OK in the menu
The only difference between these two method is the loop...
10:49AM UTC on Nov 22 2007 in PyS60
I try same code on N93 with 1.4.1
Traceback (most recent call last):
File "", line 1, in ?
File "c:\resource\site.py", line 97, in platsec_import
return _original_import(name, globals, locals, fromlist)
File "c:\resource\sensor.py", line 20, in ?
import _sensor
File "c:\resource\site.py", line 112, in platsec_import
raise ImportError("No module named "+name)
10:33AM UTC on Nov 22 2007 in PyS60
10:29AM UTC on Nov 22 2007 in PyS60
Copyright © 2009 SourceForge, Inc. All rights reserved. Terms of Use | http://sourceforge.net/users/cyke64/ | crawl-002 | refinedweb | 354 | 81.73 |
The functionality in this module provides something of a work-alike for numpy arrays, but with all operations executed on the CL compute device.
PyOpenCL provides some amount of integration between the numpy type system, as represented by numpy.dtype, and the types available in OpenCL. All the simple scalar types map straightforwardly to their CL counterparts.
All of OpenCL’s supported vector types, such as float3 and long4 are available as numpy data types within this class. These numpy.dtype instances have field names of x, y, z, and w just like their OpenCL counterparts. They will work both for parameter passing to kernels as well as for passing data back and forth between kernels and Python code. For each type, a make_type function is also provided (e.g. make_float3(x,y,z)).
If you want to construct a pre-initialized vector type you have three new functions to choose from:
New in version 2014.1.
Changed in version 2014.1: The make_type functions have a default value (0) for each component. Relying on the default values has been deprecated. Either specify all components or use one of th new flavors mentioned above for constructing a vector.
If you would like to use your own (struct/union/whatever) data types in array operations where you supply operation source code, define those types in the preamble passed to pyopencl.elementwise.ElementwiseKernel, pyopencl.reduction.ReductionKernel (or similar), and let PyOpenCL know about them using this function:
Get or register a numpy.dtype associated with the C type names in the string list c_names. If dtype is None, no registration is performed, and the numpy.dtype must already have been registered. If so, it is returned. If not, TypeNameNotKnown is raised.
If dtype is not None, registration is attempted. If the c_names are already known and registered to identical numpy.dtype objects, then the previously dtype object of the previously registered type is returned. If the c_names are not yet known, the type is registered. If one of the c_names is known but registered to a different type, an error is raised. In this latter case, the type may end up partially registered and any further behavior is undefined.
New in version 2012.2.
New in version 2013.1.
Changed in version 2013.1: This function has been deprecated. It is recommended that you develop against the new interface, get_or_register_dtype().
Returns a C name registered for dtype.
This function helps with producing C/OpenCL declarations for structured numpy.dtype instances:
Return a tuple (dtype, c_decl) such that the C struct declaration in c_decl and the structure numpy.dtype instance dtype have the same memory layout.
Note that dtype may be modified from the value that was passed in, for example to insert padding.
(As a remark on implementation, this routine runs a small kernel on the given device to ensure that numpy and C offsets and sizes match.)
This example explains the use of this function:
>>> import numpy as np >>> import pyopencl as cl >>> import pyopencl.tools >>> ctx = cl.create_some_context() >>> dtype = np.dtype([("id", np.uint32), ("value", np.float32)]) >>> dtype, c_decl = pyopencl.tools.match_dtype_to_c_struct( ... ctx.devices[0], 'id_val', dtype) >>> print c_decl typedef struct { unsigned id; float value; } id_val; >>> print dtype [('id', '<u4'), ('value', '<f4')] >>> cl.tools.get_or_register_dtype('id_val', dtype)
As this example shows, it is important to call get_or_register_dtype() on the modified dtype returned by this function, not the original one.
A more complete example of how to use custom structured types can be found in examples/demo-struct-reduce.py in the PyOpenCL distribution.
PyOpenCL’s Array type supports complex numbers out of the box, by simply using the corresponding numpy types.
If you would like to use this support in your own kernels, here’s how to proceed: Since OpenCL 1.2 (and earlier) do not specify native complex number support, PyOpenCL works around that deficiency. By saying:
#include <pyopencl-complex.h>
in your kernel, you get complex types cfloat_t and cdouble_t, along with functions defined on them such as cfloat_mul(a, b) or cdouble_log(z). Elementwise kernels automatically include the header if your kernel has complex input or output. See the source file for a precise list of what’s available.
If you need double precision support, please:
#define PYOPENCL_DEFINE_CDOUBLE
before including the header, as DP support apparently cannot be reliably autodetected.
Under the hood, the complex types are simply float2 and double2.
Warning
Note that, at the OpenCL source code level, addition (real + complex) and multiplication (complex*complex) are defined for e.g. float2, but yield wrong results, so that you need to use the corresponding functions. (The Array type implements complex arithmetic as you remember it, without any idiotic quirks like this.)
New in version 2012.1.
A numpy.ndarray work-alike that stores its data and performs its computations on the compute device. shape and dtype work exactly as in numpy. Arithmetic methods in Array support the broadcasting of scalars. (e.g. array+5)
cqa must be a pyopencl.CommandQueue or a pyopencl.Context.
If it is a queue, cqa specifies the queue in which the array carries out its computations by default. If a default queue (and thereby overloaded operators and many other niceties) are not desired, pass a Context.
cqa will at some point be renamed cq, so it should be considered ‘positional-only’. Arguments starting from ‘order’ should be considered keyword-only.
allocator may be None or a callable that, upon being called with an argument of the number of bytes to be allocated, returns an pyopencl.Buffer object. (A pyopencl.tools.MemoryPool instance is one useful example of an object to pass here.)
Changed in version 2011.1: Renamed context to cqa, made it general-purpose.
All arguments beyond order should be considered keyword-only.
The pyopencl.MemoryObject instance created for the memory that backs this Array.
Changed in version 2013.1: If a non-zero offset has been specified for this array, this will fail with ArrayHasOffsetError.
The pyopencl.MemoryObject instance created for the memory that backs this Array. Unlike data, the base address of base_data is allowed to be different from the beginning of the array. The actual beginning is the base address of base_data plus offset in units of dtype.
Unlike data, retrieving base_data always succeeds.
New in version 2013.1.
New in version 2013.1.
The tuple of lengths of each dimension in the array.
The numpy.dtype of the items in the GPU array.
The number of meaningful entries in the array. Can also be computed by multiplying up the numbers in shape.
The size of the entire array in bytes. Computed as size times dtype.itemsize.
Tuple of bytes to step in each dimension when traversing an array.
Return an object with attributes c_contiguous, f_contiguous and forc, which may be used to query contiguity properties in analogy to numpy.ndarray.flags.
Methods
Return a copy of self with the default queue set to queue.
None is allowed as a value for queue.
New in version 2013.1.
Returns the size of the leading dimension of self.
Returns an array containing the same data with a new shape.
Returns flattened array containing the same data.
Returns view of array with the same data. If dtype is different from current dtype, the actual bytes of memory will be reinterpreted.
Transfer the contents the numpy.ndarray object ary onto the device.
ary must have the same dtype and size (not necessarily shape) as self.
Transfer the contents of self into ary or a newly allocated numpy.ndarray. If ary is given, it must have the right size (not necessarily shape) and dtype.
New in version 2013.1.
Return selffac * self + otherfac*other.
Add an array with an array or an array with a scalar.
Substract an array from an array or a scalar from an array.
Divides an array by an array or a scalar, i.e. self / other.
Divides an array by a scalar or an array, i.e. other / self.
Exponentiation by a scalar or elementwise by another Array.
Return a Array of the absolute values of the elements of self.
Fill the array with scalar.
Return a copy of self, cast to dtype.
New in version 2012.1.
New in version 2012.1.
New in version 2012.1.
New in version 2013.1.
Set the slice of self identified subscript to value.
value is allowed to be:
Non-scalar broadcasting is not currently supported.
New in version 2013.1.
Like __setitem__(), but with the ability to specify a queue and wait_for.
New in version 2013.1.
Changed in version 2013.2: Added wait_for.
If is_blocking, return a numpy.ndarray corresponding to the same memory as self.
If is_blocking is not true, return a tuple (ary, evt), where ary is the above-mentioned array.
The host array is obtained using pyopencl.enqueue_map_buffer(). See there for further details.
New in version 2013.2.
Comparisons, conditionals, any, all
New in version 2013.2.
Boolean arrays are stored as numpy.int8 because bool has an unspecified size in the OpenCL spec.
Only works for device scalars. (i.e. “arrays” with shape == ().)
Event management
If an array is used from within an out-of-order queue, it needs to take care of its own operation ordering. The facilities in this section make this possible.
New in version 2014.1.1.
A list of pyopencl.Event instances that the current content of this array depends on. User code may read, but should never modify this list directly. To update this list, instead use the following methods.
Add evt to events. If events is too long, this method may implicitly wait for a subset of events and clear them from the list.
Wait for the entire contents of events, clear it.
New in version 2013.1.
Return a Array that is an exact copy of the numpy.ndarray instance ary.
See Array for the meaning of allocator.
Changed in version 2011.1: context argument was deprecated.
A synonym for the Array constructor.
Same as empty(), but the Array is zero-initialized before being returned.
Changed in version 2011.1: context argument was deprecated.
Make a new, uninitialized Array having the same properties as other_ary.
Make a new, zero-initialized Array having the same properties as other_ary.
Create a Array filled with numbers spaced step apart, starting from start and ending at stop.
For floating point arguments, the length of the result is ceil((stop - start)/step). This rule may result in the last element of the result being greater than stop.
dtype, if not specified, is taken as the largest common type of start, stop and step.
Changed in version 2011.1: context argument was deprecated.
Changed in version 2011.2: allocator keyword argument was added.
Return the Array [a[indices[0]], ..., a[indices[n]]]. For the moment, a must be a type that can be bound to a texture.
New in version 2013.1.
Return an array like then_, which, for the element at index i, contains then_[i] if criterion[i]>0, else else_[i].
Return the elementwise maximum of a and b.
Return the elementwise minimum of a and b.
New in version 2011.1.
New in version 2011.1.
Like numpy.vdot().
New in version 2013.1.
New in version 2011.1.
New in version 2011.1.
New in version 2011.1.
New in version 2011.1.
New in version 2011.1.
See also Sums and counts (“reduce”).
The pyopencl.clmath module contains exposes array versions of the C functions available in the OpenCL standard. (See table 6.8 in the spec.)
New in version 2013.1.
New in version 2013.1.
Return the floating point remainder of the division arg/mod, for each element in arg and mod.
Return a tuple (significands, exponents) such that arg == significand * 2**exponent.
Return a new array of floating point values composed from the entries of significand and exponent, paired together as result = significand * 2**exponent.
Return a tuple (fracpart, intpart) of arrays containing the integer and fractional parts of arg.
PyOpenCL now includes and uses the RANLUXCL random number generator by Ivar Ursin Nikolaisen. In addition to being usable through the convenience functions above, it is available in any piece of code compiled through PyOpenCL by:
#include <pyopencl-ranluxcl.cl>
See the source for some documentation if you’re planning on using RANLUXCL directly.
The RANLUX generator is described in the following two articles. If you use the generator for scientific purposes, please consider citing them:
New in version 2011.2.
A pyopencl.array.Array containing the state of the generator.
nskip is an integer which can (optionally) be defined in the kernel code as RANLUXCL_NSKIP. If this is done the generator will be faster for luxury setting 0 and 1, or when the p-value is manually set to a multiple of 24.
Changed in version 2013.1: Added default value for num_work_items.
Fill ary with uniformly distributed random numbers in the interval (a, b), endpoints excluded.
Changed in version 2014.1.1: Added return value.
Make a new empty array, apply fill_uniform() to it.
Fill ary with normally distributed numbers with mean mu and standard deviation sigma.
Changed in version 2014.1.1: Added return value.
Make a new empty array, apply fill_normal() to it.
The generator gets inefficient when different work items invoke the generator a differing number of times. This function ensures efficiency.
Return an array of shape filled with random values of dtype in the range [a,b).
Fill result with random values of dtype in the range [0,1). | http://documen.tician.de/pyopencl/array.html | CC-MAIN-2015-11 | refinedweb | 2,264 | 61.33 |
PHP Annotated – June 2020
Greetings everyone,
Please welcome the June edition of PHP Annotated!
PHP internals have been very active and here are 3 accepted and 6 new RFCs, including alternative syntax for attributes —
@@ and why
#[] is better. There also has been some drama around renaming in the PHP world, and about PHP developers’ debugging practices. And as usual, a load of useful articles, tools, videos, podcasts, and more.
⚡️ News & Releases
- PHP turned 25 — Check out the timeline with the most important events in PHP history.
- PHP 7.4.7 — Among other things, this update fixes a bug with
yield from.
- PHP 7.3.19
- Composer 2.0.0-alpha1
- The State of Developer Ecosystem in 2020 — Links straight to the PHP section of the JetBrains developer survey.
65% of respondents pointed out that they use the ‘dump & die’ approach to debugging. So the tweet from the author of Xdebug, Derick Rethans, was always going to cause a strong reaction in the community:
PHP developers that don't use Xdebug for debugging are amateurs.
— Derick Rethans 🔶 (@derickr) June 20, 2020
🐘 PHP Internals
- ✅ [RFC] Attribute Amendments — Attributes received a few additions: grouping capability
<<Attr1, Attr2>>, renaming
PhpAttributeto
Attribute, validation, and the ability to add multiple identical attributes.
- ✅ [RFC] Ensure correct signatures of magic methods — As for now, you can declare a magic method like this in a class:
class Foo { function __get(int $name): void { echo $name; } } (new Foo)->{42};
In PHP 8 however, signatures of magic methods will be validated and the code above will cause a compile-time error.
- ✅ [RFC] Make sorting stable — All standard sort functions in PHP (sort, usort, asort, etc.) starting with PHP 8.0 will be stable. This means that the original element order with the same values is guaranteed. In current versions, it is easy to find examples where this is not the case.
- ❌ [RFC] Opcache optimization without any caching — Declined.
- [RFC] Make constructors and destructors return void — In current PHP versions, you can return any values from constructors and destructors, for example:
class Test { public function __construct() { return 0; } } $test = new Test(); // this prints 0 echo $test->__construct();
Benas Seliuginas proposed to throw a
Deprecatedwarning in such cases, and later in PHP 9.0 to remove this and generate a
Fatal Error.
- [RFC] Treat namespaced names as single token — Each element of the namespace is treated by the interpreter as a separate token. This is why there can be no keywords used in namespaces. For example,
namespace app\function { class Foo {} };will fail with a
Parse Error. Nikita Popov proposed to consider the entire namespace as a single token as this would minimize backward compatibility problems when introducing new keywords.
- [RFC] Rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON — The token
::in PHP is called
T_PAAMAYIM_NEKUDOTAYIM— this fact was even pointed out as problem number one in the famous PHP Sadness list.
George Peter Banyard and Kalle Sommer Nielsen suggested renaming it. We’re not sure this makes sense, as the error messages always note
::.
Also, why remove a fun historical quirk?
- [RFC] Shorter Attribute Syntax — Attributes have already been accepted for PHP 8, but many people do not like the syntax. Three options are being put to the vote:
<<Attr>>(current) vs.
@@Attrvs.
#[Attr]. Brent Roоse had several convincing arguments for
#[ ]:
- It’s the same syntax as Rust, which is also a C-based language.
- It’s compatible with old code:
#[Attribute]will be just ignored by PHP <=7.4 as a comment.
@@can be confused with the error suppress operator (example).
<<>>is also confusing, as it looks like bit-shift operators. In the future, it can be confused with generics that are likely to use the single angle brackets syntax
<>.
In the meantime,
@@seems to be getting more votes.
- [RFC] Change terminology to ExcludeList — The topic of renaming offensive terms has not been overlooked by the PHP world either. There have been heated discussions in the Internals.
In the PHP core, the change affects only one thing: the configuration directive
opcache.blacklist_filenameshould be renamed to
opcache.exclude_list_filename.
Many other PHP tools have already made changes in this regard: PHPUnit, Drupal, Xdebug, Yii, Composer (+ working with non-master Git branches).
There is also a discussion on set of rules for PHP_CodeSniffer to find offensive words.
- [RFC] Nullsafe operator — Instead of a bunch of nested conditions, Ilija Tovilo proposed to add the ability to refer to a property or method with a check for
null:
$country = $session?->user?->getAddress()?->country;
Instead of
$country = null; if ($session !== null) { $user = $session->user; if ($user !== null) { $address = $user->getAddress(); if ($address !== null) { $country = $address->country; } } }
- PHP 8.0 release schedule was updated — The feature freeze has been moved to August 4, and the final release is scheduled for November 26.
- You can try PHP 8 on 3v4l.org. Just check out the output in the php-master branch.
🛠 Tools
- beyondcode/expose — A tunneling service implemented in pure PHP on top of ReactPHP. An alternative to ngrok. You can run your own self-hosted server too. See more details about how it works.
- pestphp/pest — A tool that is built on top of PHPUnit and allows you to write tests in a simple elegant way. There is documentation and lots of videos. Inspired by facebook/jest.
- Moxio/sqlite-extended-api — The real demonstration of how FFI and lisachenko/z-engine can help: the package provides a couple of SQLite API methods that are not available in the standard PHP drivers.
- FriendsOfPHP/pickle — A PECL extensions manager that is compatible with Composer. This is the first update since 2015 and it finally seems to have a plan with Composer.
- doctrine/migrations 3.0.0 — A major update to the well-known package for handling DB migrations.
Symfony
- Symfony 5.1 was released.
- Symfony 5 certification is now available.
- In Symfony 6, configurations will be handled in usual PHP files instead of YAML or XML.
- dbu/snake-bundle — A snake game implemented on symfony/console.
- How much of a performance boost can you expect for a Symfony 5 app with PHP OPcache preloading?
- 10 Symfony testing tips.
- Protect Symfony app against the OWASP Top 10 threats.
Laravel
- spatie/laravel-cronless-schedule — A package for performing scheduled tasks without cron. It uses ReactPHP and timers under the hood. For more details check out the intro post.
- Laravel Debugbar vs. Telescope Toolbar
- Adding try/catch Laravel collections.
- Laravel package ecosystem statistics.
✨ In this thread I'll list tactics you can use to write cleaner code in Laravel.
As you use them repeatedly, you'll develop a sense for what's good code and what's bad code.
I'll also sprinkle some general Laravel code advice in between these tactics.
THREAD
— Samuel Stancl (@samuelstancl) June 16, 2020
Yii
Zend/Laminas
- Is Zend Framework Dead? — The Laminas project lead Matthew Weier O’Phinney answers this and a other questions.
- asgrim/mini-mezzio — Set up Mezzio applications even faster by using this package.
🌀 Async PHP
- badfarm/zanzara — An asynchronous framework for creating Telegram bots based on ReactPHP.
- simple-swoole/simps — Yet another Swoole-based framework. According to the benchmarks, it is the fastest one written in PHP.
- 📺 Video course on ReactPHP by Marcel Pociot.
💡 Misc
- Introducing the new Serverless LAMP stack — A post on the AWS blog about using serverless PHP, and a collection of links on the topic.
Also, Amazon’s official AWS Toolkit plugin is now available for PhpStorm.
- Learn more about Constructor promotion in PHP 8.
- What are the top most used PHP functions in frameworks? — In Symfony it’s
sprintf(), in Laravel it’s
is_null(). There are instructionson how to calculate similar stats for other frameworks.
- On final classes in PHP.
- The fastest template engine for PHP.
- Unit test naming conventions.
📺 Videos
- PHP Russia 2020 Online videos.
- How to generate and view code coverage reports in PhpStorm using PHPUnit and Xdebug.
🔈 Podcasts
- Voices of the ElePHPant — Interview with Nuno Maduro.
- PHPUgly 194: Oversight
- PHP Internals News Podcast by Derick Rethans
• #58 — With Max Semenik on the accepted RFC non-capturing catches.
• #57 — With Ralph Schindler on his proposal about conditional return, break, and continue statements.
• #56 — With Dan Ackroyd on the newly added mixed pseudotype.
Thanks for reading!
If you have any interesting or useful links to share via PHP Annotated, please leave a comment on this post or send me a tweet.
Your JetBrains PhpStorm team
The Drive to Develop | https://blog.jetbrains.com/phpstorm/2020/06/php-annotated-june-2020/?ref=aggregate.stitcher.io | CC-MAIN-2020-29 | refinedweb | 1,398 | 58.58 |
Grid Sort - Disabled by Controller-Event
Grid Sort - Disabled by Controller-Event
Hi,
i've written an application which is using all the MVC classes from ext gwt.
So after a button is clicked, an event is fired, the right controller takes this event and forward it to the right view.
It works very good.
But there is one problem:
After initialization, the "showStatistics" event is fired. The controller forwards it to the "contentView". The content view just do one thing:
Code:
private void onShowStatistics(){ LayoutContainer wrapper = (LayoutContainer) Registry.get("center"); wrapper.removeAll(); wrapper.add(statPanel); wrapper.layout(); }
So i take the "center" LayoutContainer and put the ContentPanel-Subclass into it.
After this initial "showStatistics" event, the statistic panel is shown.
The statistic panel contains a grid (paging grid with a store and toolbar binded).
The grid is working very good. I see all the data and i can sort the data and page through the data.
But now i hit a button, which fires again the "showStatistics" event. Now the same procedure take place.
I still can see the grid and the data. But now every time i try to sort the values, it does the sort twice. It does sort it twice so fast, normaly i wouldnt even know it does. After i watched my log file, i saw it does the sort method twice.
But why? If i click another time on the button, to fire the "showStatistics" event, it still just sort it twice.
If i reload the application and the initial event fires the "showStatistics" event, everything works just fine till i do something, what fires "showStatistics" event one more time.
My ContentView just do the code, i mentioned above. It just take the center, remove all and put the statisticsPanel inside. After it redo this job, the grid's sorting just don't work right anymore.
Any Help?
Maybe i didn't have been clear enough in my problem definition? Do you need more information or something, so you can understand my bug/problem better?
Its some really not easy to find bug... as i tried to say, its just very strange. When i first fire the event, my panel with the grid inside gets displayed bug-free. Now i hit a button and the event is fired again, now i still see the panel with the grid but the sort is bugged. Everything is sorted twice (very fast, like the event is just fired twice for some reason).
/edit:
one more thing i found, which is bugged when i refired my event:
i cant resize the rows anymore.
What is the thing, which makes my panel-with-grid bugged? :/
Very hard to say without seeing the full code. Try breaking the app into smaller bits and test each part individually to ensure each is working 100%.GXT JavaDocs:
GXT FAQ & Wiki:
Buy the Book on GXT:
Follow me on Twitter:
Well its realy not that much code, used after the event is fired.
-hit button
-event is fired
-controller catch the event, use "forwardToView(view, event)"
-the view procede the code i mentioned above
thats it.
Well here is my code for the ContentPanel, which is what i add into the "wrapper":
see a picture of this widget below..
Code:
public class StatisticsPanel extends ContentPanel { private Grid<Statistic> buGrid , vhGrid; private ArrayList<ColumnConfig> buConfigs, vhConfigs; private ColumnConfig buColumn, vhColumn; private ColumnModel buColumnmodel, vhColumnModel; private Text buStatisticsHeader, vhStatisticsHeader; public StatisticsPanel (ListStore<Statistic> statisticStore, ListStore<Statistic> statVHStore) { setBodyBorder(true); setFrame(true); setHeading("Statistics"); setButtonAlign(HorizontalAlignment.CENTER); setLayout(new FlowLayout()); setSize((Integer)Registry.get("AppWidth"),450); buConfigs = new ArrayList<ColumnConfig>(); buColumn = new ColumnConfig(); buColumn.setId("name"); buColumn.setHeader("Business Unit"); buColumn.setWidth(25); buConfigs.add(buColumn); buColumn = new ColumnConfig(); buColumn.setId("counter"); buColumn.setHeader("Quantity"); buColumn.setWidth(50); buConfigs.add(buColumn); buColumnmodel = new ColumnModel(buConfigs); buGrid = new Grid<Statistic>(statisticStore, buColumnmodel); buGrid.setStyleAttribute("borderTop", "none"); buGrid.setHeight(200); buGrid.setAutoExpandColumn("name"); buGrid.setBorders(true); buGrid.addListener(Events.CellDoubleClick, new Listener<GridEvent>(){ public void handleEvent(GridEvent be) { Dispatcher.get().dispatch(AppEvents.BUSearch); } }); vhConfigs = new ArrayList<ColumnConfig>(); vhColumn = new ColumnConfig(); vhColumn.setId("name"); vhColumn.setHeader("Virtual Host"); vhColumn.setWidth(210); vhConfigs.add(vhColumn); vhColumn = new ColumnConfig(); vhColumn.setId("counter"); vhColumn.setHeader("Quantity"); vhColumn.setWidth(50); vhConfigs.add(vhColumn); vhColumnModel = new ColumnModel(vhConfigs); vhGrid = new Grid<Statistic>(statVHStore, vhColumnModel); vhGrid.setStyleAttribute("borderTop", "none"); vhGrid.setHeight(200); vhGrid.setAutoExpandColumn("name"); vhGrid.setBorders(true); vhGrid.addListener(Events.CellDoubleClick, new Listener<GridEvent>(){ public void handleEvent(GridEvent be) { Dispatcher.get().dispatch(AppEvents.VHSearch); } }); buStatisticsHeader = new Text("Shortcuts by Business Units"); vhStatisticsHeader = new Text("Shortcuts by Virtual Hosts"); add(buStatisticsHeader); add(buGrid); add(vhStatisticsHeader); add(vhGrid); }
Here is more code, maybe this helps?
Everytime the sort event is fired, the store gets reloaded, this is what my servlet does to get the store loaded:
The sort thingy is pretty much the same i saw in the gxt mail example... is here any bug?
Code:
public PagingLoadResult<Statistic> getBUStatistics(PagingLoadConfig config) { DBQuery query = new DBQuery(); List<Statistic> statList = query.getBUStatisticList(); if (config.getSortInfo().getSortField() != null) { final String sortField = config.getSortInfo().getSortField(); if (sortField != null) { Collections.sort(statList, config.getSortInfo().getSortDir().comparator(new Comparator<Object>() { public int compare(Object o1, Object o2) { Statistic p1 = (Statistic) o1; Statistic p2 = (Statistic) o2; if (sortField.equals("name")) { return p1.getName().compareTo(p2.getName()); } else if (sortField.equals("counter")) { return ((Integer)p1.getCounter()).compareTo((Integer)(p2.getCounter())); } return 0; } })); } } ArrayList<Statistic> sublist = new ArrayList<Statistic>(); int start = config.getOffset(); int limit = statList.size(); if (config.getLimit() > 0) { limit = Math.min(start + config.getLimit(), limit); } for (int i = config.getOffset(); i < limit; i++) { sublist.add(statList.get(i)); } return new BasePagingLoadResult<Statistic>(sublist, config.getOffset(), statList.size()); }
And this is how my store list is binded (initialize() method in controller));
I don't understand what bit isn't working... reading through everything you've given and said, it isn't clear what exactly is the problem. You mention clicking a button, but there is no button in your code. Are you talking about double-clicking the cells? in which case where is the event code that is being executed???
Please take the time to explain yourself better.GXT JavaDocs:
GXT FAQ & Wiki:
Buy the Book on GXT:
Follow me on Twitter:
Ok, this is how my application works:
I load the application, the controllers and views get initialized. The stores i need get loaded (one of them is the statisticsStore, the code is mentioned above - the rpc proxy code). Then the views get initialized, which initial all the widgets i need. For example the statistics Panel widged (code mentioned above). The statistics Panel constructor get the store data.
After the initialisation of my application, the "showStatistics" event is fired.
Now the controller gets the event and forward it to the "content view". The content view wrapps the center, remove all widgets which are actually in the center and put the statistics Panel widget inside. (code mentioned above - the wrapper code in the first posting)
Now my application is stable. I see the statistics panel with my data i want it to show. I can click on any column in order to sort by this value. It works fine.
Now there is a button in my application. This button is in the "header panel" widget. I click on this button. The "show Statistics" event is fired again.
Now the same procedure starts, as mentioned above. Actually: i again get my center cleaned by all widgets (the wrapper code in the initial code) and then put the statistics panel into the wrapper.
Now i will see the statistics panel again. But when i click on any column, in order to sort, the sort does not work propper anymore. It just make the sorting twice. If its a int column, it will first sort it by low to high and then high to low just one sort after each other. It sorts so fast, i dont see any change in my statistics panel. But when i take a look into my log file, i see that the servlets method is used twice (see the sort code above).
I also cant resize the columns width anymore.
If its not in hosted mode, i can click on the web browsers "reload" button and the application is loaded a new. Now the statistics works again, because the application got completely reloaded and initialized by new. Now its just the same as above: when i click on the button in the header, to fire the "show statistics" event, the statistics grid will be broken again.
Hope this was clear enough?
the original gird is not unloaded from the store.... call grid.reconfigure(null) to ensure the old grid is unbound from the store... the reload/sort etc might be messing things up.GXT JavaDocs:
GXT FAQ & Wiki:
Buy the Book on GXT:
Follow me on Twitter:
After i click the "show statistics"-button, the grid is not initialized again. The statistics panel widged instance is just put out of the wrapper (wrapper.removeAll() ) and then put again into the wrapper (wrapper.add(statPanel)).
The store, which is bind to the grid inside the statPanel, is just being reloaded again and again (statLoader.load()).
You see?);
When the show statistics event is fired, i just get the stat panel and put it into the center layoutcontainer (wrapper) and thats it.
So how i should unbind the store, everytime i put my statistics panel into "foreground"? | http://www.sencha.com/forum/showthread.php?54447-Grid-Sort-Disabled-by-Controller-Event | CC-MAIN-2014-49 | refinedweb | 1,576 | 58.79 |
Daniel Howard
Node.js for PHP Developers
ISBN: 978-1-449-33360-7
[LSI]
Node.js for PHP Developers
by Daniel How Meghan Blanchette
Production Editor: Kara Ebrahim
Copyeditor: Jasmine Kwityn
Proofreader: Kara Ebrahim
Indexer: Potomac Indexing, LLC
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrator: Rebecca Demarest
December 2012:
First Edition
Revision History for the First Edition:
2012-11-28
First release
See for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc. Node.js for PHP Developers, the image of the Wallachian sheep, author assume no
responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
1.
Node.js Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The node and npm Executables 1
Stack Traces 7
Eclipse PDT 9
2.
A Simple Node.js Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
An HTTP Server 21
Predefined PHP Variables 29
A PHP Example Page 42
3.
Simple Callbacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Linearity 49
Making Code Linear 57
4.
Advanced Callbacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Anonymous Functions, Lambdas, and Closures 66
PHP 5.3 69
PHP 4 73
5.
HTTP Responses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Headers 90
Body 92
A PHP Example Page 97
6.
Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
String Literals 109
Syntax Differences 112
iii
PHP Alternative Syntax 117
7.
Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Simple Variables 126
Array Variables 128
Other Variable Types 143
Undefined Variables 144
Scope 148
8.
Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Encapsulation 157
Inheritance 166
PHP parent and static Keywords 173
9.
File Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Reading and Writing Files 177
PHP file() API Function 183
Low-Level File Handling 186
Filenames 191
10.
MySQL Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Database Approaches 200
node-mysql 203
11.
Plain Text, JSON, and XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Plain Text 221
JSON 223
XML 226
12.
Miscellaneous Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Array 242
Time and Date 246
File 247
JSON 247
Math 248
String 249
Type 253
Text 254
MySQL 257
Variable 257
php.js License 258
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
iv | Table of Contents
Preface
Why bother with this book?
PHP is an old language, as Internet languages go, invented in 1995. Node.js is new, very
new, invented in 2009. Looking at PHP side by side with Node.js gives you a bird’s eye
view of where web servers started, how far they have come, and what’s changed. But,
more importantly, it shows what hasn’t changed—what the industry as a whole has
agreed are good practices—and a little bit of what the future holds.
The biggest difference between PHP and Node.js is that PHP is a blocking language,
relying on APIs that don’t return until they are done, and Node.js is a nonblocking
language, relying on APIs that use events and callbacks when they are done. But, except
for that, they are surprisingly similar. Both use the curly bracket notation ( { and } ) for
blocks of code, just like the C programming language. Both have the function keyword,
which serves the exact same purpose and has the exact same syntax in both languages.
If Node.js shows that blocking APIs are the past, it also shows that a pretty specific
variation of the C programming language is the past, present, and future. Callbacks may
be an evolution, but syntax is almost frozen.
But beyond just, “oh, isn’t that interesting,” why bother with this book?
PHP is supported by a zillion cPanel website hosting services. If you develop a web
application and want to give it to other people to run, they can install it almost anywhere
if it is written in PHP. They can buy web hosting for $10 per month, install your PHP
web application, and be on their way.
Node.js is not supported by a zillion cPanel website hosting services. In fact, I don’t know
even one web hosting service that supports it. But I know that a lot of developers are
v
interested in it and are writing Node.js code. By writing Node.js code, you make your
web application code interesting and useful to a lot of developers. If you develop a web
application and want to give it to other developers to improve and reuse, they can get
your Node.js web application from GitHub or wherever else the source code is hosted.
In a perfect world, you could appeal to both sets of people.
Ours isn’t a perfect world, but you can still achieve this goal by porting your PHP code
to Node.js code and simultaneously having and developing two working codebases in
two different languages.
The Mission
The mission of this book—and when I write “mission,” I mean it in the “I really, really,
really, really want you to do it” kind of mission—is to convince you to convert some of
your PHP code to Node.js code. I don’t want you to just read this book. I want you to
actually sit down at a computer and take some of your most tired, annoying PHP 4 code
and convert it to Node.js using this book as a guide. I want you to see for yourself that
PHP and Node.js are not that different. I want you to see for yourself that your PHP
code does not need to be thrown away and rewritten in Node.js from scratch. I want
you to see for yourself that you don’t have to surrender to just living with your PHP
code, being a prisoner of the past.
As you will see, converting your PHP code to Node.js code isn’t just about Node.js. It is
also about improving your PHP code. An important step throughout this book is re‐
factoring and improving your PHP code such that it is easier to convert it to Node.js
code. This book isn’t just about making a new Node.js codebase. It is about improving
your PHP codebase and creating a new Node.js codebase. It is about both codebases:
your PHP codebase and your Node.js codebase. Converting your PHP codebase to
Node.js can make you a better PHP developer.
If you are a PHP developer, this book is perfect for you because you can learn how to
develop Node.js code by using your existing PHP knowledge. You can see how certain
code works in PHP, such as reading a text file, and in the next few paragraphs, you can
see how exactly the same thing is accomplished in Node.js. Unlike other Node.js books,
this book does not describe file handling in general. It specifically compares it to PHP
so you can see the nuts and bolts of what it looks like in the language that you know as
well as in the language you are learning. You might even find a few corners of PHP you
weren’t previously aware of, because a few of those PHP corners are central concepts in
Node.js.
If you are a Node.js developer already, you have a decent chance of learning PHP from
this book. After all, if PHP developers can figure out Node.js by looking at PHP code
vi | Preface
side by side with Node.js, there is good reason to think that Node.js developers can figure
o
ut PHP by looking at the same code. Even better, by comparing Node.js to a specific
different language, such as PHP, it will give you a good idea as to how much of Node.js
is the same as PHP.
Comparing two languages or, even better, showing how to convert or port from one
language to another, is a powerful way to become an expert in both languages. Other
books, which deal with only one language, mostly read like step-by-step tutorials or
encyclopedias. “This is this,” they read, “that is that.” They can describe concepts only
as abstractions. Other books can’t use the powerful explanation of an ongoing compar‐
ison of two languages that this book does.
Besides being more effective, a book such as this one can also be more interesting and
focus on only the interesting topics. In a run-of-the-mill Node.js programming book,
time is spent explaining what a statement is and why every Node.js statement ends in a
semicolon (;). That’s dull. But when a book is explaining how to program in Node.js in
a vacuum without any point of reference (such as the PHP language), there is no alter‐
native. With this book, I can assume that you already know what a PHP statement is
and that a PHP statement ends in a semicolon (;). All that needs to be said is that Node.js
is exactly the same way. With this book, I can assume that the reader has a specific
background—PHP development—instead of needing to write more broadly for people
who come with a Python or Microsoft Office macro background.
By proselytizing the conversion of PHP code to Node.js code, I am not saying that PHP
code is bad. In fact, I think PHP is a very capable and pretty good language. I am not
saying that you should convert your PHP code to Node.js code and then throw away
the original PHP code. I am encouraging you to keep the original PHP code and improve
it while, at the same time, becoming a skilled Node.js developer. PHP and Node.js are
both important.
When
first setting out to write this book, I made a very important decision early on: I
was going to focus on real-life, practical, existing PHP code. PHP 5 is the current PHP
version, but there is still a lot of PHP 4 code out there. This book has explicitly avoided
the easy prescription: convert your PHP 4 code to PHP 5 code, then use this book to
convert your PHP 5 code to Node.js. No, despite the fact that PHP 4 support is rapidly
fading in favor of PHP 5 support, this book takes the much harder road of showing how
PHP 4 code can be improved upon and converted to Node.js code without requiring
PHP 5 features. Although this book does show how to convert PHP 5 code to Node.js,
let me assure you that PHP 4 code is readily convertible to Node.js using this book.
Very soon after making the decision to embrace and address PHP 4 code, I made another
decision related to this book: I was going to describe a system of conversion such that
the PHP code and the Node.js code would be kept synchronized and working through‐
out the conversion process. At the end of the conversion process, both the PHP and
Node.js codebases would be fully functional and, going forward, new features and bug
Preface | vii
fixes could be developed on both codebases simultaneously. This decision avoids a much
easier approach, which would have been a “convert-and-discard” conversion process
where the PHP codebase would be unsynchronized and possibly not working at the end
of the conversion process and the developer’s only option would be to proceed ahead
with the Node.js codebase by itself. This would have made a much shorter book, but
would have been a cheap trick—a way to make life easier for me, as the writer, and make
the book less useful to you, as the reader.
These two decisions, one to support PHP 4 and the other to support two synchronized
PHP and Node.js codebases as an end product, have made this book longer than it would
otherwise be, but have also made it eminently practical. This is not a book that you will
read once and put on the shelf as an “isn’t that nice to know” book. This is a book that
you can use for reference to quickly refresh yourself about important aspects of either
PHP or Node.js.
By now, you might understand what the mission is and why it might be worthwhile. But
maybe you are still doubtful.
Consider the following PHP code, which was taken from a real-world PHP web appli‐
cation that implemented instant message−style chatting:
function roomlist() {
$rooms = array();
$room_list = mysql_query(
'SELECT room FROM '.SQL_PREFIX.'chats GROUP BY room ORDER BY room ASC'
);
while ($row = mysql_fetch_assoc($room_list)) {
$room = $row['room'];
$rooms[] = $room;
}
print json_encode($r);
}
Now consider the equivalent code in Node.js:
function roomlist() {
var rooms = [ ];
link.query(
'SELECT room FROM '+SQL_PREFIX+'chats GROUP BY room ORDER BY room ASC',
function(err, rows, fields) {
for (var r=0; r < rows.length; ++r) {
var row = rows[r];
var room = row['room'];
rooms.push(room);
}
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(JSON.stringify(r));
}
});
};
viii | Preface
Sure, the syntax is a bit different. To concatenate strings, PHP uses the dot (.) operator
whereas JavaScript uses the plus (+) operator. PHP uses array() to initialize an array,
but JavaScript uses square brackets ( [ and ] ). It’s not identical.
But for heaven’s sake, it’s still pretty darn close. This isn’t “fake” code, either: it uses arrays,
accesses a MySQL database, uses JSON, and writes output.
The similarities and the possibility of converting PHP source code to Node.js, and con‐
sequently the writing of this book for O’Reilly Media, are a direct result of my experience
with creating a Node.js implementation of my open source project.
Who I Am
I’m Daniel Howard, the founder and sole maintainer of ajaximrpg, a preeminent
browser-based instant messaging (IM) and chat system. ajaximrpg is specifically geared
toward playing tabletop role-playing games, such as Dungeons & Dragons, over the
Internet, although the role-playing specific features can be stripped away to reveal a
general-purpose client. ajaximrpg is completely open source and available via Source‐
Forge with a full range of supporting services such as a Twitter feed, a Google Group,
and a live demo.
ajaximrpg was originally written in PHP 4 with no inkling that it might someday be
ported to Node.js JavaScript. But it works on PHP 5 and, now, on Node.js.
Starting in January 2012, it took me a single week to come up to speed on Node.js and
do a proof of concept to have my client-side JavaScript code detect the installation status
of the server side running on Node.js. In a month, I had enough of a few thousand lines
converted to enable users to log in and IM each other. It dawned on me that there were
general principles at work here, and that these general principles could be laid out in a
book to explain how to convert any PHP source code to Node.js and, using these prin‐
ciples, the reader of the book could apply them to his PHP source code much quicker
and more accurately than just muddling along as I had.
I put aside my mostly working but not yet completed Node.js implementation and im‐
mediately set out to write this book that you now hold in your hands (or view on your
screen).
This Book
This book consists of 12 chapters, starting out with the basics and moving on to more
advanced topics.
Preface | ix
Chapter 1, Node.js Basics
This chapter describes how to install Node.js and use the Node.js executables, node
and npm. It also describes how to install the Eclipse PDT and configure it for use
for a PHP to Node.js conversion.
Chapter 2, A Simple Node.js Framework
This chapter presents a simple Node.js framework such that individual PHP pages
can be converted to Node.js files and the resulting Node.js files will be invoked when
actions, such as visiting a URL, are taken against the Node.js web server.
Chapter 3, Simple Callbacks
This chapter explains how to refactor blocking PHP source code such that it can be
easily converted to nonblocking Node.js source code that uses callbacks. It presents
the concept of linearity as a simple way to analyze and improve PHP source code
such that it can be placed in Node.js callbacks when converted to Node.js.
Chapter 4, Advanced Callbacks
This chapter presents a more sophisticated and generic way to refactor blocking
PHP 4 source code to simulate anonymous functions, function variables, and clo‐
sure. For PHP 5 source code, it explains how to use PHP 5 features to actually
implement anonymous functions, function variables, and closure.
Chapter 5, HTTP Responses
This chapter explains how to convert PHP output, such as the print and echo
keywords, into HTTP responses in Node.js.
Chapter 6, Syntax
This chapter explains how to convert PHP syntax, such as concatenating two strings,
into Node.js syntax.
Chapter 7, Variables
This chapter explains how to convert PHP single and array variables into Node.js,
as well as common operations, such as adding and deleting elements from array
variables. It also describes how to convert PHP types to Node.js types.
Chapter 8, Classes
This chapter presents a way to implement PHP classes and class inheritance in
Node.js with a step-by-step technique to perform the conversion.
Chapter 9, File Access
This chapter explains all the file reading and file writing APIs in both PHP and
Node.js. It explains how to convert the PHP file handling APIs into their Node.js
equivalents.
x | Preface
Chapter 10, MySQL Access
This chapter describes all the ways that a database, specifically a MySQL database,
can be used in a web application. It provides a step-by-step procedure for converting
database access code from the PHP MySQL APIs to use the node-mysql Node.js
npm package.
Chapter 11, Plain Text, JSON, and XML
This chapter explains three data formats: plain text, JSON, and XML. It explains
how to convert PHP source code that uses PHP JSON or XML APIs into Node.js
source code that uses similar Node.js npm packages.
Chapter 12, Miscellaneous Functions
This chapter provides Node.js implementations for a large number of PHP API
functions. These Node.js implementations can be used to speed along conversion
and provide an interesting way to contrast PHP and Node.js.
Now let’s get started with Node.js.
About This Book
This book is about how to take existing PHP source code and develop new Node.js
source code from it. PHP and Node.js have many similarities, but of course, there are
some significant differences. By leveraging the similarities and noting the differences,
you can use your PHP experience to learn Node.js and, ultimately, create a Node.js web
application that is a drop-in replacement for any existing PHP web application that you
have.
This book assumes that you are a developer who understands the basics of development,
such as creating and then implementing a design in working lines of programming code.
It assumes that you are already familiar with classes, functions, and looping constructs.
It also assumes that you are familiar with web development, including the basics of how
web browsers and web servers interact to create a web application.
Furthermore, this book assumes that you have significant expertise in the PHP pro‐
gramming language. If you do not have a background in the PHP programming lan‐
guage, it is possible that you can use your background in another programming language
(e.g., Python, Ruby, or C) and, by reading this book and examining the intersection
between PHP, Node.js, and the programming language that is familiar to you, acquire
a good understanding of both PHP and Node.js. Not necessarily easy, but possible.
This book can be read straight through as a Node.js tutorial, consulted as a reference to
see how a specific PHP feature can be implemented in Node.js, or executed as a step-
by-step recipe to convert an arbitrary PHP web application into a Node.js web applica‐
tion. The book was written to serve all these purposes.
Preface | xi
No matter how you approach this book, as its author, I sincerely hope that it answers
the questions you have about PHP and Node.js.: “Node.js for PHP Developers by Daniel Ho‐
ward (O’Reilly). Copyright 2013 Daniel Howard, 978-0-596-33360-7.”
xii | Preface:
Preface | xiii
Acknowledgments
This book is the product of many months of effort by me, of course, but also by several
others.
I want to thank the editors at O’Reilly Media, Inc., specifically Simon St. Laurent and
Meghan Blanchette, for their encouragement and feedback.
I want to thank Neha Utkur, the book’s technical editor, for her enthusiasm and will‐
ingness to provide feedback on a whole range of areas that sorely needed her input. Her
contribution has made this a much better book.
Finally, I want to thank Shelley Powers for lending a second pair of eyes to review the
book for technical accuracy.
xiv | Preface
CHAPTER 1
Node.js Basics
Let’s assume you have a significant PHP codebase that you have decided to convert to
Node.js. You will provide both the PHP and Node.js codebases to your users for the
foreseeable future, meaning that you will update and improve both codebases simulta‐
neously. But you only know a little about Node.js; in fact, you have not really done any
serious development with Node.js yet. Where do you start?
The first thing to do is to download Node.js for your platform, probably Linux or Win‐
dows (yes, they have a Windows version now!). Since installation methods and installers
vary from version to version and change over time, this book will not spend time on
how to install the current version. Instead, if you need assistance with installation, you
should use the online documentation and, if that fails you, use Google or another search
engine to find web pages and forum postings where others have come across the same
installation issues you are having and have found solutions that you can use.
The node and npm Executables
Once installed, you will see that a Node.js installation is fairly simple and has two main
parts: the main node executable and the npm executable.
The node executable is simple to use. Although it has other arguments, usually you will
pass only one argument, the name of your main Node.js source file. For example:
node hello.js
The node executable will interpret the Node.js code within the source file (hello.js in this
case), execute the code, and when it finishes, exit back to the shell or command line.
Notice that hello.js uses the .js extension. The .js extension stands for JavaScript. Un‐
fortunately, files with the .js extension can contain either client-side JavaScript or server-
side Node.js code. Even though they both use the JavaScript language, they have nothing
1
else in common. Client-side JavaScript code needs to be served out to browsers, while
server-side Node.js code needs to have the node executable run on it or otherwise needs
to be accessible to the main Node.js code that is being run under the node executable.
This is a serious and unnecessary cause of confusion.
In some Node.js projects, the client-side JavaScript files are put in one folder, such as a
client folder, while the Node.js files are put in another folder named something like
server. Separating client-side JavaScript files from Node.js files via a folder scheme helps,
but is still problematic because many source code editors show only the filename but
not the full path name in a title bar or tab.
Instead, I have adopted the .njs extension for Node.js files and reserved the .js extension
for client-side JavaScript files in my own projects. Let me be clear, though: the .njs
extension is not a standard! At least, not yet (and maybe not ever). I have diligently
searched using Google, and it is common to use the .js extension for Node.js code. To
avoid constant confusion between client-side and server-side JavaScript, I use the .njs
extension for Node.js code, and in your own PHP to Node.js conversion, I suggest that
you do the same.
So, instead of using the hello.js file given earlier, I would use hello.njs:
node hello.njs
The remainder of this book will use the .njs extension for Node.js files.
A simple hello.njs looks like:
console.log('Hello world!');
If you run node hello.njs on this source file, it prints “Hello world!” to the console
and then exits.
To actually get a web server running, use the following hellosvr.njs source file:
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World!\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at');
If you run node hellosvr.njs, the command line will intentionally hang. The server
must continue to run so it can wait for web page requests and respond to them.
If you start a browser such as Firefox or Chrome and type into
the address bar, you will see a simple web page that says, “Hello world!” In fact, if you
go to or or even http://
127.0.0.1:1337/abc/def/ghi, you will always see the same simple web page that says
“Hello world!” because the server responds to all web page requests in the same way.
2 | Chapter 1: Node.js Basics
For
n
ow, the important line in this source file is the first line that uses the Node.js
require()
global function. The
require()
function makes a Node.js module available
for use. Node.js modules are what you might expect: a collection of data and functions
that are bundled together, usually providing functionality in some particular area. In
this case, the
http
Node.js module provides simple HTTP server functionality.
The
node
executable has a number of built-in modules:
http
,
https
,
fs
,
path
,
crypto
,
url
,
net
,
dgram
,
dns
,
tls
, and
child_process
. Expect these built-in modules and their
functionality to vary from version to version.
By
design, a module resides in a namespace. A namespace is an extra specification that
is added to the front of a data or function reference; for example,
http
is the namespace
that the
createServer()
function resides in. In Node.js, a namespace is just imple‐
mented as an object. When the
http
module is loaded, the
require()
function returns
an object and that object is assigned to the
http
variable. The variable does not have to
be called “http”; it could be called “xyzzybub” and, in that case, the server would be
created by calling the
xyzzybub.createServer()
function.
Why have a namespace? Why not just put all the data and functions as global variables?
Node.js anticipated that new modules with new functionality, such as a MySQL access,
would be developed by other people and need to be integrated into the
node
executable
after Node.js was already installed on a user’s computer. Since the names of data and
functions in those modules would be unpredictable, a developer might accidentally
choose the exact same name for a function in a module as a different developer might
choose for another module. But since a module is contained in a namespace, the name‐
space would distinguish between the two functions. In fact, an important improvement
over previous languages, such as C++ and Java, is that Node.js allows the user of the
module to specify the name of the namespace because the user himself assigns the
module to his variable, such as
http
or
xyzzybub
.
These
new modules with new functionality are packages. A package is a module that
can be added to the
node
executable later and is not built into the
node
executable by
default. The difference between a module and a package is not very important; it is really
just a change of terminology.
The
npm
(node package manager) executable adds new packages to the
node
executable.
To install a package, first use Google or another search engine to find the npm package
that you want to install. Often, the package will be found on
GitHub
. An alternative to
using a search engine is to use the
npm
executable itself to find the package using the
search
command.
Instead
of the web server that always returns a “Hello world!” page, suppose we want to
create a web server that actually serves up static web pages from files on the hard disk.
To find a Node.js static file server module, a good search phrase to type into a search
The node and npm Executables | 3
engine is “nodejs static file web server”. Alternatively, “npm search static”, “npm search
file”, or “npm search server” will list the npm packages that have the words “static”, “file”,
or “server” in their names or descriptions. Using either of these two methods or both in
combination (and with a little extra reading and browsing), you will find that Alexis
Sellier, a.k.a. cloudhead, created a popular static file server module and hosted it here.
This package can be installed by running the following command line (additional op‐
tions, such as the -g or --global command line switch, are available to configure the
package installation):
npm install node-static
The npm executable will retrieve the package and, hopefully, install it successfully. Here’s
the output from a successful installation:
npm http GET
npm http 200
npm http GET
npm http 200
node-static@0.5.9 ./node_modules/node-static
The GET indicates that an HTTP GET was used to attempt to retrieve the package. The
200 indicates that the HTTP GET request returned “HTTP status 200 OK”, meaning
that the file was retrieved successfully.
There are hundreds of npm packages, but a few very popular ones are express, node-
static, connect, sockets.io, underscore, async, and optimist.
To implement a web server that serves up static web pages, use the following httpsvr.njs
source file:
var http = require('http');
var static = require('node-static');
var file = new static.Server();
http.createServer(function (req, res) {
file.serve(req, res);
}).listen(1337, '127.0.0.1');
console.log('Server running at');
At a basic level, this is how Node.js development happens. An editor is used to create
and modify one or more .njs source files that contain Node.js code. When new func‐
tionality is needed that is not built into the node executable, the npm executable is used
to download and install the needed functionality in the form of an npm package. The
node executable is run on the .njs files to execute the Node.js code so the web application
can be tested and used.
4 | Chapter 1: Node.js Basics
At this point, three Node.js servers have been presented: hello.njs, hellosvr.njs, and
httpsvr.njs. These source files have been so simple that it did not matter how they were
created. You could have used any text editor to create them and they would work fine.
If you made a mistake, it was easily remedied by editing the source file.
It is safe to assume, though, that you already have a complicated PHP web application
with dozens of files and tens of thousands of lines of PHP that you want to convert to
Node.js. The conversion strategy will follow a straightforward but tedious step-by-step
routine.
The first step will be to create a boilerplate Node.js source file, as described in detail in
Chapter 2, that will support the new Node.js code. This boilerplate Node.js code will be
enhanced to respond to the specific URLs that are available to be invoked by the client.
A web application is, at its heart, a series of URL requests. The objective of conversion
is to make a Node.js server that responds to the client in the exact same way as the PHP
server. To make this happen, the boilerplate Node.js code is modified to handle each
HTTP call and route it to specific Node.js code that will later implement the functionality
of the specific PHP page in Node.js.
The second step will be to refactor the PHP code, as described in detail in Chapter 3
and Chapter 4, to make it easier to convert to Node.js code—that is, make the PHP code
more Node.js friendly. It may come as a shock, but the conversion process is not just a
matter of freezing the PHP code in whatever form it currently is, copying the PHP code
into the Node.js source file, and then, line by line, converting the PHP code to Node.js
code. Since both the PHP and Node.js code will be improved and have new features
added going forward, it makes sense that both the PHP and Node.js code will need to
“give” a little in their purity to smooth over the differences between how the two lan‐
guages function. The PHP code will need to be refactored and make some sacrifices that
will allow functional Node.js code to be created later on. At the end of the conversion
process, both codebases will look very similar and will be written in a sort of hybrid
metalanguage, a collection of idioms and algorithms that are easily ported from PHP to
Node.js. The metalanguage will make both codebases look a little odd, but will be fully
functional and, with time, will become very familiar and understandable to the devel‐
opers who maintain and improve both codebases. Even if you plan to throw away the
PHP code in the end and want to have pristine Node.js code, it is best to refactor the
PHP code anyway, convert both the PHP and Node.js code into the odd hybrid meta‐
language, throw away the PHP code, and then refactor the hybridized Node.js code into
pure Node.js code. Refactoring PHP code is an essential step for any PHP to Node.js
conversion, no matter what your eventual goal is.
The third step is to copy and paste one of the PHP pages from the PHP source file into
the Node.js source file. Almost certainly, the Node.js server will then be broken; when
the node executable is run on it, it will immediately exit with a stack trace.
The node and npm Executables | 5
The fourth step is to convert and fix the newly added code in the Node.js file, as described
in detail in the remaining chapters, such that it becomes working Node.js code. Initially,
the Node.js server will not run and will immediately exit with a stack trace. The stack
trace will indicate the location of the error, which will be caused by some PHP code that
was not completely converted or was not converted correctly to Node.js code. After the
problem is analyzed, a conversion technique from one of the remaining chapters will be
applied to the entire Node.js file; for example, Chapter 7 shows the technique to convert
PHP array initialization using the array() function to Node.js object initialization using
curly brackets ( { and } ). When the Node.js server is run again, it will get a little further
along, but will most likely continue to exit with a stack trace. Eventually, the Node.js
code will be good enough such that it will not immediately exit with a stack trace.
It is surprising how much unconverted PHP code can exist in a Node.js source file and
not cause the Node.js server to immediately exit with a stack trace. As you become
familiar with the conversion process, you will learn just how similar PHP and Node.js
are, even such that unconverted PHP code will be parseable by the node executable and
will allow the node executable to run and accept HTTP requests and fail only when it
needs to actually execute some unconverted PHP code.
Once the Node.js code is good enough that it does not immediately exit with a stack
trace, you can begin to test the client against it. The client will usually be a browser, like
Firefox or Google Chrome. Usually, when you start trying to use the client, the Node.js
code will exit with a stack trace at some point, and then you will need to analyze the
stack trace and apply a conversion technique to fix the problem. Over time, you will
develop an ad hoc series of test cases that you can execute with the client to reveal
unaddressed conversion issues or hopefully to confirm that the Node.js server is running
correctly.
At times, it will also help to use a visual diff tool to compare the PHP code and Node.js
code; by viewing it side by side with the original PHP code, you can more easily locate
issues in the new Node.js code. This will help remind you of conversion techniques that
you have not used yet but need to use. It will also help you keep the conversion process
on track and under control.
The rest of the PHP to Node.js conversion process is simply a matter of applying a
combination of previous steps many, many times until all the PHP code has been con‐
verted to Node.js code and the Node.js code works reliably and interchangeably with
the PHP version. Depending on the size of the PHP codebase, the conversion process
may take months, but—if you are determined—the conversion will be accomplished.
6 | Chapter 1: Node.js Basics
Stack Traces
During the conversion process, you will see a lot of stack traces. A lot. Here’s an example
stack trace that is generated because the node-static npm package was not installed
using the npm executable before the httpsvr.njs was run:
module.js:337
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'node-static'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at Object.<anonymous> (httpsvr.njs:2:14)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Array.0 (module.js:484:10)
The top of the stack trace shows the code that threw the error. This is not the code that
caused the error; this is the code that created and threw the error object.
Below that, the error message inside the Error object is shown. This error message
indicates that the node-static module could not be found.
The remainder is the “call stack,” a series of function calls indicated by the word “at” that
show the chain of function calls that arrived at the code that threw the error. The call
stack is listed from innermost call to outermost call. In this case, the Function._resol
veFilename() function is the call at the top of the call stack, which indicates that it is
the innermost call and thus the one that actually contains the code that threw the error.
The Function._resolveFilename() function was called by the Function._load()
function, which was called by the Module.require() function, which was called by the
require() function, which was called by the Object.<anonymous>() function, and
so on.
After each function call in the call stack, you will see the filename of the source file that
contains that function, the last line that was executed (which is either the line that called
the function above it or the line that actually threw the error object), and the position
in the line that was last executed. In the example, you can see that two source files are
involved: module.js and httpsvr.njs.
The module.js file resides inside the node executable; we can guess that because we do
not recognize it as one of our files. The httpsvr.njs file is part of our own source code.
Even though httpsvr.njs is referenced only once and is in the middle of the call stack, it
is safe to assume that the error was caused by our source code. In general, we can assume
that Node.js itself, its built-in modules, and even any installed npm modules are in
Stack Traces | 7
perfect working order. Even if they are not, we must assume that they are working until
we prove otherwise by eliminating all errors from our calling code. Even if we discover
that the error originates elsewhere, we have control only over our own code, not over
any other code. The solution would likely be to create a workaround in our own code
rather than take on the long and slow process of lobbying other developers to fix their
code. So, in the end, regardless of where the ultimate fault may be, the first place to focus
our attention is on the httpsvr.njs file.
The part of the call stack to focus our attention on is:
Object.<anonymous> (httpsvr.njs:2:14)
This function call is on line 2 at position 14 in the httpsvr.njs file. Here’s the httpsvr.njs
file:
var http = require('http');
var static = require('node-static');
var file = new static.Server();
http.createServer(function (req, res) {
file.serve(req, res);
}).listen(1337, '127.0.0.1');
console.log('Server running at');
By cross-referencing the call stack with the source code, the require() function that
attempts to load the node-static module is the function call in which the error occur‐
red. This is consistent with the error message: “Cannot find module ‘node-static’”.
If we look up the call stack, we see the Function._load() function and the Function
._resolveFilename() function at the top. Looking at the name of these two functions,
we guess that the Node.js environment is having difficulty loading the module because
it cannot find the file that is associated with the module. We can guess that the module
file (probably the npm package) is missing because it has not been installed yet. Again,
this is consistent with the error message: “Cannot find module ‘node-static’”.
The Object.<anonymous> so-called function probably indicates that the require()
function call was made in the global space, instead of within a user-defined function in
httpsvr.njs. But that is not always the case. An anonymous object may be generated inside
a user-defined function. But farther down the call stack, below the Object.<anony
mous> function call, we see that the caller was the Module._compile function in the
module.js file. The require() function call was made in the global space.
Using all this information, one solution is to try to install the node-static npm package:
npm install node-static
8 | Chapter 1: Node.js Basics
Admittedly, you won’t need to do all this analysis every time you see a Node.js call stack.
But since you will be seeing many, many call stacks, you should understand how to
thoroughly analyze one—especially because catching and fixing errors is what takes 95%
of the time in a PHP to Node.js conversion.
In summary, here’s the process to analyze a call stack: read the error, look at the error
message (if any), take a guess and focus on a particular function call in your own code,
look at the code and find the line and perhaps even the position of the error, look up
the stack to see if it indicates more detail about what the error might be, and look down
the stack to see how the execution of the server got to that particular function call.
Eclipse PDT
Learning how to fully analyze a stack trace is one helpful skill for doing a successful PHP
to Node.js conversion. A stack trace is a diagnostic tool for figuring out what is wrong
with the code, like an x-ray is used by a doctor to figure out what is wrong with his
patient. From a certain point of view, converting PHP to Node.js can be seen as similar
to a complex surgery on a patient. You will be performing surgery on PHP and Node.js
code. Like performing surgery, it takes a lot of skill and tenacity, but having a good
environment can really help, too. Just like the x-ray is a tool used in the operating room,
the stack trace will be a tool in the development environment for the conversion. Next,
we will discuss integrated development environments, which will provide a sort of “op‐
erating room theater” for the conversion process.
Since you will probably be dealing with dozens of PHP files and tens of thousands of
lines of PHP and, very soon, dozens of Node.js files and tens of thousands of lines of
Node.js, a simple plain text editor will probably not be good enough to keep track of
everything and keep the conversion process efficient. A plain text editor will be fine
when you are typing in some simple examples to learn how to program using Node.js,
but when you are dealing with a large amount of PHP and Node.js code, you will need
something more effective.
If you were developing PHP or Node.js code by itself, you could choose a single language
integrated development environment (IDE) and use it nearly straight out of the box.
Eclipse PDT (PHP Development Tools) is a popular PHP IDE written in Java that is
produced by the Eclipse Foundation. Some others are Zend Studio, PHPEdit, and
Dreamweaver. On the Node.js side, there are fewer choices, and they are of more dubious
popularity and effectiveness. At the time of this writing, I found Komodo Edit, nide,
and Cloud9.
Eclipse PDT | 9
However, your objective is to convert PHP code to Node.js code while simultaneously
improving and adding features to both codebases. To do this effectively, I recommend
using the Eclipse PDT, but with some modifications to help it support Node.js code.
Additional knowledge on how to easily compare PHP and Node.js code will be needed
to support the conversion process.
Now, before I describe how to set up Eclipse PDT for PHP to Node.js conversion, I
should briefly address developers who reject such tools and insist on using simple plain
text editors. They say, “I only use vi!” If you are somebody who feels this way, you are
free to skip the rest of this chapter and set up your conversion environment in any way
that works for you. I am describing the installation and modification of Eclipse PDT
here only because it was an essential tool for me to do my own PHP to Node.js conversion
project and it will be an essential tool for a lot of other developers as well.
To install Elipse PDT, first download Java. All the Eclipse IDEs are developed in Java
and need Java to run, including the Eclipse PDT. I prefer to install the Java JDK instead
of the JRE. At the time of this writing, I am using jdk-6u29-windows-i586.exe.
Next, browse to here. Consider using the Zend Server Community Edition (CE) instal‐
lation, which includes Eclipse PDT, the Zend Server HTTP server with built-in PHP
debugging support, and even the MySQL database. I assume that your PHP web appli‐
cation uses the MySQL database or at least has the MySQL database as an option.
As of this writing, there is a PDT and Zend Server Community Edition link on the
Eclipse PDT downloads page. If the link does not exist or you have a different web server
already running, download the latest stable Eclipse PDT version that is appropriate for
your operating system. Then, skip the next few paragraphs until the text describes in‐
stalling and configuring the Eclipse PDT. Otherwise, follow the link and download the
Eclipse PDT for Zend Server CE. For now, I am using zend-eclipse-php-helios-win32-
x86.zip. Unzip but do not run the Eclipse PDT yet.
From the same web page, download Zend Server CE itself. At this time, I am using
ZendServer-CE-php-5.3.8-5.5.0-Windows_x86.exe.
Install Zend Server CE. In brief, choose sensible, mostly default, selections until the
Setup Type page. Select the Custom radio button on the Setup Type page, instead of the
Typical radio button, and press the Next button. Check the “MySQL Server (separate
download)” checkbox from the Custom Setup page. Then finish the installer.
Currently, Zend Server CE shows a browser to configure the way that it operates. In our
case, no special configuration is needed for the server itself.
The MySQL database server is installed and configured as part of the Zend Server CE
installer. By default, the root password for the MySQL database server is the empty
string (a.k.a. “”).
10 | Chapter 1: Node.js Basics
Run the Eclipse PDT. Zend Server CE is built on Apache 2 and has an htdocs folder.
When the Eclipse PDT runs, find and select the htdocs folder as the Eclipse PDT Work‐
space folder. If you are using a different web server than Zend Server CE or Apache,
select the document root as the Eclipse PDT Workspace folder so the PHP files that are
deployed to the web server can be edited in place.
It is beyond the scope of this book, but if you wish, try to experiment with using the
PHP debugger on your existing PHP codebase.
The Eclipse PDT and your web server will be the foundation of your “conversion de‐
velopment environment.” Now, let’s make some modifications and learn how to use the
Eclipse PDT to effectively manage and implement the conversion process.
The Eclipse PDT, by itself, already supports JavaScript files, and since Node.js is Java‐
Script, it supports Node.js. But because the .njs file extension is nonstandard, Eclipse
PDT does not recognize a .njs file as a Node.js file. So if a .njs file (e.g., httpsvr.njs) is
opened in Eclipse PDT, it is shown as plain text with no syntax coloring or popup code
completion like in a regular JavaScript (.js) file.
To modify Eclipse PDT to recognize .njs files as Node.js files, open the Window menu
from the Eclipse PDT main menu and select the Preferences menu item. When you do
this, you will see the Preferences dialog box with two inset panes (Figure 1-1). In the
left pane, you will see a tree control with a hierarchically organized group of categories
and subcategories of preferences. In the right pane, you will see a dialog that allows you
to view and edit the preference items for the currently selected category in the left pane.
In the left pane, open the General tree folder item, then select the Content Types tree
item. In the right pane, you will see a list of content types. Open the Text tree folder item
in the “Content types” tree control in the right pane. Beneath the Text tree folder item,
select the JavaScript Source File tree item. When you select the JavaScript Source File
tree item, you should see a list box with a single item, “*.js (locked)”, in the “File asso‐
ciations” list box along with an Add… button on the middle-right of the pane. Press the
Add… button. Once the Add… button is pressed, the Add Content Type Association
dialog box should pop up (Figure 1-2). You will type *.njs into the “Content type” edit
box in that new dialog box.
Then, press the OK button on all the open dialog boxes to store the modifications.
When that modification is saved, JavaScript syntax coloring and code completion will
work for Node.js source files that are stored as .njs files.
Eclipse PDT | 11
Figure 1-1. Eclipse PDT Preferences dialog box
With syntax coloring working for .njs files, you can spot simple Node.js syntax errors
by noticing that some words have the wrong color. Visual inspection is an important
part of any programming project, particularly in a PHP to Node.js conversion project.
Another useful visual inspection technique is comparing the PHP and Node.js code‐
bases using an advanced and very visual diff viewer to find out all kinds of things about
the quality and progress of the conversion.
A diff program shows the difference between two files. Simple text-based diff programs
usually print out the differences as monochrome lines of text, each line from a single
file. That kind of diff program is useless for analyzing a PHP to Node.js conversion. A
sophisticated visual diff program is needed. Instead of showing files as alternating lines
of text, the files will be shown side by side. Instead of monochrome, color will be used.
Instead of showing only which lines are different, the differences within the lines—down
to the character level—will be reconciled and shown.
12 | Chapter 1: Node.js Basics
Figure 1-2. Eclipse PDT Add Content Type Association dialog box
Eclipse PDT has an advanced visual diff viewer built in. We can use this viewer to
compare a .php file to its corresponding .njs file. To use the viewer of a .php file and
a .njs file, select both files. Then, right-click one of them and select the Compare With
submenu and then the Each Other menu item within that submenu. Figure 1-3 shows
a screenshot of the Eclipse PDT viewer comparing a simple .php file with its corre‐
sponding .njs file.
Eclipse PDT | 13
Figure 1-3. Eclipse PDT Compare view
Y
ou do not need to look at the figure in detail to either understand how it works or see
just how similar PHP and Node.js are.
On the left is the rand.njs file. On the right is the rand.php file. The differences are in
gray; the identical sequences of characters that have been matched are in white.
Notice how many of the lines are almost completely in white, except for a stray dollar
sign ($) in gray. Both PHP and Node.js use the keyword function in the same place and
put the name of the function in the same place. Over the years, it has become common
for new languages to eschew variation in syntax structure and adopt a similar syntax
for things like defining functions. Also, notice that the while statement is very similar.
It benefits the developer to make it easy for the visual diff to compare the .php file to its
corresponding .njs file. The visual diff feature in Eclipse PDT is very good but it is not
infallible. Sometimes, moving around code in either file may allow the comparison
algorithm of the visual diff feature to find more matches; that is, the visual diff feature
will show more white in both files. Copying a function so that it is earlier or later in a
14 | Chapter 1: Node.js Basics
file might be irrelevant to the performance and functionality of the code, but might
make the visual diff feature match up the code much more accurately. It is worth spend‐
ing some time periodically throughout the conversion process to experiment with mov‐
ing code around in each file and seeing the effect on the comparison.
In Eclipse PDT, the code can be edited in a separate window, in the comparison window
itself, or in both. If it is edited in a separate window and saved, any comparison windows
that show the same file will be reloaded and recompared. Making some tweaks in a
separate window and saving the file so that the effect on the comparison can be deter‐
mined is a common technique.
Naturally, it really helps to keep the code in the same format in both files to use the same
names for everything (such as functions and variables), and even to refactor the code
in one or both files such that the visual diff feature will find as many matches as possible.
To keep the PHP and Node.js code synchronized and simultaneously improve and add
features to both codebases, you will often rely on the visual diff to make sure that the
PHP and Node.js code are correct. In time, a developer will develop a finely tuned sense
of what is not enough white and what is too much white.
When there isn’t enough white, the visual diff feature usually is getting off track and
trying to match PHP code in the .php file to Node.js code in the .njs file, which is not
meant to be matched. There will be a lot of gray in the comparison, indicating differ‐
ences, and not each matches. Experimentation will often correct this issue.
When there is too much white, it often means that there is some PHP code in the .njs
file that has not been converted completely to Node.js code. Even though the .njs file
can be parsed and run, too much white indicates that more conversion is needed. Often,
eyeballing the Node.js code will indicate specific conversions that have not been done
yet. One simple conversion that may be missed is that dollar signs ($) need to be added
to PHP variables; dollar signs are not used on Node.js variables. Adding dollar signs to
the PHP code will reduce the amount of white, bringing the comparison closer to having
the right amount of white.
Visual inspection, especially using the visual diff feature, is much faster than interactively
testing the PHP and the Node.js code. Visual inspection can act as a “smoke test” to
determine if the conversion is approximately correct. Automated test cases, which are
beyond the scope of this book, may also be used to quickly test the effectiveness of the
conversion so far.
Throughout the book, there will be opportunities to convert a particular code element
of a large amount of PHP code into the corresponding code element for Node.js code.
For example, a PHP associative array is created by calling the PHP array() function,
whereas in Node.js, it is often created by using the object literal notation, which uses
curly brackets ( { and } ). When the contents of an entire .php file are copied wholesale
into a .njs file at the start of the conversion of the code, the .njs file will then obviously
Eclipse PDT | 15
contain many PHP array() function calls that will need to be replaced by Node.js object
literals. A simple way to address this particular conversion issue might be to simply use
Eclipse PDT’s Find/Replace feature to do a global search for array( and universally
replace it with a left curly bracket ( { ); see Figure 1-4.
Figure 1-4. Eclipse PDT Find/Replace dialog box
The operation of this dialog box is straightforward.
Rather than including a screenshot of the Find/Replace dialog box every time that it is
needed, this book uses a text shorthand. For the Find/Replace dialog box options in the
figure, the text will have the following blurb inserted:
Operation: "Find/Replace" in Eclipse PDT
Find: array(
Replace: {
Options: Case sensitive
Action: Replace All
The Find/Replace dialog box can be used in two different ways.
One way is to do what I call a “blind” global find-and-replace action, like the example
find-and-replace blurb in Figure 1-4. I call it “blind” because it finds and replaces every
occurrence in the file all at once, with no warning and no manual inspection. If all the
Find/Replace dialog box values are tested and determined to be foolproof, a “blind”
global find-and-replace action is fast and accurate. Unfortunately, if the result causes an
error, there are only two options: undo the action or perform a new action that corrects
the previous action.
The second option for find-and-replace action repair work is worth pointing out. Some‐
times, it is better to do a simple-to-understand find-and-replace action that will correctly
16 | Chapter 1: Node.js Basics
convert 298 code elements and incorrectly convert two code elements than it is to do a
complicated find-and-replace action that correctly converts the same 300 code elements.
Manually finding and fixing a few edge cases is a worthwhile technique; not everything
needs to be fully automatic. Even though PHP to Node.js conversion is a lengthy task,
it is not a task that you will be running over and over. This book is not describing
“continuous conversion”; it is describing conversion as a one-time event. So manually
finding and fixing a few edge cases is a perfectly acceptable technique to get the job
done.
A second way to use the Find/Replace dialog box is to do a step-by-step global find-
and-replace action. First, the Find/Replace dialog box is used to find the first instance.
The developer then examines the instance and decides whether to modify the code
manually (which he can do by clicking on the code and without dismissing the dialog
box), or to execute the replace (by pressing the Replace/Find button), or to skip to the
next instance without changing the current instance (by pressing the Find button again).
Here’s the blurb for a step-by-step global find-and-replace action:
Operation: "Find/Replace" in Eclipse PDT
Find: array(
Replace: {
Options: Case sensitive
Action: Find, then Replace/Find
The Find/Replace dialog box in the Eclipse PDT can also use regular expressions. Reg‐
ular expressions are a pattern matching technique: instead of finding an exact phrase,
a regular expression describes a pattern to search for. Each time that the pattern is found,
the exact phrase that matches the pattern can be applied to the Replace field. For ex‐
ample, if the array\((.*)\) regular expression matches array(id=>'name'), the (.*)
in the regular expression will save the id=>'name' text. This saved text is called a capture
field, or less commonly, a capture group. In the Eclipse PDT Find/Replace dialog box,
a capture field is captured by surrounding it with undelimited parentheses. To apply a
capture field to the Replace field, the capture fields are enumerated according to the
order that they were captured in the Find field. A dollar sign ($) indicates that a capture
field is being specified, followed by the capture field number. For example, $1 in the
Replace field indicates the first capture field, which, in the example earlier in this para‐
graph, would contain the id=>'name' text. Very often, there is only one capture field,
so it is very common to only see $1 and rarely to see $2, $3, or beyond.
Here’s a blurb for a blind global find-and-replace action using regular expressions:
Operation: "Find/Replace" in Eclipse PDT
Find: array\((.*)\)
Replace: {$1}
Options: Case sensitive, Regular expressions
Action: Replace All
Eclipse PDT | 17
In converting PHP to Node.js, regular expressions are only tangential to the process, so
this book will not be giving a primer on how to understand and write your own regular
expressions. The regular expressions will be provided as part of blurbs for find-and-
replace actions that can be copied to the appropriate fields of the Find/Replace dialog
box in the Eclipse PDT, usually verbatim, without requiring you to understand or modify
them. If you need additional help with regular expressions or need to understand the
rules and how they work, you are encouraged to consult the Eclipse PDT and to use
Google or a similar search engine to find websites, blogs, and forums that will answer
your questions.
Find-and-replace actions with regular expressions are often more comprehensive and
effective than literal find-and-replace actions (i.e., actions where only one specific string
is matched). A regular expression allows more variation in what it can match, and with
capture fields, it can transport that variation to the Replace field. Often, a literal find-
and-replace will be able to match only the beginning of a code element or the end of a
code element at one time because the code element can vary in the middle. With a regular
expression, the middle can be matched to a pattern that allows the entire code element
to be matched in a single find-and-replace action. When the conversion of a code ele‐
ment can be done in a single find-and-replace action, instead of multiple ones, the
chances for errors are reduced.
Until now, this chapter has described a range of activities and knowledge about how to
set up a development environment for doing a PHP to Node.js conversion. The first
thing to do was to download and install Node.js itself and become familiar with the two
executables that it comes with. After that, we dug into Node.js stack traces to learn how
to read them and how to use them to find what the real, underlying problem is such that
the coding issue can be addressed and repaired. Then, we set up the Eclipse PDT as a
foundation for a development environment, including a modification for it to under‐
stand .njs files, geared toward PHP to Node.js conversion. And finally, we learned how
to use the visual diff feature and find-and-replace actions that will be very important
when doing the conversion.
A capable development environment is essential to efficiency and is the way that big
efforts get done. Too often, amateur developers will leap into coding with an inefficient
or even an annoying development environment. At first, the development will go quickly
in any environment because a small amount of code is simple to improve upon. But as
the codebase grows larger, the complexity of the code will also grow and the pace of
development will slow down. An inefficient or annoying development environment will
do nothing to help the developer with the complexity, but a capable development envi‐
ronment will simplify the knowledge needed and help the developer such that the pace
can be sustained and, ultimately, the project finished.
With a PHP to Node.js conversion, it is assumed that a large PHP codebase already exists.
At the end of the conversion, it is expected that the codebase will more than double in
18 | Chapter 1: Node.js Basics
size: the PHP code will be refactored for conversion, not brevity, so it will increase, and
of course, an entire Node.js codebase will be added. The initial PHP codebase might
have been created by many developers, but in conversions, there is often so much cou‐
pling between the activities that only a single developer will do the majority of the
conversion. Even though a primitive development environment might have been ac‐
ceptable for the creation of the original PHP codebase, a more sophisticated develop‐
ment environment will be needed to convert it to Node.js.
If a project already has an existing development environment, it may not be necessary
to adopt the Eclipse PDT. The Eclipse PDT is presented as a workable, prototypical
environment suitable only for conversion activities. Alternative development environ‐
ments can work if they can support and be coupled with additional tools that support
the features in this chapter. In summary, they need to be made to support the following
syntax coloring for both .php and .njs files, visual side-by-side comparison between two
files down to a word-by-word comparison and not just line-by-line comparison, and
find-and-replace actions that support regular expressions.
Now that all the infrastructure for the conversion is ready, we can move on to creating
the initial .njs file that will host the new Node.js code. In the next chapter, a template
for an initial .njs file will be presented such that, in subsequent chapters, PHP code can
be refactored for conversion and actual PHP code can be copied into Node.js files and
transformed into working Node.js code.
Eclipse PDT | 19
CHAPTER 2
A Simple Node.js Framework
In the previous chapter, I presented a development environment along with a general
education about how to use it to execute a conversion. In this chapter, we will start using
that development environment and begin the actual conversion.
An HTTP Server
In PHP, a PHP file represents an HTML page. A web server, such as Apache, accepts
requests and if a PHP page is requested, the web server runs the PHP. But in Node.js,
the main Node.js file represents the entire web server. It does not run inside a web server
like Apache; it replaces Apache. So, some bootstrap Node.js code is needed to make the
web server work.
The httpsvr.njs file was presented as an example in the previous chapter. Here’s the
Node.js code for the httpsvr.njs file:
var http = require('http');
var static = require('node-static');
var file = new static.Server();
http.createServer(function (req, res) {
file.serve(req, res);
}).listen(1337, '127.0.0.1');
console.log('Server running at');
How does this work?
As described in the previous chapter, the Node.js require() API function makes a
module available for use. The first two lines show a built-in module and an external
module:
var http = require('http'); // built-in module
var static = require('node-static'); // external module
21
If you installed Node.js and followed the examples in the previous chapter, the node-
static npm package, which contains the node-static external module, will already be
installed. If not, install it now using the npm executable:
npm install node-static
The third line is a little tricky:
var file = new static.Server();
The node-static module wants to provide the Node.js server with as many file serving
objects as needed rather than limit the client to a single file serving object. So, instead
of using the module itself as the file serving object, the file serving object is created by
calling a constructor function. A constructor function is a function that is designed to
be used with the new keyword. Using the new keyword and invoking the constructor
function creates a new object.
In this case, the module object is named static. Inside the module object, there is a key
named Server, which has a value that is a constructor function. The dot (.) operator
indicates this relationship such that the new operator is properly applied. A newly con‐
structed file serving object is created and stored in the file variable.
The file serving object constructor can take zero or one arguments. If no arguments are
provided, the file serving object uses the current directory (folder) as the HTTP server’s
top-level documents directory. For example, if the httpsvr.njs is run in the ferris directory
and a web browser such as Google Chrome goes to, the
file serving object will look for the hello.html file in the ferris directory. However, if a
web browser goes to, the file serving object will
look for the goodbye.html file in the exit directory inside the ferris directory.
However, when one argument is passed to the file serving object constructor, the file
serving object will look for files in the directory specified in the argument. For example,
if the .. string is passed as the argument, the newly created file serving object will look
for files in the parent directory of the current directory.
The require() function takes only one argument, the name of the module to load. There
is no flexibility to pass additional arguments to the module while loading. Since it is
desirable to specify a directory to load files from as an argument, it is best that loading
the module be completely separate from specifying where to load files from.
After creating a file serving object, the HTTP server object is created to accept HTTP
requests and return the file to the client, probably a web browser:
http.createServer(function (req, res) {
file.serve(req, res);
}).listen(1337, '127.0.0.1');
22 | Chapter 2: A Simple Node.js Framework
This code can be rewritten as three statements to make it easier to understand:
var
handleReq
=
function
(
req
,
res
)
{
file
.
serve
(
req
,
res
);
};
var
svr
=
http
.
createServer
(
handleReq
);
svr
.
listen
(
1337
,
'127.0.0.1'
);
Th
e first statement takes up three lines. It defines a variable named
handleReq
that,
instead of containing a “normal” value like a string or a number, contains a function. In
Node.js, functions can be assigned to variables, just like strings and numbers. When
a
function is assigned to a variable, the function itself is called a
callback
, and for our
convenience, the variable that it is assigned to is called a
callback variable
. A callback
variable is defined nearly the same as a regular function is defined, except that a callback
can be unnamed and is preceded by a variable assignment.
In this case, the callback expects two parameters. The first parameter,
req
, contains all
the data related to the HTTP request. The second parameter,
res
, contains all the data
related to the HTTP response. In this implementation, the file serving object,
file
,
decodes the HTTP request, finds the appropriate file on the hard disk, and writes the
appropriate data to the HTTP response such that the file will be returned to the browser.
The
node-static
module was specifically written with this in mind, so that the file
serving object could return hard disk files with only one line of code.
The fourth line creates an HTTP server and an HTTP request handling loop that will
continuously wait for new HTTP requests and use the
handleReq
callback variable to
fulfill them:
var
svr
=
http
.
createServer
(
handleReq
);
Inside the
createServer()
function, the
handleReq
callback variable will be invoked:
function
createServer
(
handleReq
)
{
while
(
true
)
{
// wait for HTTP request
var
req
=
decodeHttpRequest
();
// somehow decode the request
var
res
=
createHttpRequest
();
// somehow create a response object
handleReq
(
req
,
res
);
// invoke handleReq()
// send HTTP response back to client based on "res" object
}
}
Like functions (but unlike other types of variables), a callback variable can invoke the
function that it contains. As you can see, invoking the
handleReq
callback argument is
identical to calling a standard function; it just so happens that
handleReq
is not the name
of a function but is the name of a callback variable or argument. Callback variables can
be passed to functions as arguments just like other kinds of variables.
Why not just hardcode the
file.serve()
call into the
createServer()
function? Isn’t
serving files what a web server does?
An HTTP Server | 23
function createServer(handleReq) {
while (true) {
// wait for HTTP request
var req = decodeHttpRequest(); // somehow decode the request
var res = createHttpRequest(); // somehow create a response object
file.serve(req, res); // hardcode a reference to the "node static" module
// send HTTP response back to the client based on "res" object
}
}
Yes, but passing a callback to the createServer() function is more flexible. Remember:
the http module is built into Node.js and the node static module is an npm package
that was installed separately. If the file.serve() call was baked into the create
Server() function, using a different module instead of the node static module or
adding additional custom HTTP request handling code would require copying and
pasting the entire createServer() function just so a line in the middle could be tweaked.
Instead, a callback is used. So, if you think about it, a callback is a way for some calling
code to insert some of its own code into a function that it is calling. It is a way to modify
the function that it is calling without having to modify the code of the function itself.
The function being called, createServer() in this case, has to expect and support the
callback, but if it is written with the callback in mind, a caller can create a callback that
matches what is expected and the called function can use it without knowing anything
about the calling code. Callbacks enable two pieces of code to successfully work together,
even though they are written by different people at different times.
In this case, a callback function is passed to allow the caller to handle an HTTP request
in whatever way that it sees fit. But, in many other cases, a callback function is passed
as an argument so that the callback function can be invoked when an asynchronous
operation has been completed. In the next chapter, this use of callback functions will be
covered in detail.
The fifth line uses the svr object to listen on port 1337 on the '127.0.0.1' computer,
a.k.a. the “localhost” computer (meaning the computer that the Node.js server is run‐
ning on):
svr.listen(1337, '127.0.0.1');
It should be pointed out that it is much more likely that the HTTP request handling
loop is in the listen() function instead of the createServer() function. But for the
purposes of explaining callbacks, it really does not matter.
Since the svr variable and the handleReq variable are used only once and can be replaced
with more succinct code, the three statements are combined into one:
http.createServer(function(req, res) {
file.serve(req, res);
}).listen(1337, '127.0.0.1');
24 | Chapter 2: A Simple Node.js Framework
The last statement of the httpsvr.njs file writes a message to the console so that the person
who started the HTTP server will know how to access it:
console.log('Server running at');
The httpsvr.njs file makes a basic Node.js HTTP server. Now we move all the files that
constitute the web application from the current web server that supports PHP to the
same directory that the httpsvr.njs file resides in. When the httpsvr.njs file is started,
these files—which include all the HTML, CSS, client-side JavaScript, image files (e.g.,
PNG files), and other assorted files—will be delivered to the client, probably a web
browser, and work just as they always have. The client needs to be directed only to the
correct port (e.g., 1337) to load these files from Node.js instead of the original web server.
The only reason that the web application will break is that it is still written in PHP, but
since HTML, CSS, client-side JavaScript, and image files are all handled and executed
exclusively on the client, they will work as much as they can until a PHP file is needed.
The .php files can be moved to the Node.js server, too, but they will not work because
Node.js cannot interpret .php files.
The key difference between the .php files and all the other files is that the .php files are
interpreted and the result of the interpretation is passed back to the client as an HTTP
response. For all other files, the contents of the file are read and then written directly
into the HTTP response with no interpretation. If the .php file is not interpreted, the
client receives the PHP source code, which it does not know how to use. The client needs
the output of the source code, not the source code itself, in order to work. A PHP to
Node.js conversion boils down to writing Node.js code that will produce the exact same
HTTP response in all cases that the PHP source code would have produced. It seems
simple, but it is still a ton of work.
To start with, a Node.js local module will be created for each .php file. For the purposes
of this book, a local module is a local .njs file that can be loaded by the main .njs file
(i.e., httpsvr.njs) using the Node.js require() API function. To create a Node.js local
module for a .php file, we will create an empty .njs file in the same directory as
the .php file using the same filename but a different extension. For example, for admin/
index.php, create an empty admin/index.njs file.
For your own conversion effort, you will have to use your own judgment. In some cases,
there may be so many .php files that creating the corresponding .njs files will be a lot of
busywork, so it may be better just to do a few at first. In other cases, there may be only
a few .php files, so it may make sense to create all the empty files at once.
Once there is a corresponding .njs file for some .php files, choose one of the .php files
and edit its corresponding .njs file:
exports.serve = function(req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('admin/index.njs');
};
An HTTP Server | 25
Type this Node.js code into the .njs file and change the res.end() function call imple‐
mentation to indicate the correct path (in this case, admin/index.njs) to the particu‐
Enter the password to open this PDF file:
File name:
-
File size:
-
Title:
-
Author:
-
Subject:
-
Keywords:
-
Creation Date:
-
Modification Date:
-
Creator:
-
PDF Producer:
-
PDF Version:
-
Page Count:
-
Preparing document for printing…
0%
Commentaires 0
Connectez-vous pour poster un commentaire | https://www.techylib.com/fr/view/bootlessbwak/node.js_for_php_developers | CC-MAIN-2021-31 | refinedweb | 13,600 | 65.01 |
Subdomain forwarding directs a subdomain of your domain to an existing URL.
Create a subdomain to forward
To create a subdomain and forward it to a URL:
- Select the name of your domain.
- Open the menu
.
- Click DNS.
- Scroll down to Synthetic records.
- From the list of synthetic record types, select Subdomain forward from the list of synthetic record types.
- Add a synthetic record by entering the following information:
- Subdomain: Enter the subdomain you're forwarding, www, or @ for the root domain.
- Destination URL: Enter the address you're directing the above subdomain to.
- Type of redirect: This selection determines how routers and browsers store your subdomain forwarding information. If you're not sure which to use, choose Temporary (302). Learn more about types of redirects.
- Path forwarding: If you're not sure, leave path forwarding off. Learn more about path forwarding.
- Secure Sockets Layer (SSL): Choose whether to enable or disable SSL. Learn more about SSL and secure namespace.
- Click Add to accept the changes to your resource record.
In a short time (up to a few minutes), your subdomain will lead directly to the destination URL.
Note: To forward WWW and your root domain (also known as the "naked domain") , you can also use web forwarding.
Edit or delete records
You can change or delete records at any time. To edit or delete a record, follow these steps:
- Select the name of your domain.
- Open the menu
.
- Click DNS.
- Scroll down to Synthetic records.
- Find the record you want to edit or delete.
- To edit the record, click Edit. When you're done with your changes, click Save.
- To delete the record, click Delete. To confirm deletion, click Delete in the box that appears. | https://support.google.com/domains/answer/6072198 | CC-MAIN-2021-17 | refinedweb | 286 | 77.43 |
Environment: VC6 SP4, NT4 SP5, WIN 2000/98/95
Here is an easy solution for hiding/replacing the right-click menu on a Web browser window. An example would be my situation. I had to implement a news group reader and writer. The news reader/writer used IwebBrowser2 control as the message display/edit window. If you do a right-click on it, there is an option View Source,.. other menu items. If I had an option, I want to act like I implemented everything from scratch, but the right-click menu put a hole in my plan and revealed that I reused the IE control. Besides, anyway, we didn't want our users to mess around with HTML source code, and so forth, or expose some of them to brain damage from seeing real weird stuff while all they asked for was some news group item. The Web browser captures the right-click and shows the default IE right click menu. So how do I remove it?
BOOL CWebBrowserTestApp::PreTranslateMessage(MSG* pMsg) { // We have a right click if ( (WM_RBUTTONDOWN == pMsg->message) || (WM_RBUTTONDBLCLK == pMsg->message)) { // Now verify it is from our Web browser CWebBrowserTestDlg* pWBDlg = (CWebBrowserTestDlg*)AfxGetMainWnd(); if(pWBDlg->isThisOurBrowser(pMsg->hwnd)) { // If so, show our menu! pWBDlg->showOurMenu(); // mark as handled return TRUE; } return CWinApp::PreTranslateMessage(pMsg); }
Now that I have trapped the right click, I will have to ask the window that owns the Web browser control to see if the window that got the right click is a Web browser window. It is a little twitchy here. I will have to specifically go case by case, meaning I will have to check, if not this Web browser, the other usage instance of webbrowser and other (meaning if a dialog box had three controls which were Web browsers, I might have a CWnd m_WndBrowser1, CWnd m_WndBrowser2, and CWnd m_WndBrowser3). In the attached example, I have a dialog with one webbrowser control in it. I have a member variable for the Web browser window as follows.
CWnd m_WndBrowser
My function will have to do a little bit more than just matching the window handles. Why so? A nested frame inside IE is again an instance of IE. HTMLs having nested frames will return a different window handle for different frames inside the same parent IE window. So what will be my logic?! I will have to traverse via GetParent from a frame to the parent IE window, whose window handle I already know or till I don't have a parent of type IE. How do we know if it's an IE Window? The Window class name will be "Internet Explorer_Server." That's what the next function does, see if our window is an Internet Explorer, if so we know, the outer shell window will be the parent of doc-view which will be the parent of the IE class window.
// This fn checks if this is a IE type window and returns // the outer hosting Shell window handle for it, if it is // one! else NULL HWND CWebBrowserTestDlg::getParentWebBrowserWnd(HWND hMyWnd) { HWND hRetWBWnd = NULL; static TCHAR tszIEClass[] = "Internet Explorer_Server"; TCHAR tszClass[sizeof(tszIEClass)+1]; // Compare if our window is of type IE class ::GetClassName( hMyWnd,tszClass,sizeof(tszClass)); if(0 == _tcscmp(tszClass, tszIEClass)) { // Then get the Shell which hosts the IE doc view window hRetWBWnd = ::GetParent(::GetParent(hMyWnd)); } return hRetWBWnd; } // Checks if message window is our WebBrowser control // and if so returns TRUE BOOL CWebBrowserTestDlg::isThisOurBrowser(HWND hMyWnd) { HWND hWndOurWebBrowser = (HWND)m_WndBrowser.GetSafeHwnd(); // Get the Parent Web browser window if any HWND hParentWBWnd = getParentWebBrowserWnd(hMyWnd); // Now, we can have nested frames .. // meaning a frame inside a frame is yet another webbrowser // So our m_WndBrowser guy can be way up there .. // so we have to iterate up to him through parent frames // till we have a match or no more WB type parent while( (NULL != hParentWBWnd) && (hParentWBWnd != hWndOurWebBrowser)) { // Get the Parent of the Web browser window //I have, recursively hParentWBWnd = getParentWebBrowserWnd(::GetParent(hParentWBWnd)); } return (NULL != hParentWBWnd); }
Now the next function is a normal function to show a popup menu from a resource and I am not going to explain it. People who need explanation, please read the help file for TrackPopupMenu.
// This is a trivial fn which gets a submenu from a resource // and displays it at the current cursor position void CWebBrowserTestDlg::showOurMenu() { POINT CurPoint; GetCursorPos(&CurPoint); CMenu ReplaceMenu; //Make your custom menu here ReplaceMenu.LoadMenu(IDR_RIGHTCLICK); // Do we have a menu loaded? if(::IsMenu(ReplaceMenu.m_hMenu)) { // this is my popup menu CMenu* pMyPopup = ReplaceMenu.GetSubMenu(0); if(NULL != pMyPopup) { // Show it pMyPopup->TrackPopupMenu (TPM_LEFTALIGN | TPM_RIGHTBUTTON, CurPoint.x, CurPoint.y, this ); // deleting me and my parent when I am done pMyPopup->DestroyMenu(); ReplaceMenu.DestroyMenu(); } } }
Downloads
Download demo project - 16.6 Kb
There are no comments yet. Be the first to comment! | https://www.codeguru.com/cpp/i-n/ieprogram/article.php/c4401/How-to-ModifyRemove-RightClick-Menu-in-IE-WebBrowser-Control.htm | CC-MAIN-2018-43 | refinedweb | 804 | 61.06 |
Input and output¶
Introduction¶¶
SciPy¶: {{{#!python numbers=disable >>> from numpy import * >>> from pylab import load # warning, the load() function of numpy will be shadowed >>> from pylab import save >>> data = zeros((3,3)) >>> save('myfile.txt', data) >>> read_data = load("myfile.txt")
>>> savetxt('myfile.txt', data, fmt="%12.6G") # save to file
>>> from numpy import * >>> data = genfromtxt('table.dat', unpack=True)
csv files¶¶
Or, assuming you have imported numpy as N, you may want to read arbitrary column types. You can also return a recarray, which let's you assign 'column headings' to your array.
def read_array(filename, dtype, separator=','): """ Read a file with an arbitrary number of columns. The type of data in each column is arbitrary It will be cast to the given dtype at runtime """ cast = N.cast data = [[] for dummy in xrange(len(dtype))] for line in open(filename, 'r'): fields = line.strip().split(separator) for i, number in enumerate(fields): data[i].append(number) for i in xrange(len(dtype)): data[i] = cast[dtype[i]](data¶
The advantage of binary files is the huge reduction in file size. The price paid is losing human readability, and in some formats, losing portability.
Let us consider the array in the previous example.
File format with metadata¶
The simplest possibility is to use 's own binary file format. See , and .
>>> numpy.save('test.npy', data) >>> data2 = numpy.load('test.npy')
You can save several arrays in a single file using . When loading an file you get an object of type .¶ 1). and . Following the previous example:
>>> data.tofile('myfile.dat') >>> fd = open('myfile.dat', 'rb') >>> read_data = numpy.fromfile(file=fd, dtype=numpy.uint8).reshape(shape)}}}. {{{#! python numbers=disable >>> numpy.save('test.npy', data) >>> data2 = numpy.load('test.npy')
Another, but deprecated, way to fully control endianness (byteorder), storage order (row-major, column-major) for rank > 1 arrays and datatypes that are written and read back is .()
>>> from numpy.lib import format >>> help(format)
Here is a minimal C example `cex.c`:
#include"npy.h" int main(){ double a[2][4] = { { 1, 2, 3, 4 }, { 5, 6, 7, 8 } }; int shape[2] = { 2, 4 }, fortran_order = 0; npy_save_double("ca.npy", fortran_order, 2, shape, &a[0][0]); return 0; }
Section author: Unknown[5], VincentNijs, Unknown[56], FredericPetit, Elby, MartinSpacek, Unknown[57], Unknown[58], Unknown[53], AMArchibald, Unknown[59], Unknown[60], Unknown[61], Unknown[62], MikeToews | http://scipy-cookbook.readthedocs.io/items/InputOutput.html | CC-MAIN-2017-39 | refinedweb | 395 | 51.24 |
Given an array of strings arr[]. Sort given strings using Bubble Sort and display the sorted array.
In Bubble Sort, the two successive strings arr[i] and arr[i+1] are exchanged whenever arr[i]> arr[i+1]. The larger values sink to the bottom and hence called sinking sort. At the end of each pass, smaller values gradually “bubble” their way upward to the top and hence called bubble sort.
After all the passes, we get all the strings in sorted order. Complexity of the above algorithm will be O(N2).
Let us look at the code snippet:
#include<bits/stdc++.h> using namespace std; #define MAX 100 void sortStrings(char arr[][MAX], int n) { char temp[MAX]; // Sorting strings using bubble sort for (int j=0; j<n-1; j++) { for (int i=j+1; i<n; i++) { if (strcmp(arr[j], arr[i]) > 0) { strcpy(temp, arr[j]); strcpy(arr[j], arr[i]); strcpy(arr[i], temp); } } } } int main() { char arr[][MAX] = {"GeeksforGeeks","Quiz","Practice","Gblogs","Coding"}; int n = sizeof(arr)/sizeof(arr[0]); sortStrings(arr, n); printf("Strings in sorted order are : "); for (int i=0; i<n; i++) printf("\n String %d is %s", i+1, arr[i]); return 0; }
Output:
Strings in sorted order are : String 1 is Coding String 2 is Gblogs String 3 is GeeksforGeeks String 4 is Practice String 5 is Quiz
This article is contributed by Rah product of a triplet (subsequnece of size 3) in array
- Bubble Sort
- How to sort an array of dates in C/C++?
- std::sort() in C++ STL
- QuickSort
- Sorting all array elements except one
- Sort an array containing two types of elements
- Sorting | Natural Language Programming
- Sort the linked list in the order of elements appearing in the array
- Strand Sort
Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here. | https://www.geeksforgeeks.org/sorting-strings-using-bubble-sort-2/ | CC-MAIN-2018-13 | refinedweb | 314 | 57.5 |
Data Visualization Using Matplotlib: Part 1
Hi ML enthusiasts! Today, in this tutorial on Data Visualization using matplotlib, we will learn about visualizing data using the matplotlib library of Python.
Data Visualization is very important in the field of data science. When we are dealing with so much data, it becomes a necessity to visualize that data so that we can interpret and analyze the data effectively. Visualizing data in the form of graphs, tables makes us interpret more information in an easier and better way.
In this series of data visualization, we will learn about all the libraries of data visualization in Python like matplotlib, seaborn, bokeh, plotly and pygal. Let’s get started with this series by taking matplotlib as our first choice.
Step 1: Importing the required libraries
In this tutorial, we will be needing pandas, numpy, decimal and matplotlib libraries. We do this by the following code:
[sourcecode language=”python” wraplines=”false” collapse=”false”]
from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
from decimal import Decimal
[/sourcecode]
As you can see above, I have imported the pyplot module of the matplotlib library and have used ‘plt’ as an alias so that whenever we will be using any function related to that module, we will only have to use plt.
Step 2: Obtaining the data
In order to make learning easy, I have made my own data the code of which is given below:
[sourcecode language=”python” wraplines=”false” collapse=”false”]]
- The journey of obtaining our self-made data starts from generating random years of experience by using random module of the numpy library and using random function.
- Note that we have set the size = 10 to get years of experience for 10 employees. random function generates values between 0 to 1. So, we have multiplied it by 10 and then converted it into a list by using list() function.
- The list has values have 8 places after decimal. We don’t want that! We want only 1 place after decimal. So, I have to round it off using round(list, decimal_places) function.
- For this the list having values of type narray has been converted into a list having values of type Decimal using Decimal function. Then , we have used round function to round off the values to 1 decimal place.
- After doing this, we sort the list by using sort() function.
- To obtain employee id or eid, we have used list comprehension by converting the output of range function into a list.
- Note that the salary_per_month has values which are very large in comparison to years_of_experience. This may produce problems in plotting them. So, we do feature scaling by dividing the salary_per_month by 10,000 and storing the output in scaled_salary_per_month.
The outputs generated after doing all this is as follows:
[sourcecode language=”python” wraplines=”false” collapse=”false”]
years_of_experience: [0.6, 1.8, 3.3, 4.1, 4.2, 5.2, 6.1, 6.2, 6.9, 9.5]
salary_per_month: [25179.8, 28016.6, 52511.8, 53136.8, 60543.3, 66009.6, 72682.7, 88142.4, 89690.0, 98114.4]
eid: [‘e0’, ‘e1’, ‘e2’, ‘e3’, ‘e4’, ‘e5’, ‘e6’, ‘e7’, ‘e8’, ‘e9’]
scaled_salary_per_month: [2.52, 2.8, 5.25, 5.31, 6.05, 6.6, 7.27, 8.81, 8.97, 9.81]
[/sourcecode]
Step 3: Plotting the line chart
Line chart is used to plot numeric variable on x-axis as well as y-axis. Here, we have years_of_experience as our independent numeric variable and salary_per_month as our dependent numeric variable. The dependency between them can be seen from the line chart. The code for obtaining it is as follows:
[sourcecode language=”python” wraplines=”false” collapse=”false”]
#Creating a line chart with years_of_experience on x-axis and salary_per_month on y-axis
plt.plot(years_of_experience, salary_per_month, color=”red”, marker=”+”, linestyle=”solid”)
plt.title(“Years of Experience v/s Salary per month plot”) #Title of the plot
plt.xlabel(“years of experience”) #Label on x
plt.ylabel(“salary per month”) #Label on y
plt.show()
[/sourcecode]
The graph for above case is given below:
Step 4: Plotting the vertical bar graph
Bar graph is used to plot categorical variable on x-axis and numeric variable on y-axis. Here, we have employee id or eid as categorical variable and salary_per_month on y-axis as numeric variable.
The code for this is given below:
[sourcecode language=”python” wraplines=”false” collapse=”false”]
“””Creating a bar chart with employee id as categorical variable on x-axis
and salary_per_month on y-axis as numeric variable”””
plt.bar(eid, salary_per_month, 0.5) #bar(x-axis_series, y-axis_series, bar_width)
plt.xlabel(“Employee ID”) #Label on x
plt.ylabel(“salary per month”) #Label on y
plt.show()
[/sourcecode]
The vertical bar graph generated is given below:
So guys, with this we conclude this tutorial. To learn about more plots in matplotlib, stay tuned! We will talk about it in the next tutorial.
For more updates and news related to this blog as well as to data science, machine learning and data visualization, please follow our facebook page by clicking this link.
One thought on “Data Visualization Using Matplotlib” | https://mlforanalytics.com/2018/04/07/data-visualization-using-matlotlib-part-1/ | CC-MAIN-2021-21 | refinedweb | 859 | 54.73 |
Overview
This will take about 45 minutes.
We will be setting up a Ruby on Rails production environment on Ubuntu 12.04 LTS Precise Pangolin..
Last, but not least we need to choose which OS to use. We're going to be using Ubuntu 12.04 LTS x64. Your application may require a different OS or version, but if you're not sure this is generally what you should use. rest of this tutorial, source ~/.rvm/scripts/rvm rvm install.
# Install Phusion's PGP key to verify packages gpg --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 gpg --armor --export 561F9B9CAC40B2F7 | sudo apt-key add - # Add HTTPS support to APT sudo apt-get install apt-transport-https # Add the passenger repository sudo sh -c "echo 'deb precise main' >> /etc/apt/sources.list.d/passenger.list" sudo chown root: /etc/apt/sources.list.d/passenger.list sudo chmod 600 /etc/apt/sources.list.d/passenger.list sudo apt-get update # Install nginx and passenger sudo apt-get install nginx-full
sudo service nginx restart to restart Nginx with the new Passenger configuration..
Installing PostgreSQL
Postgres 9.1 is available in the Ubuntu repositories and we can install it like so:
sudo apt-get install postgresql postgresql-contrib libpq-dev
Next we need to setup our postgres user:
sudo su - postgres createuser --pwprompt exit
The password you type in here will be the one to put in your
my_app/current/config/database.yml later when you deploy your app for the first time.
Capistrano Setup
The fancy new verison of Capistrano 3.0 just shipped and we're going to be using it to deploy this application.
The first step is to add Capistrano to your
Gemfile:
gem 'capistrano', '~> 3.1.0' gem 'capistrano-bundler', '~> 1.1.2' gem 'capistrano-rails', '~> 1.1.1' # Add this if you're using rbenv # gem 'capistrano-rbenv', github: "capistrano/rbenv" # Add this if you're using rvm # gem 'capistrano-rvm', github: "capistrano/rvm"
Once these are added, run
bundle --binstubs and then
cap install STAGES=production to generate your capistrano configuration.
Next we need to make some additions to our Capfile to include bundler, rails, and rbenv/rvm (if you're using them). Edit your
Capfile and add these lines:
require 'capistrano/bundler' require 'capistrano/rails' # If you are using rbenv add these lines: # require 'capistrano/rbenv' # set :rbenv_type, :user # or :system, depends on your rbenv setup # set :rbenv_ruby, '2.0.0-p451' # If you are using rvm add these lines: # require 'capistrano/rvm' # set :rvm_type, :user # set :rvm_ruby_version, '2.0.0-p451'
After we've got Capistrano installed, we can configure the
config/deploy.rb to setup our general configuration for our app. Edit that file and make it like the following replacing "myapp" with the name of your application and git repository:
set :application, 'myapp' set :repo_url, '[email protected]:excid3/myapp.git' set :deploy_to, '/home/deploy/myapp' set :linked_files, %w{config/database.yml} set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system} namespace :deploy do desc 'Restart application' task :restart do on roles(:app), in: :sequence, wait: 5 do execute :touch, release_path.join('tmp/restart.txt') end end after :publishing, 'deploy:restart' after :finishing, 'deploy:cleanup' end
Now we need to open up our
config/deploy/production.rb file to set the server IP address that we want to deploy to:
set :stage, :production # Replace 127.0.0.1 with your server's IP address! server '127.0.0.1', user: 'deploy', roles: %w{web app} default_server; listen [::]:80 default_server ipv6only=on; server_name mydomain.com; passenger_enabled on; rails_env production; root /home/deploy/my
You can run
cap production deploy to deploy your application.
The file
config/database.yml needs to be updated for the production database server username, password, and host. You can set host to "localhost" and you will have to create a database on the server with the same name. Capistrano won't create it for you because it's something that should really only happen once. After deploying you can set create it by SSHing in and running
RAILS_ENV=production bundle exec rake db:create in your app's
/home/deploy/myapp/current directory (just change "myapp" to match the name of your app).
Something you should consider is only storing the database credentials on the server and having Capistrano symlink the database.yml file so that it doesn't have to be stored in git. This is especially important when you have a public git repository and don't want to publish your database credentials.
Restarting The Site
One last thing you should know is that restarting just the Rails application with Passenger is very easy. If you ssh into the server, you can run
touch my! | https://gorails.com/deploy/ubuntu/12.04 | CC-MAIN-2019-18 | refinedweb | 792 | 56.76 |
11 January 2011 09:54 [Source: ICIS news]
(Adds comment from tyre makers in paragraphs 11, 12)
SINGAPORE (ICIS)--Two major Asian synthetic rubber producers' upcoming plant shutdowns have spurred suppliers to increase prices by $200-300/tonne (€154-231/tonne) this week, industry sources said on Tuesday.
?xml:namespace>
The producer will take its 135,000 tonne/year styrene butadiene rubber (SBR) and 55,000 tonne/year nitrile rubber (NBR) plants off line for three weeks, while its 100,000 tonne/year butadiene rubber (BR) plant will be shut for four weeks, the source added.
“We are now building up inventories and have no spot cargo,” said the source.
Market players told ICIS the prices of SBR and BR have been under upward pressure since the fourth quarter of 2010 because of tight supply.
Non-oil grade SBR 1502 prices have surged by $600/tonne since early October 2010 to $3,000-3,100/tonne CIF (cost, freight & insurance)
BR prices have soared by $1,000/tonne since early October last year to $3,700-3,800/tonne CFR (cost & freight) northeast
The upcoming turnarounds have spurred some suppliers to increase their prices by a further $200-300/tonne this week, said players.
Spot offers for BR were raised to $3,900-4,000/tonne CFR Asia, while those of non-oil grade 1502 SBR have surged to $3,300-3,400/tonne CFR Asia.
Downstream tyre makers said the unabated price hikes could dampen demand and prompt some tyre makers to cut operating rates
"It will be difficult to continue to absorb rising raw material costs as we cannot keep raising tyre prices," a medium-sized tyre manufacturer said. "If the prices continue to rise we may not have any choice but to cut the operating rate."
Traders said spot business for both products remained scant amid limited supply.
“Although the spot prices have soared, the deals done are very scarce because of limited supply,” said a trader.
Some synthetic rubber producers have cautioned against the relentless price hikes, saying the downstream tyre makers could start to cut their operating rates and demand may collapse if SBR and BR values were to continue to rise unabated.
“We understand the concerns of the downstream tyre producers and our main priority is to supply our long-term contract customers,” a South Korean synthetic rubber producer said.
Meanwhile, spot prices of NBR remained stable at $3,050-3,150/tonne CFR Asia, according to ICIS data.
($1 = €0.77)
To discuss issues facing the chemical industry go to ICIS connect
For more on styrene butadiene rubber, | http://www.icis.com/Articles/2011/01/11/9424635/asia-synthetic-rubber-producers-hike-prices-on-supply.html | CC-MAIN-2014-35 | refinedweb | 435 | 51.52 |
Introduction to PySpark explode
PYSPARK EXPLODE is an Explode function that is used in the PySpark data model to explode an array or map-related columns to row in PySpark. It explodes the columns and separates them not a new row in PySpark. It returns a new row for each element in an array or map.
It takes the column as the parameter and explodes up the column that can be further used for data modeling and data operation. The exploding function can be the developer the access the internal schema and progressively work on data that is nested. This explodes function usage avoids the loops and complex data-related queries needed.
In this article, we will try to analyze the various ways of using the EXPLODE operation PySpark.
Let us try to see about EXPLODE in some more detail.
The syntax for PySpark explode
The syntax for the EXPLODE function is:-
from pyspark.sql.functions import explode
df2 = data_frame.select(data_frame.name,explode(data_frame.subjectandID))
df2.printSchema()
Df_inner:- The Final data frame formed
Screenshot:
Working of Explode in PySpark with Example
Let us see some Example of how EXPLODE operation works:-
Let’s start by creating simple data in PySpark.
data1 = [("Jhon",[["USA","MX","USW","UK"],["23","34","56"]]),("Joe",[["IND","AF","YR","QW"],["22","35","76"]]),("Juhi",[["USA","MX","USW","UK"],["13","64","59"]]),("Jhony",[["USSR","MXR","USA","UK"],["22","44","76"]])]
The data is created with Array as an input into it.
data_frame = spark.createDataFrame(data=data1, schema = ['name','subjectandID'])
Creation of Data Frame.
data_frame.printSchema()
data_frame.show(truncate=False)
Output:
Here we can see that the column is of the type array which contains nested elements that can be further used for exploding.
Screenshot:
from pyspark.sql.functions import explode
Let us import the function using the explode function.
df2 = data_frame.select(data_frame.name,explode(data_frame.subjectandID))
Let’s start by using the explode function that is to be used. The explode function uses the column name as the input and works on the columnar data.
df2.printSchema()
root
|-- name: string (nullable = true)
|-- col: array (nullable = true)
| |-- element: string (containsNull = true)
The schema shows the col being exploded into rows and the analysis of output shows the column name to be changed into the row in PySpark. This makes the data access and processing easier and we can do data-related operations over there.
df2.show()
The output breaks the array column into rows by which we can analyze the output being exploded based on the column values in PySpark.
The new column that is created while exploding an Array is the default column name containing all the elements of an Array exploded there.
The explode function can be used with Array as well the Map function also,
The exploded function creates up to two columns mainly the one for the key and the other for the value and elements split into rows.
Let us check this with some example:-
data1 = [("Jhon",["USA","MX","USW","UK"],{'23':'USA','34':'IND','56':'RSA'}),("Joe",["IND","AF","YR","QW"],{'23':'USA','34':'IND','56':'RSA'}),("Juhi",["USA","MX","USW","UK"],{'23':'USA','34':'IND','56':'RSA'}),("Jhony",["USSR","MXR","USA","UK"],{'23':'USA','34':'IND','56':'RSA'})]
data_frame = spark.createDataFrame(data=data1, schema = ['name','subjectandID'])
data_frame.printSchema()
root
|-- name: string (nullable = true)
|-- subjectandID: array (nullable = true)
| |-- element: string (containsNull = true)
|-- _3: map (nullable = true)
| |-- key: string
| |-- value: string (valueContainsNull = true)
The data frame is created and mapped the function using key-value pair, now we will try to use the explode function by using the import and see how the Map function operation is exploded using this Explode function.
from pyspark.sql.functions import explode
df2 = data_frame.select(data_frame.name,explode(data_frame.subjectandID))
df2.printSchema()
root
|-- name: string (nullable = true)
|-- col: string (nullable = true)
df2.show()
The Output Example shows how the MAP KEY VALUE PAIRS are exploded using the Explode function.
Screenshot:-
These are some of the Examples of EXPLODE in PySpark.
Note:-
- EXPLODE is a PySpark function used to works over columns in PySpark.
- EXPLODE is used for the analysis of nested column data.
- PySpark EXPLODE converts the Array of Array Columns to row.
- EXPLODE can be flattened up post analysis using the flatten method.
- EXPLODE returns type is generally a new row for each element given.
Conclusion
From the above article, we saw the working of EXPLODE in PySpark. From various examples and classification, we tried to understand how this EXPLODE function works and what are is used at the programming level. The various methods used showed how it eases the pattern for data analysis and a cost-efficient model for the same.
We also saw the internal working and the advantages of EXPLODE in Data Frame and its usage in various programming purpose. Also, the syntax and examples helped us to understand much precisely over the function.
Recommended Articles
This is a guide to PySpark explode. Here we discuss the internal working and the advantages of EXPLODE in PySpark Data Frame. You may also look at the following articles to learn more – | https://www.educba.com/pyspark-explode/?source=leftnav | CC-MAIN-2021-43 | refinedweb | 848 | 54.32 |
tutorial talks about TypeScript, a typed superset of JavaScript that compiles to plain JavaScript. To try out the examples shown in this article, you can use any open source web editor that supports TypeScript like the Visual Studio Code or an online playground like.
This tutorial is based on TypeScript v1.8.
Using the JavaScript language to build massive scale web applications, APIs and even mobile applications, is not an easy task. JavaScript (based on EcmaScript specification) was initially designed to perform simple operations in browsers. Ever since then, the ECMAScript specification has been revised to add new syntax and features to write complex applications.
The additions to the language in ECMAScript 6 (a.k.a ES2015 or ES6) and the new features of ECMAScript 7 (a.k.a ES2016), which are under development have made the language a better fit for big applications. Though these additions are great, they couldn’t bring all advantages of a typical typed language to JavaScript. JavaScript was never meant to be a typed language and the TC39 committee never wantede to take the language in that direction. In addition to these challenges, browsers also need time to implement these features.
This article is published from the DNC Magazine for Developers and Architects. Download this magazine from here [Zip PDF] or Subscribe to this magazine for FREE and download all previous and current editions
Microsoft’s solution to these challenges is TypeScript – a superset of JavaScript. TypeScript is a open source programming language created and maintained by Microsoft and was first announced in October 2012. Let’s understand what the language is about and how it works.. If you are already good at JavaScript, it won’t take you much time to learn TypeScript.
TypeScript can be used to write everything that can be written in JavaScript. With support of types, it looks very close to any other typed OOPs language like C# and Java. The types are optional, so it is not mandatory to strongly type everything. However good usage of types has many advantages. For example it enhances the productivity of the team. Strict type checking system makes the code more predictable. The type system of the language helps in solving many issues during development which could not be caught until runtime. This feature reduces the development time of a team. As most of the issues are resolved upfront, it reduces the cost of fixing the bugs later.
The TypeScript team is working very hard to keep the language updated with the latest specifications of JavaScript. Most of the proposed features of ES6 and ES7 are implemented by TypeScript. They get converted into their ES5 equivalent when the TypeScript files are transpiled. This makes it possible to use the latest features of JavaScript even when the browsers have not implemented them natively.
An existing JavaScript library need not be rewritten to be used in TypeScript. We need a type definition file declaring types for the APIs exposed by the library. The GitHub project Definitely Typed does a great job of creating and maintaining type definition files for most of the JavaScript libraries. These files are made available through a package manager to make it easier to install and use the type definition files.
TypeScript defines a set of basic and general purpose types. They are:
· number: All numeric values are treated as numbers. A variable of number type gets access to all APIs of the type Number defined by the browser
· string: Any valid JavaScript string value gets string type. The string APIs defined by the browser are accessible to this type
· boolean: A boolean type variable can be assigned with true or false. Default value of a Boolean variable is false
· any: A generic type. A variable whose type cannot be represented using any of the basic types, types defined by the browser or the custom classes written in the application, can be declared using the any type
· Empty object type ({}): This type represents objects that do not have any instance members or members that cannot be added to the object. Hence these are just empty objects. This type is not used in most of the cases.
Syntax of declaring a variable is similar to the way we do it in JavaScript, except we declare type along with it.
var num: number;
var num2 = 10;
The variable num2 infers its type based on the value assigned to it, which is number. When we try to access members of the variable num2, auto completion suggests the members defined in the Number type. Following is a screenshot from Visual Studio Code (a free code editor from Microsoft) showing auto completion when we access members of num2:
Declaring a variable without using a type and without assigning any value to it makes type of the variable any. If types of the variable and the value assigned to it differ, the TypeScript compiler generates an error.
TypeScript functions can have typed arguments and a return type. TypeScript doesn’t allow to pass variables of different types into the function unless there are explicit declarations of the function with those types.
Consider the following function and the statements that calls the function:
function add(val1: number, val2: number): number{
return val1 + val2;
}
var numResult = add(10, 20);
var strResult = add("The number is: ", "10");
Out of the two statements, the second won’t compile as the function expects the parameters to be numbers and we are passing strings here. Return type of the function is a number, so the variable numResult also gets the type number.
It is possible to make the function accept either a number or a string using union types. We need to define a union type to represent number or string and use it as the type in the function definition. Following snippet shows how to rewrite the above function using union types:
type myType = number | string;
function add(val1: myType, val2: myType): myType{
if((typeof val1 === 'number' && typeof val2 === 'number'))
return val1 + val2;
else if(typeof val1 === 'string' && typeof val2 === 'string')
return val1 + val2;
return null;
}
var result1 = add(10, 20);
var result2 = add("The number is: ", "10");
var result3 = add("The number is:", 10);
The function adds the parameters when both are either numbers or strings. If both types of both parameters are different, it returns a null. Out of the three calls made to the function, we get result in the first two instances and the third one returns null.
Classes are used to define blueprint of objects. They are used extensively in OOPs based languages. Though JavaScript didn’t have direct support for classes till ES6, we were still able to create functionality similar to classes using the prototype property of the objects. TypeScript had support for classes since its inception.
Classes in TypeScript can have properties and members as instance variables. Their access to the outside world can be controlled using access specifiers. The class can have a constructor to initialize its members. Arguments of the constructor can be automatically converted to instance members if an access specifier is specified in the argument. Following is an example of a class:
class Employee{
private bonus: number;
constructor(private empNo: string, private name: string, private salary: number){
this.bonus = this.salary * 0.1;
}
getDetails(){
return `Employee number is ${this.empNo} and name is ${this.name}`;
}
get Name() {
return this.name;
}
set Name(name: string){
this.name = name;
}
}
As the arguments passed to the constructor are marked as private, they are made members of the class and they receive the values that are passed to the constructor. The function getDetails returns a string containing details of the employee.
The default access specifier in TypeScript is public. Here, the method getDetails becomes public. It can be called using any object of the class. The field bonus shouldn’t be accessed directly using the object, so it is explicitly made private.
The property Name with public getter and setter blocks are encapsulating the private field name in the class. This is to prevent direct access to the instance member from outside of the class. And the field bonus just has a getter block around it which allows it to be accessed from outside the class and prevent assigning any value to it.
We can instantiate a class using the new keyword. Public members of the class can be accessed using the object created.
var emp = new Employee("E001", "Alex", 10000);
emp.Name = "Alisa";
console.log(emp.getDetails());
console.log(emp.Bonus);
Reusability is a word that we cannot ignore as programmers. We come across this word every now and then. One of the several ways in which code reusability can be achieved while dealing with classes and objects is through inheritance. A class can be inherited from an existing class. The new class gets members of the parent class along with its own.
The child class gets access to all protected and public members of the parent class and not to the private members. When a child class is instantiated, the parent class also gets instantiated. The child class can call constructor of the parent class using the super keyword.
Let’s modify the Employee class defined above so that some of its members would be accessible through a child class and define a new class, Manager to see how inheritance works.
class Employee{
private bonus: number;
constructor(protected empNo: string, protected name: string, protected salary: number){
this.bonus = this.salary * 0.1;
}
getDetails(){
return `Employee number is ${this.empNo} and name is ${this.name}`;
}
get Name() {
return this.name;
}
set Name(name: string){
this.name = name;
}
get Bonus(){
return this.bonus;
}
}
class Manager extends Employee {
constructor(empNo: string, name: string, salary: number, private noOfReportees: number) {
super(empNo, name, salary);
}
getDetails(){
var details = super.getDetails();
return `${details} and has ${this.noOfReportees} reportees.`;
}
}
In constructor of the Manager class, we call the constructor of the Employee class in the first statement. The super keyword in the child class refers to the current instance of the parent class. Call to the parent class constructor has to be the first statement in the child class. If the parent class has a parameterized constructor, it is mandatory to call the parent class constructor.
Also, observe the way the getDetails method calls the parent class method. This method overrides the parent class method. When getDetails is invoked using an object of the Manager class, it calls method of the Manager class. This completely hides the parent class method. But the parent class method is available for the child class to invoke, and it can be done using the super keyword.
Interfaces are used to create contracts. They don’t provide a concrete meaning to anything, they just declare the methods and fields. Because of this, an interface cannot be used as-is to build anything. An interface is meant to be inherited by a class and the class implementing the interface has to define all members of the interface.
Consider the following interface:
interface IShape{
area(): number;
}
The above interface represents a shape and declares a method to calculate surface area of the shape. It doesn’t cover any details about the shape – for e.g. the kind of shape, if it has length and breadth or any other details. These details have to be provided by the implementing class. Let’s define two classes, Square and Rectangle by implementing this interface.
class Square implements IShape{
constructor(private length: number){}
get Length(){
return this.length;
}
area(){
return this.length * this.length;
}
}
class Rectangle implements IShape{
constructor(private length: number, private breadth: number){}
area(): number{
return this.length * this.breadth;
}
}
We can instantiate these classes and assign them to references of the interface type. We can access the members declared in the interface using this instance.
var square: IShape = new Square(10);
var rectangle: IShape = new Rectangle(10, 20);
console.log(square.area());
console.log(rectangle.area());
The class Square class has an additional property Length that is not declared in the interface. Though the object square is an instance of Square class, we cannot access the members that are defined in the class and not in the interface. However, the object square can be casted to the type Square and then we can use the members defined in the Square class.
var squareObj = square as Square;
console.log(squareObj.Length);
Decorators are used to extend the behavior without modifying the implementation. Decorators can be applied on classes, members of classes, functions or even on arguments of function. It is a feature proposed for ES7 and is already in use by some of the JavaScript frameworks including Angular 2.
Creating and using decorators is very easy. A custom decorator is a function that accepts some arguments containing details of the target on which it is applied. It can modify the way the target works using this information.
The following snippet defines and uses a decorator:
function nonEnumerable(target, name, descriptor){
descriptor.enumerable = false;
return descriptor;
}
class Person {
fullName: string;
@nonEnumerable
get name() { return this.fullName; }
set name(val) {
this.fullName = val;
}
get age(){
return 20;
}
}
var p = new Person();
for(let prop in p){
console.log(prop);
}
The decorator nonEnumerable sets enumerable property of a field to false. After this, the property won’t be encountered when we run a for…in loop on the object. The loop written at the end of the snippet prints only the property age .
Writing applications consisting of hundreds of files is almost impossible without a modular approach. As TypeScript was created to solve the issues with creating large applications using JavaScript, support for modules was added to it. After announcement of the ES6 module system, the module system of the language was renamed to namespaces and ES6 module system is now a first class citizen in TypeScript.
ES6 module system treats every file as a module. A module can export the objects that it wants to make them available to the other modules and also import the objects exported by other modules. In a typical application using ES6 modules, one module made responsible to perform initial task of the application loads a few other modules of the application. These modules in turn load other modules in the application and so on.
A module can export any number of functions, classes or variables. By default, the objects are exported with their original names. We can change this, if required. A module can have a default exported member as well. Following snippet shows examples of different export statements:
//Inline export with same name
export class MyClass{}
export function myFunc(){}
//Exporting a group of members
export {
MyClass,
myFunc
};
//Rename while exporting
export {
MyClass as AnotherClass,
myFunc as anotherFunc
};
//Default export
export default myMemberToExport;
When a module imports another module, it may import all exported members, some of them or none at all. The importing module also has the option to rename the importing object. The following snippet shows examples of different import statements:
//Importing all exported objects
import * as module1 from "./module1";
//Importing selected objects
import {MyClass1, MyClass2} from "./module1";
//Importing selected objects and rename them
import {MyClass1 as Module1MyClass1, MyClass2 as Module1MyClass2} from "./module1";
//Importing default export object
import d from "./module1";
TypeScript is not created for the browsers. It is a language to be used by developers to write code. . Hence we need to transpile the TypeScript code to JavaScript to be able to run it on the browser. There are several ways in which TypeScript code can be transpiled to JavaScript, each of them can be used in different scenarios depending upon the need.
The easiest way to try TypeScript is by transpiling it on the fly. This approach works for demos really well, but it is not the recommended way for production. Let’s see how the on-the-fly transpiler works before jumping into pre-compiled script loading. To run TypeScript directly in the browser, we need the following libraries:
<!DOCTYPE html>
<html>
<head>
<title>Transpiling TypeScript in the browser</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
Area of the square is:
Area of the rectangle is:
</body>
</html>
The TypeScript file has the classes Square and Rectangle we saw earlier in an example, and both of them calculate area. The file exports these two classes. Following is the content of this file:
export class Square{
constructor(private length: number){}
area(){
return this.length*this.length;
}
}
export class Rectangle{
constructor(private length: number, private breadth: number){}
area(): number{
return this.length * this.breadth;
}
}
It is saved in a file named app.ts. We need to load this file using System.js in the index.html and use the exported members. Following snippet shows how to load the file and use the exported members:
System.config({
transpiler: 'typescript',
typescriptOptions: { emitDecoratorMetadata: true },
packages: {'.': {defaultExtension: 'ts'}}
});
System.import('app')
.then(function(result) {
var s = new result.Square(10);
var r = new result.Rectangle(10, 20);
document.querySelector("#areaOfSquare").innerHTML = s.area();
document.querySelector("#areaOfRectangle").innerHTML = r.area();
});
This page can’t be loaded in the browser directly. It has to be loaded from a server. To start a server easily, you can use the global npm http-server to start a Node.js server and open the URL depending upon the port number where it starts the server. Setting up Node and starting a server is covered at.
TypeScript can be pre-compiled to JavaScript using a number of approaches like using command line interface (CLI) of TypeScript, using task runners such as Grunt or Gulp, or using module loaders like Webpack and JSPM. In this chapter, we will see how to pre-compile using the command line interface. We will discuss about Webpack in a future tutorial.
To use TypeScript’s CLI, we need to install the global npm package for TypeScript using the following command:
> npm install –g typescript
After successful completion of this command, we can use the tsc command to transpile the TypeScript files.
> tsc app.ts
As we are using ES6 style modules, we need to tell TypeScript the target module format we are looking for. TypeScript converts the modules into CommonJS format if no module system is specified. If we need to convert into any module type other than CommonJS, we need to specify it in the command line option. Following command converts the module to SystemJS:
> tsc app.ts --module system
This command produces a file named app.js. We can load this file in the HTML file using the SystemJS module loader. We need to make some minor changes to the SystemJS code we wrote earlier to load this file. Following is the modified code:
System.config({
packages: {'.': {defaultExtension: 'js'}}
});
System.import('app')
.then(function(result){
var s = new result.Square(10);
var r = new result.Rectangle(10, 20);
document.querySelector("#areaOfSquare").innerHTML = s.area();
document.querySelector("#areaOfRectangle").innerHTML = r.area();
});
TypeScript makes the experience of working with JavaScript better. The language is thoughtfully designed to not invent anything new and yet make the experience of programmers working on JavaScript better. This TypeScript tutorial gave you a quick start to TypeScript which will help you to write better Angular 2 apps. | https://www.dotnetcurry.com/typescript/1287/typescript-quick-start-tutorial | CC-MAIN-2018-39 | refinedweb | 3,203 | 56.25 |
MarkOrDeletePriorOp
Since: BlackBerry 10.0.0
#include <bb/pim/message/MarkOrDeletePriorOp>
To link against this class, add the following line to your .pro file: LIBS += -lbbpim
The MarkOrDeletePriorOp class includes Prior to Date operations for messages.
You can use this class to perform operations on all messages that are prior to a given date. For example, you can mark all messages prior to a given date as read or unread, or you can delete the messages.
Overview
Public Types Index
Public Types
An enumeration of supported Prior to Date operations for messages.
BlackBerry 10.0.0
- MarkPriorRead 0
Indicates Mark all messages prior to given date as read.
- MarkPriorUnread 1
Indicates Mark all messages prior to give date as unread.Since:
BlackBerry 10.0.0
- DeletePrior 2
-
Got questions about leaving a comment? Get answers from our Disqus FAQ.comments powered by Disqus | http://developer.blackberry.com/native/reference/cascades/bb__pim__message__markordeletepriorop.html | CC-MAIN-2017-34 | refinedweb | 143 | 60.31 |
Over the next few tutorials, we'll be looking in more detail at the basic layout and graphical interface aspects of the Android API. experience for your app.
This first tutorial looks at LinearLayout, as well as at some basic concepts like element attributes. In the next few tutorials we'll also look at RelativeLayout, check out the multiple menu types available, take another look at lists, grids, and scrolling, and find out how to make buttons look better.
Layouts and XML: The basics
The basic Android approach to layout is to set it up in XML, in a layout file that is usually found in res/layout/. It's also possible to then grab and alter that layout information programmatically at runtime as your app requires. (It's also possible simply to instantiate your layout information at runtime, but that's less flexible and maintainable than using XML, and I won't cover it here.)
The structure of an XML layout file is similar to the structure of an HTML webpage -- you can think of it as a series of nested elements, or as a tree. Each layout file has one single root element, which must be a View or ViewGroup element (such as LinearLayout, RelativeLayout, ListView...). The limitations of the arrangements of the child elements (panes, buttons, images, text... all the visual parts of your app) will vary according to the specific root element. Let's look at what we can do with a LinearLayout.
LinearLayout: The basics
A LinearLayout is a very simple layout that just arranges all its children in either a vertical column, or a horizontal row, depending on how it is specified. A vertical LinearLayout will only have one child per row (so it is a column of single elements), and a horizontal LinearLayout will only have one single row of elements on the screen. There are obvious disadvantages to this for more complicated apps -- you probably don't want all your buttons to line up one under the other, for example. To set up more complicated arrangements, you'll probably want to use a RelativeLayout (which we'll look at in another tutorial); we'll also have a quick look at nesting LinearLayouts at the bottom of this tutorial.
Here's a basic vertical LinearLayout. Create a new Android project, LayoutTest, and put this in res/layout/activity_layout_test.xml:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns: <TextView android: <EditText android: <Button android: </LinearLayout>
As discussed in previous tutorials, it's good practice to keep your strings in a resource file, rather than hard-coding them into your layout. This makes for easier internationalisation, and is more maintainable. So you'll also need to edit res/values/strings.xml:
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">LayoutTest</string> <string name="hello">Hello world!</string> <string name="name">Name</string> <string name="setName">Set name</string> </resources>
As you'll see (and as used in previous tutorials), you can refer to Android string resources with
@string/stringname. This is a standard format which we'll see used for other resources in due course.
To make this show up on the screen, you'll also need to edit src/com/example/layouttest/LayoutTestActivity.java:
package com.example.layouttest; public class LayoutTestActivity extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_layout_test); } }
Run this (on your phone or on the emulator), and you should get a layout like the one at left. All three elements are laid out one under the other.
Element width and weight
You'll notice that the three elements in our layout above mostly have either
fill_parent or
wrap_content set for their height and width. Although you can specify a pixel value (as with the Button here), much of the time it's these two meta-values that are used.
fill_parent means to fill the parent element in that direction (width or height);
wrap_content means that the element should be just as wide or high as the content requires.
In the above example, all three elements have
wrap_content as their height, so they are all squashed up to the top of the display. Try setting the height of the EditText element to be
fill_parent, and you should get the image at right. Note that you can't see the button at all. The EditText element has duly filled the parent element (the LinearLayout), and there's no room left for the button.
To get past this problem, but still spread the elements out a bit better, you can use the
android:layout_weight attribute. This assigns an "importance" to the elements. The default weight is 0, and a higher number means a more important element. The most important element will be allocated more of the screen space. Try this:
<LinearLayout ... > <TextView android: <EditText android: <Button android: </LinearLayout>
Now The EditText element has expanded to fill all the available space, like the image on the left, below. However, if you increase the weight of the EditText element to 2, and give the other two elements a weight of 1, you'll get the image to the right, below. This time, because all of the weights are non-zero, once they've all been given their minimum space (
wrap_content, so, the height of their content), the remaining screen space is divided in half. One half goes to the most important element, and the other half is divided between the two other elements.
If you want all your child elements to get exactly the same space on the screen, you shouldn't use
wrap_content, because that will allocate space to content first, and only then divide up the remaining space. Instead, set the height (or width, for a horizontal layout) to 0dp, then set the weight of each view to 1.
Layout attributes: Borders, padding, id...
There are a bunch of other layout attributes to further control the look of your layout. Here are a few commonly-used options:
android:gravity-- aligns the content of the element within the element itself. So can be set to
top,
bottom,
center,
center_vertical, etc.
android:layout_gravity-- aligns the element within its parent. So to centre a button, use this; to centre text within a button, use
android:gravity. Usable values are the same.
android:padding-- set the padding in pixels for all four edges. You can also use
paddingBottom,
paddingLeft, etc.
android:textColor-- applies only to text elements, but you can use it to set the text colour.
In the image below, the top two elements have both
android:gravity and
android:layout_gravity set to
center; the button has only
android:gravity set to
center. So the text is centred within the button but the button itself is not centred.
When setting colors, you'll need to either reference the Android built-in colours (note that many of the more interesting colours were only introduced with API 14, Ice Cream Sandwich):
<TextView ... android:textColor="@android:color/holo_green_dark" ... />
or to create your own colour with a res/values/colors.xml file:
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="blue">#0000FF</color> </resources>
and refer to that:
<TextView ... android:textColor="@color/blue" ... />
For the (very long) full list of attributes for a given element, check out the API for that element. (Here's the list for TextView, for example.) You can use XML attributes to set a field to have phone number input (rather than standard text), or to show dots instead of letters, as with a password field, or to automatically convert URLs into clickable links... check out the API for much, much more.
One final note on the
android:id attribute, which we've already used in previous tutorials. When creating an ID for a new element, the usual format is
@+id/name. The + indicates that it's a new ID, and a new resource integer will be created for it at the next compile. For example:
<EditText android:id="@+id/nameEditText" ... />
You'll need this if you want to refer to the element in your code (for example, to get a value that the user inputs into an EditText box).
Nesting layouts
Finally, it's possible to nest LinearLayouts within one another. This will get you a horizontal row of buttons at the bottom of a vertical LinearLayout, as in the image below the code:
<LinearLayout ... > <TextView ... /> <EditText ... /> <LinearLayout android:
>
Note that to center the buttons within the bottom row, the surrounding LinearLayout must be centered in its parent (with
android:layout_gravity), as well as the buttons themselves centred, and their weight both set to 1. With more complicated layouts like this, you will often need to experiment a bit with the settings to get exactly the look you want. Make sure, of course, to check your layout on multiple devices; in a later tutorial we'll look at developing for best appearance on multiple devices.
Navneeth Said:
Could you please provide the links to the older tutorials in this series?
Sunni Kumar Said:
can you give me a program which opens a web page on button click in form(Android).
catafest Said:
very.
cunEel Said:
how to link multi button from one xml page, please help me
abhi39singh Said:
Thanks for your great information, the contents are quiet interesting.I will be waiting for your next post. Premium web Design.
android application development in chennai Said:
nice article thank u............
parks daniel Said:
Its great tutorial for beginners in Android development. It is easy to understand for developer because all the points described with code snippet and screen shots . Thank you very much for share this fantastic tutorial.
jenny Smith Said:
Now. | https://www.linux.com/learn/tutorials/735985-android-app-development-for-beginners-layout-and-ui-options-part-one | CC-MAIN-2014-10 | refinedweb | 1,617 | 53.92 |
The most common problem we see with flask apps is that people try and call
app.run() # don't do this!
This actually tries to launch Flask's own development server. That's not necessary on PythonAnywhere, because we do the server part for you. All you need is to import your flask app into your wsgi file, something like this:
from my_flask_app import app as application
The app has to be renamed application, like that.
Do not call app.run() anywhere in your code as it will conflict with the PythonAnywhere workers and cause 504 errors. Or, if you must call app.run() (eg to be able to run a test server on your own pc), then make sure it's inside an
if __name__ == '__main__': block
Other than that, be sure to check out our guide to Debugging import errors for general tips on dealing with problems in your wsgi config. | https://help.pythonanywhere.com/pages/Flask504Error/ | CC-MAIN-2018-30 | refinedweb | 153 | 71.95 |
Created on 2016-05-03 14:06 by xdegaye, last changed 2016-12-17 08:24 by xdegaye. This issue is now closed.
One test of test_site fails on an android emulator running an x86 system image at API level 21.
See the attached test_output.txt file.
The problem is caused by the fact that android does not have HAVE_LANGINFO_H and CODESET set, hence in the _bootlocale module, the statement '_locale.CODESET' raises AttributeError and the locale module is imported upon interpreter startup. The locale module imports re.
See issue #19205 for why we would rather not import re and locale on startup.
This seems difficult to fix without either skipping most part of the test as it is done with Mac OS X, or having a specific sys.platform for android to handle the AttributeError in _bootlocale by having the getpreferredencoding() fuction returning 'UTF-8' ('UTF-8' is the file system encoding on android).
BTW the test runs fine on android when the AttributeError in _bootlocale is hard-coded with a getpreferredencoding() fuction returning 'UTF-8' and not importing locale.
Sorry for the confusion, the file system encoding is not the locale encoding.
In issue #9548, Antoine proposed a patch that avoids the import of the re, collections and functools modules by the _io module on startup, by refactoring and moving code from locale to _bootlocale. The attached refactor_locale.patch does that for python 3.6. The reasons for why Antoine patch has not been pushed still apply to this patch :(
The patch does fix the problem for Android though.
An improvement to Python startup time on Android (Android does not have nl_langinfo()) is to have _bootlocale.getpreferredencoding() return 'ascii' without importing locale, when none of the locale environment variables is set. With patch no-locale-envvar.patch, test_site runs ok on android-21-x86 emulator when the locale environment variables are not set.
Committing this patch while leaving the current issue open would also allow removing this issue from the dependencies of the Android meta-issue #26865.
This patch fixes test_startup_imports when the platform does not have langinfo.h.
Entered new issue 28596: "on Android _bootlocale on startup relies on too many library modules".
Patch that follows closely the conditionals in the __bootlocale module.
> The problem is caused by the fact that android does not have HAVE_LANGINFO_H and CODESET set
Hum, is it possible to get the locale encoding by another way?
If not, what is the locale encoding?
Does Android provide mbstowcs() and wcstombs() functions?
Seems Android/BioniC always uses UTF-8:
If it is not possible to change the locale, it makes sense to hardcode utf8.
Note: to avoid mojibake, it's better if sys.getfilesystemencoding() and
locale.getpreferredencoding(False) are equal. I understand that both must
be utf8.
There are some locale strings supported in setlocale():. However, seems mbstowcs just ignores such a setting on Android. Here's an example:
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#define BUFFER_SIZE 10
void test_mbstowcs()
{
wchar_t dest[BUFFER_SIZE];
memset(dest, 0, sizeof(dest));
printf("mbstowcs: %ld\n", mbstowcs(dest, "中文", BUFFER_SIZE));
printf("dest: %x %x\n", dest[0], dest[1]);
}
int main()
{
printf("setlocale: %d\n", setlocale(LC_ALL, "en_US.UTF-8") != NULL);
test_mbstowcs();
printf("setlocale: %d\n", setlocale(LC_ALL, "C") != NULL);
test_mbstowcs();
return 0;
}
On Linux (glibc 2.24) the result is:
$ ./a.out
setlocale: 1
mbstowcs: 2
dest: 4e2d 6587
setlocale: 1
mbstowcs: -1
dest: 0 0
On Android (6.0 Marshmallow) the result is:
shell@ASUS_Z00E_2:/ $ /data/local/tmp/a.out
setlocale: 1
mbstowcs: 2
dest: 4e2d 6587
setlocale: 1
mbstowcs: 2
dest: 4e2d 6587
A quick search indicates setlocale() affects *scanf functions only, so I guess it's safe to force UTF-8 in CPython.
In Python, the most important functions are Py_DecodeLocale() and
Py_EncodeLocale() which use mbstowcs() and wvstombs().
Submitted a patch to issue28596
Closing as invalid, it is useful to have the test failing on platforms that do not have CODESET and detect that too many modules are imported on startup. For Android, this problem is fixed in issue 28596. | https://bugs.python.org/issue26928 | CC-MAIN-2018-13 | refinedweb | 682 | 58.38 |
Python Scrapy Installation And Example Crawler
Hakan Torun
Aug 9 '18
・1 min read
Scrapy is an open source framework written in Python that allows you to extract data from structural content such as html and xml. It is able to scraping and crawling on websites especially fast enough. First of all, you should install python packet manager, pip.
Installing with using pip:
pip install scrapy
Starting a new project:
scrapy startproject tutorial
When a scrapy project is created, a file / directory structure will be created as follows.
tutorial/ scrapy.cfg # deploy configuration file tutorial/ # project's Python module, you'll import your code from here __init__.py items.py # project items definition file pipelines.py # project pipelines file settings.py # project settings file spiders/ # a directory where you'll later put your spiders __init__.py
Example spider:
import scrapy class QuotesSpider(scrapy.Spider): name = "quotes" start_urls = [ '', '', ] def parse(self, response): for quote in response.css('div.quote'): yield { 'text': quote.css('span.text::text').extract_first(), 'author': quote.css('small.author::text').extract_first(), 'tags': quote.css('div.tags a.tag::text').extract(), }
Scrapy spiders can scan and extract data on one or more addresses. With Scrapy selectors, the desired fields can be selected and filtered. Scrapy is supported by xpath scrapy in selectors.
For crawling:
scrapy crawl quotes
For writing output to json file:
scrapy crawl quotes -o qutoes.json | https://dev.to/hakan/python-scrapy-installation-and-example-crawler-5cpm | CC-MAIN-2019-18 | refinedweb | 230 | 51.24 |
Rob "string literal mystery solver"
Originally posted by Jose Botella: newString.intern() is not a string literal.
intern don't expect questions regarding the reachability of string literals in the exam
FOR a time being .... if possible then anyone what is going on here
import java.lang.ref.*;
import java.util.*;
public class Test020121_1249
{ public static void main(String[] args)
{ List l = new ArrayList();
int i ;
for ( i = 0; i < 5; i++ )
{ l.add(new WeakReference((" Hello "+i).intern())); // all created strings are being interned but are GCed
}
l.add(new WeakReference(" Hello 6")); // available after gc()
String str01 = (" Hello "+i).intern(); // |LINE 01-a
l.add(new WeakReference(str01)); //|LINE 01-b interned and WILL be available after gc()
i = 7;
l.add(new WeakReference((" Hello "+i).intern())); // interned but GCed === LINE 02 ====
System.gc();
for(Iterator it= l.iterator(); it.hasNext();
System.out.println(((WeakReference) it.next()).get()));
}
}
what is the difference betn LINE 01 and LINE 02. would luv to hear from jose. (Yes it can be put in to Adv Java, but then you should provide some mechanism to get informed to other threads also if some reply comes.) TIA
Originally posted by Rob Ross: Jose, The main confusion I am having about the "string pool" is that there seems to be two of them, one for interned strings, and one for string literals, even though I can't find *any* literature that explains the difference. Even the javadocs for the String.intern() method suggest there is only one pool...
If what you are saying is true, it seems the javadoc for String.intern() is incorrect?
I only state that string literals and String expressions computed at compile time (JLS 15.28) are not g.c.ed
Originally posted by Rob Ross: String myString = "I am a string"+" composed of two segments, but I am one string literal"; int i = 5; String aString = "This is a string literal "+i; aString above, is NOT a string literal because its value must be computed at runtime. There is only one string literal above, and that is the text between the quotes. Anyway, thanks for shedding light on this matter once and for all Jose! Rob | http://www.coderanch.com/t/236271/java-programmer-SCJP/certification/String-Pool-Redux | CC-MAIN-2014-15 | refinedweb | 367 | 66.94 |
Le Thursday 09 April 2009 19:49:22 Manuel Lauss, vous avez écrit :
> The current approach is not sufficiently generic for my needs:
> I want to use generic functions which deal with the GPIO1 and GPIO2
> blocks, but don't want the default gpio numberspace as imposed by the
> databooks; instead I also want the option to register gpio_chips for
> my board with a custom gpio namespace.
>
> To address this, the following changes are made to the alchemy gpio
> code:
>
> - create linux-gpio-system compatible functions which deal with
> manipulating the GPIO1/2 blocks. These functions are universally
> useful.
> - gpiolib is optional
>
> If CONFIG_GPIOLIB is not enabled, provide the equivalent functions
> by directly inlining the GPIO1/2 functions. Obviously this limits
> the usable GPIOs to those present on the Alchemy chip. GPIOs can
> be accessed as documented in the datasheets (GPIO0-31 and 200-215).
>
> If CONFIG_GPIOLIB is selected, by default 2 gpio_chips for GPIO1/2
> are registered, and the inlines are no longer usable. The number-
> space is as is documented in the datasheets.
>
> However this is not yet flexible enough for my uses. My Alchemy
> systems have a documented "external" gpio interface (fixed number-
> space) and can support a variety of baseboards, some of which are
> equipped with I2C gpio expanders. I want to be able to provide
> the default 16 GPIOs of the CPU board numbered as 0..15 and also
> support gpio expanders, if present, starting as gpio16.
>
> To achieve this, a new Kconfig symbol for Alchemy is introduced,
> CONFIG_ALCHEMY_GPIO_INDIRECT, which boards can enable to signal
> that they are not okay with the default Alchemy GPIO functions AND
> numberspace and want to provide their own. This also works for both
> CONFIG_GPIOLIB=y and CONFIG_GPIOLIB=n. When this config symbol is
> selected, boards must provide their own gpio_* functions; either in
> a custom gpio.h header (in board include directory) or with gpio_chips.
>
> To make the board-specific inlined gpio functions work, the MIPS
> Makefile must be changed so that the mach-au1x00/gpio.h header is
> included _after_ the board headers.
>
> see arch/mips/include/asm/mach-au1x00/gpio.h for more info.
That's fine with me, I do not see obvious breakages for boards that will use
the standard GPIO interface. Thanks for your work !
>
> Cc: Florian Fainelli <florian@openwrt.org>
Acked-by: <florian@openwrt.org>
--
Best regards, Florian Fainelli
------------------------------- | http://www.linux-mips.org/archives/linux-mips/2009-04/msg00096.html | CC-MAIN-2015-27 | refinedweb | 396 | 64.51 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.