text stringlengths 20 1.01M | url stringlengths 14 1.25k | dump stringlengths 9 15 ⌀ | lang stringclasses 4
values | source stringclasses 4
values |
|---|---|---|---|---|
- Author:
- msm-art
- Posted:
- January 18, 2008
- Language:
- Python
- Version:
- .96
- migration import plone
- Score:
- 2 (after 2 ratings)
This is a very simple script to do a simple migration from plone content to django.
ATNewsItems and PloneArticles are imported into the django model Article (with Foreignkey to the django models File and Image). ATDocuments are imported into the django model Page.
Usage
- Make sure that the Python version running Zope can import django
- The django database should be writeable from within the Zope environment
- Set the shell variable DJANGO_MODULE_SETTING to the settings file of the django project you want to import your Plone content to
Start the Zope server in the debug modus:
$ bin/zopectl debug
Then import the python module above, and pass the site you want to migrate to the start function:
import simple_migration mysite = app.mysite simple_migration.start(mysite) Found 1253 objects Saved Test Document Type: ATNewsItem ...
Hope it helps someone.
Used for the migration of Plone-2.5.3 content in a Python-2.4.4 environment.
Please login first before commenting. | https://djangosnippets.org/snippets/554/ | CC-MAIN-2017-22 | en | refinedweb |
.NET Back to Basics: The int Class
The humble 'int'. We take it for granted every day we write software in .NET without even stopping to think what's behind the scenes. To many developers, it's just a simple type, but below the covers 'int' is actually a type, set in the 'System' namespace.
Granted, it's not as large as 'Math' or 'Collections' or even 'String', but it has a few unique tricks up its sleeve that can prove interesting.
For a start, int comes in several flavours:
- Int16
- Int32
- Int64
- UInt16
- UInt32
- UInt64
In most cases, you'll simply just use 'int' when writing software, but in cases where you need to make sure that your value sticks to a specific number of bits, and is definitely signed or unsigned, you need to use the actual class name.
The 16, 32, & 64 specify the 'Bit Size' of the number. The 'U' prefix means that the 'Unsigned' variety is to be used.
Let's try an example. Create yourself a simple .NET console mode program in Visual Studio and make sure program.cs has the following code in it:
using System; namespace IntClassExplorer { class Program { static void Main() { UInt16 umax16 = UInt16.MaxValue; UInt16 umin16 = UInt16.MinValue; Int16 max16 = Int16.MaxValue; Int16 min16 = Int16.MinValue; UInt32 umax32 = UInt32.MaxValue; UInt32 umin32 = UInt32.MinValue; Int32 max32 = Int32.MaxValue; Int32 min32 = Int32.MinValue; UInt64 umax64 = UInt64.MaxValue; UInt64 umin64 = UInt64.MinValue; Int64 max64 = Int64.MaxValue; Int64 min64 = Int64.MinValue; Console.WriteLine("Maximum Value for Unsigned Int16: {0}", umax16); Console.WriteLine("Minimum Value for Unsigned Int16: {0}", umin16); Console.WriteLine("Maximum Value for Signed Int16: {0}", max16); Console.WriteLine("Minimum Value for Signed Int16: {0}", min16); Console.WriteLine("Maximum Value for Unsigned Int32: {0}", umax32); Console.WriteLine("Minimum Value for Unsigned Int32: {0}", umin32); Console.WriteLine("Maximum Value for Signed Int32: {0}", max32); Console.WriteLine("Minimum Value for Signed Int32: {0}", min32); Console.WriteLine("Maximum Value for Unsigned Int64: {0}", umax64); Console.WriteLine("Minimum Value for Unsigned Int64: {0}", umin64); Console.WriteLine("Maximum Value for Signed Int64: {0}", max64); Console.WriteLine("Minimum Value for Signed Int64: {0}", min64); } } }
If you run this, you should see the following output:
Figure 1: Output from our first code listing
You can see straight away that the unsigned versions all have a minimum value of 0, which means they can't be used to represent negative values. The signed versions, however, can, but at the cost of their upper positive limit being halved.
The maximum value is the number of bits to the power of 2, so for a 16 bit number this is
2^16 = 65536
This number comes from the binary columns across the number, which are all powers of 2. For example, a 4 bit number with four columns would be
8 4 2 1 (Work from the right to the left.)
Adding each of these up give us
8+4+2+1 = 15
Which means 15 is the maximum number a 4 bit integer can take. A 16, 32, and 64 bit integer are no different, except instead of four columns going from right to left, you go for as many columns as there are bits in the number.
So, What Makes Signed Numbers Different?
I'm glad you asked :-)
With a signed number, the left most bit is not used as part of the number; it's used as a flag to indicate if our integer is positive, or negative, and it's because of this that our number range is effectively halved.
Because each 'bit' column is a single power of 2, reducing the columns in your 16 bit number, for example, reduces it to a 15 bit number, effectively dividing the number by 2.
If you want to learn more about how this works, the 2's compliment article of Wikipedia is a great place to start.
The important point to take away from the previous example is the Sign type and constants that each of the integer classes have, which let you easily find the minimum and maximum values each can hold.
The integer classes also have a number of useful methods that allow you to convert string to integers, integers to strings, and perform testing on them.
The first two of these are
- CompareTo
- Equals
CompareTo returns an integer value indicating if the passed-in operand is greater than, less than, or equal to the value being converted. Change your program.cs file to contain the following code and run it.
using System; namespace IntClassExplorer { class Program { static void Main() { Int32 myInt = 5; Int32 lessInt = 1; Int32 greaterInt = 8; Int32 sameInt = 5; Console.WriteLine("{1} compared to {0} gives a value of {2}", lessInt, myInt, myInt.CompareTo(lessInt)); Console.WriteLine("{1} compared to {0} gives a value of {2}", greaterInt, myInt, myInt.CompareTo(greaterInt)); Console.WriteLine("{1} compared to {0} gives a value of {2}", sameInt, myInt, myInt.CompareTo(sameInt)); } } }
The results should look something like the output in Figure 2:
Figure 2: Output from code Listing 2
As you can see from Figure 2, if the operand is less than the integer being compared to, a value of 1 is returned. However, if the operand is greater, a -1 is returned, with 0 being returned if and only if the operand and the source integer are equal.
If you now change the three 'Console.WriteLine' statements in code snippet 2 as follows:
Console.WriteLine("{1} equal to {0} gives a value of {2}", lessInt, myInt, myInt.Equals(lessInt)); Console.WriteLine("{1} equal to {0} gives a value of {2}", greaterInt, myInt, myInt.Equals(greaterInt)); Console.WriteLine("{1} equal to {0} gives a value of {2}", sameInt, myInt, myInt.Equals(sameInt));
Then re-run the program, you'll see the difference between 'Equals' and 'CompareTo':
Figure 3: The output from code snippet 2, with the write line statements changed
As you can see, 'Equals' simply returns a Boolean value indicating if the value is equal or not, whereas 'CompareTo' returns a value that also tells you the direction of the inequality.
Moving on from comparisons, next up are the "Parsing" methods.
Parsing is the act of taking a string containing a possible integer value, and attempting to turn it into an integer. For example:
"123" becomes 123
But
"ABC" would throw an error
All of the parse methods are static members of each of the Intxx classes, which means you don't need to instantiate an object using new to use them.
There are two main versions of the Parsing methods:
- Parse
- TryParse
Parse has four overrides, as follows:
- Parse(string)
- Parse(string, IFormatProvider)
- Parse(string, NumberStyles)
- Parse(string, NumberStyles, IFormatProvider)
The first simply takes the string you wish to parse, and attempts to convert it to an integer representation. If the string is un-parseable, parse will throw a 'FormatException' which can be caught by using the normal try/catch mechanism.
The remaining three take Format providers (a .NET class that represents culture-specific formatting information to help parse non-current culture formats) and/or a member of the 'System.Globalization.NumberStyles' enumeration that allows you to let parse know about things like the presence of hyphens, hexadecimal number formatting, and other similar options.
In most cases, the first version is generally all you'll want to use. If, however, you're dealing with values provided by a user who's not native with the currently selected culture, you'll often want to be very specific about the culture and formats you set up.
Change your program.cs file to look as follows:
using System; namespace IntClassExplorer { class Program { static void Main() { try { Int32 test1 = Int32.Parse("12345678"); Console.WriteLine("Test 1 converted successfully to {0}", test1); } catch(Exception ex) { Console.WriteLine("Test 1 failed with exception {0}", ex); } Console.WriteLine(); try { Int32 test2 = Int32.Parse("ABCDEF"); Console.WriteLine("Test 2 converted successfully to {0}", test2); } catch (Exception ex) { Console.WriteLine("Test 2 failed with exception {0}", ex); } Console.WriteLine(); try { Int16 test3 = Int16.Parse(Int32.MaxValue.ToString()); Console.WriteLine("Test 3 converted successfully to {0}", test3); } catch (Exception ex) { Console.WriteLine("Test 3 failed with exception {0}", ex); } Console.WriteLine(); } } }
When you run this program, you should get something similar to Figure 4:
Figure 4: Output from testing the int Parse method
In the last bit of code, test 1 works fine because that's a parsable integer. Test 2, however, does not due to the fact that it's not possible to derive a number from it.
Test 3 fails because, although the value is a genuine integer, the value produced is far too large for the destination variable and so causes an overflow exception to be thrown.
'TryParse', like parse, has overrides, but you'll notice that, unlike parse, it returns its integer result in an 'out' parameter, rather than as a result of the method call. The main reason for this is because 'TryParse' returns a Boolean stating if the conversion was successful and does NOT throw any of the exceptions that 'Parse' does.
'TryParse' is designed for use inside code where you intend to detect and act on invalid format and overflow errors yourself, or where throwing an exception might prove to be more trouble than it's worth; for example, in an embedded Linq statement.
Change the code in program.cs as follows:
using System; namespace IntClassExplore { class Program { static void Main() { Int32 test1; bool test1result = Int32.TryParse("12345678", out test1); Console.WriteLine("Test 1 converted to {0} with result {1}", test1, test1result); Int32 test2; bool test2result = Int32.TryParse("ABCDEF", out test2); Console.WriteLine("Test 2 converted to {0} with result {1}", test2, test2result); Int16 test3; bool test3result = Int16.TryParse(Int32.MaxValue.ToString(), out test3); Console.WriteLine("Test 3 converted to {0} with result {1}", test3, test3result); } } }
Then run it. The result should look a bit like the following:
Figure 5: Output from testing tryparse
If the number cannot be converted, the output result remains at 0 (the default value) and the output from the method call is false, allowing you to make the decision on how to handle the error yourself. The drawback is that you don't know the actual error that occurred, only that the conversion failed. This means that, if you want to handle the error differently depending on the issue, you'll still have to use 'Parse'.
The final method to cover is "ToString()" which, put simply, converts the integer value represented by the current Intxx object into its string representation.
The overrides to the method allow for an IFormatProvider to be given, allowing the integer to be formatted in a culture-specific way, or to provide a regular string that provides formatting instructions to build the string up in a certain way, such as padding out spaces.
Intxx can also use the normal +, -, /, and * operators to perform direct mathematic operations on its values, and can also take part in operations that perform AND, OR, or XOR on the variables in question.
Next month, we'll revisit the 'string' class in the same way as we've done here, and take a closer look at the various methods provided under the lid there.
Until then, don't get your integers in a knot and make sure you parse them correctly.
Shawty
RE: R&D ManagerPosted by Peter Shaw on 01/30/2016 03:20am
Indeed Jim, and yes a small oversight on my part there.Reply
r&d managerPosted by jim lohr on 01/26/2016 01:01pm
a mistake that could cause confusion amongst newbies... you state: "The maximum value is the number of bits to the power of 2, so for a 16 bit number this is 2^16 = 65536" this is incorrect. the formula for the maximum value of a 16 bit number is (2^16)-1=65535 the value 65536 is the number of unique values of a 16 bit number which are 0 through 65535 inclusive.Reply
R&D ManagerPosted by Jim Lohr on 01/25/2016 09:09am
Minor error, but could cause confusion to newbies... you state: "The maximum value is the number of bits to the power of 2, so for a 16 bit number this is 2^16 = 65536" The formula you gave is for the number of unique values which are zero though 65535 inclusive. The formula for the max value is actually (2^16)-1 = 65535.Reply | http://www.codeguru.com/columns/dotnet/.net-back-to-basics-the-int-class.html | CC-MAIN-2017-22 | en | refinedweb |
ECONOMY.. 2
The Boom in the Furniture Industry
of Uzbekistan. 2
SOCIETY.. 4
Uzbekistan can hardly be called a land of forests. That said, its
furniture industry obviously ranks among the fastest growing today.
Furniture production is currently
booming across the country, showing a 15-20 percent annual growth. The
furniture section of the 20-year-old catalogue Yellow Pages Uzbekistan is
filled with ads on sales of imported storage cabinets, upholstered furniture
sets, kitchen items. The products were offered by European companies. There is
no line on selling domestic furniture. Some 7-8 years ago, the domestic market
of Uzbekistan consisted of imported products by 65-70%, not mentioning the
matter of two decades.
Today, almost two-thirds of the
local market is occupied by products of local manufacturers. The rapid
development of the Uzbek furniture industry has been promoted by the growing
demand of the population and economic entities for quality furniture, as well
as by recent voluminous investments in the country’s economy. Besides, the
development of capital construction has conditioned the rapid development of
the wood processing industry with its 25 percent growth index. The scale of
furniture production has been increasing accordingly.
By 2001, the furniture and wood
products were manufactured chiefly by Uzbekmebel and Fayz companies. They
accounted for over 90% of production. Uzbekmebel was liquidated with the
adoption of a decree on de-monopolization of the Cabinet of Ministers in 2001.
Big specialized furniture enterprises were transferred under the authority of
the Council of Ministers of the Republic of Karakalpakstan, regions and
Tashkent city.
Analysts have been pointing out to a
steady increase in furniture production. For instance, the furniture
manufacture was estimated at 28.1 billion soums in 2003. In 2013, the index amounted
to 392.1 billion soums with an increase of 14 times. Today, nearly 1,500 legal
entities are engaged in the furniture manufacture. Most of them are small
businesses. Tashkent city, Tashkent, Fergana, Namangan and Kashkadarya regions
have been the sector’s leaders. These regions account for 80% of all products.
Intensified furniture production has been demonstrated by Jizzakh, Navoi and
Surkhandarya regions, suggesting of the improving business climate (currency rates of CB RU from 28.12.2015 1$= 2794.98 soums).
Incentives and benefits with a focus
on small businesses have contributed to the development of furniture production
along with the increasing market capacity. For example, Uzbekistan abolished
customs duties and taxes on imported timber since January 1, 2008. National
programs on supplying furniture to educational and medical institutions have
remarkably supported furniture manufacturers and expanded the furniture market.
The significantly streamlined certification procedure is another reason behind
the palpable increase in the volumes of furniture manufactured, experts
believe.
The increase in furniture production
volumes has been stimulating imports of equipment and tools (80%), fittings and
accessories (90%), as well as raw materials. The government has provided
favorable conditions for joint ventures in the form of tax benefits and
preferences. Foreign suppliers of equipment, raw materials and accessories can
import their products into Uzbekistan on preferential customs tariffs, and some
types of equipment and machines are imported even at zero tariff.
It would be appropriate to position
the state as not just a regulator, but as a major player that defines the
demand for furniture products. The bulk of the furniture market is represented
by local manufacturers. It is worth to mention the improving quality and
competitiveness of the domestically improved furniture over the recent years.
However, it would be a mistake to say that the imported furniture is not
represented in the domestic market. One of the strong points of local
manufacturers is that they can respond rapidly to the demands of the internal
market.
Customers have been increasingly
paying attention to the interior design with the development of the
construction industry. Public institutions, business centers, residential
houses, public places like supermarkets, salons, restaurants and cafes, medical
complexes and gyms need design and style, so a customer can use all kinds of
services and offers in the interior market. There is a tough competition in it,
since professionals have been trying to keep up with the times and be aware of
the latest trends in the struggle for a client.
Creating the furniture under the
Aiko brand, the team of Autopromtechnology, ranging from designers to assembly
specialists, thinks primarily about the customer’s choice. The company’s
products have embodied a modern ergonomic design, ease, simplicity and comfort.
The rattan furniture of Aiko has entered the Uzbek market owing to the
achievements of high technologies, which allowed creation of highly effective,
quality and natural material as a basis of wicker furniture. It is featured by
flexibility and simplicity, being synonymous with good taste. It is produced in
sets and as individual instances, making a place of leisure or work
comfortable.
BEANBAG.UZ company has become the
first manufacturer of frameless furniture for children and adults. The entire
policy is built on comfort and relaxation. The use of innovative technologies,
environmentally friendly and high-quality materials help to create more than 15
kinds of truly comfortable, easy and affordable designs of frameless furniture.
They are pyramid-shape chairs, a soccer ball, pear chairs and more. They are
perfect for any casual party, child's holiday, family celebration.
The range of Etiqod private
enterprise is represented by tables, chairs, sofas, chests of drawers and
accessories. High-quality furniture is made of firm wood by the European
technology and on the Italian equipment. There is a choice of color painting
and upholstery.
ORIENT-MEBEL Co.Ltd. specializes in
the manufacture of premium-class doors, staircases and kitchen furniture.
Pursuing a strategy of constant technological and technical development of the
manufacture, the factory is operated by up-to-date equipment by leading machine
tool companies. The production process involves more than 100 people. Every
year the company invests heavily in the production growth and development.
Russian Woods offers design of
sketches, their manufacture, delivery and installation. All products are made
entirely of wood - walnut, ash, larch.
Zooko Stil Co. Ltd. operates under
the Zooko Style brand and produces more than a hundred items of furniture
products, which are highly demanded among the local population and abroad.
Several economic entities have been
engaged in the introduction of modern technologies in woodworking and furniture
manufactures, their upgrade, equipping, and prompt maintenance. EMAN Co.Ltd,
for example, has been working in Uzbekistan for 10 years. The company supplies
machines for the production of furniture and accessories, wood processing and
other equipment produced by leading foreign companies. It is worth noting that
its foreign partners aim at further enhancement of cooperation with furniture
manufacturers in Uzbekistan.
Uniform buildings with twin
apartments, furnished by scarce dull-looking and bulky storage cabinets, are
the matter of the past. Today everyone wants to furnish his home with unique
and original furniture. Walking through furniture stores and salons in search
of a suitable closet or hall furniture set, the customers have been repeatedly
facing an agonizing problem of choice. The range seems to be large, but ‘the
cherished’ articles are seldom included in standard range of finished goods.
This suggests the need in new
exclusive furniture, which would make homes cozier. With this in mind I entered
the shop of private enterprise AL-KUDDUS MANUFACTURING, which specializes on
wood products. As explained by local craftsmen, products of pine, larch, oak,
walnut, ash and elm make the interior unique and enjoy great demand. Exclusive
wood furniture looks expensive and imposing; it is suitable for both apartments
and a country house. Strength, moisture resistance and durability are its main
advantages.
The enterprise was established five
years on the basis of the existing manufacture of wood furniture, doors and
joinery. The luxury furniture is produced of wood of superior quality, which
undergoes a full cycle of drying to achieve the certain moisture content in
accordance with state standards. The masters work on high-precision machines
that make any dream true.
Master Ibrokhim Abdullayev says: “If
a master treats wood with care, if he invests his soul into it, the wood will
never perish. It will start a new life with a human owner. Made by our
carpenters, who can feel the wood, the furniture quickly gets accustomed to its
owner, and turns into an heirloom that lasts for years.”
I saw stylish kitchens under the
brand VIVA DELUX in one of the furniture stores. They are manufactured by VIVA
VICTORIA company, a modern high-tech furniture enterprise. The latest Italian
equipment and advanced technologies, qualified and experienced staff allowed
taking a lead in the furniture market of Uzbekistan. The original design of
custom-made furniture on exclusive projects is calculated to every detail. It
is produced solely of environmentally friendly materials of high quality.
Is it possible to buy furniture
without leaving home? The answer to the question is affirmative. The online
store MEBEL.UZ is a young company, which focuses on the delivery of
high-quality home and office furniture. The company has its own production
facilities, and works directly with leading national and foreign manufacturers,
which enables it to offer a large range of goods at low prices. The online
catalogue is available around the clock. MEBEL.UZ offers its Tashkent customers
the opportunity to buy furniture on credit. The company has developed a
convenient lending program with partner banks.
... Let us return to the catalogue
Yellow Pages Uzbekistan. The four pages of the last issue placed ads by
domestic furniture manufacturers. Foreign suppliers can be counted on the
fingers. This suggests that the domestically produced furniture does not yield
to foreign counterparts in design, durability and quality. The demand for the
furniture made in Uzbekistan has been growing, which is the best proof of the
industry’s evolvement. This means that a tree, according to Ibrokhim Abdullayev,
was treated with care.
(Source: «Uzbekistan Today» newspaper) houses in good technical condition.
According to the Press Secretary of Tashkent municipality Husan Ermatov,
this work has been producing some results. In recent years, 22% of crimes in
Tashkent were uncovered thanks to surveillance cameras.
Special working groups have been organized in each district of Tashkent
to identify camera locations and study them. In general, it is envisaged to
install video cameras at nearly 13,500 facilities, including over 9,400 cameras
in residential apartment buildings, and 4,200 cameras in the streets.
“The groups will be also involved in awareness rallies among the
population and house owners on the installation of systems, as well as in the
selection of companies and organizations that will specialize in the
installation and maintenance,” said the Director of the Tashkent Municipal
Territorial Public and Utility Association Ilkhom Mahkamov.
According to him, cameras will be primarily installed in doorways and on
sidewalks. They will transmit data to specialized offices under district
inspectors, and archived in a database. The records will be provided to
security and law enforcement authorities as part of crime investigation.
The project will require big financial resources. The concerned agencies
are currently working on the ways of investing funds of international credit
and financial institutions, foreign and domestic banks.
The pilot phase of the project has been already launched. Several
cameras were installed in Chinar community of Mirobod district. Today,
according to Ilkhom Mahkamov, two communities in Mirobod and Mirzo-Ulugbek
districts are next in turn. Foreign equipment will be purchased in the first
stage. However, experts are seeking for the ways of localization of camera
production by local manufacturers.
(Source: «Uzbekistan Today» newspaper)
Reference to the source is a must in reproducing materials
Report Abuse|Powered By Google Sites | http://www.uzbekistanitalia.org/home/bollettino/informationdigest-pressofuzbekistan-december282015 | CC-MAIN-2017-22 | en | refinedweb |
Opened 7 years ago
Closed 6 years ago
#14505 closed (invalid)
Multiple Namespaces and reverse lookup does not work as advertised.
Description
### urls.py urlpatterns = patterns('', (r'^butter/', include(milkpost.urls, {% url milkpost:myview %} </body>
both urls: /newsletter/myview/ and /butter/myview/
print out /newsletter/myview/
As the following page points out,
two instances of the same app should be distinguishable. This does not happen though and can be very frustrating!
Change History (2)
comment:1 Changed 7 years ago by
comment:2 Changed 6 years ago by
This is working as designed. As Frank notes, 'milkpost:myview' is referencing the app namespace using the default name. If you want to differentiate them, you need to either use 'butter:myview' or 'newsletter:myview' to differentiate the instances, *or* pass in a current_app as part of the context when rendering the view.
As for the docs not being clear... I thought they were. They describe the step by step process, and gives an example as well. Suggestions on how to clarify the docs are welcome.
The docs aren't super clear, but after a quick read shouldn't your template just use {% url myview %} and then it will resolve properly inside each app? By using 'milkpost:myview' you're actually telling it to use the last installed instance ( i.e /newsletter/ ) here. | https://code.djangoproject.com/ticket/14505 | CC-MAIN-2017-22 | en | refinedweb |
146 Related Items Preceded by: Starke telegraph Full Text .. i .. .. : -, -._, ..._ ._ M. ;"'- -_...._"'''":' .to. .... ,:;- .. ._ ... ... .. OIl _'. .. lit... 11II... ... .... .....1;;. ..-- .... _' 'jj ;" .. ;:: , / ' 1 , ': ij, '. \ ; ,... ,,. 'I .',, " J 1 'I: I' ' ,;. .: 1 P. 1 K. Young Library : ' '\ of : .., " University Florida I , " .. " Ine.v1.11o "la )11611 f1lY( ti NM' .. '.H 'tit. -a ,w ". ),, , ; 'ihI1Hr. "! ," 1t .j. '' .I'' . - Of ,1: ,, .'j. ... _, 4',it1Fr .t .. UJj ;" ''P y ou . :. ,Ir" \' ' "STOP j j"C . .. . .! , . ,; S DFOI ::1 .. .. " .ttt. : . IMIPi. I cd14,1 ,, '. 'f".,,' S :i . { .yV .. .' /-- SINCE 1879 . vs tr . I T, .('r < .", ) 6 :: d r '"b yr +i/ ESSSEt ":3? + t f The Sweetest Strawberries This Side of Heaven J r I Mb Year STARKE. FLORIDA Cents < I .. 33th.. Issue Thursday March le. It7l Copy j f .1, j .fr'IODlpulsory If : Water V ! i irryti , I :oolt Protested \ ' 1 ups i iM , 1I I ' 1 ) i,I.; 1 I II'' j4 Mt M Hampton Council " p 1 ak'W : '! . + It was standing room only as residents packed the meeting of ? the Hampton city council Tuesday,,Feb. 14, to protest a ma xis. f tory hookup water system Residents Interrupted each other to voice their protests over County Fair an ordinance. being drawn up requiring everyone In the city to : li book to(Jie water it : 4 4t up system once la completed. .. Majority of the ;; : 30 protests came from residents of Hampton /" Villa who explained they had put down wells, often costing / - $3.oooand did not want to join ontoclty water. Set ': ' ; to ; Council members explained the ordinance was being drawn Open Students up by Hampton attorney Dick Welty and had not been voted on : ; $ and cduld.toe] changed as plans for the system were completed. 1 t Engineer Alan H. Aront of Sverdrup and Parcel explained to1' 'h'd the 25 people gathered the present system was not up to Depart- In 2 Weeks' CompeteIn ment of Environmental Regulation standards, and the smaller :: . water lines. offered no fire protection. ' Aront slid a field study fa even \If they were not hookedup while others There will be something for In Starke. at Brooker and being maqie to determine the kept repeating - everyone who visits the Elementary Scho \ self-suffi Hampton they service were area to serve the most Special annual Bradford County Fall'set ols. In Starke tickets are people In\fjne most economical'way. cient and did not need the for March 29 April I. available al Starke Elemen lIo''ald the rates are system based ; those using the Mayor William Summers The fair Wednesday. tary. Southside Elementary ] opens system all are In part determined 'asked for the cooperation of March 29, with ribbon cutting and Bradford Middle School.' 'd I Iw all the citizens for the good In L'nlon Countytickets arc Olympics byjjhe Farmers Home ceremonies at 11 a.m. Taking Administration (FmHAl) and general welfare of the part will be this year's Strawberry available at Union County which, the city: hopes will give community and those on the Queen and 1977 Straw' Utah School. ' "Let 'a 'SO percent grant and 50 present system, many of berry Queen Lisa Mitchell.: me win hutlf I cannot whom,have no alternative but Close to 100 booth! will I beset loan (for the win. let be percent system. "me braIn my r ('lockwIIlPf' to rely on the water system. up this year and a new outdoor iittempt. the Special I County Special: Olympic The enginner said SAP Is Aasl.tantflr.chief Jack Ca toe Annual Rural-Urban Day at patio eating area has Olympic oath was repeated by' participants prepare for the also workttig with the North, said the water system would ,which the Starke Rotary Club been added. :to Bradford County students l opening e'rremonv parade 'of Central Regional Planning also offer fire protection with serves a chicken dinner' during the opening ceremonies : athlete around the Bradford Council ;'Alt' obtain a Coastal! hydrants, begins at noeji. Wednesday is Entries in the Horticulture ol the track and field I high !School: \ track Thursday Plains grunt, tod a Housing Mrs. Sylvester Smith said also Senior Citizen's Day division are open .to -all residents vompetltlon held Thursday.: .nd'.iv'I...' during which all seniors are ol ... .... 'l "'1.Development she..hadlAV.."lul . J.ltrs ..V..IA Jtw"PII .tr I\,""":("rioi-1;;; n MNM>t.d as Ibe-nMistor. ct*"... .' ip"ant' <* e''1cII1tr the '33dooo; ,v -problem for the,'Cilj/: / ....r.."..put- admitted tree trf charge ", will\ he both vouth' OM oMstte***** x &._J.- In Special Olympics i ceremonies !giving the 'Middle School .I';'(:aZaCorby 1t. ome'recetvea; Ioaarae.? : 'flSure-fcK hast* to begin! to1 Sown Individual wells for all a.." 5'', .td9.V"A W ddirelwaiflawear, .. tIf.liPtI.'jl' lid. ' competition everyone I III a welcome address and prayer. menl from his teacher Mrs Anna Clayton. Coach Jerry Petrella seek: funding, but actual cost those on city water at a cut of 'Set far Wedn adayt'nlght at -accepted. Mondavm1Jaceh<! 'q Inner and Is eligible for the' Also! participating in parade; of coaches Lamar Rteherson of Starke, Elementary In the standing' ,. 'wlll..not be known until all $50,000. then the city could 7:30: p.m. is the annual S*'lne .. district competition to be hold! athletes around the track long jump. loans and grants are applied save about 1300.000. Show open to qualified/4-H or from 9 a.m. to oj ppm. and , April H in Booster Stadium In 'were the BUS ROTC color BMS student Terry Albert gives the ball a heave In the softball for and the service area Is Aront agreed there was FFA members who attend Wednesday March:29 from to (Oca la.Thirty. guard!, the Forestry service throw. The middle school band under the direction of Mike. determined. some logic In that proposal Bradford or Union County'' 9a.m. Judging will take place boys and girls i yt ith Smokey the Bear. Starkr iWondrin.playa for the opening parade.was Residents of Hampton Villa but the final cost of the system Schools. A showmanship contest Wednesday from II II a.m. I competed under gray skies 1 Police and representatives of done by' high school County Hospital Cand- were told by Aront he would has not been determined yet. will be held and awards The outstanding exhibit will find out the will be made for first 'receive a'ribbon and $J. Other .and misty weather but it did the local I :National Guard Unit. student Fred and the Jr. procedure from Another place a Fayson assisted strippers Women s meeting on the not spirits as The middle school band Club. FmHA to ask to be excluded trophy plus S13; second. $10: prizes will he awarded. challenged by Coach Jerry Petrella. water system is set (for Tues from the third. $5. they each other in system and would provided the beat for the anizer Mary Strong Feb. 28 at 7 day. , the 50 yard dash the 220 and parade. thank especiallythe see the council gets the p.m. The Bradford Union 4-H New divisions have bem everyone: In other business the council 4-10 relay I the softball thrown Assisting with the events coaches who helped make information. heard from assistant fire chief and FFA Steer Show is set for added In the Home Division. nd the standing long jump. were organizations from the this year's Special Olympics 'Some residents said they Catoe. He reported the volunteers 7:30: p.m. Friday. March 31 Entries will be accepted Koch: participant placed first The symbolic run and high school. Serving refreshments competition a success for feared they would be requiredto had acquired a third Steer Show exhibitors In the !Monday. March 27. from 1tt in their age group and division lighting of the Olympic torch were the Bradford those students. pay for the water system water truck and Saturday was 4-H Club from Union Countyare pm. and Tuesday. March :iH.! hind received a certificate. set for ; Robby Worrell. Glenda from 8 a.m. to noon. Judging repairs. Chairman Ted 'lniS' Shaw. Shands Howard. Jr.. principal Charles will take place Tuesday after Curtis said the beepers had Lawtey Council Acts to T eke .,' '; been returned and were ready Sonny Williams. Brown.Charles Crawford.Martha will noon.be A awarded Best Overall in addition Knselte\ to to be distributed 'c or". m., !fIt. ,_;...t ( : volunteers.In to the and Michael Donna Dukes.Worrell.Julie Brown. other prizes. : '. ."' .--.-:':.'-. I other action, the council: Highlight of the final day. : S Bradford County 4-H Club Saturday. April I. will be the . ", ._ :;.1 First Step Sewer -Approved the purchase of exhibitors are: Brian White- 4-H and FFA Steer Sale beginning . !!i::': on SystemThe t an amp probe to set up the head James Whitehead. at 7 p.m.Youth . .,. motor on the water system. Sharrl Dobbs, Drew Andrews Wayne Cribbs. Jr.. Frankie -. Lawtey council voted meeting, and the engineerscan When Step One has been actually loosening up. More After discussion approvedan Andrews, Stacey Hayes. Jill Arrested . :;.; unanimously Tuesday night to now begin Step One, ,completed the city must decide monies are becoming avail- expenditure of softball f 197 to sponsor Hayes, Gene Joyner and 1 give the green light to engineers which Includes) a complete whether to proceed with able to Florida." a Hampton team. Marilyn Griffis. from Sverdrup and study of the environment, a the second step. This includes Approved was $23 deposit to Union County FFA. exhibitors For BombThreat Thursday March 1* Parcel to begin Step One in the cost-effective analysis a construction drawings, plans, An advisory committee: will play on the Stark: field and are Jon, Brown. Lisa development of a sewage feasibility study, a cost permits and preliminary be established consisting of $172 entry into the league. Proctor Eddie Lee. Darren sell system.The analysis of user charge and construction work. the council members, one Tom Paladino, representing Brown and three Tugjzle engineers had applied environmental assessment,' The planning area for the staff member from the North the team,said Hampton would 7p.m.Friday to the Department of EnvironmentalRegulationfora Including a treatment and sewer system Is 12 Central Florida, Regional continue to play In Starke until FFA exhibitors from Bradford A IS-year-old male who grant, disposal method, and pro approximately square miles, planning Council, the the field In Hampton is re County are: Butch made a false bomb threat March 17 and the$16,526 grant had been posed treatment sites. which incorporates more than Department of Environmental novated. He said ball team Faulkner. Harry Faulkner. Tuesday morning to the Bradford approved, The grant was Step one is anticipated to the city limits. Regulation the members would move the Jr., Everett Hayes and Middle School was arrested - accepted at Tuesday's take approximately 12 weeks. When asked about the avail Suwannee River Water light poles and haul fill dirt if Tammy Johns. by Starke Police at his Bingo The information will then be Chard of grant money, Management Basin, the- the council gave permissionfor Miss America. Susan northeast Starke home less Stark Elementary' submitted to the DER to be Swallows of Department of Offender the work. Permission was Perkins;' will visit the fair than 20 minutes after placing 7)10-10 p.m.sponsord ,l\lurderTrial assessed. This usually takes I Sverdrup and ParceL said, Rehabilitation, and two granted and when completed Thursday. March 30.at 2 and 7p.m. the call. by four to five months.In "the money situation Is Lawtey residents the council said it would offer Twenty-three year old The juvenile was charged IE PTO the ball club a five year lease. Miss Perkins Is a graduate of with a bomb threat false . Jury Selected Ohio's University of Miami. alarm, a second degree felony 7 Saturday, March IS Finances ;Equipment Salaries Hampton recreation director where she majored in biology. punishable by a prison term. \ For 3 InmatesJury Mrs. Ollie Sheppard said The youth was turned over to' '- .' she would approach the Advance tickets for the midway the Division of Youth Services March of Dimes selection In the murder To Be Discussed by BCH Boardagreed county commission for funds will be four for '1. Ride and will appear before County Waillathon.10a.m.from. trial of three FSP inmates to purchase equipment for the tickets are available: at the Judge Elzie Sanders with his t continued until late Monday team. Chamber of Commerce office parents or.guardian.A . Courthouse 138 Bradford preparation tar the Brad- Sanders and Green listed to not make a recommendation I night as answered Countyrl'llldl'nllf sum*: ford County Hospital board several &items they would at the present to The council did not approvea CodeHearing Starke police spokesmansaid BUARC Auction monnes and one by' one were meetln'g' at 7 p.m. tonight recommend to the full boardto bring employees up to the request from Paladino for Zoning the call to the middle I Farmer's' Mkt. dismissed until the final 12 Thursday, March 16)), on the, pursue including adefibrillator minimum wage until the team to enter 10 tournaments school at 9:56: a.m. was locked 10a.m.Monday mem crs.P ere chosen finance committee Mrs. for the hospital, a Douglass finishes a study of at <69 each. Council SetThe Into' the phone company; Lucille Green and Curtis. copying machine j on .a lease the complete financial members said they would take standard procedure In all .March 20.: The jury will try Benny'Demps. Sanders met Wednesday picture. each! tournament as it came first of two public county schools, and traced to James' Jackson and morning with business arrangement, and grab bars and help In raising money. hearings on Starke's proposednew the calling phone. All schoolsare Harry Mungln on first-degree manager Angus Douglas and for patient and public bathrooms Also expected for discussion Clerk Mary Allen said only zoning code will be held at presently set up for 't BC School Bd., murder charges in acting administrator Patricia ,Douglass to check on. .tonight, is a management presentation $500 had been budgeted for recreation 7 p.m. Tuesday March 21, In tracing calls said Starke 'i30p.m.: thelstabbing murder fellow* Ivey to discuss spending priorities. possible repairs ,to an x-ray by representatives the City Hall. police and response time to Inmate Alfred Sturgis on Sept; processor that is leaking. of Methodist Hospital Founda Mrs. Allen read a letter All interested persons are the location of the call is usually '. Elks a Elkrtas 6. 1976. Douglass. presented the The finance committee tion. ,,-'( from Evelyn Vaughn protesting Invited to attend. less than two minutes. Starke Lodge 110 The prospective jurors filled financial l statement for the the purchase of The new zoning regulations Dinner p.m. the courtroom and stood In the month of February, predicting occupational license by senior were _prepared by the City The telephone line remains Meeting Ip.m.Inltallatlon aisles and halls all day while the future was going,to be Kinesley: 'Zoning Appeal Due Hearing citizens who have rental Planning Committee In open even If the phone hung of Assistant State Attorney Tom brighter." property. The council took no cooperation with the North up. said the spokesman. Elkettei Elwell and Defense attorneys Florida Regional Planning Starke police chief Jimmy : John Carroll cf Montgomery He said the recovery of bad An appeal filed by the ''The rezoning petition was action. Council in accordance with Bowen said :s false bomb .1 I Tuesday, March 21. Ala., and Leonard Ireland and 'debts was continually Increasing Kingsley Lake Property filed by F.W. Strickland present Following the reading of the the proposed new comprehensive threat charge la very serious Peter Enwall of Gainesville ,, and the board .Owners Association against a owner of the property, minutes Hank Lott questioned: plan and juveniles now cannot getaway vied, 'over- whowould be ,should consider 'hiring a recent Clay' Zoning who said he wanted to remodel members map. t Council County if the council were Basic goal of the code'Is to with placing such a call selected for the 'collection In prior Board decision reclassifying and use the cement Stark jury. agency. paid breach of the special "encourage and In and expecting not to get 7 p.m. Only 'two' weeks ago a' meetings the hospital auditor a 200 x 200 foot plot at Kings- block building for restaurant meetings/ called about the accordance with promote.and caught. i motion for a change of venue had recommended the same; ley Lake from agricultural to purposes. The' property had 'water system and he was told future needs, the present safety, 'The time'' lost' by the stu r Csrr.1 ., was denied by,the court after action. neighborhood business,will be previously, been granted a the council Is paid only for the morals, health order convenience : dents was over an hour as the testimony from each: county The business manager said heard by the Clay County 'special uses permit for sale of regular meeting and only \if prosperity, and;;; general buildings were searched even m 1 t /OI mmunUg commissioner the clerk of the for "good news" he had nee Commission at 7 p.m. Tuesday beer on premises. they attend. welfare of the citizens of the after apprehending the caller &'tut Sank court,and other local persons.:'' Medicare reimbursement ,.March 21. City of Starke." said middle school principal: The defense had inmates to '' and the hospital Under Clay County zoning Guy Starling said he was All citizens of Starke who Jesse Moore. The school'' ( prove that prison,, would be receiving $34.000within The zoning Board approveda regulations the special usesoerinlt interested In being the dogcatcher wish to ask questions or make population of 750 was evacuated could not get a fair trial in this the next couple of BA classification last month Is still iD effect al- , In Acmnn*wT .........ore Hampton and statements concerning the : by a route that Is practiced - .--.y 'c weeks and $20,000 from ,, for the property the former though t the business has been would be available to discuss: regulations-will be heard' at once each semesters .lbsi.0...."._.....c_ Thee trial Is expected to take Medicaid reimbursement Nail's grocery on'Road IfrA 'closed for more than two salary. No action: was taken this a time. once each If weeks! laid all week. soon after on the north side of the lake. vears. bv the council ...-- . '1 :.... ... _.. .. .. ... .. .. ... ------- -"" '--1. >11.- -- -.=-.:!::r--: --rc :.s.II-: ==- -.r-.rt'". .... .:,:.::.::-:;:---1.--::::I..-" "-.-. ..-. .-.-. .-. ..-_-""-.....,.-"--.., "-' ...-. .-... w -_-.. "-..M__ "" .....-._.. . - i 1Paget i "" r ; \ , TELEGRAPH March 16. IS7S . - Lynn Andrews, Jon n Schlumpf To Wed . 11 f f4Y'12th1I 9WCYhe df t Mrs. Nina Bishop Andrews Starke. Paternal grandparents w of Atlanta. Ga. announces the were the late Joseph engagement of her daughter William Andrews and Nell Lynn Iticharde Andrew, to Roberts Andrews, also of John Richard Schlumpf. son Starke. cac yt Wooty SocUlyil** 964-7608 of Mr. and Mrs. James David Mr. Schlumpf is the Schlumpf of New Canaan grandson of Mr. and Mrs. Conn.The bride-elect's father Is Alfred Evansville Elmer Ind.Schlumpf and Mrs.of sr Homemakers Make Plans For Fair Joseph.William Andrews III Betty Coglizer and the late , of Trenton.N.J. Her maternal William Arthur Cogllcer of grandparents were the late Seal Beach. Calif. The Bradford County weather but It .Is believed that stick Crochet" and Mrs. Harold Arthur Bishop. Jr. Miss Andrews was Homemakers club made final the more Introverted type of Mattie Miler will be the Instructor and Nina Klcharde Bishop of graduated from Lakeside plans for volunteer workers at resident will be more at ease 'Quilling." High School. Decatur In 1974 the Bradford County Fair at Inthe privacy afforded the Deputy Don Denton will beth I Hosp. AuxiliaryTo and attended Vanderbilt their meeting : hur 4ay. back ;yard. speaker at the Aprilmeeting. II University She Is currently a March 9 held In the His subject will be I II I Meet Mar. 20 student nurse at Crawford W Agriculture Building. Plans were made for the "Drug Abuse" I Long Memorial Hospital In Members who can assist double Workshop on Thur.day. Visitors and new members I The Brudford County llospi-/ Atlanta.Mr. Mrs. Lola Johnson In the March 16, at 10 a.m. at are always welcome to all aY! r / Cal Auxiliary will hold their Schlumpf was Lynn Andrews2doaLow Home and Needlework the Agriculture Building. Miss meetings and worshops. li 'O general meeting and covered graduated from Peachtree Division of the Fair Arthurine Blanchard will be regardless. of race religion or .. I, dish supper Monday. March High School in Atlanta In 1973 volunteered their time the instructor for "Broom creed. I.. 20. ul In the Methodist and from Members r 7p m. Vanderbilt were again Fellowship Ifa n. University In 1977 with a B.A. reminded to donate any old Stork Shower Honors Mrs. Parrish I A report of the nominating degree in Biology, lie is Jewelry or anything else ; II I committee will be given and currently employed at the Mr.and Mrs. Robert Hurt of appropriate that they have to Mrs. Lowell Parrish was An attractive pink and blue ;,, yYP 1 un election of officers held. Vanderbilt University PltUiburg Has. and !Mr. and the Starke Nursing Home for complimented at a stork color motif was carried out in I HoKtctiHcs<< will be Mrs. Medical! Center In Nashville.The Mrs.Floyd Johnson of Seattle bingo prizes.Discussion. shower Monday night March the party deeora olII. A tall I Frank Palmer. Mrs. A.C. Bas- wedding will be held on Wash. returned to their homes was made for 6 given by Mrs. Bobby stork centered the gift table. _ lord. Mrs. Martha Mi ley. Mrs. Saturday June 17, at the Oak Wednesday of last week after plans to donate a bench or Taylor Mrs. Edward Grlffis H:. Ida l I'lummer and Miss Grove Methodist Church. In a weeks visit with !Mr and something else useful to the Mrs. Marshall Yearta Mrs. Twelve guests ''enjoyed refreshments i) : Arthurme Bljnchurd. Decatur. Mrs. Leo Champion. Nursing Home when plans get John Greene and Mrs. itonnieTomlinson and fellowship under way for their Home at the home of the during&the party hours of 7:30: t " back yard project. Some latter on US-301 N. and 9:30 p.m. :. residents of the Home sit In the front yard during nice Brenda Creamer Shower Honoree I r/.A".f/ Miss Brenda Creamer Among the guests attending h5 # bride-elect of James were Mrs. Beatrice Creamer, Livingston, was honored at a mother of the bride-elect, and Mr. and Mrs': Terry bridal shower on Saturday Mrs.Evelyn Cruce mother of 0 c: Walters of Gainesville given by Ms. Connie Clemons the prospective groom. > announce the birth of a son and Mrs. Toya Browning at The Creamer-Livingston OtJ Jefferson Reid. March 9 In the home of the latter.A wedding will be an event of c Alachua General Hospital. Saturday. March 18, at 7 p.m. o \ Textile Paternal grandparents are blue and white wedding at the Church of .God In Mr and Mrs. S.L...Peek. of theme was carried out Lawtey with a reception riu'1 . ) Starke. throughout the party rooms. following at the Garden FACTORY Games with prizes were Restaurant.All . 'G Mrs. Darlene Davis enjoyed by the guests. during friends and relatives are I. OUTLET announces the birth of a the party hours. Invited to attend. daughter Janie Marie. March Mr. and Mrs. Larry Noegel 7 in Shand's Teaching G.S. Browns Hosts At Rehearsal DinnerMr. Drapes Bedspreads, A Complete Hospital. Maternal grand- Line Of Bath 8 Kitchen Towels parents are Mr and Mrs and Mrs. G.S. Brown Oshkosh W...., parents of the Carol Kleman and Larry Noegel Ernest E Todd. were hosts at a dinner party bride Mr. and Mrs. John Friday night. March 10, at Adams of Gainesville.Mr. and Repeat Vows at St. Marks I SPECIAL Mr and Mrs. Tom Smith of their home at 1619 Raiford Mrs.Richard Self of Sarasota. .... SII' ...H".. ,..$1 095Q. birth Morgan of road a daughter.announce Tonya the Noegel Road ,for and their his fiancee son, Larry Carol and Mr.Tom and Andrews Mrs. John of Jackson Jamison Miss Carol Jean Kleman of groom from Port Richey. Nichole, born March 8 at Kleman, following the ville. Mr. and Mrs. Donald Jacksonville daughter of Mr. They were attired identical to Alachua General Hospital. couple's wedding rehearsal. DeWitt Alescla Odom of Port and Mrs. Donald Kleman of the Honor attendant. OPENING SPECIRL Paternal; grandparents are Bridal place cards markedthe Richey Mr.and Mrs. William Oshko h. WIs.. and Larry Alescla Odom. niece of the Mr. and !Mrs. Harold Smith. seating arrangements for Zellner of Clearwater. Mr. Schafer Noegel son of Mrs. groom, was flower girl and 9x12 Oval Maternal grandparents are the 30 guests. The tables were and Mrs. Douglas Scull Mrs. Jewelle Brown and Stanley S. carried a miniature nosegay, , $6695Room Mr.and Mrs. M.M. McRae all centered with arrangements Robert Beck Miss Ginny Noegel of Starke were unitedin similar to the attendants. ' Size Rugs of Starke. Tonya .joined at of red and pink camellias. Foley of Oshkosh WIs. marriage Saturday March The bride. given In I home by a brother. Shannon Out-of-town guests were Mr. 11. at 4 p.m. In St. Mark's marriage by her father worea and a sister. Heather and Mrs. Donald Kleman of Episcopal Church. Ivory silk organza over I e Twins Celebrated Father John M. Flynn and taffeta gown with high rise Jeans GMork - Father Fred G. Yerkes per- neckline cap sleeves, Venise II ( Clothes 'LL i! (} J \]ruIII\ BirthdayMar.ll 1 formed Decorating the nuptials.the altar were waist.lace on The bodice gown and featured an empire a I Lots 'STARKE'S OWN BAKERY' Tim and Amy Lewis twin two gold branch spiral candel- full A-line skirt with attached I af Bargains abras with arrangements of chapel train. A band of i 138 East Call Si Starke 964-5890 children of Mr. and Mrs. Jim Lewis, celebrated their white gladioli pink carnations matching lace and seed pearls I I seventh birthday at a party. yellow and white secured her elbow length veil LAMB & BUNNY I Saturday afternoon at their pompoms and baby's breath. of silk illusion. She carried Come Out And 'Meet Lil & Audrey FOR EASTER home at 1316 W Madison A memory candle and unity pink bridal roses pink ' SHAPED CAKES candle completed. the carnations. yellow.daisy pompoms -- They Are New To Starke But Not And Easter Cookies .The youngsters were given ceremon: >. ,* white pompoms. of English Ivy taai .bufry;* rldmf and 11m.. were Presenting a program " To'The Business .. pony; '"'''music'' Joann breath. World .. &LARGE. & SMALL played with Elizabeth Rowell. Uptl -were John' Loper and Julie Canova organist, and Kathy A reception was held in the 964-6740 EGG SHAPED CAKES Ferguson The refreshment winning prizes.tables Taylor John Adams soloist.of Gainesville church mantel was Parish centered Hall.with The an were decorated with pink. attended as best man. Tom arrangement of pink carnations - Hwy 301 South Starke I ....................................... blue and yellow streamers Andrews of Jacksonville was white gladioli, yellow and balloons. Punch,cake and groomsman and ushers wereJohn and white pompoms and candied apples were served. Jamison of Jacksonvilleand baby's breath. HOT CROSS BUNS DAILY Aaeistingln caring for the 20 Richard Self from. Mrs. Charles Darby little guests were Mrs. Sarasota. directed the wedding and Mrs. Pauline Tanner Gene Tanner Vickie Bech of Oshkosh John Adams kept the.bride's I and Cora Day. WIs., served as matron of book. honor.She wore a floor length The bride's table was greenspray gown with cap centered with a wedding cake sleeves empire waist with tieback decorated with pink roses. and draped neckline. She pink lily-of-the-valley and wore matching flowers in her lopped 1 with a i I nosegay of the WALL CABINETS hair and carried a spray of bride's chosen colors. pink carnations, yellow daisy The punch table was I t t ..1 rr-: With Nylon Door Catches Br\nQ pompoms English ,ivy white and pompoms baby's, centered bowl encircled with a with crystal springer punch r,i' breath. and pastel flowers. ,. Some With Open Shelves Attendants were Darlene Mrs.John Adams Mrs.S.G. : : t :: l Eellner, sister of the bride Denmark and Mrs. Edmond __ \ reamSearth from Oshkosh, Wis., Janelle Davis greeted the guests at _- From $2495 0 Scull from Clearwater and the door. Mrs. Maxine Han- Sharon DeWitt sister of themE cock assisted in serving. Following a wedding trip to : BR.oOfo'OROroUNTYTELEGRAPH Las Vegas Nev. the couple I will reside in Jacksonville.The . 'To Published every Thursdayat bride graduated from BASE CABINETSMicarta 131 W.Call Street Oshkosh High School, SUrke Florida 32M1 attended OTI graduated from Gale Institute, Minneapolis Top Cabinets for kitchen or ij il'i{ Second Class postage paidat Minn and employed with T SUrke Floridasabscriplion Delta Airlines based in office. Drawer space and shelf space i\...it Atlanta Ga. in Rate: Mr. Noegel graduated from 8dTt. : n la trade area: |7 per Bradford High School and the _:_ year; 14 fix months' University of Alabama with aMaster' c: "degree in math. HIs : Outside trade area..Sper employed with Noegel's 4occt$4495j '\esr:94.5esismonths. Auto Sales in Starke. t. 7 :, 1:I pi;fy V "S'iAij' 'r :" ( "' JIM'S , a., STYLING '//'p J' j.; '" . UTILITY STORAGE CABINETS CENTER The handiest of home storaqe cabinets 904-6394 t r. .SAVE THE Personalized Hair Styling For Men 4 Women for any room in the home. A size a style . j I .. ) to fit any space or storage need, From E EGff EGflBV? POEM E00tfGE basement to attic to DOWN PAYMENT p carport laundry room. QLLADIES I MEN'S* -, we have a style and color to meet yourneeds. 5 Frosting m jJU Cut Style, StreakingCorapfct. REG Shampoo, Kirar _, LI.J $9 ''o The house of your dreams begins RZS. 'io-4 Blow-DuT From fl : ...... with saving for the down payment. And s M8M IgOQ See Our Complete' Une of Home Storage Cabinets .! nobody can help the way we can. Manicures & FacialsEloise . Our high interest rates on savings PLUS COME IN AND BUY YOURS TODAY Sterner Extends A Welcome To Her home financing experience make us p: Patrons With A Free Conditioner With dvery ' It's A Fact ou Can Do Better At the specialists. See us soon! ... Shampoo & Set Eloise !Ie The Former OwnerOf t L'"c: NK ruRWITURE.: Guaranty Mr. Otto's :dQNM , @ m Federal --_ MONDAY Thru SATURDAY Savings, el.Gainesville. Lean, Association THURSDAY EVENINGS BY APPOINTMENT EQUAL HOUSINGLENDER STARKE: 9640394jAcross << ' .l 395 W. Madison From Hwy Patrol( aE liSSiP - 434 W. Call St. 301 North Phone 964-5827 9646394r , ." ......_... r ___ "-- -..--.. .. .. .... ..-..-....----.. .. ...------.-.... .. . on rvtJuaitMii, ... - ... "" - l ''t w r -. , 1 ?r March II.IWH.. TKLF.GRAPII P.K.:3 ..- ---.--------------- -Elsie l Hall Celebrate! Terri Dyal Honored At Bridal ShowerMiss - ; atria.ei : oyldinneer honored Terrl Dyal,, April 29 f jarrangement, of camcllas, : 7I :i Sunday brlde- lect of rt'yPaterson t ; flanked by white candles In it) March 12' at the was honored at a miscellan silver holders. The cake was i... pndMniohnR.IIARooL.ake eau! shower on March 7 given served from one end of the '_i.Geneva by M.... Tom Casey, Mrs. table by Mrs. Tom Casey and ; Included In the 35 attendlnll y. William Haas, M.... Gerald Mrs. Cynthia Schmitt poured were all oT her children.; a ItOI'I : Norman Mrs Tullie Norman, hot spiced punch from the Raymond dauHail 01'Cocoa : trr Mrs David Montgomery. silver tea service on the opposite 4 ; Mr, and r Y Mrs. Cynthia Schmitt anaM. end. .{*". Howard( Fox of Ormond ..., Hugh HutBon at the Other arrangements of !1IL' Beach; daughter, Mr. and home the latter on Brown- camellas were In the party Mrs. lee Jordan of Boole lee Road. .rooms. L Md., and granddaughter'Ccry .r? Among the guests were Mrs; .. ,and Mn. Patsy EddY of James E. Dyal.! mother of the A bridal game was played : Gainesville Also included .' bride': Mrs. Lucy Finleygrandmother and a prize awarded before _ were brother. t andMrs. the honoree her I.w and sisters and 65 of the bride: ; opened gifts. many guests : .Robert Paterson. motherof Miss Dyal received the v vSO '. ...c- ....:-c the groom x covered casserole of her _ The refreshment table, chosen china from the covered by a green tablecloth hostesses a momento.of the J YX .. . : was centered with an occasion. Mrs Edward Burns of . Jacksonville was guest of Matt Waters Celebrates 2nd Birthday, h Mrs. L.N. Pickering from Little Matt Waters celebrated was carried out with matching Wednesday. to Monday. table cloth, napkins and . his second birthday cups.A 'Mr.and: Mrs. Charlie Garrison Saturday when his parents. big bunny cake centered the ! !! of Indiana were weekend y Mr. and Mrs. Wilbur Waters, table., guests of Mr. and Mrs. Frank gave a party for him and 14 The youngsters were given . almet' at Klngslcy Lake. little friend at their home on popcorn bunnies and candy : W. Madison street. egg favors. Drew Barry of Birmingham The party was held in the Assisting were Malt's Bradford County IlespltalAazillary president Mrs. A.C. Bastard presents Iwo jump bags to be Southern College! Ala. is home kitchen which was decoratedwith grandmother Mrs. R.A. used by tae emergency rescue units. *-on''ten days spring break.The green and yellow Colson Mrs. Mark Moody and Accepting the bags and heavy duly scissors purchased by the auxiliary are actingdmlnUtrsUr family will celebrate Drew's streamers. The Easter theme Mrs. Mike Waters. Patricia hey and EMT II, Clark Martin. :and his grandmother's, Mrs. I ,*F,1I. Kramer's birthday at .a s Mullins Celebrated 17th Birthday family:! dinner Friday night. It Patty -- ... .. 1 .rjonah ............................................ Patty Muller celebratedher R.S. Muuins at their home on , ,,,,Mrs.J.R. Kite was weekend Bonnie Trlsler, Paul Rlffel 17th birthday Monday SR-100. Included Cecelia Terwillegar visited Mrs. Helen Genereux returned Lex Sanders and Gerogia The 10 tguest of Mrs. J.C. Wallace in attending a Jacksonville. evening at a surprise party few close: friends and her family In Sanford over the to her home In Springfield LeCain of the St. Johns given by her mother, Mrs. members of Girl Scout weekend.Her sister, Madalyn Mass. Monday after twowl'ek. Country Day School will spend troop 12-'Mrs. James Montuoro and Bonnie Trisler, Paul Rlffel) To Wed l ll lltfl W9. Scott,of Coronado,Calif., wasalsSanford. .visit with Mr. and Mrs. Friday to Sunday with their I .cbJ I Robert Green. 5th and 6th grade classes: at daughters of Hopkinsville. Ky. Cake and. ice cream were Va. Jre spending this week with Miss Bonnie Trlsler, former graduate of Santa Fe CORK tJ..K- served. Williamsburg. {tier parents, Mr. and Mrs. Bradford County resident has munity College. .'.IIDBIW Mac Baldwin. announced her engagementand Mr. Rifle was a 1973 Local';' admittances to t : v ipp' ; forthcoming marriage to graduate of Owen Valley High Bradford County Hospital this c JJBDrn'ill9 , ( ( Miss Vicky Turner will re Paul II. Riffel of Gosport. Ind. School and Is currently week include: from Starke. ( ( $ (aa$ 'il (! 'i !helve her degree in Early; Miss Trisler is the daughter employed by General Electricin Mrs. Annie Haynes, Miss Childhood Education from the of the late Mr. and Mrs. RalphE. Bloomington, Ind. Velorla Deen. Mrs Essie Ave. 964-7358 N. Temple University of Florida on Trisler also of Bradford Holland. Mrs.Mach McCloud, 800 Saturday.Mr. County.Mr. The couple will exchange Mrs. Reba Crews, Mrs. PROUDLY' PRESENTS ' Kiffel is the son of Mr. vows April 28 at 7 p.m. in the Deborah Sue Mathews, Mrs. and Mrs. Frank and Mrs. Jack D. Riffel of Church of the Firstborn at Fannie O'Hara, Mrs. Marie Palmer Jr. and son. Frank rural Goxport. Gosport. After a brief honey. Carmichael, Mrs. Irene Palmer, III of Dallas Texas Miss Trisler was a 1972 moon to Niagra Falls and Mitchell Mis ,Jorotha BAR spent last week with his honor graduate of Bradford Washington D.C. they, will Morris,Mrs. Elizabeth Crews. SALAD2OTypesOf parents Mr. and Mrs. Frank High! School and a 1974 reside,in Goeport. Anvil\ O. Davis, Geroge . Palmer at Kingsley Lake Goodell, Mrs. Carolyn Williamson Mrs. Priscilla Mr.and Mrs C.C. Smonk of Bobby Smith Celebrates 18th Birthday Austin John W. Crowson and Jacksonville and Mrs. Billie George Prevatt; Mrs. Mary . Hall of Orlando were Sunday Ann Scott and Mrs. Bobble 3 Different . visitors of Mr. and Mrs. J.ll. Bobby Smith celebrated his cake and ice cream for the Jean Griffls from Lawtey 50 DuPre. lath birthday Sunday, March family the Home of his uncle ; and Donald Cooper, Jr. from For $1 1 12, at a birthday and aunt, Mr.and Mrs Roy. E. Cool Miss Melanie green of by his mother followed by Bryant on SR 16 E. Hamploa Crisp KindsOf, Gainesville! spent the weekend Mr. and Mrs. James Cash All You Can Eat with her grandmother.. Mrs. and family of Orlando and Mr. Salads : l.ex Green. HilliardFaulknerEngagement and Mrs. S.D. May of Iron .. Fresh Bread t : . Ga. weekend City were :' Mr. and Mrs. Dennis J. of Sen. and Mrs. guests I Khoden were Sunday visitors ToldMr. 1 1b'aulkaao 1r (Charles Johns and attendedthe I of Mr.and Mrs. II B. Williams ! .e Brinson-Johns family To Select From Lunch & Night of Gainesville. Different Salads , and 'Mrs. Tommy L. Y reunion Sunday at the home of 3 Vernie Odom. Pearl Milliard announce the engage- Mr.and Mrs.Jerome Johns at : 'Andrews and Janet Starling ment and approaching mar. Crystal Lake. ;, were in Orlando on Saturday riage of their daughter I i attending the sales seminar .Teresa-(...1q Joey Faulkner, + III -_...._ __ ....... __ ._.u Conducted by tho National-Askociatiorvof ''' -, son of Mr. and Mrs W.J. ; ... , ...j.J all.DfLazka.., ..: I .0. : .Ueajtor st ;i ., I ; ?.- Y, ., . ""Wfeddl inr'plans-will'-be-** j " Mrs. J.B. Bakken and Miss nounced at a later date. 1; r .; ').;:..IRfifr'K'I'/ rM Linda Bakken left Monday for , West Palm Beach to check on , Mrs.Bakken.following Bakken's. who an is nephew.hospitalized automobile-David tw 1ou..Kno", i r r accident. 0 Mrs. Lila Caldwell and Mrs. Mrs. George Braun of St. June Kdwarda: visited Mrs. r LTht Paul Minn spent last Mondayto F.sma 'Yongue In the Ocal ' Hart.Thursday with !Mrs. W.H. Sunday.Convalescing Home on Teresa Milliard all girls, misses t children Mrs. Charles of !Green Fink Cove and and dresses t'( junior ''Springs Mrs. Ella visited Moody on her Saturday.Mrs. mother,. We Wish to8ay"Thank8"toalIour , good friends & customers in ' and Ethel Simmons in stock Mrs. Virginia 'Parr of the area. The past years as ownersof I . Richmond Va. were Friday overnight guests! of Mrs. Kentucky Fried Chicken; have /s'c Bertha Pearce. been great, and you ,our friends Mr. and Mrs. Richard St. made them that ' . John visited Mr. and Mrs. way ts.c' St. John In Dradenton rot . '''from Stephen Friday to Sunday. We've retired from the chicken $ H Stephen St. John returned r * 'with his brother 'and family business, but we are still in town 1 ' for several days visit. See You Around. Mr. and Mrs. Glen Reddishand r family of Fayetteville.; Charlie and Sybil Braswell N.C are visiting his mother. Mrs. P.D. Reddish and family . from Thursday to Monday. w.- , 1\\. t'L,' ;( . '. io1 LlJ.J J I / 4; '., ''j '" ,. '. ..I.\\. "'; I '" "": ;"'."; .. :J I .; I ' !r / .:'I r [$(DB( .. . Save on a wide assortment of girls, misses, # at' 14; and junior dresses.We've got lots of styles and . .' ;.. i -1 colors for you to choose from. Easy care fabrics. ___ 1''J .'BALDWINCHEVROLETOLDS. Solids and Prints. Dresses to suit every taste. - (Junior Sizes 3-13 Misses Sizes 6-20)) J. R. "Jim"Lawson'TIIANIC Sale prices effective Thursday, Friday, & Saturday (March 16,17 & 18)) [ YOU'\ the fine people of Bradford,. Union; Clay ! and Alachua Counties for your patronage over,the lad 15. years of selling you'the Very Finest Automobiles going- n n u 4 I 1 CHEVROLET, OLDS IOBIl-E l H I'm lookingfonjtard to sercingyou for another 15. Feel _I::(, i IB free call me anytime to discuss your automotive needs.YWvVXr ' to all = Save 20 % on girls, : / >v" i't rt . 9OO: To S-'W i.I l* :132-4 East Call St.SUrke. misses, and junior dressesH ;Fla. , .' . I a r __ I r t ,f Y Page TELEGRAPH March II.It7' __ ___ _... Walkers Ready for r Brooker Council Still Haggling I I don't see why ...'. of more !companies lot the The Brooker town council through" all this engineer water system overhaul. Walk-A-Thon Saturday gain haggled over the city's stuff" Other action of the !council water system at its regular But councilmen Steve Included: meeting Tuesday night with Nipper and A.B. Adams were and a nurse will be on1, the basic question being In favor of staying with the -The swearing In of Hundreds of feet will poundten street west on to course Weld whether to bid out the overheat Eugene Melvin, who was not first aid. and Parcel on hand to give Sverdrup miles of pavement Orange Street, to be done on the at the swearing In Pratt Street, Walking with the young systemor engineers.They present Saturday as local walkers Orange Street to to let the Sverdrup and last Tuesday. > participate In the annual west on Pratt to SR-IOO, weston people are Chamber of .rJl r Parcel . March of Dimes Walk-A-Thon. SK-100 of Edwards Road, Commerce members Frank t I engineers continue seem to know what The walk will begin at the turns back north on L'S-301 Williams, Elite Sanders, John with the work. they are doing! said Nipper. -Appointment of. A.B. Reddish, He also pointed out that, since Adams chairman of the rear of the new courthouse. and to Walnut Street and will Bradley, Dolph Registration begins at 8:30.: end up back at the courthouse. Maxie Carter and Ken Platt. Thea1gineers had already the company had done the council, and Steve Nipper, walking begins at 10 a.m. There will be a major breakat Also walking Is attorney J.J. been paid'.,040 for examining: examination: of the water vtce Walkers are asked to bring the National I Guard Wolbert. the present system and system, and prepared the only their white sponsor sheet. Armory, with drinks providedby The Gator Band CB Club drawing up recommendationsfor report they were'the likely -An agreement of the council Beginning at the courthouse McDonalds. The Starke will monitor the route, and the council.: ones to continue with the members to meet will clubs and organizations In the work. Thursday, March 23 at Si:is the participants willprtK.d Police Department pro elv "Why can't we get some west to Grand Street, vide patrol car and officer to local schools are also parti pump man In here to look at It p.m. to examine) the roads into kvt t south on Grand to Weldon keep an eye out along the cipating. i + and give us an .estimate?" Attorney J.J. Wolbert work town needs, and to to be decide done to what asked councilman C.J. Stal- pointed out that if the. town get the roads in good condition.An . naker. Stalnaker in favorof borrow the for was plans to money I Girl Caught in Stolen Car overhaul letting bids for the system the Home overhaul Administration from Farmers, as was agreement to let bids . .. for a contract for garbage Eugene Melvin, a new discussed: earlier, "you're not A female Juvenile was taken Butler, where she abandonedthe Deputy Wayne Mclntire coune.Uman.wCll'll In earlier In going to have a choice collectino: as the present contract Into custody Thursday car at the packing shed on joined the chase.! the meeting, agreed with whether to have an engineer." Is expired. The bids will evening March 9, by Union S.W. 2nd St. Then, she went to During the chase, the letting biela. 'lf he (the pump But the final 3-2 vote of the be opened at the next regular County Sheriff's Deputies the residence of James R. Juvenile operator lost control Eugene Melvin .Is sworn In II'evIIncU..an by Clerk Eva man) gives you a guarantee I council was to let bids to three meeting. Gary Seay and Wayne (Randy) Wilson. Jr. at 430 of the car and wrecked it. Clark. Mclnlire, after she allegedlystole S.W. 4th Ave, and stole a I9C8 (evening two and cars resisted during being the door<< Dodge Sedan. 301 -S Resurfacing April ( J Moments later, she stnppwl by Deputy Seay. was - The Juvenile R a resident of seen by patroling Deputy Just over 7.5 miles of resurfacing quest,published Feb.23. must determine if It meets state requirements - Arlpeka. Jo a. stole a 1972 Gary Seay, who observed the air US-301 from south of be followed by a 30 daywaiting banning pollu Plymouth 4-door car owned by erratic driving of the operator SR-lOO at Alligator Creek period In which the tion. DER Is allowed 10 days Calvin Henley of Sta rke. In an attempt to stop the In of the Bridge Starke to the public:can protest for Its evaluation oper- According to Lt. D.L.. vehicle a high speed chase! Alachua County line of the plant and request a ation. (Cochran spokesman for thekherifrs began, continuing on SK-238 is to schedule as expected begin in late public hearing. If no protests If the goes department, the going north. Immediately April and completed by mid- are filed with the DER officein planned the resurfacingproject juvenile proceeded to Lake after the pursuit began July Gainesville DER could begin by the last .......... personnelwill I The Department of Transportation inspect the plant and week In April. __ 1r'ai _ __ (DOT) contract to ..tin. . resurface the highway was ------ - ; awarded in February to Mac- "We do more asphalt Corp. of Winter Haven A permit request,published in the Gainesville Sun.Thursday, l for the low bid of 431218. The Feb. 23, for th flneration{ of a portable asphalt plant one mile Bradford County project will west of Graham-otfSR-18,fulfills the requirements of the law although I than just fill r remirfflr existing pavement residents In that area may never see the request, said a . .fnr w, atucn 4 yl whit a type III asphalt con. Department of Environmental Regulation (DER) engineer. out tax forms. We can w' concrete crete leveling friction and course an asphalt and DER engineer Ray DINardo from the Gainesville office I installing reflective Tuesday said the company doing the resurfacing on US-301 is markers US-301.pavement only required to run for one day a public notice in paper of its : help save %": along choice with the widest circulation in that area. DINardo when I you money."I The reflectors t cause a asked said he did not have circulation figures for papers of the : r ) thumping noise when a car ' People don't come to H&R Block just to have '' t w moves onto the center line and area. also shine red when a driver is The law does not require posted notice on the property, said their tax forms filled out. They come because! 1 kin traveling in the wrong direction DiNardo. He said he had not inspected the area yet and was not Block: can help them save money. We dig for i along the four-lane high. sure if a notice had been placed.The public notice in the newspaper deduction he added was to Insure the public had adequate notice andit honest and credit. That'sReason I - every way. limits the of the DER and the paving No.1 1 why H&R Block should do your The company posted a Macasphalt liability Winter Haven. company. taxes rl public notice to begin operation _ _ of a portable asphalt The site location of the asphalt plant is the same site as a pre- be located plant to on SR-18 vious asphalt plant and maps are available at the Gainesville H&R BLOCKTHE The BUS Symphonic Band received Superior ratings from judges In a District Band Contest. near Graham to service the office, said DiNardo.( The permit must be followed by a 30 day Above, the Brats section. Below, the woodwind lection project Permission must be waiting period In which the public can protest the location of the INCOME TAX PEOPLE received from the plant and request a public: hearing. StarkeFla 2ConvsrnentArae016cse, K.yalon.H.ghts, BHS Band Receives Superior'Rating mental portable Regulation plant. The of to permit Environ use the re- 118 N Walnut St In Monitor Building The Bradford High School' reading events and was rated "Divergents" by Francis 964-8286 4732777Open Symphonic Band, under the by a panel of qualified judges. McBeth. Meet Set Next Open 9-Weekdays Saludsy9d. Monday Friday 10.2 direction of Dean Camels The band received a Superior Since the band received a AnnualClay Thursday Saturday 9-12 performed In a District BandContest rating the highest!of all, superior rating it has been Invited No Appointments Necessary in Gainesville ratings, from all judges. The 40th annual general opposed by Robert Hartley gressman Bill Chappell. U.S. Saturday, March 11. On the stage the band performed to participate .in. the meeting of.,UM Clay.Electric, unless,there are nominations Representative of Florida's4th The band participated I In "Noble Men March"" State Band Contest In'TaUaVhABsee.The -" Cooperative,is eel Cor, next heard,.from.,.the ,floor,.at,th!>! j District .>'.i". b i>"tmi4iiEittertalrmrenr' ; Stage.performance and sight-",, .by Fillmore, "Ramparts, by contest wl'tiiewlekend fie.t"-' Thursday, -Mw&i JWWl fttrAta 'Yn'I < ""the* .1'i 1 ? '. -M--- r l Jii -tsj" OlIt'too; Williams, and""** ol May 11': Co-op's headquarters in pp.qrmAtmefbrur"h"1, Gospel Singing lrtlby' will i,. Management Plan To Be Presented Keystone Heights. member can be nominated for highlight the day for those -- The meeting will be opened the District Trustee positionby 5.000 members expected to The regular meeting of the sently manages Fraser under the big tent at 9 a.m. any member of the cooper. attend the all-day. gathering.' Thursday-Friday (.. --Bradford County Hospital Memorial in Macclenny and sharp. During this portion of ative (consumer of electricity - , board of trustees will be held Clay Memorial In Green Cove themeeting the three Trustee ) but the nominee must bea Door prizes will be awarded Yes we still make our famous sundaes with true- Thursday,Feb.23,at 7 .m.in Springs( officers up for re-election, all resident of that particular to those lucky members be intro District the nine the winning ticket ob-' the hospital library 1 incumbents, will opening on holding fruit toppings-like raspberry and pineapple Marcus Drewa, president of J.P. Hall, a board memberat duced. member. board. tained during the voting And the richest chocolate and butterscotch the Methodist Hospital Clay Memorial will be pre- Sam Hogg of District 2, Besides voting for Trustees, process. around We know that's the only way So come o Foundation will present to the sent to give his opinion of the Thomas L. Malphurs of the day's events will includean Free fried chicken dinners treat yourself to your favorite flavor now and board a management plan for management given by the District 4 and Floyd Gnann of afternoon speech by Con- will be served at noon. hospital. Methodist Methodist group. District 6 were previously the pre save At a participating DAIRY QUEEN" store nominated in District Dairi* meetings in January. Only one Raiford Fails to Muster QuorumOn Queen STARKE E i iU9301 trustee, Malphurs, will be FIRESTONE I Filling Council Seat Vacancy The I Raiford city council mem- missing. Council members MOUNTING Low Priced Tires MUNTIN6 bers failed to muster a Calvin Varnes and Michael Grand Prix Or Holiday quorum{ Monday night March "Bud" Dobbs were absent. 13. for a special meeting to Carroll told the group he' 4 Ply Polyester Whitewall Tire. discuss filling the vacancy on had researched the state the council. statutes and the council vacancy created when Sid B78/13 19" G78/14 Sundae Raiford Community Center be filled by adoption of a. S E78/14 H78/14 > AaIc and Inspected the repair work. resolution by the council to $2288 hold a special election or'' F78/14 G7815W? Charley Council members Joyce appointment to that position. : ,y Norman and Herbie Whitten L78/15 '28" H78/15 G:2 V E.Johna along with mayor J.D.Griffis. Taylor resigned in' clerk Kathryn Alvarez and February leaving about a' Ie attorney Wayne Carrcll: year and half left for the termof : Buy Grand Prix 10-1 LT '42" waited for an hour before dir office.JROTCNEWS. "A careless act can cause- 4 Wheeler. 11-15LT '48M another person to lose hitttiaht..h. . .. lD88Cullnityanctresult : 12.15 LT 11 && RVT in' a law suit for The JROTC went to were hard Inspectors but the 14-36.6-1 LT '74M $100,000 or more. The Columbia County High Schoolin JROTC here at Bradford one usual $10.000 personal Lake City on Saturday passed Inspection with flying ganotf All Tire Prices Plus FET & Old Tires liability policy Is no longer March 11. for the Drill Meet. colors! Can the There were many other There were two cadets who adequate. Charley LUBE. REPACK AND E. John. Agency increase JROTC unit schools that,par. went through Individual drill tlcipated In the meet which with their weapon: Charles OIL 8t '. GREASE SEALS my ComprehensivePersonal was sponsored by the Colbert and Jesse Adams. .,. Liability to Columbia High School Torch They both performed very FILTER Protect inner wheel tree S100,000..even $1,000,000 Club. well, especially Charles against dirt,duet and The Drill Team and Color Colbert who placed 3rd and r.O for just a few dollars more Include reduce chance of bearing ' up to five quart premium Guard from Bradford brought home a trophy! of quality, motor oil. freeze-up. f cipated and both teams paced Working and drilling with that c;: Charley E. fourth. 14 pound weapon "ain't no 1 q. N.rBH JROTC had Gator Guard piece of cake!" Those guys on' JOHNS AGENCY officers from the ROTC unit at the drill team are good! * the University of Florida -Sgt. Doug York for. 3; : 131 S. WALNUT ST STARKE. which Inspected all JROTC Assistant Public; $ -- $ 'Drum PHONE 964-5070 units present These officers Information Officer; Any car type 888 or it duck For The Record." Add *8 for disc brake -' CPR CLASSES the In the March 9, 1978 Issue of1' TELEGRAPH' we reported - "f FRONT ENDALIGNMENT the arrest of Cheryl,,, rTUNE-UPS Rae Griffis of Hampton. W., J CPR Classes will be held at the would like to emphasize that, park f>lu... In nit ion pnna this i J Is not the Cheryl Jeanett,, ..M'I..rb.'ar ml, condsrniwr .oStt. Prattoonalignment I Bradford' Onion Area Vocational Grtffis of Starke "? .8rt pomi dw.n.na t ; ., timing ..1.Mt MUnp.u. ;chuntn 'I ... Technical Center starting en .-- - yatvfnnmMH3 tl\ yq fay skilled,, . .\ \ .. PCV \ , rob valv ;(" elm dwinbuior, *,. Alt cap.Ti cramkraswvtni .,ark plus i., ... meehank, .. April, 1111. :b y.-K- : rr Y. e*?,.,ear.eIl,unit.... vapor '..' .' .. .,, >- Classes will be held Ms. Martel Johns and Mrs/ on I" Marion Starling and daughter $25SSAm.nca" n O Moot e Cytlo April 4th. 6th 11th and 13th Danielle of Jacksonville and $1 e ".' c,.r. a Mrs. Victor Nettles of Lake Electronic ignition, ,Q LT Trucks From 7:6 to 10:86 Butler were Sunday visitors of' systems M less. art.ua. 1 If needed : p.m. : p.m. Mr. and Mrs Maude Carter, 1401 N. Temple Ave. Starke, Fla. Add M for 8-cyl, ;, NO ADDITIONAL CHARGE s*. y Some air cond.car extra "ORf actor y ale of totslon This Class is limited to 12 'Jr. CAM00'' Car Includes r.*ltor plugs. bar car*, people.For Mr.and Mrs. Paul O. Brown.! were In Athens, Ga. on busM: Charge Emi! 'I '::E, \J' "4-1431 Further Information' Call 964-6150 ness last Wednesday to' Friday. t'c' _- --ar.y: s.1Ioo-1i........ -_-...-.".. -_ ....._-_...-....;.>..--...... .... --__OL- ........._...... ,r ...--- r ....-.-, --"., - . .. J -- ro - Ii '. T f" t I 1 _____ __ M.nhl"1171 TELEGRAPH Page Help Them Find the Children A .............................. There yie a handicapped child to be emotionally retarded need. If you have a child who this duiu o efiAe Take, for example Bobby unW he was found by the Child can us* the services: of this United Slate, looking for (which Is not hie real name. Find Project. Through program" or f If you know of a ,.r Children. Special Children. Bobby was born extremely examination It was found that child who hi not in school a '' ,,lfk r, The group of people li Inwlv mentally retarded His his vision was extremely Im because of a handicap please i w Child Find, and they are the choice to put him In an es through the local System In Gainesville. ti, .. looking for children they call Institution, or to keep him at Mona Club. 3rJ-6t92. Or, call your local. "exceptionar children which home Not wanting give him The Project can do many health department, and they really means children who up she kept him at home and things to a child live a can put you In touch with Child may have a hearing problem, the whole family's life was more heir life, but first Find an eye problem, speech difficulties structured around him. they must find the child In Help them find the children. a physical handicap 'i, I f'M r ., learning disability, emotional a When Bobby was 13: ,a friend ....... ... --"...... mailed his mother a newspaper problems or mental retardation. ,' clipping about the Child I I r li t i; The State of Florida' Find Pro)eet. She brought + r'' i ri guarantees every handicapped Bobby to them whore the project - child the right to free paid for his psychological I, i i tiral public education. By law, evaluation. Bobby was placed education programs must be Into a special school program, :' rr made available for those and bean living more Tike a students who desire them. He Is picked Op ? ,AAY Many people don't know each day by a school bus with lye .err !rI that education must be a special seat Just for him. ' provided for their children Education and transportation or PRICES GHOPP24i40 D are just a few of the I ," rr have been told that there Is no : educational! program" to fit things that can be provided for their child's special needs. . r The Child Find. 'Project Is these special children once ,. y. qua they are found Physical r therapy and. other servicescan 3 Bedroom, Furnished Carpet , trying to find such people whore also be arranged. A unaware of what the 8850 school system can provide for Another child was thoughtFLORIDA 24x70 4 Bedroom 2 Bath Furnished & Fully Carpeted s BANK '14,895 . . t r '1 r nMm. "r.4'foP'! n.... . .11I1 .,iP wp..t tI ... .. .ul. ATSTARKEMAKES 1 24x60 .YI' .... ..... . 3 Bedroom 2 Bath Fully Carpeted Head On Collision Injures 3 in Keystone Furnished '12,350 e .... I ( 24x60 A head-on collision just 2.2 Both vehicles were totaled, Wednesday afternoon when tal Monday following an accident 3 Bedroom 2 Bath Shingle Roof .+ miles south of Keystone on worth about (1,000 each. Albert Buchanan struck him. on Ida St. Wood Siding- Circle Kitchen 'I SR-21 Monday morning Extent injuries Included Starke reported Anthony Leonard Aaron .f Furnished & Carpet $f AflA [ hospitalized three Keystone broken jaw fractured chin James Gram of Baldwinwas Starke was charged with g, High School students with concussion broken rib, a bad charged with driving leaving the scene of the accident multiple injuries. ly sprained ankle and possible while intoxicated and drivingwith that occurred 5:30: I 1I Large Selection Of 12 & 14 Wides Injured were Roger Curtis spleen injury for Lamm. license suspended In a Monday. ' Lamm 17. Melrose; his Martin suffered a bad lace Saturday accident at the Starke police reported I 1 To Choose From 5780Starke . passenger.Thomas Martin laceration, broken ribs one of intersection of US-301 and SB- Aaron said he was traveling . 19 Keystone Heights and which punctured his lung, anda 16. east on Ida St about M mph Home William Jeffery Bryan 16. laceration on his arm. Graham was northbound onus which the child came into the Melrose. the driver of the He Is also being observed -3ol and crossed the center street on a tricycle and Was other vehicle. closely for possible spleen line and struck: a vehicle hit.Aaron said be stopped! and Vniortal "peNOew Center They were all reported In I injury. driven by Johnnie Lee Walkerof checked the child beforethe "fair- condition at the Bryan was reported to have St. Petersburg, police mother picked up the child Alachua County Hospital in suffered a broken leg nose reported. Estimates of and took her to the 'hospital.! 1650 N. Temple Starke Fla. 964-8741 Gainesville at press time on and multiple bruises it was damage were $500 to the The driver said he stayed atthe ALL HOMES BUILT TO H U O SPECS and UC APPROVED Tuesday Bryan had been .thought that Bryan might be Graham vehicle and $2,000 to scene then left and tried to '' "* : transferred to his room while released Tuesday.According the Walker vehicle. contact the mother later. Lamm and Martin remain In to Audrey Walker was taken to Bradford - the Surgical Intensive Care Phillips who had spoken withMartin's County Hospital, treated Unit. mother Tuesday and released.In . According to Trooper Don morning the two in Intensivecare a three vehicle accident Roberts with the Florida were stable and seemed Monday, Feb. 13. Starke Highway Patrol, a blowout on to be improving. police reported Doris Austin ' the 191m! ; Chevrolet pickup Visitors were not caroms Whitehead of Starke was , driven by Bryan was the mended this early)! time. westbound on Call St. and Real BarB cause of the accident. No charges were filed In the struck the left front side of a SOftft'l Pit Q Bryan northbound on SR accident. vehicle driven by Ronald 21. crossed the center line Eugene Griff of Starke who whan.tithe !Nowoltl(( e wrred. nOlheYaceldenb' repOrted bjttik' was In the proceM dparWngv ' skidded .some ;35 fo ,dulling Florid", Hlghw I :t..f'1IitrofDClude TheMUriM- GrtfllBrvehlch> "*.*> I i _ m' dI1ltl8j1J 4iPdSir flkup. l'NC Wi .l'oh r t d"' (p Into tAtfWar ofsttradT' '* THURSDIJ''GHTi, Upon Impact it spun Lamm a by Evelyn Kitchens after her owned by Medusa Leasing EVERTDELHOHICO vehicle' .around flipping It vehicle was struck In the right 1 Corp. which was parked and t over on its side In the south- side by a vehicle changing unoccupied. - bound ditch. Bryan's vehicle lanes on US-301 Wednesday. Estimate( of damage were ' came to rest upon Impact In A Pennsylvania mn was $400 to the Whitehead vehicle, I IS the southbound lane. charged with reckless driving $500 to the Gratis vehicle and It was thought by Trooper after he struck the rear of a damage to the truck. Roberts that Bryan might no have suffered internal injuries vehicle driven by Ted E. Tangella Sherrell Pittman because hit steering wheel Manning of Maxville. of Starke was treated for FAMILY NIG.HTSONtJ'I was almost completely broken Manning was turning Into a minor Injuries and released oC(;, private drive on US-301 from Bradford County Hospl- tl ;: III . ' ,,25 BHS Students to Attend 4r ' ;Regional Science Fair ,, ;. High school students from The Talent Search competition Mrs. Woodley, UCI1S lJ nine counties including Bradford Is a special area of the re science teacher, expressed County will enter exhibits gional fair that Is open to all appreciation to many I sponsors of scientific problems students in grades 10 12 that and helping hands in the they have investigated and have projects entered.It Is nota areathelenablelhelsirtorununoothly. attempted to solve in the requirement the fair contestants LCCC was noted as Region 'IY Science and students In those being most helpful In providing Engineering Fair at Lake City grades must choose to enter. the housing facility for Community College March 16 Jerry McGriff of Bradford the fair and helping locate and 17.Students. County High School Is the needed equipment for setting from Bradford director of the Talent Search up the exhibits. - County Include: Terry competition this year.The test inner special awarcu, in tne B Carver.Cindy Griffith Denny for judging i consists of an In- form d certificates, will be George, Teresa Knepper, depth 15 minute oral presentation presented by: NASA, Aerospace - MichelleGullion, Betsy Yawn, of the student's project Research; National ., Irene Po'alnwrlght Linda which shows the working pro Park Service, relating to environmental - Richardson Alan Montgomery cess and results achieved. conservation; Dwayne Baldwin. The oral presentation usually Junior Engineering Technological TEAK Jesse Adams. Terri Thomas. includes a color slide Society; American Luana Mundorff. Charlene presentation and use of other Speech and Hearing Association , Beam. Addle Melton.. Peggy visual aids and Is presented ; VS. Naval Institute $ 99 Cooper. Terry Goodtfo. Chuck before a panel of three Jud ee. marine technology; and the Register. Kenny Kodrigue. Following the presentation, U.S. Air Force, Col. John Brian Baldwin Vickie students are questioned by the Smitherman and Major Corbett. Elaine Nugent. Judges Maynard Hilton. Sylvia Pittman, Carol Flynn. SPECIAL and Lori Shinn Marie Woodley. part-time Dwight Slater'sFittJ f flEIM Instructor for LCCCand Union County High School teacher SIIf for 24 years is director of the r 1978 Fair. She expects a exhibits Open US. 301 & from hundred the nine different counties. 7 A.M. 12 P.M a Walnut St ". STIAS BAXE0 POTATO SALAD Tea or Coffey 1IIIIIIiliEIT l from chosen Winners will be the exhibits and will be SUNBEAM nn8PK \ LARGE eligible for the State Science IllS i I and Enginering Fair' BKEA9 7'. I scheduled later this. spring. 10 Ox. ** Jfi tt't OR TAKEOUT Entries will be judged on 2 Loaves f N.R. Btls. . creativity, scientific know- how thoroughness skill, clarity ,and dramatic value. gOROEN'S ML 1IfII.tiS .. Public view'ing hours are set'for MHJC ( 9 . Friday, March 17 only; 1 .... Casa Is. from 8:30: a.m. to 1 p.m. After a., Over Coal FREE FREE COFFEE - I p.m..the projects will be dismantled .by the students and Wednesday 0. nnu 6 Wednesday & Sunday Nights waken TheproJects will\ be judged SYJA "'I" ECMrrnThey Stop !In After Stop In After Church Thursday. March 16. by a team of approximately 23 (( Look a Lot Uke Ants With Wings) I judges Gainesville from and Jacksonville surrounding .If, Tos'ri Net Svrt CcH Us.3JLB R" l Bar. i arena.Friday" Winners trophies-at 10 will and I.m.be certificates presented .W1 Crt awes. At BQ There will be six top winners In the tale Two pro :T will be chosen as "Bestof FREE jects the Fair" and the best biological 231 S..TE..tE. lIEs'' 964-8840 STARKE. FLORIDA and best physical projects (Iniptotioni Estimate? ,,,.,r J will win first places In both Junior and senior divisions. Directed By Graduate Entomologist , .. . -, - - - - - -- .. ... .. .. .. .. '. .. .. .. .. .. UL -.. ....,...." ,. , I"'f \,. r .Rt'6 TE.GItA.Iarcb. 1(, tl78 -- -_.. .._- I Golfers., End- ') ,Win Streak Lose tQ 01. ...,.:i Forest. Ocala Forest edged one The Tornadoe.' ls won 171- Tuesday, BHS had won four Herrra led Bradford 171-180 trw: beat the obis by nine. Wade Winkler and Rich aftl stroke, 153-154. by Bradford 180 over Buchhol on the straight matches, then lout to Buchholz on the I.1'110ft Joey Herres chipped for a Gaines each shot 49. Clair High golfers on a windy University of Florida( this past Forest by one stroke course!! III (i iiiuipsvillo 'Ibis i pd ist birdie on number five was Turner shot fourth place 47. Starke Golf and Country Club Monday, March 13. Joey Herres chipped for a :Monday oni" wt par coming into the Roberts birdied the number course Tuesday, ending 'the birdie against Forest, the Clair 9brner'hut ,i )"' ml, nth hale, then i rook m II on par- t and 7 holes.. Winkler and Tornado win atreak at four Forest 153-BHSIS4 second match In a row In Wad Winkl< r .1 i t4"Rattly i 4 number '(( hl\lJf.\ Gaines each had a birdie. r Forest was the number four Richard Gaines led BIIS which he has done that. "It was cold Friday" said ranked team In the state last against Ocala Forest with a Herres was one under par we didn I pi.,'"> the JutS 1416-Baker 169 Coach Adklnson, noUng the year,Coach Warner.Adkinson one-over-par 37; Wade through five holes, then giplf( we !Khould< ."e fh,' Scott Roberts led Bradford temperature was about SO Yes pointed out. "I don t guess itsa Winkler and Joey Hern shot bogied the sixth and double scores should have KH-D) (High with a .It* last Friday Inlairlcnnv with a much colder chill factor disgrace to lose to the identical 38'1. and Scott bogied the seventh better" iui ' number four team In the Roberts was fourth man witha UHS last! (hi- ,nisi i match of c ant 166us'i, h> (taker High at It was the first Ume Brad state,'* the Tornado mentor 41. Clair Turner shot 47. Bliam-BuchholiitH) the scuhon t talIu i ) 'lilii>l/ >hI' five the Vcn.clenn Jolf and ford High has beaten Baker 1n| commented, adding the though her score didn't count Scott Roberta and Joev strokes. then i.imi-,, I h.'k to (Connlrv (tub Mucclcnny Tornadoes could easily have Joe ValinHkl shot a 41, although I.. I ,----. -- -- ....L von the closely fought match. his score djdn't count Last Friday, March 10 BUS "I can't get four good scoresat ."rvv.NwA.rrdGa I I II .N'uY' { "t r ."" ?y? 9 I eat Baker High three one lick," said a dluj, I trokes. 160-169 on the ppolnted Coach Adkloaon at ''lacclenny Golf and Country the narrow Ions. tub course, the first time Lowest team total BUS !has .: IIS has ever beaten Baker in shot in 153; the 134 nearly \ .... J,, acclennv approached thatPrior/ to ,.. ,! xA4 1 r y "'.V'-:" I.., f: : .4J';f': brooker Host Softball Tourney >', r ... Ir.fir with First game Set Friday, :7'p.m.bySylvlu . Wheeler The only four teams left to : trooker is at it again on the play on Saturday, are : .. .. .,- :' Knowles of Green Cove _ with irnament circuit vh dt.a m va ,,'other slow.pitch Softball Springs!,: Cedar Key - beginning al 7 p.m. Restaurant of CL'\IIt.KI.'Y\ Cal tourney March 17. Gas, of Fernandina Bench, Richard' (liilnr' tm off to a god( | tart at Turndjy'i match Friday I It seems that the softball .and Super J'I'retzeLfof! Gaines N *' Orala Fsreat. aJalnllt ville. itjr'A. _ season doesn't officially begin until team participates in your All fans and friends of these :itg : a Brooker tourney BHS Nine Shut Out On Friday night, at 7 p m, teams are cordially invited to McDonalds of Starke will play attend these<<! games and you .,r Businessmen of can well bet that Steve and Gainesville Francis(ultrane .imaiks one Into the outfield In Thursday'sgame r will have Betty Nipper re Gainesville. At 8 30, Plant-It- Palatka : freshmenls for against(.aim skillr IIU'.li. The LMI\ Tornadoes lout to (>IIS By 70Tough Earth will meet Clark Bulldozing everyone. 7-4. Mondav the li;uvliil to lot cladirn, whore they lost I.V5. of Green Cove !': 1 SrrlOs. t'ulatka shutout Santa Ft scored its final run At 9:45, Brooker High in the fifth when Bernardo Waters' Bulldozing, formerly Bradford l asct ailrs > > 7.0 lUdcock's of Starke At ., called --- and walker) stole second, - on two hits Tuesday afternoon f I ' will meet 1 scored on an error pick off 10:45: Keystone _ March 14. on the local I Gwynn Athletic of High j S. diamund in the top of the Mh because of The,game' loft Santa Fe 2,5, SprlnKS! FOOD : 1 ram. BUS' 7 The shutout was the eighth . defeat for the y"unB"!/( I!$ nine pie HI IS lost ::1-1 I 1 Monday to spRfwo ItC U S.uila F'(? High/ Earlier: in the FIIR. week SilOtii't'! edged/ 3.1 I by ..,.'J<.L .. . the Hnidlord t baseballer who ;. ' '" r1 \ __ ' went o.2 for the week'I '' Azalea I Sale I \ \ \ hope we can Ret( straightened !': .'. \ .Ii. *' _, : ;:-: _ out" says Coach Mike .. '...,. ; r A Favorite For Spring Beauty 1- JiLj : ;- : S 1I..1I'1I1'Y.I pointing!/( to the Itgame's : .'\ ''' .- : A , ,ri ,;. ndAlfVearGreenery.Large the schedule , remaining on - \'" / oxi ,.. ,, J,,(..., d Dwarf Varieties $ eta E O HOT G or cntsP 0 R " \\e have the players to do ,"r' \ 11 Gat Size CAL FO PEA it They Just I haven t had thatnotch HAMBURGER Reg. 2.89Spring baseball experience 8 T I'ulalka scored runs in the PAK first t inning, :.1 in the second Annuals L All 7 were charged to I1IIS it SAVE 18C HEAD ALSO SILLS HOUSIHOLODs starter. Mike Jackson, I ; iua a oiwsa earned) I unearned/ Jackson t Vegetable PlantsBig 'pitched I and one-third innings(! allowed:! hits walked Selection Favorites/ To + SAVE 6. and striickout I Plant Now f* 20d '. 4 E In .. lengthy relief\ stint Tray 59 Tray$1 I SAVE 30C GAL. Duiky l Kilby pitched the rest of Of 8 *><*th*#)tame, allowed :t hits. t . walked 2, and Cruifc<< out 6. I : :Si lrg.-rrl,, a .ty> e PAK i Keithorlhriip got both HIIS/ tills' ,i double in the Michigan Peat AUNT FANNY SAVE 18<<= 1e[ fcecond and a single in the SWEET JUICY gpyE 10d fourth 1 Top Quality Bacterially! Active SoilConditionerHelps C ocoiayTWIRLS T a MEXRCA 1 BITS is IR t on the season \ Retain Moisture 31/$1 _ Palatka! 7-1 I f\ Reg '2" CAP1TALRPEv 6 9 E e __ \ ___ e . !Four games are slated 1 in 1 1 Bu Bag $199 6 PAK Largess Size q the coming week HIIS host SOURDOUGH 0 4/ Keystone High here at 4 p m. $ SAVE 30C: tomorrow I Friday. :March 17)) Fla. Peat. 127 !Next: Tuesday Match 21. !IllS: Bu. Bag r eas. hosts Columbia /High in aI MUFFINS3/l . pm. game "Next" Thursday. March -a BItS will travel. tol.uke BULK VEGETABLE SEEDBush City to return ('olumhiahigh's Beans Corn( Many Kinds) I..o.yl wRkr (!,p Y --DI_ (!!):J Jm ie ' visit in a 4 p.m game MIDI KID FRESH FLORIDA FRESH FLORIDA A KING !Next: Friday March M. BIISwilllrav..1 Pole Beans Greens'Sttd liZ' ANGEL FOOD LUSCIOUSSTRAWBERRIES t to KIIS for a 7:3U: BREAD GRAPEFRUIT p.m, contest Lima Beans Squash ............ BAR CAKE / 5 LB BAG Jittti. 1O FOR Field Peas Tomato Iwni 3/$1: tree 89C 2 PINTS $1OO Santa.Fe I-Ullo: ; I Cucumber PeanutsAnd SAVE 2Ot SAVI 20HPANTItr MDNlNrrYWrlewihke SIlO la'l'! High pasted\ its Many Other Varieties second::1,1 I 1 woof the season on [ (iiJ: IiRr ..N..wwjp: ion Ic' 'r r is' bascballcrs PANTRY PRIDI / r Bradford High PAN"MIDa HUT. "".1 :\1 ond.1 March 13. in a game Have The Nicest Lawn In Your Neighborhood DINNER'. DESSERTROLLS which saw HHS hand out eight . CUPS walks and bundle of errors. a Kevin Tillman pitched most @!!! a NOW IN 39c 3/$1 : ol Ibt.ay for HHS allowing!,: Plant Qee STOCKIt's II eat one hit the only one s.t.t' go but walking 8 The Original Centipede Grass Seed _ tiafltar TiUmjn. also struck . .. Leg a lY ROOT LOWELL COMPRESSED AIR tvcryPaylowPrk SAVE rwrYDvtowrnce ,jj1 COMPARE -:wi't' wn Hof'4''U'm4iD went :T-lor-3 Sae<< Pride Pret'ieiStix 55t BORDERS Pantry r : at V l the OMB pji.leJlh IUS the three only singles!BHStetter st: < TANK SPRAYER 20 LAY' CRE r1ORA,:j Tea flag Cut MAllq. Green Beans ito 51'1 1 .,4'I , f to really solve the ne J pridkng of Santa Fe ace8uh Makes Your Spraying Jobs Fast 16o ra: 9! < COUNT 129 Hot Clntcolatelor! 1111 JO'. Barnardo Bill Goodge \ [ 7 ,.....'.......... ' and(Arty Kilby each added a & Easy Look At One Today 50z CAN Mushrooms won 2/89t/ a' urwte m three trips for a total aVUHK-l PREMIUM '-" of use OtiS hits 2 Gal. $1 C97 SAUSAGEJS83/f $ Hydrox Cookies '101 794 'sre a No. 1973 Reg. '19" W VIENNA ore IM I 3fS1 : Bernardo In his secondrictrry sAre2ec Taco Shells '_fIU srst , 3 Gal. .. : ., ., "..'ISAYE - .DotyLowPotce [ user BUS this season. I'f',' w S321. fanned 12 and walked only one No. 1975 -Reg 22" $1947 _ K FFV FRESHES Crn Grand Sugar Substitute.. batter BHS opened a 1-0 lead in the TOMATOWI SNACK SWEETPEAS Black Pepper .... 59t 21' first inning when Kilby PASTE 19126 ROTO HOE TILLERSYou'll Rice Monogram singled stole second and mRACU scored on the first! of Jeffery PANTRY PRIDE 16o CAN ct'.4/$1 CRACKERS '.l 3/$1 Kosher SIll Y.N Dills 20' be surprised and pleasedwith STEWEDTOMATOES uuuumMltMH !Norman's; safties 39 " the mower The balance UlVtfl n- SAYE hod' [ ,- lwDotyLowPlc. Figurines t M'* 3I/ I svt, Santa t'et'nt ahead 2.1 in and the easy handling of a rrrWrtewstiin l 3/$1' io' , the fourth inning when the heavy duty ROTO-HOE. You'll uv HUNT'S 6oz '''jAM'Punch Detergent 99*. ir lead off batter singled and L 14 ... .. " like the low price for the quality tool SNACK ' went to third base on a balk by _. JELLY Fabric Softener t. 19 '"I' the BIIS pitcher and an error =: PACKLOBBY'S won n , oiv the second baseman. A 3/2 UP $.21995 1 qrY : 2 8ftc HotCocoa Mix Ilea. 994 to' throwing error from the a"AO; D I\Jj .. ..R .ww....Nor Ni catcher trying to pick the SFe C MarshmatlowsFoiled 3/1117'/ * runner off third base 5 HP 289956HP ., U'G allowedthe '[:=:z-;;. , h.DotyL whny j; 51'1/ 'isr runner to score. The CREAM STYLE & ; Meat Jot 1 LUCKY LEAF rh . _ second SFe runner scored on e WHOLE KERNEL FOAMY 'a-'n 'm. more' BIIS walks and errors. With Rear Mounted $CQQ95 APPLEJUICE a= 16oz CAN LtQUID Purina Cat Fo d... 61ST so: 9 O 51 f Tiller Available Only : DITERG NY IwRPotatoe/YrI. M r 4. ,1"' ,'(' =..'-- \J. .. COMPARE QUALITY YOU'LL GO ROTO-HOE e e4o:991 'cov"'':;;' 3/89/ c 3?o. 3/1 Cotlee Creamer M.hI SIll 00 ";4rwrrrrrr. H', ., A GARDEN & ,-------- -------- --r.rew" rrrrr.rlA wrrrrrri ..rwrwr ._... _ tjjuamK'Z?** f r f r f r ,. # > f 1 ,f :GJ'I i g ori I ",i]. I fl a 'i 'NURSERY CENTER -.a. I 1 GENERAL. MILLS 1 I GALA I' JOHHVOM I I "...PI"I I' PA.eesa . \ REYNOLDS I' I BISQUICK I I WHEATIES a I DISPOSABll DISPOt ABLS I DISPOSAS1IClAPEftS . made her famous WRAP BUTTERMILK 1 I i TOWELSnoa 'F .1 I I Lady Gpdiva OT I I ! bar-skinned rids e TlOL 39 1 E..Call SL Stark, Fla. '73 SQUARE FEET I. AKINO. MIX 1 I CEREA1 180a PKG. 'soyARe. FEET I DIAPERStH.....-. .. DIAPERS. : : MTTWCMBT.MMMItMW. j i PKa. through the streets to promtan Phone 964-5745 I courA, .0.x ,. 1 .. x". 1, I ? ,on ., > a 1 .,'" uuftIM Yo. ., .Teoounner.lt tnKCOMIIi" .0B > I I ./Wm 1 CRtiuCK mm THIS ier1M r Rd'Mn kvei 1',. .. .. two .1,S I". I '.. i0. ... ., .. .. . co : d. tax Impond on U MO.' NM tit! a ,, Mi ii .ai 1 lHIIUMVD 4IMI. II 111 a rule! n MM.n. 1V4 '. ... _ oppressive .. ' -rrr.a.-- rrr-Aar.r -- awrr.A..r! rirrr aYgrr, w..ru."'! -- -V IB...-- the people by .her husband Earl Leofrlc. ,./ ,jrI... . '.. ( . . .. hr1: I ' a . ,,'L. .. ,. .. .. ._ _ .2---" .z.:: : --r-- ; r "" .. M..r '" 1L7"" "'" -- --- _ . -- : II. __ l he- ." ,. .L. '" '" .. .. '. .. .. .. .1 ,.. .. "... .. .'.. ... .."... ....-'.. -' ... ''-''-' .. .............. ",' 1.. .. , INetters t I, t" 1 . _______ Marcia.. TELEGRAPII Paget--- .. . BHS i Keep- On Improving-. '-' '.,,,'}.,',J-. ''h,"", ,"tr',, \v",. ..,""'" Weight Men Finish Season' ;': ,.:: betters finished a week I really should have won, said I"j i (tel tennis which left Uw lady Coach Mike Sexton of the ) . ,Tornadoes with two wins Green Cove match "We are i with Grand Finale .'i., . Wider their belt, but left the winning our share of the 4.: ; I .men on equal footing, with one singles now, we just can't The Tornado weight men- 01 the will advance Marlin ' tWin, and one loss. capitalize on the doublet. Eight men Davis.< Slocum;'T1rn Thursday the natters host finished up their season to the State. championship Jones, Mark Jono. .Charlea BUS vs.Green Cove Gainesville at home at 3:30.: adlwhiaSaturday.. Yeomans; Mike' ,,;.oloIordan; , !Wednesday with a Lawrence Patrlck"and; Knl in edged Green Cove Then on Tuesday, March 21 ,4Tuesday, with a better they travel to Lake City.BIISvs.EaiUMe fut.u finale over Clay County The elJd1t attendllll are Un Neel . ;..JUttlng game, according: to i 4 I' ).\:,, ; ... Coach Melba Howard. CLEAN Janice Jockei lost In i close 1 IIIAME .WT. BENCH, Is. JERK TOTAL':',,rpIACEYkfiPOINTllr': . ,,S-S and 3-$ In the , tiebreaker " Both the men and women .f ""\{' fmammas ):; : Merrl Ormsbee came back netters smashed past Eastside T, e1 125 1so. m'I INugent with a win 9-8 and 5-4 In the Monday, with the lady D. 113 Ice ue 2G I \I tiebreaker Donna Samons netters winning 6-2 and the Davl1.I. .' U' 1M lee 3SO II I ,$. Won 8-$ and Cathy Futch lost men 52. Ely. 'Fr. liS 13:5 III ZH Z :3ulocim . H. Jennifer Johns finished In the men's competition, M. 123 I he" f 175 371 1 f,, 5' with a 3-3 win. Rodrigue defeated VanWie 8-8 Kenny Rodrigue smashes J....,T. 14. I Z5e UG 47. ,I.' ,I 'I' I !. In the No. 1 position Carver his. serve &e VsnWIe ofEastilde. ,loess. M. 131 zes III 371 ,:3Jeaklaa.I 1 In doubles competition, lost In the No. 2 position 541 to lit Z2S lZO 440 ;.:;,j I 5Moore fi Jockel and Ormsbee won 8-3, .,.,. <." ,", A. tM Z2S ZOS '4341 "z :I' .,, while Samons and Futch lost White. Griff I outplayed Vana C 17S Z5S 215 470 Z :I.f: i-8. McKenize In the No. Cl"epr. K. 181 28S ItS 1180 1 I 8-2 3 position In the women's competition, ,. : Their season record so far Is and Pierce lost to Jett 18. .' Jockel smashed Sutton 84 In Patrick, L. 115 3GO Z5S ass 1 I ?/q J H. Pratt defeated McDaniel 8- the No. I position, while Reddlah K. lit ZOO 10S "S y3'1 1 yt, .. . Neel K. In 17S tUS 478 ,, I ' .Green Cove turned the 4. Ormsbee defeated Learn 8-1 In \iI x; ' a.plll. A. 1114 zoo IllS 38S ,1 :3 1 i Bblea >> on the men. however, the No. 2 position. i defeating them 43. The men In an exhibition match, .' bad defeated Green Cove just Raulerson was defeated by Samons outplayed Cranskl I Week ago by the name score. Gilchrist 4-6. In the No. 3 position 8-3 and Futch defeated Hardy 8-1 in ] Griffls lost to Sloan in the In doubles competition the No. 4 position. Track Team Places 9th in Invitational No. I position 2-8, but Rodrt- Rodrigue and Griffis outplayed - gue came back In,the No. 2 VanWie and McKenize Johns defeated Northan 8-& d fw spot, beating 8-5. 8-3 and Carver and Hernandez in the No. S Melissa The Lady Tornado track Marian Puttman placed compared to the 3-A teams : Carver defeated Dale 81. defeated White and Jett 9-8 Winkler, a freshmen in her ... u ...,. ,,' ..." .. ......_-..... '... team placed ninth In the third in the shot put with a that were there the'' .f while Pratt lost $-8 to Sohm. and 5-4 In a tie-breaker. first match of the season.-was ;;;..iJio. ':f. ""I '" Palatka Invitational meet 34'8" throw. Merrl Ormsbee Tornadoes did "real well. : ' Hernandez finished with a win defeated by her Eastside /W!" ... ... ....."'. .. ".If : ..!... ,' :,,:,:"" :.( ...._'. .. .. ,'I' \ Saturday, coming close to placed fourth In the 880 yard , oVer Jenner, 97. According to the men's opponent 48. Ocala Vanguard and Fla. run with a 2:36.1: time. Bobby Smith placed first In , Hn doubles play Griffii and coach Mike Sexton "We're DAB, who tied for seventh Linda Richardson placed the discus throw with m'l"" Rodrigue lost to Sloan and starting to win now," he added In doubles play Jockel and T.J. Carver uses a firm backhand shot In Monday's match ce. fourth in the two mile run witha throw. David Carter placed Daigle 2-8 and Carver and that the win-loss reigprd wouldbe Ormsbee outplayed Sutton against E..talde.KRAft The BUS ladles scored 17 time of 13304.: fifth In the 220 yard dash witha Pierce lost 2-8 to Sohm and much better if so many and Granski 8-2 and Payne points, which put them In the The ladies will meet with St. time of 232.: Smith and Jenner. games had not been rained and Sapp were defeated by ninth position under Ocala and Augustine and St. Joseph's Carter were the only . The men are now 4-5. "We nit Learn and Hardy 58. Fla. D4B, who tied with 18 Academy Wednesday, March Tornadoes to place at the d points. 15, In St. Augustine. They will meet. . "We are progressing nicely also participate in the Lady Isaac Cummings improvedhis and gaining more experienceeach Gator Relays In Gainesville shot put this week with a meet," said Coach Jerry March 18. 45'6" shot. According to'' w1 McGriff. The meet was only Moxley, Cummings just the second for the ladles, but The boys also placed ninthin missed placing. ft-vin at least fifth for the other the invitational, with a total Avery Shell also barely :it6W; ; if Usvyjllfso FOOD teams participating.Cindy of nine points. missed finals with a 10:8 time . Griffith set a new Coach Ben " Moxley in the tOO yard dash. ) t i school record for the mile run described the team's performance The boys travel to St. ) L juj i with a time of 5:28.4: the old as "fair, Augustine Wednesday and record being 8:31.6.: She also cone" Bering the number of 4-A hope to do better against St. ' FAIR placed second In the 880 yard teams that were parti- Augustine and St. Joseph's i . . : run with a 2:29.1: time. cipating." He added that Academy !' fi; ; a.Kt; >C! ': c.h*/:,,. I , ------- ------ k. , ' rI ,} . PILLSBURY BASIC I I fiJf'f.l LWWL.iV:) : "filf'fi'I L..WL.I: : I \' '' :_ I ; BAR-B-QUE 18.5 PKG." BUNDT LARGE I I \ -- :' (BDi i OO J0Um( II .i\l'\: i -I-- L ; . CAKE MIX !- '"", SAUCE FRESH !(' L EGGS This 'Saturday, March 18 loose anytime and cut It off plans to stay Number One. , ASSORTED FLAVORS GRADE ADOZEN ASSORTED Bradford Bassmasters wllilaunch even faster. I'm sure Don Thompson Is 18oz JAR their boats at Cross On behalf of the Club, I gunning for an upset so Dale. Creek Fish Camp at 6:30: a.m. would like to welcome three had better make plans to use FLAV09RS CSAU for the March tournament.Dale new Basamasterg': Elwood more than one rod and reel. C "" """" 59 Smith. Larry Sheffield and Dale Johns and his Dad SAVE Johns and myself were Terri Mundorff. We wish you landed a fine,string of bass 1acl "qt- 50 on Lochlosa a few days ago. luck as you seek out those over the weekend. Carl landedan The. water Is high the wind unpredictable bass. eight pounder. t was too. We got rained out; The County Commissioners '" ....,.''.. .. ,,, ....., .. do As of the top :10 have stated that the Hampton--*""* February r Miltwwwir iailloNNiw.i .--- ", *, "'i: ,.didn't get to much fishing. . wk tu txw5 .. . M NN?it, 1 M. aMRl11', IM,1 MNMY, Marp'ln. .0; ,1N''ZI" III Orange and LochlooM are fishermen among--we Buff-'; 4 Ramp will be fixed this year , aa111111AW.a11 very high plenty of water, masters are: Dale Johns, Don They also told me they will_ "" Aielrods/ Cliaeseuw sille ..* andstuTrising. Thompson Pat Welch, Harold make an effort to remove the \ r an Mlle fM WMNt d Bass fishing has been slowon Branham, Eddy Bryan Chuck tree from the canal at Santa ; 21' 71 Cottage Cheese,, ,.war 89 ID* both lakes,according to re Durkee Don Brown. Jody Fe Lake. . """ ports.Bob. Starling, CoU Bell, W.T. I'm in hopes that some work Canliscuits"'a wof 4/49/ JD Taylor and Bob Allen Smith. can be done at the Santa Fe have made trip or two to The March tourney will be Ramp before the annual fish - Orange in the past few days. the eighth of tto year. Time is fry in May. This ramp needs 21, r. 114CROd1E ,According to them, bass slipping by. No one In the top Improving. " fishing is slow. But, at you 10 has a firm hold on his Bass Wishes know, those bass can break position. Dale has told me he Neil Crawford . Green Machine Wins Softball Tournament ,. Cg01dE by Sylvia Wheeler was fom Hannigan with 4. Game number three for the . The Green Machine The next game saw the Machine was against the State Skinless 88 Lykes f2" traveled to Winter Haven over Machine meet and defeat the Church champs, Turkey Franks Ia1Na 21' 0 Grill Franks ,uan the weekend of March 11 12 Stauffier Chemical club of Creek. After a hard-fought, Sliced 11I Smoked Wranglers I=VAm' and won the Winter Haven South Florida. 26-8. The close game of 26-22 the Green- Bologna Na as 20' to nee Invitational Softball tournament Machine stroked 12 homers to men came out on top once Shced Balogna 111 Link Sausages) s1"ro" going undefeated,4 wins make up for the four errors again. Turkey Creek popped 8 I>d, 20' aNaa and no losses. made In the field. Terry balls out of the park. while the ". ,y'DoI l: !'.ri 'f"ITO" The Machine began by Stratton collected honors for Machine led with a steady 14 meeting the E.J. Keefe teamof pounding out 3 homers and homers. Leading hitters for '>n '," Johnell number .." Lakeland and put them Into game 3 were first i the losers' bracket of the slow Tibbies" (HBI'S by bringing basemen Kenneth Carlton and ' ,,'DRISKITS.. pitch tournament with a score home 5 runners. Smith also pitcher Mike Hartley going 4 .n "f ''If! Y ,w of 153. The Machine hit for a batted a perfect game going 5 the plate. The Machine V : :: '.1 i 538 batting average for the for 5 at the plate for the game. led. still with a batting ..... .' first game of the tourney, The batting average for this average of .609. The averagefor rapping out 21 hits In 38 tripsto gave was .569 after getting 26 three games now tallied KP the plate. Leading RBI man hits In 46 trips to the plate. .577. k . i 1 III ptryp YL wprke aii'AlilWFtltJ'DS p i .. --...... In the final game of the rl , ::t' ayow'PtU:. Ie.tiNll'Rv'ItII . VLASIC SAVE 40U r '". tourney Sunday March 12, the Ols untSCHLITZ 6 ) ".15<>' Machine again met the I KOSHER or **<>* JAR 12oz CAN :WHI'lE C.ANIJ. I Turkey Creek club, which was :' kq A battling back out of the losers' POLISH POTATOESA.. $ .., bracket and clubbed them. ,'" 56-15. I It t was definitely a Green 89c BEER $139 ": .Yirrf., r.ir.flhO'r-"" : JBCOKE FREE' : DILLS weekend for Winter Haven. Tom Hannigan grabbed 10 SPRITE,; GOLD RIB'S for the 4th and final .........L..ACW. ( ................... ) TAB AALL' game. While crediting 20 . v or GaNTLa TOUCH SNO aOWL home-runs to the plus side. of I BAR BATHROOMCLEANIR Mr. P5BB the score card the Machine claimed honors in first place SOAP PORK & 32oza" oldWhere for the tourney. Johnell Smith 4/$1 and Randall McGee hit 3homei'll . BEAMS -' ". ': 3/$1. 1S.I 2/4l PtuBci osn'Ave ". .. game.For each in the final e I\\1 , You See firer l ; weekend tallies, the esvI ....ry""' L ..';k.' BARGAIN IN GENERAL MERCHANDISE Gold Hat fREE'When'IbJ !Machine's debit side of the ' I CLOSE UP :SUA". ., ouAataow This Sign book looked like this: AT TV . *AS SEEN ON COLOCNI I ROSE FArpp GULF Buy 3 BATS: 207, RUNS SCORED. f ORIGINAL HITS TOOTH'PASTE- SHAMPOO' 44 ALALL. YOU DO IS BUY 3 NAPA 'I | MC "orMrrnMrt 123. lilTS 137, RBl'S. 1 123 ' 20 "UMBELIEVABLES"HOSE MOTOR OIL l FILTERS OIL OR AIR AND i HK'S, 90, BATTIN41AVERAGE > OF THE 70's : ',:.:, .' PANTY MAIL US PROOFS OF PURCHASE d; '. .ft62. , s 77< aeouuleoa secRfl'I shier AND SALES SUP.WE'LL _.._r._ 01 Leading man for the. ?'7i $ 97 {NV C < ALL MODS.ASST. A NAPA I: it.tlo: ;"';; .. tourney was Kenneth Carlton, ' Tuaa 66 9g SEND YOU TAPE SHAOSS I sn 0-- Pall who slapped out 8 homers and L.P. RIFILL HAT FREE. eAVe eta GOLD ; hit a remarkable 810 for the 4 ' rf' U' slwrrvnO w/w al..lart...,, (g) i'',, I games played. All players for , 8CHICX8UPER4I I the Machine co ected/ from 1 ' B.C. SECRET 1 to 8 homers for the weekend. ' POWDER' BLADES VALET STARKE MOTOR PARTS 'Leading RBI man was Carlton .- ASP.R.N , .DEODORIZCK FANT1E5 with 16. Tommy Hannigan . MCT. S seT '177 T. R. Ftetlllf M.n g r804984C060 l I'' won MVP for the Tourney for . excellence In offensive and ; ' defensive playing. , S \. When asked about the per- r j II III IIiNAfr formance of (4he team, ' ,' ; Jack' llazen. **! ontAiNi t; sponsor-coach: < ' HAT WARE and assistant coach Ronnie ,1 I Thomas,commented that"we . s 1 LIQUID DETERGENT DISHWASHER DETERGENT I have to work on the,legs a 8 little, but other than that; ' 1 FORKS there's very little to complainabout" ;..., QUARTS 2.48 It This Is the first of a long line OUAUTY AUTOMOTIVI PACTS AND" SEMVICI of tournament wins, for the Machine for 1978. . .J'' r .. . . - -- - .....&.. L- L-Z - : -- ":"";;' '" '' ' I } ..1I'Iege9 J / TELEGRAPH March,1978 , ECKERD ,OPTICAL'S 2 PAIR SALE , The first pair is a great value. NOW save rr'L'-\ 25%more on any second pair. j Get any second'pair of'Eckerd Optical glasses at 25'/ off.when you order two pairs at one time with the same prescription. ...a name you can trust. _-I' See addresses b.'owwlth.ymbol' (for location n.are.tyou. _ .." .." .. .. ...,. '" -. . .. ",," .. .,. ,A.' .. .' ..Bo. ."..d.. ....... ....... ...... .. .H..... .." ...,.. '. ... .. . .. ... ... ",,,O' .. .. ... 0. .. .. '. ,. \ ,: MENS' & LADIES ; ALKA SELTZER TUMS TATAWIISMen's. e I TABLETS ; _....._._.W... ANTACID ''e children's. ladles"or with Foil wrapped, Bottle of 75 straw soles. Box of 36 I Y Regular and assorted flavors U RED.$1.99 LIMIT 1 LIMIT 1ECKERD .. ", . " , ( aa DOWN TO ONE SHOWER "' BLUE LOTION .. ?E7= ;" PANTYHOSE'CURTAINS t ; t 't t . .1::=:'=.::4.M ., SHAMPOO 9 9 White or nude panty withventilated N; Heavy duty plastic{In r Y ,,,'., Anti-dandruff' 4 ounce bottle' Latest shades.cotton No crotch.671 assorted patterns. colors By Versailles.and ; f i! cv4 LIMIT 1 ''..JO'' REG. $1.39MENSKN1T REG. $2.29 Mviu.q d?. 99cJ: 188 .Y il 1 FABERGE : :t . . EFFERDENT HAIR SPRAY 89 SHOWER WheatgermandhOney.10 VSHIRTS . TABLETS ounce aerosol LIMIT 1 Easycare.Assortedcolor CURTAIN HOOKS and sizes.4 button 12 count.Plastic Denture cleanser placket t style. assorted colors. Pack of 40 REQ. S5.49LADIES REG. $1,1 19 ' LIMIT i : efferdent' ',; ; PRE-SUN 1 229 r-= 488 MP SSC gel t:' _ Protect sun sensitive skin , 4-ounce bottle. Available In O 7-ounce size LIMIT. 1 2-PC. TWIN PACKMILDEWCIDE 'SWIM SUITS -- 2 piece styles In assorted "W solid colors or fancy ) prevent mildew and musty .J ORALBTOOTHBRUSH odors. 1.75 ounce patterns.REQ. REG. 59 LIMIT 6 , $8.99 57 ) , ( .. , .h :V, I 3/ flflt "' '.. .\\i;. Scientifically." designed. 799 a . Number 40 or 60.LIMIT 2 PACKSFRAMED JERGENS s-l : - . .i LOTION \ -- DOORMIRRORS . : 19"PATIO 10-ounce bottle (: NOXZEMASHAVE ' 2 types : ; MlKMtfJfWL-. TABLE' . 79' " LIMIT 1 CREAM Stain and mar resistant Distortion/free glass with E .\ 11 ounce aerosol.4 types. +..,,. finish. wood frame.REG. $4.99 , I. .1 REQ.$2 69 7 a ,i. LIMIT 199 199 , ( .., .. \. t: VITALISING I ... 99 ALUMINUM .. . : AIR OR FURNACE .... .. k a ounce hair)- groomj- |R r "_' tot': ,{ FOLDINGBEOOU FILTERS I LIMIT1 e 3"foam mattress Aluminum frame,(folds for storage._ Ready to cut to your, own REG. $29.63 specifications. "'-;:\ REG. 59- EACH LIMIT ; TAMECREME RINSE :.T' SKIN LOTION ; 2488 '. F 2 R/1/ 00'. .' 'A?I' [ 8 plus 4-free ounces (k :..11// Antl-bacterlalL ounce. aa t ' LIMIT s ;J LIMIT 1LADY u VINYL COVERED 'P2IN.X10YDS.DUCTTAPE . i 1.S,. ; CHAIR PAD \ .-...--..-.-.. / lt; 'J' Foam covered with wipe Multi-purpose vinyl ? clean vinyl.Floral pattern I IREG. coated cloth tape. 79 I s ttl; GILLETTE .. v f $2.88 ,REG. $1.45'2'JJ li, ' ::f DAISY Pack of 2 Disposable SHAVER twin 59. 99" ;.mss 1 7711: blade LIMIT 1 PACK :r,. , .. if : DUO TANGPORTFOLIO %-IN. x 60-YDS. "' ' :': FLEET MASKING TAPE ' . 'i.1 j,*' "y.',<.\ ENEMA 33' r-1 Assorted pocket and colors fasteners.with office Many uses and around home, tii-) shop. REG. 33 each . IRISH SPRING Premeasureddisposable.' REG. 65- EACH LIMIT 2CHARM , r* 4-ounce bottle LIMIT 2CHARM1N 5 00 ' BAR SOAP l \ FOR/i1 FOR ,; 5-ounce deodorant - REG Price 36'reflects EA 5'LIMIT off. label 4 ',, ," .. ,- ". .. _,_. .,. .. . , . I I-" i. : .e. ,.11'd.. ...' .. _- ".. -- .. .. .'.... .. ". -- ." '." .. ... .'. ,."' ... .. .,,,J' .. . BARS 4 ' :f I 'GLADE . ;.,: 5. f ___. 4-ROLL BATH AEROSOL AIR LIQUIDFRESHENER f" :;." '. .. TISSUE :; DETERGENT" '.;{':;i\\ 7-ounce. e f Fluffier and softer 32-ounce. /! ( ALKALINE \ 17\\ White or colors "' Assorted fragrancLIMIes. Pink or lemon. . I I i/.;. REG. 95 ; REG 79- T 2 -- REG. 49- EACH LIMIT 2 I I:.: I "C" & "D" BATTERIES r, 4 ROLLS L]> **< 2 FOR' 2 FOR < / I.I j _ '' Eveready quality for ___ GI .. I. . REG. $t ; : I 91 t99P 2Cj: MKALINE iRP 7 -"' 1 00 ''r fteshe e'" ,!r freshen .7 ',, '.. \\J" ,. . , ; ,. There when you need us $ HURRY! SOME ITEMS ARE LIMITED SHOP EARLY J '. ...even+ on Sundays!, .' : r WHILE SELECTION IS GREATEST! S ".\ , SALE PRICES GOOD1' THRU SATURDAY MARCH 18 ' l. Yes.we're open seven days a week.Our professional Eckerd pharmacists- . t k;; are possible there prices.to fill your prescriptions with hospital accuracy at the lowest zl_ STORE HOURS DAILY 9 A.M.til 9 P.M., SUNDAY 9 A.M. til 6 P.M. ." I I .'. .',\ J -_.:.. .;:;;.; __...';;' .-:... .. .'1;__.__4_., -- "" '--'JOi-. -_.-_. -_-_-._'"_--_-__--_..-_._-._-_. _____',_"h"'T'.,-:;-::::::::.;=--=_-;;;.- -r.::..'="..'..."""".,:7._,1.t'y".MS:.: -..l.-swt. .R a-a. n.wrw ,- -. '" ' ' . .,.. 0 ". ". ,, .. ... .. ... . , .". '' .. " , ,.4' .., ., . ) t' i March!"IMS TELEGRAPII Pep! .. I'',, . '. . ' ECKERD'S ,: FAMOUS TWICE Getanextra.etofprlnt_ When oupickup your PLUS ECKERD'S"NO with every roll of color or TWICE developed film and print.. HASSLE" QUALITY PHOTO THE black and white print film THE buy two rolls of color or GUARANTEE black and while film print PRINTS developed and printed... i for the regular price of one Buy only the prints you want No OFFER TODAY AND EVERYDAY D FILM ...TODAY AND EVERYDAY hassle even If the goof was In the picture taking. ,... '. "'" .-t.. ...... .,. ".,'. ....,. ... ,I' J L VINYL STRAP . OUTDOOR CLSK \ FURNITURE RADIO : CONAIR1000W Colorful vinyl on lightweight:aluminum 199 9 ed sleep switch.o mounted Side j mount ) HAIR DRYER frame Chaise has multi-position/ back. tuning a clock set r'I NO.J254 temperature settings. Both fold for storage REG.$27.95 , speeds lightweight for travel. REQ. $14.90 -. CHAIR CHAISE HAMILTON BEACH t REG,$15.88 REG.$26.99 7-SPEED BLENDER _/n <%f*40-oz., -piece glass 1088 _ 1288 2288 6 ,REG.container.$19.99 Push MODEL button 823 control. r ________ 1 _ _*t-j *'*ynj[ ____ MIRROPIZZA . MAKER . ... 50'GARDEN 25-QUART [ cooks frozen IGLOO COOLER I88orhoe5| 's'sm.energy. .zza. Uses r POLLENEX , l Assorted colors Heavy /:-- -y- .J1 . duty molded polyethylene j / SHOWER MASSAGE HOSE. REG.Removable$1809MOLDED hinged REGINA 1-SPEED -d. Pulsating bursts ; $ 15 88 ELECTRIKBROOM I I 128 8 of MODEL& water relax muscles.DM massage 110 Jfa*. 4 O O Exclusive' edge cleaning J REQ.$18.99 I O O dirt Cup for rugs or floors. , b REG. $31.99 WOOD HANDLE 5 DELUXE NO. FLORAL TOOLS PICNICJUG Hand held WAc3..$ 19.99 Rake hoe or shovel CLAIROL with wood Heavy duty polyethylene. ELECTRIC handle. REQ. $1.69 cleaning Wide mouth&filling for easy 1-gallon. MAKE-UP MIRROR 37 REG. $3.83WESTCLOX Hang on the wall l or place| on if{ I 299 128 8 Blare thetabl..RegUlarormagn'lvlng.''; $15.99 and fog free.MODEL'RMI i. i J 1 b I 100FOOTEXTENSION. rc-C ;v CORD ELECTRIC NORELCO CLAIROL ; r ; 100-Ft.16/3.. L.approved HOME PROGRAMER ROTARY rat Multi purpose. Yellow or Turns lights and appliances RAZOR 1 MOISTURE LAVER t .r orange. REG. $13.95 on and off Super Microgroove Specal, ti heads! .. 24 ON/OFF Rechargeable' Flip |99 moistun rotator, 9 f'"gars' roll 8 3699 model. top 9 ="9 cream on your 78 Model cleaning, travel wallet. abmulabn or lotwn,Gentts. MODEL 1308 REg $48.99 MODEL assegai 4 188 automatIcallY. S RE G. $12.99 ROTATINGLAWN _PROCTOR SILEX PAN_HANDLER " REQ.......................... .. ... .. . $24.99 t SUPER SPRAY SALE.,......- ......,,.r? ........;...ia.18 SPRINKLER Brassets''rSfuare"| '... '"I..., HOSE.NOzzLEj'yIPAOCT0R: I .REB' ..T'...............:...O Y -.-- r ..".i, or REG.circle$2.49 shaped. Aduetableltnstocoerae spray.) Non-leak. YOUR FINAL COST................ 14 J Tnermostat/calfy/ _ REQ. $1.39 Controlled _ 197 y. KODAK INSTANT COLOR FILM STEEL ELECTRICBBQ %''I. r HOLLOW MOLD Type PR-Textured satlnluxe , HOSE HANGER LIGHTER EASTERCHOCOLATES finish.20 exposures.REQ.$1099 Keep hose neat and The safe way to start Y out"of the way. your briquettes.. 550 Watts. t Assorted sizes and shapes of ;ti , 4V 10" )x deep. ,REG. $2.99 delicious milk chocolate. 59ct= _.r_ __ 227> 2911: TO 3 99 y ___ ____ FILLED EASTER BUNTS FISHING ROD RIOT I. BASKETS JELLY s , c' The perfect rods for every angler.. .., :;: Assorted baskets and BIRD EGGS spinning, boat or deep sea rods. novelties. Colorful bird In . All rustproof with stainless! steel eggs, . assorted flavors -lb.bag. SMOKERBBQ guides. Choose 6' to'8"lengths. 69' TO 4 99 REO.99' e y U" / REG. 66 GRILL 25 OFF' ' PRICE. Cast aluminum,rotating draft 1 control. 1* aluminum stand. MODEL C100 REG. $35.99SELFPROPELLED 1/3 HORSEPOWER PLANTERS 2988 POWER WEEDER PARTY MOWER TRIMMER SNACKSChoose . 35HP.4cycleBrlggs .Easy to use trims around &Stratton engine.Easy recoil trees shrubs and planters. from 5-ounce Cheese start. 22" cut adjusts) Uses mono line. Balls,6Vi-ounce Cheese Curls from 1" to 3"REG. \ REG.$".88 Chips ., '1. $14988'2 988 19 99' 2FOm $ rk+r GARRITY DISPOSALITE Big Sweep ... "%HORSEPOWER 1,00 LIGHTER __ WEEDER ." Plastic Leaf Rake Chttt E ,.' ,. TRIMMER Bplif / . II Lightweight easy to ,,, g.depend8ble Reg. 3411 Use line. ?s handle. mono u; REG. $49.88 1 _ _ 2 4 711:! i\\\ "3288( ' ... 1 uT t. . --- , J .. , THERE"S AN ECKERD OPTICAL CENTER N THE STORES WITH THIS SYMBOL 1' i "r71 i ECKERD COFFEE SHOPS ARE LOCATED IN STORES WITH THIS. SYMBOL ]IE I JUST SAY ';'.,;. i "Cl ARGE IT"t, ]( fiJm I pC iJJimf3! ] .:, ' 131 Scullh WaIIII' .t" ..- ,. '. r [I;] ,I' '. I I .. .. ,' .f ... -.J J i. f V V t Page* TELEGRAPH March II, 178T .. .. .. .. .,'IIt. . .. .. '. ; .. Fried Chicken Eaters Aid Leukemia VictimEarly > Young : \: ::, ; . I ,:LXI Vill' : I'j'': 'f'/! '.t' 'f ''t ; , \.. .'I,. t. ".. "1' ) ''''' (, ( '" h. .,.. .. '" -. .. ". .., -- Cookie were Bird in and fine Sugar form Linda Steve's Mostly fight began In', Saturday as they took,Uffithe December when he appeared- air waves to talk drivers on to be suffering from a vies In- "' busy U.S. 301 Into buying faction, which he was*unable js Ji.eoo worth of chicken, to throw off. Early in January > dinners. for a worthy cause.. his parents took him to a '+ I In Gainesville pediatrician The "cause" in this case the blood 'tHl who found boy's 9 Fsr was two-year-old SteveMurphy ,1w count too low,and he was sentto who In the two Shands hospital where the months since doctors' , prof diagnosis was leukemia. "- nounced him a Leukemia victim has run up over 110,000 In Chemotherapy was started, . hospital, doctors', ',.and: and In February Steve was therapy bills. -" given a relatively new treat ment,radiation therapy on the , It Is a "catastrophic" caseIn head in order to prevent brain, . which Steve's . L IW' parents damage that could affect the I : Stephen and Helen Murphy of central nervous system. Now Road had Morgan no way to Steve wean a cap, since the take care of such obligations, radiation treatment cause the especially since the father recently loss of his hair. changed Jobs and was presently without hospital Insurance But he's feeling better now, and is more like his old self, although some of the weekly But Early Bird and Sugar chemo therapy makes him ill. Ii Cookie, together with other and his appetite for toolvaries T ACTION; Gatorland CB enthusiastswent with the kind of drugshe to bat and staged a highly i taking. FARMER'S successful Coffee Break y MARKET + , ..... operation two weeks ago that His parents have expressed, I l- ': brought In 1,500. In addition deep gratitude to the First I rS. to $1,600 from Saturday's Christian Church, who sponsored .. chicken feat, and 1759! from Saturday's 'chicken' raffling off $150 worth>> of dinner to Gatorland CB clubbers - Leukemia victim ; / 5-year-old draws ticket fund event Stephen Murphy, winning at raising dressed pork, cash donations who staged the coffee last Saturday.From left are Stephen's mother, Helen Murphy j Suite King, chairman; and break totaled and for friends have $1,000, bringingthe Odette Brown, known In CB circles as"Sugar Cookie." many -- amount raised for Steve to who have made contibutions, ' around $5,000.( HRS, throughits and helped in other to : wtwtcjt( Children's Medical SerFORESTRY- vices, Is helping with the drugs. Another two year wait, Steve in his fight tar life. give Steve and his ways parents chemo therapy, and thanks to and If cancer does not reappear Early Bird is Lindy Norman new hope. \ all the efforts and medical he will be pronouncedcured. of Keystone Heights, and 18 I treatments, Steve's last bone Sugar Cookie is Odette Brown JF! marrow biopsy Indicated he of Waldo. Others who have -SERVICEMEN- was In a state of remission But to get back to Early carried the ball In the successful - 1 holding his own. After three Bird and Sugar Cookie, they fund raising efforts are Patrick EarnsCommendation -..- IN BRADFORD COUNTS t(.more years of therapy if are past masters of the CB Suzie King, who was chair- Medal "" ,-' biopsies continue to show no lingo and have worked their man of last Saturday's event., .... ... F.'may bv Hank Cochran cancer he .will be taken off vocal chords untiringly to help and her.right-arm 8ulstant.Le..ers ,assigned Meritorious to the 89th service Organizational while-. FUSIFORM RUST Maintenance Squadronat Joel Steinberg, director of BUARC. flanked by two Sunny Acres clients showing a few Andrews AFB, Md., has of the many Items to be sold In a fund-railing auction at the. Starke Farmers Market this Each March and April earned the U.S. Air Force Saturday. people are astonished and Commendation Medal for, concerned with the yellow- .Master Sergeant William B. orange powder emergingfrom Patrick son of Mr. and Mrs. , Come to The AuctionEverybody slash and loblolly pines. W M. Patrick of Rt. I, Lawtey. is It? Where did it Patrick What Sergeant - come from? What can I do to Student. Hotly President; Protests Unused Rellromll at BUS sented the medal at Beckley, likes an auction, and In addition to training in woodworking prevent or cure the problem? W Va., where he now servesas everybody likes to help a worthwhilecause. furniture refinishing and other These are just a few of the An Open Letter To The Tax an Air Force recruiter witha / running through I have talked to Mr. Is a waste of tax dollars unit of the Air skills, the Sunshine Acres group re questions your minds as you observe payers of Bradford County: Francis, principal at the High If would like to see the Command.A Training you ceives some educational training everyday this spectacle. School, about opening the As Student Body Presidentof restrooms three different restrooms opened so your tax 1962 graduate of Bradford .The First Annual BUARC Auction, aimed at them improve on helping be wasted won't dollars What the Bradford High School feel High School the has you are seeing are occasions. I was told on the sergeant set for Saturday. March 18, at the their daily living skills. They also spores of a fungus known as It Is my responsibility to In- third occasion that the rest. anymore call Mr Tom Caseyat studied at the University of' . Starke Farmers Market, will give the receive counseling and a program of 'Cronartium fusiforme.' form the taxpayers of Brad- rooms would not be opened \964-7757 and voice your Maryland Far East Division public an opportunity to have fun and at leisure activities is being developed, ford County about a waste of because the students would be opinion There are 12 weeks of at Ching Chuan Kang AB. the time assist in funding Sunshine such visits to These fungal spores cause their tax dollars currently destructive and tear up the school left and it seems as Taiwan. same as bowling, area museums, the most destructive pine taking place at Bradford High though the restrooms could be Acres, the sheltered workshop that is and field trips to Marineland and other disease in Florida, fusiformrust. School. then facilities called In the the restrooms. I unlocked and made available Sergeant Patrick's wife, helping retarded citizens of Bradfordand nearby attractions.The Schools, Mr.Superintendentof Tom for student use. Any student In Regina is the daughter of Mr. Union Counties to live a more When the blueprints were about the situation. He told Casey classes in this part of the and Mrs. J.H. Church ofWinston me In order for the fungus to drawn up for the new phase at building must go to another Salem, N.C. normal live in their communities rather he would look into the director Joel has four Steinberg, spread to other pines, they the High School male and female wing in order to use a rest- than sitting at home or becoming a wardof full.time assistants, as well as volunteer must live part of their life on rest rooms were In- situation. The restrooms room. \ the state in some expensive insti instructors from Lawtey Correctional the underside of an oak leaf. cluded. When constructionwas remain locked! Charles L. Register "M qr>l" the only animal tution. volunteer isneeded. completed both male and President BHS that eats his| friends Institution. More help Oaks are rarely affected by If the school personnel knew Student Body Anonym j I: fusiform rust, but the toll on female restrooms were the students would destroy the ..,.. ;.., Saturday's. auction is. only of the ...ala.tib..aod Is completed and ready for use.Howevorj 'restr oms why was an architect one is torn'. .. loblolly pines . Another need at Sunshine Acres io -this i day thece ,aid 'to' >draw--op blueprints y.11// I "'' "' '' tai' wl ' fund-raising efforts planned by BUARC more subcontractural work which can be astounding. same restrooms have remained and why was a con- : 'Cowflt7IAgontst I val/By V"'nom in an attempt to raise needed matching performed by the clients such as It was estimated in 1972, locked and unavail- tractor paid to construct the c:1"J' funds for a $100,000 federal grant to furniture refinishing, and the making of over $8 million worth of able for student use. restrooms? In my opinion this Notebook Bobby'r' BUARC (Bradford timber was lost at the stump, expanded operate an wood items, such as survey stakes, In Florida to fusiform rust. .iF. Taylor' , Union' Association of Retarded which they have produced under This translates into a loss of JOIN TIIK PARADE FOR WATER WORKS rl;.. _- Phones 9M4280 , Citizens) next year. Twenty-five adultsare contract in the past. Businesses or some $750 million worth of Extension Zoeslower - presently enrolled in the program at industries in need of such services are finished products, or Editor, Telegraph: South," and emerging as Your garden plans should be growing ones. The Sunshine Acres on Highway 16 west of invited to discuss their needs with the approximately 433,000 cords another Fountain of Youth, well under way by now even fast.growing radishes are out Starke, and it is hoped to increase the Acres director. or wood. Not to mention the If our Starke friends and and belated better times for a though we are still getting of the way before the longer- ' Sunshine number of enrollment to 35 next year. trees removed neighbors hear a violent new aggressive Hampton! some cool temperatures and growing crop needs the space. from homesites. And to say explosion, be of good cheer, heavy rains. You should have Next Saturday's auction will give the the least, Florida has the as it probably isn't another If Hampton Is successful, at selected the site for your -Allow ample space be- ) The for is Title lowest rust Incidence of all the least half the funds will be tween of convenient grant being applied a community an opportunity to show its railroad tankcar tragedy on a garden and should have a design rows XX (Development Training Program) and of what Southeastern States. but voiced opposition from a grant (free), and the balanceon showing the actual cultivation with the type of appreciation under HRS and the $100,000 sought support the retraded Young, succulent seedlings minority to the proposed new a 4o-year 5 percent loan. I arrangement of each vege- tool you plan to use. BUARC is doing for wish I could start a new would be made 75 cent federal are most to contract'this Hampton water system. table in the garden area. Here -Don't much up by per citizens of the county who would other- prone business with my Initial outlay are some suggestions that plant too of' funds; 12.5 per cent state funds; and 12.5 wise be sitting at home or leading disease. Fusiform the stem rust The main resentment con- given to me and the rest at 5 may be helpful: arty one crop at one time; may appear on or especially those which The local share would be to Play this on crops local funds. cerns requiring everyone percent. any institution.This . in branches. If the unproductive lives some spores are not must be eaten fresh, like hook on to the system, even mental piano, then check and -Group crops by similar $12,500. appreciation and cooperation may present, the rust looks like an those already owning their see If any relative, friend, planting and maturation dates radish and cannot be stored. I be shown, not only by attending the elongated swelling, called a wells so as to keep the basic stranger, bank or savings and in. order to keep the entire Follow our Planting Guide to I, The basic purpose of the program is to auction, but by contributing articles in rate at a liveable level.I loan association will play the garden in production as muchas determine how much a row of f keep retarded citizens out of institutions advance to be auctioned off Saturday by Young seedlings possessinga same tune! Or will Hamptonwait possible. Within each each crop will yield.To . where the<< costs of maintaining one clientis Nelson. stem gall often die within 3-4 suggest to all hands to until the cost of the grouping (block), give , auctioneer Gilbert Anythingthat years. Those that continue to allow indigents, shut-Ins, system increases another consideration to arrangement provide fresh vegetables In this contrast to $20.000 per year. is saleable will be welcome. grow, often break at the point elderly persons on thin Social hundred thousand; with according to plant size over a long period of the BUARC program costs $1,900 a of Infection during severe Security checks, to be first in possibly no grant money time make interval plantings year, and has the advantage of keepingthe Articles be contributed by calling windstorms. 'their minds, as it won't be a available at a later date? -Arrange low-growing: of any one vegetable every 10 may '' for those vegetables such as radish, to 14 days. This practice ' client at home where he or she can service 'watery grave smart 964-7699 or 964.5758, and pick-up Often we have complained enough and prosperous I ask In turnips mustard and lettuce works particulary well for live normal life within the anyone a more will be provided. Clean out your attic or about the poor Internal drain ''enough to have their own who objects to ask themselves along one side of the gardenor crops such as beans, sweet community and the family circle. carport, and then join in the fun by age of our soils. For once we well as eventually St. Peter the following questions and let ( block), the medium tall corn and peas which have a According to HRS records, there are 68 coming to the auction. Inspection of should be thankful. It has been may greet them and say; their conscious be their growing plants such as short "peak" period of * persons in Bradford and Union Countieswho 8:30 with the actual shown, rust incidence is mini- Welcome brother (and sisterly) guide: Do I object because it peppers bush beans and quality. at . items starts a.m. : mized in areas exhibiting poor special place has been squash in the middle of the, : are eligible to be enrolled in the a re- : , will cost little -Plant two or morevarieties ' o'clock. mea auction set for 10 drainage. Intensive site pre-- served for you, since you more garden, and the tall-growing BUARC program. paration and pine monucul- made a sacrifice for those less money?Can't I afford to try to vegetables such as pole beans, having different lures have increased rust inci fortunate. heir Hampton so everyone sweet corn and stake maturity dates to prolong the'season dence. have a rate that is live- tomatoes along the other side. for any one crop. While I ., It irritates me to hear a able to them? Let's face It, Such arrangements minimize genetic crossing may occur, The Simple LifeSome The only sure way we can local business man, In a fine everyone Is growing older, so. shading effects. this Is a problem only in sweet eradicate fusiform rust is to , county position supported why not "Let George" (The corn where "xenia" effects eliminate all the oaks. A task entirely by tax payers, saying show up on the ears ' City) do it, taking life easier -More than one crop, each Some people thought Thoreau was toward "the simple life" which may clearly beyond our capabilities. "he will be "ding donged"* (not ourselves. Leave the drivingand requiring about the same (example: yellow kernels ) eccentric, but perhaps he was just aheadof affect the American economy, openingnew his exact words) if he wants to spacing, may be planted within mixed with white ones). , headaches to his time when he retreated from the opportunities for businesses that In order to minimize the join the water system, when Hampton so a single row. blocks he Is doing all right for himself one never has to entirely -Plant sweet corn in : complications and frustrations of l life and plan ahead. The buying impluses of risk of pine stands contacting with thousands of dollars from on his own pump and -' Run rows north and south rather than In single rows so spent a year in blissful solitude at those who opt for the simple l life will fusiform rust, forest owners' the county. (Not a member of well Don't forget a new so that exposure to sunlight is that much pollen is present In should obtain and plant rust. Commission). I for all Under the air around the corn stalks. Walden Pond. tend toward saving saving the County and even rows. cer- money resistant now then with seedlings. They are pump ,, humbly suggest that he checka tain conditions, planting on This practice should produce !a back credit buying, available from of'' labor costs, plus electricitymeans cutting on energy, a varieity dictionary for "sacrifice and the south side slope of a bed better pollination and ear (Ill- At least, sociologists have noted that and more reliance on do-it-yourself. It is sources. cooperation" and perhaps he free. your own water Is not running east and west might out. something strange and fascinating is apparent that the 'Voluntary simplicity The second consideration 13 will change his ding-donged need The the green chips are light down on ,GO we, have advantages such as wind -Even in Florida, a cori-\ ' taking place in American society a movement" tends to embrace the philo- to plant the right pine species ,;,. mind and Join: and on St. Patrick's Day protection and quicker soil tlnuous year-around supply of ' definite trend to the more simple life sophy that "less is better" with emphasis on theta proper site. Planting off Consider possibility of a March 17, the Wearing of The warm up. fresh vegetables Is not prac- .' after a surfeit of luxuries that do not on purchases based on need rather leads to Increased f inci lower insurance rate, and Green is an appropriate day to i o...Crops'that: span more than heal: due to seasonal ' satisfy amusements that do not than desire. dance saving a life or home with join the parade for the waterworks one season, such as straw variations. For an ample ' amuse, imall berries should be to of most seasonal Items .' and water hydrants and even though a placed supply . a giddy round of activities that leave And the trend isn't confined to For homeowners, obtaining sufficient more 'Water personal sacrifice to help one side of the garden to they approximately one-tenth acre ' one mentally and physically exhausted.The any a few superior seedlings and Volunteer.joiners will pressure.deservethe Hampton I! do not Interfere with seasonal per each member of the '. one age or income group. It is a volun- having a choice of selected credit of ending the poor preparation of the garden. family should be sufficient. new trend Is currently being tary movement toward economy and sites is difficult to achieve. Hampton 'publicity as the -William H.Summers, Interplant= quick-growing ' studied by social scientists at Stanford simplicity, and is not made mandatoryby "Sabara Desert of The Mayor Hampton,Fla crops like radish among that-Design crop rotation your Is garden practiced.'so i: Research Institute, where observers inability to purchase extravagantitems. Many pines live for decades This practice primarily prevents - have detected a significant new life-style with stem Infections, then diseases from living' > R they describe as "voluntary many pines! are broken in the pRin over from season -to season ' r simplicity. yard. Should your pine be h. to void the 4 Try growing same :a 'Stanford Some of the simplicity trend may be' severely Infected and Is In 7.I atiliijiq4BOB vegetable in the same location ' research indicates the begin attributed of course to the prospect of close proximity to your home aunt more often than once ''every t ning of a mass movement among all continuing inflation, but basically it re- It may.be wise to remove it. ly, M kuMhts three' In fact, rotation * aces , ,j ; of people which may have far-reaching flects a growing lifestyle that places a I should beeaby families of crops > effects the Unsightly. branch'galls as well as by individual >J't on way business and the "basics" FERGUSON crops / must appeal higher value on quality should be pruned. G. JOHN M. MILLER to consumers and the way consumers of living rather than on more and more I ot. Publishers -U.. stakes, string and a -i :< will be demanding that producers cater just for the sake of more and more. Remember, if you spot a published each Thursday and entered a* second pass Matter at the Poet Office at Stark, *ta. under yardstick to layoff, straight, ,'' to the more simple life. yellow-orange powder emerging -. Actol,March 3, 1879 row. Follow your previously admit that Thoreau had from a slash or longleaf a J '+3 Subscription raw In trade area; $7 par year: M six months. prepared plan. Place garden I! : 'r. But we must pine you are observing the Outside trade area; $8 per year: $4.SO ux month*, label at the end of each row. I I: Iff,; The "Washington Letter" in U.S. one advantage in his pioneer search for causal of the most Phone 964 6305 Sta"'., Fla. Information on the label 1 I News and World Report magazine is the simple l life. Where today, could any- serious rent disease In theSoutheas hould 'includes. the crop' t i alerting its subscribers' to this trend one find another Walden Pond? variety and planting date j I [ft ... ... .. . -- --- -- . . -- -.r. ------- .. ---, --- -- -- -'- -- .. " r 1 .. J '__ ... p, .,' .. .' .. .. 1. .. .y, ....... ,,, .. -.... .. ." ., -.. ., _'" . . 0. f r,. ) -) I I' "IMr. -JI March IS. 1178 TELEGRAPH Page-n i ** * * *: * * * * : * . * *- LAWTE'By i. ** * * * * * * ** *.* *,. ,* *.* {" CHURCH ACTIVITIES L, CHURCH OF GODi Sunday Sunday NORTHSIDE School BAPTIST: BCliOOLNEWS EUiabeth Terry and Mr*. Hermie Kelly Palatka. Scott Davis of M.... Pierce Crews attended - School to a.m. Worship Worship" Services 10 a.m. Menu March ZO-O PhMiei: T82-33W: and Mr. and Mn. A.P. Washington, D.C., was a the "SING" at Johnstown / Services n a.m. and e p.m. 7 11 a.m. and MONDAY: Chicken with Hallman. of Keystone Saturday overnight guest of Baptist Church Sunday after ' Prayer Meeting Wednesday 7 p.m. Prayer Meeting rice green lima beans peanut PERSONALStMiss Wednesday and visited the Heights, visited their brother his father and mother-in-law.! noon.Mn.. p.m. YPE Friday at 7 p.m. Wednesday The at 7 p.m. butter and Jelly sandwich, Elizabeth Terry went family until he brought her Eustace Kelly In North Mr. and Mrs Ben McCulley./ W.F. Atwood and Mb EVERGREEN BAPTIST: Church Saq Crusade Soucl Baptist apple sauce milk. s home with her nephew Terry home on Friday. While there Florida Regional hospital Mr. and l\I.... RW Pierce Crews attended! a Sunday School 10 a.m. Jacksonville Choir from TUESDAY: Chill with Futch of Jacksonville Beach JoeyceiFutchhiin StthYlnceenU Gainesville Saturday after Edwards, of Jacksonville House Decorating Party At the Worship Services II a.m. and Church sangat Northslde beans saltines, cheese toast, noon. were Sunday dinner guests' of home of Mrs. Evon Brofn' 7 p.m. Training Union 1 p.m. Baptist on Saturday french fries peanut cookie, Terry Oglesby won the half Hospital.Jacksonville. We are Mrs. Lea McClellan visited their parents Mr and Mrs. Tuesday night at the State Prayer Meeting Wednesday 7 night bourn They There sang about two peaches, milk. of beef raffle at the Lawtey happy to report that she is her son-in-law and daughter B,L. Wilkison. Sr. Farm. ; It were 30 singers WEDNESDAYSpaghetti Dixie Youth League Thursday some better at this time. Mr. and M.... Maxie Reddish Mrs. Pierce Crews was a Mr. and Mrs. Carl Sumner{ p.m.FAITH ,BAPTIST, Radio and church: was served enjoyed cake by all The with meat sauce cheese, night March 9. Mrs. C.R. Crews spent last and sons of State Farm on luncheon guest of her sister, and family of Fort Meade and Program on WPXE at 8 a m. and punch. coffee tossed .salad french bread week with her son-in-law and Saturday afternoon. Mrs. Waldo Prlngle.. of Worth !Mn. Ivy Wester of Glen fit. Sunday. Bible School 10 a.m. SMYRNA pears peanut cup. milk. We are happy to state that daughter Mr. and Mrs. Friends of Mrs. Janell Ington Springs, Saturday Mary were Sunday dinner Worship Services u a.m. and BAPTIST MISSIONARY Mn.Joyce Futch was able to Tommy Clayton,and son' Tom Starling regret to learn that Mrs Pierce Crews visited guests of Mr. and Mn. Archie 6:30: 'p.m. 'Prayer Meeting am ; Sunday School. 10 THURSDAY: Mot dog on leave St Vincent's Hospital. of Jacksonville. she Is a surgical patient in M.... Brenda Cowart In I Crews and family and ttv-lr. Wednesday at 6-30: p.m. and Worship Services 11 a m. bun mustard ketchup baked Jacksonville Monday March Mr and Mrs. Bill Dobbs Bradford County Hospital. Bradford County Hospital mother Mrs Annie. Mae FIRST BAPTIST CHURCH Prayer 7pm. Wednesday: milk beans cole slaw applesauce, 13,and she will visit her sister, visited Mrs.. Joyce Futch. In Our prayers are with her. Friday afternoon after a freak Crews. Mrs.Archie Crews and Sunday School 9:49: a.m. Meeting 7p.m Miss Elizabeth Terry for' a St. Vincents Hospital Jack Mr. and Mrs. Dwight accident sons returned home with her Worship Services a.m. and FRIDAY: Planning day. short time. sonville. Friday afternoon. Browning, of Brycevllle were M.... Pierce Crews attendedthe brother-in-law and sister Me. .7:30: p.m. Training Union 6:30, Friends of Harold Eunice Sunday dinner guests of their "SING" at Norlhulde and Mrs. Carl Sumner and p.m Prayer Meeting Wednesday .- k.. *' * * * * *. * * * *' ,regret to learn that he Is a granddaughter Mrs. Fay Baptist Church Saturday family and will return hornet. Strickland and . at 7:30 p.m. It patient In Bradford County family.Mr. night. Friday 1Grotona GRACE UNITED MCTIIO- Hospital. Our prayers are and Mrs. Daniel DISTi Sunday School 9-45 : Lhwtey Elementary News : ,with him. Wilkison and daughter Dana '.m. Worship Services 11 a.m. Mrs. William Wright and were supper guests of their and 7:30 p.m. Choir Practiceat her daughter Miss Chert have parents Mr. and Mrs. Donald T 7 p.m. Methodist Youth Fellowship Mrs. Eddie Joyce Sexton'sand Angel-Brian Dobbins, Ginger flower beds. They weighed & gone to Muncie Ind, to take Wilkison Saturday night. :EffRTIDlE .Wednesday at 7:30 Mrs Sylvia Tatum's third (witch)-Dawn Scott Marshmallow measured themselves and care of her mother Mrs. Earl Dana remained until Mondaywith ( grade class went to the Munchte-Jonn Ham- found out that they are all different Etlcheson for two months.Mr. her grandparents. p.m.The Love Loafs of the Jacksonville Airport Wednesday Ilton. Cupcake Munchie-Mon- and yet alike In many and Mrs. Roger Eunice Mrs. 0.J. Anders spent Church amounted to $219.50. March 8. This completedtheir roe Herndon. ways visited their parents Mr. and several days with her son-in- These funds will be used to unit on transportation.They Students don't forget that M.... Hamilton's 4th grade Mrs Harold Eunice Tuesday law and daughter, Mr. and fight World Hunger. had an enjoyable time Monday March 20, you will be class has finished a unit In night. Mrs. Johnny Jenkins and son Fertilizers Are Specially Formulated For United Methodist Women and ate lunch at the Trout having class pictures taken.In Florida History Florida's )Friends of Mrs David Scott Robert, of Milliard. Florida Lawns They Contain Organics -Cheleuled met Tuesday March 7th at the River Picnic area. Mrs. Sharon Golden's 6th Indian Culture. The children regret to learn that she Is a Mr. and Mrs. James Iron-And Vital Elements Unlike Many Other church with M.... Wilma Mrs. Linda grade, Steve Marshall and have been working in groups surgical patient In Bradford Bowman were hostesses for a Brands Orotone Feeds For Months. Its Clean S Wainwright presiding. M.... Tougaw's and Virginia Massey completedall to expand their Interest, County Hospital. Our prayersare birthday party for their Easy To ApplyGROTONE. Frank ,COBS gave the devo- Mrs. Becky Dobbins' first and activities on the Bradford learning and sharing. Out with her. daughter Mrs. Vickie Crews tional. After the business was second: grade classes walkedto County Reading Profile standing group leaden are: Mrs. Leonard Melton and Sunday afternoon. Guests taken care of the meeting ad- Mickl: Becker's house' Cards. Denise Gulllon, Lisa Harley, daughter Celeste were Included her grandmotherMrs. journed. There were 18 ladies Monday March 13 to pet and There will be a spelling bee Sherry Herndon and Pam business visitors In Gaines- R.W. Bowman her PELLETS , present feed her ducks and goats. in the sixth grade classroomon Taylor. ville Friday night. grandparents Mr. and Mrs. h HIGHLAND BAPTIST: March 16 to choose three In M.... Judy Becker's Com- Mr. and Mrs. Ronnie Mosleyand Altwater all of Jacksonville. Premium quality Long Lasting s.1 Sunday School: to, a.m. The music department Is representatives to participatein bination class Levah Jenkins laugher, of Maxvi le Her husband Steve Crews and Plant Food For Lawns' $ Worship Services 11 a.m. and going to perform the musical"Hansel the school spelling bee has been chosen as the student visited their parents Mr. andMrs. son Andrew and her brother All 595 6 p.m. Prayer Meeting and Gretal" to be March 23. who put forth the most effort Harold Eunice Friday Brian. Bag Covers 2500 Sq Ft. . Wednesday at 7:30: p.m. presented Tuesday May 9, for P.E. Students of the Week in the past week. night. Mrs. Debra Mobley and LAURA BAPTIST Sunday P.T.O. Mrs. Lavon Drives are: 3rd Grade-Robert They will be armchair Miss Kathy Casey of Kindall Bryan left Sunday School 10 a.m. Worship held auditions and the Starling and Tammy travelers throughout the Starke was a Friday luncheon March 5 for Fort Knox. Ky., to For Lawns With Weeds 1 Services 11 a.m. and 7:30: p.m. following cast was chosen: Giddens; 4th Grade-Sean United States for the rest of guest of her grandparents, be with her husband who is In , Prayer Meeting Wednesday at Hansel-Jim Norman Gretal- Robinson and Pam Taylor; the school year visiting all the Mr. and Mrs. Fred Moore. service there. GROTOME WEED & FEED 7:30: p.m. Michele Sexton Mother. 5th Grade-Sam Norman and fifty states via films and Friends of Edward Lee Mrs. Frank Camp spent last Debra Orleman, Father Monica Berry; 6th Grade- books. Masey regret to learn that he week in Atlanta. Ga., attend- Complete Plant Food Plus An Amazing Weed i BC Plans Jimmy ,Muse Carl-Robert Tony Hill and Nancy Teston; .Charles Francis visited Is a patient in Bradford ing an IBM Seminar. I Killer For St Augustine.Centipede & Zoysia Library Starling Helga-Sue Smith. 7th Grade-Edward Crews Mrs. Julia Rlppllnger's 7th County Hospital. Our prayersare Mrs Grace Dobbs of Jacksonville Grass Covers 2500 Sq Ft. $795 Art Gerta-Genle Rising Fritz- and Khandice Stroud. P.E. class Wednesday with him. was a Sunday afternoon Bag: April ShowThe Wayne Cribbs, Frederick-Ray; Class of the Week is 5th March 1st, to tell about his Mr. and Mrs. J.W. Thomasand guest of her in-laws Mr. Shuford. Katrina-Shella Grade. heart by-pass operation. The son Jay of Live Oak were and Mrs. Arlie Dobbs. WE'LL DELIVER t SPREAD GROTONEON Bradford County Public Southerland Baby Tree- Mrs. Peebles' class Is cur- class has had a 12 week Saturday dinner guests of Mrs. John Tye Sr., and John Library will sponsor its Michael Ripplinger. Snippy rently studying food and Berkeley Health study of the their parents, Mr. and Mrs. Tye. Jr., attended the funeralof YOUR LAWN $ I annual Art Show April 3-14 Woman Tree-Kenna nutrition In health. The circulatory system.7th Fred Moore. Mrs. Fred L. Roberts. Sr., (Minimum 2 Bags) 1 AWlfJona, and all persons In the Starke Wilkerson Old Man Tree- lessons Include menu planningand Grade lit Semester A-B Rev. and Mrs. David Brown of Jacksonville on Monday at Per Bag area are Invited to display Tommy Barnes. Reindeer- discovering the Honor Roll students: Edward visited their son-in-law and .George Hewell Funeral Homeon 'FOR ONLY original works of art. Terry Cask ins, Owl-Keith nutritional value of foods the Crews Tammy Griffis Stuart daughter Mr. and Mrs. North Main Street. This years' show will Gowens Heer Hare-Paul children eat daily, As part of Pauley Genie Rising Debbie Danny Holmau and daughter Mr. and Mrs Earl Troxell USE represent a wide variety of art Smith Mother Bear-Virginia the unit Mrs. Wise dietitian at Roark and Donna Thornton. Windy, their sons and were Sunday overnight guestsof OUR SPREADER FREE by familiar local artists and Massey Englebert-Allen Lawtey Elementary spoke to Fourth six weeks A-B Honor daughters-in-law, Mr. and Mr. and Mrs. David Kelly many newcomers. Anyone Wood Adelheed.Don Bright; the children Wednesday Roll45th: Grade Combination Mrs. Tim Brown and Jennifer of Jacksonville.: wishing to enter works of art Angels-Rosalyn Nichols- March 15 about menu planning -Mrs. Peebles: and Mr. and Mrs. Douglas Guests of Mrs. Nora Grider GARDEN & are asked to please call 964-, Stacey Gnann-Tara Austin- and budgeting for the Charlotte Berry Chris Cribbs,. Brown. In Virginia. They also at the home of her nephew and LORiDA 6400 for details. Kim Gowens Four school. She took the children Michael Gowens Douglas saw their parents Mr. and niece Mr. and Mrs. Ben ptT NURSERY CENTER The public is cordially Snowflakes-Mark Shuford- through the cafeteria's Heaton Jeffery McClellan Mrs. Foster Brown of West McCulley over the weekend invited to view the paintingsat Melissa Starling-Lori Sellers- kitchen and storage In order to Evan Mosley Cary Newsome Jefferson N.C. were her brothers Lester and sCONTROt the library during this time. Johnny Barnes. Toddler give them a first-hand look at Valarle Randolph Michelle Mr. and Mrs David Payne Lee Smith, of Tenn., her a tNlwt 539 E Call Sl Starke Fla the equipment and foods Sexton Nancy Shuford, Enoch of Mobile Ala. spent Sunday sisters-in-law, Mrs. Juanita to Phone 904-5745 LawteyEscapee.,Still needed to prepare daily Starling and Ernest Whitley. with Mrs. Lucille! T. Ivey and and Mrs. Hattie Smith of Starke Fla 32091 UncaughtJames lunches. 6th Grade Mrs Golden: Mr. and Mrs D.R. Brown and Cltra. her sons James and Miss Sheila Silberman's and Steve Marshall;*7th Grade- Cynthia1.: Paul Smith and families of An initiate'who walked off Wainwright. Miss Kathy. Casey's classes Mrs. Julia Ripplinger-Sheila from Lawtey' Correctional The escapee identified as have been learning about how Anderson, Edward Crews I InatltPtiv9-_ ,arly:=-Monda -- :FlllnIJ.Pl'lnce.. was things crow and change. They Stuart Pauley Donna /.. '" ' morning has jitlll t k $jplt..o"ife .sedwlg, sifnr.s6f .watchingng; : and" aJ1d *..are ,,"Thornton*."0;.mmy*'*<+Gritfi,...1."'; -"I ..'. ,,,.;II"".'c..5? to / ' caught WedtefibayJ: Feb.19,4: murd' i h Dudl : pleasuring Gerald Gulllon Shawn' Hart'" InlG gj'E' according to superintendentMarge County., them. Mrs. Westcott and her Lex Parrish. Genie 'Rising, i4 Vo-Tech class helped them Debbie Roark and Khandice I Pratt To Head nentaillealth Drive spruce up their classroom's Stroud Sheila Shoutherland. Mrs. Marge Pratt will lead Florida said Elizabeth L.Metcali' d I Bellringer workers In a house- ,state president of the to-house drive during May. voluntary citizens' associa "Proceeds will benefit the tion. Mental Health Association in As a the nongovernmentalagency assocaitlon can PREFERRED BY SO MANYA and does speak for the con- $ County BilreAThorChairman I sumer-the person who needs 2. professional help for an emotional funeral service is a most personal Chosen disturbance."The expression of tribute. It should be planned Association is a according to individual wishes.That is why we 'The Cystic Fibrosis moving force to get services Foundation has announcedthe established where there are at DeWitt C. Jones Funeral Home go to great How far does a buck go? With,' the appointment of the follow., none. It also serves as a moni- lengths to assure complete freedom of selec- coupon below, very (fqr. One dollar gets ing people as chairmen of the toring agency to see that tion. Selections are made in privacy and with Hardees ' annual 'Breatb of Life" Bike- treatment services are doing full information. That Is another reason that you Iwo Big burgers. A-Thon in Bradford County: what they were set up to do," for more that 65 so families have Y"t "t v Each one a giant quaiter: pound of said Mrs. Metcalf. years many j Starke,Police Chief Jimmy sizzlin chai broiled beef topped with The Mental Health Associa- preferred the DeWitt C. Jones Funeral Home. Bowen Chairman of Starke; . Ms. Diane Bruno Chairman tion strongly promotes more tv real fresh f films, Like fresh, crisp lettuce; of Hampton. community-based care as wellas 1 C l plump, ripe,tomatoes; firm, white more research into the plus cheese and onions pickles, too. These chairmen will each causes of mental illness. [DeWitt C. Jones Benton .Futch So take this to coupon any The' Association offers lead local volunteers in their own community to organize a literature to the public on a Harold Johnson +pii ; ''its participating Hdrdees And try the funds variety of topics including depression Deluxe the With Bike-A-Thon to raise to alcololism. and DeWitt C.JonesFuneral Big big burger support research for and children care positive ,mental health con- ; fresh f xin.S.Take 2. For only $1. effected programs, by lung-damaging ... For free information Home diseases like cystic: fibrosls write to the Mental.Health Association St.,..., K.y.ton. Nets severe asthma chronic : of Florida 132 East 964-ezoo 473.sire tssla bronchitis. and bronchiec- Colonial Orlando Florida Drive. 32801.Suite 207 4t; ,lr :;' The Blke-A-Thons are scheduled * your April community to 1978.be When conducted Invites someone during you in to IffMM (E BUTLER APPAREL Y r. sponsor them in 'this year's Lake Butler Fla. Bike-A-Thon, please be I ( MATCH Mon fn 9 30 6 30 BOY generous. Your dollars provide L ...930 300 J or the ''Breath of Life" for 4TsEA .- SHIRTS$525M1NS -, millions of children who suffer with lung disease. SLACKS JERNSJEHNSJEHNSCAMRON MEN' .. Approximately one of every JR. 00 ., c. do.ADEE TIC WESTERN 1.600 children' are born with $5 ,Uo .; CEE cystic: fibrosis which Is still SLACKS s ... .OSHIRTS S81D inherited . Incurable. CF Is when both' parents are ..\'S BAY carriers of the recessive gene J r. ,BOVSSLACKS which,, causes CF. It Is 4 00Up $850 * TOPS 541D believed that ten million . Americans are symtomless MEN5 ;. : ; carriers of this gene. Current -04EII !olD $10|95u MENa$11Tw research funded by the Cystic SLACK LEE , - Fibrosis Foundation is KNIT *7 I) ,. .,ll ....' .. " test to ., , <# \. seeking a practical SUITS . wellas MCNS a UCKES 'SLACKS $H 1''. _f ieel i-11e 8al'tttitl' Yttrll" Identify these carriers, as > lo II1; + a cure for CF and better NEW ARRIVALS FINGERS oQpS methods of treatment for all $7" 'YSNAP :;;. ''fJ - LADIES PrHjJ : aovsDENIM; lung-damaging Because of unproved diseases.treatment SLACKS 8" ; 2 BUS DEUIXE BURGERS II . developed. CF through patients are research >f r'l I shoo..,. I many *", JEANS $ now living Into their teens and IP? $1 FOB ONLY 1. ( young adulthood. These same SKIRT . treatments are also benefiting $1050 ':\) and often, curing SETS "c:. ,SPORTSS19OYES Good at alt participating Hardee's. Please present this.coupon before ordering. r II children suffering from other \ \. I ' ! ; One Customer must sdfes tax. lung-damaging diseases.EDUCATION G COATS UD w coupon per customer please. pay any YES WE HAVE y' 'j'. This coupon not good in combination with any other offers. II. TR lY FREE fliP/ ARGAINS ,I. t. ' See: Chief Kelly US Navy : REMNANTS WITH FLOPS \ o'1--\ ESiI 1.\ ''J1 I GALORE AT OUR I. 'Niv'r '' iar42k: Offer Expires' 3/29/7,'" ." 84 !: - Recruiting Station Starke PURCHASE 1,.' .. Bit - - it Rim -, Monday 10 A.M. Tit 2 P.M. .. 6t STORE , Bradford Square ,u.Ji" j 301 South Starke' ... ,,, I - R,. -..... .. ....-<0' ....<.... 1 _, ;: .. ... -.__ ..........,.,0- "'..... '' ''' :' ;. r"', .' ,. '. ', !\"'.: ,\ \'. {.Y' "J J i Page 12 TELEGRAPH Mardi I" 1.11 4 r I * * * * * * <* * * *.* * ** * * * *. ** I CorT1iTinhtry News ; by Elliaketh WalkerBradford Ruth Court No. 19: Church , Phase-.a service will be held on Palm .! wpm . County Branch Sunday March 19 at 1 p.m. at Worship 11 a.m. At 3 p.m. the Ushers boards an asked to public is invited to attend. Auction! Aacllonl auctioneer.:Numbers to call to Tuesday, Your { Junior I NAACP will hold its regular Pleasant Grove United pastor and congregation will attend Greater Bethlehem ML Plagah AME Church The BUARC pick up items for the auction Choir rehearsal at 7 pro. monthly meeting Monday Methodist Church. The worship in St. Augustine at Freewill Baptist Church 20 Revival started Monday Auction will be held Charity at the are 9644197 or 964-7699. All Wednesday aY p..... .Prayer March 20.at Ebezener Baptist Masonic Family Is invited to Tabernacle Baptist Church Ushers anniversary on Friday night, sponsored by the Farmer's Market the Fairgrounds items donated will be Meeting. Thursday a*.7 ... Church at 7:30: p.m. All be present. Rev. G.G. McAuthor, pastor night, March 24, at 8 p.m. Fellowship of Churches, of the just north on of Starkeon appreciated.Pleasant Bible Study Sunday Seh4>J I.. Interested citizens and Evening service 6 p.m. March Sunday School ':30 a.m. city. Everyone is Invited to US-301 this Grove United a.m. Sunday at 1'pm. Kutb members are invited to be Church. News 24. Usher boardland 2 will Sunday at > p.m. the Bible attend Monday through March 18 Saturday Methodist Church: Every first Court N*. I IS wilt MMr..,. present Plan are In the Greeter Bethlehem Freewill celebrate its anniversary. Class will terminate; service Thursday at 7:30: p.m. Fridayat ,beginning 10 a.m. and second Monday, Young Palm Sunday. Lovetawt'' at gp.m. making for the Spring Baptist Church: Everyone Is Invited to attend. for the day.Ebeseaer. 7:30: p.m. a Gospel Singing Mr. Gil Nelson Is the Adult Choir rehearsal at 7 The public Is (,vies:' banquet. The cooperation of Easter rehearsal was held First Bon Church of the Baptist Church: will be held at the church. < _ all members la needed for Monday. Tuesday and Living God: Tuesday 7:45: Easter rehearsal will be held Sunday School 10 a.m. -- H. success. Thursday nights. Wed. 7:30: p.m. Prayer Service. Friday every afternoon at 4 p.m. Morning Worship 11 a.m. ___ Hilite Ll . Dell Chapter 188 O.E.S: Senior Choir rehearsal. 7:45: Tarrying Service.Sunday Bible Class each Tuesday 7 Mt Morlah United Hampton ! Regular meeting of Dell Friday night is Talent night. School 10:30.: Home Mission pm. Prayer Meeting/ Methodist Church Wed Chapter will be held March 23, Saturday 11 a.m. the Sunday 11:30: a.m. YPCW or exchange Thursday 6:30: p.m. Sunday) Prayer .Meeting and Bible 7 p.m. In the Masonic Hall on School clans will sponsor a car service with Gainesville School at 9:30: a.m. AU Study. Choir No. 2 will additional dollars. And the Last week Mr. Dan Denim Brownlee Street. All members wash at the church. Sunday .church 6 p.m.Philadelphia. members are asked to join the rehearse at 6:30: p.m. Easter Fanny Farmers of the Fair the Bradford Cownty ShrUf's I are asked to be present. School 9:30: a.m. Morning Baptist Fellowship of The Extra Day rehearsal will be held each by Dolores Meng Sexl! City Clerk Mary Lee Department La'hea" . Church: The third anniversary Session at Ebezener of Mt. Monday Wednesday and Pbonei .4S8-1MS Allen Juanita Greene Mrs room. He ..* t* . for Rev. May Berry will Slant Missionary Association Friday ate p.m. The Easter Waldron Mrs. Evelyn about the druflt sHwatifltfk' w. First Christian Church begin Thursday at 8 p.m. with Saturday March 18, beginning program will be held Easter Senior Citizens Vaughan and Mrs. Josephine Bradford Cow*. The* lie Rev. R.L. Wright and congre at 9:30.: Sunday School Sunday at 11 a.m. Members of the HamplohSenior Fontaine surprised the showed slides sf 'to* Wont oat w. can at 6hk. PH.Csrastos gation from Green Cove 9:30 a.m. Morning Worship 11 Citizens Club and meeting with coffee, cookies, being done ,)In' our county'4e' _ Springs Greater Mt. Pleasant a.m. Communion Service 8p.m. Greater Allen. Chapel friends will be cakes etc.Some control the .ille cl sate enjoying a --1. Baptist Church in charge of A.M.E. Church: Sunday Volunteers were drugs. covered dish at 5 BAZSponsored service. Friday. March 17. Anttoch Mlssianary Baptist School 10 a.m. Morning tommorrow supper(Friday, March p.m. missing so Chief Davis He found a reeeptlv*",. and Rev. Leroy Davis and Church Thursday Prayer Worship 11 a.m. Easter 17). suggests: please you all cometo well Informed audience\ Tha'' ' congregation will be In chargeof Meeting at 7 p.m. Sunday. rehearsal each Monday Since this Is St. Patrick' every regular and special students ,appr elat td Mr. service. Sunday at7:30: p.m. the Alphla Wednesday and Friday. The the color willpredominate. meeting whenever possible Denton's presentation a.4 New Bethel Baptist: Easter and Omega Singers of Easter program will be held Day These green as "ACTION SPEAKS thanked him for .ot By The Women' Council rehearsal started Wednesday Jacksonville will sing. The Sunday March 26, at 11 rum always enjoyable so suppersare come LOUDER THAN WORDS." Friends of II =. afternoon at 4:30.: Wednesday with favorite were happy 4..1In , 7:30: Bible Study: All youth and along your! PERSONALSBest school: on .o..d1y. He had, 44 Interested adults are asked to McDonald'* Easter Egg Hunt Set culinary specialty wishes to William been a petie''n'' AlaetMM. / ... '* please come out. All membersare Ladles Council (T.J.) Smith son of Mr. and General Hospital fer sewrA), SaturdayMarch asked to remember the McDonald's will sponsor grade and the Egg Hunt at 2 The Ladies Council of the Mrs. Sylvester Smith who days following a e i knt. Ms community Revival that two EASTER EGG HUNTS on p.m. will be for second grade Hampton Christian Church was' married on March 5 to ,now feels bettet.ery.day.. *: "." began at ML Plsgah Monday Saturday March 25, I at the thru fifth grade. held their monthly meeting at Robin Cox In Seaside .and I have ona.gaisg 18 night. Walnwright Park on Church There will be prizes for all the home of Mrs. Garnet California. T.J. is with the school: taken :. -. Everyone is asked to attend Street (across from the children attending and"special" Studen on March 8. Army In Fort Ord and Is like appearance will pictures the one day session of the Mt County Health Department). prizes for winners. Church plans were classified Sp. 4. of flowers and March themes 9A.M.-4P.M.V Slant Missionary Baptist Association Please come and bring your discussed. Refreshments of Sylvester Smith Is happy to depicted all around*They a.... # Rev. Leroy Davis, The Egg Hunt at 10 a.m. will Easter Basket with you to Ice cream and cake were be able to work again after all reminded of St Patcic$' "' % moderator to be held this be for pre-schoolers thru first collect the eggs In. served to the eight ladles several weeks of hospit- day on March 17 alas, .' - r f Saturday at Ebezener begin. attending. alization and treatment at the Everyone at the ,ached N rflsWM rwttftff ning at 9:30: a.m. throughoutthe c Veterans Hospital. He and predated all the.werk done to vi' ,( day. Choirs No. 1 & 2 are f ';;h-t: .r BUARC Auction Betty appreciate all the kindness the Vo Tech .HortIcultriclass : 4. asked losing at 6 p.m. session. v 1 The Bradford-Union Association prayers and assistanceof and the slants& they 01' 9t 4 flsrml MsMi We are asking everyone to of Retarded Citizens friends and neighbors furnished. On Monday 'l they please cooperate. The cheetah II I the only member of the cat family whose plans to conduct an Auction on during this Illness. were presented' with ''very, The Junior and Senior Jaws. will not ",rect. Saturday March 18, at the Mr. and Mrs. Bill Stone healthy tomato plants to add Starke Farmer's Market. visited their daughter. Lori to the gardens'. Some. a frA. 3BIO DAYS Donations of usable kitchenor over the weekend. Lori is of the students t took home a ""nwtl. items, toys, making good 1 progress at the plant to add U gardens. there. garage 1- I l. i EAGLE Friday furniture, hardware, antiques Shriner's Hospital in Some also brought ia>. that and Saturday plants or clothing will Greenville S.C. She Is being own seeds to brio* more be welcomed for this sale. If treated with therapy and variety to the s noal gardens.; you need pickup of. articles, hopes to return home in the . contact E.W. Hodges at 'near future. H... ..Ii| . please Mrs. Anna Mr. and Mrs. Frank Report cards for th. *46(six 468-1869 Claytonat or Brunetti and son, Frank of week grading peripd 'went will be Every price cut 468-1437.assist! This They will also happyto be a Ocean City, N.J. enjoyed the home with students en M+rch. good place to get some real recent visit with the Clifford 13. Students attaining .hnor. bargains! Brunetti here. They also did roll status during' .this. period some sightseeing farther are: .: . BookmobileMrs. South. It felt good to get some Mrs. Jean Clark's first Every item at an amazing discount! Save up to 45% faithful. librarian Sandy Davis and driver Is the of they sunshine experienced.after the cold winter Quinton grade: Ford Tina'., Billy Btranham.' Home,, the Bradford County Billy Jordan Eric Nugent.. / .) Bookmobile which makes Hampton Lake News GinaTaimonde Mark RJioden regular visits to this area. It Is Mr. and Mrs. Paul Meng and Holly Shields. @ available every Tuesday from attended the 40th Wedding Mrs. Joyce Ku)kesdeh'asecond - Q SAVINGS ON 12:30: until 2:30: p.m. at the Anniversary celebration on grade: Sandy Fries. . 'ESr TiF W MEN'S DOUBLE Post Office here. All types of March 4th of Mr. and Mrs. Mindy Hersey, lommgr' .Lea books are avlalable for every Rufus Chance at the Univer Jones and Sid Russell. S! ) ri n 5 KNIT SLACKS! age group. sity Club in Jacksonville. Mr. Mrs.Arleen Rich's: grada 9:. n and Mrs. Chance are the Sandra UeJton, Tammy I .8nEArraurr Congratulations! parents of their daughter-in- Peeples, Kim Smith and'(Baa.. Mrs. Margaret Stewart law Mrs Carlton Meng. Smith.., wwwj-wt: : *!' d -i dy fb rum ( rctelebrauMi! War*'.'Mth. birthday ,W-Aprtt-kynn.'daughter.o( Mr. Mis. Mindy BevlUa's;ftwth"grader . . -. -S N M1. MwU11aY ,. I March 12. and Mrs Randy' Scogglns, Amy C1ar.Amr + C.N.. bunh.a N, .. s.R . was baptised on March 9 at St. Williams and' Melissa N /w a 54.N. Lan' wLwY1.uu. The day was made happierfor ' IF M i/ LNAT1 ( as.keaarrr..uN... her when her neighbor, Edward's Church, Williams. ;Yl; arUS IACq I Mrs. Garnet Studer broughther Reverend Father Patric Mrs. Kathryn Wiggles- L > a nice cake. They were Foley. Godparents are worth's grade 5: B.enda. /LN'INYLO. joined In the celebration by Beverly Meng April's aunt Bawek, Allen Ganakuw and { Vf"" e SAVE100 AVd E1% I t aNp.O/Ckx Mrs. Viola Lefebvre and Mr. and Francis Meng, great Lora Loiacano. . QT. 1OW.30 MOTOfI 0.. %.(V BATTERIES 1b0AL0AR.A0ECAN MEN MESH CASUALS .hEWlMS William Summers. Mrs. uncle of April. A receptionwas Mrs. CareJsi !Stevenson's. Stewart remains active and held at the home of Mr. seventh grade: Monty was < 47o O9 : 2.76 2.94 I 2'1Wash enjoys reading. We wish her and Mrs. Scoggins following Glisson Joy Nugent Marty --,. ..... k..p r.nou. SY..dr qu.aty, 5.mwl..s loo4d.d pI..I1o OP.n w-r..Ylon NI whs. WImINA.row. many more happy years! the ceremony. Rhoden and Karen WUsenj -nwmma wrIMY. 1on.Inik,.pwhnmw,... w/wl.p Id$ 1o pr..nS.p411.. btock or bfo-n.HIM 7-12. Tina Marie Meng cele- Coach Ben Moxley is proudto \ Fireman Plan brated her first birthday announce that Jerome 1O April Fish Fry which was March 14, with a Mitchell, a fifth grader, will The Hampton Volunteer party for family members and be participating the Florida Fire Department had their friends at the home of her Relays for 11 and 12 year olds regular monthly meeting parents, Mr. and Mrs. David on March 24 in Gaincsvlta., Monday night, March 13. Meng, on Saturday. all wish him well! . r4 An April Fish Fry is Beverly Meng left Sunday Howell Williams was welcomed - JEf4o1 OQtv planned, also other activitiesto for employment at Disney to the 7th grade class f' Q3+ beef up the Volunteers and World during the Easter during the past week: ; He SAVE 1.00 w i their treasury. The net result Break. attended our school .whence MEN'S I"WOIIIC( '"01'.A..H. 1 will be more efficient, aggressive was in the 4th grade. MLvachMena ... SAVI2a% AVET4% 94 J personal protectionfor School News ' -5 Eye Testing for the 1st. 3rd. W. everyone. SYkVANIA PLN PLASH YORK TISSUE VINYL RUO RUNNER8 200-CIT. Ernest Greene started and 5th grade students was March 24-23 & WAS 1.22 WS passing the hat with a large completed on Monday with the MONDAY. March {t- 545 a bill from the Greene following ladies from the Lasagna cabbage salad. s.r.n..d rl.d, 5.e a. ohM..,, YN wpe CNw WnYI rNN I.p..d Starke Women's Club french bread cherry household ..-aep.nd a.5 I- ..w.I WN/I.,w.w.d O.Nr.. .dos..I.,5Ny,s1%"red., \ a generous $75 . .AVI'1.N donation from an anonymous conducting this program: cobt.milk. ! ...N'.DeNIM MOIIT.WJ:3.96. TOP MAKER {LAZBSI0 person. $50 from mayor 'Mrs. Marge Carlisle Mrs. TUESDAY M* William Summers and as Nancy Roberts Mrs. Frazier Barbequed beef on (k small donations are appreciated Shaw, Mrs. Pat Spongier garden salad, green beamscookie OG as much as the larger Mrs. D.W. Whiffen Mrs. Lucy milk. \i IM.Mt..5.1dm Talwl..d dw.w pdr..MIN 0 G Mews 5ML Is 15.5 uslid.,m.n'.McO sums, the grand total of White and Mrs. Jess Wolbert. WEDNESDAY, Mare 2t- Jp SA VI! 1." 186.18 was realized. Besides Everyone at the school appreciates Tuna salad sweet pea|, 7 i I WOMEN"{ WEDGIES1L98 BAYW 12% their cash many Volunteers this service which Is 1 potato chips roll ambrosia", a Loa .a to be done on a milk. KFY reN'a L such as John Allen Ernest planned WEST OX wyp- NEty[ Greene Donald Helle, Chief regular basis. THURSDAY. Marsh 13- oasis : Mrs. Ernestine Denmark'ssixth Peanut' butter P-.__ Z George Davis, Assistant Chief sandwich raLtrEnutrr wln,,_ $5011.0 graders have been macaroni with cheese. .AV. 1.11 ...-i1p1 ".", ANT.tVAt Cato Buck It Peck Dennison grew 8AY 1 % STURDY NYLON TOTIS Hilmon E.I. Waldron TedCurtis studying Drug Education. limas fruit jello milk.I ILECTIIIC* CLOCK P i Y They have seen films researched FRIDAY. March 14 t and others are donating - = 2.88 88 waePLASTIC.HOUSEWARES .M1 .N. p many hours worth hundreds of and given reports. PLANNING DAY .. g r -. ._.nd.51d 1 t.n"".4.surS.ts".1.: alai LmmNr N..4,wa.M5..kN, G .................. BROOKER NEWSfriends ....._..'....e,. : 51..5......-...#....iw1. 5y/.a. eAO. WlMdi.II nib 5.Idw..I. .\ ,4O II . Avsup SAYE TI% ' PAYE 11% / and neighbors are Jones and Mrs.. Dorothy Reid. COLORFUL S"FRYPAN. t FUIIISTIIRE 150'LAWN by Jeanette Prescott praying she will be able to return Other chaperon were Mrs. Is"{TACK IOR201.TAM. YALbpll/q V I Phone 485-1715 home soon. Lydia Polkand Mrs.. SAUCEPAN ./. SWEATSHIRTS The Community extends it's Marjorie Polk. ''t;, ra9w7 NMipSo&SOs I SPECIAL MEETINGS heartfelt sympathy to the The School Advisory Committee 1. i wAaaAlr AssT.sTYuL "". 2.63 Special Swearing In family of Yancv & Matthew met Friday morning weelLa./ wise u t Nt $,M,L,11L I IN'.3.86 Ceremonies were conductedat Johnson of Newberry, February 17 in the acheoi TOaST VALURPLUSI : City Hall in Brooker. two teenage bro'thers. victims office. The purpose 01.._ ALUEIL 8 Tuesday March 7. Mayor of an auto accident Monday, committee was dlaqu old yni.vtn.uii17MECI NOZ MER"FLAT{ ......---.--. I I.aooiI. Blake Hamilton took his oath March 6. Some local relatives information was distributed 1 ____ IAIMOUV . Pa2ECTrooor aec. 2 8 ]kI ;of office City Clerk Eva include a great aunt Mrs. concerning the cemmitta* SOCKET Rum I II Clark was sworn In for her Thelma Polk, 3 first cousins along with general arttion _.- SET wIi5. CAL M MCNA6R .I second term. Marshall once removed, Mrs. Yvonne about the ..boaI.,'T... Q t: MAKER Tommy Raulerson and Mr. State Wide FAMOUS Assessment asl: PWCI Tetstone, Ronald. and Olen 6.97 BINMPORTItIMi A.B. Adams councilmen! were, Polk of Brooker. Program was discussed in moo.nuci / WAS... tt>I Nl o0 .pal5raW18.5.N :sworn In The other Council- BIRTHDAYS conjunction with minimum i man that was elected was Mr. Mrs. Nona Mann and her basic skills. The __",- 6.88 :Eugene Melvin who was not daughter Mrs. Elise Griffin, members were prussrjt;. Mk, VAtyA' micro 0bt present The regular council celebrated their birthdays Jeanette Prescott, Mrs. Bmth t Gun ON 1a 0Gtr GAU ItO PIltTI...te I meeting Is scheduled: for with dinner while about 35 Scott. Mrs. Aan Starling; MMK i'' TOOTMPAITI70Z. 600 OFFu..w..a.o.nc. 0 fit S& lues. March 14. at 7:30: p.m. helped them celebrate, Martha-Green, and Br "S y *{' VtlSVA 7..00IMM PERSONALS Sunday March 5, Mrs.Mann's Cox.The next Scheel Adv; .r.a.caa rwiww Sherry. Chris ft Russell Committee birthday was March 1. meeting waspond (- : Q w.wh 0.1,1 I VBSTS,S-M* Thornton. II of Starke spent Everyone wished them many until further s. _' w "IL..MIL.ww Lax the day Friday. March 10, more. The Title I Advisesy- -r w(1 n w00{,r' I r t t 4.88MJACNSTS.S4M. ';with their grandmother, Mrs. BROOKERSCHOOL ittee met Tuesday J'eb r ., Paul D. Prescott, and Johnny.We The Brooker Speed Ball 21 in the school o/Ace. T " A YEr . PAYE U r0 f1% d.we.n,1. n.wow r/I. were glad to hear Mrs. team placed 2nd !In the tourna- Reading teacher Mrs. ull VITALr.r.a5 QLl A 1 1 7.88MVTITH i Lula Mae Baxter has re- ment at Lawtey Elementaryon Burrows' discussed: .v ASST.WSCCTKMMS HAM 05000 neru" ...ur SOYS' DCMM MAN* turned home after spending a Thursday February 23. tests that'are 'used' tit. 202 J. Aar.! ;couple of months with her The w.aI1N Members of the team are program. committee TOMF t.ncaw.//Isl.one. n, m. 274.44 iw .I -SI p I brother and his wife inCaltahan cussed: Y Ge II listed Michelle Stilwell. Rickl, recommendations ' : t.2t7L LIP INa SAVE M.I % ..e..dwm pnwwYgM'wrMlliw.rM II I II : recuperating! from a. Harris Cindy and Lisa Lynn, corning plans for the T Wyk I broken bone fit her leg. Her .1.N pull.nwaMS..r.'FUi. i Abby k'oater Penny Jakab, Program in the fctuo. friends I and neighbors missed and Don following ,.. 'Wayne Green Doug were .. . 312 W Mlssa t oo'., I her terribly. Mrs. Eva Harrell Green, Robbie Jones Bradlee man,- Nancy HoIllqawo CIGARETTE PRICES = :11 PI.. >s Plw. IMu.L1T I underwent surgery recently in :Cox' Darrell Polk and Carl Recorder RoM M 7.. TIE I Quincy. At last report she Is Johns. Transportation was Bobble Joaes and Dora I Improving nicely. All her provided by Mrs. Bobble Fonseca. A p _ ; ) ) i ' ! _, M.rchtS.lfn$ TELEGRAPH Pau; &ightMore Enter Jay<<',CCII T( 1\11\ I Berry Queen Pageant: .1' To OrganizeAn Eight more girls have Community College. Gwen Miss Catherine Ann iT'x entered the 15th annual was a junior princess at . Schoening: daughter of Mr. organtoaltanal meetingof 101 frawberry Queen Pageant tom TTJli Bradford High School and and Mrs. Herman Schoening the Starke Jaycees under 35 q held Saturday, March 26. homecoming queen. Her of Starke. will be hold at the Garden 1.! M P.m.In the Bradford High hobbies and Interest Include Contestant will be Restaurant Thursday. March mchool auditorium. tennis, paddlebaU and on the basis. of beauty poise te. 7 p.m.Any , ,II,(Afield; In conjunction with the ceramics. She la being and personality and wilt young businessman in dh>>radlord, County Fair the I sponsored by Oral's Garageand compete in evening gown, 4 4i the community l Interested In sgeant' is sponsored by the Thomas Auto Parts. bathing suit and street joining the Young Jaycees Is J. Junior Women' Club pttarke clothes. +f asked to attend this meeting 5. < The contestants will be The girls featured this week attending a "Coke Party" In re.SeAllnvGlna: their honor at the Country FLORIDATHEATRE Baker, daughterof Club Saturday March II, between t Mr. and Mrs.: James J. r ,W1lwz.m the hours of t and 4 p.m ... Baker of Green Cove Springs ,.. They will also be- going/ to L 4 M . attends cosmetology classes <<; Jacksonville Sunday, March 18 1181 Bra4ferd-Union VoTech.lCjna's ."" 1$) 19 to the Denise Carroll .n Call & Walnut hobbies and interests "'" I\\ Modeling and Pageantry Stark 064-6451 li..j. pClude swimming, twirlingnd II. l.. Studio for tips and helpful 'it. Friday Sat. & Sun I11U lc. In high school, Cindy Griffith 1 hints of modeling techniques.! >) I received awards> in Ticket prices have been set Marioe Qortner In and band wad on the Miss Brenda Lee Jackson, as follows for the Strawberry BHS Art Buffs Purchase Picture for LibraryBradford .s councIl; and was Miss daughter of Mr. and Mrs. Queen Pageant: gUIlt In the yearbook. She Is Luther Wade Jackson of Children under. 12 years of High School art students and members of the Art Club collected enough money topurchase Ing sponsored by Diane's Starke, a, sophomore at age$1. AU other tickets"will be a painting. by Lawtey artist Earl Barber to be on permanent display la the school: / auty Shop. Bradford High School.: H.50 In advance and 12 at the libraI")'. t Brendu ambition is to door Advance tickets can be Shows with the ell painting are (1-r)t art Instructor Bobble Sue O'Brlan; Art Club member become a. veterinarian. Her purchased through Chris Vicky Sheffield: principal Charles Francis Earl Barber; art student Fred Woods. Eric V 111 d hobbies and interest Include Wilson 964-7521 or 964-8210 Hamilton; and Art Club members Karen Kapellen and Pamela Luke. / water skiing swimming Owen Zack and Mitchell's Drug Store 127 The students became Interested la purchasing the painting after Barber spent February 22 at horseback riding, tennis andjogglnl. East Call SL, 984-7810. the high school displaying U of bis paintings" to the art cl..ea.nd explaining his techniques. rvl A member of the Other girls entered are: Merchants who have The students voted oa the pa bit tag they most liked for the library' display A plaque will be Camera Club Brenda Is also Miss Jody Louise Atchison, donated gift and awards to mounted on the frame explaining the students'donation of the picture. interested in ceramics and Is daughter of Mr. and Mrs. the pageant entrants are: resents the Spanish Club Sweetheart, Louis E. Atchison, Jr. of Barblzon School of Fashion MGN1p She Is being sponsored by Kingsley Lake two 700 Modeling Scholarships Ralford Social Corcarby all\\the' exc'te'" VEt I \ i Barbara Norman's Beauty Miss Jacquelvn' Marie for both the Queen and Ewisu\ \ Shop and Cadillac Uniform fLynn Barber, daughter of Miss Congeniality, Florida of Company Mr. and Mrs. Donald E. Bank at Starke, $SO savings Mary Lee Faulkner Mr. and Mrs Lane Gasklns Mrs. Vernell Sapp and Mrs. Barber of Starke bond for Queen Morgan'a Phone: 41M-37I1 and son of Lawtey were after Nancy Larkin took Debbie ! ei ,rdY'rl6hIIIAN Miss Karen Sue Crawford Beauty Shop. $3O gift certificate Mrs. Drew Sweat's Bible noon guests of Mr. and Mrs. Barnett back to Shands It". Y 2 f6 lY", dou Crawford Mr, and Mrs. NellR. for Queen, Community Study class met at her. home Maxllie Grlffls Sunday, Thursday and Debbie had the of Starke. State Bank of Starke $25 Tuesday. cast removed from her right Miss Zella Diane Crews, Savings Bond for Queen, Mr. and Mrs. T.B. Rahn Mr. and Mrs. Ruffln Griffis hand. Debbie Is progressing 1 daughter of Doyle D. and TG&Y Family center gift have moved from their homeat were visited over the weekendby very well at home and wel- ..:-,, -lltreeninmu Jackie Crews of Star Ice. certificate for Queen Bad- the state prison to their new their daughter Mrs. Lois comes all visitors. Some of "" - Miss> Paricla Shan cock's Furniture, Steam and home -In Green Acres in Tucker and son 0! Jax. those visiting Debbie this past ul4 (ilea Baker9dtl Edwards,daughter of Mr. and Dry Iron for Queen; William's Starke. Mr and Mrs. Earl Dobbs week were: Jackey Carley [ ] Metrocolor I I Mrs Curtis G. Edwards of Jewelry Charms for Queen Mr and tiffs. Monroe Johns Tuesday and and Lisa Ruth Rawlins. Miss, Neva Jane Flynn Starke. and runners-up, Gem Jewelry have moved Into their new Wednesday with Clarence Frances Smith, and Mr, and ypaughter of. Mr. and Alra.b Miss Stephanie Gay Green 115 gift certificate for Queen brick home. Dobbs. who is a patient at St. Mrs. Jimmy Cox. 301 DRIVE'IN forge (B. Flynn Jr. of daughter of James A.Green of The Magic Needle $10 gift Mr. and Mrs Robert Vincent's Jax. Mr. Mrs. Vernell Sapp recently II arke, a senior at Bradford Raiford and Glenda Green of certificate for Queen The Faulkner' attended the Dobbs. is critically ill and took Debbie over to Starke for f Ugh# School. Her hobbies and Gainesville. Garden Restaurant Dinnerfor Lawrence Welk Band Concert'at needs our prayers. her first outing since surgery, 301 South >k crests include cheery Miss Melanie Lorraine Two Mitchell's Drugs the coliseum in Jax., Mrs. Myrtle Sapp Is visitingher Starke 964-7484 jading. water skiing, ands Morris daughter of Mrs. Jean Hallmark Keepsake Albums Monday night March (. Mr. and Mrs. Howard daughter and family, Mr I nging. Neva's ambition is ton Morris of Starke. for Queen and runners-up, Gary Braddock of the Navy Register and family of Lake and Mrs Marvin Culver, for a FrJ. Sat, come a law>er. Captain of Miss Vickie Lynn Norman Stump's Department Store Is home from Charleston S.C., City visited Mr. and Mrs. Earl few days. ! the cheerleaders Neva Is also granddaughter/( of Mr. and $5. a member of the pop ensemble tMrs. Leon M. Norman Sr. of Stuckey'a Box of assorted and Mrs. Tillman Braddock. Howard Register, Jr., spent Barnett were Mr. and Mrs i Land listed among those in Brenda Jackson Starke. candles for Queen, Eckerd's Also visiting for a few days Saturday night with Mike Billy Pellham of Keystone Among Amert- Miss Cassie Lynn Reddick Drugs IS gift certificate for with Mr. and Mrs. Braddock is Criffls. Heights, Billy Cozatt and . jnh ijigh'hoN " Students." daughter iof, Mr and Mrs. Queen Thing's By Hand -l,3 his mother from Jax. R.O. Dobbs Earl Dobbs, Geneva Wallace. . N j>J>le Is, being xponsored by Miss Yvonne Link daughterof Joseph Reddick of Hampton. gift certificate for Queen,. Mr. and Mrs. Mack Sweat and Mrs Jo Ann Griffis Mrs. Bessie had Ifoch's Drug Store, Mrs. Gracie L., Young of Miss Karen Ann Reddish Bulllngton's gift shop $5 gift had as a weekend guest their' visited Clarence Dobbs at the Sapp of Lawley visit Shirley her Starke, a junior at Bradford daughter of Mr. and Mrs. certificate for Queen Junior grandson, Shane Tyler of Jax. hospital Sunday. Saturday. I' High School. A member of the Lamar Reddish of Starke. Woman's Club Strawberry W.J. Gatlin has moved back '" ' ROTC and track team Miss Brenda Lynn Sapp Charm for all contestants and to Jax .to be with his mother, ... .- Yvonne's special Interests and daughter of Mr.and Mrs. JohnB. Cash Awards to Queen and Mrs. Kenneth: Gatlin. Girl Scout Newsby ' hobbies Include swimming Sapp of Starke. Runners-Up. Mr. .and Mrs. Lamar 1 (Qf1YJl !dJ I gymnastics and singing in Whidden and son of Seffner, Carolyn Eaves her church choir She Is being were Saturday guests of Mr I GRAYE&GIE"BEN sponsored by Carl D. Haile. Strawberry Pageant and Mrs- Drew Sweat. Wow! What a neighborhood Schoening. Lynne Johns. " Funeral Home Rev sand Mrs. Wendell event Bradford and Union Patty Mullins. Irene Wainwright JOHNSON p Pittmart\: Of Thayer, Mo., are County had. From S p,m. to 7 and Cana Schmidt IRON EYES CODY UNA WOOD i Expanded To 20 EntriesThe visiting her parents, Mr. and p.m. approximately 200 scouts assisted in the all day train. \ JACK EUM'PAUL FIX L I ,Mrs. Oscar! Forsyth for a few and their guests representing ing. They were joined at noon wUEXCOROSumwiif ' ,days, r* fourteen troops roasted hot by Cadette Troop 520 who _ Junior Women's Club girls are rewarded In someway Mr.aw)Mrs.Joe Grove (the dogs made samores and helped clear the Quiet Area. l irKa awa/Nw n"'! '" sponsors of the I,Strawberry or another.'ThUia one of '1or", erVofta Manning), along enjoyed, the naturei trails, at learning to put up tents .nd 1", 1 IIYnMM1i-- I/111 W .. ...1,1f ja0 Xlduneni! rJr."A" b-ta1v...,_- our'-easM.imperi nli'projacfti'1,\,\tt roQ .wm5wat'i' ._..CiMrt-Seout, Omp, Pi.Iatt ql/'h' Mrftndying ,,uanwfvatkn, wiUji f . . ' ' ; the D Wildlife Officer 'Jjm 'Sch.,.* ". !'Yt r panded entries this year to 20 and we love doill.n.'To us it is ; .'' 'PtlS >''l.rf '''1 girls to accomodate all the as much fun as !it is for the fiundayk \ They joined together for the girls Interested in parti- girls who are trying for theposition M. Rose Sapp is a. patient flag ceremony lead by Cadette Cadettes spending the night f CB I ci of Strawberry In Alachua General Hospital.She Troop 520 and Patty Mulling, Included Angelina /Hall. I Usually limited to 15 girls Queen," said Mrs. Hyres. was visited by her Junior Troop 60S and Irene Angela Harris Kathy Diggs. battle cry of ' sera Flynn'naMiss publicity chairman Sharon At the conclusion of the final daughter\, Mrs. Elmer Wainwright lead a Scouts OwnIn Tracey Hankerson. Hope The GreatTrucker's hnu Hyres said when the club judging the ballots are Wallace'and son, John Green the Quiet Area. The emphasis Jackson Sadie McDuffy, Wart! Sapp Sunday afternoon. Girl Scout Week .the Bass Erma Hutnm. winds up with more entries collected from the judges who was Lorain \ Patricide' Gainey. Prayers find a speedy recovery Promise and the Law. During Carmen Eaves. leaders Mrs. of Mrs. Ernestine rather than tell a girl she can- are not to discuss the,voting 'daughter are wished for Mrs. the ceremony Happy Birthdayto Gwen Gray, Mrs. Carolyn not be.accepted,,the limit Is among themselves. The of Starke senior at a /ttlainey extended. ballots are given to a Rose. Girl Scouts was sung by Eaves. Mitchell Gray and Bradford High School. Her "We would like to think that tabulator for the final results. Miss Jan Norman left everyone. "Denver" Cadettes Dawn 'is mbition' is to become ai.fMrofessiOnal Sunday to return to her Schoening and Patricia Montgomery . there are no hard feelings The rules and regulations are l artist. Pat'spftobbies among the girls for this the same as the Miss America classes at .Florida Southern High Girl Scout Cookie spent the day Friday. ; and special interests College In Lakeland.Mr sellers were announced and Saturday the Cadettes cleanedup practice, but it is our Pageant and the results are as l>;.t nclude drawing running. Yvonne Link and Mrs. Jack Cason of their Outdoor Judgment and we will not fair as is humanly possible,. ; First Place went to Lynne the area as |J-bfcoftball>/meniberof) and dancing.track team She and is a Miss Cheri I Lynne Starling, change It.ald Mrs Hyres. said Mrs. Hyres. Ormond 'Beach were visiting Johns who sold 523. Second Challenge. A really great start : relatives''over the weekend. place to Patty Mullins who for Girl Scout Week. of her choir. Pat isi, daughter of Mr.and Mrs Paul Mrs Hyres explained one secretary K.: Starling of Starke. is a club member Is responsiblefor Mrs. Ruby Yarborough and sold 357 boxes and third placeto I ored FloridateBank ' being 'lIpon by sophomore at Bradford High choosing the Judges SchooLiaviaoryMeetings; Robert Faulkner were visiting Irene Wainwright who sold Sunday saw many of the at Starke. in Jax.; Wednesday.Mrs. Wainwright Scouts in the church of their II/ CHUCK NORRIS School. Cheri's hobbies and persons in the city and county 355 boxes and Joyce L.T 4 l>bikr ft*MOVICLAaIMrillNAIKmAk interests include water skiing chooaen at random who haveno Set For Mary Lou Yarboroughand who sold 355 boxes. choice. Senior Scouts AN I INCIN, N/LINSI skating horseback 'riding, personal interest In thecontest granddaughter, Erin Congratulations and thanks expressed their feelings and setting and reading. She at all. March 21 23 visited with Mr. and Mrs. girls. The climax of the their thanks from the pulpit Sun Mon recently took\ first place, in The club member choosingthe Robert Faulkner and Erin's evening was campfire singing and did a great job. Patty "Soul of Bruce lee" water skiing competition at judges Is the only one who Bradford County School Advisory great grandmother, Mrs. lead by Cana Schmidt and Mullins and Cana Schmidt Doctor's Inlet Cheri Is being knows who the judges are up committee meetings Ruby Yarborough Saturday. Betsv Yawn. were at First United Methodist PLUS sponsored by Barbara until the day of the pageant for all elementary schools will Mr. and Mrs. Keith Griffis Church. Irene Wainwright Norman's Beauty Shop. and Is not.liberty to tell any Tuesday, March 21, middle and family of Macclenny were Junior Troop 605 spent the at St. Marks Episcopal Truck Stop WomenRated one who the judges are, said school and high school recent dinner guests of his I day Friday at Neyatl workingon Church and Catherine Mrs. Hyres. meetings ,will be Thursday, parents,'Mr.. and Mrs. MallieGrlffls. badges and clearing the Schoening at St. Edwards : R ' "It takes a great deal of March 23. at 7. p.m. area. Senior Scouts Catherine Catholic Church. time and effort on the part of , the Jr's to make sure the 07 pageant runs smoothly and Topics for discussion will Include d THRILLS CHILLS AND SPILLS everyone is happy and basic skills and assessment 3'(' r a 1 I' , satisfied. That is a hard thing test, strategies for 1'. school It's Excitement As Only Stock Car Racing to achieve when you have 13 or Improvements, pupil more girls to make happy. We programs.progression and remediation KITCHEN I e Can Bring..,TOP DIVERS AND CARS BATTLE IT do out best to see that all the CABINETS OUT EVERY SATURDAY NIGHT AT: .pat'Calnev COLUMBIA COUNTY SPEEDWAYOver "* PUBLIC NOTICE PIIBLlC' 'NOTICE Miss Cynthia Lee Griffith ' daughter Donald L.Gritfilh.of Mr.. a and junior Mrs.at The Mayor 'and Commission' of the City of Starke. Florida. BATHROOM 4 4000.00 In Prize Money. Is Bradford High School. Cindy propose to HI* an application to the U.S. Department ef Homing 1 Up For Grabs. was the JROTC Queen in 1977 and Urban Development for a Community Development Black VANITIES .. I aUld! received honors for her Grant tor 'Y 1"'. It's A Thrill A Minute Sport In Two Great ''ir 0rk tin, track and cross I 1 n I :country/ She recieved a first (')lnl Starling Community Development Block Grant funds are Intended toiimer ''O Racing Divisions: Gates Open At 4 ::00 place In the Bradford High benefit low and moderate Income person or, serve toprevent i .ikhool K urNomiaated or eliminate I Science slums and blight ' \ ,lop the.Americ vttMighSehooi.AthleteClydt Miss Gwen Zack Time Trials At 6:30: First .Race Goes At andMrs. of Mr. Come Sea Us : Isbeing I,granddaughter. L.S. Tanner of Lawtey, a' Pursuant. to the regulations. of MUD public .hearings will be held 7:30: At One Of The South's Best Racing Piggly n the Commission Chambers by at sponsored! freshman at Santa Fe City Hail at 7iM p.m.,on Marc For> our Cabinet Needs Giggly Food Store in Starke. J. Ittt, and March 29.' 171, to receive public comment and bet Iflien participation In Me development of the. application Facilities. .. "'. Federal assistant.I 'VAUGHN-JOHNSON CO. . ;:I : \ I Merrill Edwards ,COUNTY SPEEDWAY COLUMBIA II . 14O S. Thompson St. Corner Of SR. 100 CITY CLERK . "'Vtlldvy coloring In the lift eye of the famous painting ' nl ;"Mom Ll,." ha .I.d l experts .to suggest she may hv j 804-5711 Open Sat. 9-3 Starke, Fla. Highway 41.'441 At i-76 In Elllsville _"juffy.d from Molt,cholesterol. B 1 M. J I 'i11] t IIU 1 ll1.i3 : 13: IlellrOQ ; ' Concrete Block Living Room Dinijng Room Den On Your Lot \ l' ;-v-;.; y ." ..V.OY" t25Ctr; : fiwdlQte; piii iaVQSii ftfc &- i Behind Kentucky Fried Chicken Or On WilsonRoad At 23OA ' IkfVOMllfifel HOMES *nS I, a , J . . ,. :. ::;.o;:'", ':: : o':<:= """ <;.. ;; ",, .... =>-- ,,,,,,," .-- Tr" ; p"i (.0 r' -1 Page 14 TE: : '>U. March 11.1878 :J:1II"! : _ ,.!..!....., ___ __ ............................ 'a..a..a.a.. LEGALS k ,'II -- I Obituaries I'.,. .', .. I Willis IylWillis Pine Level Baptist Church FunPl'alllome of Lake Butler NOTICE OF INTENTION old day on the premiss of the) IN THE CIRCUIT COURT FOR Dyal 82 of Route 1. officiating. Burial followed In with Rev. Raymond Baer andRev. TO REGISTERS: '. Bradford County Jail Yard I will BRADFORD COUNTY, IN THE CIRCUIT COURT: FOB Box 25. Starke died Crosby Lake Cemetery.Irene Bill Delaney officiating. FICTITIOUS NAME offer for sell and ... ''to the FLORIDA PROBATE DIVISION BRADFORD COUNTY. March 13, In North FloridaRegional Burial followed in ML Zion Pureu Statutes\ .>>, highest bWdaf for cash In hand CASE NO. 77-339-CP: FLORIDA. ACTION jf Hospital following Cemetery under the direction Florida I Ie the above doacrlbad property of FILE NO. 1-2681 an extended Illness. Mattox Pence of Archer Funeral Home of* hereby given that HARRY W. Mid defendant\ satisfy the IN REl Estate of THEODORE S. CASE NO 70-40 COMPANY . The son of the lato Georgeand Mrs Irene Mattox Pearce Lake Butler. KYlE and MARY ANN KYLE aforesaid E cutlon. FRANK. JR.. Deceased. REGISTER I OIL WILLIAM Ava Starling Mr Dyal 75. of 355 N.W. 2nd Ave., Lake Rout 3, Box 94 Stark;Florida Dolph E. Reddish, Sheriff INC.ERNEST, Plaintiff WILSON, v*and. FAYC L . was born in Alachua County Butler, died Saturday March J.B.While 32091, doing t business under the Bradford CountY. Rortda NOTICE Daaandsnt. . WILSON his wife, * and moved to Bradford I P.:. in the Baptist Memorial J.B. White, age 70. died firm nam of "DOUBLE RUN 3/2 *chg 3/23 CREDITORSTO NOTICE SALE [ ,NSURANCE1' County at an early age lie In Jux., after an extended Friday March 10, at his homeIn FARM," at the above sddrass ki' NotIce I II hereby given that : . owned and operated his farm Illness. Cocoa. Bradford County Florida, NOTICE Of ADOPTION OF ALL PERSONS HAVING .. f'IIreuarC0'\ ".) Final! Judgmententered until his retirement.. lie was a Born in Bradford County A native of Boone Count, Intends to register said fictitious\ RESOLUTION OF THE CITY CLAIMS OR DEMANDS In the abeva-etyted MAINCf IN8VBANCB . member of Pine Level Baptist Mrs. Pearce lived most of her Missouri Mr. White n name under the provisions of the COMMISSIONERS Of THE AGAINST THE ABOVE case, in the Circuit Court for ACENCVi 1M t.Lake Ace, ,,: Ii., Church. Lake Starke for until aforesaid Statute, ESTATE: Lake Butter. 4M7S.. " life In the Butler Com many years CITY OF STARKE, FLORIDA munity She was a member of moving to Cocoa two years HARRY W KYLE end MARY CLOSING AND ABANDONING Within three ((3)) month from aril Bradford. the County Ftorfda.stated I thai hi Ca: ala include three He was a retired farmer, ANN KYLE are joint owners the time of the first publication property Survivors ; the First Christian Church of ago. PORTIONS OF MAGGIE Bradford County FIotIda.deatcJIIed Ever >... .. laemMel . daughter. Mrs. ICula Mae Lake Butler /and a member of the Starke DATED this Tenth fay ofMarch. STREET MINNIE STREET AND of this Notice you are required ate: {...]dial. eevaram a- L i Smith. Mrs Etta Foe Thorn She is survived by her husband First Christian Church. He A.D. 1978 at Stark, MARTHA STREET AS UES to file, with the Clerk of the The Eat 60 feet of Lot 4,'of -C' JOE USHER ,. ton of Starke Mrs. Betty Richard Pearce of Lake was born December 23, 1907. Florida. BETWEEN BLOCKS 39, BLOCK Circuit: Court of Bradford Block 4, fronting 100 feet on AGENCY 4M-M2S ar 4WiNMJBANCEi .: Morecraftof Dwight, Illinois: Butler; one daughter, Mrs. Survivors Include: two 3/18 4tchg 4/6 .. 48 AND BLOCK 48 OF JOHNS County Florid, Probate State Street and..150 feet on Lake III' two brothers Truby Dyal ol sons, Bobby C. White of DIvIsion,the addressof which l I* I Louise Driguers of Jax: her ADDITION TO THE TOWN OF Avenue in the Town of Lawtey, BUard I.. .. Tampa and Clyde Dyal of son- -law. J.E. UriRgcrs of Cocoa, Sherman Lynn White IN THE CIRCUIT COURT Of* STARKE. AS PER PLAT Poet" Office Drawer "B," Starke, Plat of Town of Lawtey ........ A(.acjr> Faraiera ' I I'lant City; one sister Mrs. Jax one grandson, Richard of f Midtlleburg; one sister, THE EIGHTH JUDICIAL CIR THEREOF RECORDED IN DEED Florida 32001, a written statement per recorded In Deed Book "C," sad Deere Beak ....,.., ry: Lila Reynolds of Tampa, nine DriKKWS of J.u. ; one brother Mrs. Opal Long of Fayette, CUlT IN AND FOR BRADFORD BOOK U PAGE 829. AND of any claim or demand Peg* 3, public records of Bradford **- '/...1101. Lake Butler grandchildren und 10 treatIrandchJldrl'n Elmo: Matlox of Jax' : two Missouri; four grandchildrenand COUNTY FLORIDA. BOUNDED ON THE WEST BY you may have aoainat the Estate County. Florida l Inl_tl/ahf :. four great-grandchildren. CASE NO. 78.96.KATHERINE CHERRY STREET AND ON THE of THEODORE S. FRANK. JR., at the pottle: sale. \to the highest r Funeral services were held sisters! Mrs. Lydia (Hicks and Funeral services were held EDLING, PlaIntiff EAST BY CHURCH STREET. DecNMd. bidder for cash,at the front doer Wednesday March 15. at the Mrs. Htwinda: Bobbins both ofJa Monday in the DeWItt C. -1/1I- ALL LYING AND BEING IN Each damn must be In writingand of th* Bradford! County Courthouse MISCELLANEOUS : x. Jones Funeral Home Chapel ALBERT eDUNG and ANNL SECTION 33, TOWNSHIP 6 must Indicate the basis for In S._. Florid, Chapel of Archer Tanner Funeral services were held with James C. Love EDUNG. his wifa, if allva, and SOUTH. RANGE 22 EAST. the claim, the name and addreea between 11 a.m. and 2 on officiating. Burial was in If dead then his her' unknown of the aeditcrifi or p.m. LAtERyICEMENI:) <<; We 'Y funeral Home with Key. Tuesday. March 13, at 1\0,::\ or BRADFORD COUNTY, FLOR- agent the 21st day of March.: 1078. Roman Alvarez pastor of pm. In the Chapel of Archer Crosby Lake Cemetery heirs 4 devises, legatees, or DA, AND DISCLAIMING ANY attorney, -dIBH'e amount GILBERT S BROWN; A* dark Save a ..Itar, patHIa far grarrteee; end all other parsons RIGHT OF THE CITY AND THE claimed. If the claim 4a not yet of Said Court: ya* I* tM Any. NatlaaalCaard. ,. Jilpant'se'"' !I.ou' Story Sliiokari I'UHH' To He Shown or under parties or against claiming them by, through and all, PUBLIC IN AND TO THE due become the due date ehal when'be stated.It will If By: Marian McRea, Deputy v........Ya exvariaM. akaadjr... have reek. .: LANDS LYING WITHIN THE I dark ... .... .....tH. Vac tt faffestra parties or person having or CONFINES THEREOF. the claim I la contingent or un- 3116NOTICE aaaa. ether ....'M. " \Iure'h: 111 At HUCMM| ", ,,, llwy Baptist", claiming any right, title or Interest liquidated the nature of the Itchq sat avswrtaaltr far ..- in end to the premises TO WHOM IT MAY CONCERN: uncertainty shill be Mated. If the Of RECEIPT OF ..._.... Yea ray b* 0.1 "hhiokarj Pass" a new film ulmlinK/ love of a young couple Di'Bart Quarles Jr., pastorof involved\ In this suit Defendants. claim I la secured security: thai APPLICATION FOR PERMIT TO evarlaakkif. a vary peed l desIr .. from the producers of "The at the turn of (ho century Bayless Highway Baptist NOTICE OF SUIT Notice la hereby given that on badeadrfoad. The claimant that CONSTRUCT / EXPAND AIR ,.....11. Call T12-OC21 Hiding& Place," will be shown Church extends an Invitation TO QUIET TITLEIN March 7, 1978 in accordance deliver sufficient copies of the POLLUTION SOURCE ..... C.x..IL'-I.s: one! . at lUiylotts Highway Baptist Credited with creating a to each member of the comm THE NAME OF THE STATEOF with Section 166041 Florida claim to the Clerk to enable the PERSONAL A.,... 'hurch Saturday !March 1H deeper understanding of the unity especially teen-agers. FLORIDA: Statutea, the CIty perk to mail one copy \to each TO WHOM IT MAY CONCERN: : ..*!.*; ..y IsferautlM u ....., drawlaH e, *<..1) r.- the To the Defendants: personal representative Th Florid Department of . at 8 p.m. Christian faith among to attend thillspt.ocial showing. Commissioners of the CIty ofStark. ardia- U. OU Grtat Mill . A true story "Shiokarl Japanese people the film tellsof There will be no admission ALBERT G. DUNG and ANN ., Bradford County ALL CLAIMS AND Environmental Regulation\ ties" .sad .",.11 ..>. ...... .. j I'uss" Is based on the the love of Nuhuo for charge for the film proeram.Udylens L. EDUNG, his wife. If alive,or H Florida adapted a resolution DEMANDS NOT SO FILED received an application from GaUbead Breach.. stale international best seller! hy l-'upko" und of his willingnessto dead to Na or her unknown closing vacating and abandoning WILL BE FOREVER BARRED. National Protein, Inc. for a per Park, please eeaUet Capt. t Ayoka Miura. Nearly Iwo lie guided by his personal Highway! Baptist heirs 4 devisees, legatees or the portions of Maggie DATED this 24th day of mit to construct / A7MM Freak J. Akaa. at 4734701r . million readers have been faith no matter how great the Church Is located on SH-225 grantees, and all other parsons Street, Minnie Street and February 1977. BTU/HR Oil Heater to be ud mmim .Hk. el GoldlMadbtwe . touched by this story of the cost of the commitment two miles off SK-100.) or parties claiming by, through Martha Street, hereinafter descnbad. /./ Betty Webb, as PersonalRepresentative which I is a source in conjunctionwith 8.&. Aaf aialataae. * under or against them; .lying and being In Johna of the Estate of the Type of Project cooking: 1/14 will .k* appreciated... licks I And to: < Addition to the Town of Starke THEODORE S. FRANK, JR. process of air pollution at S.R. . (:'lirixtiiiii (:'liurrli! Drive ' First"' Responder'' .to Carpet. All parties or persons having or aa per plat thereof recorded In Deceased 221. Hampton Bradford -A TASTE FOR AD- ; The congregation! of the A total of $232 has been claiming any right title or Interest Deed Book L, at page 629 In RICHARD E. WELTY. 114 N. County Florida.UTME 731 J78. VENTURE Y.. will fled. Isis . First Christian Church of raised by the congregation topurchiiNO The Ladies Council In and to the following delI Section 33 Township 6 South, Walnut Street, Post Office: Box N3294864. the Navy Travel' 5..a- responded to the challenge by ,ibed property, situated in Range 22 East Bradford 996, Starke Florida 32091, Trite application has been submitted Utrnf ....*.. Wet *. apace. Slarke has been challenged by ; new for the church carpet voting( to donate a portion of Bradford County Florida:' County Florida and described aa Attorney for Personal Repre by Ronald H. Setter aa ....1./ ....&. Get tep parsonage Approximately I. Lots 44 and 46 Cypress Avenue, lying within the confine of the sentative.31S2tchg. President pursuant to Chapter caallta, career. t..1... Steve to $170 is still needed to Deacon ! CRYSTAL LAKE 3/23 17-2 Florid AdmInistrative ... a(raat ( '.r.. F.r von HOMESITES / , carpe I und l the proceeds Irom its Spring following to-wdC: complete its < cover the/ cost of carpet und property ..,_.tI.., ceitact ChlalIlir. Bazaar March 18. according: to plat thereof recorded "" Code regarding the control of rawing drive by April ::10. installation! .. .TX42S9.Or I.* .* atBradford in Flat Book 3, page 6. Portions of Maggie Street, emission which may effect the 8*..... M.....' 10 Bradford County public records. Minnie Street and Martha Street IN THE CIRCUIT COURTOF maintenance of National. Air ate. le I p...| Tharxiiy 1 You and each of you are notIfied aa 1 llea between Block 39 Block THE Quality Standard PA. .. S ....1/12 ITtckc" I I SOIJTIISIUE: ILK.MISTAHY; : : NEWS that a suit to quiet title to 46 and Block 48 of Johns Addition EIGHTH JUDICIAL CIRCUIT The Department hereby give '4/Z8 ' of Its intent \to .leaue, said the above-described: propertyhas to the Town of Starke, as IN AND FOR notice 'FREE PUPPIES Livable. been filed against you and per plat thereof recorded InDeed BRADFORD permits. CopIes of the aforementioned ....1....&, callJc-diepberd )Parents' Advisory Meetings evaluation and recommendations ordiniiting( the spelling bee at you are required to serve a copyof Book L, Page 629 and COUNTY, application and the .bad pap. 10 ",..It. ant. . \ All elementary schools regarding( the school Southxide is Mrs. Sandra your answer to the complainton / bounded on the West by Cherry FLORIDAIN technical analysis performed by ..ra.: Halea ........, discipline code !Duncan fifth teacher Plaintiff's staff avail ....._. Pbea* 468-1772. in the county. during grade the attorney, Street and on the East by RE: The Marriage of the Departments are t/ the months of March. April :Mav Hi the topic will be pronouncer will be Mrs. MYRON C. PREVATT 'JR., Church Street t. al lying and able for public Inspection at the llpd 3/lt . and May will meet the third budget review for 1477-78 and liurncy Winkler, media P.O. Drawer 798, Keystone being In Section 33 Township 6 SARAH EUZABETH RYAN, following locations( ): PABBlSHFAMILYiLaaklac ( Tuesday evening of the month recommendations for the IU7H7 specialist; judges will be Height, Florida, and We the original South, Range 22 East, Bradford WifePetitioner, Florida Department of Environment far family al Joke lit 7 to 8 p.m. to discuss !) budget also the (Comprehensive spokesman< Mrs. Marjorie In the office of the dark of County Florida, and Regulation. 3426 BJU Mary Psrrlia. ......... 1878.CUbtrce . various topics of interest concerning Tests! of Italic Skills Murphy paraprofessional; the Circuit Court on or before JOHN CANNON RYAN Road Jacksonville, FL 32207, or ... Eaatka, Laa.al. the schools. i ( t'HSI i test results will he Dewey McKinney principal April 15, 1978; otherwise a and renouncing and disclaiming City of Jacksonville. Bio- Low..Gr..ther. Martba The purpose of thosemeet (discussed! II they lire available and one judge to be decided. default will be taken against you. right of the City of Starke HusbandRespondent.CASE Environmental Service, 615 W. A.. CI..... Shirley, .bar ' .,. ,it' the time' of this meeting who wishes be any Jacksonville FL I n0.Tho.. C..,G.. DarlaBrvwa fie !hi' "" Any parent to This notice shall published 6th Street, , i"I'its is" to. ( and the public In and to the 'land NO. 77-624 15 . iiiuniui, March : B* $, Lake M.Fle. ". .1, d ante to ask! cueslion| ', anil .1' curds" went home. attend this school program is once a week for four consecutive lying within the confine of the 32206. 32740. ant Irc.... '393tiOUU 13. report) cordially Invited to do so. weeks In the make suggestions concerning Bradford aforedmcribed land ftC' NOTICE OF SUIT ' uchool programs In other Teachers welcome the opportunity In Mrs. Beaulah bennon's Dated Telegaph"1 .uWi..Ji. ."' DATmthl.7thqy, pfMerch. Persona wishing to comment'on aN. .a4. .. Jai: words the aim Is fo Inform / to talk W4tf- parents kindergarten!' room the chi)-< Marah, A.D.178).* J"TDiv'i'vCITY .FOR DISSOLUTION'OF any aspect: of awaciton' : I 1 rWA tEOn..d'1 ', n,. miii include (the public in (lie nbuiif their students work. iren have enjoyed learningthe '1978. required to submit their educational decision making (Call the school/ office if you various events taking GILBERT S. BROWN COMMISSIONOF MARRIAGE, LUMP comment In writing to th* wish I! to make un appointmentwith place during the month of CLERK OF THE, CIRCUIT-r; THE CITY OF SUM ALIMONYBY address above within thirty ((30)) PRICES PAID for process AWARD child's teacher.Sou'llisick's . All parents are JIVilerlInri your February. They have made COURT STARKE days of publication of this notice seed aiabUe .be..s U ..rt- FLORIDABy OF REAL PROPERTY encouraged to intend Your school spelling valentines and heard stories Bradford County Florida. WITH or before April 14 1978. (.*. la 3/4'' paid .r nor... !lugll'Shlll1llund questions are l bee will be held in the cafe- viewed filmstrips and cut out By: S/Marian McRae Deputy : /a/ Merrill Edwards INTEREST The Stat of Florid, OLIN'S MOBILE HOME ( tl'nalarch! 21 .it !9 am Participants of to observe AND OTHER REUEF valued symbols our country Clerk Clerk of said Board Department) of Envkyriineiit! SALES. M4-MM. Opec 7 Al Soulhsulc Elementary: in this IIchooldlolrnpion..hlp the birthdays of Lincoln 3/16 4tchg 4/6 Regulation daya .....,. U/chj.. _ will he the top and Washington. The children ....... TO: JOHN CANNON RYAN 3/16 CASH FOR GOLD -- the following schedule for Itchg Sterleg.w.lry , these meetings is listed here three speller from each of the have enjoyed! also their uniton NOTICEIs Itchg 318u".. Whose Last Known Address ,, dla' .od.. celaa, : scheduled for four Iii th grade rooms 112 color in which they learned Is: c/o Wayne Frier Trailer Perk IN THE CIRCUIT COURT FOR daatal ..W.' WUI vblt y.. Meetings. are students The fifth grade colorsin INVITATION BIDDERS Box 1132 Live Oak Florida. .. ... .. 1 April IV ,mil,, ) color words recognized hereby given that applicationwas BRADFORD COUNTY, .r. Ph. Mr. I:... ,i"s *. ''II /.iuuct< preliminary their various shades and made the tat of 8It&at... 475-1089. 3/9 in to the !school. cafeteria Irvin I spelling bees in their brought to their classrooms March, 1978 on by the Western day NOTICE TO BIDDERS: YOU ARE NOTIFIED that a FLORIDA.CIVIL ACTIONCASE &II.... Kpm.March classrooms to determine their toys pictures material doll Petition for Dissolution of NO.78-38 21 the topics for discussion three' participants In the dresses, and leaves to show Union Telegraph Company to NOTICE, la hereby, given that Marriage! and Lump Sum Ali WANTED M.. aadWeaiaa. skills the Federal Communications WAYNE E. MASSEY and Mill he basic school contest The winner different. colors. The class has sealed Bid Proposals will be received mony by Award of Reel Property sags 18-Si. II yen. assessment test results Commission to discontinue the of Stake ABBIE E. MASSEY his wife W..... af lutara ' and runner- in the school been doing simple addition by the CIty Interest and other .relief. has been we year , strategies for skills! improvement up after-hour physical: delivery ser Plaintiffs.EDWARD, atari taday. .by ,.1.1.* tbeFlarUa P.M. until 7:30: DST April 18. tiled contest will participate in the and one group is reading in the again you and you are required . and vice the of NatlaaaJ pupil progression to community Starke. VB Army Brad I I spelling bee second book. 1978 at the pry Hell Starka to serve a copy of your or( County kindergarten Guard. Irltad- remediation April Florida during the hours 12Noonto F. BROOKER, JR. Eajay sew programs Thursday I Out lOa m in Mrs. Charlene EnnisMrs.. Florida, for the complete constriction written defense, if any to the . .. April , IH the main topic will lx 6PM Saturday and PENELOPE J. BROOKE!, Jolt tralalaf, good pay, he I school'; board room Co- Martha Slefferman's third If the Is granted of: i.Petitioner or the Petitioner' attorney. his wifa. Defendants. ..._....... Ilia .....n.e. grade room green application WAYNE M. CARROLl ... .aravtead ,.Ur......'. substitute service will be available NOTICE OF SALE is doing a play entitle Starke CIty Hall 40 East Main Street Lake Far Uw beat part-tba. Jab I i.Aaerlae I. group"The Pot of Gold" Thursday by telephone through the Stake, Floridaat 3uttec, Florida 32064, on or Notice to hereby given that .caatact Mr.C....., Western Union Telegraph office pursuant to the Final! Judgment H.... , of words. ar 8ft. ,, 964-5320 b - of work is worth many pounds before March 23 1978 and file An ounce !March I IB in the morning. The Florida entered In the above-cantoned ...... ... ... St Francis De Sales and first at Jacksonville. and which: time bids will be publicly the original with the Clerk of this S s to 4:30 . kindergarten grade Florida. hi the Circuit Court of _ Miami cause Equal epp.rt..flywpl.y.r. and read aloud. Bids rooms are invited to view the opened Court either before service on j/2 anI Bradford County Florida, I will Subs received after the above time play in the cafeteria.Congratulations Petitioner' attorney or Immediately - sell the situated in will be considered. property and date not to four students thereafter; otherwise a baa' this application Bradford County Florid,. WANTEDi Mabfla in Mrs. Elaine Wood's may communicate default will be entered against axlae ... tlr... Wll pick up. In writing with the described aa: PLANS SPECIFICATIONS. for .relief. demanded OLiN'S MOBILE in the HOME fifth grade room: Thresa you Federal Communications Commission Lots 6 and 6 of Block 12 In the AND CONTRACT DOCUMENTS - Micole Petition. SALES. 904-S006. 0,.. 7 Sullivan ferry and Daren Scott, Whitehead Rusty- Washington, D.C.: may be obtained from DATED this 21st day of CIty of Lawtey Florida, a* days a weak, tf/efcg i 20664 on or before April 5, the office: of Don R. Morgen, February 1978. mapped and platted upon the for going Into a fifth 1978. record of Bradford Office Drawer public Architect, Poet grade math book and also for 1203: Keystone Heights, Florida GILBERT S. BROWN County Florida FOR: SALEALUMINUM , 0 0 successfully learning long division. 3/16 2tchg 3/23 32666, ONLY.CONTRACTORS. Clerk of Circuit Court at public sale! to the highest bidder for cash,at the front door SHEETS In Miss Claudette Peterson's NOTICE OFSHERIFF'S of the Bradford County Courthouse - WIll : upon receipt Miss JoAnn SALE By Marian : McRae - Tyson'sfourth of One Hundred Dollar 'in Stark. Florida. 141118" s U- ..00'" grade room the DEPUTY CLERK . between 11 *.m anal 2 p.m. on Dar i1. (U100.00I) payable \to students know the is that I following Notice hereby given I. Architect be forwarded 'the 21st day of March: 1978.GILBERT .Me Each : Morgan multiplication facts 0-6, Andy DcJph E. Reddish as sheriff of 2/23 4tchg: 3/16 ... of and cIfI-- S. ."OWN, A* deck two sea plane ap ..... Jones and Judith Petteway.The Bradford County, Florida underand ...,j cati nor collect. Fifty Dollars of Said Court TBESEARE OFFSET -- I children who know the by virtue of Writ of, 1 multiplication facts 0-4 are Execution, to -wit: ((450.001) will be refunded provided By: Marian. McRae Deputy PRINTING PLATES. dark. I Eric Crawford Greg Paige Execution issued out of Circuit the are returned plane and In "good"epecrflcatlona IN THE CIRCUIT COURT lt dip 3/16 '!...,.... A....&. Stefan Wheeler Brian Lane Court of Duval County Florida EIGHTH JUDICIAL CIRCUIT OF condition within ten day of bid L' Chris Thomas Clevie Myrick pursuant to a Final Judgement opening. FLORIDA IN AND FOR BRAD- IN THE CIRCUIT COURT Bradford. Printers David Martin Donald of America Inc. and Crednhrrft FORD COUNTY. EIGHTH JUDICIAL CIRCUIT Of 9444303OLINS llutchinson. Leon Hampton D. Green and against Roger SUBCONTRACTOR, upon CIVIL ACTION FLORIDA IN AND FOR , ....... Patti Browder Wendell Betty M Green defendants, in,. OILUae CENTRAL Ex CINTSAIAIR receipt of Fifty Dotes ((450.00I) CASE NO. 7881In BRADFORD COUNTY. Shanks and Ada Griffis.In . CONOITIONINO' Alt CONOITIONINO. _. the amount of t2.694.13 together CIVIL ACTION I Ou ,tv coohflo .! r. nonaDIv .0.' Aw..lflblo, ,in cap.citi'.. 'IronO Mrs. Dorothy Leach's with costs of collection. made payable to Don R. Re The Marriage of Gertie E. DISCOUNT , AvoKOK, ,n c.p MOM STUN M00.ll TUJ4A the winner of the six-weeks on* set of plan and specification Murphy wife. 'In re: The matter of the adopt* HWY. 100 WEST i.f award for making the most *, ron+ Have seized and have In vsJ.B. my Murphy, husband. PARKER a/k/a/ Anthony Gerald ' and pick up progress.Mrs. Laurie Mullins' possession the following described EACH BID:: Shall b. eccom- Brown. Op*.7 dara a wach. : personal property to- NOTICE OF SUIT FURNITURECse1 kindergarten has been panied by a caahI r'. check or NOTICE OF SUIT wit: NO PROPERTYTO Chair. S.Ui139JS !. !studying the symbols of our 4 small tables 1 lamp 3 heir bid bond In the amount of 6 NO PROPERTYTo $ a $50 or II., Y democracy during the month dryers, 1 complete shampoo' percent of the bid pric., payable about:, J.B.unknown.MURPHY/ Where"- \Whom It may concern. Baata* Reck.es'627,9. $ YOU ARE HEREBY NOTIFIED of February. To bring the to the Owner. Leaps fraaa 110.DtaI. . station, 1 small desk, 1 coca cola YOU ARE HEREBY NOTIFIEDthat that an action for Adoption her .... Bat story closer to the children. I139.1S $100 cash Mrs. Mullins dressed In her machine, 1 Hotpoint Air THE SUCCESSFUL BIDDER: an action for Dissolution of been fled against you and you Madlal. Cab: .s.te a.. 2 Class Snack Conditioner. . centennial costume and as Cookie) Ja,.. Wta be required to provide a Marriage ,.. been fled against are ,required to serve a copy ef AB plmmbbif. sat alaatrical. Mary Washington mother of ( .Performance Labor and Material 'you. J.B. Murphy and you are your written defense (If any \to es-lee i refund. George Washington she told > payment' Bond h the amount of required to serve a copy of your It, on the pisintiH attorney' riNISHEOAUNriNISHED , As the of the above property written defense If to It. I on addtees them stories of George asI 100 percent of the bid amount. any whoa name and. * I Enjoy cool comfort all sumyou add-on or modernize named defendant and that on Surety Company ahal be Iceneed th* pWntlff attorney who** James R. Flynn/Plerc'! *) and UTILITY , boy. mer long with: one of these your present warm air heat Monday, the 27th day of March to do business In die name and address Ie I J.J. Hardy P.A.., P.O. Drawar.1030 BUILDINGS I General Electric wholehouse ing system between February SCHOOL MENU 1978 at twelve o'clock Noon on Kate of Florida and shell be Wdbert, Jr., P.O. Box 10 8, Stales FL 32081. and fie the ....... Start at 1SU. ''air conditioning systems. 1 and April 28. 1978 March 20-24 Vo" toted by the United State Tree- Starts, Florida 32091 and file original with the dark of the Delivery. Foe wkh. ..aieaaaty. We'll help you choose the (with installation by April MONDAY Beef and II wry Department. tha original with the clerk of th* above styled court on or before' . model that's right for your 28, 1978 Get $!,o with the : candied rice PROPOSALS: May!not be withdrawn above styled court on or before March 30. 1978;' otherwise a FINANCING house: Deluxe model $100 with the turnip greens milk.yams, ... for thirty, day after bid March 30th. 1978; otherwiae a Judgement may' be entered. AVAILABLE Buy now. and get a cash high-efficiency Executive pears, cheese Fish toast and .J9J"'D date. Judgement 'may be entered gainst you for the relief' demanded NEW 4 USED STOVES fund direct from GE, when model. TUESDAY: grits against you for the retefdemrdd (In the complaint> or AND REFRIGERATORS cabbage slaw, applesauce ' Call today for a home survey B stlmaU. FREE! cornbread milk.WEDNESDAYt. J \ ALL: BIDDERS: Wit be notified.of In the complaint or WITNESS the award of contract to the petition. my hsnsl and the AIR CONDITIONING Lasagna. ..'t.- successful: bidder or the rejection WITNESS my hand the seat of '.sal. of MId Court on February GORDON beans tossed salad green , of all, bid, within fa/a/ day said Court on Feb. 27 1978. 27.. 1t78. Jr s peaches hot roll., milk. decision Gilbert S. Brown GIlbert S. Brown.A* Clerk ofaid. m E" = i I Owner & HEATING THURSDAY: Hot dog on The place with the world's of the As Clerk of said Court Court.. bun. french fries, corn, H highest recorded temperature By: MoR A* Deputy Marion McRae. A* Deputy '' BIDDERS , TO By Hwy 100 Between Starke & Keystone orange Easter cake milk. Is Al'Asixlys.! Libya which END Of NOTICE clac kMnlon dark. ,On May 16. 1866 a fire cent .win Iirrt appeared 'In l FRIDAY: Teachers' planning on !Sept; 13. 1922. was, Amari- i2Jna 4/6778 3/2 4tcrtg: 3/23 3/2 3/23 473-4777 day. 136.4 P In the shade. 3cha : / : 4tchg ca. 'It WM known at a "nickel. -- -- as -r 1:1 r : :- :: .. :- 'b\ l ... "" '" : : : March.:I*, an: :' TELEGRAPH :: Page isi I: 1 .. .. ..,, . .. .. ". ,., ,: : :: "I'1.' : : : : ; ,. ; :, : ,: : .::: ::1' ; ;: : .: : : : : ," :,',: ,: _, \.: :; ; ' ------ - ' --- hH! ,!: : ,, .! ,. 'r ""t"XA. 1 .. "' ;.' I' ",' '" !, ; i'.v'Q91J"JI. : ) -tJt : ..1 'J'M.h" : :; "i r i fe ) ''..(/, >* _J ' 7 ! 4 yll . o. ' for " results. f.i.: : ...... .64167)\ :? 'A'e' a r +1Nw7r ,. .. ' __ _L'I --- -....-_- -"-- y. _ __. .. .. .. .. , c "_ .-.. .. .. .. ,". _" q "_ .'... .- ." c' .." .. '.. I t fOR lINT ) [a FOUALE ] [ foR SaIE NEIP WANTED AUTOfItaBILES USED PERSONALS HOMES FOR SALE I ..... ,,. r pa< .. - BRADFORD VILLAGE 1 CETA POSITION FOB SALE 197T Yard BABYSlTTINQi, Welkin.. THREE BEDROOMS!llvlaa APTSi I ... moderntoralchmge. .10 s cm _....... Dtenatcker mail. bo Brad **eb*>., SWB-351. 4 *..*.., dlataoc. .l Kytn _. ........ I I/I bath.M .a tt'WiQt AC.: .rpm. ...... ........ ... lord County ........ and ... PTP8. C"I. k. MM atCwaaiMlly .......3 yar end ...4732466. Mr*. .IGO) ... ...... a w Ik-l..I..t.walled ...... .. ,.,*, real any ..... sad anamlaally. dldvant*..*.. c...... w call llchf 3/16 ".*.... Phea ......15110. .all..tf-etreel ..rill...31$ ..y of ......Ia lard.M. Mal ..... high. Hhaol. .d... M-CIM7 lateetectoa after Sj r:... 3/16 W. W........ .... ..... 964.M01. I .trial...fair a***** and eUVco) aad ... able. lo typo. .*. ...,I8It. !Wig 1/16 CARPET DX8TALLA- p R LTY ..... .....,. S .... ..... .. N.C. Marphy as nStal CONCORD. Devblawide. . Apply Bmpmy TION E.......... la nil I4a60 tlAgrom & /.. .. ... real god aunt SnrMo |laid Cost.I..b. FOR SALE. 1974 Raacker, pbaMC. deelro lecel. sight! 3 BR. I .bath, ....- rHONE FURNISHED- APT-- ... MOUNTAIN CABIN Starfca. .......- tar .aids a.. .*... *. .-. and wkod. ..... CollRallccd ......r. aarpe. CH/A .... *o I." acne. good appUoallM. M WUH March p.y.*... Tab up pay 43I-IS22 after 5 portly r.r.......".100 .... l 647776JOSN. .Mdr. t BR. very cbc. .. ..., land I* all wdd, 28. lUbc 110PARTTIME _.**. @ .. ..** lb.a a .... .r .I.ovo .._. 1112/... A .TEMPLE keg .ar..... drape A/C. *. .r... Th* ..... I* net year to pay .... CalaelBrM Phooo ....-"... 3/16 Slpd STARKE. FLORIDA Ideal ler N.pl..r retired 1 .,..." ........,bat. .II I* DOMESTIC Walyd Stark. 9646464 PIANO TUNING IllSr"'ijiii' Cecelia Terwtllegar .. .N.. Old. ... n.... .....1)' dried In ... la help ....... Must bava owe ., llpd '11' w...... Repairptoaoe ....* I....IIH. Uy */*. ..... .... AnycoodltlM. BEDROOM I;;;. PREFERRED PROPERTIES ]ro H.. It tra..par........ Phono 7823154. WlOlam 0...... 2 BR Urge dock. vr-- Itch*; 3/16 1228 Blaadln-. St.. Stark. .... loojy 1 y..1.141. |. with 1 BR COTTAGE. Leke ..... _...1... Owner It'.ot' V-6, standardss.ah.la 964.287. 3/2 I bath. With 10 acreo eflaad. 40 acres cozy country home A rental Income UlUtlea ......... STUDENTS/ .n wry . .... to 3.1117,500.64,600 : Need T'port rT laud and aorveyed. trailer.' You will be In good KEYSTONE HEIGHTS' .. ..,....,.....* ..... Urn. Jab that papa well and ......*.. Call .....191I1. 1/16 Pbao. ....-67". 3/16 4tck.*; from furnished... REALTY Pk.... 4732614. te Acre......5 mltee Iraw Her* nod .....n..f ..... ltp. TELEVISION REPAIR AT 4/6 company with location. 3/16 .fI... "' ,. N.C. Nice ...... for th* FL Army N....... DISCOUNT PRICES: AT - ___---0. / *r yes .. perk a G_'. Davoto ... w.*...... DIMS FURNITURE 455 5 and 3/4 eTr. .e el. .had plae 3 Immaculate BR. IB CH4A on well landscapedlot TRAILER SPACE Water ..... .r trailer. IVW.. S _... to mllllarf .....10.. DODGE CORONETS 1979 Main St., L.... Butler, 4B62985. BR be*.. with. 1 bath.. H7.000. ........*.......-., .nlla.... '. dew pa'..... T..... ploa two wok. In the ally ...... Tab aver .3/2 "/... Ah.'.'. .ldl... SR-230A .. 7813348alter Located a SR-235. Leetcr. a few .) over 2JWO ..._. Otferc tnlnlni. .*dadvaacemeat pr*>.. Itpl OFFICE MACHINES udaaak sad Wlei Rd. Pboae 964- Low utility bill Charming brick home on 3/6 ...... Rd. Phone 964-6630 ......W*bava all lyp.. *f ..*.rI..u.a .- ragkitori -...... I14\ZI. Up" SI1. Madison space fa garden. niter 5 .... Itcbg '11' ... .)' Ihted. free that are ....1.... Cal 7S2- 1971 ii RNET. Oed F....'. Offlc Mablae.. .. RETIREMENT--PLANS ,. /.. nod ap. W. .... 0621 Lak CIt)'. 1/9 sky. ccan Phen 782-3O20. 5.pd M.Ir lake. undisturbed ... ./.. P/S. A/C. Keyeteoe ** KINGSLEY' LAKE Calm serene KITCHENETTES 1 BR ', ... troctei w. ak. kav 3/16 0450. P.... 964-76M after 6 adjacent. lo cooreo. furnished. a are golf 3000 If.home duplex situation sq. ..... TV. AC., atOIII. .hieluded. ..... cab lac, ......, old .. llpd 3/16 ..*.W.II' ........... T..ly ..n........ ...*, .... Wrtt or cal tar CETA JOBS AVAILABLE.Clay p. CUSTOM MADEDRAPERIES _.. .... Clean, CH/A. 3BR furnished apartment over the watt Wkly / .....1)' rate*. ..U.. ..r......... YM C._.) Beard ./ CHEVY PICK-UPl Ti76. W.'" awMeehhil I bath Owr bav Temple Motel. 880 N. .*1400433.7421.Wda. Carnal) ... ...... .. last wharf bee. lilt V-a .lass.f....r..... Fre. .. ". Upper (20.. lr KINOLSEY LAKE Picturesque spring running Temple Ave_ Sterke. ,.... .... Public. H..... Nurce, ..- ......... Teel bem ...1..... .........*. L... Steeba. *. more ........., caURolala beside property 3 BR with I large dock for 964-7357 3/9 4tpd 3/30 .'. call .....,.Ckerekoe Lad tllmd. by th*State..FUrU 83400. Pkea. 96447M alterpja. pbap 494-2219. 6/24'tl/chg Lit.... ......... .nt.r.lning. --- M....r. N.C.. 28906. Mart .. ._..*,*. mere I 3/16 U/pd Broker. IS.I._.. cvee. aed COTTAGE RENT.L.Y. { 7tpd .".. than 3O days and be Clay HANDYMAN. All acme r- with" ......... 372-3112. Treed HAMPTON LAKE Lovely' brick home 'r... Cant r......... Apply *l pair.. Interior cod tlrln . year _... .. Galvll I... Phono 473-4186. Gi Ti .HAY. Trh.1 Clay. Co. CETA .HI... *.UCurtbueo .........., ....**w..ld.| Realty extra tot, dock 41 beatheuse. laA.r 4/Ps r 11I.... la ban, .. r.... CcmmuallySwvk TWO CARSi: 1961 C..e, .ad ......... Spout. rat** / Realter.. 177..... 3/9 4tckg. E........., P.... 964- ... 91S Walaul Strt.Cree 221.'HI D....Dart$3M.Nw termc lot major ....*. 17HOUSE HAMPTON LAKE Unpretentious, yet elegant' FOR RENT OB Lake .. 2/23 3/16 itlckere M bath *ar*. ..... .. FOR SALE Geedcondition. 4tpd . 9648961 Cv*. lei.. '11' F. Pbao brick redwood. Tastefully furnished. G. ......... hem. 3 BR .. ** Pbea 7823321. Itpd 3/16 . after 6 p... lor .Ir.dial. ..- ; I BR, carper, 2 Pnrtbtlly Balk, ,furalehed central orlaralehod. H/A.... . COVERS 1/.201.1 WORTHINGTON atUoUoo. 13khg. .loco to ........ ead town, Never before on the m.rk.t-a |ewel.'of a small (150 meeth.Ph I ..* sad ...... homo*. SPRINGSi ..lMrrpondent 3/30 Mil 498-1003. TFN CkgHOUSETRAILER. farm 10 beautiful acres all In prime grass with per ' .......... I.....** water ..at....... (159 **.. ......Contact Sharon FURNITURE RE. 70 pecan trees-cypress home- ,.,.,. large and garbage ._..... Pha* ..... GATOR ALU> Pink. Union. C. Time. .. 496- t PERSONALS ) FINISHING Call.1.. .* IOdli. 1 barn fenced cross fenced. 47341383 efter 5 .... .r P..... 372-976T. 1211' A.... W........ F... BR ,...*. 431-1022. wry. w.*....... Had 3/16 N.W,13th. St., G..... ........... P.... ....7." .... 8/11 If/ctig_ ATTENTION. C......... M.....' Friday. lo 4i30rm. FOR BALE 2 BR FRAME 3Vi acres ", lttt a variety of fruit trees -home plus DEALER tere ar....**, ... thai. sad INCOME TAX SERVICE. lit 3tcb 3/23 HOUSE... wall I. wall garage owner "".!lCed. TWO BR DUPLEX 3 part time help ....... W. 123 8. Wab .l St.. ...rII.. ( 1/2 UnfuraUhed. wall to wall .. Thareday. 6 will provide. loll P...* ....-7-tU. 3/16 tiny. carpet, paneled acre. . Iralalsg.Vuin. KAfiTERiNEiSpbltoal tv cleared carpal *tv., rfrlgertr." 2313SJS.. Hawtbarn* SISTER corner lot '.nlo." er a $22,000-20 acres-well tank pole- 1Z4 'N. Myrtle St.. F ; ... Galavll Bit. Parry .. Mcatleae. ad ahUtcavailable. 3/23 advice. and ...........905 S.E. 5lh Av... pretty. .341/.*..... P...* 9644082 .. ........ Dcckri Only. .. Full. .Un. ..1company BABYSITTINQ IN MY _...11.... all pr....*.. .lHI L..h* Bulk,. d./.hg .r ......1100. 3/14 4tpd 4/6 ( 4tpd 3/13 ..y.benefit..... provided.Take .. tkle. HOME ..,......P..... 7823216 ..Sims K.therla bee advice BRICK"HOME 4 yr*. old. 3BR In the country but en a paved road -home with II ... 3 opportunity by Inperce after 4 p... Myrtle aad .> rda lag loearrlajre f ba. garage, ..... productive. acres. i t ffitMW"H. ii Woo :I20 pickup pptylag ........, health TWO B pr .. MAJIK LNv. 3/16 4tpd ../. CH/A. new .arp.ls. .r..... ..., 12>60, .. country.(110me. ; .. PECANS. 60* per aad financial preMom.. 1/2 acre *fl 301. 629.90O.Phon . P".. 964-6112 er .... ...... ...-.Z10. 3/.. MARKET. 486 N. Tempi. I9 FOR Pke** I04 Z8-61161. 3200 ....-.77.. Me*. ./'* Largest den In town 1240 Standing CHA 1040A FORMS Av. 816ler sad 605 _ 964-62(1. 3116 yin" W. Mad/ ., Reid St.. P....... C... la, .. excellent conditionownerransi.rrsd.. llehg *V< .. St, Stark. EaulOpportualty 1040 fr.., U .. *tberattacbxmit .r cal .r write. 3/9 31 pd --I -I ------ "" ilmplcyer.. 3/9 .. 30 ,,)'r.. LOTS FOR I BALE FURNISHED 3/23 P'r--1; LE LOADER. N*"d 3/16 ..prlsar. ..... D...... ...r..., utlatl. ..... ..... ..... powder, ".U.. Sky Martin, ....-.1573. '11' 4lpd* Crystal L.... .. ...It.* FloriUnd Realty N. pel .r ."'Idr... 314 N. OA."q....? Opea 10 a... te 6 46BABYaiTTINQ SEWING ...ACHINESREPAI.ED. make all.,. Pub Harris. , Tempi Av*., 8larh. Phaaa ..Saturday,7554569.3/9 EXPERIENCEDWAITRESSESi .73 113. 3/16 lukg 3 13 313 N.T..I.Ay.. Al make ....-64f.. .r (64-7344.- llpd '" _4/13_ Part the to a ....... cleaned, eiled aad ..|..... -..*. A .. A ar O Stark, Fin. : 3/16 CT'ONs Dealer sad .r Inl Urn.. Ryan H..*- Christian .h.... Hot ..aI., (7.Week .............1..... GEORGE ROBtBTS. 964-7700 w.I..... ...1.. ..... ...... .., K.,...* Ref.Real Eilate Broker GOOD COUNTY LIVING Bay .. aack*. ladlvldaal ..... Stricklaad,corner ol Har... USED FURNITURE t 16 ACRES OP FARMLAND .......... N.w ........- Ht*. Apply In .*r.. _". ............ ,.... 964-6034. Read aad Hwy ... tlchgBILL'S SALEFURNITURE PbaM9647U68flRfe9MNorthTeoiplAv. F.no.'" with. (1..*... ISI1arra.wkb4SR,2bath! I for I..... Ph.** 964OII4. .*, teelc electrical ...- S.. Mary may E...... /..., ited 316GARDEN ARRIVING ".. ' | llehg. 3/16 ( ... feed haws, .blkee. SAW SHOP.. Cempleto WEEKLY ltrk- .Flaridr true ...... ''Y... tt I h.. .. .. V... mercbaadlea. ,.. ""'III ---TIME. Save- >.arback. ebarpeoms "",.., D.Dree In 1201! CH/A. .to addklea. I* FURNISHED I BR .part- *ad cl cal... 7iSO. BUSINESS G........ *r flewer .......... bond. carbide. BARGAIN HOUSE aaatber kaa>*with 3 BR. I Ibatb. I _... ,...P.,... -'e.JJ.- ......)' ..u... Back. .. P.ot OPPORTUNITIES. bade till...Cat alter ,....; them. mewar .blade bellowreuo .. 301 both .Ltv... ...,runt.... .110 a.k pli o $33 o olJ *. m Mlre.. BIB Perry ... .1494.8067LWlyh.. sad .......... L.aws.lIarlws'Ostldlsg..ppI -- -. , ..... .. P..1 f ",1a71.1"1Ia.311' 'r"f "._. S/S 4tpd'9/13 Rake II'.ft f", -, .*J>alV ..> | ',1' mfr. #'* ..' yy' New. ,.. eaa.b.p I *ere.. ; al. "" TfEBARTH CORPORATION .......or KeyMooo Helfbu.tlch ; Sll IU''''." .! tawierwttb "' "ayt i8 ';; UOUSE""OF" EaeriT raadlad. high, Very .... .brick. ._., .bttewo 10 ftt. dew* .Mlln . FOR RENTt 3 BR. -l/1' May bread of ........ cervle dealerahlp. ALCOHOLICS ANONYMOUSi .I..... ..s., reeat.3BR. .. > ..... Mealkly' balk. brick. b... located la vacuum.. uced ........... F.a.r part tl.... I Pkea* 9644894 *r DISABLED' VETERAN LAKE SERENA. ...*- I both.! .... 1&7.01. Lab ..'''r. Cal M..... F. ......* .".110"'.. Eiport .. 4 .. .prIJ*.. H.... 96/-.711. "/C.. WEI.... oat year gangs If tlful balldlac. eke with __ --- R." E....., REALTOR. : .,all make. ..Part and .Ilk. kelp hi. atartap.Attracttv ..-... .. hf> ... ..* platy .l tre.. 610, 00. Fraaj baoM *a 1 era loceaalry Out .. H..p'*.. I II .cr*. ""-31711. 312 U./c". ...**r.*. far ell vacuum .. let year .... HOME REMODELING. IIh'c wanted J.... 473-t406. ---- very r.....*...*. with. trailer and ..n. .._.. 404 NW 10th ..... I......... ef nAlOO !. Ik. .ken.. we d* It/" '"c..; AFFORDABLE. Tw. BR. -- ----- KEYSTONE--c.1:---. ( ..._. Gamaivai. ..... quickly rvturwrd, Write r........., electrical, 1 ...t". A (raat by fr the. 8 Art... Nertk ol Sterk. Acr...* I* C.. ..,". .. .... !'BB." 1400 .... ... ... '- ... /...,_ Zlebarth Carp. 9M 8. Kickway .*.0.|,reea addltlaa. .... SEPTIC TANK GREASE list tbae baaie ".,.r. J.) .. .ff US 301. .....y..**... 48 acre*. dwelling, 100165 a Hwy. ITEMS EVERY DAY 41. I..n... Fla. Cd I wrk at h_..... TRAP ........ ... II***, 822 00. MO per aerei 30 ecree, N.. tl Nertb. 1279 pr ... .. ..re........, need 32650. er call collect,. 1-904- pr..... n..re..... Pbw roaeeoabb. Jo Fercytli. ---- .Klagchy. Laket S. Deablcwlde 2 ath.llding..l.rry.bdd (1000 per .rro.N . MH. BR. - 726-9568. 3/9 4tck. 3/30 9644087. 3/30 431-1012. All ba.lace. COMMERCIAL LOT IN ----- .. .. .. and ( 4Ufc ..01. A. * KEYSTONE REALTY. ........ ... I... .... loo mach te II... ._ 3/31 U/ STARKE. ".110O ; CITY 3 BR, c.. reteblack 473-2614 d/c', i ..... I' VARIETY SR Fall .r Part T''.., aaaeailpportualty Ir-------. MINUTE"DRIVE FARM 3 BRCB ...... gdceedltle ,KEYSTONE 3 BR7T B. W. at U.8. 301. Y'all ler .*. *r V -olfDrillln! I (.'."RI.... Froct ... |...* FIVE 10 acree, 60 peeaa coos. 3 *. fully 1 .p. (...ml. .kluke. .. ..*.!!_tfehj!! _______ w.... 'lalereetad la ..tralaeeaie. .beautiful heavily. TO FLA. STATE ...-buidlai. I....,. work- 2 BR /n... 1 III .bath. CH/A. W/D keec-upe.. car- Far lalervUw' phea. I weeded. let.hh. sod dry PRISON 3 BR I bath. chap. .tera.. ho*.1.| IBR frame.acer ecbeeU.Pko . pert, larg. Ut, Z50 m.. TRACTORs to good Chrlatlae Rewl 9644808. 2" thru .6" paved .. ..., build. your Coatral Heat aod Air.' *.....7700 .dltl.., ronatly over 3/16 .... ... .. -- !Ie..r"d.'j; VeriP.Odm KEYSTONE lay I awe .r ye* "STARKE .late *a REALTY .', Call 4M-2033.\ Std Fast Rotary Hk. ao* ol our*. Call lor BETWEEN A 301. _____ ....Reel E....* 473- 2614 UckCUNFURNISHED .*. 3/2 4lpd 3/23 KEYSTONE.2 Bit. I bath. BrakerEveai. II..r. sad 3 BR CB .h.... .14.tall. * --- 91808480 weekly, nalqa Drilling Equipm'enSTATE \ Just . HOUSE ailing Ins _____ 2 car (eric with wily .*.. 2 balk. 154.6171P.ulA.draw. pregraai reiaedeled. . with ''''r.. ..dr..... Pka & DIRT BIKE ........ .I... Eaeterry Rt. 5. LICENSE I acree STARKE.wltb 3 BR 5 hem bllful. end. --- CH/A. W... .t La...)'. A._... .....7739 644841. 3/16 2leha 3/23: oily S hur. rldlna-. B.. 16$. L.... City, Fl. ..5 5.50..... .U beae callable It.r.. Other lota aad komeaavailable. batik'Taft I....Starlag f keaee I II 3 BR. laSaratefa ..Pbeae 5 3205$. 3/9 6tpd 4/13 I Cal NICELY: FUR'NliHiED on.bodr. 9644348 alter Pumpa .. tedayt Helfkta.20acr A._... 782-3896 .. dupla. UtQIUc llpd 3/16 -- STA.KE.'aa.I.....,.. ----- l ral.....Nina private. yard 939 per baadred. etalllac I E.Cal St.....r .... Ha.I PHILIP W.CLARK Tw. Iractc vary New A UsedSalesPartsSeryice and driveway. Inqulr 603 E. ....1...* already ataaiped I ....nt.LR DR....,plus 9 Lawreac n.*.*...... Jaet eft SR.16 THOMASREALTY Wuhugto 3/2 llcbfkltebraette ; and .,..... freeeappllea. ....family.. rm with, rye paved r.... rii i.2 iooMEI'Fi i: 'Y 1 MOTORCYCLESFOR .eavelepe sad a.ll lei addreaeedetaaiped ROEL. .leg 'fireplace.. -__ RIAIIOR Boulevard lift I .bathTliv'laf; ; r... *. .tlUtl.. aad SALE 5009 Old. Midlothian Pike. .E5Z5Terms, A.B.PATRAY KEYSTONE HEIGHTS .........CB,,. .....Very TV liMkidd.. UNDER mmmmmmmm SalteNo.. 64, R'c.' ....., Va. k.'....Ho..Fl. Office((904)4734700Evealafi) r..***....*. 621 North. Walnut 8.. WOOD MOTEL3 1/2 N. a :p. 473-36(1 Offlc GEORGE OF STARKE ,.ar 23224. 3/16 Ztpd 3/23 Plumbing CCBLKTS.JR. Starke. ,F......,32091 . 301. PkM 0644349. 3 ! .. S/*' : : : ...rIa.. Saivkl .....r. 5 Hem 473-2039 1904)473-4037) Rag Real E... BraherPhaoe 964-6I6Z Ztckf S ....712. .... 9644020. 1640 Sooth L.______ Faroierly A....n....*. -- ..... 1301 South ,lo New Installation OPENSalwdayAJM. Real.E...,. FOR RENT S BR ..oblldh. "'.I tl/cbg. ----- .... a Lab G.a.Y.. FAULKNER' ...ral..... A/C. C/H. .mpr Remodeling REGISTERLPGAS Fear BR. I bath ...cnae ..alkplv. .ullUtl.Call HOME .blech. b.oosupr4 Wow 473-4149 alter 4 ... .r ERVICE POLES Repa.rsJOuppanc'v E Medleea 8tH Se* .by aptal aaaHB B i a *aaa a aa a ' **.....*. llpd III: IB ,. 308 S. Thompson SL A Lillian C. Pearson --- 1 BEDROOM: HOUSE p MobileHome : : > : :: 23 acreTbT 0..,.... Nteeelo Ual.ral..*....r.......Ireat ...... .......... .. 984.5888 ut roe L Real Estate (, ....r llaiatbifOee . perch, Illty' r.*.. wa.bre Cash & Carry 2303 N.Temple BRANCH OFFICEUS ----- .a.b. .% ,....Mar ari.l.c. 200 AMP PUMPS SUPPLY'COMPANY Stark. .Florid T 301 NORTH acre .h... 01.... (.......1' r*.*....... tlSO, Dock _9644O6J LAWTEY.FLORIDA ..w.. heoi. and red- per ....llrct aid .but ..... \ j y I 782-3806 ........ SR-IOO Srath.Owaer . U ..w..... 964-6020, t//rig- Home Delivery Of OPENSATURDAY . 864 N Tempi A"e I1.-3p.I 131/2 acre. 4 BR. t balhfraai /1a.-1sg. Cylinder & .beau ,I.. 3 BR I F........Tbeia* StarKe 3 BR. 2 1/2 bath. .brick. h... . .balk. frao.. (...100. 8U|.Real IA.... eod 964-7061 Bulk Gas .with'. .flrcplac...... -oieaytbr F_. 3 38.2.bath .brick. Broker. , FOR RENT I ----- CH/A. f IIn'...... bar Office FREE CHICKEN 78bara acres with .pry .0'.10' with 7 ..r... Ml.OOOi 16 9544152Ev..hp r1] >. Appro. 40 acree .. acre. 870.000. --- THE WIFE & I CERAMIC STUDIO RALPH .. ... . Mobile Homes **,re".. paetor, prle . ecree" T7eV is wl'Y.U 8. 301 'Iq Ga(r.rd Indu..... Perk be*. redoeed tbroagbMarch. '.7 ieOS 633.1216ASSOCI4'IES' 782-3225 I :,' BRIAN Teroii effered..t. IOOA 113y600y__ ' For Rent Tou. 'Remove And Haul Learn ".,.* worttf moat eeclnaiing hobby" free CI...... Real Estate ....u..-. -1100--.-. .-. brisk 45 .... ...... ..... 301 ......S.._. Wed. And"'.. 1 To 4 p m. Friday 7 To 10 p,nt. : lie.... .130,110O .. e.96488t 'In Country boat.. Nkly.. UadMaped.paved - Cell.Time Preferred. 2117 N Temple drive, .Ir......, asis t arms A op Larry **kc.city --- .20r3 Qreenware. Coramle 8upP$.*. Custom Fes.... Duncan felnl*. bought with > ..... or 58acre oat r.S3 J>00 per ..r.. HanN 1:... 8e4.8788O'FlCIO'EN .. **.. .. tk.. roam 12 .... clowo Eve, .41111 Bedrooms : high. sad dry bad ar*.... :.__ FOAM INSULATION 9-1 Cal far as appobitaioteeo Ie 10 acre restricted te SATURDAYS thin aao. h..... lardy 230 W..... LONGCIiAMPIIonMBndBuildlrio Furnished Or. SUNDAY BY APPT Rd. MZjOOO.f : . DEALERSHIP AVAILABLE ----- ___ ; ' W. ... ........ h.. Float army wlt\ .... I BR farJked fnaM .... MMsth ' UnfurnishedPhont \\fOjT Details FOR THIS VICINITYUrea 81J900. aa aero! BR. 2 balk ...... ....., .. Ia.. woks d dryer. BVILD-t' , - ---- ....., mat a.d ..*....)- . W. bas lot* lor-aieblle ..... Good .in.... oppw- .11.100.----_. Your Plant Or Our .1 . Bill Austin. WATIMSWIIDOZIN9 .*..! ....,. $p..o b.eb larf YovrLotOrOurt Formaldehyde foam Insulation lo the best --- -- BR. I arr.s23J00. ILIMEROCK ---- insulation money can buy. Dealers who sell.. this W. boa ktafer bJMIctW w. oed .UmOmft. with ..*!) 3 BR fr"arH"i l l/Z aar*. .FREE ES11MATRemodeJlDc 964-8114 ----- arr.ag. aad hoal.. Crawford. Road. (16.700. Rep n lead FOR product the Insulation field. We set up w Bulldozer Work ..... c**>a*r complete equipment and material for complete aad] todaetrlolprepertyt W* bav7 301 ._..Ie''" 36 JS AreTT 4o" eo 301. Largo or Small SALE dealerahlp. W* .* pre pir/y, Term Xi Jl>l2._ BRASINCTON Land Fill BUY a ..._. BUILD a Aep f ."acr;**-Ul Saate Sold- Traded : Cad IolailllDObDe w .iMe, or SELL a boeeolEveobig Peal H.Peolkaer F.we. 3 BR.MH. 933 JM9teraie. --..:..- All.*. I. 11rllft1BuI1 aad W........ Realtor .Adydsing ..311aer ' sales&Service .PondsWILBUR American Foam *fe ACRE GEFOR ; -- .It .... .. IBR . .., *aa boo* ,I .... Fin*Selection Of Used WATER V RALPH BRYAN A_ BR M H. .n..... er bMb .. SALE, lre..L.FelharCvmlac REALTOR 9644208SALESMENi Can Taken On 1IIltiatien *- C44614ZBoewM.Bebbe Ul. eo.__...._ -- Cadillac Trades M-4Mt 782-3172 '" .WAYNE:DOUGLAS I sad 4710.71. *o U*. :JtttWUIfigKvny 2001 N.W.13378 5301 (.DOGMadison'. St Smrke. 635-E.: Oleander< ornt-tett Eves And Weekends BROWN ll.. ," EvVeVWEEKENDSP GAINESVILLE ((813)) 888.1883 Contact: Floyd Or..". ". DAY ,Stark .. ....sua ew......- -.144 ...-T*'4806 ? 1wel..A..w . ... 1 _r . .. .. . Facet* TELEGRAPH March !" It7 fi4 "r C't m .w lrr * # * * L I 1. * ** * i.r STARKE ELEMENTARY .Parent remember Friday March 17, Is our Bingo night. Donations of $1 will be collected for each Bingo Card t tvY I which can be used for the entire night ( Only students whose 'parents attend the Bingo Game will be admitted to the 1 movie for 3S cent donation. Ind, 9 The movie that will be shownare n"" r9 ' ;! a Walt Diane)'* "Wild Country" and "Abbott and "" CoBteUo Meet Jack & The ""-- _- , - ;-'-:- Bean Stalk." The 29 cent .','.1'o,: donation include both .. .. movie -, j.. ..' . f. Refreshment will be on ".,.!.j.t"_ "' :.t"J..-..:. .t:. .:-, :_. sale in the cafeteria. Student Pilot Alva Owen threaded the needle Saturday to land this The skill of Owen In piloting the out of control helicopter ta will be permitted to buy k I j, National Guard helicopter ID the open yard at the Camp credited with avoldlngcataitrophe.Owen has 3." hour flying' refreshments during reel I a + Blinding maintenance ahop. Had the helicopter minus It* time plus 1,0(10( hours of combat flying. Guard.men.ay Ow..'. change ,a1l Utilizing rotor hit the building! the maintenance shop would experience paid off Saturday. r ' have been demolished and the copter crew probably would havebeen AU.star Ipee4bsIl killed.PILOT Game SefPr14yThere will be an All Stir CREDITED WITH SAVING CHEW Speedball game between the t "p 4th and 5th grade girl and the . 4th and 5th grade boy " Friday. Student who participate 4i. In Crash None Injured Seriously will be selected by their ... teacher This game will con. Front row (l-r)> Dawn Motley. Stacey Bowen Maria Thomas Laura Waters Dean Reddish. clude the S baD unit. Second rows Debbie Tyllcyka.. Bobble Jo Singleton Evelyn Daugherty. Darlene Causey.Loucinda , That pilot did a fine job, I aboard Six members of the according to Col.! Franklin All five were taken to the All of our student are still Griffin. figured! it had to be someone 20th Special Forces Fief: Persons, state Information Naval Air Station Hospital at working very hard to be the Third row Joseph Hitch Kay Allen Rhonda Sapp. CarolIne Hamilton Mary Ann Thompson. who knew what he wasdoing. headquartered at Craig officer at the Florida National Jax NAS for treatment. All Souper Star for the week. The ." said a local National Jacksonville had just parachuted Guard Headquarters in St except Radford. whose leg dead line for our labels has Guardsmen of the helicopter from the helicopter Augustine.The was broken, were released been extended for approximately crash at Camp Blanding last when the crash occurred five aboard during the Saturday night. Radford was ) another three weeks. r weekend In which the worst Saturday at 10 a.m. crash were the pilot Chief expected to be released Mrs. Donna Brewer's class Is r, broken Warrant Officer Alva Owen Tuesday still holding the lead with 179 Injury was a leg None of the injured were It Is thought that a backpack of Milliard 1st Lt. John labels this week. Mrs. .Cindy local men of one of the jumpers Barber Green Cove Springs; The helicopter landed In the Hardee's class came In came off and flew into the Crew Chief Thomas Radford open asphalted yard at the second with 88. The 13-passenger! UH-A smaller roar rotor which Middleburg; Command Sgt. camp maintenance shop. Pilot Our Souper Stan for the Huey copter fell from some stabilizes a helicopter.. An Major Thomas Isack, Owen maintained control of week are as follows: Tawanda I HUO feet when the rear rotor investigation into the crash Falatka aid PFC Dean the ship enough to land In the Tyson Joanna Brown Kathy malfunctioned; with five men will be made by the military Morris of Palatka open area, between the Burton, Ernie Williams ,.._...._._._ ..... -, ...,.... rJI.I n.-"' ;:-r1I'1w :;: I buildings. Owen avoided three Valdez DeSue, Sean Starling, , ... iit......, .w ,.; u-- + j tanks parked nearby in the Marty Sellers, Feiecfa . :ro path of the copter avoided Hankerson, Renee Hewett, o demolishing the large main Dewey Dougherty Jamie tenance shop and landed soft Carver Melina Davis, Lisa .r. Mosley, Dawn Mousy, Marla ly enough to avoid serious injury to the crew of the ship. Thomas Debbie Tyllcyka, "That man did a fine job. Bobbie Jo Singleton Stacey .w. p'o" r ri He's the best they've dot up Bowen, Evelyn Dougherty, I there (fat Craig Field), o.ld Darlene Causey. Laura Col. Augustus Gonzales of the Waters, Dean Reddish, i Camp Blanding training site Rhonda Sapp Loucinda fi lr s + afA staff. Owen has 3,000'' hours Griffin Caroline Hamilton, flying time plus 1,000 hours of Kay Allen, Mary Ann A combat flying time. Thompson, Joseph Rltch. On Wednesday, March 15, g I McDonald' came to Starke Elementary to show the film I "Bicycle are Beautiful the ', II fifth grade. The subject is Front row (I.rl): Ernie Williams, Renee Ilewett Kathy Burton Joanna Brown."Towanda ep ,YO M1" bicycle safety and will be accompanied . by a Written teat. Tyson.Second row Marty Sellers Jamie Carver, Sean Starling. Mallna Davis Valdei DeSue./FelecIa Hint Household Learning : Hankers t home.Ways Language to help your and child reading at Third row: Lisa Mosley,. Dewey! Dougherty: f experiences outside of the DeSue; Mrs. Hoffman-Tonja classroom helps the child also! McCleod; Mrs. Adklnson- Hint: Let' share a Story Kay Allen; Mrs, McClellandand q: 1L4 1. Start a story about a pet Mrs. Long-Mary Ann , (or other interest of child). Thompson; Mrs. Goodall- 2. Your child repeats your Loucinda Griffin; Mrs. and adds of hi. sentences one Reddish-Marcia Watterson; rNiatfit.. ,. . +n J 41r or her own. and Mrs. Strong and Mrs. , Crashed helicopter photographed from opposite direction from above picture. r 3. You repeat and add Sellers--Carrie Coburn. '* "" ' another. Deanna Tomlinson' also iIi SFCC New Student Testing To lie Given ut BUS t' 4. Continue In thin manner" holds the school record with 66 until "story I fa completed, Jumps and Julie Hall is second - (Can also be written, taped, with 62. rte " For the first time Santa Fc coming, freshman students in step in making' their college drawn with picture). All classes are singing ;;1rti Community College will administer the areas of Heading. English career more successful and Mr. Lyle William. 3rd Easter songs and learning the : . its testing programfor and Mathematics skills before enjoyable.The Second! grader Jimmy GrlffM grade class I* again competing "Bunny Hop" in music class -"'G'J.: new students in Bradford they are allowed to registerfor assessment program examines one of the pig banks with the County Fair in this week and next before the J i . County, with tests belnoHl'redAprlltOatf:30a.mIn their first term classes. takes about two hours and the classon the swine category. EveryoneIn Easter Holidays. v4Rmeeil'" jt 'i :.: J, 'd 1d, . third : The tests are short and self- results do not effect one's ad- made!by a grade this class has created their Rehearsals for the fifth I .....-< .J'I' II. " the High School. scoring which gives the mission to the college. For display In the/ library. own 'artistic creation piggle grade "Hansel and Gretel"are Physical Education Star Student: Cathy Lancaster, Danny All students planning to student immediate feedbackas further information, call 964- bank coming along real well. Brown Susan HlUlard. attend SFCC for the first timein to their level of academic 5.1H2: or stop by the Santa Fe Now the students are the Summer or Fall should ability and readiness With the office in the High School. MUSIC NEWS rehearsing on stage and we and results the The fourth and fifth Mrs. Patrick's class 'Third TUESDAY, March 21- plan to take the tests. Those student test grader are beginning to get costumes who take it here do not have to academic advisor can then have finished with the poling scenery'and props together, grade, Susan Hilliard, Lasagna garden salad, fruit . keep the appointment calling schedule the first term fi now (tlxikling) and each class Mrs. Janet Kimutis Is a big daughter of Mr: and Mrs. cup, garlic roll milk. for them to take the tests at courses It Is very importantfor had a contest to see who could, help with the costumes and we Charles Hilliard. Susan Is In WEDNESDAY, March 22- the Gainesville campus. the new student to he enrolled jump the pole the longest appreciate her very much. Mr. William's and Mr. Fried Chicken Mashed " For the past 2'_ years SFCC for the proper classes Ninety percent of the U.S. without mistake. One winner Our Physical EducationStar Austin's class. potatoes, brown gravy green has been testing all new. in their first term as it Is a big grape crop i I. grown In was chosen in each class and Students this week are: limas, peaches roll, milk. California. each received a candy bar'of Fifth grade, Cathy Lancaster, THRUSDAY. March - till choice. daughter of Mr. and Mrs. LUNCH MENU Sloppy joe on bun string II Drawings for Phase 4. of Vo-Tech OK'd The bitter orange was the The .winner were as William Lancaster. Cathy is in March ZO-23 beans buttered corn applesauce t kind known in only Europe follow: Mrs. Kitties-David Mrs. Adklnson's class. Fourth MONDAY March _-- milk.FIRDAY. t until after 1500 A.D. It was McSpadden; Mr. Patrick- grade, Danny Brown son of Turkey sandwich french March 24- NO The Bradford County school he thought there was some asphalt dumped on 'the play used at a reasoning, not *, Deanna Tomlinson; Mrs. Mr. and Mrs. William fries, lettuce; tomato and SCHOOL. teachers planning \ board gave the go ahead "fat" in the estimate. The ground. a fruit. Baker and Mrs. White-Leslie "Buddy" Brown Danny Is in pickle, banana pudding milk. day. Monday Feb 20. for the board gave approval for schematics . "We have a mess out there -- -- -- 1 preparation of schematic to be prepared for and we have a contract" said ____ _- __, .__ ___ __ _U'I.I' .Aa o. Ia e,'at .. .:.\._ -t drawings for a $17 million presentation to the Department . Casey lie said the site should ----- V --- ---. . I IV construction of of Education: in Tallaliassee { phase -Th r-- r he equal to what it was but l I \ Bradford Union Vo-Tech for authorization of the contractor wanted out of ... -.. ....... (Center but haggled over aS.ltMI construction funds.Superintendent ill11lttlllrnn! lltlllrIfU the deal for$3MI!( ) and the board ,,1.Jt" bill from a paving contractor Tom Casey always gets short changed. -:..:.\ \ told the board after the plansare Salley agreed to an error on (lWlJll11L! ; I r) U lI I I I I I'y'y .: ." j presented in Tallahasseethere the paving blueprints for the ; Architect , Craig Salley presented \. p pwfr plans to the board to always the possibility middle school and said he pi\\ d : ,:,k isG 9, ni of full funding. would pay the $JX( (> the paving ," ', ; ,., , add a heavy shop building w' ; ' carpentry clothing and new After discussion with Salley contractor spent in labor and ;..._..f-- .. \ ," \I.'" about retopping started at materials at Lawtey just to -- : r rN '. , administration building to the .' ; [' j jI j-, Ia\Uey Elementary!: and completed avoid the haggling. The board 1\1h J . existing campus at Bradford Middle agreed to clean up the site G i i i nfffTrtri ; i I'll 1i i1); ) ilk ,r b ,:,",; ",: ;;" \ As usual Salley said the School the board unanimously after rescinding the paving I 0_ ..._ ,j' I I:3.1 : '" ' exceeds the budget! approved rescinding action to order The 85 by 75! foot area ... -. } ,\ The program State Department of pave the Law ley site can be covered with concrete i= : : : !l hUD. : : E"'J : Education has given approvalfor Superintendent Tom Casey done by the Vo-Tech for r ... I SI.2 million in new con said the retopping was begun: around the same amount ,. W'"r l rMN l i V w I m 5'1\':: \ \ struction for the Vo-Tech. but when it was ton wet causing a ($2.700) as the retopping said ; I @ . Salley's presentation totaled heavy piece of equipment to board members. LJ-: I - $1.761.083( The architect said bog down and 20.IMM( ) pounds of Also authorized by the '; 4 .. .' I \' \ x ' '. t. f.r board was drawing of schematics : '. 'Ii : ICI' for renovation of the iN.M ,w r'r. :-.....:-:.: .:. "i \ high school cafeteria. The o __. : - rL board put a $100,000 figure J HPMASC (not including furniture) for to Hop- -- *-'on over >. Salley to work with in . preparing 'ir ti> ,vmx w f J I'r'ip Board the plans.members J.T. } ,d. ''rN R bMy S'p. :,raw n 1P \ l x trt PLAZA FLOWERSPLACE Parrish and Arthur Gaskins ...-. m,. 1. I I.fd ft' ! along with Salley viewed the . . completed paving Hampton '. QM' wP . ORDERS NOW FOR Elementary Wednesday, Feb. IS. and said the work was , 4r , OUREASTER satisfactory. ';, .. ; ,, . In other business on school p : " \ f'', : r SPECIAL buildings the board: i 1' ; ; -Approved a change order ) ? ... for additional $573 for . an '" .r' ; ., f / . Created By r covered walkways at BHS and ./ > y .-, ., ": ,'. .J' " granted a time extension to -' 1'f f ,"..N'r' wr. / I it I'I,I ._ '' > //iI+ 'I' ( ',,- ., April 22.Asked. ...- ,j i Billythe I '" the maintenance '11-\\ .f ;4.' ;: C/dEMATIC h department to check leaks in I or r the middle school gym after m AOornoM TOjAoronowaoti ., :pla f. i A't'r' e .' o ', instructor George Loper laid ... AREA vO.-TECne tlNUIt.- ' there were 40 leaks throughthe [ ,'wt . BunnyFLOWERS foundation and the roof. CII"'O' gL1aY. Ae1001A TlI. .INO A"A, L JArchitects T. " -Approved payment of$500 L.. =--=..:. ..-.. -==--::. .: I .:., .. -: WIRED WORLDWIDE, to Salley for consulting workon .' .. federal grant - \ 964-5792 for public'works project and drawing al Phi* IV addKloB to UM Bradford-Ualoo Area Vp-I 'Planned forcancreteblock and brick buildings are carpentry lab. guidance' $5,362 for SO percent of schematic Tech Center.AddlUom plained are.bMvy equipment Mechanics lab, track and 1< administration' office' *..clothing, media center and air conditioning lab: 444-H W Madison Starke, Fla. design for Vo-Tech bus mechanics lab, vehicle driving heavy qnlpatenl' operator and masonry" Construction expected to' .be vpwards" of ft million, would be completed In phase IV. lab In a metal building .,.... "w. t about a'year! and a half. , ,..... .,..+., ,..ter. ----....__ '1'1' v-"__. __,,__ ". IV rr -:--: -: .. ". : _.." .: .. ". ":. .... n -:. r ___ ...__,__ ,..._r."'n'" ..".._" ...- IT..... '" ___...-..4.. ... ."""'" ,. .. ..- - Contact Us | Permissions | Preferences | Technical Aspects | Statistics | Internal | Privacy Policy © 2004 - 2011 University of Florida George A. Smathers Libraries.All rights reserved. Acceptable Use, Copyright, and Disclaimer Statement Powered by SobekCM | http://ufdc.ufl.edu/UF00027795/04146 | CC-MAIN-2017-22 | en | refinedweb |
It’s no secret, I am a fan of Google’s App Engine. Once you get used to its peculiarities, it has a number of major advantageous. Since I started incorporating some of the continuous integration/lean startup ideas in my own project. I’ve run into the shared datastore issue and the need for a properly isolated staging environment has become apparent.
Here’s how I did it.
Setting up the Staging Application
It’s possible to use namespaces to create an isolated datastore, however I didn’t want to create additional code for testing. So I took another approach, which I believe is a lot easier and less error-prone:
- In the appengine control panel, create a second application. You have 10 free ones so that shouldn’t be a problem. I added the “-staging” suffix to the name of the application under test, so I won’t mistake one for the other.
- If you want to start from a copy of the existing datastore, you can export the entire datastore using the Python development kit. Even if you’re using the Java development kit, it’s worth setting this up. It allows you to make backups of your datastore, which might come in handy when something is really messed up.
- Next, import the database into your staging application using the same tool.
- And finally, deploy your application to the staging application. If you’re using Eclipse, just change the application id, if not, you can find the property in the appengine-web.xml.
A small note on using production data in your tests: Be very careful about it. You may want to anonymize some of the data and remove anything that could be remotely confidential.
That should be it. There really wasn’t much to it, but you now should have a fully functioning copy of your production application. Surf around a little to make sure everything is working swiftly.
When you’re happy, lets automate it.
Automating Deployments
I was about to throw out Maven, but I’ve now created a setup that I’m pretty happy with. So Maven is here to stay for now. As are the Maven Eclipse plugin and the GAE plugin for Maven.
It’s thanks to the maven-gae-plugin that I could automate the staging and production deployments. Which has given me a very reproducible build and deployment set up.
To seamlessly create a build for both the staging and production server, I’m using Maven profiles and its ability to filter resources while copying them.
In the appengine-web.xml I added a gae.application variable:
<?xml version="1.0" encoding="utf-8"?> <appengine-web-app <application>${gae.application}</application> ...
Next up I enabled filtering of the appengine-web.xml (all of the next few bits go into the pom.xml):
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webResources> <resource> <directory>src/main/webapp</directory> <filtering>true</filtering> <includes> <include>**/appengine-web.xml</include> </includes> </resource> </webResources> </configuration> </plugin>
In the properties section, I added the default application, which is the staging one. This gives me the assurance that I’ll always be deploying to the staging environment, unless I really want to go to production:
<properties> <gae.application>myapp-staging</gae.application> </properties>
And for the production deployment I created a profile:
<profiles> <profile> <id>production</id> <properties> <gae.application>myapp</gae.application> </properties> </profile> </profiles>
With this configuration, I can easily run the local development server:
> mvn gae:run
Deploy to the staging server:
> mvn gae:deploy
And when I’m happy, deploy it to the production server:
> mvn gae:deploy -Pproduction
In addition to the name of the application, you can also configure other properties that differ between a test setup and a production one. For instance, I use the PayPal development servers locally and on the staging server, but the real PayPal site in production.
Conclusion
With a pretty simple Maven configuration, it’s possible to create a very reproducible build and deployment environment. Add a continuous integration server and you’re on your way to the perfect lean setup.
Reference: A Google Appengine Staging Server Howto from our JCG partner Peter Backx at the Streamhead blog. | https://www.javacodegeeks.com/2012/02/google-appengine-staging-server-howto.html | CC-MAIN-2017-22 | en | refinedweb |
ACL_VALID(3) BSD Library Functions Manual ACL_VALID(3)
acl_valid — validate an ACL
Linux Access Control Lists library (libacl, -lacl).
#include <sys/types.h> #include <sys/acl.h> int acl_valid(acl_t acl);.
The acl_valid() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indi‐ cate the error..
IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
acl_check(3), acl_set | http://man7.org/linux/man-pages/man3/acl_valid.3.html | CC-MAIN-2017-22 | en | refinedweb |
27 September 2012 03:55 [Source: ICIS news]
SINGAPORE (ICIS)--China’s Shandong Haili Chemical Industry is currently running its new 150,000 tonne/year adipic acid (ADA) plant in Jiangsu province at around 50% of capacity, a company source said on Thursday.
The plant, which is the company’s first ?xml:namespace>
“Currently, the operating rate was just around 50% since it just started up,” the source said.
The company started trial runs at the new unit in mid-September, the source said.
The plant’s start-up was delayed several times because of weak market demand.
Shandong Haili has also built a second 150,000 tonne | http://www.icis.com/Articles/2012/09/27/9598976/Chinas-Shandong-Haili-runs-new-ADA-unit-at-around-50.html | CC-MAIN-2014-41 | en | refinedweb |
I am new to C++ programming, but I am trying to modify the following code so that I can calculate compound interest using only integers. I only clues I have are to (Treat all monetary amounts as integral numbers of pennies. Then "break" the result into its dollar portion and cents portion by using the division and modulus operations. Insert a period.) If anyone could help me along in the right direction or help me find resources that explain this I would greatly appreciate it. Thanks.
#include <iostream>
using std::cout;
using std::endl;
using std::ios;
#include <iomanip>
using std::setw;
using std::setiosflags;
using std::setprecision;
#include <cmath>
int main()
{
double amount, // amount on deposit
principal = 1000.0, // starting principal
rate = .05; // interest rate
cout << "Year" << setw( 21 )
<< "Amount on deposit" << endl;
// set the floating-point number format
cout << setiosflags( ios::fixed | ios::showpoint )
<< setprecision( 2 );
for ( int year = 1; year <= 10; year++ ) {
amount = principal * pow( 1.0 + rate, year );
cout << setw( 4 ) << year << setw( 21 ) << amount << endl;
}
return 0;
} | http://cboard.cprogramming.com/cplusplus-programming/16518-help-monetary-calculations-using-only-integers.html | CC-MAIN-2014-41 | en | refinedweb |
java.lang.Object
org.springframework.social.connect.jdbc.JdbcUsersConnectionRepositoryorg.springframework.social.connect.jdbc.JdbcUsersConnectionRepository
public class JdbcUsersConnectionRepository
UsersConnectionRepository that uses the JDBC API to persist connection data to a relational database.
The supporting schema is defined in JdbcMultiUserConnectionRepository.sql.
public JdbcUsersConnectionRepository(javax.sql.DataSource dataSource, ConnectionFactoryLocator connectionFactoryLocator, org.springframework.security.crypto.encrypt.TextEncryptor textEncryptor)
public void setConnectionSignUp(ConnectionSignUp connectionSignUp)
findUserIdsWithConnection(Connection)
public void setTablePrefix(java.lang.String tablePrefix)
tablePrefix- the tablePrefix to set
public java.util.List<java.lang.String> findUserIdsWithConnection(Connection<?> connection)
UsersConnectionRepository java.util.Set<java.lang.String> findUserIdsConnectedTo(java.lang.String providerId, java.util.Set<java.lang.String> providerUserIds)
UsersConnectionRepository(java.lang.String userId)
UsersConnectionRepository
ConnectionRepositoryinstance for the user assigned the given id. All operations on the returned repository instance are relative to the user.
createConnectionRepositoryin interface
UsersConnectionRepository
userId- the id of the local user account. | http://docs.spring.io/spring-social/docs/1.0.2.RELEASE/api/org/springframework/social/connect/jdbc/JdbcUsersConnectionRepository.html | CC-MAIN-2014-41 | en | refinedweb |
As I mentioned in the JavaFX SDK Packages are Taking Shape post, the JavaFX SDK will have a "node-centric" UI approach. This approach will make it easier to create UIs that have an "iPhone look and feel" that users will increasingly expect. The first step that the JavaFX team took in implementing this was to create a javafx.application package and put classes in it (e.g. a new version of the Frame class) that adopt this node-centric philosophy.
Today, in the JavaFX SDK Technology Preview branch, an attribute named stage was introduced into the Window class from which Frame and Dialog are derived, and it was also introduced into the Application class. This stage attribute holds a reference to a Stage instance, which is also located in the javafx.application package. According to the JavaFXdocs (shown below), the Stage class is the root area for all scene content, and it contains a sequence of one or more graphical Node instances.
Also shown in the JavaFXdoc screenshot above is a fill attribute so that you can control the background of the stage, and find out its current height and width. The stage expands to the area of its container, so the stage contained within a Frame, for example, will expand to the size of the usable area of the frame (e.g. minus the title bar).
An Example of Using the Stage Class, and the HBox/VBox Layout Classes
In keeping with the node-centric approach, today's example uses classes from the javafx.scene.layout package, namely HBox and VBox. I expect that we'll see more classes in this package soon, and these classes will be for the purpose of providing cross-platform layout management of graphical nodes. These layout classes are graphical nodes, so the entire UI containment hierarchy will (as I understand it) evolve to a frame or applet that contains a stage, that in turn contains a hierarchy of graphical nodes. My understanding is that components such as buttons and text fields will be "nodified" so that they can be used as nodes, a side benefit of which is having a more consistent API between graphical nodes and components. Here's a screenshot of today's example, in which resizing the Frame causes the Stage to be resized, which in turn (because of the bind operators) causes the Rectangle instances contained in the HBox and VBox layout nodes to be resized:
Here's the code for this example:
/*
* StageExample.fx -
* An example of using the new Stage class in JavaFX Script
*
* Developed 2008 by James L. Weaver (jim.weaver at lat-inc.com)
*/
import javafx.application.*;
import javafx.scene.*;
import javafx.scene.text.*;
import javafx.scene.geometry.*;
import javafx.scene.layout.*;
import javafx.scene.paint.*;
Frame {
var stageRef:Stage
var rows:Integer = 4;
var columns:Integer = 3;
title: "Example of Using the New Stage Class"
width: 350
height: 400
visible: true
stage:
stageRef = Stage {
fill: Color.WHITE
content:
VBox {
spacing: bind stageRef.height / (rows) * .10
content:
for (row in [1..rows])
HBox {
spacing: bind stageRef.width / (columns) * .10
content:
for (column in [1..columns])
Group {
var rectRef:Rectangle
var textRef:Text
translateX: bind stageRef.width / (rows) * .10
translateY: bind stageRef.height / (columns) * .10
content: [
rectRef = Rectangle {
fill: Color.BLUE
stroke: Color.WHITE
width: bind stageRef.width / (columns) * .85
height: bind stageRef.height / (rows) * .85
},
textRef = Text {
content: "{row},{column}"
fill: Color.WHITE
textOrigin: TextOrigin.TOP
x: bind (rectRef.getWidth() / 2) - (textRef.getWidth() / 2)
y: bind (rectRef.getHeight() / 2) - (textRef.getHeight() / 2)
font:
Font {
size: 24
style: FontStyle.BOLD
}
}
]
}
}
}
}
} StageExample.fx
To run the program, use the following command:
javafx StageExample
Alternatively, you can take the easy way out and run this application via Java Web Start. As mentioned in previous posts, installing Java SE 6 Update 10 will cause this application to deploy more quickly. Also, keep in mind that JRE 6 is required regardless of your platform. Regarding running this on a Mac, here's a tip that Ken Russell of Sun and Thom Theriault of MaldenLabs passed on to me after the Java Web Start link didn't successfully invoke the program:
- Launch Applications > Utilitiies > Java > Java Preferences
- Under Java Application Runtime Settings, drag Java SE 6 (64-bit) to the top of the box as shown below.
- Save the configuration.
Have fun, and please post a comment if you have any questions!
Jim Weaver
JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications
Immediate eBook (PDF) download available at the book's Apress site
I like how the sdk is shaping up. Are there any plans to make the javafx.ext.swing classes Nodes?.
4 week cna classes
Posted by: Account Deleted | July 20, 2010 at 02:59 | April 27, 2010 at 06:22 PM:16 PM
coffeejolts,
>>I like how the sdk is shaping up. Are there any plans to make the javafx.ext.swing classes Nodes?
Yes, I believe that the plans are to "nodify" some of the Swing classes, which would most like be realized as making them subclasses of Node.
.
I believe that the plan is to create node-based versions of some of the layout managers, that both contain graphical nodes and *are* graphical nodes themselves. Like you, I hope that one of these new layout classes acts like a GridPanel. I also hope that there is are node-centric versions of BorderPanel and FlowPanel (to name a couple more).
Posted by: Jim Weaver | July 10, 2008 at 12:56 PM | http://learnjavafx.typepad.com/weblog/2008/07/setting-the-sta.html | CC-MAIN-2014-41 | en | refinedweb |
8.5. Sequence points
Associated with, but distinct from, the problems of real-time programming are sequence points. These are the Standard's attempt to define when certain sorts of optimization may and may not be permitted to be in effect. For example, look at this program:
#include <stdio.h> #include <stdlib.h> int i_var; void func(void); main(){ while(i_var != 10000){ func(); i_var++; } exit(EXIT_SUCCESS); } void func(void){ printf("in func, i_var is %d\n", i_var); }Example 8.6
The compiler might want to optimize the loop so that
i_var
can be stored in a machine register for speed. However, the function
needs to have access to the correct value of
i_var so that
it can print the right value. This means that the register must be stored
back into
i_var at each function call (at least). When and
where these conditions must occur are described by the Standard. At each
sequence point, the side effects of all previous expressions will be
completed. This is why you cannot rely on expressions such as:
a[i] = i++;
because there is no sequence point specified for the assignment,
increment or index operators, you don't know when the effect of the
increment on
i occurs.
The sequence points laid down in the Standard are the following:
- The point of calling a function, after evaluating its arguments.
- The end of the first operand of the
&&operator.
- The end of the first operand of the
||operator.
- The end of the first operand of the
?:conditional operator.
- The end of the each operand of the comma operator.
- Completing the evaluation of a full expression. They are the following:
- Evaluating the initializer of an
autoobject.
- The expression in an ‘ordinary’ statement—an expression followed by semicolon.
- The controlling expressions in
do,
while,
if,
switchor
forstatements.
- The other two expressions in a for statement.
- The expression in a
returnstatement. | http://publications.gbdirect.co.uk/c_book/chapter8/sequence_points.html | CC-MAIN-2014-41 | en | refinedweb |
16 September 2011 12:38 [Source: ICIS news]
SINGAPORE (ICIS)--?xml:namespace>
The company is now gradually ramping up the operating rates of all three lines, and is likely to be able to produce on-spec material during the weekend, the sources added.
The three
Befar primarily supplies PO to end-users in northern and eastern
Additional reporting by Vikki Shen, | http://www.icis.com/Articles/2011/09/16/9493047/chinas-befar-restarts-po-lines-after-one-day-shutdown.html | CC-MAIN-2014-41 | en | refinedweb |
[contents]
Copyright © 2005 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use rules apply.
Editorial Note: The structure and presentation of the techniques documents will likely change as the WCAG WG determines the relationships between Guidelines, Techniques, and testing documents.
This document provides information to Web content developers who wish to satisfy the success criteria of "Web Content Accessibility Guidelines 2.0" [WCAG20] (currently a W3C Working Draft). The techniques in this document are specific to ECMAScript although some techniques contain Cascading Style Sheet [CSS1] and Hypertext Markup Language content [HTML4], [XHTML1]. Client-side Scripting Techniques for Web Content Accessibility Guidelines 2.0 [WCAG20] This document describes techniques for authoring accessible ECMAScript-based scripts. ECMAScript is defined by the ECMA-262 specification [ECMA262].
This document is intended to help authors of Web content who wish to claim conformance to WCAG 2.0. While the techniques in this document should increase overall accessibility of Web resources, they are not a comprehensive resource for script accessibility.. This is a different approach from WCAG 1.0 [WCAG10] Checkpoint 6.3 "Ensure that pages are usable when scripts, applets, or other programmatic objects are turned off or not supported. If this is not possible, provide equivalent information on an alternative accessible page.", authors should consider whether they genuinely need to use script in certain situations, or whether they can augment an HTML-based solution with script so that users with script turned off may still use the document. It is always important to adopt the least-restrictive set of technologies possible when authoring Web content..>
HTML 4.01: onsubmit attribute.
Editorial Note: This is being discussed in the WG presently. One issue is whether, if JavaScript is assumed to exist in the client, it is necessary to restrict javascript: URIs. On the other hand, the javascript: namespace has referentiality problems, and in many cases, users can enjoy backward-compatibility without any undue burden on the author. (See bug 1073 for more detail.) such as screen readers rely on the Document Object Model (DOM) to interpret the semantics in HTML for a different modality. Given this, the document.write() and innerHTML() methods can render content invalid (and inaccessible via DOM) after the fact.
This deprecated example shows a script that inserts a header, a paragraph (which is unterminated, and thus invalid), and a list (again, invalid) into a given document.
function fillContent() { document.write("<h1>Welcome to my site</h1>"); document.write("<p>Lorem ipsum dolor sit amet"); document.menu.foo</a>"; }
The following code sample does the same as the example above, but produces valid code which appears in the HTML document's DOM tree:
function fillContent() { // parentelem is a specified element in the DOM var header = document.createElement("h1"); header.insertText("Welcome to my site"); var para = document.createElement("p"); para.insertText("Lorem ipsum dolor sit amet"); var list = document.createElement("ul"); itemone = document.createElement("li"); itemonelink = document.createElement("a"); itemonelink.setAttribute("href","foo.html"); itemonelink.insertText("foo"); list.appendChild(itemone); parentelem.appendChild(header); parentelem.appendChild(para); parentelem.appendChild(list); }
Editorial Note: Two issues have been raised with this example what happens to XSL on server-side and how does this effect XPointers (and RDF-based accessibility)..
Editorial Note: tabindex? onblur/onfocus events?
Editorial Note: This technique is to be adapted in a later draft. We do not yet have a good code example for this, since it is related more to a chain reaction of sorts..
Editorial Note: The technique below is to be adapted. While onactivate is invalid HTML, it is possible to attach an onactivate event to an element in the script block. However, this is a part of a broader strategy for techniques which will be explored in a later draft.
<p><a href="menu.php" onactivate="checkForCookie()">main menu</a></p>
This task wille describe an accessible method for interactive menus, also known as "DHTML menus".
Editorial Note: This technique is a placeholder. The editor will research methods for creating menus using script and CSS, have them tested against our requirements, and publish example code here. | http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-SCRIPT-TECHS-20050211/ | CC-MAIN-2014-41 | en | refinedweb |
Hi On Sun, May 20, 2007 at 02:05:44PM -0400, Ronald S. Bultje wrote: > Hi, > > Diego Biurrun <diego <at> biurrun.de> writes: > > On Mon, May 14, 2007 at 05:38:44PM -0400, Ronald S. Bultje wrote: > > > > > > first, sorry for the threading, if you know of a way to fix that in > > > digest mode, please let me know... > > > > Not use digest mode? Try gmane if the volume of ffmpeg-devel drowns > > you. > > Let's see how this works. I tried webinterface, didn't work (too much > quoted text, no attachments), then tried nntp: with xnntp, didn't work gmane sucks :) ive had a few problems with it posting to the git ML too, a single "hi" at the top was enough to reject the mail as top posting ... [...] > Anyway, on to the relevant part of the patch for you. Attached, or if > that doesn't work on > (still > testing...), you'll find those parts of the patch that you referenced > that I should submit separately. The patch does a bunch of things. First > of all, the gains: it allows most of the tests to be compiled (by > default, w/o mmx and w/o gpl). The changes that I made: > > * most tests don't link to lav[ufc] and thus don't use av_log() but > printf(). However, for utility macros, they do include avutil.h, and > thus fail to compile b/c of the redefinition of av_log(). Thus, most > tests need a #undef printf/fprintf to compile. Similar for malloc in > swscale (last part of the patch). > * several tests reference mmx/gpl code w/o checking for whether this is > enabled. Those parts have been marked with appropriate compile > conditionals. > * as Mans suggested, emms -> emms_c > * in dsputil.c and dsputil_mmx.c/h264dsp_mmx.c, macros with the same > names are used. dsptest.c in tests/ includes both of those, and thus the > compile will give warnings. It's probably a good idea to #undef each of > them or use similar names. Both already use #undefs internally several > times for those variables (e.g. C[0-7]), since they're reused in various > places with different values within the same files. I simply added > #undefs at the end of where they're used also, so that multiple files > can use the same macro names. H264_{WEIGHT,MC} same story. > * fastmemcpy buggage, see above, remove if unwanted (I don't care if it > goes upstream, but I'll leave it in in my copy regardless). > * motion_test.c and dsptest.c had various API changes and I updated it > for those API changes. Worksforme[tm]. > > It's various changes together, but all of it is needed to make the tests > work, hence one big patch. split it :) a quick review is below anyway but spliting it is needed if you want it to be applied [...] > @@ -46,13 +47,17 @@ > /* reference fdct/idct */ > extern void fdct(DCTELEM *block); > extern void idct(DCTELEM *block); > +#if defined(HAVE_MMX) && defined(CONFIG_GPL) > extern void ff_idct_xvid_mmx(DCTELEM *block); > extern void ff_idct_xvid_mmx2(DCTELEM *block); > +#endif > extern void init_fdct(); > > extern void j_rev_dct(DCTELEM *data); > +#ifdef HAVE_MMX > extern void ff_mmx_idct(DCTELEM *data); > extern void ff_mmxext_idct(DCTELEM *data); > +#endif > sensless > extern void odivx_idct_c (short *block); > > @@ -83,6 +88,7 @@ > > static short idct_mmx_perm[64]; > > +#ifdef HAVE_MMX > static short idct_simple_mmx_perm[64]={ > 0x00, 0x08, 0x04, 0x09, 0x01, 0x0C, 0x05, 0x0D, > 0x10, 0x18, 0x14, 0x19, 0x11, 0x1C, 0x15, 0x1D, > @@ -93,6 +99,7 @@ > 0x22, 0x2A, 0x26, 0x2B, 0x23, 0x2E, 0x27, 0x2F, > 0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F, > }; > +#endif this too is senseless, its not as if 128 byte would matter for a test which isnt compiled or used during normal use > > void idct_mmx_init(void) > { > @@ -162,14 +169,19 @@ > for(i=0; i<64; i++) > block_org[i]= block1[i]; > > +#ifdef HAVE_MMX > if (fdct_func == ff_mmx_idct || > fdct_func == j_rev_dct || fdct_func == ff_mmxext_idct) { > +#else > + if (fdct_func == j_rev_dct) { > +#endif tab and finding a solution which doesnt spice up all the code with #ifdefs would be highly prefered, that is #define ff_mmx_idct NULL ifn MMX or some totally different way of checking the type [...] > @@ -508,18 +526,26 @@ > dct_error("REF-DBL", 0, fdct, fdct, test); /* only to verify code ! */ > dct_error("IJG-AAN-INT", 0, fdct_ifast, fdct, test); > dct_error("IJG-LLM-INT", 0, ff_jpeg_fdct_islow, fdct, test); > +#ifdef HAVE_MMX > dct_error("MMX", 0, ff_fdct_mmx, fdct, test); > dct_error("MMX2", 0, ff_fdct_mmx2, fdct, test); > +#endif > dct_error("FAAN", 0, ff_faandct, fdct, test); > } else { > dct_error("REF-DBL", 1, idct, idct, test); > dct_error("INT", 1, j_rev_dct, idct, test); > +#ifdef HAVE_MMX > dct_error("LIBMPEG2-MMX", 1, ff_mmx_idct, idct, test); > dct_error("LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, test); > +#endif > dct_error("SIMPLE-C", 1, simple_idct, idct, test); > +#ifdef HAVE_MMX > dct_error("SIMPLE-MMX", 1, ff_simple_idct_mmx, idct, test); > +#ifdef CONFIG_GPL > dct_error("XVID-MMX", 1, ff_idct_xvid_mmx, idct, test); > dct_error("XVID-MMX2", 1, ff_idct_xvid_mmx2, idct, test); > +#endif > +#endif sort them so as to minimize the #ifdef please > // dct_error("ODIVX-C", 1, odivx_idct_c, idct); > //printf(" test against odivx idct\n"); > // dct_error("REF", 1, idct, odivx_idct_c); > Index: ffmpeg/libavcodec/fft-test.c > =================================================================== > --- ffmpeg.orig/libavcodec/fft-test.c 2007-03-22 01:00:48.000000000 -0400 > +++ ffmpeg/libavcodec/fft-test.c 2007-03-22 01:20:53.000000000 -0400 > @@ -28,6 +28,9 @@ > #include <unistd.h> > #include <sys/time.h> > > +#undef fprintf > +#undef printf > + > int mm_flags; > > /* reference fft */ there is no *printf in fft-test.c and ive not checked that the other undefs are needed but that must be checked before such changes can be accpeted also teh question remains why HAVE_AV_CONFIG_H is defined at all for these files [...] > Index: ffmpeg/libavcodec/i386/fdct_mmx.c > =================================================================== > ---? [...] > Index: ffmpeg/libavcodec/imgresample.c > =================================================================== > --- ffmpeg.orig/libavcodec/imgresample.c 2007-03-22 01:00:47.000000000 -0400 > +++ ffmpeg/libavcodec/imgresample.c 2007-03-22 01:20:53.000000000 -0400 > @@ -28,8 +28,10 @@ > #include "swscale.h" > #include "dsputil.h" > > -#ifdef USE_FASTMEMCPY > -#include "libvo/fastmemcpy.h" > +#ifdef TEST > +#undef printf > +#undef fprintf > +#define av_log(p,l,...) fprintf(stderr,__VA_ARGS__) ugly --: <> | http://ffmpeg.org/pipermail/ffmpeg-devel/2007-May/035167.html | CC-MAIN-2014-41 | en | refinedweb |
Guid.Parse Method
Namespace: SystemNamespace: System
Assembly: mscorlib (in mscorlib.dll)
Parameters
- input
- Type: System.String
The string to convert.
Return ValueType: System.Guid
A structure that contains the value that was parsed.
The Parse method converts the string representation of a GUID to a Guid value. This method can convert strings in any of the five formats produced by the ToString(String) and ToString(String, IFormatProvider) methods, as shown in the following table.
The method throws a FormatException if it is unable to successfully parse the string. Here are some of the reasons why this might occur include:
input contains characters that are not part of the hexadecimal character set.
input has too many or too few numeric characters.
input has too many or too few of the non-numeric characters appropriate for a particular format.
input is not in one of the formats recognized by the ToString method and listed in the previous table.
Use the TryParse method to catch any unsuccessful parse operations without having to handle an exception.
The following example creates a new GUID, converts it to three separate string representations by calling the ToString(String) method with the "B", "D", and "X" format specifiers, and then calls the Parse method to convert the strings back to Guid values.
using System; public class Example { public static void Main() { Guid originalGuid = Guid.NewGuid(); // Create an array of string representations of the GUID. string[] stringGuids = { originalGuid.ToString("B"), originalGuid.ToString("D"), originalGuid.ToString("X") }; // Parse each string representation. foreach (var stringGuid in stringGuids) { try { Guid newGuid = Guid.Parse(stringGuid); Console.WriteLine("Converted {0} to a Guid", stringGuid); } catch (ArgumentNullException) { Console.WriteLine("The string to be parsed is null."); } catch (FormatException) { Console.WriteLine("Bad format: {0}", stringGuid); } } } } // The example displays the following output: // Converted {81a130d2-502f-4cf1-a376-63edeb000e9f} to a Guid // Converted 81a130d2-502f-4cf1-a376-63edeb000e9f to a Guid // Converted {0x81a130d2,0x502f,0x4cf1,{0xa3,0x76,0x63,0xed,0xeb,0x00,0x0e,0x9f}} to a. | http://msdn.microsoft.com/en-us/library/system.guid.parse.aspx | CC-MAIN-2014-41 | en | refinedweb |
17 October 2012 04:32 [Source: ICIS news]
SINGAPORE (ICIS)--?xml:namespace>
The deal for the cargoes was done at a premium of around $16.00/tonne (€12.32/tonne) to
Tight availability of cargoes had driven up the premium, traders said.
Honam previously bought three spot naphtha cargoes totalling 75,000 tonnes at a premium of $15 | http://www.icis.com/Articles/2012/10/17/9604300/s-koreas-honam-buys-75000-tonnes-naphtha-for-h2-november.html | CC-MAIN-2014-41 | en | refinedweb |
Distributed File System: Namespace Scalability and Sizing Questions
Published: August 3, 2011
Updated: August 3, 2011
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2
This FAQ answers questions about namespace scalability and sizing for Distributed File System (DFS) namespaces. For other questions, see DFS Namespaces: Frequently Asked Questions. in the Microsoft Knowledge Base.
Each element in the namespace (namespace name, folder target name, target path, and comments) takes up space in the DFS Active Directory object. The amount of space can vary depending on the number of characters used in each element.
The following formula assumes that each element is 10 characters, and that the namespace is using the Windows 2000 Server mode:
-.
You can use the command-line tool Dfsutil.exe that is included in the Windows Server 2003 Support Tools. Use the following syntax:
Dfsutil /Root: \\dfsname\root /View, a DFS path can consist of no more than eight hops through other DFS namespaces. | http://technet.microsoft.com/en-us/library/hh341472 | CC-MAIN-2014-41 | en | refinedweb |
I’ve been learning a bit of Java recently, reading Unlocking Android and playing with the Android SDK to try and learn how to write apps for my Droid. I have known, intellectually, about some of the key differences between .NET and Java for quite some times now – how Java doesn’t have properties, how events are done through an Observer pattern, and various other differences. Now that I’m trying to put some of these differences in practice, though, I find some of them to be very intriguing – especially the way events are handled.
Most of the sample code that I see with event handling in Android apps look like this:
1: someButton.setOnClickListener(
2: new OnClickListener(){
3: public void onClick(View v){
4: //do something here to handle the click
5: }
6: }
7: );
The setOnClickListener method expects a parameter of type OnClickListener with a method called onClick(View). Rather than declaring this as a full fledged class definition and instantiating it, we are using an anonymous type with inline instantiation. We are new’ing up an OnClickListener class and declaring the methods of the class instance inline with the object initializer.
Now look at what we have to do in C#, by comparison:
1: public void SomeMethodSomewhere()
2: {
3: someButton.SetOnClickListener(new MyClickListener());
4: }
5:
6: public class MyClickListener: OnClickListener
7: {
8: public override void OnClick(View v)
9: {
10: //handle the click here
11: }
12: }
(Please don’t start complaining about my C# example not using the .NET event system saying that we don’t need anonymous types because we have delegates and multi-cast delegates. I’m well aware of delegates and the .NET eventing system. Honestly, I’m very happy with the .NET eventing system. It works very well and is easy to use. I show this example because it illustrates an apples-to-apples implementation difference between Java and C#.)
The difference may be minor in this small example but it can be rather tedious to have to declare a new class for every single OnClickListener that we want to use. Even if we make OnClickListener an interface, such as IOnClickListener, we will have the same problem and have to declare a new class and implement that interface.
The problem as I see it is that anonymous types in C# are a crippled, lame hack that were only put in place to support the functionality needed for LINQ queries. We can’t declare methods on our anonymous types or instantiate an anonymous type that inherits from anything other than the default Object in C#. This severely limits the capabilities and possibilities of we can do with anonymous types. Honestly, other than ASP.NET MVC Routing declarations and LINQ queries, I have yet to see anyone use an anonymous type in C#.
…
Dear Microsoft,
Please give us full fledged anonymous types in .NET/C# instead of the crippled hack that was put in place to support LINQ. I would especially love to instantiate an interface as an anonymous type:
1: public void PleaseLetMeDoThis()
2: {
3: SomeMethod(new ISomeInterface()
4: {
5: public void DoIt()
6: {
7: //do something here.
8: }
9: })
10: }
11:
12: public void SomeMethod(ISomeInterface something)
13: {
14: something.DoIt();
15: }
You’ve given us anonymous methods with delegates. You’ve given us read-only properties in anonymous types. It wouldn’t take that much work to marry the two concepts into a nice syntax like this.
kthxbye,
-Derick.
Get The Best JavaScript Secrets!
Get the trade secrets of JavaScript pros, and the insider info you need to advance your career!
Post Footer automatically generated by Add Post Footer Plugin for wordpress. | http://lostechies.com/derickbailey/2010/04/14/anonymous-types-in-c-are-a-crippled-hack/ | CC-MAIN-2014-41 | en | refinedweb |
Creating Hierarchies Within WMI
WMI namespace is a programming object that defines the scope for a set of classes and instances. WMI provider classes must be defined inside a namespace.
Namespaces describe different managed environments, such as the SMS environment. Because the classes and instances of a schema define the components of a managed environment, each new schema requires a new namespace. For example, the root\cimv2 namespace contains the classes and instances defined in the Win32 schema as well as the parent Common Information Model (CIM) classes from which the Win32 schema inherits. CIM classes are defined by the Distributed Management Task Force (DMTF).
Note To ensure that all of your WMI class definitions for managed objects are restored to the WMI repository if WMI has a failure and restarts, use the #pragma autorecover preprocessor instruction in your Managed Object Format (MOF) file.
WMI defines a namespace as an instance of the __Namespace system class or any class that derives from __Namespace. The __Namespace system class has a single property called Name, which must be unique within the scope of the parent namespace. The Name property must also contain a string that begins with a letter. All other characters in the string can be letters, digits, or underscores. All characters are case-insensitive.
In addition to determining the unique name for a child namespace, the parent WMI namespace can protect the static instances of your classes from accidental modification by other providers. For example, you may find it convenient to nest a new namespace under an existing namespace for another provider. However, the original provider may try to update all class instances to match up with a new schema. In doing so, the original provider may delete all sub-children in a namespace. While this may be an appropriate action for the target namespace, it may affect unrelated class instances in a child namespace (i.e., your own provider classes).
Therefore, it is generally recommended that you create and register your namespace as separate from namespaces that you do not directly control. This is especially true if your classes derive only from general CIM classes or other classes from your company. Your namespace can be under the Root namespace, such as the following:
Root/myCompany/myProduct
In contrast, if your new class derives from the class of another provider, you may need to store your class in a sub-namespace of that provider. Note that this exposes your new class to accidental deletion by the original provider.
WMI provides several different ways to create a namespace:
- Creating a Child Namespace with MOF Code
- Creating a Sibling Namespace with MOF Code
- Creating a Namespace with the WMI API
Related topics | http://msdn.microsoft.com/en-us/library/aa389766(d=printer,v=vs.85).aspx | CC-MAIN-2014-41 | en | refinedweb |
31 January 2011 18:58 [Source: ICIS news]
HOUSTON (ICIS)--Chemical margins for ExxonMobil have been squeezed in recent months by rising feedstock costs and additional industry capacity coming on line, executives with the US-based oil major said on Monday.
While fourth-quarter chemical earnings of $1.07bn (€791.8m) were up 49% year on year, they were down 13.2%, or $160m, from the third quarter, said ExxonMobil chairman Rex Tillerson.
That trend continued into January, the company said.
“The biggest impact quarter on quarter was the rapid rise in feedstock costs that really outpaced price increases,” Tillerson said on an earnings conference call.
ExxonMobil did not specify which feedstocks it was referring to. Contract and spot prices for base chemicals such as benzene and propylene have surged to begin 2011.
Chemical margins had also weakened of late as new industry capacity came on line, he added.
Tillerson noted that the global economy appeared to be stabilising, with modest demand growth in the ?xml:namespace>
Within chemicals, however, demand growth was somewhat being offset by rapidly-rising feedstock costs and new capacity, the company said.
Overall, ExxonMobil reported fourth-quarter earnings before special items of $9.25bn, up 53% year on year.
($1 = €0.74) | http://www.icis.com/Articles/2011/01/31/9430965/Chemical-margins-for-US-ExxonMobil-squeezed-by-feedstock.html | CC-MAIN-2014-41 | en | refinedweb |
Follow Me @vmsdurano
A bit About Me
Disclaimer
The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers. Nor does it represent the opinion of my dog, because I don’t have one.
In this post we will take a look at how to do pagination in GridView control. Paging is very helpful in presenting huge amount of data in the page because this helps speeding up the loading performance of the page and provides more friendly to end users in terms of data presentation.For this example, I’m going to highlight how to implement custom paging in GridView control using the power of LINQ and will show you some tips that would maximized the performance of the paged grid.
For those who are not familiar with LINQ then here’s a short overview:. For more details please read here.
To get started then let’s go ahead and fire up Visual Studio 2010 and then select new Web Application /WebSite project. Add a new page and then set up your page by adding a GridView and a Repeater control. The HTML mark up should look something like this:
<h2>GridView Custom Paging with LINQ</h2>
<asp:GridView
<Columns>
<asp:BoundField
<asp:BoundField
<asp:BoundField
<asp:BoundField
</Columns>
</asp:GridView>
<asp:Repeater
<ItemTemplate>
<asp:LinkButton
</ItemTemplate>
</asp:Repeater>
The HTML mark-up above consist of GridView and Repeater data representation controls. The GridView is where we display the list of customer information from the database. The Repeater will serve as our custom pager.
Note that in this example I used NorthWind.mdf as my database which you can download over here and used Entity Framework so that I can work on the conceptual model. I will not not elaborate more about the details on how to pull data from database using EF. If you are new to Entity Framework then you can take a look at my previous post that outlined the details about EF:
Here’s the code behind for the whole stuff:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
namespace WebFormsDemo
{
public class Customer
{
public string Company { get; set; }
public string Name { get; set; }
public string Title { get; set; }
public string Address { get; set; }
}
public partial class GridViewPagingWithLINQ : System.Web.UI.Page
{
private DB.NORTHWNDEntities northWindDB = new DB.NORTHWNDEntities();
private List<Customer> GetCustomerEntity() {
var customer = from c in northWindDB.Customers
select new Customer {
Company = c.CompanyName,
Name = c.ContactName,
Title = c.ContactTitle,
Address = c.Address
};
return customer.ToList();
}
private void BindCustomerListGrid(int pageIndex) {
int totalRecords = GetCustomerEntity().Count;
int pageSize = 10;
int startRow = pageIndex * pageSize;
grdCustomer.DataSource = GetCustomerEntity().Skip(startRow).Take(pageSize);
grdCustomer.DataBind();
BindPager(totalRecords, pageIndex, pageSize);
}
private void BindPager(int totalRecordCount, int currentPageIndex, int pageSize) {
double getPageCount = (double)((decimal)totalRecordCount / (decimal)pageSize);
int pageCount = (int)Math.Ceiling(getPageCount);
List<ListItem> pages = new List<ListItem>();
if (pageCount > 1) {
pages.Add(new ListItem("FIRST", "1", currentPageIndex > 1));
for (int i = 1; i <= pageCount; i++) {
pages.Add(new ListItem(i.ToString(), i.ToString(), i != currentPageIndex + 1));
}
pages.Add(new ListItem("LAST", pageCount.ToString(), currentPageIndex < pageCount - 1));
}
rptPager.DataSource = pages;
rptPager.DataBind();
}
protected void Page_Changed(object sender, EventArgs e) {
int pageIndex = Convert.ToInt32(((sender as LinkButton).CommandArgument));
BindCustomerListGrid(pageIndex - 1);
}
protected void Page_Load(object sender, EventArgs e) {
if (!IsPostBack) {
BindCustomerListGrid(0);
}
}
}
}
The GetCustomerEntity() method is where we queried the data from the database using the LINQ syntax. The method returns a List of Customer. The BindCustomerListGrid() is the method in which we bind the data to the GridView. You noticed in that method that it uses the Take() and Skip() LINQ operators to chunk the data based on the page size that we passed in. The good thing about these operators is that it allows you to skip a certain number of rows, and only take a limited number of rows from that point. For example we set the page size to 10 which means that it will only select and display 10 records per page instead of selecting the entire results from the database which what the SqlDataSource is doing by default. The BindPager() method is where we construct our pager based on the totalRecords and pageSize. The Page_Changed event handles the paging which basically sets what page the grid should display.
Running the code above will show something like below:
On initial load
After paging
Using firebug, you can see the number of milliseconds the page is rendered on initial page load and on actual paging. Now let’s improve the BindCustomerListGrid() method to speed up more our paging functionality using Application variable and Caching. Here’s the modified method below:
private void BindCustomerListGrid(int pageIndex) {
int totalRecords = 0;
int pageSize = 10;
int startRow = pageIndex * pageSize;
if (Convert.ToInt32(Application["RowCount"]) == 0) {
totalRecords = GetCustomerEntity().Count();
Application["RowCount"] = totalRecords;
}
else {
totalRecords = Convert.ToInt32(Application["RowCount"]);
}
List<Customer> customerList = new List<Customer>();
if (Cache["CustomerList"] != null) {
customerList = (List<Customer>)Cache["CustomerList"];
}
else {
customerList = GetCustomerEntity();
Cache.Insert("CustomerList", customerList, null, DateTime.Now.AddMinutes(3), TimeSpan.Zero);
}
grdCustomer.DataSource = customerList.Skip(startRow).Take(pageSize);
grdCustomer.DataBind();
BindPager(totalRecords, pageIndex, pageSize);
}
As you can see we store the value of totalRecords on Application variable and use that on subsequent request. This will minimize database calls because we will not be calling GetCustomerEntity().Count() anymore and instead use the value stored in the Application variable. Another change we made is that we store the result set in a cache so that again we will not be hitting the database on each request. You set the value of the Application variable to 0 and set the Cache to null in the event where you do an update, insert or delete.
Here’s the output below when running the code:
As you notice there’s a big change on the performance of page loading time and on subsequent request. That’s it. I hope someone find this post useful! | http://geekswithblogs.net/dotNETvinz/archive/2012/08/10/gridview-custom-paging-with-linq.aspx | CC-MAIN-2014-41 | en | refinedweb |
Connecting to MYSQL Database in Java
Connecting to MYSQL Database in Java I've tried executing the code...("MySQL Connect Example.");
Connection conn = null;
String url = "jdbc:mysql://localhost/";
String dbName = "textbook";
String driver
MySQL Create Database
MySQL Create Database
MySQL... and choosing the Create New Table option.
The MySQL Table Editor can..., executing, and optimizing SQL queries for your MySQL Database Server. The MySQL Query
MYSQL Database
MYSQL Database Can any one brief me about how to use MYSQL Database to store the create new database, create tables.
Thanks.
Hi, the MySQL database server is most popular database server and if you want to know
doubt in connecting mysql in flex - XML
doubt in connecting mysql in flex The ?Create application from database? is a Flex 3 feature that enable you to create simple applications in few...
CREATE DATABASE `users` ;
Create a table:
CREATE TABLE `accounts` (
`id` INT
doubt in connecting to mysql in flex - XML
doubt in connecting to mysql in flex The ?Create application from database? is a Flex 3 feature that enable you to create simple applications in few...
CREATE DATABASE `users` ;
Create a table:
CREATE TABLE `accounts` (
`id
MySQL Client
Engle
This all-in-one tool will help you create, manage and edit MySQL databases....
The program makes working with MySQL easy without hiding the language from the user... graphical client MySQLCC (MySQL Control Center). This general-purpose client
MySQL Client
gurus.
The program makes working with MySQL easy without hiding...:
The interactive graphical client MySQLCC (MySQL Control Center... for inserting and viewing data to a table of MySQL database. The sample is very
MySQL Front
Database. These MySQL Front tools actually helps you in working
fast and easily with the MySQL database. Here is the list of MySQL Front end
tools:
What...-developers using the popular MySQL-Database. It allows you to manage and browse
Mysql Loader Control File
Mysql Loader Control File
Mysql Loader Control File is the mean to import a data to a plain text from
Mysql database.
Understand with Example
The Tutorial
Mysql Loader Control File
illustrate an example from 'Mysql Loader Control File'.To
grasp this example we create... Mysql Loader Control File
Mysql Loader Control File is the mean to import a data
Database
) external keys
4.( notepad ++ is used here) write the SQL commands to create the database, create and populate tables, query individual tables. (You must...Database Hi, i need help building a database based on something like
mysql
you need to download the mysql-connector jar file for connecting java program from mysql database.......
Hi friend,
MySQL is open source database... is the link for the page from where you can understand how to Download and Install MySQL>
Welcome to the MySQL Tutorials
will learn how to create and delete
the database in MySQL. MySQL... will be learn how to create database and create a
specific columns in MySQL... of the
Data Definition statements supported by MySQL like CREATE DATABASE
connecting to access database
Access Driver(*.mdb)
Select database name and Create the DSN name (e.g access...connecting to access database print("code sample");Hi I Write java... this there is no error but my data is not going to my Acess Database.
There is working
Setup MySQL Database
/mysql/mysql5/Installing-MySQL-on-Windows.shtml
Creating Database :
You can create mysql database...Setup MySQL Database
In this section we will create database and table
Connecting to MySQL database and retrieving and displaying data in JSP
page
Connecting to MySQL database
and retrieving and displaying data in JSP page...;
This tutorial shows you how to connect to MySQL database and retrieve the
data...;org.gjt.mm.mysql.Driver").newInstance();
Connecting to your database
To connect
MySql database - SQL
to retrieve the data from Ms-access then you create a database , table and create a connection with this. Then you retrieve the data from the database.
Thanks...MySql database hello sir,
i am trying to write a code which should
Null pointer exceptation-Java Servlet web application,Problem connecting with MYSQL database
Null pointer exceptation-Java Servlet web application,Problem connecting with MYSQL database Hi everyone
i would like to ask few question here... system won't be able to connect to database in pooling environment. i try follow some
Connecting to a MySQL Database in Java
Connecting to a MySQL Database in Java
... on connecting to a MySQL database, after going through
this program you... for a
manipulation. We have many database provided like Oracle, MySQL
etc. We
Connecting to MySQL database and retrieving and displaying data in JSP
page
database I want to let the user select one of the database type(mysql,ms sql or db2) from the combo box present on the swing gui and then let him give the name of the database name that he want to create in a textfield
Connecting to the Database Using JDBC and Pure Java driver
Connecting to the Database
JDBC Driver
In our search
engine we are using MySQL database server and MM.MySQL Driver
for connecting our application to the database. MM.MySQL Driver
MySQL Create Table
MySQL Create Table
Here, you will read the brief description about the MySQL create table. The
CREATE TABLE statement is used for creating a table in database.
database
; Have you run this query directly into the Mysql database? Here it works properly.
Have you run this query directly into the Mysql database? Here...database when i am writing this code
CREATE TABLE student
MySQL Configuration
mysql control server configuration.
MySQL Standard configuration
MySQL Standard version of the mysql database server. MySQL... database engine. standard configuration option is used for create a new user
get
Database
Database i want to store the uploaded video and image for this which datatype we want to use in creation of the table in MySQL
You have to use 'longblob' datatype
CREATE TABLE `file
How can we create a database using PHP and mysql?
How can we create a database using PHP and mysql? How can we create a database using PHP and mysql
update mysql database
update mysql database update mysql database
connecting databases
connecting databases I need to connect mysql on 2 or more remote pc'c.
how can i giv the ip address for 2 or more systems.
is it possible to connect to the required systems by user specifying the database and table name
my
MySQL Creating and Deleting Database
CREATE USER privilege or DELETE privilege for the mysql database. The
general...
MySQL Creating and Deleting Database
... and
delete the database in MySQL. MySQL provides the both commands. In this section
you
Database
Database In MySQL table i am adding the fields of name,photo,video... me procedure is it necessary to create different tables for each category.and... page then it automatically save into MySQL.but i am not create the table
Creating a Database in MySQL
. In this example we are going to create a
database by
MySQL and with the help...
Creating a Database in MySQL
After establishing the connection with MySQL
database by using
MySQL Database Training
MySQL data with SQL.
How to create a simple MySQL
database Table...
MySQL Database Training
MySQL
Training Course Objectives
How
PHP Make a shoutbox without using MYSQL Tutorial
specifying any valid database name, MySQL will
activate the database, now to create...
PHP Create a Shoutbox using MySQL
Make a shoutbox (mini forum) using MYSQL
database. Now to make
how to create a php script to download file from database mysql
how to create a php script to download file from database mysql how to create a php script to download file from databse mysql
Database - mysql - SQL
Database - mysql size limit What is the size limit for any mysql database
mysql
mysql what is
MySQL Training ? Online Free MySQL Training
to create database and create a specific
columns in MySQL. And you can also learn about... Definition statements supported by
MySQL like CREATE DATABASE, CREATE TABLE, ALTER... in mysql database tables. In this section we will describe you about Create User
XML parsing to Mysql database
XML parsing to Mysql database Can someone please post the code for parsing an XML file into Mysql database using SAX
Data retrieve from mysql database
Data retrieve from mysql database Hi sir,
please give some example of jsp code for retrieving mysql database values in multiple dropdown list...:mysql://localhost:3306/";
String dbName = "test";
String driver
Backing Up and Restoring A MySQL Database
admin -p admin --no-create-info accounts > accounts.sql
Restoring MySQL Database...;
This tutorial explains the how to backup and restore
the MySQL Database. Databases...; backup data can be used to restore the Database.
Backing Up MySQL Database
MySQL
PHP Mysql Database Connection
PHP Mysql Database Connection
PHP Mysql Database Connection is used to build a connection...
The Tutorial illustrate an example from PHP Mysql Database Connection
MySQL Database
MySQL Database
MYSQL... access programs.
* MySQL Classic is the standard storage engine without...;
The
Database Design for MySQL
Database Designer for MySQL is a handy tool
MySQL For Window
Graphical User Interface (GUI) allows you to create/edit all MySQL database objects....
MySQL Database Server and Microsoft Windows
The Windows version of the MySQL Database Server accounts for over 40 percent of the downloads
Connecting to the Database Using JDBC and Pure Java driver
Create a counter in mySQL 5 database through Java - SQL
Create a counter in mySQL 5 database through Java Dear Editor... question regarding Java & mySQL 5 database....
==============================================================
This is an example of mySQL5 database as shown above.
For example "Bee
mysql query
mysql query how do transfer into the excel data to my sql
Hello Friend,
First of all create a dsn connection.For this,Follow these steps:
1)Go to the start<<Control Panel<<Administrative Tools<<
Backing Up and Restoring A MySQL Database
;
This tutorial explains the how to backup and restore
the MySQL Database...; backup data can be used to restore the Database.
Backing Up MySQL Database
MySQL database backup can be accomplished in two ways:
a) Copying the raw mysql
Establish a Connection with MySQL Database
Establish a Connection with MySQL Database
... coding methods of establishing the
connection between MySQL database and quartz application for updating and
manipulating the data of MySQL database tables. Here
Setting up MySQL Database and Tables
Setting up MySQL Database and Tables
... Database and you know
how to work with the MySQL database. To access the database....
CREATE
DATABASE `struts-hibernate
PHP Create Database
PHP Create Database
To create Database in MySQL:
$) Using MySQL console:
i...) Type create database database_name. Enter your
desired database name in place of database_name e.g. create database student
or How to Topic
database in mysql?
How to create a table in mysql database?
How do you migrate from MySQL 4.x to 5.0...;
How do I connect to my MySQL database with an external
MYSQL Java Connector Library
and MYSQL database. Downloading Java SDK and MYSQL server
is not sufficient to create a database application in Java. You will also
required a MYSQL Java... for MySQL required for connecting Java and MYSQL Database
Server. You can download
how can i create a mysql database to connect to this code - JDBC
how can i create a mysql database to connect to this code i need help creating a mysql database for this code.
code is
import java.awt....");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/register In MYSQL database i m given as the email id as the char but i enter the email id it gives manually error.how can i recover that error
For email, use the data type varchar
Connection to Database
is the code how I am connecting to MySQL: I am connection to MySQL database in 2... I manually make a connection to MySQL database in my web pages? How joomla is connection to MySQL without getting any connection error?
For reference, My
database
the names of the databases present in mysql database on a Jlist that is already present on the gui and when the user selects a particular database,the tables present under that database should be displayed on another Jlist which is present
Backup MySQL Database - JSP-Servlet
Backup MySQL Database Database Sir I have been reading Rose's india tutorial "Using MySQL Database with JSP/Servlet". In the Tutorial you have shown an example of backing up the database. When I tried to backup database
MySQL NOT IN
will create a database table in
MySQL using sql create query named purchase then we...MySQL NOT IN
In this section we will read about how to use the NOT IN function in MySQL
with a simple example.
MySQL NOT IN() function specifies
database
database how to get information about database like,
what are the names of tables that database includes ?
what are the names of fields in corresponding tables ?
in mysql database on linux environment
Here is a code
Database
Database Thank you for ur immediate reply....
I wanted to know if it is possible to the retrieve and display the
names of the databases that are present in mysql on a jlist
problem in selecting second arraylist from mysql database
in mysql database.
In the below program , i have hard-coded that second list, but i want second list to be dynamic from database.
Please, help me out.
Thank...problem in selecting second arraylist from mysql database Hi
Connecting to a database through the Proxy.
Connecting to a database through the Proxy. Connecting to a database through the Proxy I want to connect to remote database using a program that is running in the local network behind the proxy. Is that possible
database
database How can i get combo box values from database??
or how... of combo box in java - from database?
you had given me the answer
<%@page... con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root
Create Listbox in JSP using AJAX control
will not type any letter , it gives me entire list from database (stored in Mysql...Create Listbox in JSP using AJAX control Hi everyone!!!
I want to create an application for internal portal. here i have to create one dropdown
database
database i am created one table in mysql database with one... or not. If it is already exist in database, then show a message 'Already exists...");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost
DATABASE
DATABASE how to store data into database using JDBC & SQL
import java.sql.*;
import java.awt.*;
import javax.swing.*;
import...();
Connection conn = DriverManager.getConnection("jdbc:mysql
Using MYSQL Database with JSP & Servlets.
;
In this section you learned how to work with
MySQL database server, create database...
Using MYSQL Database with JSP & Servlets.
... acceres the MYSQL
database. Here I am using MYSQL & tomcat server
MySQL Download
Database Server
MySQL is the most popular Open Source SQL database on the internet. MySQL is a relational database management system. A relational database... of an existing MySQL database.
There are some feature include :-
*All MS
restore all mysql database:cPanel MYSQL 5.1 to 5.5
restore all mysql database:cPanel MYSQL 5.1 to 5.5 restore all mysql database:cPanel MYSQL 5.1 to 5.5
Introduction to MySQL
popular open source SQL database management system.
Our MySQL tutorial is available... introduction of MySQL database. Everything from installation to the administration... and optimize the database
You will learn how to connect to MySQL database through
Struts 2 MySQL
, You will learn to connect the MySQL
database with the struts 2 application.
Follow the following steps to connect with MySQL database:
... an Action class.
First, Establish a connection with the MySQL Database
with the help
Mysql As
from 'Mysql As'.
To understand this example we create a table 'stu'. The create...
Mysql As
Mysql.... The Alias Name is helpful for database that makes it easy to write
and read
MySQL Count
MySQL Count
This example illustrates how to use count() in MySQL database.
Count(): The Count...;
Table: employee
CREATE TABLE `employee
PHP mysql database backup script - PHP
PHP mysql database backup script How can i get the database backup using PHP mysql database
MySQL Tools
, especially on Windows, knows the poor mans tools that MySQL has presented to database... could view the MySQL table schemas but not change or create new ones.
... and expertise to deliver, manage and control MySQL environments that run on Windows | http://roseindia.net/tutorialhelp/comment/84932 | CC-MAIN-2014-41 | en | refinedweb |
Using Windows PowerShell to Deploy AD RMS
Veröffentlicht: Juli 2009
Letzte Aktualisierung: Oktober 2009
Betrifft: Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 with SP1
The Active Directory-Rechteverwaltungsdienste (Active Directory Rights Management Services, AD RMS) Windows PowerShell deployment module gives you the ability to install and provision the AD RMS server role on a computer running Windows Server® 2008 R2, to upgrade a server in an AD RMS cluster following a Windows upgrade, and to remove the AD RMS server role, all by using Windows PowerShell cmdlets. The module presents a drive namespace that consists of containers representing configuration settings you must make before installing the server role. deployment module implements special-purpose cmdlets to perform tasks that cannot be performed by using common cmdlets.
Getting started
Before you can deploy AD RMS by using Windows PowerShell cmdlets, after starting Windows PowerShell, you must perform two tasks:
- Import the AD RMS Windows PowerShell deployment cmdlet module.
- Create a Windows PowerShell drive that represents the AD RMS cluster you want to create or join.
The following procedures explain how to perform each of these tasks.
Import the module
At the Windows PowerShell prompt, type:
Import-Module ADRMS
Create the drive
At the Windows PowerShell prompt, type:
New-PSDrive -Name<drivename> -
PsProvider AdRmsInstall -Root<installType>
where <drivename> is the name you want to assign to the new drive, and <installType> is the type of installation you want to perform:
- RootCluster installs the AD RMS server role as the first server in a root cluster.
- LicensingCluster installs the AD RMS server role as the first server in a licensing-only cluster.
- JoinCluster installs the AD RMS server role as a member server in an existing root or licensing-only cluster.
For example, to create a drive named RC that represents the first server in a root cluster, type:
New-PSDrive -Name RC -PsProvider AdRmsInstall -Root RootCluster | http://technet.microsoft.com/de-de/library/ee221099(v=ws.10).aspx | CC-MAIN-2014-41 | en | refinedweb |
In my last article I spoke about the Mediator pattern; today we will have a glance at the Memento Patten.
Agenda
Previous Articles
(For training related to .Net, OOP and design patterns contact me at SukeshMarla@Gmail.com.)
What is Memento Pattern?
The GOF says the "Memento Pattern lets us capture and externalize an object's internal state so that the object can be restored to this state later".
In short it adds the ability to UNDO to objects.
When to use Memento Pattern?
Can anyone tell me which is the best feature provided in Visual Studio?
Any guess? It's Undo and Redo. I don't think there is any developer who hasn't used this and praised Microsoft for the feature.
In OOP, we create an object of a class, assign values to properties (in other words we change the state of an object). Later we again change the state.
Now the point is: What if, it requires to rollback an object to a previous state?
Journey to Memento Pattern
Main Problem
Some provision for storing and retrieving the state of an object is needed.
Solution 1
Create 2 instances of the same object. One will be used as the backup object.
Problem 1
Solution 1 not accepted.
What if only part of the object needs to be restored? For example we have a Car object with 2 properties CurrentSpeed and TyreLife and it's possible to restore the Current speed but not Tyrelife.
Solution 2
Create one more class which will act as a Memento object that will contain a replica of the properties in the original class which can be restored.
For above example we will create a class called CarMemento with a single property called CurrentSpeed.
Problem 2
Solution 2
Seems fine and can be accepted but, where will be the backup (code that copies the value from an actual object to a Memento object) and restore logic (code that copies value from a Memento object to an actual object) will be?
Writing such logic in the final client code, makes the client code more complicated plus it's not possible to reuse the same backup and restore logic for other clients.
Solution 3
Backup and restore logic will be a part of the original class.
Here the Car class will have two member functions, SaveBackup and RestoreBackup.
These 2 functions answer WHAT to be stored and restored.
Problem 3
Solution 3 accepted.
We understad now. Now the original class will be responsible for its backup and restoration. It will create the Memento object which will be used by itself later for restoration purposes.
Wait a minute!! Where will the Memento object created by the original class (Car class) will be stored?
Solution 4
A separate class is created called Caretaker, which will store the Memento object created by the Original class.
Considering the example we are discussing about Car, the solution will be to create a class called CarCareTaker with the property of type CarMemento.
Question
Why is a separate class required for storing the Memeto Object, why we can't use the original class (Car class) for this purpose? (In other words why don't we create a property of type CarMemento in the Car class itself?)
Answer
Consider the client wants to store multiple backups, so that multiple undo is possible. Or it may possible, one asks for the restoration by a Time Period (restore my object to a state it was at 20/10/2012 2 PM).
Now the logic which decides how restoration and backup is to be done becomes more complex and it violates the SRP – Single Responsibility Principle.
Solution 4 accepted
Different components of Memento Pattern
Finally we conclude with the following components:
1. Originator – Class whose state needs to be restored. It will define methods that will specify what needs to be restored.2. Memento – Class which contains replica of states defined in the Originator class. The Originator will be responsible for its creation.3. CareTaker – Decides how restoration works.
Note: CareTaker is not required to always exist. Some people just skip that.
It depends on your problem statement, if you want to keep your "How backup and restore work" logic separate from "What is need to be backup and restore" logic, then probably use this class.
(For training related to .Net, OOP and design patterns contact me at SukeshMarla@Gmail.com)
Practical Demonstration
Output
Create Concrete Class Carpublic class Car{ public int CurrentSpeed{get;set;} public int TyreLife{ get;set;}}
Create Memento Classinternal class CarMomento{ public int CurrentSpeed{get;set;}}
Add SaveBackup and RestoreBackup methods to the Car Class to decide what needs backup and restore.internal CarMomento SaveBackup(){ return new CarMomento() { CurrentSpeed = this.CurrentSpeed };}internal void RestoreBackup(CarMomento objTaker){ this.CurrentSpeed = objTaker.CurrentSpeed;}
Create Care Takerpublic class CarCareTaker{ List<CarMomento> CarBackups = new List<CarMomento>(); public void CreateBackup(Car objCustomer) { CarBackups.Add(objCustomer.SaveBackup()); } public void RestoreBackup(Car objCustomer,int Index) { objCustomer.RestoreBackup(CarBackups[Index]); for(int i = CarBackups.Count - 1; i >=Index; i--) { CarBackups.RemoveAt(i); } }}
Client CodeCar objCar;CarCareTaker objCareTaker = new CarCareTaker();void btnBackup_Click(object sender, EventArgs e){ Button objSender = sender as Button; objCareTaker.RestoreBackup(objCar, int.Parse(objSender.Tag.ToString()) - 1); this.FunPriSetControls();} private void BtnIncreaseSpeed_Click(object sender, EventArgs e){ objCareTaker.CreateBackup(objCar); objCar.CurrentSpeed++; objCar.TyreLife -= 10; this.FunPriSetControls();}Class Diagram
Hope you enjoyed reading this article.
©2014
C# Corner. All contents are copyright of their authors. | http://www.c-sharpcorner.com/UploadFile/SukeshMarla/learn-design-pattern-%E2%80%93-memento-pattern/ | CC-MAIN-2014-41 | en | refinedweb |
your client and server can share code.
For the sake of argument we will be using this service interface in the examples that follow.
[ServiceContract(Namespace = "")]
public interface IInformationService
{
[OperationContract]
Task<ZombieTypeSummaryCollection> ListZombieTypes();
[OperationContract]
Task<ZombieTypeDetails> GetZombieTypeDetails(int zombieTypeKey);
[OperationContract]
Task<int> LogIncident(SessionToken session, ZombieSighting sighting);
}
Every method returns a Task or Task<T> in order to support the async/await keywords in .NET 4.5.
Reasons to Not Use the Proxy Generator
Immutables and Data Contracts
At this point it is pretty well established that immutable objects are less error prone. Unless the code that consumes the class actually needs to directly edit a property, it should be marked as read-only so mistakes don’t occur.
Here is an example class that would be bound to a read-only display:
using System; using System.Runtime.Serialization; namespace Zombie.Services.Definitions { [DataContract(Namespace = "")] public class ZombieTypeSummary { public ZombieTypeSummary(string zombieTypeName, int zombieTypeKey, string briefDescription = null, Uri thumbnailImage = null) { ZombieTypeName = zombieTypeName; ZombieTypeKey = zombieTypeKey; BriefDescription = null; ThumbnailImage = thumbnailImage; } [Obsolete("This is only used by the DataContractSerializer", true)] public ZombieTypeSummary() { } [DataMember] public string ZombieTypeName { get; private set; } [DataMember] public int ZombieTypeKey { get; private set; } [DataMember] public string BriefDescription { get; private set; } [DataMember] public Uri ThumbnailImage { get; private set; } } }
You will notice one strange thing in the code above. It has a public constructor that has been marked obsolete. Even though WCF doesn’t actually invoke this constructor when deserializing object, it still requires it to exist. Add in a few attributes so WCF knows which fields should go over the wire and we’re done.
If we look at the proxy service, we see something only vaguely resembling what we started with:
[DebuggerStepThroughAttribute()] [GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] [DataContractAttribute(Name = "ZombieTypeSummary", Namespace = "")] [SerializableAttribute()] [KnownTypeAttribute(typeof(ZombieTypeDetails))] public partial class ZombieTypeSummary : object, IExtensibleDataObject, INotifyPropertyChanged { [NonSerializedAttribute()] private ExtensionDataObject extensionDataField; [OptionalFieldAttribute()] private string BriefDescriptionField; [OptionalFieldAttribute()] private Uri ThumbnailImageField; [OptionalFieldAttribute()] private int ZombieTypeKeyField; [OptionalFieldAttribute()] private string ZombieTypeNameField; [BrowsableAttribute(false)] public ExtensionDataObject ExtensionData { get { return this.extensionDataField; } set { this.extensionDataField = value; } } [DataMemberAttribute()] public string BriefDescription { get { return this.BriefDescriptionField; } set { if ((object.ReferenceEquals(this.BriefDescriptionField, value) != true)) { this.BriefDescriptionField = value; this.RaisePropertyChanged("BriefDescription"); } } } [DataMemberAttribute()] public Uri ThumbnailImage { get { return this.ThumbnailImageField; } set { if ((object.ReferenceEquals(this.ThumbnailImageField, value) != true)) { this.ThumbnailImageField = value; this.RaisePropertyChanged("ThumbnailImage"); } } } [DataMemberAttribute()] public int ZombieTypeKey { get { return this.ZombieTypeKeyField; } set { if ((this.ZombieTypeKeyField.Equals(value) != true)) { this.ZombieTypeKeyField = value; this.RaisePropertyChanged("ZombieTypeKey"); } } } [DataMemberAttribute()] public string ZombieTypeName { get { return this.ZombieTypeNameField; } set { if ((object.ReferenceEquals(this.ZombieTypeNameField, value) != true)) { this.ZombieTypeNameField = value; this.RaisePropertyChanged("ZombieTypeName"); } } } public event PropertyChangedEventHandler PropertyChanged; protected void RaisePropertyChanged(string propertyName) { PropertyChangedEventHandler propertyChanged = this.PropertyChanged; if ((propertyChanged != null)) { propertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } }
Sidebar: Performance and PropertyChangedEventArgs
Let’s say we are actually using a mutable property. Another performance problem can come from creating instances of PropertyChangedEventArgs. Individually, each one is incredibly cheap. The strings used to populate them are interned so all you are paying for is a single allocation per event.
The sticking point is of course “per event”. If you have lots of events being fired, you are going to be creating unnecessary memory pressure and more frequent garbage collection cycles. And if the events cause other objects to be allocated, you are interleaving short and long-lived objects. Usually this isn’t a problem, but in performance sensitive applications it can be. Instead you’ll want to cache the event args as shown below:
static readonly IReadOnlyDictionary<string, PropertyChangedEventArgs> s_EventArgs = Helpers.BuildEventArgsDictionary(typeof(ZombieSighting)); void OnPropertyChanged([CallerMemberName] string propertyName = null) { OnPropertyChanged(s_EventArgs[propertyName]); } public DateTimeOffset SightingDateTime { get { return m_SightingDateTime; } set { if (m_SightingDateTime == value) return; m_SightingDateTime = value; OnPropertyChanged(); } }
It is rather surprising the proxy generator didn’t create its own event args cache. It wouldn’t even need a dictionary lookup, it could just emit static fields such as this:
static readonly PropertyChangedEventArgs s_SightingDateTime = new PropertyChangedEventArgs("SightingDateTime");
Validation, Calculated Properties, and the Like
Using traditional proxy services, validation methods, calculated properties, and the like tend to be shared via copy-and-paste. This can be error prone, especially if the code base is undergoing a lot of churn. They can be shared using partial classes in separate files, with some of the files shared. This makes it less error prone, but there are still severe limitations to the technique.
A well designed code generator (e.g. ADO.NET Entity Framework) will create “XxxChanging” and “XxxChanged” partial methods. This allows developers to inject additional logic in the property setter. Unfortunately the proxy generator doesn’t do this, forcing the developer to attach property changed listeners in the constructor and the OnDeserialized method.
Another problem is declarative validation cannot be shared between the client and server. Since the proxy generates the properties, there is no place to add the appropriate attributes.
Collections
As any WCF developer will tell you, the proxy generator completely disregards collection types. The client can choose between arrays, lists, and observable collections but any type specific collection will be lost. In fact, as far as the WCF proxy generator is concerned, all collections might as well be exposed as IList<T>.
Bypassing the proxy generator fixes this problem, but introduces some new problems. Specifically, you cannot use the DataContract attribute on collections. This means collections cannot have any serialized properties, a rather unfortunate design decision considering SOAP is XML based and XML is more than capable of expressing the concept of a collection with attributes/properties.
If you can recalculate all of the collection’s properties from its child items, you can regenerate them on the fly. Otherwise, you’ll have to separate the class into separate normal and collection classes.
Code Generation
A major source of preventable development bugs is the proxy code generator itself. Since it requires the server to be running when the proxy is updated, it is difficult to integrate into the normal build process. Instead the developer has to manually invoke the update, a task easily overlooked. While this is unlikely to create production problems, it can waste developer time trying to figure out why service calls suddenly stopped working.
Implementing Proxyless WCF
The basic design pattern is so simple it is a wonder why the proxy generator even exists. (Well not entirely; proxy generation is still needed when consuming a non-WCF service.) As you can see, all you need to do is subclass ClientBase with the service interface you wish to implement and expose the Channel property. The constructors are recommended, but optional.
using System; using System.ServiceModel; using System.ServiceModel.Channels; namespace Zombie.Services.Definitions { public class InformationClient : ClientBase<IInformationService> { public new IInformationService Channel { get { return base.Channel; } } public InformationClient() { } public InformationClient(string endpointConfigurationName) : base(endpointConfigurationName) { } public InformationClient(string endpointConfigurationName, string remoteAddress) : base(endpointConfigurationName, remoteAddress) { } public InformationClient(string endpointConfigurationName, EndpointAddress remoteAddress) : base(endpointConfigurationName, remoteAddress) { } public InformationClient(Binding binding, EndpointAddress remoteAddress) : base(binding, remoteAddress) { } } }
Adding Support for Dependency Injection
A nice side effect of this pattern is it easily supports dependency injection for the purpose of unit testing. To do this, we first need a constructor that accepts the service interface. Then we override or shadow some of the methods exposed by ClientBase.
private IInformationService m_MockSerivce; public InformationClient(IInformationService mockService) : base(new BasicHttpBinding(), new EndpointAddress("")) { m_MockSerivce = mockService; } public new IInformationService Channel { get { return m_MockSerivce ?? base.Channel; } } protected override IInformationService CreateChannel() { return m_MockSerivce ?? base.CreateChannel(); } public new void Open() { if (m_MockSerivce == null) base.Open(); }
The astute reader will notice this isn’t the cleanest API and leaves some vulnerabilities. For example, a QA developer could cast down to the base class and call the real Open method directly. As long as this is a known limitation, mistakes should be rare. And with the fake address, there is no chance of it actually connecting to a real server.
Partial Code Sharing Options
The default option for code sharing between a .NET server and .NET or WinRT client is to simply share an assembly reference. But there will be times when you want to only share part of a class between server and client. There are two ways to do it:
Option 1 is to use linked files with conditional compilation directives. This has the advantage of putting everything in one place, but can be quite cluttered.
Option 2 also uses linked files; but instead of conditional compilation you use a partial class across multiple files. One file is shared, while another has client-only or server-only code.
Silverlight Considerations
This pattern can be used with Silverlight, but there are additional considerations. First of all, Silverlight’s version of WCF requires all service methods to be written in the old IAsyncResult style.
[ServiceContract(Namespace = "")] public interface IInformationService { [OperationContractAttribute(AsyncPattern = true)] IAsyncResult BeginListZombieTypes(AsyncCallback callback, object asyncState); ZombieTypeSummaryCollection EndListZombieTypes(IAsyncResult result); [OperationContractAttribute(AsyncPattern = true)] IAsyncResult BeginGetZombieTypeDetails(int zombieTypeKey, AsyncCallback callback, object asyncState); ZombieTypeDetails EndGetZombieTypeDetails(IAsyncResult result); [OperationContractAttribute(AsyncPattern = true)] IAsyncResult BeginLogIncident(SessionToken session, ZombieSighting sighting, AsyncCallback callback, object asyncState); int EndLogIncident(IAsyncResult result); }
In order to use the new async/await style, you’ll have to rewrap the interface in tasks using the FromAsync function.
public static class InformationService { public static Task<ZombieTypeSummaryCollection> ListZombieTypes(this IInformationService client) { return Task.Factory.FromAsync<ZombieTypeSummaryCollection>(client.BeginListZombieTypes(null, null), client.EndListZombieTypes); } public static Task<ZombieTypeDetails> GetZombieTypeDetails(this IInformationService client, int zombieTypeKey) { return Task.Factory.FromAsync<ZombieTypeDetails>(client.BeginGetZombieTypeDetails(zombieTypeKey, null, null), client.EndGetZombieTypeDetails); } public static Task<int> LogIncident(this IInformationService client, SessionToken session, ZombieSighting sighting) { return Task.Factory.FromAsync<int>(client.BeginLogIncident(session, sighting, null, null), client.EndLogIncident); } }
About Zombie Standard Reference
We are in the process of a creating a reference application for demonstrating the differences between various techniques and technologies on the .NET platform. Rather than a typical hello world application, we decided to create the Zombie Standard Reference. This represents a set of applications for reporting zombie sightings, managing inventory (e.g. anti-zombie vaccines), and dispatching investigators. This will allow us to look at databases, mobile applications, geo-location/correction, and a host of other common features useful in real world applications.
As each article is published we will be updating the source code on CodePlex..
F# WSDL TypeProvider is a alternative, in some cases
by
Faisal Waris
The obvious limitation (as you have mentioned) is that it only works with WCF clients and services.
The F# WSDL TypeProvider uses code generation under the covers (the results can be cached) but all of that is hidden from the developer and it works with non-WCF services, too.
See docs here: msdn.microsoft.com/en-us/library/hh362328.aspx
The F# Type Provider is not meant for implementing service interfaces and so is not suitable for all scenarios (such as mock | http://www.infoq.com/articles/WCF-Code-Sharing/ | CC-MAIN-2014-41 | en | refinedweb |
Synchronization and threading services.
#include <cc++/config.h>
#include <cc++/string.h>
#include <ctime>
#include <pthread.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>
class ost::Mutex
The Mutex class is used to protect a section of code so that at any given time only a single thread can perform the protected operation.
class ost::MutexLock
The MutexLock class is used to protect a section of code so that at any given time only a single thread can perform the protected operation.
class ost::ThreadLock
The ThreadLock class impliments a thread rwlock for optimal reader performance on systems which have rwlock support, and reverts to a simple mutex for those that do not.
class ost::ReadLock
The ReadLock class is used to protect a section of code through a ThreadLock for 'read' access to the member function.
class ost::WriteLock
The WriteLock class is used to protect a section of code through a ThreadLock for 'write' access to the member function.
class ost::MutexCounter
The Mutex Counter is a counter variable which can safely be incremented or decremented by multiple threads.
class ost::AtomicCounter
The AtomicCounter class offers thread-safe manipulation of an integer counter.
class ost::Conditional
A conditional variable synchcronization object for one to one and one to many signal and control events between processes.
class ost::Semaphore
A semaphore is generally used as a synchronization object between multiple threads or to protect a limited and finite resource such as a memory or thread pool.
class ost::SemaphoreLock
The SemaphoreLock class is used to protect a section of code through a semaphore so that only x instances of the member function may execute concurrently.
class ost::Event
The Event class implements a feature originally found in the WIN32 API; event notification.
class ost::Thread
Every thread of execution in an application is created by instantiating an object of a class derived from the Thread class.
class ost::Cancellation
A class to automatically set the thread cancellation mode of a member function.
class ost::PosixThread
class ost::ThreadKey
This class allows the creation of a thread context unique 'pointer' that can be set and retrieved and can be used to create thread specific data areas for implementing 'thread safe' library routines.
class ost::TimerPort
Timer ports are used to provide synchronized timing events when managed under a 'service thread' such as SocketService.
class ost::SysTime
This class is used to access non-reentrant date and time functions in the standard C library.
namespace ost
#define CCXX_POSIX
#define TIMEOUT_INF ~((timeout_t) 0)
#define ENTER_CRITICAL enterMutex();
#define LEAVE_CRITICAL leaveMutex();
#define ENTER_DEFERRED setCancel(cancelDeferred);
#define LEAVE_DEFERRED setCancel(cancelImmediate);
#define psleep(x) (sleep)(x)
typedef pthread_t cctid_t
typedef unsigned long timeout_t
typedef int ost::signo_t
struct timespec * ost::getTimeout (struct timespec *spec, timeout_t timeout)
void ost::wait (signo_t signo)
Thread * ost::getThread (void)
Synchronization and threading services.
Generated automatically by Doxygen for GNU CommonC++ from the source code. | http://www.makelinux.net/man/3/T/thread.h | CC-MAIN-2014-41 | en | refinedweb |
Source: Deep Learning on Medium
Guide to become a Full Stack Machine Learning Engineer(Part 1): Train
Objective: To create a Machine Learning prediction model, serve it by a http server on a remote cloud server and manage it like you would on production.
This is a hands-on approach where we will be writing code from scratch with explanation of all the code and jargons.
The final code for reference can be found here
This is part 1 of a 4 part series:
- Training a very basic ML model(which tells if there is any beer in a given image) using keras(a python deep-learning library). We won’t get into depth of it, mostly intuition based.
- Writing an independent predict function which serves the model and then serving the prediction using a HTTP API POST request.(here)
- Dockerising the prediction api. Setting up a Dockerfile and building our own docker image. Deploying the prediction docker on a cloud machine. We will be able to the call the prediction api from anywhere and see the status and logs of the server for debugging.(here)
- Setting up basic CI/CD pipeline, i.e. setup our infra such that performing a commit automatically deploys the new code to production.(here)
Project structure
.
├── data/ # This folder contains the training data
└── dataset/
├── train/
├── beer/
└── not_beer/
└── validate/
├── beer/
└── not_beer/
├── scripts # These contain the standalone scripts.
├── src # Source files
├── training
└── train.py
├── serving
└── serve.py
├── prediction
├── predict.py
└── run_predict_on_file.py
└── config.py
├── test # Automated tests
├── .gitignore # files to be ignored in commits
├── LICENSE
├── Makefile
├── README.md
├── serving-requirements.txt
└── training-requirements.txt
Start with creating a blank folder
mkdir to-beer-or-not-to-beer and cd into it.
Dependency Management
Then create a sandbox environment using virtualenv(
pip install virtualenv). This will enable us to experiment with pip package versions which are different from pip packages installed on our system. Create this using
virtualenv training-venv (a folder named venv gets created which will contain all your pip packages). Activate this using
source ./training-venv/bin/activate
Install the dependencies which we would be needing for training
pip install numpy==1.17.4 tensorflow==1.14 keras==2.2.4 pillow==6.2.1 google-images-download==2.8.0
It is helpful to keep track of all the packages you are using in the project and their version numbers so that your code is easy to set-up and any new breaking changes to your dependencies don’t break your working code(This happens more often than you can imagine!).
To keep track of the packages you are using run this command
pip freeze > training-requirements.txt . This will create a new file “training-requirements.txt”. In this you will find the packages you have installed and their version numbers. Reinstalling the packages is as simple as running
pip install -r training-requirements.txt .
Collecting the data
Now lets start collecting the data required. Create the scripts directory and lets create a web scrapper which will download images from google for keyword. Using this you can download your beer and not beer images. I used this script to download 1000 images of “beer” and 1000 images of “not_beer” for training and 200 each for validation. Make sure you put the data in the proper folders as shown in the project structure above.
# ./scripts/scrapers/google/image_downloader.py
from google_images_download import google_images_downloaddef image_download(output_dir, keywords , number_images):
"""
arguments:
keywords : it refers to the keywords being searched
number_images : Total number of images to be downloaded"""
response = google_images_download.googleimagesdownload()
arguments = {"keywords":keywords,"limit":number_images,"print_urls":True, "output_directory": output_dir} #creating list of arguments
paths = response.download(arguments) #passing args
print(paths) #printing absolute paths of the downloaded imagesimage_download('./data/datasets/train/beer', 'beer', 100)
Managing the configuration centrally
Before we jump into training, lets define a config.py file which we would be using to manage the model related configuration. For trying with parameters, we would just have to tweak this file. This will help us maintain a clean code.
# ./src/config.py
dataset_dir = "data/datasets/"
train_data_dir = "data/datasets/beer/train/"
validation_data_dir = "data/datasets/beer/validation/"
trained_model_name = "latest_model_ekdum_kadak"
trained_model_file = "trained_models/beer/latest.h5"
epochs = 50
img_width = 150
img_height = 150
test_img_dir = "data/datasets/beer/test_validation/"
test_img_dir_file = "data/datasets/beer/test_validation/beer.007.jpg"
Training the model
Now that we have the data, we are ready to train the model.
The right tool for an image classification job is a convnet, so let’s try to train one on our data, as an initial baseline. Since we only have few examples, our number one concern should be overfitting. Overfitting happens when a model exposed to too few examples learns patterns that do not generalise to new data, i.e. when the model starts using irrelevant features for making predictions. For instance, if you, as a human, only see three images of people who are lumberjacks, and three, images of people who are sailors, and among them only one lumberjack wears a cap, you might start thinking that wearing a cap is a sign of being a lumberjack as opposed to a sailor. You would then make a pretty lousy lumberjack/sailor classifier.
Data augmentation is one way to fight overfitting, but it isn’t enough since our augmented samples are still highly correlated. Your main focus for fighting overfitting should be the entropic capacity of your model — how much information your model is allowed to store. A model that can store a lot of information has the potential to be more accurate by leveraging more features, but it is also more at risk to start storing irrelevant features. Meanwhile, a model that can only store a few features will have to focus on the most significant features found in the data, and these are more likely to be truly relevant and to generalise better.
There are different ways to modulate entropic capacity. The main one is the choice of the number of parameters in your model, i.e. the number of layers and the size of each layer. Another way is the use of weight regularisation, such as L1 or L2 regularisation, which consists in forcing model weights to taker smaller values.
In our case we will use a very small convnet with few layers and few filters per layer, alongside data augmentation and dropout. Dropout also helps reduce overfitting, by preventing a layer from seeing twice the exact same pattern, thus acting in a way analogous to data augmentation (you could say that both dropout and data augmentation tend to disrupt random correlations occurring in your data).
The code snippet below is our first model, a simple stack of 3 convolution layers with a ReLU activation and followed by max-pooling layers. This is very similar to the architectures that Yann LeCun advocated in the 1990s for image classification (with the exception of ReLU).
from src import config
import osif __name__ == "__main__":
print("Starting training using train_data_dir->", config.train_data_dir)
train_data_dir = config.train_data_dir
validation_data_dir = config.validation_data_dir
nb_train_samples = 2000
nb_validation_samples = 400
epochs = config.epochs
batch_size = 16if K.image_data_format() == 'channels_first':
input_shape = (3, config.img_width, config.img_height)
else:
input_shape = (config.img_width, config.img_height, 3'))
model.compile(loss='binary_crossentropy', optimizer='rmsprop', metrics=['accuracy'])#=(config.img_width, config.img_height), batch_size=batch_size, class_mode='binary')validation_generator = test_datagen.flow_from_directory(validation_data_dir, target_size=(config.img_width, config.img_height), batch_size=batch_size, class_mode='binary')model.fit_generator(train_generator, steps_per_epoch=nb_train_samples // batch_size, epochs=epochs, validation_data=validation_generator, validation_steps=nb_validation_samples // batch_size)model.save(config.trained_model_file)
For data preprocessing and augmentation we use following options ->
rotation_rangeis a value in degrees (0-180), a range within which to randomly rotate pictures
width_shiftand
height_shiftare ranges (as a fraction of total width or height) within which to randomly translate pictures vertically or horizontally
rescaleis a value by which we will multiply the data before any other processing. Our original images consist in RGB coefficients in the 0-255, but such values would be too high for our models to process (given a typical learning rate), so we target values between 0 and 1 instead by scaling with a 1/255. factor.
shear_rangeis for randomly applying shearing transformations
zoom_rangeis for randomly zooming inside pictures
horizontal_flipis for randomly flipping half of the images horizontally –relevant when there are no assumptions of horizontal asymmetry (e.g. real-world pictures).
fill_modeis the strategy used for filling in newly created pixels, which can appear after a rotation or a width/height shift.
After this code completes execution, if everything goes well, a trained model file will get created in “./trained_models/beer/latest.h5” . The network will get trained faster if this code is run on a machine with GPU. The predictions don’t need GPU. it only need the trained weights of the model and the architecture. So we will be using this generated file run the predictions separately, independent of our training.
Note that this is just a basic model to provide you with intuition. Using a transfer learning on a pre-trained model might give a much better accuracy. This is enough to begin with. We can always come back later and train a better model. In the end a “<something>.h5” file will get generated which we will be using for prediction. This file can directly be used in the Prediction as it contains the information regarding the network architecture used and the weights of the neurons of the model.
In the next parts we will be serving it by a http server on a remote cloud server and managing it like you would on production. | https://mc.ai/guide-to-become-a-full-stack-machine-learning-engineerpart-1-train/ | CC-MAIN-2020-45 | en | refinedweb |
How to use contact attributes to personalize the customer experience
Contact attributes in your contact flows can provide a more personalized customer experience. For example, specify a custom flow based on comparing an attribute to a value. You then route the contact based on the value comparison, such as routing customers to different tiers of support based on their account number. Or retrieve a customer's name and save it as an attribute. Include the name attribute in a text to speech string so that the customer's name is said during the interaction.
Contact attributes are shared across all contacts with the same InitialContactId. This means that while carrying out transfers, for example, a contact attribute updated in the transfer flow updates the attribute's value in both CTR's contact attributes (that is, the Inbound and Transfer contact attributes).
The steps in the following sections describe how to use contact attributes with different blocks in a contact flow.
Using a Set contact attributes block
Use a Set contact attributes block to set a value that is later referenced in a contact flow. For example, create a personalized greeting for customers routed to a queue based on the type of customer account. You could also define an attribute for a company name or line of business to include in the text to speech strings said to a customer. The Set contact attributes block is useful for copying attributes retrieved from external sources to user-defined attributes.
To set a contact attribute with a Set contact attributes block
In Amazon Connect, choose Routing, Contact flows.
Select an existing contact flow, or create a new one.
Add a Set contact attributes block.
Edit the Set contact attributes block, and choose Use text.
For the Destination key, provide a name for the attribute, such as Company. This is the value you use for the Attribute field when using or referencing attributes in other blocks. For the Value, use your company name.
You can also choose to use an existing attribute as the basis for creating the new attribute.
Using attributes with a Lambda function
Retrieve data from a system your organization uses internally, such as an ordering system or other database with a Lambda function, and store the values as attributes that can then be referenced in a contact flow.
When the Lambda function returns a response from your internal system, the response is key-value pairs of data. You can reference the values returned in the External namespace, for example $.External.attributeName. To use the attributes later in a contact flow, you can copy the key-value pairs to user-defined attributes using a Set contact attributes block. You can then define logic to branch your contact based on attribute values by using a Check contact attributes block. Any contact attribute retrieved from a Lambda function is overwritten with the next invocation of a Lambda function. Make sure you store external attributes if you want to reference them later in a contact flow.
To store an external value from a Lambda function as a contact attribute
In Amazon Connect, choose Routing, Contact flows.
Select an existing contact flow, or create a new one.
Add an Invoke AWS Lambda function block, then choose the title of the block to open the settings for the block.
Add the Function ARN to your AWS Lambda function that retrieves customer data from your internal system.
After the Invoke AWS Lambda function block, add a Set contact attributes block and connect the Success branch of the Invoke AWS Lambda function block to it.
Edit the Set contact attributes block, and select Use attribute.
For Destination key, type a name to use as a reference to the attribute, such as customerName. This is the value you use in the Attribute field in other blocks to reference this attribute.
For the Type, choose External.
For Attribute type the name of the attribute returned from the Lambda function. The name of the attribute returned from the function will vary depending on your internal system and the function you use.
After this block executes during a contact flow, the value is saved as a user-defined attribute with the name specified by the Destination key, in this case customerName. It can be accessed in any block that uses dynamic attributes.
To branch your contact flow based on the value of an external attribute, such as an account number, use a Check contact attributes block, and then add a condition to compare the value of the attribute to. Next, branch the contact flow based on the condition.
In the Check contact attributes block, for Attribute to check do one of the following:
Select External for the Type, then enter the key name returned from the Lambda function in the Attribute field.
Important
Any attribute returned from an AWS Lambda function is overwritten with the next function invocation. To reference them later in a contact flow, store them as user-defined attributes.
Select User Defined for the Type, and in the Attribute field, type the name that you specified as the Destination key in the Set contact attributes block.
Choose Add another condition.
Under Conditions to check, choose the operator for the condition, then enter a value to compare to the attribute value. A branch is created for each comparison you enter, letting you route the contact based on the conditions specified. If no condition is matched, the contact takes the No Match branch from the block.
"$" is a special character
Amazon Connect treats the "$" character as a special character. You can't use it in a key when setting an attribute.
For example, let's say you're creating an interact block with text-to-speech. You set an attribute like this:
{"$one":"please read this text"}
When Amazon Connect reads this text, it reads "dollar sign one" to the contact instead of "please read this text." Also, if you were to include $ in a key and try to reference the value later using Amazon Connect, it wouldn't retrieve the value.
Amazon Connect does log and pass the full key:value pair
({"_$one":"please read this
text"}) to integrations such as Lambda. | https://docs.aws.amazon.com/connect/latest/adminguide/use-attributes-cust-exp.html | CC-MAIN-2020-45 | en | refinedweb |
import "github.com/weaveworks/flux/pkg/http/websocket"
client.go ping.go server.go websocket.go
IsExpectedWSCloseError returns boolean indicating whether the error is a clean disconnection.
Websocket exposes the bits of *websocket.Conn we actually use. Note that we are emulating an `io.ReadWriter`. This is to be able to support RPC codecs, which operate on byte streams.
Dial initiates a new websocket connection.
Ping adds a periodic ping to a websocket connection.
func Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (Websocket, error)
Upgrade upgrades the HTTP server connection to the WebSocket protocol.
Package websocket imports 10 packages (graph). Updated 2019-09-29. Refresh now. Tools for package owners. | https://godoc.org/github.com/weaveworks/flux/pkg/http/websocket | CC-MAIN-2020-45 | en | refinedweb |
I have table “decks” with three fields: “id”, “created_at” and “cards”
which is a 264-character string field. I have modified the model with a
constructor, as follows:
class Deck < ActiveRecord::Base
attr_reader :cards
def initialize
@cards = “12345”
end
end
If I call Deck.new from my controller, I get no errors and an object
with the “cards” attribute set appropriately to “12345”. This object can
be saved without error by calling the .save method. However, if I call
Deck.create (in order to create and save in one fell swoop), then I get
an error, shown below. If I take out the constructor method, Deck.create
works just fine.
I’d appreciate any assistance.
thanks.
yb
ArgumentError in PokerController#index
wrong number of arguments (1 for 0)
RAILS_ROOT: ./script/…/config/…
Application Trace | Framework Trace | Full Trace
c:/server/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:406:in
initialize' c:/server/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:406:innew’
c:/server/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:406:in
create' #{RAILS_ROOT}/app/controllers/poker_controller.rb:3:inindex’ | https://www.ruby-forum.com/t/setting-attribute-in-constructor-new-works-but-not-create/64376 | CC-MAIN-2020-45 | en | refinedweb |
Yes. This technique is commonly used in platform applications which require the user to log in, to keep menu contents/toolbar actions/keyboard shortcuts/window definitions hidden until the user has is authenticated.
There are two ways to do it. The most obvious way is to programmatically write files to disk at runtime (call FileUtil.getConfigRoot().createFolder(), etc.). This technique is appropriate if you are creating files which should be preserved across restarts (for example, adding folders to the Favorites window). It is completely inappropriate in the case of authentication, or any other case where you do not want the added files to be present after restart. You cannot depend on the application always being shut down normally and having a chance to clean such files up - since they are actually written to disk.
FileUtil.getConfigRoot().createFolder()
The alternative is quite simple: Write a subclass of MultiFileSystem. Put it in the default lookup.
MultiFileSystem
At runtime, when you want to add contents to the system filesystem, simply add additional filesystems to your MultiFileSystem. To remove the contents, simply remove those filesystems.
A convenient way to do this is to use XMLFileSystem - this is a filesystem created with exactly the same syntax as normal module XML layer files. The following code loads an XML filesystem, which is in an XML file in the same package as the class, called dynamicContent.xml:
dynamicContent.xml
@ServiceProvider (service=FileSystem.class)
public class DynamicLayerContent extends MultiFileSystem {
private static DynamicLayerContent INSTANCE;
public DynamicLayerContent() {
//will be created on startup, exactly once
INSTANCE = this;
}
static boolean hasContent() {
return INSTANCE.getDelegates().length > 0;
}
static void enable() {
if (!hasContent()) {
try {
INSTANCE.setDelegates(new XMLFileSystem(
DynamicLayerContent.class.getResource(
"dynamicContent.xml")));
} catch (SAXException ex) {
Exceptions.printStackTrace(ex);
}
}
}
static void disable() {
INSTANCE.setDelegates (new FileSystem[0]);
}
}
If finer grained control of what is added is needed at runtime, there are two possibilities, using this general approach:
EnumSet.of()
FileUtil.createMemoryFileSystem()
Note that as of NetBeans 6.8, you can use this technique to add contents to the system filesystem, but not to remove or mask files or folders (using _hidden in dynamic filesystem content will not work)
_hidden | http://wiki.netbeans.org/wiki/index.php?title=DevFaqDynamicSystemFilesystem&diff=33540&oldid=33539&printable=yes | CC-MAIN-2020-45 | en | refinedweb |
.
Installing and Configuring
There are many ways to get started with React. This series will be concentrating on using React as part of NPM and Node. To that end, there are some assumptions being made:
- Reader is confident with working on the command-line
- Has a recent version of Node.js installed on their system
- Has an editor like Atom installed or is comfortable with working with files from command-line editors.
Installing
Open a command-line window and run the following command in an empty directory.
npx create-react-app react-example
The npx command will execute the runner command create-react-app. This will also install the packages React, React-DOM, and React-Scripts locally.
After the installation process is done, there will now be a directory called ‘react-example’ created and configured to use React.
Note: The create-react-app runner command recommends that yarn be used. This tutorial series will be using npm and its tools instead.
Configuring
When the create-react-app runner command is used, it creates default files for using React and setups a demo application. The first action is to delete these files until we need them.
cd react-example
cd src
If using a Unix-like system, run the following (making sure that the current directory is ‘src’ inside of ‘react-example’)
rm -f *
If on a Windows system, run the following:
del *
With all of the files removed from the ‘src’ directory, create two new ones: “index.css” and “index.js”
Leave “index.css” empty for now.
Add the following content to the “index.js” file:
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; ReactDOM.render( <h1>Hello, world!</h1>, document.getElementById('root') );
In this new file, the first two actions that are happening is that the React and ReactDOM objects are being imported into the file. On the third line, the “index.css” file is being imported.
The last few lines are code are the basis of the new application. The use of ReactDOM.render() function is what kicks off the entire project.
With both “index.css” created and the new content in the file “index.js”, make sure both are saved move back to the projects’s root directory:
cd ..
Once there, start the application:
npm start
After a few seconds, a new tab or window will be opened in the default web browser. It will open to the web server started using the running React code. The results should be “Hello, world!”
What’s next?
While running using npm start, the web server will watch for any changes made to the files in “src” and will refresh the server. During development, this can be very useful to see changes in real-time.
Play around with making some changes to the HTML on line 6 of the code. | https://videlais.com/2019/05/25/learning-react-part-1-installing-and-configuring/ | CC-MAIN-2020-45 | en | refinedweb |
You want to process multiple requests in parallel, but you don necessarily want to run all the requests simultaneously. Using a technique like that in Recipe 20.6 can create a huge number of threads running at once, slowing down the average response time. You want to set a limit on the number of simultaneously running threads.
You want a thread pool. If you e writing an Internet server and you want to service requests in parallel, you should build your code on top of the gserver module, as seen in Recipe 14.14: it has a thread pool and many TCP/IP-specific features. Otherwise, heres a generic THReadPool class, based on code from gserver.
The instance variable @pool contains the active threads. The Mutex and the ConditionVariable are used to control the addition of threads to the pool, so that the pool never contains more than @max_size tHReads:
require hread class ThreadPool def initialize(max_size) @pool = [] @max_size = max_size @pool_mutex = Mutex.new @pool_cv = ConditionVariable.new end
When a thread wants to enter the pool, but the pool is full, the thread puts itself to sleep by calling ConditionVariable#wait. When a thread in the pool finishes executing, it removes itself from the pool and calls ConditionVariable#signal to wake up the first sleeping thread:
def dispatch(*args) Thread.new do # Wait for space in the pool. @pool_mutex.synchronize do while @pool.size >= @max_size print "Pool is full; waiting to run #{args.join(,)}… " if $DEBUG # Sleep until some other thread calls @pool_cv.signal. @pool_cv.wait(@pool_mutex) end end
The newly-awakened thread adds itself to the pool, runs its code, and then calls ConditionVariable#signal to wake up the next sleeping thread:
@pool << Thread.current begin yield(*args) rescue => e exception(self, e, *args) ensure @pool_mutex.synchronize do # Remove the thread from the pool. @pool.delete(Thread.current) # Signal the next waiting thread that theres a space in the pool. @pool_cv.signal end end end end def shutdown @pool_mutex.synchronize { @pool_cv.wait(@pool_mutex) until @pool.empty? } end def exception(thread, exception, *original_args) # Subclass this method to handle an exception within a thread. puts "Exception in thread #{thread}: #{exception}" end end
Heres a simulation of five incoming jobs that take different times to run. The pool ensures no more than three jobs run at a time. The job code doesn need to know anything about threads or thread pools; thats all handled by THReadPool#dispatch.
$DEBUG = true pool = ThreadPool.new(3) 1.upto(5) do |i| pool.dispatch(i) do |i| print "Job #{i} started. " sleep(5-i) print "Job #{i} complete. " end end # Job 1 started. # Job 3 started. # Job 2 started. # Pool is full; waiting to run 4… # Pool is full; waiting to run 5… # Job 3 complete. # Job 4 started. # Job 2 complete. # Job 5 started. # Job 5 complete. # Job 4 complete. # Job 1 complete. pool.shutdown
When should you use a thread pool, and when should you just send a swarm of threads after the problem? Consider why this pattern is so common in Internet servers that its built into Rubys gserver library. Internet server requests are usually I/O bound, because most servers operate on the filesystem or a database. If you run high latency requests in parallel (like requests for filesystem files), you can complete multiple requests in about the same time it would take to complete a single request.
But Internet server requests can use a lot of memory, and any random user on the Internet can trigger a job on your server. If you create and start a thread for every incoming request, its easy to run out of resources. You need to find a tradeoff between the performance benefit of multithreading and the performance hazard of thrashing due to insufficient resources. The simplest way to do this is to limit the number of requests that can be processed at a given time.
A thread pool isn a connection pool, like you might see with a database. Database connections are often pooled because they e expensive to create. Threads are pretty cheap; we just don want a lot of them actively running at once. The example in the Solution creates five threads at once, but only three of them can be active at any one time. The rest are asleep, waiting for a notification from the condition variable pool_cv.
Calling ThreadPool#dispatch with a code block creates a new thread that runs the code block, but not until it finds a free slot in the thread pool. Until then, its waiting on the condition variable @pool_cv. When one of the threads in the pool completes its code block, it calls signal on the condition variable, waking up the first thread currently waiting on it.
The shutdown method makes sure all the jobs complete by repeatedly waiting on the condition variable until no other threads want access to the pool. | https://flylib.com/books/en/2.44.1/limiting_multithreading_with_a_thread_pool.html | CC-MAIN-2020-45 | en | refinedweb |
I while back I showed you how to Make Money Blogging by setting up a simple automated WordPress blog using WP-O-Matic. I was then asked for an automated site that allowed for more robust article grabbing.
In the video below I show you how to grab content from any website and then send that to the Postie WordPress Plugin, that will post it to your site automatically. Here is an article on How to Use Postie.
All of the code I used in the Automated Website Video follows the video. Use it as you wish.
To understand any of this stuff, you might like to check out my Python How to Tutorial Video and Regex Tutorial Video.
If you have any questions or comments, leave them in the comment section below.
[adsense]
All the Code From the Video
import httplib2, re
def grabSiteTags(pageToSearch):
grabHtmlTags = re.compile(‘<title>(.{5,90})</title>|<summary>(.{5,300})</summary>|<link rel=”alternate” type=”text/html” href=”(.{5,100})”/>’, re.IGNORECASE)
allTheTags = re.findall(grabHtmlTags,pageToSearch)
for i in allTheTags:
print(i[0].replace(“\\'”,”‘”) + i[1].replace(“\\'”,”‘”) + i[2].replace(“\\'”,”‘”) + “\n”)
getTheArticle(str(i[2]))
def getTheArticle(pageToSearch):
if pageToSearch:
i = httplib2.Http(‘.cache’)
content = i.request(pageToSearch)
content = str(content)
grabHtmlTags = re.compile(‘<div>.{1,40}<p>(.{1,800})’, re.IGNORECASE)
allTheArticle = re.findall(grabHtmlTags,content)
allTheArticle = str(allTheArticle)
if (len(allTheArticle) > 100):
print(“Article: ” + allTheArticle.replace(“\\\\'”,”‘”).replace(“\\n'”,””).replace(“\\'”,”‘”).replace(“\\\\n”,””).replace(“\\\\t”,””))
else:
pass
return
def main():
urlToGet = “”
h = httplib2.Http(‘.cache’)
content = h.request(urlToGet)
grabSiteTags(str(content))
if __name__ == “__main__”: main()
Thanks alot for this tutorial. By the way you forgot to mention my name in that :D.
I also have one more question, what is the easiest way to create a Squeeze page/Sales page. Most of the such WordPress themes are expensive/professional designers charge a lot. Can you suggest a way to do this quickly. Your feedback will be highly appreciated
I use a program called Artisteer to create WordPress templates quickly. Since your so nice, tell me what you want your site to look like and I’ll make you a WordPress theme. Give me examples of sites you like 🙂
Hey, Thanks for the offer! I already made the sales page 10 days back or so but had to struggle alot. I’ll Surely try your suggestion and will definitely trouble you in case of doubts 😀
Derek,
What a great idea. I have a friend who is blind, yet managed to create a WordPress website for himself. He tries to make money by writing articles and has marginal success. For him it is exhausting, though he has been writing quite a lot and made some marginal gain with affiliate programs. This may turn out to be useful to him. Any suggestions you may have are welcome. Being familiar with Python, I will recode this article search module for him so he can just make entries and read the articles before submitting them to his WrodPress.
This is his site . I wonder if you have any ideas on this topic, his website or other ideas to throw at him. I’m trying to find a way to help him create something to become self reliant. I can do the programming for him. Just some good ideas would be very appreciated.
Now about your video, once again, you found a way to make something I would never have tried to do on my own very interesting and engaging. And it seems so simple. So, I’m tooling up with python and testing it out.
Thank you again,
Dennis
P.S. I will probably begin to annoy you with compliments, but you deserve them.
Hi Dennis, Feel free to ask questions. I actually make most of my money from running online stores. Your friend may be able to get into this. Most of my time is taken up with talking to suppliers on the telephone. I made everything for free here Create an Online Store.
It costs almost nothing to get started (Hosting Plan / Domain) so if your friend isn’t in to it it isn’t a big deal. Either way I hope that helps.
Derek
SET UP A WEBSERVER integrated with PYTHON
here are the suggestions that I have
>>> use an Apache server
>>> reading the web services article , I’ve concluded that WSGI is the way to go
>>> so in order to use it with Apache, the module mod_wsgi is the most usable
I have not set it up myself yet and haven’t started using it, but I will comment when I do and figure out more on how to use the module
This framework is said to deliver performance similar to a multi-threaded server such as the integration between Apache and PHP, since CGI is not scalable.
Hope that helps,
Stefan
* typographical error
>>> so in order to use it with Apache, the module mod_wsgi is the most usable | http://www.newthinktank.com/2010/09/create-automated-websites-with-python/ | CC-MAIN-2020-45 | en | refinedweb |
[Ruby] [Ruby on Rails] Dissolving Fat Controller-First of all, logic to model-
Introduction
This is the first post this time. I learned Ruby on Rails at school and had a refactoring curriculum, but at that point I was desperate to complete it, and I did not refactor it so I moved the controller logic to Model and made the controller clean I will write the method.
What is Fat Controller?
It means the state of Controller where the number of lines in the controller itself is large and it is difficult to follow the flow of processing (simply speaking, the outlook is bad). At school, I wrote all the logic in the Controller without being aware of it at all, but I am still fighting with the personal controller Fat Controller because I want to get closer to the code at the working level!
Isolation procedure
First of all, let’s move on to the feeling that we will move all the controller logic that has expanded tremendously to the Model. Actions are enough as public methods to be written in Controller.
And I think that there is basically no problem in Model where the logic is transferred.
Example: When you want to pull only items that the user has
Before division ↓
ruby:users.controller.rb
def show @useritems = Item.includes(:images).where(user_id:(current_user.id)).order(id: "DESC") if user_signed_in? end
Since the authentication function is implemented using devise, the id of the currently logged-in user can be obtained from “current_user.id”. In other words, I want to pull the information of the user’s item to my page (show action) of the currently logged-in user. However, this data is also used in the index action of “items.controller.rb”. So I’d like to define a method in Model and put together the description to get the user’s item.
First, Controller
ruby:users.controller.rb
def show @useritems = Item.user_items_get(current_user.id) if user_signed_in? end
Since “current_user” cannot be used on the Model side, pass it as an argument.
Then Model
Item.rb
def self.user_items_get(user_bigint) Item.includes(:images).where(user_id:(user_bigint)).order(id: "DESC") end
By doing this, even the index action of ItemController
ruby:items.cotroller.rb
def index @useritems = Item.user_items_get(current_user.id).limit(10) if user_signed_in? end
You can use it like this.
If you write a method in Model and call it in Controller, beginners tend to feel that it is a big layer, but it is important for making Controller clean, so please use it. (I haven’t reduced the number of lines in this example… lol) | https://linuxtut.com/ruby-on-rails-dissolving-fat-controller-first-of-all,-logic-to-model-6a7a1/ | CC-MAIN-2020-45 | en | refinedweb |
Everyone seems to trip up when it comes to #< and #> and dates and times.
def recent if published_on > 1.week.ago # blah end end def old if published_on < 1.week.ago # blah end end
Nobody thinks of dates and times as numbers, so its hard to do comparisons on them quickly like you would with numbers. So lets add 2 methods to our dates and times.
def after?(other) self > other end def before?(other) self < other end def recent if published_on.after?(1.week.ago) # blah end end def old if published_on.before?(1.week.ago) # blah end end
Luckily our good friends over at dzone have already a real solid impl of these 2 queries. LEFT_SIDE_LATER!
..in other news…
| https://thoughtbot.com/blog/mas-o-menos | CC-MAIN-2020-45 | en | refinedweb |
Created on 2011-09-24 22:07 by zbysz, last changed 2018-07-25 15:24 by berker.peksag. This issue is now closed.
COLUMNS is a shell variable (updated whenever the window size
changes), that usually isn't exported to programs. Therefore checking
for COLUMNS in sys.environ will not work in the majority of cases. The
proper check is to use the TIOCGWINSZ ioctl on stdout.
Why COLUMNS is not exported? Because it can change during the lifetime
of a program. Therefore it is better to use the dynamic ioctl.
I see that adding a separate module was proposed in issue #8408, which was rejected/closed. I don't have the rights to reopen, so I'll continue here.
#8408 was proposing a new module, which seems a bit overkill, since the implementation for unix and windows is about 20 lines.
I'm attaching a second version of the patch which works on windows (tested with python3.2.2 on XP). Thanks to techtonik for pointing to a windows imlementation.
> #8408 was proposing a new module, which seems a bit overkill
If a module seems overkill, then maybe add this useful function to os module. Don't leave it private to argparse module. Maybe something along these lines:
>>> import os
>>> print(os.get_terminal_size())
(80, 25)
Why do I believe a module could be better? Because I'd also like some way to detect when the terminal size has changed (without probing it all the time).
I'd feel more comfortable with the argparse fix if it were simply calling "os.get_terminal_size()". I recommend that you:
* Create a new issue called, say "add os.get_terminal_size()" proposing just the single method.
* Add that issue to the Dependencies of this issue.
Once that is fixed, then the argparse fix should be simple.
Issue #13609 created, but I don't have permission to edit the dependencies.
New version to use after #13609 is implemented: patch2.diff
OK, I guess that this could now be closed, since 13609 has been commited.
(It is currently reopened, but the proposed tweaks wouldn't influence
the usage in argparse, even if accepted).
I'm attaching a patch which updates the tests to the new $COLUMNS logic.
Previously, unsetting COLUMNS would fix the width on 80, now setting
COLUMNS=80 is the proper way to do this.
@Paul the attached patch is extremely simple and follows the work on #13609. Is it okay with you if the patch was committed?
The latest patch, using _shutil.get_terminal_size(), looks fine.
It lets environ['COLUMNS'] have priority over the end user's terminal width, as demonstrated by the change to test_argparse. test_argparse doesn't test changing the actual terminal size, but I imagine that would be a pain to implement.
For now the user could add this to his module:
import os, shutil
os.environ['COLUMNS'] = str(shutil.get_terminal_size().columns)
What's holding up the merging of this patch?
New changeset 74102c9a5f2327c4fc47feefa072854a53551d1f by Berker Peksag in branch 'master':
bpo-13041: Use shutil.get_terminal_size() in argparse.HelpFormatter (GH-8459) | https://bugs.python.org/issue13041 | CC-MAIN-2020-45 | en | refinedweb |
tag:blogger.com,1999:blog-11696635700133415552017-12-18T06:59:52.792-06:00FoemBlogErlang, Ruby, Java, etc.Matthew Foemmel Job!I've just finished my second week here at <a href="">DRW Trading Group</a>. So far I've been extremely impressed by the quality of the people, the number of interesting projects going on, and the overall energy of the place. It's also been fun catching up with the various ThoughtWorkers roaming the halls here. <br />.<br /><br /...Matthew Foemmel R12B-4 ReleasedThe <a href="">erlang-otp</a> repository at GitHub has been updated.<br /><br />Some folks were having trouble building the previous releases, due to a well-known "feature" in git that causes it to ignore empty directories. I've modified my import script to add empty<code>.gitignore</code> files where necessary, so that those empty directories come out the other end. The build scripts should now run out of the box.Matthew Foemmel BuzzI've been playing around with the <a href="">Low Level Virtual Machine</a>:<br /><br /><h3>FlaCC</h3>The first was the presentation that Scott Peterson of Adobe gave at the 2008 LLVM Developer's Meeting a few weeks ago (slides and video <a href="">here</a>). Scott's managed to get LLVM bytecode running on top the the Flash VM, which has all sorts of interesting implications (although it seems a bit backwards - shouldn't the high-level virtual machine i.e. Flash run on <i>top</i> of the low-level virtual machine - not the other way around?). In particular, it means that you could potentially run arbitrary C programs in the browser, since a C-to-LLVM bytecode compiler already exists. <br /><br /.<br />?<br /><br /><h3>Snow Leopard</h3>The second interesting development is Apple's use of LLVM in the next release of their operating system, code named <a href="">Snow Leopard</a>.:<table style="padding-top: 0; margin-top: 0"><br /><tr><td><b>Company</b></td><td><b>Preferred Language</b></td><td><b>Virtual Machine</b></td></tr><br /><tr><td>Microsoft</td><td>C#, Visual Basic</td><td>.NET CLR</td></tr><br /><tr><td>Adobe</td><td>ActionScript</td><td>Flash</td></tr><br /><tr><td>Sun</td><td>Java</td><td>Java Virtual Machine</td></tr><br /><tr><td>Apple</td><td>Objective-C</td><td>???</td></tr><br /></table><br /><br /.<br /><br />Anyway, to get the hang of things I'm working on a LLVM backend for a Lisp-like language. More to come...Matthew Foemmel, Multiple Assignment, and ClosuresThere's been some discussion on the tubes recently about the value of Erlang's single-assignment semantics, with people weighing in on <a href="">both</a> <a href="">sides</a>.<br /><br />However, no one seems to be asking the key question, namely what happens when you mix closures (which already exist in Erlang) with multiple-assignment variables? That's probably because the answer is a bit messy: you get an <i>object-oriented language</i>.<br /><br />To see why this is the case, let's go ahead and define a <code>Person</code> class in this (hypothetical) Erlang variant. The <code>Person</code> class has a single <code>Name</code> field and corresponding getter and setter methods:<br /><pre>-record(person,{get_name,set_name}).<br /><br />new_person(Name) -><br /> #person{<br /> get_name=fun() -> <br /> Name <br /> end,<br /> set_name=fun(NewName) -> <br /> Name = NewName % Multiple assignment<br /> end <br /> }.</pre>That's all there is to it. The arguments to the function (i.e. <code>Name</code>) act as the fields of the object, and the anonymous functions assigned to the record (i.e. <code>get_name</code> and <code>set_name</code>) act as the methods. This means we can now create Person objects, pass them around, and modify them whenever we want:<pre>Person = new_person("Sean Combs"),<br />print(Person#person.get_name()),<br />Person#person.set_name("Puff Daddy"),<br />print(Person#person.get_name()).<br />etc...</pre><br />Why does this matter? Because objects have <i>identity</i>, and identity's a real bitch when it comes to distributed systems. In particular, a lot of questions pop up when you try to send an object over the wire to another process. Do you:<ul><br /> <li>Copy the object, in which case any changes made to it on the remote process won't be visible locally</li><br /> <li>Send a reference to the object, such that any time the object is referred to in the remote process, a call is made back to the original process (at great cost to performance)</li><br /> <li>Let the developer indicate on an object-by-object basis which of the previous two options they would prefer</li><br /> <li>Punt, and simply forbid access to mutable variables from within closures.<br /> This is pretty limiting, to the point where it makes it impossible to even write a simple <code>foreach</code> function. For example, the following code, which adds the numbers <code>[1,2,3]</code> together, wouldn't be allowed (since <code>Sum</code> is mutable and accessed from a closure):<br /><pre>Sum = 0, <br />foreach(fun(N)-> Sum += N end, [1,2,3]), <br />print(Sum)</pre><br />Assuming we're OK with this, we still have to deal with the fact that we now have two types of variables in the language: mutable and immutable. Therefore we must either:<br /><ul><br /> <li>Prefix immutable variables with "final" to indicate they can be used within a closure</li><br /> <li>Prefix mutable variables with "var" to indicate they cannot be used within a closure</li><br /> <li>Rely on the compiler to infer which variables are mutable and which are used within closures (possibly producing some very cryptic error messages)</li><br /> <li>Take a "snapshot" of all variables in scope when a closure is created, and ignore any subsequent changes to the variable. For example, the following code would print "foo":<br /><pre><br />Protocol Buffers</a> to the RESTful application that I'm currently working on, and was wondering what people thought. <br /><br /: <ul><br /><li>XML will remain the default representation for all resources.</li><br /><li>If the client includes the <code>application/x-protobuf</code> MIME type in their <a href=""><code>Accept</code></a> header, the server will return a Protocol Buffer instead (and set the <a href=""><code>Content-Type</code></a> to <code>application/x-protobuf</code>).</li><br /><li>When a Protocol Buffer is returned, the HTTP response will also include an <code>X-Protobuf-Schema</code> header containing the URI for the <code>.proto</code> schema file.</li><br /></ul>Is anyone else doing something similar? It would probably make sense to coordinate on MIME types, etc...Matthew Foemmel R12B-3 ReleasedThere's a new release of Erlang/OTP out today, which you can download from the <a href="">usual</a> location. I've also imported it into the <a href="">erlang-otp</a> repository at GitHub.<br /><br />According to the <a href="">readme</a>, this release contains an "experimental" regular expression module called <a href=""><code>re</code></a>. The module wraps a lower-level PCRE library and is "many times faster than the pure Erlang implementation". It also looks like it works equally well with both binary- and list-based strings. So I guess the race is one to see who can get their <a href="">WideFinder</a> implementation up and running first...Matthew Foemmel Erlang/OTP Repository at GitHubI ended up deleting and recreating the <a href="">erlang-otp</a> repository at github today, in case anyone's having problems accessing it. My <a href="">original</a> <code>git clone</code> to get things working again.Matthew Foemmel Ordering in ErlangI've noticed that when people first learn Erlang (myself included), they tend to assume that messages sent between processes must be handled in the same order they're received. Turns out this isn't the case - you can pluck a message out from <i>anywhere</i> in a process's inbox, assuming you know a pattern that uniquely matches it. This is called a "selective receive".<br /><br />For example, let's say we fire off a couple of messages to a process registered as <code>myserver</code>:<pre>myserver ! {name, "World"},<br />myserver ! {greeting, "Hello"}</pre>Even though the we're sending the <code>greeting</code> message <i>after</i> the <code>name</code> message, it's possible for the receiver to process the greeting first, by matching on the <code>greeting</code> atom in the first position of the tuple:<pre>Greeting = receive {greeting,G} -> G end,<br />Name = receive {name,N} -> N end</pre>Here the first line removes the second message (the <code>greeting</code>) from the inbox, and the second line removes the first message (the <code>name</code>). <br /><br />This may not seem like a big deal, but there are a lot of cases where this behavior comes in extremely handy. Below are couple of examples: synchronous messaging, and parallel processing of lists:<br /><h3>Synchronous Messaging</h3>Layering synchronous messaging (i.e. your basic remote request/response) on top of the asynchronous stuff built into Erlang seems like it should be easy - you just send a message to another process, and wait until you get a message back. And a lot of the time that's all there is to it.<br /><br />However, it's possible that your client process has lots of messages coming in from different places, in which case there's no guarantee that the first message you receive after sending a request will be the actual <i>response</i> to your request. You'll have to do a selective receive to filter out the irrelevant messages.<br /><br />An easy way to do this is to include a unique token with each request, and have the server include it in its response. That way the client can just pattern match on the token.<br /><br />For example, say we have a time server that sends the current time back to any process that requests it (plus the token):<pre>time_server() -><br /> receive<br /> {get_time, Pid, Token} -><br /> Pid ! {time, time(), Token}<br /> end,<br /> time_server().<br /></pre>We can then get the time from the server using the following two functions. The first is responsible for sending the <code>get_time</code> message to the time server. It uses <a href="">make_ref</a> the generate the token:<pre>request_time(TimeServer) -> <br /> Token = make_ref(),<br /> TimeServer ! {get_time, self(), Token},<br /> Token.</pre>The second is responsible for taking that token and using it to selectively retrieve the response from the inbox:<pre>receive_time(Token) -><br /> receive {time, Time, Token} -> Time end.</pre>That's pretty much it. We just need to put the two together:<pre>get_time(TimeServer) -><br /> Token = request_time(TimeServer),<br /> receive_time(Token).</pre> We now have a function that will send a request to another process and block until it receives a response, without affecting any of the other messages in the inbox.<br /><h3>Parallel Processing Of Lists</h3>Now let's say we want to make calls to a <b>bunch</b> of different servers. And we'd like those servers to execute the calls in parallel because, well, that's just how we do things in Erlang. <br /><br />So continuing our previous example, assume we have a list of <code>time_server</code> processes. We want to send our <code>get_time</code> message to all of them, and we want to block until we receive all of the responses. We'd also like the responses to be returned as a list whose order corresponds with the original list, so that we know which time value goes with which <code>time_server</code>. (We can't just use the order the responses are received, since that's basically random.)<br /><br />A very concise way to implement all this in Erlang is to use two <a href="">list comprehensions</a>: one to send the requests out and generate the list of tokens, and another to take the list of tokens and selectively receive the responses. For example:<pre>get_times(TimeServers) -><br /> Tokens = [ request_time(TimeServer) || TimeServer <- TimeServers],<br /> [ receive_time(Token) || Token <- Tokens ].</pre>That's all it takes to execute those calls in parallel, and to put the results in the right order. Not bad for two lines of code.<br /><h3>And More...</h3>We could take this example a lot further: maybe we want to ignore time servers that don't respond within a certain amount of time; or automatically restart them when they crash; or process the responses as they come in instead of collecting them in a list; and so on. <br /><br />All these scenarios are easy to implement using selective receives (and other language features like linked processes). The interprocess communication built into Erlang seems simple, but it's been carefully designed to give you a lot of flexibility when designing your system.Matthew Foemmel"Hello, World" Revisited - Automatic ReloadingMy <a href="">last post</a> contained some code for a minimal "Hello, World" webapp in Erlang. However, that code wasn't very Erlangy - if you wanted to make a change to the application, you had to kill the shell and restart it. That's clearly not going to impress the "nine nines uptime" crowd. Plus it's annoying to develop that way.<br /><br />So here's some bonus code that will cause the server to compile and reload changes on the fly, without having to restart the server. It probably won't get you to nine nines, but it's a start. Just append the following to the original "hello_world.erl" file:<br /><pre><br />reload(SessionID, Env, Input) -><br /> case make:all([load]) of<br /> up_to_date -><br /> hello_world:service(SessionID, Env, Input);<br /> _ -><br /> mod_esi:deliver(SessionID, [<br /> "Content-Type: text/plain\r\n\r\n", <br /> "compilation error"<br /> ])<br /> end.<br /></pre><br />The <code>reload</code> function acts as a wrapper around our original <code>service</code> function, calling <a href=""><code>make:all</code></a> (which will compile and reload any out of date code) before forwarding the request.<br /><br />You'll also need to stick an <code>export</code> at the top of the file, after the module declaration:<br /><pre><br />-export([reload/3]).<br /></pre><br />Last but not least, you'll need to create a file called "Emakefile", which tells Erlang what to compile during the call to <code>make:all</code>. In our case, the file is pretty simple:<br /><pre><br />{'*', []}.<br /></pre> <br />Now start up the <code>erl</code> shell and run the same steps as before:<br /><pre><br />Eshell V5.6 (abort with ^G)<br />1> c(hello_world).<br />{ok,hello_world}<br />2> inets:start().<br />ok<br />3> hello_world:start().<br />{ok,<0.51.0>}<br /></pre><br />But this time, use the following URL to test the app, which will hit our new <code>reload</code> function:<br /><br /><a href=""> </a><br /><br />You should now be able to make changes to <code>hello_world.erl</code> (e.g. change the message from "Hello, world" to something else), hit refresh in your browser, and immediately see the changes.<br /><h4>What's <i>really</i> happening here?</h4>When I first started learning Erlang, I'd assumed that whenever you reloaded modules (via <code>make:all</code> or <a href=""><code>code:load_file</code></a> or whatever) that those changes would go into effect immediately, similar to the way the <code>load</code> command works in Ruby. However, that's not quite how things work - just because changes to a module have been <i>loaded</i> doesn't necessarily mean they will be <i>executed</i>. This is because Erlang gives you very fine grained control over when code changes take effect.<br /><br />The key to all this is the ':' operator. On the surface, it just looks like a namespace separator, used to disambiguate between functions with the same name in different modules. For example, within our <code>hello_world</code> module, you would think that the following two lines of code would be identical, and that the <code>hello_world:</code> in the first line would be redundant:<br /><code><br />hello_world:service(SessionID,Env,Input).<br />service(SessionID,Env,Input).<br /></code><br />However, they're not quite the same. The call in the first line actually checks to see if a newer version of the <code>hello_world</code> module has been loaded, and if so, dispatches to that version. The call in the second line always dispatches to the same version as is currently running, even if a newer version has been loaded. If a new version of the module has <b>not</b> been loaded, their behavior is the same.<br /><br />The upshot of this is that you can have two versions of your code running at the same time (Erlang doesn't let you have more than two, however). This is similar to the way some web servers have a "graceful" restart option, that allows currently executing requests to continue using the old configuration, while new requests use a different configuration. Except in Erlang you can pick the exact function call in your application where these upgrades happen. Very cool.<br /><br />You can test this behavior by leaving out the <code>hello_world:</code> prefix in the fourth line of the reload function. You'll notice that your changes are no longer picked up immediately, but are picked up on the <b>next</b> invocation (since the initial call to <code>hello_world:reload</code> by the HTTP server will trigger an update).Matthew Foemmel"Hello World" Webapp in ErlangWhen I first started using Erlang it took a fair bit of trial and error to create a server that generated dynamic HTTP content. The main problem is the lack of good tutorials out there for doing these kinds of things. The documentation that comes with Erlang is good for reference, but is not that helpful if you're just learning the language.<br /><br />In particular, there didn't seem to be a basic "Hello World" example for building web applications. So here's my attempt to fix that. Below is some code that starts up an HTTP server, and dynamically generates a simple "Hello, World" page: <br /><pre><br />-module(hello_world).<br />-export([start/0,service/3]).<br /><br />start() -><br /> inets:start(httpd, [<br /> {modules, [<br /> mod_alias, <br /> mod_auth, <br /> mod_esi, <br /> mod_actions, <br /> mod_cgi, <br /> mod_dir, <br /> mod_get, <br /> mod_head, <br /> mod_log, <br /> mod_disk_log<br /> ]},<br /> {port,8081},<br /> {server_name,"hello_world"},<br /> {server_root,"log"},<br /> {document_root,"www"},<br /> {erl_script_alias, {"/erl", [hello_world]}},<br /> {error_log, "error.log"},<br /> {security_log, "security.log"},<br /> {transfer_log, "transfer.log"},<br /> {mime_types,[<br /> {"html","text/html"},<br /> {"css","text/css"},<br /> {"js","application/x-javascript"}<br /> ]}<br /> ]).<br /> <br />service(SessionID, _Env, _Input) -><br /> mod_esi:deliver(SessionID, [<br /> "Content-Type: text/html\r\n\r\n", <br /> "<html><body>Hello, World!</body></html>"<br /> ]).<br /></pre><br />To run it, save the code to a file called <code>hello_world.erl</code>, and create two subdirectories next to it called "www" and "log" (these subdirectories can be empty, but they need to be there for the server to start). Then fire up <code>erl</code> and run the following three commands:<br /><pre><br />Eshell V5.6 (abort with ^G)<br />1> c(hello_world).<br />{ok,hello_world}<br />2> inets:start().<br />ok<br />3> hello_world:start().<br />{ok,<0.51.0>}<br /></pre><br />You should now be able to browse to the following URL and see your message (if for some reason it doesn't work for you please let me know):<br /><br /><a href=""></a> <br /><br />For more info, here are the reference docs for the relevant Erlang modules:<br /><ul><br /> <li><a href="">inets</a></li><br /> <li><a href="">httpd</a></li><br /> <li><a href="">mod_esi</a></li><br /></ul>Matthew Foemmel Source at GitHubI wrote a little script the other day to download all of the Erlang/OTP source releases that were available at erlang.org, and stick them in a single git repository. I've uploaded it to <a href="">GitHub</a>, if anyone's interested:<br /><br /><a href=""></a><br /><br />I found out after the fact that <a href="">archaelus</a> had done something similar, and has a git repository hosted here:<br /><br /><a href=";a=summary">;a=summary</a><br /><br />The main difference between the two is that the one at GitHub includes releases going a lot further back (R6B-0 vs R11B-5) - which is good if you're curious about how Erlang has evolved over time, but also means the repository is that much bigger when it comes time to do a clone (Erlang includes a bunch of binary files in their "source" releases, which don't seem to compress very well). Archaelus also includes a few 3rd party patchsets in his repository, which may be of interest. <br /><br />The nice thing about GitHub, however, is that it makes it really easy for anyone to branch a project and make changes, and then make those changes available to everyone else (who can then merge them back into their own branches, and so on). Maybe this could help open up the Erlang development process a bit?Matthew Foemmel 12B-2 ReleasedLooks like the second service pack for Erlang/OTP 12B has been <a href="">released</a>. <br /><br />One nice change is that the <code>percept</code> application no longer depends on <code>libgd</code>. This should make compiling for Mac OS X a bit easier, since Leopard doesn't ship with GD by default. <br /><br />They also appear to have fixed some of the other OS X related <a href="">build issues</a> that cropped up in the first service pack.Matthew Foemmel to BloggerIn an attempt to reduce the total number of machines in my life that I need to administer, I'm moving my blog over to Blogger. This will probably break my RSS feeds - my apologies. If you notice any other issues please let me know at <a href="mailto:blog@foemmel.com">blog@foemmel.com</a>.Matthew Foemmel R12B ReleasedNew version of Erlang out today - release notes <a href="">here</a>.<br /><br />For newbies like me, a big reason to upgrade is the much improved error reporting in the Erlang shell. For example, here's how the previous version reports a divide-by-zero exception:<br /><pre style="font-weight: bold;">Eshell V5.5.5 (abort with ^G)<br />1> 1/0.<br />** exited: {badarith,[{erlang,'/',[1,0]},<br /> {erl_eval,do_apply,5},<br /> {shell,exprs,6},<br /> {shell,eval_loop,3}]} **<br /><br />=ERROR REPORT==== 5-Dec-2007::23:32:41 ===<br />Error in process <0.31.0> with exit value: {badarith,[{erlang,'/',[1,0]},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}</pre>New version:<br /><pre style="font-weight: bold;">Eshell V5.6 (abort with ^G)<br />1> 1/0.<br />** exception error: bad argument in an arithmetic expression<br /> in operator '/'/2<br /> called as 1 / 0</pre>Better!<br /><br />I ran into one small hitch building the new version on my Mac, namely a "libgd not found" error while running "./configure". I installed version 2.0.36RC1 from here, which did the trick:<br /><br /><a href=""></a>Matthew Foemmel: An Agile DashboardMy colleagues Ben Erickson and Ben Feng have put together a nice little tool for tracking progress on Agile/XP projects, called <a href="">Periscope</a>. The idea is that you can use Jira (or potentially some other tool) to track your stories, and Periscope will occasioanally read that data, combine it with your build results, and generate reports indicating how far along you are.<br /><br />It's still in its "alpha" stage, but I'd recommend checking it out.Matthew Foemmel: Initial ThoughtsAs an experiment, I recently tried porting some code from a Java project at work to Erlang, to see if that might be a direction we'd want to head in. The code being converted is very functional (e.g. almost all data structures are immutable) and easily parallelizable, so it seemed like a good fit.<br /><br />I was hoping to quickly find some excuse for why Erlang wouldn't be suitable for the kind of work we're doing. The little voice in my head has been nagging me for a while that "Java is the wrong language for this project" and I was hoping to shut it up, a least for a while, so that I could get back to work.<br /><br />But so far it's been pretty clear sailing. Erlang is famous for its concurrency features, but the thing that surprised me was how concise a language it is. Of the handful of classes I've converted, the Erlang versions were pretty consistently about 25% the size of the Java versions (and I'm sure they'll get even smaller once I know Erlang better).<br /><br />The reasons for the big difference seem to be:<br /><br /><span style="font-weight: bold;">Higher-order Functions</span><br /><br />A lot of our code involves iterating through lists, performing some action on each element, and aggregating the results. For example, in Java, if you want to go through a list of items and add up all of their "quantity" fields, you might do something like:<br /><pre><br /> public int totalQuantity(List<item> items) {<br /> int totalQuantity = 0;<br /> for(Item item : items) {<br /> totalQuantity += item.getQuantity();<br /> }<br /> return totalQuantity;<br /> }<br /></pre><br />Whereas in Erlang you can use higher-order functions ("map" in this case) to do this in one line:<br /><pre><br /> total_quantity(Items) -> sum(map(fun(Item) -> quantity(Item) end, Items)).<br /></pre><br />Erlang also supports list comprehensions, which can make things a bit more readable:<br /><pre><br /> total_quantity(Items) -> sum([quantity(Item) || Item <- Items]). <br /></pre><br />This is pretty standard functional programming stuff - no real surprises. (Java will hopefully improve on this front with the introduction of <a href="">closures</a> in JDK7.)<br /><br /><span style="font-weight: bold;">Pattern Matching</span><br /><br />I was more surprised by how handy Erlang's pattern matching facilities were. For example, using a single "=" operator, you can do multiple things like check that a status code equals "ok", assert that a list contains at least two items, and extract the first item from that list:<br /><pre><br />{ok, [H|_|_]} = foo().<br /></pre><br />If you've only ever used languages where "=" means assignment, this statement may look a bit strange. I won't get into how it all works here, since it's a big topic, but I will say that once you get the hang of it, it's hard to go back.<br /><br />From a language perspective, Erlang's pervasive use of pattern matching is probably what differentiates it most from some of the more mainstream programming languages. Patterns are used everywhere, including function parameters, case/if statements, and when receiving messages from other processes.<br /><br /><span style="font-weight: bold;">Tuples</span><br /><br />Being able to create new data structures on the fly, without having to define a new class, is a big time saver. For example, to create a value representing an item and its quantity, you can just do:<br /><pre><br />Item = {"Carrots", 3}.<br /></pre><br />These types of structures are a pain to deal with in Java, since you need to create an entirely new class. It's easy to blame static typing for this, but the .NET folks can do something similar, thanks to <a href="">anonymous types</a>. <br /><br /><span style="font-weight: bold;">Summary</span><br /><br />So, I've yet to hit any major roadblocks. That's not to say that Erlang isn't without its quirks - the error messages it spits out can be quite cryptic, and the way it deals with strings seems clumsy. But so far no showstoppers.Matthew Foemmel and Raven<p> Just a quick note to let everyone know that Matthieu Riou (creator of Raven) and I have decide to join forces, and are currently in the process of merging the JRake and Raven codebases. The work is being done in the <a href="">Raven</a> repository over at Rubyforge, for those of you who would like to follow along. The combined effort will eventually become Raven 2.0. </p> <p> Matthieu has a few more <a href="">details</a> over at his blog, so check it out. </p>Matthew Foemmel, Part 4: Multithreading<p> First off, I'd like to thank everyone for all the feedback I've received so far regarding JRake. It's been extremely helpful - please keep it coming. </p> <p>). </p> <p> My hope is that JRake eventually <b>will</b> evolve into a production-quality tool, either as a standalone codebase or part of another project, but we're not there yet. In the mean time, all the features I mention here should be considered "experimental". </p> <p> With that in mind, let's check out the next hack: </p> <h3>Parallel JRake</h3> <p> In the previous posts, we tackled performance by eliminating the number JVM startups during the build. In the end, we got that number down to zero, so we can't really follow that line of attack much further. </p> <p> The next logical step (assuming we don't want to start tearing apart the actual <code>javac</code>. </p> <p> The idea is not new, and most existing build tools support at least some sort of parallel processing. For example, <code>ant</code> has a <a href="">parallel</a> task that can be used to execute subtasks in parallel, and (standard) <code>rake</code> has a <a href="">multitask</a> task. These are examples of <b>explicit parallelism</b>, as the user must declare exactly which tasks are to be run in parallel. </p> <p> The alternative is <b>implicit parallelism</b>, which is supported by tools like <code>make</code> (via its <code>-j</code> option, explained <a href="">here</a>). In this case, the tool uses the dependencies specified in the build script to automatically infer which steps can be run in parallel. For example, consider a simple client/server application with the following build targets: </p> <p style="padding: 8px; text-align: center;"> <img src="" align="middle" /> </p> <p>). </p> <p>. </p> <p> </p><h3>Implementation</h3> <p> To get it working, I ended up bypassing the normal Rake methods for determining execution order, and created my own <code>TaskCoorindator</code> class. It uses a pool of worker threads to handle task execution, while the main thread does the work of figuring out which tasks to submit to the pool. The worker threads use a <a href="">blocking queue</a> to communicate the results of each task execution back to the main thread. </p> <p> Here's the <code>TaskCoordinator</code> code (for whatever subset of you happen to be familiar with both JRuby/Rake and the <a href="">java.util.concurrent</a> package): </p> <pre class="ruby"><span class="keyword">class </span><span class="class">TaskCoordinator</span><br /><br /> <span class="keyword">def </span><span class="method">initialize</span><span class="punct">(</span><span class="ident">pool_size</span><span class="punct">=</span><span class="number">2</span><span class="punct">)</span><br /> <span class="attribute">@thread_pool</span> <span class="punct">=</span> <span class="ident">java</span><span class="punct">.</span><span class="ident">util</span><span class="punct">.</span><span class="ident">concurrent</span><span class="punct">.</span><span class="ident">Executors</span><span class="punct">.</span><span class="ident">newFixedThreadPool</span><span class="punct">(</span><span class="ident">pool_size</span><span class="punct">)</span><br /> <span class="keyword">end</span><br /><br /> <span class="keyword">def </span><span class="method">execute</span><span class="punct">(</span><span class="ident">root</span><span class="punct">)</span><br /> <span class="attribute">@result_queue</span> <span class="punct">=</span> <span class="ident">java</span><span class="punct">.</span><span class="ident">util</span><span class="punct">.</span><span class="ident">concurrent</span><span class="punct">.</span><span class="ident">LinkedBlockingQueue</span><span class="punct">.</span><span class="ident">new</span><br /> <span class="attribute">@leafs</span> <span class="punct">=</span> <span class="constant">Set</span><span class="punct">.</span><span class="ident">new</span> <span class="comment"># tasks with no prereqs</span><br /> <span class="attribute">@children</span> <span class="punct">=</span> <span class="punct">{}</span> <span class="comment"># maps task -> tasks it depends on </span><br /> <span class="attribute">@parents</span> <span class="punct">=</span> <span class="punct">{}</span> <span class="comment"># maps task -> tasks that depend on it</span><br /> <br /> <span class="ident">analyze_dependencies</span><span class="punct">(</span><span class="ident">root</span><span class="punct">)</span><br /> <br /> <span class="attribute">@leafs</span><span class="punct">.</span><span class="ident">each</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">leaf</span><span class="punct">|</span><br /> <span class="ident">execute_task</span><span class="punct">(</span><span class="ident">leaf</span><span class="punct">)</span><br /> <span class="keyword">end</span><br /> <br /> <span class="comment"># Keep pulling task results from the queue, until we get to the root target</span><br /> <span class="comment"># Remove non-root targets from the dependency graph</span><br /> <span class="comment"># (i.e. delete the relevent members in the children/parent hash maps)</span><br /> <span class="comment"># If this results in any tasks with no children (i.e. no more prereqs to execute)</span><br /> <span class="comment"># then submit that task to the thread pool for execution.</span><br /> <span class="keyword">while</span> <span class="punct">(</span><span class="ident">result</span> <span class="punct">=</span> <span class="attribute">@result_queue</span><span class="punct">.</span><span class="ident">take</span><span class="punct">).</span><span class="ident">task</span> <span class="punct">!=</span> <span class="ident">root</span><br /> <span class="attribute">@parents</span><span class="punct">[</span><span class="ident">result</span><span class="punct">.</span><span class="ident">task</span><span class="punct">].</span><span class="ident">each</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">posttask</span><span class="punct">|</span><br /> <span class="ident">list</span> <span class="punct">=</span> <span class="attribute">@children</span><span class="punct">[</span><span class="ident">posttask</span><span class="punct">]</span><br /> <span class="ident">list</span><span class="punct">.</span><span class="ident">delete</span><span class="punct">(</span><span class="ident">result</span><span class="punct">.</span><span class="ident">task</span><span class="punct">)</span><br /> <span class="keyword">if</span> <span class="ident">list</span><span class="punct">.</span><span class="ident">empty?</span><br /> <span class="attribute">@children</span><span class="punct">.</span><span class="ident">delete</span><span class="punct">(</span><span class="ident">posttask</span><span class="punct">)</span><br /> <span class="ident">execute_task</span><span class="punct">(</span><span class="ident">posttask</span><span class="punct">)</span><br /> <span class="keyword">end</span><br /> <span class="keyword">end</span><br /> <br /> <span class="attribute">@parents</span><span class="punct">.</span><span class="ident">delete</span><span class="punct">(</span><span class="ident">result</span><span class="punct">.</span><span class="ident">task</span><span class="punct">)</span><br /> <span class="keyword">end</span><br /> <span class="keyword">end</span><br /><br /> <span class="keyword">def </span><span class="method">shutdown</span><br /> <span class="attribute">@thread_pool</span><span class="punct">.</span><span class="ident">shutdown</span><br /> <span class="keyword">end</span><br /><br /><span class="ident">private</span><br /><br /> <span class="comment"># Stores the relationship between the tasks involved in this </span><br /> <span class="comment"># build, using the "children" and "parents" hash tables</span><br /> <span class="keyword">def </span><span class="method">analyze_dependencies</span><span class="punct">(</span><span class="ident">task</span><span class="punct">,</span> <span class="ident">analyzed</span><span class="punct">=</span><span class="constant">Set</span><span class="punct">.</span><span class="ident">new</span><span class="punct">)</span><br /> <span class="keyword">return</span> <span class="keyword">if</span> <span class="ident">analyzed</span><span class="punct">.</span><span class="ident">member?</span><span class="punct">(</span><span class="ident">task</span><span class="punct">)</span><br /> <br /> <span class="ident">analyzed</span> <span class="punct"><<</span> <span class="ident">task</span><br /> <br /> <span class="ident">prereqs</span> <span class="punct">=</span> <span class="ident">task</span><span class="punct">.</span><span class="ident">prerequisite_tasks</span><br /> <span class="keyword">if</span> <span class="ident">prereqs</span><span class="punct">.</span><span class="ident">empty?</span><br /> <span class="attribute">@leafs</span> <span class="punct"><<</span> <span class="ident">task</span><br /> <span class="keyword">else</span><br /> <span class="ident">prereqs</span><span class="punct">.</span><span class="ident">each</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">child</span><span class="punct">|</span><br /> <span class="punct">(</span><span class="attribute">@children</span><span class="punct">[</span><span class="ident">task</span><span class="punct">]</span> <span class="punct">||=</span> <span class="constant">Set</span><span class="punct">.</span><span class="ident">new</span><span class="punct">)</span> <span class="punct"><<</span> <span class="ident">child</span><br /> <span class="punct">(</span><span class="attribute">@parents</span><span class="punct">[</span><span class="ident">child</span><span class="punct">]</span> <span class="punct">||=</span> <span class="constant">Set</span><span class="punct">.</span><span class="ident">new</span><span class="punct">)</span> <span class="punct"><<</span> <span class="ident">task</span><br /> <span class="ident">analyze_dependencies</span><span class="punct">(</span><span class="ident">child</span><span class="punct">,</span><span class="ident">analyzed</span><span class="punct">)</span><br /> <span class="keyword">end</span><br /> <span class="keyword">end</span><br /> <span class="keyword">end</span><br /><br /> <span class="comment"># Wraps the task in a TaskRunner and passes it to the</span><br /> <span class="comment"># thread pool for execution</span><br /> <span class="keyword">def </span><span class="method">execute_task</span><span class="punct">(</span><span class="ident">task</span><span class="punct">)</span><br /> <span class="attribute">@thread_pool</span><span class="punct">.</span><span class="ident">execute</span><span class="punct">(</span><span class="constant">TaskRunner</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">task</span><span class="punct">,</span> <span class="attribute">@result_queue</span><span class="punct">))</span><br /> <span class="keyword">end</span><br /><span class="keyword">end</span><br /><br /><span class="constant">TaskResult</span> <span class="punct">=</span> <span class="constant">Struct</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="symbol">:task</span><span class="punct">,</span> <span class="symbol">:exception</span><span class="punct">)</span><br /><br /><span class="keyword">class </span><span class="class">TaskRunner</span> <span class="punct"><</span> <span class="ident">java</span><span class="punct">.</span><span class="ident">lang</span><span class="punct">.</span><span class="ident">Runnable</span><br /> <span class="ident">attr_reader</span> <span class="symbol">:task</span><br /><br /> <span class="keyword">def </span><span class="method">initialize</span><span class="punct">(</span><span class="ident">task</span><span class="punct">,</span> <span class="ident">queue</span><span class="punct">)</span><br /> <span class="keyword">super</span><span class="punct">()</span><br /> <br /> <span class="attribute">@task</span> <span class="punct">=</span> <span class="ident">task</span><br /> <span class="attribute">@queue</span> <span class="punct">=</span> <span class="ident">queue</span><br /> <span class="attribute">@exception</span> <span class="punct">=</span> <span class="constant">nil</span><br /> <span class="keyword">end</span><br /><br /> <span class="keyword">def </span><span class="method">run</span><br /> <span class="keyword">begin</span><br /> <span class="attribute">@task</span><span class="punct">.</span><span class="ident">execute</span><br /> <span class="keyword">rescue</span> <span class="constant">Exception</span> <span class="punct">=></span> <span class="ident">exception</span><br /> <span class="ident">puts</span> <span class="ident">exception</span><br /> <span class="attribute">@exception</span> <span class="punct">=</span> <span class="ident">exception</span><br /> <span class="keyword">ensure</span><br /> <span class="attribute">@queue</span><span class="punct">.</span><span class="ident">add</span><span class="punct">(</span><span class="constant">TaskResult</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="attribute">@task</span><span class="punct">,</span> <span class="attribute">@exception</span><span class="punct">))</span><br /> <span class="keyword">end</span><br /> <span class="keyword">end</span><br /><span class="keyword">end</span> </pre> <h3>Sample Output</h3> <p> I set up a simple build script using the client/server dependency graph shown above. The following output demonstrates how the build script runs when we only use <b>one</b> thread: </p><pre>[pool-1-thread-1] common - begin<br />[pool-1-thread-1] common - end<br />[pool-1-thread-1] client - begin<br />[pool-1-thread-1] client - end<br />[pool-1-thread-1] server - begin<br />[pool-1-thread-1] server - end<br />[pool-1-thread-1] test - begin<br />[pool-1-thread-1] test - end<br /><br />real 0m3.230s<br />user 0m0.007s<br />sys 0m0.013s<br /></pre> Just as we would expect: the tasks are executed serially and there is no overlap. <p> Below is the output when running with <b>two</b> threads: </p> <pre>[pool-1-thread-2] common - begin<br />[pool-1-thread-2] common - end<br />[pool-1-thread-1] client - begin<br />[pool-1-thread-2] server - begin<br />[pool-1-thread-2] server - end<br />[pool-1-thread-1] client - end<br />[pool-1-thread-2] test - begin<br />[pool-1-thread-2] test - end<br /><br />real 0m2.542s<br />user 0m0.007s<br />sys 0m0.012s<br /></pre> <p> As you can see, the "client" and "server" tasks overlap, and the total build time is reduced. </p> <h3>Danger</h3> <p> Unfortunately, Parallel JRake has the same problem as all multithreaded code: nondeterminism. With the exception of explicitly declared dependencies between tasks, users can't control the order in which things get executed. </p> <p>Using the example above, this means that sometimes "client" will get compiled first, sometimes "server" will get compiled first, and sometimes they will overlap. In theory, we shouldn't care. However, if there is actually <b>is</b> some sort of dependency between the two tasks, but this hasn't been explicitly declared in the rakefile, the build might succeed one time and fail the next. </p> <p> There are couple ways that I can think of to lessen the impact of this, though it can't be completely eliminated. One way is to use <a href="">Raven</a> style tasks, where the values for properties like "output directory" and "classpath" are automatically supplied by the tool itself (by analyzing the tasks dependencies). That way, the only way to get things to compile is to declare your dependencies correctly. </p> <p>. </p> <h3>Source Code</h3> <p> Once again, I've made the complete project available via subversion, if anyone would like to play with it: </p> <div class="svn">svn://svn.foemmel.com/blog/jrake/parallel</div> <p> To run the server, go to the project root directory and run: </p> <div class="cmd">bin/jraked</div> <p> You can then build specific targets like this (you'll need to have <code>curl</code> installed): </p> <div class="cmd">bin/jrake unit</div> <div class="cmd">bin/jrake clean</div> <p> Alternatively, you can run builds from your browser, by visiting a URL like this: </p> <div class="cmd"><a href=""></a></div> <div class="cmd"><a href=""></a></div> <h3>Other Changes</h3> <p> I've also made a few other tweaks to JRake since my last post, in case anyone is interested: </p><ul><li> <p> You can now send an HTTP request to the JRake server to build any target, using the URL syntax: <code><i>targetname</i></code>. The build log will be sent back to the client as <code>text/plain</code> so you can just use <code>curl</code> or <code>wget</code> to run builds. This eliminates the need for the JRake Shell. </p> </li><li> <p> The autoreload servlet will now only perform a reload when the use hits "refresh" in their browser. A "hard refresh" (<code>ctrl-F5</code>) is required in IE, and it doesn't work at all with Safari. So it still needs some work... </p> </li></ul>Matthew Foemmel, Part 3: Running<p> So far, we've managed to <a href="">compile</a> and <a href="">test</a> our Java code using 100% JRuby. Now we just need a way to run it. </p> <p> Assuming our application is web-based, the obvious solution is to wrap it up in a <code>war</code> file and deploy it into a container. But as anyone who has worked on a large project knows, creating and deploying <code>war</code> files can be a painfully slow process. Our original mission was to cut as much time as possible off our edit-compile-run cycle, so this clearly isn't the right solution. (We will need to generate <code>war</code> files at some point, of course, for deploying into production environments, but we'll save that work for another day). </p> <p> <em>some</em> of your changes). So while autodeploy is definitely a big improvement, it's still not an ideal solution. </p> <p> What we really want is for Java code to work the same way that dynamically typed languages do: you change your code, hit "save", and view the results in the browser. </p> <h3>JRake Server</h3> <p> I think I've managed to achieve something close to this, by setting up a Jetty server to act as a kind of proxy for my main application. Whenever a request comes in, it performs the following steps: </p><ol><li> Calls out to the JRake script to compile any out-of-date code. </li><li> Creates a new classloader, and uses it to reload the application's main servlet class. </li><li> Creates an instance of the servlet and forwards the original HTTP request on to it. </li></ol> . </p> <p> Here's the code for the main program, which starts up the Jetty server: </p> <pre class="ruby"><span class="ident">require</span> <span class="punct">'</span><span class="string">java</span><span class="punct">'</span><br /><span class="ident">require</span> <span class="punct">'</span><span class="string">reload_handler</span><span class="punct">'</span><br /><br /><span class="ident">server</span> <span class="punct">=</span> <span class="ident">org</span><span class="punct">.</span><span class="ident">mortbay</span><span class="punct">.</span><span class="ident">jetty</span><span class="punct">.</span><span class="ident">Server</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="number">3030</span><span class="punct">)</span><br /><span class="ident">handler</span> <span class="punct">=</span> <span class="constant">ReloadHandler</span><span class="punct">.</span><span class="ident">new</span><span class="punct">('</span><span class="string">lib/rakefile.rb</span><span class="punct">',</span> <span class="symbol">:main_compile</span><span class="punct">,</span> <span class="punct">['</span><span class="string">tmp/main/</span><span class="punct">'],</span> <span class="punct">'</span><span class="string">com.example.HelloWorldServlet</span><span class="punct">')</span><br /><span class="ident">server</span><span class="punct">.</span><span class="ident">set_handler</span><span class="punct">(</span><span class="ident">handler</span><span class="punct">)</span><br /><br /><span class="ident">server</span><span class="punct">.</span><span class="ident">start</span><br /><span class="ident">puts</span> <span class="punct">"</span><span class="string"><span class="escape">\n</span>Hit <enter> stop server<span class="escape">\n\n</span></span><span class="punct">"</span><br /><span class="global">$stdin</span><span class="punct">.</span><span class="ident">readline</span><br /><span class="ident">server</span><span class="punct">.</span><span class="ident">stop</span> </pre> <p> And the code for the reload handler: </p> <pre class="ruby"><span class="ident">require</span> <span class="punct">'</span><span class="string">java</span><span class="punct">'</span><br /><span class="ident">require</span> <span class="punct">'</span><span class="string">rake</span><span class="punct">'</span><br /><span class="ident">require</span> <span class="punct">'</span><span class="string">jrake</span><span class="punct">'</span><br /><br /><span class="keyword">class </span><span class="class">ReloadHandler</span> <span class="punct"><</span> <span class="ident">org</span><span class="punct">.</span><span class="ident">mortbay</span><span class="punct">.</span><span class="ident">jetty</span><span class="punct">.</span><span class="ident">Handler</span><br /><br /> <span class="comment"># todo: Should extend AbstractHandler</span><br /> <span class="comment"># (need JRuby to support extending abstract classes)</span><br /><br /> <span class="keyword">def </span><span class="method">initialize</span><span class="punct">(</span><span class="ident">rakefile</span><span class="punct">,</span> <span class="ident">target</span><span class="punct">,</span> <span class="ident">classpath</span><span class="punct">,</span> <span class="ident">classname</span><span class="punct">)</span><br /> <span class="keyword">super</span><span class="punct">()</span><br /> <br /> <span class="attribute">@rakefile</span> <span class="punct">=</span> <span class="ident">rakefile</span><br /> <span class="attribute">@target</span> <span class="punct">=</span> <span class="ident">target</span><br /> <span class="attribute">@classpath</span> <span class="punct">=</span> <span class="ident">classpath</span><br /> <span class="attribute">@classname</span> <span class="punct">=</span> <span class="ident">classname</span><br /> <span class="keyword">end</span><br /><br /> <span class="keyword">def </span><span class="method">handle</span><span class="punct">(</span><span class="ident">target</span><span class="punct">,</span><span class="ident">request</span><span class="punct">,</span><span class="ident">response</span><span class="punct">,</span><span class="ident">dispatch</span><span class="punct">)</span> <br /> <span class="keyword">begin</span><br /> <span class="comment"># Compile any out of date files</span><br /> <span class="constant">Rake</span><span class="punct">.</span><span class="ident">application</span><span class="punct">.</span><span class="ident">clear</span><br /> <span class="ident">load</span> <span class="attribute">@rakefile</span><br /> <span class="ident">target</span> <span class="punct">=</span> <span class="constant">Rake</span><span class="punct">.</span><span class="ident">application</span><span class="punct">.</span><span class="ident">lookup</span><span class="punct">(</span><span class="attribute">@target</span><span class="punct">)</span><br /> <span class="keyword">raise</span> <span class="punct">"</span><span class="string">Target not found: <span class="expr">#{@target}</span></span><span class="punct">"</span> <span class="keyword">if</span> <span class="ident">target</span><span class="punct">.</span><span class="ident">nil?</span><br /> <span class="ident">target</span><span class="punct">.</span><span class="ident">invoke</span><br /><br /> <span class="comment"># Load the servlet class, create an instance, and delegate to it</span><br /> <span class="ident">servlet_class</span> <span class="punct">=</span> <span class="ident">load_class</span><span class="punct">(</span><span class="attribute">@classpath</span><span class="punct">,</span> <span class="attribute">@classname</span><span class="punct">)</span> <br /> <span class="ident">servlet</span> <span class="punct">=</span> <span class="ident">servlet_class</span><span class="punct">.</span><span class="ident">new_instance</span> <br /> <span class="ident">param_types</span> <span class="punct">=</span> <span class="ident">to_java_array</span><span class="punct">(</span><span class="ident">java</span><span class="punct">.</span><span class="ident">lang</span><span class="punct">.</span><span class="ident">Class</span><span class="punct">,</span> <span class="punct">[</span><br /> <span class="ident">javax</span><span class="punct">.</span><span class="ident">servlet</span><span class="punct">.</span><span class="ident">ServletRequest</span><span class="punct">,</span><br /> <span class="ident">javax</span><span class="punct">.</span><span class="ident">servlet</span><span class="punct">.</span><span class="ident">ServletResponse</span><br /> <span class="punct">])</span><br /> <span class="ident">method</span> <span class="punct">=</span> <span class="ident">servlet_class</span><span class="punct">.</span><span class="ident">get_method</span><span class="punct">("</span><span class="string">service</span><span class="punct">",</span> <span class="ident">param_types</span><span class="punct">)</span><br /> <span class="ident">args</span> <span class="punct">=</span> <span class="ident">to_java_array</span><span class="punct">(</span><span class="ident">java</span><span class="punct">.</span><span class="ident">lang</span><span class="punct">.</span><span class="ident">Object</span><span class="punct">,</span> <span class="punct">[</span><span class="ident">request</span><span class="punct">,</span><span class="ident">response</span><span class="punct">])</span><br /> <span class="ident">method</span><span class="punct">.</span><span class="ident">invoke</span><span class="punct">(</span><span class="ident">servlet</span><span class="punct">,</span> <span class="ident">args</span><span class="punct">)</span> <br /> <br /> <span class="keyword">rescue</span> <span class="constant">Exception</span> <span class="punct">=></span> <span class="ident">e</span><br /> <span class="ident">trace</span> <span class="punct">=</span> <span class="punct">"</span><span class="string"><span class="expr">#{e.class}</span>: <span class="expr">#{e.message}</span><br/><span class="expr">#{e.backtrace.join('<br/>')}</span></span><span class="punct">"</span><br /> <span class="ident">response</span><span class="punct">.</span><span class="ident">writer</span><span class="punct">.</span><span class="ident">write</span><span class="punct">("</span><span class="string"><br /> <html><br /> <body><br /> <pre>{trace}</pre><br /> </body><br /> </html><br /> </span><span class="punct">")</span><br /> <span class="keyword">end</span><br /> <br /> <span class="ident">request</span><span class="punct">.</span><span class="ident">handled</span> <span class="punct">=</span> <span class="constant">true</span> <br /> <span class="keyword">end</span><br /><br /> <span class="keyword">def </span><span class="method">start</span><br /> <span class="keyword">end</span><br /><br /> <span class="keyword">def </span><span class="method">stop</span><br /> <span class="keyword">end</span><br /><br /> <span class="keyword">def </span><span class="method">setServer</span><span class="punct">(</span><span class="ident">server</span><span class="punct">)</span><br /> <span class="attribute">@server</span> <span class="punct">=</span> <span class="ident">server</span><br /> <span class="keyword">end</span><br /><br /> <span class="keyword">def </span><span class="method">getServer</span><br /> <span class="attribute">@server</span><br /> <span class="keyword">end</span><br /><span class="keyword">end</span> </pre> <p> Again, I've set up a sample project that includes all the pieces - JRuby, Rake, Jetty, and associated scripts. You can get it from subversion here: </p> <div class="svn">svn://svn.foemmel.com/blog/jrake/running</div> <p> If you're interested in the scripts but don't want to download all the third-party stuff, just check out the <code>lib</code> directory: </p> <div class="svn">svn://svn.foemmel.com/blog/jrake/running/lib</div>Matthew Foemmel, Part 2: Testing<p> In my <a href="">previous</a> post I showed how to integrate JRuby/Rake with <code>javac</code>, in a way that eliminated the need to start up a new virtual machine for each compilation. This was fairly straightforward - I used JRuby's high level <a href="">java integration</a> to load the compiler class from the system classloader, then invoked its <code>compile</code> method. </p> <p> Next on my list was integration with JUnit, which turned out to be a bit more complicated. I was able to load the main JUnit classes (e.g. <code>org.junit.runner.JUnitCore</code>) using the same high level mechanism as before, but for the actual <em>test</em>. </p> <p> In the end I got it working without too much trouble. The <code>junit</code>: </p><pre class="ruby"><span class="keyword">def </span><span class="method">junit</span><span class="punct">(</span><span class="ident">test_class_dir</span><span class="punct">,</span> <span class="ident">class_path</span><span class="punct">)</span><br /><br /><span class="comment"># Append the test_class_dir to the class_path, if necessary</span><br /><span class="ident">class_path</span> <span class="punct">+=</span> <span class="punct">[</span><span class="ident">test_class_dir</span><span class="punct">]</span> <span class="keyword">unless</span> <span class="ident">class_path</span><span class="punct">.</span><span class="ident">member?</span><span class="punct">(</span><span class="ident">test_class_dir</span><span class="punct">)</span><br /><br /><span class="comment"># Make sure test_class_dir has trailing slash</span><br /><span class="keyword">unless</span> <span class="ident">test_class_dir</span><span class="punct">[-</span><span class="number">1</span><span class="punct">,</span><span class="number">1</span><span class="punct">]</span> <span class="punct">==</span> <span class="punct">'</span><span class="string">/</span><span class="punct">'</span><br /> <span class="ident">test_class_dir</span> <span class="punct">=</span> <span class="ident">test_class_dir</span> <span class="punct">+</span> <span class="punct">'</span><span class="string">/</span><span class="punct">'</span><br /><span class="keyword">end</span><br /><br /><span class="comment"># Scan test_class_dir for test class files</span><br /><span class="ident">class_names</span> <span class="punct">=</span> <span class="punct">[]</span><br /><span class="constant">FileList</span><span class="punct">["</span><span class="string"><span class="expr">#{test_class_dir}</span>/**/*Test.class</span><span class="punct">"].</span><span class="ident">each</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">class_file</span><span class="punct">|</span><br /> <span class="ident">class_names</span> <span class="punct"><<</span> <span class="ident">class_file</span><span class="punct">[</span><span class="ident">test_class_dir</span><span class="punct">.</span><span class="ident">length</span><span class="punct">,</span><br /><span class="ident">class_file</span><span class="punct">.</span><span class="ident">length</span> <span class="punct">-</span> <span class="ident">test_class_dir</span><span class="punct">.</span><span class="ident">length</span> <span class="punct">-</span> <span class="punct">'</span><span class="string">.class</span><span class="punct">'.</span><span class="ident">length</span><span class="punct">].</span><span class="ident">gsub</span><span class="punct">('</span><span class="string">/</span><span class="punct">',</span> <span class="punct">'</span><span class="string">.</span><span class="punct">')</span><br /><span class="keyword">end</span><br /><span class="ident">fail</span> <span class="punct">"</span><span class="string">No test classes found</span><span class="punct">"</span> <span class="keyword">if</span> <span class="ident">class_names</span><span class="punct">.</span><span class="ident">empty?</span><br /><br /><span class="comment"># Load the test classes via a new classloader</span><br /><span class="ident">classes</span> <span class="punct">=</span> <span class="ident">load_classes</span><span class="punct">(</span><span class="ident">class_path</span><span class="punct">,</span> <span class="ident">class_names</span><span class="punct">)</span><br /><br /><span class="comment"># Run the tests</span><br /><span class="ident">runner</span> <span class="punct">=</span> <span class="ident">org</span><span class="punct">.</span><span class="ident">junit</span><span class="punct">.</span><span class="ident">runner</span><span class="punct">.</span><span class="ident">JUnitCore</span><span class="punct">.</span><span class="ident">new</span><br /><span class="ident">runner</span><span class="punct">.</span><span class="ident">add_listener</span><span class="punct">(</span><span class="ident">org</span><span class="punct">.</span><span class="ident">junit</span><span class="punct">.</span><span class="ident">internal</span><span class="punct">.</span><span class="ident">runners</span><span class="punct">.</span><span class="ident">TextListener</span><span class="punct">.</span><span class="ident">new</span><span class="punct">)</span><br /><span class="ident">result</span> <span class="punct">=</span> <span class="ident">runner</span><span class="punct">.</span><span class="ident">run</span><span class="punct">(</span><span class="ident">to_java_array</span><span class="punct">(</span><span class="ident">java</span><span class="punct">.</span><span class="ident">lang</span><span class="punct">.</span><span class="ident">Class</span><span class="punct">,</span> <span class="ident">classes</span><span class="punct">))</span><br /><span class="ident">fail</span><span class="punct">("</span><span class="string">Unit tests failed</span><span class="punct">")</span> <span class="keyword">unless</span> <span class="ident">result</span><span class="punct">.</span><span class="ident">was_successful</span><br /><span class="keyword">end</span><br /><br /><span class="keyword">def </span><span class="method">load_classes</span><span class="punct">(</span><span class="ident">class_path</span><span class="punct">,</span> <span class="ident">class_names</span><span class="punct">)</span><br /><br /><span class="comment"># Make sure directories have a trailing slash, otherwise URLClassLoader ignores them</span><br /><span class="ident">class_path</span><span class="punct">.</span><span class="ident">each</span> <span class="punct">{</span> <span class="punct">|</span><span class="ident">element</span><span class="punct">|</span> <span class="ident">element</span> <span class="punct"><<</span> <span class="punct">'</span><span class="string">/</span><span class="punct">'</span> <span class="keyword">if</span> <span class="constant">FileTest</span><span class="punct">.</span><span class="ident">directory?</span><span class="punct">(</span><span class="ident">element</span><span class="punct">)</span> <span class="punct">&&</span> <span class="ident">element</span><span class="punct">[-</span><span class="number">1</span><span class="punct">,</span><span class="number">1</span><span class="punct">]</span> <span class="punct">!=</span> <span class="punct">'</span><span class="string">/</span><span class="punct">'</span> <span class="punct">}</span><br /><br /><span class="comment"># Convert classpath elements to URLs</span><br /><span class="ident">urls</span> <span class="punct">=</span> <span class="ident">to_java_array</span><span class="punct">(</span><span class="ident">java</span><span class="punct">.</span><span class="ident">net</span><span class="punct">.</span><span class="ident">URL</span><span class="punct">,</span> <span class="ident">class_path</span><span class="punct">.</span><span class="ident">map</span> <span class="punct">{</span> <span class="punct">|</span><span class="ident">element</span><span class="punct">|</span> <span class="ident">java</span><span class="punct">.</span><span class="ident">net</span><span class="punct">.</span><span class="ident">URL</span><span class="punct">.</span><span class="ident">new</span><span class="punct">('</span><span class="string">file:</span><span class="punct">'</span> <span class="punct">+</span> <span class="ident">element</span><span class="punct">)</span> <span class="punct">})</span><br /><br /><span class="comment"># Create a class loader for the specified class path</span><br /><span class="ident">loader</span> <span class="punct">=</span> <span class="ident">java</span><span class="punct">.</span><span class="ident">net</span><span class="punct">.</span><span class="ident">URLClassLoader</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">urls</span><span class="punct">)</span><br /><span class="keyword">return</span> <span class="ident">class_names</span><span class="punct">.</span><span class="ident">map</span> <span class="punct">{</span> <span class="punct">|</span><span class="ident">class_name</span><span class="punct">|</span> <span class="ident">loader</span><span class="punct">.</span><span class="ident">loadClass</span><span class="punct">(</span><span class="ident">class_name</span><span class="punct">)</span> <span class="punct">}</span><br /><br /><span class="keyword">end</span> </pre> <p> Unfortunately, I had to use the internal JUnit TextListener to display the results of the tests, since JRuby doesn't currently support extending existing Java classes in such a way that I could provide my own subclass of <a href="">RunListener</a>. This will hopefully be fixed in a future version of JRuby. </p> <p> <b>Interactive JRake</b> </p> <p>: </p><pre class="ruby">jrake shell v0.0<br /><br />Valid targets:<br /> clean - deletes all generated files<br /> main_compile - compiles the main code<br /> unit_compile - compiles the unit test code<br /> unit_test - runs the units tests<br /> help - displays this help text<br /> exit - quits the application<br /><br />A blank line repeats the previous command.<br /><br />jrake> <em><strong>main_compile</strong></em><br />compiling 1 java file(s)...done<br />jrake> <em><strong>unit_test</strong></em><br />compiling 1 java file(s)...done<br />.<br />Time: 0.009<br /><br />OK (1 test)<br /><br />jrake> <em><strong>clean unit_test</strong></em><br />deleting 10 file(s)...done<br />compiling 1 java file(s)...done<br />compiling 1 java file(s)...done<br />.<br />Time: 0.002<br /><br />OK (1 test)<br /><br />jrake> <em><strong>exit</strong></em> </pre> <p> You can download the entire sample project via subversion here: </p> <div class="svn">svn://svn.foemmel.com/blog/jrake/testing</div> <p> Just run the "build.bat" or "build.sh" scripts with no arguments to bring up the JRake Shell. If any arguments are passed in, the behavior is the same as before i.e. the targets will be built then the script will terminate. </p> <p> <b>Next Steps</b> </p> <p> Now we just need to get the app up and running... </p>Matthew Foemmel, Part 1: Compiling<p> For as long as I've been working with Java, I've been in search of a build tool that didn't drive me, and those around me, bat-shit crazy. I've come to realize I have two somewhat conflicting requirements for such a tool: </p><ol><li> <p> <b>Must be based on a scripting language</b> </p> <p> Builds get complicated, and I need a tool that will let me do arbitrarily complex things, preferably in a well-known scripting language with lots of supporting libraries. </p> </li><li> <p> <b>Must run on the Java platform</b> </p> <p> The Java virtual machine takes time to start up. Since most tools that deal with Java code (e.g. <code>javac</code>). </p> <p> The solution is for the build tool to treat all of the supporting tools as libraries, not command line applications. For example, instead of calling <code>javac</code> directly, just invoke the method <code>com.sun.tools.javac.Main.main(String[])</code>. That way you only incur the VM startup time once. </p> </li></ol> <p> The tools I've used in the past don't meet these requirements, of course. Specifically: </p><ul><li> <p> <code>make</code> fails on both counts (along with most other tools). </p> </li><li> <p> <code>ant</code> fails <em>manages</em>. </p> </li><li> <p> <code>rake</code>, running on top of standard C-Ruby, fails to meet the second requirement. However, Rake itself is a damn nice tool. See Martin Fowler's <a href="">article</a> for a good summary. </p> </li></ul> <p> <b>Rake and JRuby</b> </p><p> <code>javac</code> class directly, without starting a new VM. This actually isn't much of a trick, since integrating with Java is exactly what JRuby was designed for. </p> <p> And so, after a bit of trial and error, here is a rakefile that does just that. It compiles any out-of-date java files in the "src" directory and puts the resulting class files in the "tmp" directory: </p> <pre class="ruby"><span class="ident">require</span> <span class="punct">'</span><span class="string">java</span><span class="punct">'</span><br /><br /><span class="ident">task</span> <span class="symbol">:default</span> <span class="punct">=></span> <span class="symbol">:compile</span><br /><br /><span class="ident">task</span> <span class="symbol">:compile</span> <span class="keyword">do</span><br /> <span class="ident">src_dir</span> <span class="punct">=</span> <span class="punct">'</span><span class="string">src</span><span class="punct">'</span><br /> <span class="ident">dest_dir</span> <span class="punct">=</span> <span class="punct">'</span><span class="string">tmp</span><span class="punct">'</span><br /><br /> <span class="constant">Dir</span><span class="punct">::</span><span class="ident">mkdir</span><span class="punct">(</span><span class="ident">dest_dir</span><span class="punct">)</span> <span class="keyword">unless</span> <span class="constant">File</span><span class="punct">::</span><span class="ident">exist?</span><span class="punct">(</span><span class="ident">dest_dir</span><span class="punct">)</span><br /><br /> <span class="ident">javac</span><span class="punct">(</span><span class="ident">src_dir</span><span class="punct">,</span> <span class="ident">dest_dir</span><span class="punct">)</span><br /><span class="keyword">end</span><br /><br /><span class="keyword">def </span><span class="method">javac</span><span class="punct">(</span><span class="ident">src_dir</span><span class="punct">,</span> <span class="ident">dest_dir</span><span class="punct">)</span><br /> <span class="ident">java_files</span> <span class="punct">=</span> <span class="ident">get_out_of_date_files</span><span class="punct">(</span><span class="ident">src_dir</span><span class="punct">,</span> <span class="ident">dest_dir</span><span class="punct">)</span><br /><br /> <span class="keyword">unless</span> <span class="ident">java_files</span><span class="punct">.</span><span class="ident">empty?</span><br /> <span class="ident">print</span> <span class="punct">"</span><span class="string">compiling <span class="expr">#{java_files.size}</span> java file(s)...</span><span class="punct">"</span><br /><br /> <span class="ident">args</span> <span class="punct">=</span> <span class="punct">['</span><span class="string">-d</span><span class="punct">',</span> <span class="ident">dest_dir</span><span class="punct">,</span> <span class="punct">*</span><span class="ident">java_files</span><span class="punct">]</span><br /><br /> <span class="ident">buf</span> <span class="punct">=</span> <span class="ident">java</span><span class="punct">.</span><span class="ident">io</span><span class="punct">.</span><span class="ident">StringWriter</span><span class="punct">.</span><span class="ident">new</span><br /> <span class="keyword">if</span> <span class="ident">com</span><span class="punct">.</span><span class="ident">sun</span><span class="punct">.</span><span class="ident">tools</span><span class="punct">.</span><span class="ident">javac</span><span class="punct">.</span><span class="ident">Main</span><span class="punct">.</span><span class="ident">compile</span><span class="punct">(<br /> </span><span class="ident">to_java_array</span><span class="punct">(</span><span class="ident">java</span><span class="punct">.</span><span class="ident">lang</span><span class="punct">.</span><span class="ident">String</span><span class="punct">,</span> <span class="ident">args</span><span class="punct">),</span> <span class="ident">java</span><span class="punct">.</span><span class="ident">io</span><span class="punct">.</span><span class="ident">PrintWriter</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">buf</span><span class="punct">))</span> <span class="punct">!=</span> <span class="number">0</span><br /> <span class="ident">print</span> <span class="punct">"</span><span class="string">FAILED<span class="escape">\n\n</span></span><span class="punct">"</span><br /> <span class="ident">print</span> <span class="ident">buf</span><span class="punct">.</span><span class="ident">to_s</span><br /> <span class="ident">print</span> <span class="punct">"</span><span class="string"><span class="escape">\n</span></span><span class="punct">"</span><br /> <span class="ident">fail</span> <span class="punct">'</span><span class="string">Compile failed</span><span class="punct">'</span><br /> <span class="keyword">end</span><br /> <span class="ident">print</span> <span class="punct">"</span><span class="string">done<span class="escape">\n</span></span><span class="punct">"</span><br /> <span class="keyword">end</span><br /><span class="keyword">end</span><br /><br /><span class="keyword">def </span><span class="method">get_out_of_date_files</span><span class="punct">(</span><span class="ident">src_dir</span><span class="punct">,</span> <span class="ident">dest_dir</span><span class="punct">)</span><br /> <span class="ident">java_files</span> <span class="punct">=</span> <span class="punct">[]</span><br /> <span class="constant">FileList</span><span class="punct">["</span><span class="string"><span class="expr">#{src_dir}</span>/**/*.java</span><span class="punct">"].</span><span class="ident">each</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">java_file</span><span class="punct">|</span><br /> <span class="ident">class_file</span> <span class="punct">=</span> <span class="ident">dest_dir</span> <span class="punct">+</span> <span class="ident">java_file</span><span class="punct">[</span><span class="ident">src_dir</span><span class="punct">.</span><span class="ident">length</span><span class="punct">,</span><br /> <span class="ident">java_file</span><span class="punct">.</span><span class="ident">length</span> <span class="punct">-</span> <span class="ident">src_dir</span><span class="punct">.</span><span class="ident">length</span> <span class="punct">-</span> <span class="punct">'</span><span class="string">.java</span><span class="punct">'.</span><span class="ident">length</span><span class="punct">]</span> <span class="punct">+</span> <span class="punct">'</span><span class="string">.class</span><span class="punct">'</span><br /> <br /> <span class="comment"># todo: figure out why File.ctime doesn't work</span><br /> <span class="keyword">unless</span> <span class="constant">File</span><span class="punct">.</span><span class="ident">exist?</span><span class="punct">(</span><span class="ident">class_file</span><span class="punct">)</span><br /> <span class="punct">&&</span> <span class="ident">java</span><span class="punct">.</span><span class="ident">io</span><span class="punct">.</span><span class="ident">File</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">class_file</span><span class="punct">).</span><span class="ident">lastModified</span> <span class="punct">></span> <span class="ident">java</span><span class="punct">.</span><span class="ident">io</span><span class="punct">.</span><span class="ident">File</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">java_file</span><span class="punct">).</span><span class="ident">lastModified</span><br /> <span class="ident">java_files</span> <span class="punct"><<</span> <span class="ident">java_file</span><br /> <span class="keyword">end</span><br /> <span class="keyword">end</span><br /> <span class="keyword">return</span> <span class="ident">java_files</span><br /><span class="keyword">end</span><br /><br /><span class="keyword">def </span><span class="method">to_java_array</span><span class="punct">(</span><span class="ident">element_type</span><span class="punct">,</span> <span class="ident">ruby_array</span><span class="punct">)</span><br /> <span class="ident">java_array</span> <span class="punct">=</span> <span class="ident">java</span><span class="punct">.</span><span class="ident">lang</span><span class="punct">.</span><span class="ident">reflect</span><span class="punct">.</span><span class="ident">Array</span><span class="punct">.</span><span class="ident">newInstance</span><span class="punct">(</span><span class="ident">element_type</span><span class="punct">,</span> <span class="ident">ruby_array</span><span class="punct">.</span><span class="ident">size</span><span class="punct">)</span><br /> <span class="ident">ruby_array</span><span class="punct">.</span><span class="ident">each_index</span> <span class="punct">{</span> <span class="punct">|</span><span class="ident">i</span><span class="punct">|</span> <span class="ident">java_array</span><span class="punct">[</span><span class="ident">i</span><span class="punct">]</span> <span class="punct">=</span> <span class="ident">ruby_array</span><span class="punct">[</span><span class="ident">i</span><span class="punct">]</span> <span class="punct">}</span><br /> <span class="keyword">return</span> <span class="ident">java_array</span><br /><span class="keyword">end</span><br /><br /></pre> <p> If you want to play around around with this script but can't be bothered to install JRuby, Rake, and the other bits, I've created a complete "Hello World" project that includes everything you need. You can get it from subversion here: </p> <div class="svn">svn://svn.foemmel.com/blog/jrake/compiling</div> <p> Just checkout the project, make sure JAVA_HOME points to your JDK, and run the "build" script to see it go. </p> <p> <b>Next Steps</b> </p> <p> I've gotten JUnit and a few other cool things working with JRake, which I'll write about in my next post. </p>Matthew Foemmel | http://feeds.feedburner.com/foemmel | CC-MAIN-2018-09 | en | refinedweb |
2 March 2013 Update: Added security links
20 June 2012 Update: Cookieless Session and Authentication not supported in ASP.NET MVC.
Executive Overview
You cannot use routing or web.config files to secure your MVC application. The only supported way to secure your MVC application is to apply the Authorize attribute to each controller and use the new AllowAnonymous attribute on the login and register actions. Making security decisions based on the current area is a Very Bad Thing and will open your application to vulnerabilities.
Web.config-based security should never be used in an MVC application. The reason for this is that multiple URLs can potentially hit a controller, and putting these checks in Web.config invariably misses something.
There is a fundamental difference in protected resources between WebForms and MVC. In WebForms, the resources you're trying to protect are the pages themselves, and since the pages exist on disk at a well-known path you can use Web.config to secure them. However, in MVC, the resources you're trying to protect are actually controllers and actions, not individual paths and pages. If you try protecting the path rather than the controller, your application likely has a security vulnerability.
In MVC, by default all controllers + actions are accessible to all users, both authenticated and guest. To secure controllers or actions, the Authorize attribute has been provided (which can be applied globally as shown below)..
ASP.NET MVC 3 introduced global filters, which allows you to add the AuthorizeAttribute filter to the global.asax file to protect every action method of every controller. (In MVC versions prior to MVC 3, it was difficult to enforce the AuthorizeAttribute attribute be applied to all methods except login/register. See my previous blog on security for details.) The code below shows how to add the AuthorizeAttribute filter globally.
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new System.Web.Mvc.AuthorizeAttribute()); }
The problem with applying Authorize globally is that you have to be logged on (authorized) before you can log on or register. In a previous blog, I suggested you create a custom AllowAnonymous attribute that you could apply to your login and register actions to explicitly opt out of authorization (that is, override the global application of Authorize on methods/controllers decorated with the attribute). (Actually, Levi came up with the AllowAnonymous idea.) ASP.NET MVC 4 includes the new AllowAnonymous attribute, you no longer need to write that code. Setting the AuthorizeAttribute globally in global.asax and then whitelisting (That is, explicitly decorating the method with the AllowAnonymous attribute) the methods you want to opt out of authorization is considered a best practice in securing your action methods. Other approaches such as blacklisting methods (that is, decorating each method you want with the AuthorizeAttribute attribute ), or creating a base controller with an [Authorize] attribute, and derive each controller (except the Account/Login controller) from that base class – have the problem that new controllers/methods are not automatically protected. See Securing your ASP.NET MVC 3 Application for more details.
When you create a new ASP.NET MVC 4 internet application, you’ll see the login and register methods decorated with this attribute:
[AllowAnonymous] public ActionResult Login(string returnUrl) [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult Login(LoginModel model, string returnUrl) [AllowAnonymous] public ActionResult Register() [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult Register(RegisterModel model)
To add a global authorization filter to your Web ApiController, add the following line to the
Application_Start method in the global.asax file:
GlobalConfiguration.Configuration.Filters.Add(new System.Web.Http.AuthorizeAttribute());
Notice the MVC controller authorize filter is from System.Web.Mvc while the ApiController authorize filter is from System.Web.Http.
Am I Safe Now?
ASP.NET can also successfully create and modify the form’s application has called FormsAuthentication.SignOut, the authentication ticket remains valid until its time-to-live (TTL) expires, so it can be used by an attacker to impersonate another user.
- Eavesdropping. An attacker could look inside a form’s protect against these threats, you can apply the RequireHttpsAttribute to the global filters collection in the global.asax file.
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new System.Web.Mvc.AuthorizeAttribute()); filters.Add(new RequireHttps. Besides, you’ve already taken the time to perform the handshake and secure the channel (which is the bulk of what makes HTTPS slower than HTTP) before the MVC pipeline is run, so redirecting back to HTTP after you’re logged in won’t make the current request or future requests much faster. If you’re hosting static content (youtube for example), change your embedding to use HTTPS rather than HTTP. If you drop down to HTTP from HTTPS without correctly signing out (see ) your username + password is wide open. It's not enough to call FormsAuthentication.SignOut().
For information on setting up SSL on ASP.NET MVC, see my blog entry Better, Faster, Easier SSL testing for ASP.NET MVC & WebForms. IIS Express (the new default web server for Visual Studio 11) supports SSL.
Over-Posting Model Data
Suppose Create view for the comments to be entered by users:
<div class="editor-label"> @Html.LabelFor(model => model.Name) </div> <div class="editor-field"> @Html.EditorFor(model => model.Name) @Html.ValidationMessageFor(model => model.Name) </div> <div class="editor-label"> @Html.LabelFor(model => model.Body) </div> <div class="editor-field"> @Html.EditorFor(model => model.Body) @Html.ValidationMessageFor(model => model.Body) </div>?
- The preferred approach is to pass a view model that doesn’t contain any fields you don’t want exposed ( Blog and Approved in our sample. )
- You could use the Bind attribute, either on the Comment type or on the Comment action parameter, to indicate which properties are approved or disapproved for binding. The "white-list" approach is preferred so that only the named properties can be bound to, rather than the "black-list" approach (which excludes specific properties, and allows binding to everything else). With the black-list approach, you have to remember to black-list new properties added to the model.
- Use the (Try)UpdateModel methods on Controller have overloads which accept white-/black-list parameter lists to tell the system which properties are eligible for binding.
Under-Posting Model Data
Under-posting is also a security risk. See Brad Wilson blog entry Input Validation vs. Model Validation in ASP.NET MVC which discusses security issues related to model validation. Although the blog was written in the ASP.NET MVC 2 timeframe, the security details apply to ASP.NET MVC 4 versions.
Mixing Windows Authorization with Forms Authentication
The ASP.NET team doesn’t support using mixed-mode authentication in an application. If you search the web, you’ll find blog posts on how to do this, but please note that the techniques discussed in these blog posts are discouraged by the team. The reason this is discouraged is that it is very difficult to reason about security from a correctness point of view, and there are trivial attacks against such a setup that can allow malicious clients to masquerade as an authenticated user. If a supported/secure approach to using mixed-mode authentication is important to you, make a request on our UserVoice page.
Cookieless Session and Authentication
ASP.NET MVC does not support cookieless session and authentication and we actively discourage it. Cookieless sessions are vulnerable to session hijacking attacks.
Security Links
Deploy a Secure ASP.NET MVC app with Membership, OAuth, and SQL Database to a Windows Azure Web Site
ASP.NET MVC 4 Security section of content map
Here’s some good StackOverflow (SO) links to Levi’s responses to area security questions.
- How do I create a custom AuthorizeAttribute that is specific to the area, controller and action?
- routes.RouteExistingFiles : Keep this set to false so Routing and the MVC pipeline don't handle these requests, IIS and ASP.NET core do that. SO answer by Levi. See Phil Haacked post.
- Mvc Antiforgery token multi tabs : Once you log in, all previous tokens are invalid. That's how it's supposed to work.
- How to choose a salt value for ValidateAntiForgeryToken See Levi’s response.
- runtime loading of ValidateAntiForgeryToken Salt value.
- Is an ASP.NET MVC Controller's Edit Action vulnerable to hacking the primary key?
- File input and validation in ASP.NET MVC : Browsers will not allow you to prepopulate file input elements …
- Should we sanitize non-string parameters passed to an action method? sanitize these inputs in the view
- Is saving the user input without sanitizing vulnerable to SQL-injection attack? If you're using LinqToSql, EF, or some other similar ORM framework, they handle escaping input strings on your behalf.
- [Authorize] attribute on controller/method with role
- All of Levi’s SO responses..
In addition to blogging, I use Twitter to-do quick posts and share links. My Twitter handle is: @RickAndMSFT
Does the global Authorize filter work with the new Web Api in ASP.NET MVC 4?
As an alternative to using attributes (Authorize/AllowAnonymous) to secure your MVC application, I would recommend taking a look at FluentSecurity (). It's free and open source!
Awesome article, very helpful!
Just one thing – please, fix a typo in this sentence – "(the new default web browser for Visual Studio 11)". Should it be "(the new default web server for Visual Studio 11)"?
Michael :Does the global Authorize filter work with the new Web Api in ASP.NET MVC 4?
I updated the blog to show this. Thanks for asking.
Kristoffer Ahl : look at FluentSecurity ( – Thanks
reav : Typo – fixed, thanks
Hi, thanks for your comment. I’m glad you find this collection useful.
Thanks
Best article on securing our applications.. Very much helpful… Thank you.
dear rick, do you know if its planned to release a new forms authentication system with asp.net 4.5? otherwise, do you know in which place its possible to write ms in order to ask for functionalities and features? brgds!
I have authentication in my web.config which works perfectly in MVC and with Controllers without needing to set any of the above??? I am using VS 2012 Express for Web and .Net 4.0.
Thank you for making this so clear. Have been struggling with how to setup an MVC4 application that will consume a AWS. This solves the MVC part.
Thanks, nice post. I'd like to see something similar around ASP.NET Web API where cookies aren't an option and we have to use some flavour of OAuth / HMAC / trusted client token / etc.
What do you see as the best options in this space?
I'm curious, with the [Authorize(Roles = "Admins")] on the controller… will this use an AzMan provider if everything was setup properly for AzMan (i.e. Connection string / role manager in config)? We currently use AzMan to manage all of our roles.
Thanks Rick. This is exactly what I was looking for. Many times MSDN does not give me what I need. Kudos
Question on using FormsAuthentication. I created a new controller in the same Controllers folder as the AccountController named ForgotPasswordController. I have the [Authorize] attribute on the public class ForgotPasswordController and the only action in the controller has the [AllowAnonymous] and also the [HttpGet] attribute applied.
When I run the application I am unable to navigate to the /ForgotPassword/ResetPassword and I get redirected to the login page. So, my question is, why can't I use the Authorize and AllowAnonymous with forms authentication on any controller except the AccountController?
<a href="">Estate Agency Software</a>
Thanks for sharing great information with us. Keep it up……..
Hi I created a brand new mvc4 application from Internet template added
filters.Add(new System.Web.Mvc.AuthorizeAttribute()); to RegisterGlobalFilters method. Now It generates 401 unauthorized when I hit F5. It goes to login action and it marked with [AllowAnonymous] attribute. why I can not go to Login view?
Hi Rick,
What is best practice for session storage kind of scenario?
User logs in you application and I want to store its personal info in session and use is accross the pages in application.
Regards,
Mangesh Jadhav
Hi Rick,
How can I disable authentication in public pages such as home page?
Hi Rick_Anderson, Thanks for such a nice and informative article. I an very new to MVC and i am making a web application on MVC 4 and WEB api 2. Please suggest me how i should proceed for adding authentication and authorization feature. I have to make my web api's also secure. Please reply….…
Rick,… | https://blogs.msdn.microsoft.com/rickandy/2012/03/23/securing-your-asp-net-mvc-4-app-and-the-new-allowanonymous-attribute/ | CC-MAIN-2018-09 | en | refinedweb |
Deploy PostgreSQL into IBM Cloud private
This story describes how to deploy PostgreSQL, an open source object-relational database system, into IBM Cloud private, IBM’s new Kubernetes based private cloud, by using helm charts and persistent volumes.
- The first step is to install IBM Cloud private . The detailed instructions to do so can be found here. Once you have installed IBM Cloud private, the next steps are as follows:
- Create a persistent volume or set up dynamic provisioning
- Install PostgreSQL 9.6.4 Helm Chart
- Start using PostgreSQL!
Create a persistent volume
- Create a persistent volume and a persistent volume claim. This can be done using the IBM Cloud private App Centre UI as show below.
- On the upper left dropdown menu, click on Platform and select storage.
a) To create a persistent volume, click on Create persistent volume and then fill in the required details as shown below.
Enter the details on the following dialog box and click on create.
The persistent volume is now created.
b) Create a persitent volume claim as follows:
Click on the Persistent Volume claim tab and the click on Create PersistenVolumeClaim.
Enter the details in the following dialog box and click on create.
Note: It is required that the Access mode and size be the same for the persistent volume and the persistent volume claim.
The persistent volume claim is now created and bound to the persistent volume as seen below.
- Dynamic provisioning allows storage volumes to be created on-demand. You can use storage classes to provision these volumes. To setup dynamic provisioning environment, follow the instructions detailed here.With Dynamic Provisioning, no persistent volume or claim is required beforehand.
- Using the App Centre UI, you can setup dynamic provisioning during the installation of the chart by setting the “persistence.useDynamicProvisioning” field to true.
Install PostgreSQL 9.6.4 Helm chart
- The next step is to install PostgreSQL. There are two ways to install PostgreSQL:
- 1. Using IBM Cloud private’s UI to deploy the chart.
- Open IBM Cloud private 2.1 , log in and you will see the dashboard. From the upper left dropdown menu scroll to the bottom of the dropdown options and select, “Catalog”.
Select the ibm-postgres-dev chart and click on the chart.
Click on Configure to configure the chart
Enter the release name and select the checkbox to accept the license terms after reading them.
By default, the chart will create a user ‘postgres’ and generate a random password, but you can also specify your own values here:
Once you are ready and have reviewed the chart and all the advanced settings, click on Install.
Now your chart is deployed!
You can check the status of your deployment by clicking on Helm releases on the above dialog.
Clicking on your deployment will lead you to the page where you can check if your deployment is now in the running state.
2. From the command line by using Helm commands.
- For the second option to use the command line to deploy the chart, you can directly access the Helm charts at:.
- The chart that deploys PostgreSQL creates the default user ‘postgres’ for you with a database called postgres.
Once installed, PostgreSQL can be used in the following manner:
- To get your deployment name, run
kubectl get pods
2. Use this deployment name for the next steps.
3. Get the user password using the following command:
PGPASSWORD=$(kubectl get secret --namespace default <deployment name> -o jsonpath="{.data.password}" | base64 --decode; echo)
4. To connect to your database, you can run the following command to start a simple client (using the environment variable from above):
kubectl run <deployment name>-client --rm --tty -i --image postgres \ --env "PGPASSWORD=$PGPASSWORD" \ --command -- psql -U postgres \
-h <deployment name> postgres
5. The following example shows the above commands in action:
6. To connect to your database directly from outside the K8s cluster:
a) If using the default setting for Nodeport:
PGHOST=$(kubectl get nodes --namespace default -o jsonpath='{.items[0].status.addresses[0].address}')
PGPORT=$(kubectl get svc --namespace default <deployment name> -o jsonpath='{.spec.ports[0].nodePort}')
b) For cluster IP,
PGHOST=127.0.0.1
PGPORT=5432
- Execute the following commands to route the connection:
export POD_NAME=$(kubectl get pods --namespace default -l "app=<deployment name>" -o jsonpath="{.items[0].metadata.name}")
kubectl port-forward $POD_NAME 5432:5432
Conclusion
Using this story you can deploy and run PostgreSQL into IBM Cloud private.Thank you! Comments and questions are welcome.
Originally published at developer.ibm.com. | https://medium.com/@robinabhatia3691/deploy-postgresql-into-ibm-cloud-private-597492c999 | CC-MAIN-2018-09 | en | refinedweb |
September 21, 2001
Mr. Timothy Lucas Director of Research and Technical Activities Financial Accounting Standards Board 401 Merritt 7 P.O Box 5116 Norwalk, CT 068-5116 Dear Mr. Lucas: Attached is the response by the American Academy of Actuaries to the Joint Working Group Draft Standard and Basis for Conclusions, Financial Instruments, and Similar Items. in the United States. If you have any questions please do not hesitate to contact Meredith Watts at watts@actuary.org or (202) 223-8196. Thank you for the opportunity to contribute. Best Regards,
Burton Jay
1100 Seventeenth Street NW Seventh Floor Washington, DC 20036 Telephone 202 223 8196 Facsimile 202 872 1948
COMMENTS ON DRAFT STANDARD ON FINANCIAL INSTRUMENTS I. Scope and Definitions Q1. The Draft Standard would apply to all enterprises (see Draft Standard paragraph 1 and Basis for Conclusions paragraphs 2.1-2.12). Do you agree? If not, please specify which enterprises you believe should be excluded from the scope (and why), and the basis on which you would distinguish those enterprises that should apply the Draft Standard from those that need or should not. Academy Response – We agree that the standard on financial instruments should apply to all enterprises. However, we believe accounting standards for all financial instruments should be implemented at the same time. Paragraph 1 points out that certain financial instruments are not covered under this Draft Standard. Specifically, it excludes: (a) interests in subsidiaries, associates or joint ventures that are accounted for under other standards, (b) employers’ assets and liabilities under employee benefit plans, (c) retirement benefit obligations of defined benefit plans, and (d) rights and obligations with insurance risks, resulting from insurance contracts, with some exceptions. Other financial instruments are also exempted. We understand that others will address accounting standards for at least some of the above exempted financial instruments. We would like to emphasize the importance of uniform and consistent accounting standards for all financial instruments and for assets and liabilities similar to financial instruments that are held by a given enterprise. If a fair value accounting method is adopted for most financial instruments, the accounting for all other financial instruments and other instruments that are similar to financial instruments should be consistent with fair value concepts. We further believe that the new standards should not be implemented on a piecemeal basis. Consistent standards for all financial instruments should be defined and accepted before such standards are implemented for any financial instruments. Anything other than comprehensive adoption will result in financial statements that are misleading and may invite accounting arbitrage. Q2. The definition of a financial instrument would differ somewhat from the present IASC definition (see Draft Standard paragraph 7 and Basis for Conclusions paragraphs 2.13 and 2.14). Do you agree with the definition in the Draft Standard? If not, what changes would you make, and why?
1
Academy Response – We generally agree with the definition of a financial instrument in the draft standard, with the following exceptions. In the definition of a financial instrument, the phrase “in exchange for no consideration other than release from the obligation” in paragraph 7(c) on page 20 does not seem appropriate. One suggestion would be to change this part of the definition to read as follows: Includes: "a contractual obligation of one party to deliver a financial instrument to a second party and a corresponding contractual right of the second party to receive that financial instrument where the terms of the exchange are agreed to by both parties at the time they entered into the transaction. Note: A similar change would be needed to the language included in the definition of a loan asset on pp. 20-21. For example, this language might be changed to read as follows: A loan asset is a contractual right, that is not traded on an exchange or in dealer markets, to receive cash or other financial instruments of fixed or determinable amounts and timing, where the terms of the loan are agreed to by both parties at the time they entered into the transaction. Paragraph 10, on page 21, excludes tax assets or liabilities from the definition of a financial instrument. We disagree with this exclusion. Once an obligation is clearly established as a requirement to make specific fixed payments on a certain schedule, it is a financial instrument and should be accounted for as such. Whether this obligation arose from a contractual agreement, tax obligation, government assessment or legal judgment should be irrelevant. We recommend the addition of an item to the list in paragraph 7 to incorporate such obligations. Q3. No Comment. Q 4. The definition of an insurance contract used in the IASC Insurance Steering Committee’s, Issues Paper: Insurance, November 1999, is used as the basis to exclude insurance contracts from the scope of the Draft Standard. However, financial guarantees and certain contracts that require payment based on the occurrence of uncertain future climatic, geological or other physical events would not be excluded (see Draft Standard paragraphs1(d), 17-19 and Basis for Conclusions paragraphs 2.23-2.30)? Do you agree with this approach and definition? If not, what approach and definition would you propose? Academy Response –
2
We do not agree with the definition as stated because it is unclear whether retroactive insurance contracts satisfy this definition of insurance contracts. The proposed definition of an insurance contract in paragraph 17 can, in certain respects, be interpreted in more than one way. One interpretation, wherein the “future event” is constrained to the event triggering the insured’s liability, would exclude what are sometimes labeled "retroactive" insurance contracts, due to the phrase "future event" in the definition. On the other hand, if one may interpret the “future event” as the ultimate determination of amount of claim to be paid, then such contracts would be included within the definition. Clarification is needed as to which interpretation is intended. In our view, it would be inappropriate to exclude retroactive insurance contracts. This interpretation comes from a reading of paragraph 13, which focuses on the timing of the event that triggers coverage. Examples of retroactive contracts include both a and b below: a) Reinsurance purchased by an insurer (or acquirer of an insurer) to protect against adverse development risk on existing claim liabilities. This is very common during acquisitions of property/casualty insurance companies, and it can result in the transfer of significant insurance risk. b) Insurance purchased by a formerly self-insured company that wishes to transfer its risk of future adverse development on existing claim liabilities. This is common for larger employers who used to retain their Workers Compensation or tort liability claim obligations, but who no longer want to deal with such risk on their balance sheet. The pricing, analysis and economic risks associated with retroactive contracts are similar to those for prospective insurance contracts. The only significant difference is that events triggering a claim obligation have all occurred prior to the contract inception date. This difference is frequently not material to the level of insurance risk in the contract. In fact, many retroactive insurance contracts insure far higher levels of insurance risk than their prospective counterparts, due to a concentration of riskier, longer tail obligations in retroactive contracts. We see no theoretical or philosophical reason why such "retroactive" contracts should be under a separate accounting standard from "prospective" contracts. The determining factor should be the existence of material insurance risk at contract inception, not the timing of the covered event. As such, we recommend that both retroactive and prospective insurance contracts be covered by the same accounting standard. The definition of insurance should allow for reinsurance, for possible payment by cash or service, and for coverage of future insurance risk resulting from either past or future events. It should also allow for insurance contracts that essentially contain only timing risk (e.g., paid-up whole life insurance) or only amount risk (e.g., event coverage, such as for weather-related cancellation of an outdoor entertainment event).
3
Q5. No Comment. Q6. The Draft Standard would require an enterprise, with certain exceptions, to separately account for sets of contractual rights and contractual obligations in a hybrid contract that, if they were separated, would fall within the scope of the Draft Standard (see Draft Standard paragraphs 4-6 and 25 and Basis for Conclusions paragraphs 2.48-2.52). Do you agree with this proposal? Is the definition of a hybrid contract clear and operational? If you disagree with either of these two questions, what alternative would you suggest? Academy Response – We disagree with the proposal to unbundle hybrid contracts if applied to insurance, and we suspect the unbundling concept may have limited value elsewhere. We generally advise against the unbundling of contracts into financial instrument and non-financial instrument components. Such an exercise is inherently subjective, as many policy features generate synergistic benefits. Allocating the value of the total contract to individual features is frequently unreliable, and it is very dependent on the order and the method by which the separation is done. We recommend instead that the rules for valuing both the financial instrument and non-financial instrument components be sufficiently similar such that separation is unnecessary. For example, we believe that dual trigger insurance policies (e.g., insurance policies under which claim payments are a function of both insured losses and an external index or event) should be viewed as insurance policies and not hybrid contracts. (Note: The FASB Derivatives Implementation Group, or DIG, determined that such contracts were wholly under the insurance contract definition in their guidance on FAS 133.) Similarly, an insurance contract that covers both past and future events (i.e., one with both retroactive and prospective features) should not be treated as a hybrid contract under this standard. Our position in this regard was elaborated in our letter to Peter Clark, dated May 29, 2001, which is attached in Appendix A. II.
Recognition and Derecognition
Q7. The basic recognition principle is that an enterprise should recognize a financial asset or financial liability on its balance sheet when, and only when, it has contractual rights or contractual obligations under a financial instrument that result in an asset or liability (see Draft Standard paragraphs 31-34, Application Supplement paragraphs 214-220, and Basis
4
for Conclusions paragraphs 3.1-3.8). Do you agree? If not, why not? How would you amend the principle? Academy Response – We disagree with this principle, as stated. It is unclear how to interpret this principle relative to contingent (conditional) rights or obligations. We recommend rewording of the principle so that it discusses rights or obligations that “may result” in assets or liabilities. The current wording would preclude consideration of constructive rights or obligations arising out of a contract, such as (in an insurance example) the constructive obligation to pay a dividend in the event of favorable experience. Constructive rights and obligations arising out of contracts should also be included. We believe that the principle should be clarified to address the situation in which the obligation can be either a financial instrument or a service contract. Examples from the insurance field include warranty, repair or insurance contracts in which the obligation would be satisfied in either cash or repair of damaged property. In such cases, we believe that the cash equivalent should be reflected and thus the entire asset or liability would be treated as a financial asset or liability. Q8. The Draft Standard would require that a transfer that does not have substance not affect the assets and liabilities recognized. It proposes that a transfer has substance only if either the transferee conducts substantial business, other than being a transferee of financial assets, with parties other than the transferor, or the components transferred have been isolated from the transferor (see Draft Standard paragraphs 35 and 36, Application Supplement paragraphs 222 and 223, and Basis for Conclusions paragraphs 3.72-3.80). Do you agree? If not, how would you propose to limit the potential for non-substantive transactions that might occur without such a test? Academy Response – Although we have no comment with respect to the transfer of an asset, we wonder why the transfer of financial liabilities was not addressed. If this is intentional, we suggest that the “Basis for Conclusions” section include the rationale. Q9.
Q10. No Comment. Q11. No Comment.
5
Q12. The Draft Standard also would require, in the case of a transfer that does not result in the transferee having the practical ability described in Q11, if the transferor is left with either (a) an obligation that could or will involve the repayment of consideration received or (b) a call option over a transferred component that the transferee does not have the practical ability to transfer to a third party, some or all of the transaction to be treated as a loan secured by the transferred component (see Draft Standard paragraphs 63-67, Application Supplement paragraphs 251-258, and Basis for Conclusions paragraphs 3.38-3.71 and 3.93-3.102). (a)
Do you agree? If not, why not? How would you amend the requirement? In particular, if you believe that some transfers involving financial assets are loans secured by the transferred asset, how would you differentiate between those transfers and transfers that are, in effect, sales of the transferred asset? If you do not believe that some transfers involving financial assets are loans secured by the transferred asset, or do not believe that some transfers are sales of the transferred asset, please explain your reasoning.
(b) The Draft Standard would require the liability to be recognized in such circumstances to be measured initially at the maximum amount that might need to be repaid under the obligation or the amount of the consideration received in respect of the transferred component over which the transferor has the call option. To the extent that the obligation and call option overlap, only the larger of the two liabilities would be recognized (see Draft Standard paragraph 64 and Basis for Conclusions paragraphs 3.93-3.98). Do you agree with this approach to determining the amount of the liability? If not, how would you change the approach? (c)
The Draft Standard would require, in the case of transfers that the Draft Standard would require the transferor to treat in part or entirely as loans secured on the transferred asset, the transferee not to adopt accounting that is the mirror-image of the transferor’s (see Application Supplement paragraphs 238-241 and Basis for Conclusions paragraphs 3.64-3.68). Do you agree with this approach? If not, why not? How would you amend the Draft Standard?
Academy Response Paragraphs 49-58 and 62-63 basically describe the circumstances under which paragraphs 59-61 and 64-66 should be applied. The main concerns with this section relate to the treatments described in paragraphs 59-61 and 64-66. The recognition criteria provided in paragraphs 64(a) and 64(b) appear to give measurement guidance, and such guidance does not appear to require
6
reflection of the time value of money. If the intent is to refrain from including measurement guidance in this section, it can be accomplished by changing the words “recognize a liability for” to “recognize a liability, the value of which reflects”. If the intent is to include measurement guidance in this section, then the words “after reflecting the time value of money” should be added at the end of both paragraphs 64(a) and 64(b). Paragraphs 50(b) and 61 deal with the treatment of options in cases where a financial instrument has been transferred but some option in the financial instrument has been retained. In such cases, we believe that the standard should recognize the full value of any option retained, separate from the derecognized financial instrument. For example, in the case of paragraph 50(b), we believe that retention of a clean-up call option does represent a residual interest in the original financial instrument to the extent that the clean-up call has any value. In the case of paragraph 61, we believe that any residual interest in a financial instrument that has been transferred should be measured based on the full value of any option retained as a residual interest -- not on the basis of whether it is “virtually certain” that the option “will be exercised” or “virtually certain” that the option “will not be exercised.” Q13. No Comment. III.
Measurement
Q14. The Draft Standard would require an enterprise to measure all financial instruments at fair value when recognized initially and to remeasure them at fair value at each subsequent measurement date, with one exception (see Draft Standard paragraph 69, Application Supplement paragraphs 315-317, and Basis for Conclusions paragraphs 1.6-1.26). Do you agree? If not, what other approach would you suggest and why? Academy ResponseWe agree with the suggested approach conceptually, but we have two reservations. First, for those financial instruments that are infrequently (if ever) traded, the fair value estimation process may be very involved – requiring non-trivial time and resources to estimate. In such circumstances, when there has been no obvious material change in the underlying data input or assumptions, a full fresh start valuation at each measurement date may not be justified. Where data is difficult to obtain, and the estimation result from that data uncertain, it may take time to differentiate noise in the data from true movement. When this happens, updating every quarter for these subjective and/or unstable inputs may add more noise than true information to the results. A possible alternative approach in some situations may be to require updating the assumptions and other estimation parameters relating to general financial markets (e.g. yield curves and credit spreads) at each measurement date and to
7
require reviewing all other assumptions and estimation parameters (i.e. those specific to the financial instruments in question) at least annually for possible update.. In this alternative approach, additional fresh start valuations would also be required whenever an event or circumstance occurs that would more-likelythan-not have a material impact on the fair value estimate and it is unlikely that the situation would reverse before the next annual fresh start valuation. Second, we understand the logic behind making an exception for certain private equity investments, but we believe the private equity attributes which justify that exception also exist for certain other financial instruments. We would prefer to describe the exception in terms of the attributes, with private equity being given as one example that fits those attributes. Such an approach would be more transferable to insurance liabilities, when the standard for those liabilities is considered. See also Question 20. Q15. The Draft Standard would require the fair value of a financial instrument to be an estimate of its market exit price determined by interactions between unrelated enterprises that have the objective of achieving the maximum benefit or minimum sacrifice from the transaction (see Draft Standard paragraphs 28, 70 and 71 and Basis for Conclusions paragraphs 4.1-4.10). The JWG also proposes that any expected costs that would be incurred to exit a financial instrument at that market exit price should not be taken into account in arriving at a fair value (see Draft Standard paragraphs 72 and 73 and Basic for Conclusions paragraph 4.11). (a) Do you agree with the market exit price objective? If not, how would you amend it and why? (b) Do you agree with the proposed treatment of direct costs to sell or obtain relief from a financial instrument? If not, how would you amend it? Academy Response (a) We agree with the market exit price objective for those financial instruments for which such exit is a viable option. Where such an exit is not a viable option (e.g. where no active market exists), settlement value may be the best available indication of fair value. (b) We disagree with the proposed treatment of direct costs to sell or obtain relief from a financial instrument, except in the case that these costs are not material. Ignoring these costs would overstate the value of financial assets and understate financial liabilities with regard to what could actually be realized by the holder. As such, a fair value estimate is mis-stated if it ignores these costs. The proposed exclusion of such costs in paragraph 72 also is inconsistent with paragraph 96, which requires consideration of such costs in determining the most advantageous market.
8
We note that among the costs typically considered by the market in exit price valuations are various taxes, including income taxes resulting from the transaction. We believe that any income tax consequences of the transaction need to be considered in the fair value estimates in some manner, as these consequences can be a significant determinant of exit price. This is consistent with paragraph 116 (b), which states that factors the market participants would consider in prices should be considered in fair value estimates. Q16. The Draft Standard would require an enterprise to measure a part of a hybrid contract that is to be separately accounted for as if it were a freestanding financial instrument, except if the enterprise determines that it cannot reliably identify and measure the separate sets of financial instrument rights and obligations in the hybrid contract. In the latter case the enterprise would account for the entire contract in the same manner as a financial instrument falling within the scope of the Draft Standard (see Draft Standard paragraphs 74-76 and Basis for Conclusions paragraphs 4.12-4.16). Do you agree with this proposal? If not, what alternative would you suggest? Academy Response In general, we believe hybrid contracts should not be unbundled, as stated in our response to Question 6. To the extent that unbundling might be required, we agree with the proposal outlined in the latter case above Q17. (see Draft Standard paragraphs 77-86 and 104-117, Application Supplement paragraphs 320-327 and 344-369, and Basis for Conclusions paragraphs 4.17 and 4.36-4.47). Do you agree with this hierarchy? If not, how would you amend the proposals, and why? Academy Response – We agree with this hierarchy. However, the second sentence of paragraph 79 should be clarified in light of today’s financial markets, involving 24-hour trading and multiple exchanges around the world dealing with the same financial instrument. For example, the last end-of-day closing price may be the one available on a thinly-traded exchange where transaction prices may not be indicative of the prices available if the transaction were made in a more active or “local” market. We suggest that the Standard should specify that, in relation to market exit prices for quoted instruments, the market of reference should be the market on which the instrument has its primary listing, since this will usually be the market in which the instrument is most actively traded.
9
Q18. The Draft Standard addresses a number of circumstances requiring special consideration in using observed market prices to determine fair value (see Draft Standard paragraphs 87-103, Application Supplement paragraphs 328-343, and Basis for Conclusions paragraphs 4.18-4.35. (a) Do you agree with the Draft Standard’s conclusions in these circumstances? Are there additional circumstances that should be addressed (please specify)? (b) Is the conclusion that value that is not directly attributable to a financial instrument should not enter into the determination of the fair value of a financial instrument (see Draft Standard paragraphs 92-94, Application Supplement paragraphs 331-339, and Basis for Conclusions paragraphs 4.18-4.32) appropriate and operational, in particular as it applies to demand deposit and credit card relationships? If not, why not? (c) Do you agree with the conclusion that, if an enterprise holds a large block of financial instruments and market exit prices are available only for individual instruments or small blocks, the available price should not be adjusted for the potential effect of selling the large block (see Draft Standard paragraphs 102 and 103 and Basis for Conclusions paragraphs 4.34 and 4.35)? If not, in what circumstances would you require adjustment, and how would you ensure consistency of the amount of the adjustments that would be made? Academy Response Regarding part (a) of question 18, we generally agree. However, we recommend clarification of the intent of paragraphs 100-101. Paragraphs 100-101 (Effect of an Embedded Option on the Enterprise Holding the Option) read as follows: 100. If a financial instrument contains a contractual provision (an embedded option) that gives the enterprise the right to settle or require settlement at a price that is more advantageous than the price in observed arm’s-length transactions, the enterprise should measure the instrument at that contractual settlement price (the exercise price of the embedded option) adjusted for the effect of any time period to the exercise date. 101. This requirement applies only to the enterprise that holds the option. The writer of the option would report the instrument at fair value based on observed transactions or, if necessary, at an estimate of that value determined by a valuation technique.
10
Some financial instruments contain many embedded options, with some held by the writer of the instrument and some held by the owner of the instrument. It is not clear whether “the right to settle or require settlement” refers to settlement of each option individually or to settlement of the financial instrument as a whole. We believe the correct interpretation refers to settlement of the financial instrument as a whole. In addition, some kinds of options that do not directly involve settlement of a financial instrument could be exercised in a way that would make immediate settlement a virtual certainty. An example is an option to change the interest rate paid on a savings account. Changing the interest rate paid to zero would likely lead to immediate settlement. Such options could be construed to be within the scope of these paragraphs, because their exercise would indirectly lead to settlement. We feel that such options should not be construed this way. Only options that give a direct right to settle or require settlement of the entire financial instrument should be given the special treatment described in paragraphs 100 and 101. We are also concerned about the provision in paragraph 101 that limits the application of paragraph 100 to the “enterprise that holds the option”. Our main concern here is that these paragraphs should not be interpreted in a manner that would require the issuer (or holder) of a financial instrument to unbundle the various embedded options in the financial instrument and account for each of these differently depending on whether the option is “held” by the issuer of the financial instrument or “held” by the owner of the financial instrument. In our view it might be more appropriate to limit the application of paragraph 100 to the “enterprise that holds the financial instrument in which such an option is embedded”. Regarding part (c) of Question 18, we generally agree, but note that there are circumstances in which the Draft Standard might inappropriately value a large block (e.g., the example given in Basis for Conclusions paragraphs 4.34 and 4.35). The presence of a controlling interest would seem to merit a premium. The Academy agrees that it is unlikely that an entity should value its holdings differently from observable market exit prices, but we believe that this should not be an absolute position. We suggest that the prohibition not be absolute. Instead, if an entity believes the fair value for its block is different from the observable market exit price, then it should disclose the rationale and the basis for revaluation from the observable market exit price. Q19. No Comment. Q20. The JWG believes that fair values are, generally, reliably determinable, at reasonable cost, for all financial instruments except certain investments in private equity instruments (see Draft Standard paragraphs 122-125 and Basis for Conclusions paragraphs 1.14-1.21 and 4.64-4.67). Do you agree? If not, why not? If you believe that other items are not capable of reliable fair valuation, what are they, what factors cause
11
their fair values not to be reliably determinable, and how should these items be measured? Academy Response – We disagree. We would prefer the exception to be described in terms of the attributes, with private equity being given as one example that fits those attributes. Q21. No Comment. Q22. No Comment. IV.
Balance Sheet Presentation
Q23. The Draft Standard would require that minimum categories of financial assets and financial liabilities be distinguished on the face of the balance sheet and in the notes to the financial statements (see Draft Standard paragraphs 131-135 and Basis for Conclusions paragraphs 5.1-5.5). Do you agree with the categories proposed? Are the categories clear and useful? If not, how would you amend them and why? Academy Response – We agree.
V.
Income Statement Presentation
Q24. No Comment. Q25. The Draft Standard would require an enterprise to separately disclose the income statement effects of certain changes in fair value (see Draft Standard paragraphs 137-152, Application Supplement paragraphs 382-390, and Basis for Conclusions paragraphs 6.30-6.84). (a) Do you agree with the proposed disaggregation? If not, why not? What other basis of disaggregation would you propose to provide information about the components of changes in fair value of financial instruments? (b) Do you believe that any other gains and losses arising on fair value measurement of financial assets and liabilities should be separately presented in the income statement or notes thereto? If so, which gains and losses, and why do you believe that they should be shown separately? On what basis should such gains and losses be distinguished? Academy Response –
12
(a) We believe that the proposed disaggregation in the JWG draft is ambiguous and unworkable in its current form. The calculations needed to perform the disaggregations required by these paragraphs are order dependent and therefore subjective. Given a simultaneous change in credit standing, riskfree rates and credit risk spreads, the value assigned to each of these items is a function of which calculation is done first. Depending on the order in which the calculations are performed, significantly different disclosures can result. This raises the question of which calculation order should be required, if not raising doubt as to the value of any detailed disaggregation disclosures. (Note: This problem occurs with all the potential disaggregations suggested by the financial risk definitions found in paragraph 14, and it is not confined to the three items of disaggregation discussed above.) As a result, we recommend that any requirement for disaggregating components of income be limited, with clear guidance on the order in which such calculations or allocations are to be performed. The more components for which disaggregation is required, the less meaningful the disclosures will be due to synergistic effects between components and the varied nature of these effects for various enterprises and financial instruments. To the extent that disaggregation is required (such as in the case outlined in b. below), we suggest that the definitions of the various risks subject to disaggregation should be changed as proposed in Appendix B. (b) If
“own credit risk” is reflected in liability value, changes in value associated with changes in the credit-worthiness of the issuer should be excluded from “operating” earnings and reported in a footnote instead (or as a separate line item in non-operating earnings). For purposes of this provision, changes in value associated with changes in credit-worthiness of the issuer would be defined as noted in the attached Appendix B. We believe that changes in value due to changes in credit-worthiness should be reported in a footnote (rather than going through operating earnings) because an explanation of the nature of such changes will help to prevent users of the financial statements from misinterpreting the meaning of such a change in value. For example, assume a company experiences a downgrade in its credit standing and this leads to a decline in the value of its liabilities. To the extent that this decline in value reflects the diminished capacity of the company to meet its obligations, we feel that it is appropriate to emphasize this point so that such changes in value will not be incorrectly perceived as a reduction in the value of the obligations themselves. Note: This provision is intended to apply only to liabilities issued by the reporting company. It is not intended to apply to assets held by the reporting company. Q26. The draft Standard would require that interest revenue and interest expense be determined on the fair value basis, using the current yield to maturity basis, except that an enterprise may use the current market expectations basis if the chief operating decision maker relies primarily on
13
that basis for assessing the performance of its significant interest-bearing financial instruments and it is consistent with the enterprise’s basis for managing interest rate risk (see Draft Standard paragraphs 139 and 140), Application Supplement paragraphs 382-390, and Basis for Conclusions paragraphs 6.46-6.77). (b) Do you agree with the proposed method of determination? If not, how would you propose that interest revenue and interest expense be determined in a fair value model? Academy Response We generally agree. However, the current market expectations basis for determining interest revenue and interest expense reflects the time value of money more appropriately. We therefore recommend that this method of valuation should be accepted as the superior method in all cases. We see a potential ambiguity in the wording of paragraph 139, possibly resulting in a perceived inconsistency between wording there versus wording in the Application Supplement paragraphs 386 and 387. Paragraph 139 uses the term “current” yield. In isolation, this might be interpreted as the yield at the reporting date. The Application Supplement uses the yield at the beginning of the reporting period instead of the reporting date. We agree with the general approach suggested by the Application Supplement as being more relevant and more practical than using the “current” yield at the reporting date. We also agree with the approach of performing this calculation separately for each reporting period, such that under quarterly reporting the annual investment income value would result from adding the four quarterly calculations, each with a potentially different beginning yield. We suggest that paragraph 139 be reworded so as to refer to the “current” yield at the beginning of each reporting period. In addition, we would recommend a change to the language in Paragraph 30. This paragraph currently defines interest revenue (expense) as "the return to the lender (cost to borrower) for the temporary use of money. Within the context of measuring financial instruments at fair value, it is the market return (cost) on the fair value of an enterprise's interest-bearing financial assets (liabilities) for a reporting period. It includes (a) basic interest; (b) credit risk premium; (c) liquidity risk premium; and (d) any premium to the lender for bearing risks of adverse variability of expected cash flows apart from credit risk and liquidity risk." We believe that use of the word “return” in this paragraph is confusing since it seems to imply that the definition is meant to include the part of market returns attributable to realized and unrealized gains on assets and liabilities. However, according to Paragraph 139 of the Draft Standard (pg. 55), the intent of this definition is to cover the yield on financial instruments only. The gains/losses that constitute the remainder of the returns on the financial instruments are covered separately under Paragraphs 141 and following. VI.
Hedges
14
Q27. The Draft Standard would not permit any special accounting for financial instruments entered into as part of risk management activities (see Draft Standard paragraph 153 and Basis for Conclusions paragraphs 7.1-7.22). Do you agree? If not, why not? How would you address the issues raised in paragraphs 7.1-7.22 of the Basis for Conclusions? Academy Response – We agree with the Draft Standard where the item hedged is also a financial instrument measured at fair value. However, not all financial instruments are included in the scope of the Draft Standard. If other financial instruments such as insurance contracts are not measured at fair value, then it may be appropriate to measure financial instruments used to hedge such contracts in a manner consistent with the item hedged (i.e., not at fair value). We believe the same issue exists when the item being hedged is not a financial instrument. It is important that accounting for hedges be consistent with the accounting for the activities hedged against. Paragraphs 7.6 and 7.8 in the Basis for Conclusions discuss the JWG’s preference to leave this issue to a future standard, when the accounting for the non-financial instrument being hedged is addressed. We disagree with this decision. This standard should address the accounting for financial instruments that are hedges of non-financial instruments to ensure that consistent accounting treatment of the hedging instrument and the item being hedged is achieved. VII.
Disclosure
Q28. The Draft Standard would require disclosure of an enterprise’s significant financial risks and of the enterprise’s financial risk management objectives and policies. Do you agree that this information is necessary to provide the context for understanding and evaluating information about the enterprise’s actual financial risks and performance of its financial instruments? If not, how would you change these disclosures? Academy Response The Academy agrees with the need for disclosures concerning the enterprise’s significant risks and risk management policies. However, we urge caution be applied when determining the extent of such disclosures. Public disclosure of a risk to an entity could become a self-fulfilling prophecy. Some of the information and practices could well be proprietary and represent competitive advantages to the company. Paragraph 397 of the Application Supplement refers to an example table that could be used in disclosure of interest rate and currency risks. The table classifies assets and liabilities by interest reset date and shows a “gap” equal to the difference between the amounts of assets and liabilities with similar reset dates. There are many types of liabilities that involve frequent reset of interest
15
rates for which the “gap” analysis in that table would be very misleading. In general, we believe that the use of a “gap” table such as the one described in this section should not be part of the required disclosures. Q29. No Comment. Q30. No Comment. Q31: Do you agree with the other disclosures proposed in Draft Standard paragraphs 164-178 and 183-189…… If not, how should the disclosures be amended….. Academy Response We have some concerns with the disclosures proposed in paragraph 183. 183(a) requires that when a valuation technique is used in place of a market price, one should disclose the technique, including methodology and significant assumptions. For insurance enterprises, virtually all liabilities will be valued in this way, and a wide variety of techniques will be used. Also, many of the assumptions will be based on expected claims experience. This information may be proprietary. We believe the disclosure of valuation techniques and assumptions should be in summary format and should exclude proprietary information. 183(d) requires the identification of the factors taken into account in determining the effect of the enterprise’s own credit risk in the fair value of its financial liabilities. This assumes, of course, that own credit risk is to be reflected. There is no consensus that own credit risk should be reflected in estimating the fair value of one’s own financial liabilities. 183(e) requires the disclosure of a range of reasonably possible estimates for any amount that depends significantly on assumptions. (If insurance liabilities were ever included in the scope of this document, this required disclosure would apply to virtually all insurance liabilities.) While such disclosure is well intended, it may provide a misleading view of the riskiness of long-term assets and liabilities, for several reasons. First, valuation of long-term financial instruments is very sensitive to the level of assumed interest rates. If one discloses the range of values that could result from changes in interest rates, one might see a very wide range for both assets and liabilities. However a good risk management program might result in a very narrow range for the net difference in value between the assets and liabilities. Second, the proposed disclosure would apply to only financial instruments within the scope of this Draft Standard, and subject to fair value accounting. In many cases financial assets and/or liabilities are managed in relation to non-financial assets and/or liabilities, or in relation to financial instruments not covered by a fair value standard (e.g., possibly insurance liabilities). In such case, the required
16
disclosure would address potential variability in only one portion of a related set of holdings. Sensitivity to key assumptions may be material for the financial instruments covered by this standard, but such sensitivity may be completely mitigated by the sensitivity of items excluded from the standard. We advise against piecemeal disclosures of items potentially covered by an enterprise-wide risk management process. Third, a requirement to disclose “the most likely range of reasonably possible estimates” sets an impossible standard. The estimation problem with this requirement is determining the endpoints of the range. In many cases, the range of possible values is somewhat continuous, with gradually declining probabilities the farther the amount is from the mean, median or mode. In such a case, the term “most likely” requires an arbitrary decision – an arbitrary cut-off in the probability distribution. The amount of work required to produce a definitive quantitative range can be significantly greater, if not problematic, versus that involved in producing a qualitative range. Therefore, while producing “a” range of reasonably possible estimates is generally realistic, producing “the” range of “most likely” estimates results in a standard that is unrealistic if not impossible to meet in many cases. VIII.
Effective Date and Transition
Q32. The JWG proposes that about two years is a suitable period of time between issuance of a final standard and the effective date to balance preparation time with the need for standards (see Basis for Conclusions 9.1-9.4). Do you agree? Do you believe that certain enterprises need additional time to prepare for implementation? If so, please specify which enterprises and how they should be differentiated from those that apply a final standard initially. Also, please specify why these enterprises may need more time and the length of time that may be required. Academy Response – We disagree that two years is a suitable period to implement this standard. Although beyond the scope of this Draft Standard, we believe that accounting for insurance contracts should be considered for implementation simultaneously to minimize avoidable inconsistencies in financial statement presentations. However, such a major change will require more than two years of lead time. Implementation of even the proposals in this Draft Standard will be difficult and time consuming in many cases. We recommend that the time allowed for implementation be based on the experience of similar past efforts, such as for FAS 133 in the U.S. A two-year timeframe before the effective date is very tight, in light of the inevitable large number of Q&As and required interpretations that will result from this process. The time needed will also depend on the final form of the new Standard. We note that implementation of a new Standard for prior accounting periods generally requires more effort and resources; thus, if a restatement is required, additional time should be allowed. If the time period for adoption is extended, early adoption could be permitted.
17
Q33. Some suggest that a comprehensive fair value model for financial instruments should be first introduced in supplemental financial statement as, presented in parallel with financial statements prepared in accordance with existing practice. Only after a period of time would such financial statements replace financial statements prepared in accordance with existing practices (see Basis for Conclusions paragraphs 9.5-9.7). Do you believe that supplemental financial statements should be introduced before replacing financial statements prepared in accordance with existing practices? If so, how would you overcome the disadvantages of such an approach, which are identified in Basis for Conclusions paragraph 9.6? Academy Response – We believe that completion of a second full set of financial statements as supplementary information during a transition period would place an unacceptable burden on preparers. However, we believe that it is possible to design a less burdensome presentation of fair value results that would provide valuable insight into the worth of fair value financial statements as well as time to address the substantial implementation issues we foresee. Q34. No Comment. Q35. What steps need to be taken to assist in implementing a comprehensive fair value model for financial instruments? Please comment on any significant legal or other obstacles to implementing a final standard based on this Draft Standard and how they might be best addressed. Academy Response – We believe that with adoption of a standard for a comprehensive introduction of fair values for financial instruments, it would be important to the financial services sector to adopt, at the same time, new standards for financial instrument liabilities, including those that were excluded from this standard. Otherwise, misleading financial reports may result in that sector. To the extent financial statements based on this standard will be used by regulators to measure the solvency of financial institutions, transition time and preliminary results must be provided to regulators to recalibrate solvency measures based on other accounting standards. This need may be best met by an initial presentation of summarized financial results on the new basis. Q36. No Comment.
18
APPENDIX A AMERICAN ACADEMY OF ACTUARIES
May 29, 2001
Peter Clark Senior Research Manager IASB 166 Fleet Street London EC4A 2DY United Kingdom Dear Peter, The American Academy of Actuaries (Academy) Task Force on Fair Value is currently preparing its comment letter with respect to the report on Financial Instruments prepared by the Joint Working Group of National Standard Setters. We understand that these comments are being received at the same time as the Insurance Steering Committee is winding up its work and is preparing a Draft Statement of Principles (DSOP) for review by the new International Accounting Standards Board (IASB). It is possible that the submitted DSOP will address these issues, but we thought it might be helpful to that process for the Steering Committee to understand a concern raised by the Academy Task Force in distinguishing certain products and assets between the Joint Working Group documents and the documents issued by the Insurance Steering Committee. We are writing to you to describe an area of potential concern when the IASB addresses accounting for insurance products. We will express the same potential concern in our commentary on the Joint Working Group report even though insurance is explicitly excluded from its current deliberations. Our potential concern has to do with potential hybrid instruments as expressed below. We are not clear as to whether this example is a hybrid instrument or not, but it raises a problem regardless. Potential Hybrid Instrument question We understand that insurance is currently excluded from the JWG draft (except for embedded options). Nevertheless, we have been trying to understand whether certain common forms of insurance (in the United States) would meet the definition of financial instruments, if they were not excluded from the scope. These forms of insurance promise a service or services, rather than a financial amount.
Consider the following.
An insurance company (A) issues a medical insurance policy (B) to a policyholder (C). B commits A to secure necessary medical services for C, provided C pays the premiums
19
specified in B. Under B C must make a co- payment if he uses medical services. This co-payment is lower if C uses a chain of medical centers (D) with whom A has a contract. When a person other than a policyholder of A uses D that person is charged for service by D according to a specified tariff. A’s contract with D specifies that A will reimburse D for services provided to policyholders of A at 70% of the retail tariff in recognition of A’s excellent payment history, and A’s attempting to steer its policyholders to D. Is this example intended to be a financial instrument? If so how is it to be valued? The commitment under B is obviously for service, not money. Further the value of that service has, in effect, a retail and a wholesale price. Please contact Meredith Watts with the Academy when you are ready to discuss this hybrid question further at 202-223-8196 or watts@actuary.org. Sincerely,
Burton Jay
20
APPENDIX B Application of Approach described in Question 25 For purposes of excluding changes in value due to changes in credit-worthiness from operating income (as described in our response to question 25), changes in credit worthiness of the issuer would include all changes in value after issue from “credit risk”, but not changes in value from “spread risk” (as defined below). We recommend adding the following definition of Spread Risk to the “Definitions of Financial Risks” section: Spread Risk is the risk of changes in the fair value of cash flows of an asset or liability due to changes in market interest rates other than changes in the basic interest rate. For example, this might result from a widening of credit spreads on securities of a given credit worthiness due to changing market conditions. The definition of Credit Risk should also be modified to clarify that this definition includes the risk of changes in the fair value of an asset or liability due to changes in creditworthiness or credit status of the security’s issuer after issue (other than those associated with Spread Risk). We also recommend changing the definition of Liquidity Risk to read as follows: Liquidity Risk is the risk of loss from sale of a financial instrument below fair market value that results from a need to raise cash in a shorter period of time than the period required to sell the financial instrument at its fair market value.
The following definition of Discontinuity Risk should also be added to the “Definitions of Financial Risks” section: Discontinuity Risk is the risk of loss arising from the inability to trade a financial instrument or modify a financial position due to the absence of any market for the instrument or position at a given point in time, such as during periods of trading suspension or when the markets are closed. The list of financial risks in the first sentence of paragraph 16 on page 22 should then be changed to include “spread risk” and “discontinuity risk”. The following changes should also be made to the Draft Standard in order to be consistent with the proposed treatment of credit risk outlined above: Change paragraph 137(d) to read “net gain or loss resulting from changes in the credit risk premiums of interest-bearing financial liabilities where the net gain or loss from a change in creditworthiness (or credit risk) is shown
21
separately from the net gain or loss from a change in credit spreads on securities of a given credit quality (e.g. spread risk).” Language should be added to the end of paragraph 138 that states “The cumulative gain or loss from changes in credit risk premiums should be split into “cumulative gains or losses from changes in creditworthiness (or credit risk)” and “cumulative gains and losses from changes in credit spreads on securities of a given credit quality (or spread risk)”. Paragraph 144(b) should be changed to read “changes in credit risk premiums of financial assets, distinguishing effects of changes in credit interest rate spreads for a given credit quality (spread risk) from the effects of changes in credit worthiness (credit risk); and”
22
Published on Dec 21, 2012 | https://issuu.com/actuarypdf/docs/jwgcomment_092101_28da6004abce70 | CC-MAIN-2018-09 | en | refinedweb |
So I've had it in the back of my mind to give GLFW another look at some point for possible inclusion into Derelict 2. Today, I did. A new version was released late last year (2.7) and a new branch that streamlines the API (3.0) has been started. I really like the new branch. So, being the spontaneous sort of fellow I am, I decided I wanted a binding to it. I knocked one up in just over 30 minutes. It's now sitting in my local "scratch" copy of Derelict, waiting to be compiled and tested. Given that it's 1:30 am as I type this, I don't think I'm going to get to it just yet. Tomorrow for sure.
I won't be adding this new binding to the Derelict repository just yet. GLFW 3.0 is still in development. So, just as with the binding I've begun for SDL 1.3 (which will become SDL 2 on release), I'll wait until the C library is nearing a stable release before I check it in.
Making D bindings to C libraries is not a difficult thing to do. It's just tedious if you do it manually, like I do. I have a system I've grown used to now that I've done so many of them. It goes reasonably quick for me. Some people have experimented with automating the process, with mixed results. There are always gotchas that need to be manually massaged, and they might not be easily caught if the whole process is automated. One example is bitfields.
D doesn't support bitfields at the language level. There is a library solution, a template mixin, that Andrei Alexandrescu implemented in the std.bitmanip module. I don't know how compatible it is with C. I've only had to deal with the issue once, when binding to SDL 1.2, but that was before the std.bitmanip implementation. Besides, it's a D2 only solution and Derelict has to be compatible with both D1 and D2. So what I did was to declare a single integer value of the appropriate size as a place holder. The bits can be pulled out manually if you know the order they are in on the C side. I could have gone further by adding properties to pull out the appropriate bits, but I never did the research into how different C compilers order the bitfields on different platforms.
Another issue that crops up is dealing with C strings. For the most part, it's not a problem, but if you are new to D it's a big gotcha. Like C strings, D strings are arrays of chars (or wchars or dchars as the case may be). But, char strings in D are 8-bit unicode by default. Furthermore, D arrays are more than just a block of memory filled with array values. Each array is conceptually a struct with length and ptr fields. Finally, and this is the big one, D strings are not zero terminated unless they are literals. Zero-terminated string literals are a convenience for passing strings directly to C functions. Given a C function prototype that takes a char*, you can do this:
someCFunc("This D string literal will be zero-terminated and the compiler will do the right thing and pass the .ptr property");
If you aren't dealing with string literals, you need to zero-terminate the string yourself. But there's a library function that can do that for you:
import std.string;
// the normal way
someCFunc(toStringz(someString));
// or using the Universal Function Call Syntax, which currently only works with D arrays
someCFunc(someString.toStringz());
A lot of D users like the Universal Function Call Syntax and would like to see it work with more types instead of just arrays. Personally, I'm ambivalent. The way it works is that any free function that takes an array as the first argument can be called as if it were a member function of the array.
Going from the C side to the D side, you would use the 'to' template in std.conv:
// with the auto keyword, I don't need to declare a char* variable. The compiler will figure out the type for me.
auto cstr = someCFuncThatReturnsACharPtr();
// convert to a D string
auto dstr = to!(string)(cstr);
// templates with one type parameter can be called with no parentheses. So for to, this form is more common.
auto dstr = to!string(cstr);
Another gotcha for new users is what to do with C longs. The D equivalent of nearly all the C integral and floating point types can be used without problem. The exceptions are long and unsigned long. D's long and ulong types are always 64-bit, regardless of platform. When I initially implemented Derelict, I didn't account for this. D2 provides the aliases c_long and c_ulong in core.stdc.config to help get around this issue. They will be the right size on each platform. So if you see 'long' in a C header, the D side needs to declare 'c_long'. I still need to go through a few more Derelict packages to make sure they are used.
The issues that crop up when actually implementing the binding aren't so frequent and are easily dealt with. Sometimes, though, you run into problems when compiling or running applications that bind to C.
D applications can link directly to C libraries without problems, as long as the object format is supported by the compiler. On Linux, this is never an issue. Both DMD and GDC can link with elf objects. Problems arise on Windows, however. The linker DMD uses, OPTLINK, is ancient. It only supports OMF object files, while many libraries are compiled as COFF objects. If you have the source code and you can get it to compile with Digital Mars C++, then you're good to go. Otherwise, you have to use the DigitalMars tool coff2omf, which comes as part of the Digital Mars Extended Utilities Package. Cheap, but not free. Then you still might face the problem that the COFF format output by recent versions of Visual Studio causes the tool to choke. There are other options, but it's all nonsense to me. That's one of the reasons when I made Derelict I decided that it would only bind to libraries that come in shared form and they will be loaded manually. Problem solved. But there are other issues.
In a past update to DMD (not sure which), the flag '--export-dynamic' was added to the DMD config file (sc.ini) on Linux. So that means that every binary you build on Linux systems with DMD has that flag passed automatically to gcc, the backend DMD uses on Linux. Normally, not an issue. Until you try to build a Derelict app. The problem is that Derelict's function pointers are all named the same as the functions in the shared library being bound to. This causes conflicts when the app is built with --export-dynamic on Linux, but they don't manifest until run time in the form of a segfault. Removing the flag from sc.ini solves the problem. One of these days I need to ask on the D newsgroup what the deal with that is.
I know all of this could sound highly negative, giving the impression it's not worth the hassle. But, seriously, that's not the case. I have been maintaining Derelict for seven years now. Many bindings have come and gone. Version 2 currently supports both D1 and D2, as well as the Phobos standard library and the community-driven alternative, Tango. I can say with confidence that D works very well with C the large majority of the time. And for anyone planning to use D to make games, you will need to use C bindings at some level (Derelict is a good place to start!). As for binding with C++... well, that's another story that someone else will have to tell.
- Read more...
- 6 comments
- 2302 views | https://www.gamedev.net/blogs/blog/1140-d-bits/?page=1&sortby=entry_num_comments&sortdirection=desc | CC-MAIN-2018-09 | en | refinedweb |
Open Source Shopping Cart
open source shopping cart. You can download and
modify the source code... can modify source code of shopping cart as
per your needs.
The open...Open Source Shopping Cart
Open Source Shopping carts software
Shopping Cart design
in development of shopping cart
using open source technologies such as Java, .NET... for your site and use open
source shopping cart of your choice to create online... source shopping cart:
PRESTA shop
OPEN Cart
Magento using sstruts - Struts
shopping cart using sstruts Hi,
This is question i asked ,u send one link.but i cant able to ddownload the file .please send the code file.
--------------
I need the example programs for shopping cart using struts
Shopping Cart,Shopping Cart software
Shopping Cart
Overview
A web based shopping cart is something like the original grocery shop shopping
cart that is used by the customer in selecting certain
Open Source Software
. Open source software
is very useful because source code also distributed... is also know as OSS. Simply open source means the
availability of the Source code...Open Source Software
In this section we are discussing Open source software
Java is an opensource program or not? why???
Java is an opensource program or not? why??? Java is an open source program or not.. why
Shopping cart
Shopping cart
Overview
A web based shopping cart is something like the original grocery shop shopping
cart that is used by the customer... information at the checkout counter.
Software
Shopping cart is used around the world
Open Source e-commerce
of e-commerce; a free, user-friendly, open source shopping cart system... an open source shopping cart as the engine behind your site gives you a thoroughly... code and J2EE best practices.
Open Source E
Shopping cart Application
Shopping Cart Application
... forum
Download and build from source
a) Preliminaries
i) Tools required to build Simple Cart
Shopping Cart Features
Ideal Requirements Of Shopping Cart
Most of the people think to use a shopping.... Using an shopping cart for your
e-commerce site (Online Store) is just... store and make sure of that. Focus on the
basic feature of the shopping cart
Open Source PHP
with phc.
PHP shopping cart with open source code
Most... by hindering competition and plagiarism. X-Cart is a software with open source code. We... with open source code is a good way to get the right features quickly.
hi i want the sample project for shopping cart in struts with mysql ,if any one knows means please help me
Online Shopping Cart Solutions
for a magnanimous image projection, then you need shopping cart software which... ahead of everybody in competition you need to focus on your shopping cart...
Professional Shopping Cart Developers Can Bring Yield Great Profits
source code
source code sir...i need an online shopping web application on struts and jdbc....could u pls send me the source code
E-commerce shopping cart hosting
E-commerce shopping cart web hosting
In this article we will explain you how to find best hosting company for
hosting E-Commerce shopping cart. The good ecommerce shopping cart web hosting
company is very import in success of online
Open Source E-mail
code for complete control.
POPFile: Open Source E-Mail..., Darwin Streaming Server is an open source project intended for developers who need...Open Source E-mail Server
MailWasher Server Open Source
open source help desk
Open Source Help Desk
Open Source Help Desk Software
As my help desk... of the major open source help desk software offerings. I?m not doing...?s out there.
The OneOrZero Open Source Task Management
Open Source Content Management
code for open-source CMSes is freely available so it is possible to customize...Open Source Content Management
Introduction to Open Source Content Management Systems
In this article we'll focus on how Open Source and CMS combine
online shopping project
online shopping project can you plz send the source code of online shopping application developed with the help of struts 1.2, hibernate and sql , jsp
Please visit the following link:
Struts Shopping Cart
Open Source Exchange
;
DDN Open Source Code Exchange
The DDN site... and there was clearly a need to facilitate this if the Open Source movement was going...Open Source Exchange
Exchange targeted
Open Source GPS
Open Source GPS
Open
Source GPSToolKit
The goal of the GPSTk project is to provide a world class, open source computing suite to the satellite....
Open Source GPS Software
Working with GPS
Shopping Cart Products
Know To Sell The Right Products On E-Commerce Shopping Cart
E-commerce... differently can you present them with your e-commerce shopping cart? What kind of offers... as this is the fastest way of shopping and shipping products to customers. Many online
Open Source Jobs
, and then we will focus on Quartz, an open source library for those who need some extra... need Quartz: the first full-featured, open source job scheduling framework... its original design free of charge. Open source code is typically created
Open Source E-mail Server
code for complete control.
POPFile: Open Source E-Mail... is an open source project intended for developers who need to stream QuickTime and MPEG-4...Open Source E-mail Server
MailWasher Server Open Source
online shopping project report with source code in java
online shopping project report with source code in java Dear Sir/Mam,
i want to a project in java with source code and report project name online shopping.
thank you
E-commerce: Shopping cart
E-commerce: Shopping cart
...;
E-Commerce
? role of a Shopping Cart
Life has become so easy, no need to rush to the markets. Now shopping is just a click away. Well you got
Online Shopping Cart Services
Knowing About Online Shopping Cart Services
The whole world has become... reasons, now people depend on e-commerce shopping cart. One of them is the security these websites provide. These shopping cart solutions offer the users to do
source code - JSP-Servlet
source code I want source code for Online shopping Cart.
Application Overview
The objective of the Shopping Cart is to provide an abstract view... functional application.
System Scope
Shopping Cart is a web application intended Project Management
Open Source Project Management
Open Source Project Management... to access our support forums.
An Open-Source Based... provide these features thanks to the open-source nature of ]project-open
Open Source Version Control
), a popular open-source application within which many developers store code...-only CVS access.
Open
Source code version control...Open Source Version Control
CVS:
Open source version control
CVS
Open Source Books
Open Source Books
Open Books
O'Reilly has published a number... books.
Open Source Revolution
Linux creator Linus... for the Open Source community in the story of Pauling's foundational work that made
Open Source Community
, open source or not; neither open source nor proprietary code should be considered...Open Source Community
Open
Source Research Community
In the spirit of free and open source software (F/OSS), we are attempting to establish
Web hosting with shopping cart
Web hosting with shopping cart
If you are looking for hosting your shopping... web hosting company you should
use for hosting your shopping cart applications. Which hosting with shopping
cart support should be used and what
Open Source web mail
Open Source web mail
Open
Web Mail Project
Open WebMail... Outlook to Open
WebMail.Open WebMail project is an open source effort made... WebMail project is working to accomplish.
Open
Open Source Business Model
with publication of their source code on the Internet, as the Open CASCADE...Open Source Business Model
What is the open source business
model
It is often confusing to people to learn that an open source company may give its
Features of shopping cart
Features of shopping cart
In this section we will learn the features of good shopping cart
applications. There are shopping cart application on the Internet... on requirement and
you can select best shopping cart application for your shopping,
Open-source
Open Source Movement
reviews the development and need for Free and Open Source movements in software...Open Source Movement
Open source movement Wikipedia
The open source movement is an offshoot of the free software movement that advocates
Need source code - Swing AWT
Need source code Hai,
I need a idea and code for developing the project "Face Recognition" with the backend as My-sql....
Thanks & Regards Outlook
, vertically locked down world; we need an open source solution for extracting... of the code base and hosting the additions on the same open source basis.
...
Open Source Outlook
Open Source Outlook Sync Tool
Calendaring
Need Java Source Code - JDBC
Need Java Source Code I have a textfield for EmployeeId in which the Id, for eg: "E001" has to be generated automatically when ever i click... be implemented. Hi friend,
Please send me code because your posted
Open Source Accounting Software
and need a proper evaluation when making computer decisions. While open source...Open Source Accounting Software
Open
Source Accounting Software
TurboCASH .7 is an open source accounting package that is free for everyone CMS
proprietary products, the source code for open-source CMSes is freely available...Open Source CMS
Open Source Content... and developers of Open Source Content Management solutions. OSCOM organizes
Need source code - Swing AWT
Need source code Hai friends,
How can I, view all the datas from the mysql database table in the jframe........ Hi Friend,
Try the following code:
import java.awt.*;
import java.sql.*;
import
Need source code - Swing AWT
Need source code Hai, In java swing, How can upload and retrieve the images from the mysql database? Hi Friend,
To upload and insert image in database, try the following code:
import java.sql.*;
import
Open Source Reports
Open Source Reports
ReportLab Open Source
ReportLab, since its early beginnings, has been a strong supporter of open-source. In the past we have found the feedback and input from our open-source community an invaluable aid
Error in Shopping Cart project - Development process
Error in Shopping Cart project I tried running the shopping cart project given in the below link:... when I submit "" I received the following error
Microsoft Open source
is inferior.
Open Source Code Finds Way into Microsoft... code and other data, hardcore open source advocates will no doubt argue... source code and other data, hardcore open source advocates will no doubt argue
SHOPPING COUNTER
SHOPPING COUNTER i need to do the system about the item from the small shop.
how can i calculate the item with price. if user choose more quantity... the java.
thanks for helps.
Hi Friend,
Try the following code
Open Source Groupware
solutions
Simple open source groupware
Need groupware...
Open Source Groupware
Open
Groupware
Open Group... Software
This list is focused on open source software projects relating
Shopping Cart Application installation manual missing
Shopping Cart Application installation manual missing Hi,
I downloaded this Shopping cart zip folder from but there's no installation manual inside
Open Source Blog
Open Source Blog
About Roller
Roller is the open source blog server...;
The Open Source Law Blog
This blog is designed to let you know about developments in the law and business of open source software. It also provides
Open Source Software
Open Source Software
Open Source Software
Open source doesn't just mean access to the source code. The program must include source code, and must allow distribution in source code
source code
source code hellow!i am developing a web portal in which i need to set dialy,weekly,monthly reminers so please give me source code in jsp XML Editor
benefits: it?s Open Source, so you can see the code. As a set of Cocoa classes it?s...Open Source XML Editor
Open
source Extensible XML Editor...
* multi-platform (Java 1.3+)
* free open-source software
Open Source Code
Open Source Code
What is SOAP
SOAP is a protocol for exchanging....
Open source code in Linux
If the Chinese have IT, get...-writing it.
Open-source code quality
The open
MySql Open Source
.
Under the Open Source License, you must release the complete source code for the application that is built on MySQL. You do not need to release the source code...MySql Open Source
MySQL Open Source License
MySQL is free use for those
Open Source VoIP
Open Source VoIP/TelePhony
Open source VoIP/Telephony
One of the first open source VoIP projects -and one of the earliest VoIP PBXes... for the platform, both commercial and open POS
Open Source POS
Open-source POS system
This past weekend People's... out items on the world's first entirely free, open-source point-of-sale system... copying the source code and also prevents anyone from getting inside to mine data
Open Source SQL
Open Source SQL
Open Source SQL Clients in Java
SQuirreL SQL Client.... The minimum version of Java supported is 1.3.
iSQL-Viewer is an open-source JDBC 2.x... out common database tasks.
Open Source: Data from MS SQL
Open Source content Management System
Open Source content Management System
The Open Source Content Management System
OpenCms is a professional level Open Source Website Content... existing modern IT infrastructure. OpenCms runs in a "full open source" environment
in need od source code - Development process
in need od source code i am in the process of developing..., module, activity, and no of hours worked from week start to weekend... i need a source code for creating the front end, and for database, and linking from front end
Advertisements
If you enjoyed this post then why not add us on Google+? Add us to your Circles | http://www.roseindia.net/tutorialhelp/comment/95610 | CC-MAIN-2015-40 | en | refinedweb |
I've been using Sublime Text for a few days now, and figured I would mess around with the plugin system. I decided to write a plugin that would wrap the selected strings in a html tag. However, I came across a little issue when using the code below:
- Code: Select all
view.insert(region.begin(),openTag)
view.insert(region.end(),closeTag)
The code would consistently place the closing tag 3 characters before the end of the selected region, meaning if I selected "cheese" and run the plugin, the code would generate "<p>che</p>ese" instead of the desired "<p>cheese</p>".
Now I managed to fix this by just adding three to the region.end(), but this isn't the ideal solution. Does anybody know what is causing this, or is it just a quirk of Sublime Text?
I've put the full code listing below.
- Code: Select all
class TagWrapCommand(sublimeplugin.TextCommand):
def run(self, view, args):
openTag = "<p>"
closeTag = "</p>"
for region in view.sel():
view.insert(region.begin(),openTag)
view.insert(region.end(),closeTag) | http://www.sublimetext.com/forum/viewtopic.php?f=6&t=1441&p=6517 | CC-MAIN-2015-40 | en | refinedweb |
Adrian,
Back in Jan. I was into this very same problem. Scott Boag pointed me
to a paper on Incremental XSLT which may be a help to you.
Now I don't know the answer to your problem but I wanted to point out
what may be another problem. If you change the DOM in the background,
the DTM will NOT update so the representation of you document to any
of the XPath expressions may not make sense.
There is a method call called getDOMBackPointer which will give you
a the real Element from the source document which also may be a help.
You may also want top make your Extension Function into an Extension Element
since the XSLProcessorContext will give you more access than the
ExpressionContext.
Hope that helps.
John G
Adrian Sutton wrote:
> Hi all,
> (Sorry for the previous email, Outlook decided to send when I tried to
> paste. Go figure)
>
> I'm looking for a way to get the complete context node list and am
> generally not getting far. I need the full context node list instead of
> just the actual context node because I need to rerun XPath expressions
> dynamically as the user changes the DOM, but can't run the entire XSLT
> again because of performance issues. I can get the XPath expression,
> find the context node itself, find all the namespaces in effect, and
> identify all the nodes which are used in the expression, I just can't
> get the full context node list. Without the full context node list,
> functions like position() don't work correctly.
>
> For the record, my current test expression is:
> my:quantityOrdered * my:unitPrice
>
> but the aim is to support any valid XPath expression.
>
> My first approach was to look for an XPath function or XSLT element I
> could use to get the full context node list but I haven't found
> anything.
>
> My second approach was to use a custom function and I've had some
> success with that. My currrent function is:
>
> public String getContext(ExpressionContext context) {
> StringBuffer buf = new StringBuffer();
> try {
> DTMIterator iter =
> context.getXPathContext().getContextNodes();
>
> int handle = iter.getCurrentNode();
> if (handle != DTM.NULL) {
> Node n =
> iter.getDTM(handle).getNode(handle);
> while (n != null) {
>
> buf.append(XMLFilter.getIDFor(n));
> n = getNextNode(iter);
> if (n != null) {
> buf.append(",");
> }
> }
> }
> } catch (Exception e) {
> log.error("Failed to create context for xpath
> expression.", e);
> }
> return buf.toString();
> }
>
> XMLFilter.getIDFor(n) gives a String that can be used to retrieve the
> node from the DOM later on (though various magic incantations we've
> discovered). For the first node in the context list this works
> perfectly, unfortunately it appears that the DTMIterator I'm using is
> the same one that Xalan is using and so the method causes Xalan to skip
> over all but the first element (because getContext() has already
> iterated through the nodes). When I try to reset the position of the
> iterator I get the exception:
>
> This NodeSetDTM can not iterate to a previous
> node!>java.lang.RuntimeException: This NodeSetDTM can not iterate to a
> previous node!
> at
> com.ephox.org.apache.xpath.axes.LocPathIterator.previousNode(LocPathIter
> ator.java:627)
> at
> com.ephox.org.apache.xpath.axes.NodeSequence.previousNode(NodeSequence.j
> ava:364)
> at
> com.ephox.org.apache.xpath.axes.NodeSequence.runTo(NodeSequence.java:485
> )
> at
> com.ephox.org.apache.xpath.axes.NodeSequence.setCurrentPos(NodeSequence.
> java:499)
> at
> com.ephox.editlive.java2.editor.xml.xpath.XPathExtensions.getContext(XPa
> thExtensions.java:51)
>
> I notice that there is a DTMIterator.setShouldCacheNodes(boolean) method
> which enables random access to the iterator but calling it seems to
> reset the iterator such that it no longer contains any nodes. Is there
> any property to set to make all iterators random access enabled? I've
> tried setting:
>
>
> TransformerFactoryImpl.FEATURE_OPTIMIZE
> and
>
>
> to false with no success.
>
> Alternately, is there some other approach I'm missing?
>
> Regards,
>
> Adrian Sutton.
--
--------------------------------------
John Gentilin
Eye Catching Solutions Inc.
18314 Carlwyn Drive
Castro Valley CA 94546
Contact Info
gentijo@eyecatching.com
Ca Office 1-510-881-4821
NJ Office 1-732-422-4917 | http://mail-archives.apache.org/mod_mbox/xml-xalan-j-users/200405.mbox/%3C40B78A6E.6040307@eyecatching.com%3E | CC-MAIN-2015-40 | en | refinedweb |
Post your Comment
J2ME Thread Processing Example
J2ME Thread Processing Example
In the given example, you will learn about the thread and how thread works in
J2ME application. An application can run multiple activities
Parallel Processing
one lock. For example, a thread can enter a
synchronized method, thus... language. A thread is a sequential
path of code execution within a program. And each thread has its own local
variables, program counter and lifetime. In single
Thread
.
Java Thread Example
class ThreadExample{
static int...Thread Write a Java program to create three theads. Each thread should produce the sum of 1 to 10, 11 to 20 and 21to 30 respectively. Main thread
JSP Thread Safe
client request for processing. It is
used to implement Single Thread Model interface.
Understand with Example
In this section, you will learn how to use the thread...
JSP Thread Safe
Thread
Thread why we need threads? why we need Multithreads? with code and real time example
Thread
example we have used -
throw new MyException ("can't be divided by zero
JavaScript array processing
.
In this example of processing JavaScript array we have
three array objects emp1, emp2...
JavaScript array processing
By processing array we simply mean that processing
Main Thread and Child Thread
and Child Threads used in Programming.
Main thread is automatically created when program runs.
Child Thread gets created by the main thread .
Java Main Thread Example
public class mainchild implements Runnable {
Thread t1
JDBC Batch Processing Example
JDBC Batch Processing Example:
Batch processing mechanism provides a way... with a call to the database. By using
batch processing you can reduce the extra communication overhead and improve
application performance.
In this example
Java Thread setName() Example
Java Thread setName() Example
In this section we are going to describe setName() method with example in java thread.
Thread setName() :
Suppose... of the thread.
Example :
public class ThreadSetName implements Runnable
Java :Thread getPriority Example
Java :Thread getPriority Example
In this tutorial you will learn how to get thread priority in java thread.
Thread getPriority() :
Thread scheduler uses... the priority of your thread.
Example :
class ThreadGetPriority implements Runnable
Java :Thread setPriority Example
Java :Thread setPriority Example
In this tutorial you will learn how to set thread priority in java thread.
Thread setPriority() :
Thread scheduler uses... and SecurityException
Example : In this example we are setting thread priority 10
Parallel Processing & Multitasking
Parallel Processing & Multitasking
...) to run concurrently on the program. For
Example running the spreadsheet program... lightweight processes in a single process/ task or program. For
Example, When you
Java Thread getId Example
Java Thread getId Example
In this tutorial we are going to describe about Thread getId () with example.
Thread getId() :
This method returns thread ID... lifetime. You can use that id only after
thread is terminated.
Example
Create Thread by Extending Thread
of new thread call
start() method.
Example : In this example we are extending...Create Thread by Extending Thread
This section explain how to create thread by extending Thread class in java.
Extending Thread :
You can create thread
Java Thread : getState() Example
Java Thread : getState() Example
This section explains how to get state of a thread in java Thread.
Thread getState() :
Suppose you want to know the state of the thread so for that Java Thread
provides Thread.getState
Thread Life Cycle Example in java
Thread Life Cycle Example in java
In this section we will read about the life cycle example of Thread in Java.
Life cycle of Thread explains you the various... an instance of your
class.
Example :
Thread thread = new Thread();
Newly
Java Thread
Java Thread Tutorials
In this tutorial we will learn java Threads in detail. The Java Thread class helps the programmer to develop the threaded application in Java. Thread is simple path of execution of a program. The Java Virtual Machine
Processing XML with Java
;
}
Processing XML with Java
XML is cross-platform software, hardware... as tag. For example, "book"
is one tag in our sample document.
2.... For example, "book" is an element containing three child elements
<
How to Differenciate Main Thread and Child Thread in Java
Main Thread and Java Child Thread. Please Suggest any example or online link for references.
Thanks,
Hi,
There are two types of Thread used...How to Differenciate Main Thread and Child Thread in Java hi
Java Thread getStackTrace Example
Java Thread getStackTrace Example
This section explains use of getStackTrace() method in java Thread.
Thread getStackTrace() :
It returns an array... as the stack dump of the given thread. This method provides
the array of stack trace
Java Sleep Thread
Java Thread sleep() is a static method.
It sleeps the thread for the given time in milliseconds.
It is used to delay the thread.
It is used in Applet or GUI programming for animation
Java Sleep Thread Example
public class
Java : Runnable Thread
Java : Runnable Thread
In this tutorial we are describing Runnable Thread with example.
Runnable Thread :
Runnable thread is an easy way to create...
is declared in thread.
Example : In this example we are
creating thread
Java Thread : setDaemon() method
Java Thread : setDaemon() method
In this section we are going to describe setDaemon() method with example in java thread.
Daemon Thread :
In Java... the thread a daemon thread.
Example : In this example we
Java Thread
that a thread hold.
Example :
public class SimpleThread extends Thread...Java Thread
In this tutorial we will discuss about Java Thread.
Java Thread :
A thread is light weight java program.JVM permits you to have multiple
Java Thread : toString() method
Java Thread : toString() method
In this section we are going to describe toString() method with example in java thread.
toString() method :
If you want... and thread group.
Example :In this example we are using toString()
method
Daemon thread - Java Beginners
Daemon thread Hi,
What is a daemon thread?
Please provide me example code if possible.
Thanks
Hello,
Daemon thred are those thread which run in background. like garbadge collection thread.
Thanks
Java Thread : isDaemon() method
Java Thread : isDaemon() method
In this section we are going to describe isDaemon() method with example in java thread.
Daemon Thread :
In Java... whether given thread is daemon thread or not.
Example : In this example we
Java Thread Interrupted
Java Thread Interrupted
In this tutorial, you will learn how to interrupt a thread with example in
Java.
Thread Interrupt :
Java thread facilitate you to interrupt any thread. Interrupting a thread
means to stop the running thread
Post your Comment | http://roseindia.net/discussion/22340-J2ME-Thread-Processing-Example.html | CC-MAIN-2015-40 | en | refinedweb |
Introduction
With the advent of Ajax and Web 2.0 applications, end users have been spoiled with the fast response of web applications. Before web applications can respond even faster, certain bottlenecks must be removed. Bottlenecks include the huge computation of JavaScript and background I/O, which need to be removed from the main UI rendering process. Enter Web Workers.
The Web Workers specification provides the capability to run scripts in the background independent of any user interface scripts. Long-running scripts won't be interrupted by scripts that respond to clicks or other user interactions. Web Workers allow long tasks to be executed, without yielding, while keeping the page responsive.
Before Web Workers, JavaScript was at the core of modern web applications. JavaScript and the DOM that it talks to are essentially single-threaded: only one JavaScript method can be executed at any given time. Even if your computer has four cores, it will keep only one of the cores busy when it is doing a long computation. For example, if you calculate the perfect trajectory to get to the moon, your browser won't be able to render an animation that shows the trajectory and—at the same time—react to user events (such as mouse clicks or keyboard typing).
Web Workers break the traditional JavaScript single-thread mode and introduce the multi-thread programming model. A worker is a stand-alone thread. Web applications that have many tasks to handle no longer need to process the tasks one by one. Instead, the application can assign the tasks to different workers.
In this article, learn about the Web Workers API. A practical example walks you through the steps for using Web Workers to quickly render a web page.
Download the source code for the example used in this article from the Download table below.
Basic concepts
The basic components of Web Workers are:
- Worker
- A new thread, running in the background, that will not block any main user interface scripts. Workers (as these background scripts are called) are relatively heavyweight and are not intended to be used in large numbers.
A worker can do quite a few jobs, including parallel computation, background I/O, and client-side database operation. The worker is not supposed to interrupt the main UI or manipulate DOM directly; it should return a message to the main thread and let the main thread update the main UI.
- Subworker
- A worker created within a worker. Subworkers must be hosted within the same origin as the parent page. The URIs for subworkers are resolved relative to the parent worker's location rather than that of the owning page.
- Shared worker
- A worker that can be used by multiple pages via multiple connections. The shared worker works slightly differently compared to a normal worker. Only a few browsers support this feature.
Web Workers API
This section introduces the basics of the Web Workers API.
Creating a worker
To create a new worker, you simply call the worker constructor with the worker script URI as the only parameter. Once the worker is created, a new thread (or possibly a new process depending on the implementation of your browser) is started at the same time.
When the
worker finishes the work or encounters an error, you can get notifications from
the worker with the
onmessage and
onerror properties of the work instance. Listing
1 shows a sample worker.
Listing 1. Sample worker myWorker.js
// receive a message from the main JavaScript thread onmessage = function(event) { // do something in this worker var info = event.data; postMessage(info + “ from worker!”); };
If you run the JavaScript code in Listing 2 below, you'll get the result "Hello World from worker."
Listing 2. Worker in main JavaScript thread
// create a new worker var myWorker = new Worker("myWorker.js"); // send a message to start the worker var info = “Hello World”; myWorker.postMessage(info); // receive a message from the worker myWorker.onmessage = function (event) { // do something when receiving a message from worker alert(event.data); };
Terminating a worker
A worker is a thread (or process, in essence) that is a high-resource-consumption OS-level object. When the task assigned to the
worker is finished, or you just want to kill it, you need to call the
worker's
terminate method to terminate the running worker. The worker
thread or process is killed immediately without an opportunity to complete
its operations or clean itself up. Listing 3 shows an example.
Listing 3. Terminating myWorker
myWorker.terminate();
Handling errors
Similar to typical JavaScript code, a runtime error can occur in a running
worker. To handle errors, you need to set the
onerror handler for the
worker, which will be invoked if any errors occur during the
script running in a worker. The event doesn't bubble, and you can cancel it. To prevent the default action from taking place, the worker can call the
error event's
preventDefault() method.
Listing 4. Add error handler for myWorker
myWorker.onerror = function(event){ console.log(event.message); console.log(event.filename); console.log(event.lineno); }
The error event has the following three fields that might be helpful for debugging purposes:
message: A human-readable error message
filename: The name of the script file in which the error occurred
lineno: The script file line number on which the error occurred
Importing scripts and libraries
Worker threads have access to a global function,
importScripts(), which
lets them import scripts or libraries into their scope. It accepts as
parameters zero or more URIs of resources to import.
Listing 5. Importing scripts
//import nothing importScripts(); //import just graph.js importScripts('graph.js'); //import two scripts importScripts('graph.js', 'controller.js');
Using Web Workers
This section walks you through a practical use case of Web Workers. The example involves rendering a page that contains several Dojo-based Website Displayer widgets. The widgets are used to display a website using iFrame. Without Web Workers, you would have to get the widget definitions by Ajax request and then render them in a single JavaScript thread. This would be very slow if the widget definition contained a huge amount of data.
The example creates some workers to fetch the widget definition. Each worker is assigned the task to fetch one widget definition and is responsible for telling the main UI JavaScript thread to render it. Because the workers can work in parallel, it is a much faster solution.
Dojo 1.4 is used for the example. If you want to run the example in your own browser, download the Dojo library (see Resources) and the source code (see Downloads) used in this article. Figure 1 shows the structure of the example application.
Figure 1. Web Workers application
In Figure 1:
- lib is the dojo libraries.
- /widgets/WebsiteDisplayer.js is a dojo-based Website Displayer widget implementation.
- /loadwidget/widgets/widgetDefinition[0....3] are the definitions of each Website Displayer widget.
- /loadwidget/Workers.js is the worker implementation.
- /loadwidget/XMLHttpRequest.js is a js lib that contains a method to create
XMLHttpRequst.
- /loadwidget/LoadWidget.html is the main page of the demo with Web Workers enabled, which will be the main JavaScript thread.
- /loadwidget/LoadWidget-none-web-workers.html is the main page that is implemented without Web Workers.
Creating a Website Displayer widget
The Website Displayer widget is a very simple Dojo-TitlePane-dijit-based widget. It will render the UI of a formalized title pane, as shown in Figure 2.
Figure 2. Website Displayer widget
Listing 6 shows the code for the WebsiteDisplayer.js.
Listing 6. Content of the WebsiteDisplayer.js
dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dijit.TitlePane"); dojo.declare("loadWidget.WebsiteDisplayer", [dijit.TitlePane], { title: "", url: "", postCreate: function() { var ifrm = dojo.create("iframe", { src: this.url, style: "width:100%;height:20%;" }); dojo.place(ifrm, this.domNode.children[1], "first"); this.inherited(arguments); var contentFrame = this.domNode.children[1].children[0]; if (contentFrame.attachEvent) { contentFrame.attachEvent("onload", function() { dojo.publish("frameEvent/loaded"); } ); } else { contentFrame.onload = function() { dojo.publish("frameEvent/loaded"); }; } } });
Creating a worker
To implement the worker.js, import a global
JavaScript file called XMLHttpRequest.js, which contains the global method
creatXMLHTTPRequest. This method will return an
XMLHttpRequest object.
The worker will primarily send
XMLHttpRequest to
the server side and retrieve the
widget definition back to the main JavaScript thread. Listing 7 and 8 show an
example.
Listing 7. Content of Worker.js
importScripts("XMLHttpRequest.js"); onmessage = function(event) { var xhr = creatXMLHTTPRequest(); xhr.open('GET', 'widgets/widgetDefinition' + event.data + '.xml', true); xhr.send(null); xhr.onreadystatechange = function() { if (xhr.readyState == 4) { if (xhr.status == 200 || xhr.status ==0) { postMessage(xhr.responseText); } else { throw xhr.status + xhr.responseText; } } } }
Listing 8. widgetDefinition0.xml
<div dojoType="loadWidget.WebsiteDisplayer" title="This is Test Widget 0" url="" ></div>
Creating the main web page
The main web page is where you: create several workers; send messages to workers and start the workers; receive messages from workers; and manipulate the main UI with the received messages.
Listing 9. Main web page
<html> <head> <meta http- <title> Load widgets with Web Workers </title> <style type="text/css"> @import "../lib/dijit/themes/soria/soria.css"; @import "../lib/dojo/resources/dojo.css"; @import "../lib/dojox/layout/resources/GridContainer.css"; @import "../lib/dojox/layout/resources/DndGridContainer.css" </style> <script type="text/javascript" src="../lib/dojo/dojo.js" djConfig="parseOnLoad: true,isDebug:true"> </script> <script> dojo.require("dojo.parser"); dojo.require("dojo.io.script"); dojo.require("dojox.layout.GridContainer"); dojo.require("dijit.layout.LayoutContainer"); dojo.require("dijit.TitlePane"); dojo.require("dojox.layout.DragPane"); dojo.registerModulePath("loadWidget", "../../loadWidget"); dojo.require("loadWidget.WebsiteDisplayer"); </script> <script type="text/javascript" language="javascript"> var workersCount = 4; var haveLoadedCount = 0; var widgetCount = 4; var startTime = new Date().getTime(); var endTime = null; var executeTime = 0; try { for (var i = 0; i < workersCount; i++) { var loadWorker = new Worker("Worker.js"); loadWorker.postMessage(i); loadWorker.onmessage = processReturnWidgetDefinition; loadWorker.onerror = handleWorkerError; } } catch(ex) { console.log(ex); } function processReturnWidgetDefinition(event) { var txt = document.createElement("p"); txt.innerHTML = event.data; var div = document.getElementById("loadingDiv"); div.appendChild(txt); haveLoadedCount++; if (haveLoadedCount == widgetCount) { dojo.parser.parse(); } } function handleWorkerError(event){ console.log(event.message); } dojo.subscribe("frameEvent/loaded", dojo.hitch(null, handelFrameLoaded)); function handelFrameLoaded() { if (haveLoadedCount == widgetCount) { endTime = new Date().getTime(); executeTime = endTime - startTime; dojo.byId("loading"). <div dojoType="dijit.TitlePane" title="Load widgets with Web Workers" style="border: 2px solid black; padding: 10px;" id="main"> <div id="loadingDiv"> <div id="loading"> Widgets are loading...... </div> </div> </div> </body> </html>
Embed this main page into a web application and run it. The results should look like Figure 3.
Figure 3. Load widgets with Web Workers
To see the difference between using Web Workers versus not using Web Workers, run LoadWidget.html and LoadWidget-none-web-workers.html separately and see the result. Note that the page running without Web Workers will finish faster than the one with Web Workers because the code sample handles so little data. The time saved is balanced against the cost of starting a worker.
Tips for using Web Workers
The previous example involves
XMLHttpRequest and
the computation; it is not very large or complex. When you give the worker more complicated
tasks to do, such as handling large calculations, it becomes a very
powerful feature. Before
adopting this cool technology into your project, review the following tips.
Cannot access DOM in workers
For safety reasons, workers can't manipulate the HTML document directly. Multiple threads operating on the same DOM would create problems with thread security. An advantage is that you no longer have to worry about the multi-thread safety problems in worker implementation.
This situation has a few limitations when developing the worker. You
cannot call
alert() within the worker, which is a very popular way to
debug JavaScript code. You also cannot call
document.getElementById(), as it
can only receive and return variables (which could be strings, arrays,
JSON objects, and so on).
Objects available in workers
Though the worker can't access the
window object, it can access the
navigator
directly. You can access the
appName,
appVersion,
platform, and
userAgent in the
navigator object.
The
location object
can be accessed read-only. You can get the
hostname and
port inside of the
location object.
XMLHttpRequest is also enabled in the worker, as shown in the example
in this article. You can add a lot of interesting extensions
into the worker because of this feature.
Also available are:
- The
importScripts()method (for accessing script files in the same domain)
- JavaScript objects, such as
Object,
Array,
Date,
Math, and
String
- The
setTimeout()and
setInterval()methods
Data types carried in
postMessage
postMessage is used quite heavily since it's the major method for the main JavaScript thread to
interact with the workers. However, the data types
that now could be carried in
postMessage are limited to the native JavaScript
types, such as Array, Date, Math, String, JSON, and so forth. The complicated
customized JavaScript objects are not supported very well.
Download
Resources
Learn
- Read the Web Workers specification to learn how to define an API that allows you to spawn background workers running scripts in parallel to your main page.
- Explore the Dijit Reference Guide. Dijit is Dojo's UI Library and lives as a separate namespace dijit. Dijit requires Dojo Core.
- "Creating mobile web applications with HTML 5, Part 4: Using Web Workers to speed up your mobile web applications" (developerWorks, Jun 2010) explains how to work with Web Workers and which tasks are most appropriate for them.
- Originally part of HTML 5, the Web Workers API has been split out into its own W3C Web Workers specification.
Get products and technologies
- Download the Dojo library.
- Web Workers.. | http://www.ibm.com/developerworks/web/library/wa-webworkers/?ca=drs- | CC-MAIN-2015-40 | en | refinedweb |
Get/Set method
Scotty Steven
Ranch Hand
Joined: Jan 27, 2012
Posts: 80
posted
Mar 20, 2012 19:54:47
0
I am working my way through a text book, trying to self-teach during my spare time. One of the exercises has me setting up a class called Purchase, with get and set methods. It then wishes me to set up a method in that class called display, to display the stored info (I've blocked out the code starting on lines 30-34 of the second class where this should happen). In the second class, called CreatePurchase, I create the info to send to set methods, with loops and exception handling.
I am stuck on how to do the display part of the exercise. I am attaching code. HELP!
import java.util.*; public class CreatePurchase { public static void main(String[] args) { //delclarations int invoiceNum, a1; double saleAmt; boolean invLoop = true; boolean saleLoop = true; String cleanInputBuffer; Scanner input = new Scanner(System.in); while(invLoop) { try { Purchase onePurch = new Purchase(); System.out.print("Enter the invoice number: "); invoiceNum = input.nextInt(); if(invoiceNum >= 1000 && invoiceNum <= 8000) { onePurch.setInvNumber(invoiceNum); invLoop = false; } else { System.out.println("Invoice amounts must be " + "between 1000 and 8000."); invLoop = true; } } catch(InputMismatchException error) { System.out.println("Invalid data type."); cleanInputBuffer = input.nextLine(); } }//end while(invLoop) while(saleLoop) { try { Purchase twoPurch = new Purchase(); System.out.print("Enter the sales amount $"); saleAmt = input.nextDouble(); if(saleAmt >=0.01) { twoPurch.setSaleAmount(saleAmt); saleLoop = false; } else { System.out.println("Sales amount must be greater then 0"); saleLoop = true; } } catch(InputMismatchException error) { System.out.println("Invalid data type."); cleanInputBuffer = input.nextLine(); } }//end while(saleLoop) }//end main() } // end class
public class Purchase { // declarations private int invNumber; private double saleAmount; private double saleTaxAmount; private double SALES_TAX = .05; public int getInvNumber() { return invNumber; } // end getInvNumber() public void setInvNumber(int i) { invNumber = i; } // end setSiteNumber() public double getSaleAmount() { return saleAmount; } // end getSaleAmount() public void setSaleAmount(double a) { saleAmount = a; saleTaxAmount = saleAmount * SALES_TAX; } // end setSaleAmount() /* public static void display(int a2) { System.out.println("Sales invoice #" + ?); }//end display() */ } // end class Purchase
Scotty Steven
Ranch Hand
Joined: Jan 27, 2012
Posts: 80
posted
Mar 21, 2012 01:53:27
0
Anybody?
Manoj Kumar Jain
Ranch Hand
Joined: Aug 22, 2008
Posts: 193
I like...
posted
Mar 21, 2012 02:26:37
0
I didn't look deeply in your code but what I understand is that you want to show value of Purchase object and you want a Display method in Purchase Class.
You should declare a Display() method without any argument list like public void Display(). You can call this method from your CreatePurchase class with Purchase class object like onePurch.display();
Inside this method just place the System.out.print statement to print the values of the object like System.out.print("Value of invoice is: " +invNumber);
Hope this help.
Do not wait to strike till the iron is hot; but make it hot by striking....
Santhosh ayiappan
Ranch Hand
Joined: Jan 30, 2007
Posts: 80
I like...
posted
Mar 21, 2012 02:30:13
0
You have created 2 purchase class objects , but you have not stored them any where. Try to retain the objects in a collection object. Then iterate the collection and get the purchase object and get the values from the object.
Regards
Santhosh
Scotty Steven
Ranch Hand
Joined: Jan 27, 2012
Posts: 80
posted
Mar 21, 2012 03:20:13
0
@Manoj Kumar Jain
This help got me close enough to soling my problem. I had some other logic errors to deal with as well as I was out of scope when I tried to execute.
Anyways, Thank you to those who answered.
I agree. Here's the link:
subject: Get/Set method
Similar Threads
endless loop
Java Validation! Field should be Integer
StackOverflowError
try...catch blocks giving <identifier> expected error
Class and Object Problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
JForum
|
Paul Wheaton | http://www.coderanch.com/t/570962/java/java/Set-method | CC-MAIN-2015-40 | en | refinedweb |
This article focuses on migrating a CDMS web application that supports quality assurance and compliance checking in the Australian building and construction industries to the semantic web. As a part of this process:
The D2R Server provides an easy way to publish the
ITP and related tables to the semantic web as Linked Data. After the content is published as Linked Data, other
building applications can use the ITP. For example, you can create an
owl:ObjectProperty,
such as the following appliesInspectionTestPlan:
building:appliesInspectionTestPlan
a owl:ObjectProperty ;
rdfs:domain building:BuildingProject ;
rdfs:label "applies inspection test plan"^^xsd:string .
building:appliesInspectionTestPlan
a owl:ObjectProperty ;
rdfs:domain building:BuildingProject ;
rdfs:label "applies inspection test plan"^^xsd:string .
The process for publishing the database tables to the semantic web is as follows. First, create a MySQL database
common_itps by logging into mysql and running the command:
mysql> create database common_itps character set utf8 ;
mysql --user=richard_rap --password=fender common_itps < common_itps.sql
Generate a mapping file (mapping_common_itps.n3) for the common_itps database by opening a command prompt in the D2R Server directory and running:
generate-mapping -o mapping_common_itps.n3 -u db-user -p db-password jdbc:mysql://localhost/common_itps
d2r-server mapping_common_itps.n3
You can now browse the ITP data online by opening in a web browser,
ideally Firefox with the Tabulator extension installed.
Open the ITP directly in the browser using URLs such as.
You can run SPARQL queries using the
AJAX-based SPARQL explorer. For example, run the following
SPARQL query (see Figure 2):
PREFIX itp: <>
CONSTRUCT { ?s itp:inspection_test_plan_name ?name }
WHERE {?s a itp:inspection_test_plan . ?s itp:inspection_test_plan_name ?name } ORDER BY ASC(?name) LIMIT 5
Jersey and
implicit MVC also provide an easy way to create
a simple RESTful web application based on Jena SDB (installed in the previous article
"Laying the Foundation of a Semantic Web
Application").
You can use a combination of Jenabean and Jersey annotations to map a domain class to RDF and also a RESTful resource that receives HTTP requests.
The Jenabean annotation @Namespace defines the namespace for the BuildingProject class,
@RdfProperty defines the RDF property, and @Uri specifies the URI of
the instance. This allows you to add the builder and ITP to the building project.
The Jersey JAX-RS annotations @POST, @Path,
@Consumes, and
@Produces allow the BuildingProject class to receive the POST requests from the JSP page,
which is part of the implicit MVC implementation (see Listing 1).
Please enable Javascript in your browser, before you post the comment! Now Javascript is disabled.
Your name/nickname
Your email
WebSite
Subject
(Maximum characters: 1200). You have 1200 characters left. | http://www.devx.com/semantic/Article/40938 | CC-MAIN-2015-40 | en | refinedweb |
- Author:
- DrMeers
- Posted:
- April 27, 2010
- Language:
- Python
- Version:
- 1.1
- middleware ssl https redirection href
- Score:
- 2 (after 2 ratings)
See docstrings for details. To use, add to
MIDDLEWARE_CLASSES in
settings.py, and in your
views.py:
from path.to.this.middleware import secure
- Decorate SSL views with
@secure
More like this
- SSL Middleware for Webfaction by parlar 8 years, 4 months ago
- Enable AWS ELB with SSL Termination by zvikico 4 years, 3 months ago
- SSL Middleware by sjzabel 8 years, 7 months ago
- HTTPS redirections middleware with updated URL template tag by xlq 2 years, 11 months ago
- Fake SSL Middleware for Tests and Local Development by DrMeers 5 years, 5 months ago
Very nice, but I had a problem where the /admin/ application was being forced to (insecure) http: even where I entered https:
My solution was to revise the _ _correct__protocol routine:
#
Please login first before commenting. | https://djangosnippets.org/snippets/1999/ | CC-MAIN-2015-40 | en | refinedweb |
Hi everyone,
I recentely began RF3->RF4 migration of one of my apps and hit the wall with the folowing issue:
Lets say I have the following bean model, one using the other. For ex:
public class Brand{ private Integer idbrand; private String name; ...
public class Car{ private Brand brand; private Integer year; private String description; ...
Then in xhtml I try to submit something like this:
<h:outputText <rich:select <f:selectItems </rich:select> <h:outputText <rich:select <f:selectItems </rich:select> <h:outputText <h:inputText
while in my backing bean having initialized only the Car object via its default constructor leaving all referenced beans like brand as null.
The thing is that in RF3 when submitting a form the related objects were getting autoinitialized and injected properly (in this example: mbean.car.brand.idbrand). And as I could see in RF4 I have to recreate each and every one manually every time I have a field referencing another bean.
Before I start extending update_model_values phase with my own lazy initialization mechanism, is there any solution to automatize this without declaring all bean dependencies with their fields initialized? Actuallty I'm more worried about memory consumption than keyboard work. Or maybe I'm missing the point here... | https://community.jboss.org/thread/199107?tstart=0 | CC-MAIN-2015-40 | en | refinedweb |
index
Fortran Tutorials
Java Tutorials
Java Applet Tutorials
Java Swing and AWT Tutorials
JavaBeans Tutorials
applications, mobile applications, batch processing applications. Java is used... |
Linux Tutorial |
Java Script Tutorial
| PHP Tutorial |
Java Servlet
Tutorial | Java Swing Tutorial |
JEE
5 Tutorial | JDBC
creating a feedback form - JSP-Servlet
creating a feedback form hi,
first of all thank you very much... i am refining this problem as follows:
i am creating a feedback form of a college.
this feedback form will ask some question.
now depending upon those int buffer.
;intBuf.get(index));
}
}
Output
C:>java...How to get specific index value from int buffer.
In this tutorial, we will discuss how to get specific index value from
int buffer.
IntBuffer
charAt() method in java
charAt() method in java
In this section you will get detail about charAt() in java. This method comes
in java.lang.String package. charAt() return the character at
the given index within the string, index starting from 0
PHP PDO Index
sqlite2
This is the index page of PDO, following pages will illustrate error ArrayIndexOutofBoundsException
Java error: ArrayIndexOutofBoundsException
In this section you will get details about ArrayIndexOutofBoundsException
java. This exception generally occurs when accessing to an illegal array index.
The index is either greater
Open Source Reports
found the feedback and input from our open-source community an invaluable aid... be proprietary Java application development tools.
Laurie F. Wurster, research... source JasperReports report generating library gives Java developers a viable
java
and explain how to correct it.
i) For(index=0.1;index!=1.0;index+=0.1)
System.out.println("index="+index);
ii)Switch(x)
{
case 1:
System.out.println... of all your for statement is not correct.
Do correction: for(double index=0.1;index
JavaScript array remove by index
JavaScript array remove by index
... of an element at the specified index position we have created a method removeByIndex();
who removes array elements at the provided index position.
Vector in java
Vector in java
Vector in java implements dynamic array. It is similar to array and the
component of vector is accessed by using integer index. Size... of the methods of vector as follows:
MethodsDescription
void add(int index
V - Java Terms
using an integer index.
Java Virtual Machine
Java...
V - Java Terms
Java Vector
Vector represents a collection
Technology index page
Flex Skin index
Remove a value with remove() method
a particular position specified by a index
value. Here is an example... by a index value
using the remove() method. Specify the index position from where...:\roseindia>java VecRemove
The actual Vector Size: 6
10
20
Basic Filter
are at index at ' n ' within the matched set.
Note that java script... element
according to their index in set, elements which are in the progress... the matched set. It do not select the even
number index rows . It selects 2nd
Program - Java Beginners
Java substring indexof example Java substring index of example
PHP OOP Concepts
java
java how to get values from jtable and save in database ?
... actionPerformed(ActionEvent ae){
PreparedStatement pstm;
ResultSet rs;
int index...(2,value2);
index++;
}
pstm.executeUpdate();
}
catch(Exception e
java
(Exception e1){}
}
/*public void ChangeName(JTable table, int col_index, String col_name){
table.getColumnModel().getColumn(col_index).setHeaderValue(col..._index, String col_name){
table.getColumnModel().getColumn(col_index
Java
Java 1) WAP in java to accept the full name of a person and output...();
input.close();
int index = name.lastIndexOf( " " ) + 1;
String st...)+".");
}
scan.close();
System.out.print(name.substring(index
JAVA - Java Magazine
JAVA How to find the index of particular element in tree set.
Thank you in advance
java - Java Magazine
index.
Example:
class ArrayExample {
public static void main(String...;
System.out.println("Element at index 0: " + array[0]);
System.out.println("Element at index 1: " + array[1]);
System.out.println("Element at index 2
Java - Java Beginners
Java How to make a multiple choice quiz in java,
1- Quiz program that answers questions about Math, Science and Arts.
2- Student selects the topic...) respond correct- display positive feedback.
c) respond incorrectly- display
java - Java Beginners
and deleting with three parameters. one as the index and the other the entire array... array.
Example public int[] insertArray(int index, int[] arr, int valule... InsertNumber{
public int[] insertArray(int index, int[] arr, int value){
int
Developing Search Engine in Java
Developing Search Engine in Java
... in Java
technologies. We will be using Hibernate Search for developing the search... to the search index and when an user input a keyword in the search engine
Replace an object with set(int, Object) method
from a particular position specified by a index value.
Here is an example... position specified by a index
value using the replace() method.
Here...:\roseindia>javac VecReplace.java
C:\roseindia>java VecReplace
Continuous Testing
feedback about test failures as source code is edited. It reduces the time
and energy....
It may prove difficult for a continuous testing tool to provide early feedback
Java Project Outsourcing, Java Outsourcing Projects, Oursource your Java development projects
Java Project Outsourcing - Outsource Java development projects
Java... the quality
products in less time. Outsource your Java Projects to
our development team in New Delhi, India. Our Java
development team
Java Kick Start - Java Beginners
feedback. Im very muck exicted to work with java programming. Thank You...Java Kick Start Hello Sir, i like to become a good developer in Java. Im good in JAVA basics. So how to get started with any kind of application
java - Java Beginners
={100,20,152,24,456,651,258,35};
int max = num[0];
int index=0;
for (int i=1; i max) {
max = num[i];
index=i... of Largest Number: "+index);
}
}
Thanks
Passing Arrays In Jsp Methods
sized data
elements generally of the similar data type. In an array the index... arrays are most
commonly used arrays in java. JSP is a technology which enables us
java - Java Beginners
declarations, references and occurrences of Java elements. It is supported by an index that identify the position of the element.
For more information, visit the following links:
Java programmes - Java Beginners
Java programmes 1. Develop a Java package with simple Stack... for Complex numbers in Java. In addition to methods for basic
operations on complex... st[];
protected int index;
public Stack(int capacity){
st
JSP Parse did not work - Java Server Faces Questions
("Feedback");
out.print("Selected Values are: ");
for(int i=0;i
DropDown
DropDown... - to pass all the "multiple" feedback into the final output.jsp
output.jsp
Output
Feedback
Pager taglib - Java Beginners
Pager taglib how to use pager taglib for index provide the example,jar files
java - JSP-Servlet
( 'setbackground()', 10000);var index = Math.round(Math.random() * 9);var ColorValue = 'FFFFFF'; ");
out.println("if(index == 1)ColorValue = 'FFCCCC'; ");
out.println("if(index == 2)ColorValue = 'CCAFFF';");
out.println("if(index == 3
Find position of an array element
the index of an array element. For this, we have allowed the user to enter the array elements of their choice and also the number whose index value...: ");
int element = input.nextInt();
int index = get(arr, element
Namespace in PHP
for identifiers. Java uses this concept as package,
C++ combines namespace
Advertisements
If you enjoyed this post then why not add us on Google+? Add us to your Circles | http://roseindia.net/tutorialhelp/comment/96778 | CC-MAIN-2015-40 | en | refinedweb |
Encodes an HTTP cookie.
#include "am.h" AM_EXPORT am_status_t am_http_cookie_encode encoded and stored.
If the cookie or buffer is NULL..
If the defined size is smaller than the encoded value.
If any other error occurred. | http://docs.oracle.com/cd/E19681-01/820-3738/gclyp/index.html | CC-MAIN-2015-40 | en | refinedweb |
Compute the minimal oriented bounding box for several 3D shapes. More...
#include <vgl/algo/vgl_orient_box_3d.h>
#include <vgl/vgl_box_3d.h>
#include <vgl/vgl_point_3d.h>
#include <vcl_vector.h>
Go to the source code of this file.
Compute the minimal oriented bounding box for several 3D shapes.
Given a 3D geometric object like a set of points, an ellipsoid, ... find the bounding box with the minimal volume that completely contains the given object. "Bounding box" is defined here as a Euclidean box (with mutually ortogonal rectangular faces), i.e., a vgl_orient_box_3d<T>.
The class vgl_orient_box_3d_operators is actually a kind of namespace: it is just a collection of static methods, all returning a minimal box.
Modifications 16-Oct-2009 Peter Vanroose - first (very minimal) version, only works for single-point input
Definition in file vgl_orient_box_3d_operators.h.
Definition at line 41 of file vgl_orient_box_3d_operators.h. | http://public.kitware.com/vxl/doc/release/core/vgl/html/vgl__orient__box__3d__operators_8h.html | crawl-003 | en | refinedweb |
Next: Debugging IMAP, Previous: Expunging mailboxes, Up: IMAP
The IMAP protocol has a concept called namespaces, described by the following text in the RFC2060:).
While there is nothing in this text that warrants concern for the IMAP implementation in Gnus, some servers use namespace prefixes in a way that does not work with how Gnus uses mailbox names.
Specifically, University of Washington's IMAP server uses
mailbox names like
#driver.mbx/read-mail which are valid only
in the create and append commands. After the mailbox is
created (or a messages is appended to a mailbox), it must be accessed
without the namespace prefix, i.e.
read-mail. Since Gnus do
not make it possible for the user to guarantee that user entered
mailbox names will only be used with the CREATE and APPEND commands,
you should simply not use the namespace prefixed mailbox names in
Gnus.
See the UoW IMAPD documentation for the
#driver.*/ prefix
for more information on how to use the prefixes. They are a power
tool and should be used only if you are sure what the effects are. | http://www.gnu.org/software/emacs/manual/html_node/gnus/A-note-on-namespaces.html#A-note-on-namespaces | crawl-003 | en | refinedweb |
#include "BCP_error.hpp"
#include "BCP_message_single.hpp"
Include dependency graph for BCP_USER.hpp:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
This is the function the user must invoke when (s)he is ready to turn contrl over to BCP.
The arguments of the function are the command line arguments and a pointer to an initializer object. That object should be derived from the USER_initialize class. Its member methods will be invoked to initialize the user controlled parts of the branch-and-cut-and-price procedure. | http://www.coin-or.org/Doxygen/CoinAll/_b_c_p___u_s_e_r_8hpp.html | crawl-003 | en | refinedweb |
kirupaForum
>
Art and Design
>
Drawing and Design
> import swift3d in Lightwave or Maya
PDA
View Full Version :
import swift3d in Lightwave or Maya
helgi
August 8th, 2002, 09:26 AM
Hello,
Is it possible to import a swift 3d object in Lightwave or Maya ?
Wolf
August 8th, 2002, 09:46 AM
My first question is...do you work with MAYA? What version? 4 or 5. Yes i'm pretty shure that you can do the import, because Maya can import t3d.
hojo
August 17th, 2002, 10:07 AM
maybe im being an idiot or something, but why would you want to import swift3d to maya or lightwave..?
Wolf
August 20th, 2002, 03:06 PM
Well i didnt wanted to import a maya object to swift3d, i was just replying to helgi's question. with 3dstudiomax you can import and export an object to swift3d, its an advantage because what you can do in swift3d its more limited that in 3dstudiomax...so try to make a "mesh" of an object in 3d studio and export to swift3d so you can export this object has a *.swf. now make this object in swift3d only...compare the quality of the object, and the size of the file almost the same. Test it.
hojo
August 20th, 2002, 03:24 PM
nah, I meant the original post.
but I can see if you had something really nice you made in maya or lightwave that you wanted to play with in swift3d.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved. | http://www.kirupa.com/forum/archive/index.php/t-1676.html | crawl-003 | en | refinedweb |
#include <OSResult.h>
Collaboration diagram for ObjectiveSolution:
Definition at line 697 of file OSResult.h.
Default constructor.
Class destructor.
the number of types of objective function results other than the basic objective function values
Definition at line 703 of file OSResult.h.
a pointer to an array of ObjectiveValues objects
Definition at line 706 of file OSResult.h.
a pointer to an array of other pointer objects for objective functions
Definition at line 711 of file OSResult.h. | http://www.coin-or.org/Doxygen/CoinAll/class_objective_solution.html | crawl-003 | en | refinedweb |
#include <OSInstance.h>
Collaboration diagram for Objective:
Definition at line 211 of file OSInstance.h.
the name of the objective function
Definition at line 221 of file OSInstance.h.
declare the objective function to be a max or a min
Definition at line 226 of file OSInstance.h.
constant is the constant term added to the objective function, 0 by default
Definition at line 231 of file OSInstance.h.
weight is the weight applied to the given objective function, 1.0 by default
Definition at line 236 of file OSInstance.h.
numberOfObjCoef is the number of variables with a nonzero objective function coefficient
Definition at line 241 of file OSInstance.h.
coef is pointer to an array of ObjCoef object pointers
Definition at line 245 of file OSInstance.h. | http://www.coin-or.org/Doxygen/CoinAll/class_objective.html | crawl-003 | en | refinedweb |
#include <OSInstance.h>
List of all members.
Definition at line 135 of file OSInstance.h.
idx is the index of the variable corresponding to the coefficient
Definition at line 147 of file OSInstance.h.
value is the value of the objective function coefficient corresponding to the variable with index idx
Definition at line 152 of file OSInstance.h. | http://www.coin-or.org/Doxygen/CoinAll/class_obj_coef.html | crawl-003 | en | refinedweb |
#include <OSnl2osil.h>
Collaboration diagram for OSnl2osil:
Definition at line 45 of file OSnl2osil.h.
create an OSInstance from the AMPL nl instance representation
osinstance is a pointer to the OSInstance object that gets created from the instance represented in MPS format
Definition at line 71 of file OSnl2osil.h.
og is a pointer to the AMPL data structure holding the objective function coefficients
Definition at line 77 of file OSnl2osil.h.
asl is a pointer to basic AMPL data structure
Definition at line 81 of file OSnl2osil.h.
nl is a pointer to the file with the nl instance
Definition at line 85 of file OSnl2osil.h.
stub is the name of the file with the nl instance
Definition at line 89 of file OSnl2osil.h. | http://www.coin-or.org/Doxygen/CoinAll/class_o_snl2osil.html | crawl-003 | en | refinedweb |
#include <OSnLNode.h>
Inheritance diagram for OSnLNodeVariable:
Definition at line 1282 of file OSnLNode.h.
default constructor.
default destructor.
varIdx is a map where the key is the index of an OSnLNodeVariable and (*varIdx)[ idx] is the kth variable in the map, e.g. (*varIdx)[ 5] = 2 means that variable indexed by 5 is the second variable in the OSnLNode and all of its children
Reimplemented from OSnLNode.
Calculate the function value given the current variable values. This is an abstract method which is required to be implemented by the concrete operator nodes that derive or extend from this OSnLNode class.
coef is an option coefficient on the variable, the default value is 1.o
Definition at line 1288 of file OSnLNode.h.
idx is the index of the variable
Definition at line 1291 of file OSnLNode.h. | http://www.coin-or.org/Doxygen/CoinAll/class_o_sn_l_node_variable.html | crawl-003 | en | refinedweb |
Next: Display Tables, Previous: Blinking, Up: Display
The usual display conventions define how to display each character code. You can override these conventions by setting up a display table (see Display Tables). Here are the usual display conventions:
tab-width.
ctl-arrow. If it is non-
nil, these codes map to sequences of two glyphs, where the first glyph is the ASCII code for ‘^’. (A display table can specify a glyph to use instead of ‘^’.) Otherwise, these codes map just like the codes in the range 128 to 255.
On MS-DOS terminals, Emacs arranges by default for the character code 127 to be mapped to the glyph code 127, which normally displays as an empty polygon. This glyph is used to display non-ASCII characters that the MS-DOS terminal doesn't support. See MS-DOS and MULE.
The usual display conventions apply even when there is a display
table, for any character whose entry in the active display table is
nil. Thus, when you set up a display table, you need only
specify the characters for which you want special behavior.
These display rules apply to carriage return (character code 13), when it appears in the buffer. But that character may not appear in the buffer where you expect it, if it was eliminated as part of end-of-line conversion (see Coding System Basics).
These variables affect the way certain characters are displayed on the
screen. Since they change the number of columns the characters occupy,
they also affect the indentation functions. These variables a backslash followed by three octal digits: ‘\001’.
The value of this buffer-local variable is the spacing between tab stops used for displaying tab characters in Emacs buffers. The value is in units of columns, and the default is 8. Note that this feature is completely independent of the user-settable tab stops used by the command
tab-to-tab-stop. See Indent Tabs. | http://www.gnu.org/software/emacs/manual/html_node/elisp/Usual-Display.html#Usual-Display | crawl-003 | en | refinedweb |
SYNOPSIS
#include <sys/mman.h>
void *mmap(void *addr, size_t len, int prot, int flags,
int fildes, off_t off);
DESCRIPTION
The mmap() function shall establish a mapping between a process'
address space and a file, shared memory object, or typed memory
object. The format of the call is as follows:
pa=mmap(addr, len, prot, flags, fildes, off);
The mmap() function shall establish a mapping between the address space
of the process at an address pa for len bytes to the memory object rep-
resented file, shared
memory object, or typed refer-
ences to portions of the mapped region that correspond to added or
removed portions of the file is unspecified.
The mmap() function shall be supported for regular files, shared memory
objects, and typed memory objects. Support for any other type of
file is unspecified..
prot; however, if the Memory Protection option is supported, the
implementation shall not permit a write to succeed where PROT_WRITE has
not been set or shall not permit any access where PROT_NONE alone has
been set. The implementation shall support at least the following val-
ues of prot: PROT_NONE, PROT_READ, PROT_WRITE, and the bitwise-inclu-
sive OR of PROT_READ and PROT_WRITE. If the Memory Protection option
is not supported, the result of any access that conflicts with the
specified protection is undefined. The file descriptor fildes shall
have been opened with read permission, regardless of the protection
options specified. If PROT_WRITE is specified, the application shall
ensure that it has opened the file descriptor fildes with write permis-
sion unless MAP_PRIVATE is specified in the flags parameter as
described below.
The parameter flags provides other information about the handling of
the mapped data. The value of flags is the bitwise-inclusive OR of
these options, defined in <sys/mman.h>:
Symbolic Constant Description
MAP_SHARED Changes are shared.
MAP_PRIVATE Changes are private.
MAP_FIXED Interpret addr exactly.
Implementations that do not support the Memory Mapped Files option are
not required to support MAP_PRIVATE., modi-
fications rep-
resents a typed memory object opened with neither the
POSIX_TYPED_MEM_ALLOCATE_CONTIG flag nor the POSIX_TYPED_MEM_ALLOCATE
flag, len bytes starting at offset off within the typed memory object
When MAP_FIXED is not set, the implementation uses addr in an implemen-
tation-defined manner to arrive at pa. The pa so chosen shall application shall
ensure that the argument addr also meets these constraints. The imple-
mentation performs mapping operations over whole pages. Thus, while the
argument len need not meet a size or alignment constraint, the imple-
mentation shall include, in any mapping operation, any partial page
specified by the range [pa,pa+len)...
The st_ctime and st_mtime fields of a file that is mapped with
MAP_SHARED and PROT_WRITE shall be marked for update at some point in
the interval between a write reference to the mapped region and the
next call to msync() with MS_ASYNC or MS_SYNC for that portion of the
file by any process. If there is no such call and if the underlying
file is modified as a result of a write reference, then these fields
shall be marked for update at some time after the write reference.
There may be implementation-defined limits on the number of memory
regions that can be mapped (per process or per system).
If such a limit is imposed, whether the number of memory regions that
return from mmap() shall return the value MAP_FAILED.
ERRORS
The mmap() function shall fail if:
EACCES The fildes argument is not open for read, regardless of the pro-
tection specified, or fildes is not open for write and
PROT_WRITE was specified for a MAP_SHARED type mapping.
EAGAIN The mapping could not be locked in memory, if required by mlock-
all(), due to a lack of resources.
EBADF The fildes argument is not a valid open file descriptor.
EINVAL The addr argument (if MAP_FIXED was specified) or off is not a
multiple of the page size as returned by sysconf(), or is con-
sidered invalid by the implementation.
EINVAL The value of flags is invalid (neither MAP_PRIVATE nor
MAP_SHARED is set).
EMFILE The number of mapped regions would exceed an implementation-
defined-
all(), because it would require more space than the system is
able to supply.
ENOMEM Not enough unallocated memory resources remain in the typed mem-
ory.
APPLICATION USAGE.
The application must ensure correct synchronization when using mmap()
in conjunction with any other file access method, such as read() and
write(), standard input/output, and shmat().
The mmap() function allows access to resources via address space manip-
ulations, follow-
ing:
fildes = open(...)
lseek(fildes, some_offset)
read(fildes, buf, len)
/* Use data in buf. */
becomes:
fildes = open(...)
address = mmap(0, len, PROT_READ, MAP_PRIVATE, fildes, some_offset)
/* Use data at address. */
RATIONALE, can-
not count on this behavior. Implementations that do not use a paged
architecture may simply allocate a common memory region and return the
address of it; such implementations probably do not allocate any more
than is necessary. References past the end of the requested area are
unspecified.
new mappings replace any existing mappings, following existing practice
in this regard.
It is not expected, when the Memory Protection option is supported,
that all hardware implementations are able to support all combinations
of permissions at all addresses. When this option is supported, imple-
mentations are required to disallow write access to mappings without
write permission and to disallow access to mappings without any access
permission. Other than these restrictions, implementations may allow
access types other than those requested by the application. For exam-
ple, if the application requests only PROT_WRITE, the implementation
may also allow read access. A call to mmap() fails if the implementa-
tion cannot support allowing all the access requested by the applica-
tion. For example, some implementations cannot support a request for
both write access and execute access simultaneously. All implementa-
tions supporting the Memory Protection option. Conform-
ing vir-
tual, speci-
fying map-
ping address. The system can still be used to choose the desired
address if the first such mapping is made without specifying MAP_FIXED,
and then the resulting mapping address can be passed to subsequent pro- -1 when unsuccess-
ful. Since the casting of this value to type void * cannot be guaran-
teed by the ISO C standard to be distinct from a successful value, this
volume of IEEE Std 1003.1-2001 defines the symbol MAP_FAILED, which a
conforming implementation does not return as the result of a successful
call.
FUTURE DIRECTIONS
None.
SEE ALSO
exec() , fcntl() , fork() , lockf() , msync() , munmap() , mprotect() ,
posix_typed_mem_open() , shmat() , . | http://www.linux-directory.com/man3/mmap.shtml | crawl-003 | en | refinedweb |
java.lang.Object
org.eclipse.jface.wizard.Wizardorg.eclipse.jface.wizard.Wizard
org.eclipse.vtp.desktop.projects.core.wizards.CreateBusinessObjectWizardorg.eclipse.vtp.desktop.projects.core.wizards.CreateBusinessObjectWizard
public class CreateBusinessObjectWizard
This wizard walks the user through the steps required to create a new business object for an application. The user is prompted to enter a name for the new business object. This name must be unique among the current business objects in the application. The business object is automatically created by this wizard and so requires no actions from the caller of the wizard.
public CreateBusinessObjectWizard(IBusinessObjectSet objectSet)
CreateBusinessObjectWizardinstance for the given business object set.
objectSet- The business object set that will contain the new business object.
public boolean performFinish()
performFinishin interface
org.eclipse.jface.wizard.IWizard
performFinishin class
org.eclipse.jface.wizard.Wizard | http://www.eclipse.org/vtp/documentation/javadoc/3.0%20API/org/eclipse/vtp/desktop/projects/core/wizards/CreateBusinessObjectWizard.html | crawl-003 | en | refinedweb |
#include <OSExpressionTree.h>
Collaboration diagram for OSExpressionTree:
Definition at line 35 of file OSExpressionTree.h.
default constructor.
default destructor.
Get a vector of pointers to OSnLNodes that correspond to the OSExpressionTree in prefix format.
Get a vector of pointers to OSnLNodes that correspond to the OSExpressionTree in postfix format.
Retrieve a map of the indicies of the variables that are in the expression tree.
m_treeRoot holds the root node (of OSnLNode type) of the expression tree.
Definition at line 42 of file OSExpressionTree.h.
m_mvarIdx is a map used by constructCppADTape(std::map<int, int> *varIdx, CppAD::vector< AD<double> > *XAD) to generate the infix expression for CPPAD -- the key is idx a variable number, the value of the map is the corresponding variable count in sparse representation
Definition at line 97 of file OSExpressionTree.h.
m_bIndexMapGenerated is set to true if getVariableIndiciesMap() has been called
Definition at line 111 of file OSExpressionTree.h.
is true if a CppAD Expresion Tree has an expression that can change depending on the value of the input, e.g.
an if statement -- false by default
Definition at line 117 of file OSExpressionTree.h.
m_bDestroyNlNodes if the destructor deletes the OSnLNodes in the Expression tree
Definition at line 122 of file OSExpressionTree.h.
posVarIdx is a map iterator used by the map varIdx
Definition at line 130 of file OSExpressionTree.h.
m_CppADTape stores the espression tree for m_treeRoot as an AD<double>.
Definition at line 135 of file OSExpressionTree.h.
m_dTreeRootValue is the function value of the root node
Definition at line 141 of file OSExpressionTree.h. | http://www.coin-or.org/Doxygen/CoinAll/class_o_s_expression_tree.html | crawl-003 | en | refinedweb |
#include <OSInstance.h>
Collaboration diagram for Nl:
Definition at line 388 of file OSInstance.h.
default constructor.
default destructor.
idx holds the row index of the nonlinear expression
Definition at line 391 of file OSInstance.h.
m_bDeleteExpressionTree is true, if in garbage collection, we should delete the osExpression tree object, if the OSInstance class created a map of the expression trees this should be false since the osExpressionTree is deleted by the OSInstance object
Definition at line 398 of file OSInstance.h.
osExpressionTree contains the root of the OSExpressionTree
Definition at line 401 of file OSInstance.h. | http://www.coin-or.org/Doxygen/CoinAll/class_nl.html | crawl-003 | en | refinedweb |
...one of the most highly
regarded and expertly designed C++ library projects in the
world. — Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
template< typename Seq , typename Pred = less<_1,_2> , typename In = unspecified > struct sort { typedef unspecified type; };
Returns a new sequence of all elements in the range [begin<Seq>::type, end<Seq>::type) sorted according to the ordering relation Pred.
[Note: This wording applies to a no-inserter version(s) of the algorithm. See the Expression semantics subsection for a precise specification of the algorithm's details in all cases — end note]
#include <boost/mpl/sort.hpp>
The semantics of an expression are defined only where they differ from, or are not defined in Reversible Algorithm.
For any Forward Sequence s, a binary Lambda Expression pred, and an Inserter in:
typedef sort<s,pred,in>::type r;
Average O(n log(n)) where n == size<s>::value, quadratic at worst.
typedef vector_c<int,3,4,0,-5,8,-1,7> numbers; typedef vector_c<int,-5,-1,0,3,4,7,8> expected; typedef sort<numbers>::type result; BOOST_MPL_ASSERT(( equal< result, expected, equal_to<_,_> > )); | http://www.boost.org/doc/libs/1_37_0/libs/mpl/doc/refmanual/sort.html | crawl-003 | en | refinedweb |
collective.wtforms 1.0a3
plone wtforms integration
Introduction
collective.wtforms is plone integration with the WTForms form library.
Basic Complete Form Example
The basic form is constructed like so:
from wtforms import Form, TextField from wtforms import validators class MyForm(Form): one = TextField("Field One", [validators.required()]) two = TextField("Field Two") three = TextField("Field Three") from collective.wtforms.views import WTFormView class MyFormView(WTFormView): formClass = MyForm buttons = ('Create', 'Cancel') def submit(self, button): if button == 'Create' and self.validate(): # do fun stuff here self.context.value = self.form.one.data
Then wire up the form with zcml:
<browser:page
You can also override the template used and then do:
<form tal:
To render the form anywhere in your view.
Fieldsets
You can specific which fields go with which fieldsets easily also:
class MyFormView(WTFormView): formClass = MyForm buttons = ('Create', 'Cancel') fieldsets = ( ('Fieldset One', ('one', 'two')), ('Fieldset Two', ('three',)) ) def submit(self, button): if button == 'Create' and self.validate(): # do fun stuff here self.context.value = self.form.one.data
This will render the form in the standard plone feildsets.
Control Panel
It's also possible to easily construct a control panel form:
from collective.wtforms.views import WTFormControlPanelView class MyFormView(WTFormControlPanelView): formClass = MyForm buttons = ('Save', 'Cancel') def submit(self, button): if button == 'Save' and self.validate(): # do fun stuff here self.context.value = self.form.one.data
WTFormView Class Properties
- formClass
- The WTForm class used. Required
- label
- The form label that shows up in the h1 tag
- description
- form description
- prefix
- The prefix of the form input name values. Defaults to wtform
- buttonPrefix
- The prefix of the button names. Defaults to form.actions.
- wrapWithFieldset
- A boolean that decides if it should wrap the fields in a fieldset. Defaults to True
- csrfProtect
- Protect the form against csrf attacks. Defaults to True
- buttons
- An iterable of button names. Defaults to ('Save', 'Cancel')
- fieldsets
- An iterable of (fieldset name, (field names, ...)). Defaults to empty
- form
- The instance of the WTForm form that is created on rendering the form.
- data
- Override this property to specify default values to populate the form with. This must return a dictionary.
- submitted
- Boolean if the form was submitted or not.
- renderField(field)
- Method to render a specific field.
- renderForm()
- Method to render the entire form.
- validate()
- Check csrf protection and validates the form.
- submit(button)
The method you must override to handle the form sumission and run validation. Return a value to override rendering the template(self.index()). For instance, if you do a redirect, there is no need to render the page also:
def submit(self, button): if button == 'Save' and self.validate(): self.context.value = self.form.one.data self.request.response.redirect(self.context.absolute_url()) return 1
- mungeForm(form)
- A method to mess with the form after it is created. This is what can be used to apply dynamic choices.
Changelog
1.0a3 (2011-10-11)
- fix issue where initial form data wouldn't work in some instances.
1.0a2 (2011-10-06)
- Fixed control panel template used.
- add ability to easily mess with form after creation
- add ability to provide initial data to form values
1.0a1 (2011-09-29)
- Initial release
- Author: Nathan Van Gheem
- Keywords: forms plone wtforms
- License: GPL
- Categories
- Package Index Owner: vangheem
- DOAP record: collective.wtforms-1.0a3.xml | http://pypi.python.org/pypi/collective.wtforms/1.0a3 | crawl-003 | en | refinedweb |
This is the matrix space for LowRankUpdateSymMatrix. More...
#include <IpLowRankUpdateSymMatrix.hpp>
This is the matrix space for LowRankUpdateSymMatrix.
Definition at line 151 of file IpLowRankUpdateSymMatrix.hpp.
Constructor, given the dimension of the matrix.
Definition at line 157 of file IpLowRankUpdateSymMatrix.hpp.
Destructor.
Definition at line 171 of file IpLowRankUpdateSymMatrix.hpp.
Default Constructor.
Copy Constructor.
Overloaded MakeNew method for the SymMatrixSpace base class.
Implements Ipopt::SymMatrixSpace.
Definition at line 177 of file IpLowRankUpdateSymMatrix.hpp.
Method for creating a new matrix of this specific type.
Definition at line 183 of file IpLowRankUpdateSymMatrix.hpp.
Definition at line 188 of file IpLowRankUpdateSymMatrix.hpp.
Definition at line 193 of file IpLowRankUpdateSymMatrix.hpp.
Definition at line 198 of file IpLowRankUpdateSymMatrix.hpp.
Overloaded Equals Operator.
Reimplemented from Ipopt::SymMatrixSpace.
Expansion matrix to lift the low-rank approximation into a possibly higher-dimensional space.
If it is NULL, it is assume that no lift is performed.
Definition at line 225 of file IpLowRankUpdateSymMatrix.hpp.
Vector space for the space in which the low-rank approximation lives.
Definition at line 229 of file IpLowRankUpdateSymMatrix.hpp.
Flag indicating whether the diagonal matrix is nonzero only in the space of V or in the full space.
Definition at line 233 of file IpLowRankUpdateSymMatrix.hpp. | http://www.coin-or.org/Doxygen/Ipopt/class_ipopt_1_1_low_rank_update_sym_matrix_space.html | crawl-003 | en | refinedweb |
Description
The Debug.Assert is one of the greatest tools for developers to use for creating solid, bug free code.. This sample creates a dll that once referenced by your ASP.Net or Web Service app, just adding a small block of xml into your web.config file will cause the debugger to automatically break into your code. Debug.Assert is one of the greatest tools for developers to use for creating solid, bug free code. When an Assertion fails in a WinForm application, by default, you get a message box (see Figure 1) that shows the Assertion message, the stack trace where the Assertion failed, and an option to break into debug mode on the line of code after the Assertion. If you click the Retry button, the debugger will kick in and let you inspect the values that failed the Assertion.
Figure 1
Enter ASP.Net and Web Services.
A Brief Overview of TraceListener objects
A TraceListener class is a class that handles message output for Debug and Trace classes (located in the System.Diagnostic namespace). The Debug and Trace classes have a static collection object called Listeners, which holds a list of TraceListener objects. By default this collection holds only one TraceListener object, the DefaultTraceListener. The .Net Framework also includes a TextWriterTraceListener and an EventLogTraceListener. When you call Debug.Assert or Debug.WriteLine, the runtime loops through each TraceListener in the Debug.Listeners collection and sends the each one the message that you provided. So if you added both the TextWriterTraceListener and the EventLogTraceListener objects to Debug.Listeners, yount exactly what the TraceListener class was designed for, but it suites our needs here very nicely. To do this, create a new library project in Visual Studio and rename the default class to ASPNetDebugAssert, and have this class inherit from System.Diagnostics.TraceListener. Then override the 4 Write() and WriteLine() methods of the TraceListener base class. In each one of these overridden methods, make a call to BreakInCode(). The code for BreakInCode is listed below. web.config file. If the BooleanSwitch is enabled it checks to see if a debugger is attached. If the debugger is attached to the running process, the code calls Debugger.Break() which will cause Visual Studio to break on the very next line after the Debug.Assert call. If the debugger is not attached to the running process, the code will try to launch the debugger.
And thats all there is to itwell, almost. When your code calls Debug.Assert() in an ASP.Net application and the Assertion fails, the Debug class will loop through each listener in its collection and call the Write() method on each one. When it calls our custom TraceListener class, the debugger is told to break.
<system.diagnostics><switches> <add name="BreakOnAssert" value="1" /></switches><trace autoflush="true" indentsize="0"><listeners><add name="MyListener" type="ASPNetDebugAssertion.ASPNetDebugAssert,ASPNetDebugAssertion" /></listeners></trace></system.diagnostics>
The first thing in here is a definition for our BooleanSwitch. The element turns the BooleanSwitch on or off (enabled or disabled). Setting the value attribute to 0 will disable the switch and 1 will enable it (in the case of our custom dll, 1 will cause the debugger to break, 0 will not cause the debugger to break).?
The final piece to this example is actually calling Debug.Assert in an ASP.Net application. There are a few things we have to do to piece this all together. First, compile your ASPNetDebugAssertion library in Release build mode. Then, in your ASP.Net or Web Service project, add a reference to the release version of the dll. (Note: If you compile the ASPNetDebugAssertion dll under debug mode, the debugger will use the debug symbols of our dll and break on the line right after Debugger.Break is called.). Next, copy and paste the web.config xml block listed above into your ASP.Net projects web.config file. Be sure to paste it inside the element, but OUTSIDE of the element.
Once this is done, your project is setup and ready to Assert! Somewhere in the code behind of one of your web forms, add the following lines of code.
private void Button1_Click(object sender, System.EventArgs e){Debug.Assert(sender == null, "sender obj is null");string assertTest = "Hey, this worked";this.TextBox1.Text = assertTest;}
When the application is first started, the Debug class will check the web.config file and look to see if any TraceListeners should be added to its Listeners collection. Once Debug.Assert is called, it will send The assertion worked!! to each TraceListener, including ours. When our dll is called, the BreakInCode() method will do its work and the debugger will break on the line of code immediately following the Debug.Assert. And thats it!!! You now get debugger breaking when you use Assertions, just like you do (almost) with a WinForm application. If you want to turn the break mode off, just change the BooleanSwitch definition in the web.config to 0.
Automatically Break into Code When Calling Debug.Assert
How to change screen resolution in C# | http://www.c-sharpcorner.com/uploadfile/johnconwell/debugassertinaspdotnet11262005013820am/debugassertinaspdotnet.aspx | crawl-003 | en | refinedweb |
Accessing Directory Services in .NET Framework 2.0
Development Environment for this Article
The configuration of the development environment used for this article is a Microsoft Virtual PC running Windows Server 2003. I promoted it to a domain controller for a fictitious dev.codeguru.com domain. All of the examples in this article run against that server instance. For those not familiar with Virtual PC, I highly recommend you investigate it. It is a highly valuable tool for building simulated development environments, among other things.
Searching the Directory
The .NET Framework 2.0 contains several enhancements related to search capabilities. The DirectorySearcher is still the class that provides the relevant functionality for searching directories, but it has expanded capabilities beyond what was available in the 1.x versions.
Finding Deleted Users Sample
Suppose an application uses the directory service for authentication (user ID and password validation), but relies on a separate data store in an application database to determine what the user can do within the application. The ability to determine quickly which users have recently been deleted from the directory service can be useful. When you know an account has been removed from your AD, you can remove it from your application as well. By default, objects deleted within AD are moved into the Deleted Objects container for a period of time. Now, you can search this container, courtesy of the expanded search functionality.
The sample code below executes a search and displays the account name, using the FindAll method of the DirectorySearcher class in combination with specific filter, scope, and Tombstone properties to find all entries in the Active Directory that have recently been deleted. It is important to set the AuthenticationType as AuthenticationTypes.FastBind to prevent it from verifying whether the object actually exists in the directory:
DirectoryEntry entry = new DirectoryEntry( "LDAP://cn=Deleted Objects,DC=dev,DC=codeguru,DC=com"); entry.AuthenticationType = AuthenticationTypes.FastBind | AuthenticationTypes.Secure; using( DirectorySearcher search = new DirectorySearcher(entry) ) { search.Filter = "isDeleted=TRUE"; search.SearchScope = SearchScope.OneLevel; search.Tombstone = true; using (SearchResultCollection results = search.FindAll()) { foreach (SearchResult result in results) { if (result.Properties.Contains("SAMAccountName")) { Console.WriteLine("Account name = {0}", result.Properties["SAMAccountName"][0]); } } } } Console.ReadLine();
Virtual List View Sample
The Virtual List View (VLV) is a Windows Server 2003 feature that allows you to execute large searches against a directory service and scroll/page through them efficiently without having to return the full results at once. It retrieves contiguous subsets from the search results rather than grabbing them all at once. You control the search results by attaching a VLV to the DirectorySearcher instance being used to search the directory. You need to set a server side sorting value, otherwise it won't operate properly.
The following sample code illustrates these concepts by first searching for a target user and then grabbing a set of records from that spot onward. Next, it adjusts that to find a result and returns five records prior to the first match and one after (You may need to adjust the Target string to search for users that will match in your directory.):
DirectoryEntry entry = new DirectoryEntry("LDAP://dev.codeguru.com"); DirectorySearcher search = new DirectorySearcher(entry, "(objectClass=User)"); SortOption sort = new SortOption("SAMAccountName", SortDirection.Ascending); search.Sort = sort; // Find a place where user accounts that start with cs // Return 5 records from the results spot (results are zero based) DirectoryVirtualListView virtualList = new DirectoryVirtualListView(); virtualList.BeforeCount = 0; virtualList.AfterCount = 4; virtualList.Target = "cs"; search.VirtualListView = virtualList; foreach (SearchResult result in search.FindAll()) { Console.WriteLine("Account name = {0}", result.Properties["SAMAccountName"][0]); } Console.WriteLine("Additional Searching"); // Context is still attached so I can adjust the results // Return 5 records before the match and 1 after search.VirtualListView.BeforeCount = 5; search.VirtualListView.AfterCount = 1; foreach (SearchResult result in search.FindAll()) { Console.WriteLine("Account name = {0}", result.Properties["SAMAccountName"][0]); } Console.ReadLine();
Changing a User Password
One of the most common questions I receive regarding Active Directory is: "How do I change the password for an existing user so that I can allow users to change their Windows passwords from within my application?" The question is misleading because the command to set the password for the first time for a new user is different from the command to change an existing password.
Changing a user's password is fairly straightforward. The first step is to find the specific user account in Active Directory and then execute the ChangePassword action:
try { // Use the user account you're changing the password on // to validate the user really exists. Specifies the // authentication type as secure as I had problems // getting it to work otherwise. DirectoryEntry entry = new DirectoryEntry( "LDAP://CN=Users,DC=dev,DC=codeguru,DC=com", "dev.codeguru.com\\testuser", "password", AuthenticationTypes.Secure | AuthenticationTypes.Sealing | AuthenticationTypes.ServerBind); DirectorySearcher search = new DirectorySearcher(entry); search.Filter = "(SAMAccountName=testuser)"; SearchResult result = search.FindOne(); DirectoryEntry user = result.GetDirectoryEntry(); Object ret = user.Invoke("ChangePassword", new object[] { "password", "newpassword" }); user.CommitChanges(); } catch( Exception exception ) { Console.WriteLine( exception.Message ); }
Other Namespace Additions
The System.DirectoryServices namespace offers many changes in the 2.0 Framework, including the new System.DirectoryServices.ActiveDirectory and System.DirectoryServices.Protocols. However, the ActiveDirectory namespace name is misleading. The ActiveDirectory namespace is intended for automating management tasks and cannot be used to access data contained within Active Directory. You still use the System.DirectoryServices namespace to access the contents of Active Directory or other directory service. The Protocols namespace allows you to work with the LDAP 3.0 protocol along with the Directory Services Markup Language (DSML) 2.0.
Better Interaction with Your Enterprise AD
Several improvements to the System.DirectoryServices namespace will expand the ability to interact with your enterprise Active Directory. Now, the entire process operates predominantly off managed code and is much smoother and more efficient to use. Other handy additions such as the ActiveDirectory and Protocols namespaces warrant future exploration.
Future Columns
The topic of the next column is yet to be determined. If you have something in particular that you would like to see explained here, e-mail me at mstrawmyer@crowechizek.com.
There are no comments yet. Be the first to comment! | http://www.codeguru.com/csharp/.net/net_general/netframeworkclasses/article.php/c11413/Accessing-Directory-Services-in-NET-Framework-20.htm | crawl-003 | en | refinedweb |
Published: October 16, 2006
Updated: April 25, 2012
Applies To: Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2
This FAQ answers questions about Distributed File System (DFS) Replication (also known as DFS-R or DFSR) for the Windows Server® 2008 R2, Windows Server 2008, and Windows Server 2003 R2 operating systems.
For information about DFS Namespaces, see DFS Namespaces: Frequently Asked Questions.
For information about what’s new in DFS Replication, see the following topics:
For a list of recent changes to this topic, see the Change History section of this topic..
Yes, DFS Replication can replace FRS for SYSVOL replication on servers running Windows Server 2008 R2 or Windows Server 2008. Servers running Windows Server 2003 R2 do not support using DFS Replication to replicate the SYSVOL folder.
For more information about replicating SYSVOL by using DFS Replication, see the SYSVOL Replication Migration Guide: FRS to DFS Replication.
Yes. To migrate replication from FRS to DFS Replication, see the following documents:
Yes. Although DFS Replication only supports replicating content between servers running Windows Server, UNIX clients can access file shares on the Windows servers. To do so, install Services for Network File Systems (NFS) on the DFS Replication server.
You can also use the SMB/CIFS client functionality included in many UNIX clients to directly access the Windows file shares, although this functionality is often limited or requires modifications to the Windows environment (such as disabling SMB Signing by using Group Policy).
DFS Replication interoperates with NFS on a server running a Windows Server operating system, but you cannot replicate an NFS mount point.
Yes. DFS Replication is supported on Volume Shadow Copy Service (VSS) volumes and previous snapshots can be restored successfully with the Previous Versions Client.
No, using Windows Backup (Ntbackup.exe) on a computer running Windows Server 2003 or earlier to back up the contents of a replicated folder on a computer running Windows Server 2008 R2 or Windows Server 2008 is not supported.
To back up files that are stored in a replicated folder, use Windows Server Backup or Microsoft® System Center Data Protection Manager. For information about Backup and Recovery functionality in Windows Server 2008 R2 and Windows Server 2008, see Backup and Recovery. For more information, see System Center Data Protection Manager ().
Yes. Do not configure file system policies on replicated folders. The file system policy reapplies NTFS permissions at every Group Policy refresh interval. This can result in sharing violations because an open file is not replicated until the file is closed.
No. DFS Replication cannot be used to replicate mailboxes hosted on Microsoft Exchange Server.
Yes. However, the File Server Resource Manager (FSRM) file screening settings must match on both ends of the replication. In addition, DFS Replication has its own filter mechanism for files and folders that you can use to exclude certain files and file types from replication.
The following are best practices for implementing file screens or quotas:
Yes, DFS Replication in Windows Server 2008 R2 includes the ability to add a failover cluster as a member of a replication group. For more information, see Add a Failover Cluster to a Replication Group ().The DFS Replication service on versions of Windows prior to Windows Server 2008 R2 is not designed to coordinate with a failover cluster, and the service will not fail over to another node.
Yes. DFS Replication replicates volumes on which Single Instance Storage (SIS) is enabled. SIS is used by Remote Installation Services (RIS), Windows Deployment Services (WDS), and Windows Storage Server.
You can safely use DFS Replication and Offline Files together in scenarios when there is only one user at a time who writes to the files. This is useful for users who travel between two branch offices and want to be able to access their files at either branch or while offline. Offline Files caches the files locally for offline use and DFS Replication replicates the data between each branch office.
Do not use DFS Replication with Offline Files in a multi-user environment because DFS Replication does not provide any distributed locking mechanism or file checkout capability. If two users modify the same file at the same time on different servers, DFS Replication moves the older file to the DfsrPrivate\ConflictandDeleted folder (located under the local path of the replicated folder) during the next replication.
Antivirus applications can cause excessive replication if their scanning activities alter the files in a replicated folder. For more information, Testing Antivirus Application Interoperability with DFS Replication ().
Windows® SharePoint® Services provides tight coherency in the form of file check-out functionality that DFS Replication does not. If you are concerned about multiple people editing the same file, we recommend using Windows SharePoint Services. Windows SharePoint Services 2.0 with Service Pack 2 is available as part of Windows Server 2003 R2. Windows SharePoint Services can be downloaded from the Microsoft Web site; it is not included in Windows Server 2008 R2 or Windows Server 2008. However, if you are replicating data across multiple sites and users will not edit the same files at the same time, DFS Replication provides greater bandwidth and simpler management.
Yes—assuming that there is a private Wide Area Network (WAN) link (not the Internet) connecting the branch offices. However, you must open the proper ports in external firewalls. DFS Replication uses the RPC Endpoint Mapper (port 135) and a randomly assigned ephemeral port above 1024. You can use the Dfsrdiag command line tool to specify a static port instead of the ephemeral port. For more information about how to specify the RPC Endpoint Mapper, see article 154596 in the Microsoft Knowledge Base ().
No. DFS Replication will not replicate files or folders that are encrypted using the Encrypting File System (EFS). If a user encrypts a file that was previously replicated, DFS Replication deletes the file from all other members of the replication group. This ensures that the only available copy of the file is the encrypted version on the server.:
No. DFS Replication relies on Active Directory® Domain Services for configuration. It will only work in a domain.
Yes. DFS Replication can replicate numerous folders between servers. Ensure that each of the replicated folders has a unique root path and that they do not overlap. For example, D:\Sales and D:\Accounting can be the root paths for two replicated folders, but D:\Sales and D:\Sales\Reports cannot be the root paths for two replicated folders.
No. DFS Replication and DFS Namespaces can be used separately or together. In addition, DFS Replication can be used to replicate standalone DFS namespaces, which was not possible with FRS.
No. DFS Replication does not explicitly require time synchronization between servers. However, DFS Replication does require that the server clocks match closely. The server clocks must be set within five minutes of each other (by default) for Kerberos authentication to function properly. For example, DFS Replication uses time stamps to determine which file takes precedence in the event of a conflict. Accurate times are also important for garbage collection, schedules, and other features.
Yes. However, you must first install Windows Server 2003 Service Pack 2 or the hotfix. For more information, see article 920335 in the Microsoft Knowledge Base (). Additionally, replicating an entire volume can cause the following problems:
No.
Yes. DFS Replication is independent of the connection type.
No. DFS Replication requires NTFS because it uses the NTFS change journal and other features of the NTFS file system.
Yes. You can replicate sparse files. The Sparse attribute is preserved on the receiving member.
No. DFS Replication is a service that runs under the local system account, so you do not need to log in as administrator to replicate. However, you must be a domain administrator or local administrator of the affected file servers to make changes to the DFS Replication configuration.
For more information, see "DFS Replication security requirements and delegation" in the Delegate the Ability to Manage DFS Replication ( 182294).
To upgrade or replace a DFS Replication member, see this blog post on the Ask the Directory Services Team blog: Replacing DFSR Member Hardware or OS.
Yes. Certain scenarios are supported when replicating roaming user profiles. For information about the supported scenarios, see Microsoft’s Support Statement Around Replicated User Profile Data ().
Windows and DFS Replication support folder paths with up to 32 thousand characters. DFS Replication is not limited to folder paths of 260 characters.
No. Replication groups can span across domains within a single forest but not across different forests.
The following list provides a set of scalability guidelines that have been tested by Microsoft on Windows Server 2008 R2 and Windows Server 2008:
For a list of scalability guidelines that have been tested by Microsoft for Windows Server 2003 R2, see DFS Replication scalability guidelines (). 2008 R2 or Windows Server 2008.
DFS Replication uses new objects in the domain-naming context of Active Directory Domain Services to store configuration information. These objects are created when you update the Active Directory Domain Services schema. For more information, see Review Requirements for DFS Replication ().
Yes. There are three ways to automate health reports:
Yes. For more information, see the DFS Replication Management Pack for System Center Operations Manager 2007 in the Microsoft Download Center ().
Yes. DFS Replication supports remote management using the DFS Management console and the Add Replication Group command. For example, on server A, you can connect to a replication group defined in the forest with servers A and B as members.
DFS Management is included withWindows Server 2008 R2, Windows Server 2008, and Windows Server 2003 R2. To manage DFS Replication from other versions of Windows, use Remote Desktop or the Remote Server Administration Tools for Windows 7.
No. DFS Replication has its own set of monitoring and diagnostics tools. Ultrasound and Sonar are only capable of monitoring FRS.
To recover lost files, restore the files from the file system folder or shared folder using the Restore previous versions command in Windows Explorer or by restoring the files from backup. To recover files directly from the ConflictAndDeleted or PreExisting folder, use the RestoreDFSR sample script from the MSDN Code Gallery. This script is intended only for disaster recovery and is provided AS-IS, without warranty.
Yes. There are a number of ways to monitor replication:
Although DFS Replication will work at dial-up speeds, it can get backlogged if there are large numbers of changes to replicate. If small changes are made to existing files, DFS Replication with Remote Differential Compression (RDC) will provide a much higher performance than copying the file directly.
No. DFS Replication does not perform bandwidth sensing. You can configure DFS Replication to use a limited amount of bandwidth on a per-connection basis (bandwidth throttling). However, DFS Replication does not further reduce bandwidth utilization if the network interface becomes saturated, and DFS Replication can saturate the link for short periods. Bandwidth throttling with DFS Replication is not completely accurate because DFS Replication throttles bandwidth by throttling RPC calls. As a result, various buffers in lower levels of the network stack (including RPC) may interfere, causing bursts of network traffic.
If you configure bandwidth throttling when specifying the schedule, all connections for that replication group will use that setting for bandwidth throttling. Bandwidth throttling can be also set as a connection-level setting using DFS Management.
No. DFS Replication uses the topology defined by the administrator, which is independent of Active Directory Domain Services site costing.
To learn about different methods of tuning replication performance, see Tuning Replication Performance in DFSR on the Ask the Directory Services Team blog.
In DFS Replication you set the maximum bandwidth you want to use on a connection, and the service maintains that level of network usage. This is different from the Background Intelligent Transfer Service (BITS), and DFS Replication does not saturate the connection if you set it appropriately.
Nonetheless, the bandwidth throttling is not 100% accurate and DFS Replication can saturate the link for short periods of time. This is because DFS Replication throttles bandwidth by throttling RPC calls. Because this process relies on various buffers in lower levels of the network stack, including RPC, the replication traffic tends to travel in bursts which may at times saturate the network links.
DFS Replication in Windows Server 2008 includes several performance enhancements, as discussed in the Distributed File System topic in Changes in Functionality from Windows Server 2003 with SP1 to Windows Server 2008.
DFS Replication is much faster than FRS, particularly when small changes are made to large files and RDC is enabled. For example, with RDC, a small change to a 2 MB PowerPoint® presentation can result in only 60 kilobytes (KB) being sent across the network—a 97 percent savings in bytes transferred.
RDC is not used on files smaller than 64 KB and might not be beneficial on high-speed LANs where network bandwidth is not contended. RDC can be disabled on a per-connection basis using DFS Management.
Data replicates according to the schedule you set. For example, you can set the schedule to 15-minute intervals, seven days a week. During these intervals, replication is enabled. Replication starts soon after a file change is detected (generally within seconds).
The replication group schedule may be set to Universal Time Coordinate (UTC) while the connection schedule is set to the local time of the receiving member. Take this into account when the replication group spans multiple time zones. Local time means the time of the member hosting the inbound connection. The displayed schedule of the inbound connection and the corresponding outbound connection reflect time zone differences when the schedule is set to local time.
The disk, memory, and CPU resources used by DFS Replication depend on a number of factors, including the number and size of the files, rate of change, number of replication group members, and number of replicated folders. In addition, some resources are harder to estimate. For example, the Extensible Storage Engine (ESE) technology used for the DFS Replication database can consume a large percentage of available memory, which it releases on demand. Applications other than DFS Replication can be hosted on the same server depending on the server configuration. However, when hosting multiple applications or server roles on a single server, it is important that you test this configuration before implementing it in a production environment.
If the connection goes down, DFS Replication will keep trying to replicate while the schedule is open. There will also be connectivity errors noted in the DFS Replication event log that can be harvested using MOM (proactively through alerts) and the DFS Replication Health Report (reactively, such as when an administrator runs it).
Yes. Changed portions of files are compressed before being sent for all file types except the following (which are already compressed): .wma, .wmv, .zip, .jpg, .mpg, .mpeg, .m1v, .mp2, .mp3, .mpa, .cab, .wav, .snd, .au, .asf, .wm, .avi, .z, .gz, .tgz, and .frx. Compression settings for these file types are not configurable in Windows Server 2003 R2.
Yes. You can turn off RDC through the property page of a given connection. Disabling RDC can reduce CPU utilization and replication latency on fast local area network (LAN) links that have no bandwidth constraints or for replication groups that consist primarily of files smaller than 64 KB. If you choose to disable RDC on a connection, test the replication efficiency before and after the change to verify that you have improved replication performance.
You can change the RDC size threshold by using the Dfsradmin Connection Set command, the DFS Replication WMI Provider, or by manually editing the configuration XML file.
Yes. RDC computes differences at the block level irrespective of file data type. However, RDC works more efficiently on certain file types such as Word docs, PST files, and VHD images.
DFS Replication uses RDC, which computes the blocks in the file that have changed and sends only those blocks over the network. DFS Replication does not need to know anything about the contents of the file—only which blocks have changed.
The Standard Editions of Windows Server do not support cross-file RDC. However, it is automatically enabled when you upgrade to an edition that supports cross-file RDC, or if a member of the replication connection is running a supported edition. For a list of editions that support cross-file RDC, see Which editions of the Windows operating system support cross-file RDC?
No. RDC is a general purpose protocol for compressing file transfer. DFS Replication uses RDC on blocks at the file level, not at the disk block level. RDC divides a file into blocks. For each block in a file, it calculates a signature, which is a small number of bytes that can represent the larger block. The set of signatures is transferred from server to client. The client compares the server signatures to its own. The client then requests the server send only the data for signatures that are not already on the client.
DFS Replication renames the file on all other members of the replication group during the next replication. Files are tracked using a unique ID, so renaming a file and moving the file within the replica has no effect on the ability of DFS Replication to replicate a file.
Cross-file RDC allows DFS Replication to use RDC even when a file with the same name does not exist at the client end. Cross-file RDC uses a heuristic to determine files that are similar to the file that needs to be replicated, and uses blocks of the similar files that are identical to the replicating file to minimize the amount of data transferred over the WAN. Cross-file RDC can use blocks of up to five similar files in this process.
To use cross-file RDC, one member of the replication connection must be running an edition of Windows that supports cross-file RDC. For a list of editions that support cross-file RDC, see Which editions of the Windows operating system support cross-file RDC?
Remote differential compression (RDC) is a client-server protocol that can be used to efficiently update files over a limited-bandwidth network. RDC detects insertions, removals, and rearrangements of data in files, enabling DFS Replication to replicate only the changes when files are updated. RDC is used only for files that are 64 KB or larger by default. RDC can use an older version of a file with the same name in the replicated folder or in the DfsrPrivate\ConflictandDeleted folder (located under the local path of the replicated folder).
RDC is used when the file exceeds a minimum size threshold. This size threshold is 64 KB by default. After a file exceeding that threshold has been replicated, updated versions of the file always use RDC, unless a large portion of the file is changed or RDC is disabled.
To use cross-file RDC, one member of the replication connection must be running an edition of the Windows operating system that supports cross-file RDC. The following table shows which editions of the Windows operating system support cross-file RDC.
Windows Server 2008 R2
No
Yes
Windows Server 2008
Windows Server 2003 R2
No. If you need to change the path of a replicated folder, you must delete it in DFS Management and add it back as a new replicated folder. DFS Replication then uses Remote Differential Compression (RDC) to perform a synchronization that determines whether the data is the same on the sending and receiving members. It does not replicate all the data in the folder again.
No, you cannot configure which file attributes that DFS Replication replicates.
For a list of attribute values and their descriptions, see File Attributes on MSDN ().
The following attribute values are set by using the SetFileAttributes dwFileAttributes function, and they are replicated by DFS Replication. Changes to these attribute values trigger replication of the attributes. The contents of the file are not replicated unless the contents change as well. For more information, see SetFileAttributes Function in the MSDN library ().
SetFileAttributes dwFileAttributes
The following attribute values are replicated by DFS Replication, but they do not trigger replication.
The following file attribute values also trigger replication, although they cannot be set by using the SetFileAttributes function (use the GetFileAttributes function to view the attribute values).
SetFileAttributes
GetFileAttributes
DFS Replication does not replicate the FILE_ATTRIBUTE_TEMPORARY value.
Yes. You can choose a topology when you create a replication group. Or you can select No topology and manually configure connections after the replication group has been created.
Yes. DFS Replication supports copying files to a replication group member before the initial replication. This "prestaging" can dramatically reduce the amount of data replicated during the initial replication.
The initial replication does not need to replicate contents when files differ only by real attributes or time stamps. A real attribute is an attribute that can be set by the Win32 function SetFileAttributes. For more information, see SetFileAttributes Function in the MSDN library (). If two files differ by other attributes, such as compression, then the contents of the file are replicated.
To prestage a replication group member, copy the files to the appropriate folder on the destination server(s), create the replication group, and then choose a primary member. Choose the member that has the most up-to-date files that you want to replicate because the primary member's content is considered "authoritative." This means that during initial replication, the primary member's files will always overwrite other versions of the files on other members of the replication group.
For more information about the initial replication, see Create a Replication Group.
Yes. DFS Replication overcomes three common FRS issues:
No. Files may be replicated out of order.
If an application opens a file and creates a file lock on it (preventing it from being used by other applications while it is open), DFS Replication will not replicate the file until it is closed. If the application opens the file with read-share access, the file can still be replicated.
DFS Replication replicates NTFS file permissions and alternate data streams. Do not replicate reparse points, NTFS hard links to files or files that have hard links to them – doing so can cause replication issues with the affected files. For more information about NTFS, see the NTFS Technical Reference.
No, DFS Replication does not replicate files for which the only change is a change to the timestamp. Additionally, the changed timestamp is not replicated to other members of the replication group unless other changes are made to the file.
Yes. DFS Replication replicates permission changes for files and folders. Only the part of the file associated with the Access Control List (ACL) is replicated, although DFS Replication must still read the entire file into the staging area.
DFS Replication does not merge files when there is a conflict. However, it does attempt to preserve the older version of the file in the hidden DfsrPrivate\ConflictandDeleted folder on the computer where the conflict was detected.
Yes. DFS Replication uses Remote Procedure Call (RPC) connections with encryption.
No. The DFS Replication service uses remote procedure calls (RPC) over TCP to replicate data. To secure data transfers across the Internet, the DFS Replication service is designed to always use the authentication-level constant, RPC_C_AUTHN_LEVEL_PKT_PRIVACY. This ensures that the RPC communication across the Internet is always encrypted. Therefore, it is not possible to disable the use of encrypted RPC by the DFS Replication service.
RPC_C_AUTHN_LEVEL_PKT_PRIVACY
For more information, see the following Microsoft Web sites:
There is one update manager per replicated folder. Update managers work independently of one another.
By default, a maximum of 16 (four in Windows Server 2003 R2) concurrent downloads are shared among all connections and replication groups. Because connections and replication group updates are not serialized, there is no specific order in which updates are received. If two schedules are opened, updates are generally received and installed from both connections at the same time.
In.
No. If the schedule is open, DFS Replication will replicate changes as it notices them. There is no way to configure a quiet time for files.
Yes. If you are using Windows Server 2008 R2, you can create a read-only replicated folder that replicates content through a one-way connection. For more information, see Make a Replicated Folder Read-Only on a Particular Member ().
We do not support creating a one-way replication connection with DFS Replication in Windows Server 2008 or Windows Server 2003 R2. Doing so can cause numerous problems including health-check topology errors, staging issues, and problems with the DFS Replication database.
If you are using Windows Server 2008 or Windows Server 2003 R2, you can simulate a one-way connection by performing the following actions:
No. If DFS Replication considers the files identical, it will not replicate them. If changed files have not been replicated, DFS Replication will automatically replicate them when configured to do so. To overwrite the configured schedule, use the WMI method ForceReplicate(). However, this is only a schedule override, and it does not force replication of unchanged or identical files..
If the initial replication fails or the DFS Replication service restarts during the replication, the primary member sees the primary member designation in the local DFS Replication database and retries the initial replication. If the primary member's DFS Replication database is lost after clearing the primary designation in Active Directory Domain Services, but before all members of the replication group complete the initial replication, all members of the replication group fail to replicate the folder because no server is designated as the primary member. If this happens, use the Dfsradmin membership /set /isprimary:true command on the primary member server to restore the primary member designation manually.
For more information about initial replication, see Create a Replication Group.
If remote differential compression (RDC) is enabled on the connection, inbound replication of a file larger than 64 KB that began replicating immediately prior to the schedule closing (or changing to No bandwidth) continues when the schedule opens (or changes to something other than No bandwidth). The replication continues from the state it was in when replication stopped.
If RDC is turned off, DFS Replication completely restarts the file transfer. This can delay when the file is available on the receiving member.:
No. DFS Replication opens files in a way that does not block users or applications from opening files in the replication folder. This method is known as "opportunistic locking."
Yes. The staging folder location is configured on the Advanced tab of the Properties dialog box for each member of a replication group.
Files are staged on the sending member when the receiving member requests the file (unless the file is 64 KB or smaller) as shown in the following table. If Remote Differential Compression (RDC) is disabled on the connection, the file is staged unless it is 256 KB or smaller. Files are also staged on the receiving member as they are transferred if they are less than 64 KB in size, although you can configure this setting between 16 KB and 1 MB. If the schedule is closed, files are not staged.
Sending member
64 KB
256 KB
Receiving member
64 KB by default
If any part of the file is already being transmitted, DFS Replication continues the transmission. If the file is changed before DFS Replication begins transmitting the file, then the newer version of the file is sent.
April 25, 2012
Edited the Does DFS Replication replicate NTFS file permissions, alternate data streams, hard links, and reparse points? entry to clarify how DFS Replication handles hard links.
Reduce potential confusion
March 30, 2011
Edited the Can DFS Replication replicate Outlook .pst or Microsoft Office Access database files? entry to correct the potential impact of using DFS Replication with .pst and Access files.
Added How can I improve replication performance?
Customer questions about the previous entry, which incorrectly indicated that replicating .pst or Access files could corrupt the DFS Replication database.
January 26, 2011
Added How can files be recovered from the ConflictAndDeleted or PreExisting folders?
Customer feedback
October 20, 2010
Added How can I upgrade or replace a DFS Replication member? | http://technet.microsoft.com/en-us/library/cc773238(WS.10).aspx | crawl-003 | en | refinedweb |
#include </home/clem/local/src/opie/inputmethods/unikeyboard/unikeyboardimpl.h>
Inheritance diagram for UniKeyboardImpl:
Definition at line 45 of file unikeyboardimpl.cpp.
[virtual]
Definition at line 50 of file unikeyboardimpl.cpp.
References icn, and input.
The icon of your Input method.
Return a pointer to a QPixmap symboling your inputmethod You need to delete the pixmap later yourself.
Implements InputMethodInterface.
Definition at line 69 of file unikeyboardimpl.cpp.
References icn, and uni_xpm.
create a new widget which should be used as input
This method will be called if the inputmethod is to be shown. Make sure that your widget is not too large. As of Opie1.1 InputMethods can be floating as well.
Delete the Widget yourself.
Definition at line 56 of file unikeyboardimpl.cpp.
References input.
Definition at line 76 of file unikeyboardimpl.cpp.
References qApp.
pass your key event through
In your actual Input Implementation you'll need a SIGNAL with this void key(ushort,ushort,ushort,bool,bool) signal. The host of your input method requests you to connect your signal with the signal out of receiver and slot.
ushort == unicode value ushort == keycode ushort == modifiers from Qt::ButtonState bool == true if the key is pressed and false if released bool == autorepeat on or off.
See the QWSServer for more information about emitting keys
Definition at line 81 of file unikeyboardimpl.cpp.
Implements QUnknownInterface.
Definition at line 87 of file unikeyboardimpl.cpp.
References IID_InputMethod, IID_QUnknown, QS_FALSE, and QS_OK.
Reset the state of the inputmethod.
If you're shown reset the state of the keyboard to the the default.
Definition at line 63 of file unikeyboardimpl.cpp.
References input, and UniKeyboard::resetState().
[private]
Definition at line 45 of file unikeyboardimpl.h.
Referenced by icon(), and ~UniKeyboardImpl().
Definition at line 44 of file unikeyboardimpl.h.
Referenced by inputMethod(), onKeyPress(), resetState(), and ~UniKeyboardImpl(). | http://people.via.ecp.fr/~clem/nist/doxydoc/allOpie/classUniKeyboardImpl.html | crawl-003 | en | refinedweb |
#include <controlplane/MapHandlerInterface.hpp>
Definition at line 39 of file MapHandlerInterface.hpp.
Definition at line 43 of file MapHandlerInterface.hpp.
When the parameter is false, it means that the mapHandler has received a map but no resources were assigned to this terminal, true means that a map was received which DID contain resource allocation info for this terminal
Implemented in lte::controlplane::RRHandlerUT. | http://docs.openwns.org/api/classlte_1_1controlplane_1_1ResourceGrantNotificationInterface.htm | crawl-003 | en | refinedweb |
Description
Goflow is a simply package to control goroutines execution order based on dependencies. It works similar to async.auto from node.js async package, but for Go.
Goflow alternatives and similar packages
Based on the "Goroutines" category
ants9.1 8.3 Goflow VS ants🐜⚡️A high-performance goroutine pool in Go, inspired by fasthttp.
goworker8.8 0.1 Goflow VS goworkergoworker is a Go-based background worker
tunny8.0 0.6 Goflow VS tunnyA goroutine pool for golang.
grpool7.1 0.0 Goflow VS grpoolLightweight Goroutine pool.
pool6.9 0.0 Goflow VS poolGo consumer goroutine pool for easy goroutine handling + time saving.
gowp5.1 7.5 Goflow VS gowpgowp is concurrency limiting goroutine pool.
go-floc4.5 0.0 Goflow VS go-flocOrchestrate goroutines with ease.
semaphore go3.9 0.0 Goflow VS semaphore goFast resizable golang semaphore
workerpool3.6 4.4 Goflow VS workerpoolgoworker is a Go simple async worker pool.
GoSlaves3.4 1.5 Goflow VS GoSlavesSimple and Asynchronous Goroutine pool library.
gpool3.4 4.8 Goflow VS gpoolmanages a resizeable pool of context-aware goroutines to bound concurrency.
go-do-work3.3 0.0 Goflow VS go-do-workDynamically resizable pools of goroutines which can queue an infinite number of jobs.
semaphore3.2 7.2 Goflow VS semaphoreSemaphore pattern implementation with timeout of lock/unlock operations based on channel and context.
async3.2 2.7 Goflow VS asyncA safe way to execute functions asynchronously, recovering them in case of panic.
breaker3.1 5.7 Goflow VS breakerFlexible mechanism to make execution flow interruptible.
threadpool2.7 0.3 Goflow VS threadpoolGolang threadpool implementation.
gollback2.3 4.6 Goflow VS gollbackasynchronous simple function utilities, for managing execution of closures and callbacks.
artifex2.3 3.4 Goflow VS artifexSimple in-memory job queue for Golang using worker-based dispatching.
Hunch1.9 5.8 Goflow VS HunchHunch provides functions like: All, First, Retry, Waterfall etc., that makes asynchronous flow control more intuitive.
parallel-fn1.8 0.0 Goflow VS parallel-fnRun functions in parallel.
gohive1.7 6.1 Goflow VS gohiveA highly performant and easy to use Goroutine pool for Go.
cyclicbarrier1.7 4.6 Goflow VS cyclicbarrierCyclicBarrier for golang.
Bifrost1.6 0.0 Goflow VS BifrostGolang query-able job queue
caster1.3 3.4 Goflow VS casterDead simple and performant message broadcaster (pubsub) for Go
go-trylock1.2 3.6 Goflow VS go-trylockTryLock support on read-write lock for Golang.
go-tools/multithreadingManage a pool of goroutines using this lightweight library with a simple API.
routine0.9 6.4 Goflow VS routinego routine control with context, support: Main, Go, Pool and some useful Executors.
conexec0.8 6.8 Goflow VS conexecA concurrent toolkit to help execute funcs concurrently in an efficient and safe way.It supports specifying the overall timeout to avoid blocking and uses goroutine pool to improve efficiency.
Syncs0.7 4.4 Goflow VS Syncsadditional synchronization primitives
WorkerGo0.6 0.4 Goflow VS WorkerGoA worker pool implementation for Go
go-waitgroup0.6 4.6 Goflow VS go-waitgroupLike sync.WaitGroup with error handling and concurrency control.
Flow0.6 4.3 Goflow VS FlowFBP / pipelines
sworker0.5 8.9 Goflow VS sworkerGo easy worker setup for your code
queue0.3 1.1 Goflow Goflow or a related project?
Popular Comparisons
README
Goflow
Goflow is a simply package to control goroutines execution order based on dependencies. It works similar to
async.auto from node.js async package, but for Go.
Install
Install the package with:
go get github.com/kamildrazkiewicz/go-flow
Import it with:
import "github.com/kamildrazkiewicz/go-flow"
and use
goflow as the package name inside the code.
Example
package main import ( "fmt" "github.com/kamildrazkiewicz/go-flow" "time" ) func main() { f1 := func(r map[string]interface{}) (interface{}, error) { fmt.Println("function1 started") time.Sleep(time.Millisecond * 1000) return 1, nil } f2 := func(r map[string]interface{}) (interface{}, error) { time.Sleep(time.Millisecond * 1000) fmt.Println("function2 started", r["f1"]) return "some results", nil } f3 := func(r map[string]interface{}) (interface{}, error) { fmt.Println("function3 started", r["f1"]) return nil, nil } f4 := func(r map[string]interface{}) (interface{}, error) { fmt.Println("function4 started", r) return nil, nil } res, err := goflow.New(). Add("f1", nil, f1). Add("f2", []string{"f1"}, f2). Add("f3", []string{"f1"}, f3). Add("f4", []string{"f2", "f3"}, f4). Do() fmt.Println(res, err) }
Output will be:
function1 started function3 started 1 function2 started 1 function4 started map[f2:some results f3:<nil>] map[f1:1 f2:some results f3:<nil> f4:<nil>] <nil>
*Note that all licence references and agreements mentioned in the Goflow README section above are relevant to that project's source code only. | https://go.libhunt.com/go-flow-alternatives | CC-MAIN-2020-05 | en | refinedweb |
I have a Kubernetes cluster which is running Django application within docker container served by uWSGI. The ingress controller is ingress-nginx (this one:).
Recently I did an upgrade of the whole cluster from 1.9 to 1.11, and due to some issues I had to run
kubeadm reset and
kubeadm init again.
Since then (I guess), sometimes I'm getting weird 502 errors that are reported by the users:
upstream prematurely closed connection while reading response header from upstream.
The biggest problem for me is that those requests are not visible in uWSGI logs within container so I have no idea what is happening.
Here is my uwsgi.ini file:
[uwsgi] http = 0.0.0.0:8000 # Django-related settings # the base directory (full path) chdir = /app # Django's wsgi file module = in_web_server.wsgi:application pythonpath = /app static-map = /static=/app/static # process-related settings # master master = true # maximum number of worker processes processes = 10 # clear environment on exit vacuum = true # spooler setup spooler = /spooler spooler-processes = 2 spooler-frequency = 10
Dockerfile CMD:
CMD ["/usr/local/bin/uwsgi", "--ini", "/app/in_web_server/docker/in/in_web_server_uwsgi.ini"]
Kubernetes Ingress:
apiVersion: extensions/v1beta1 kind: Ingress metadata: name: in-debug namespace: in-debug annotations: nginx.ingress.kubernetes.io/proxy-body-size: "0" nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" nginx.ingress.kubernetes.io/configuration-snippet: | if ($request_uri ~ "^[^?]*?//") { rewrite "^" $scheme://$host$uri permanent; } spec: rules: - host: test-in http: paths: - path: "/" backend: serviceName: in-debug servicePort: 8000
Those errors are only for larger (but not very large) PUT requests. By larger I mean ~300KB, so it is not a big deal.
Also, the 502 error is returned after around 1 minute, so there is possibly some timeout issue. However I'm not able to locate it since there is no trace within uwsgi log. Any hints what I'm doing wrong? | https://serverfault.com/questions/926642/uwsgi-and-nginx-502-upstream-prematurely-closed-connection | CC-MAIN-2020-05 | en | refinedweb |
Sandbox:TutorialArchBIM
- João Batista Vilanova Artigas
- Pictures by Pedro Kok
- Barão de Jaceguaí, 1151 - Campo Belo, São Paulo-SP (Google) With 30 images
- Completed Freecad model by Wilson, as above image
Goal of this document
Update original Arch Tutorial by Yorik van Havre .
- Reflect version updated versions of Freecad (Currently 0.17 / 0.18 )
- Implement a BIM workflow
Currently this document is WORK in Progress
Contributors
Conventions
Example Files
Reference Files used in this tutorial are named as:
at2_Name ──── │ ─── │ │ │ └── SomeMeaningfulName │ └── 4 Char prefix at2_ -> Arch Tutorial 2
Link to example files for this tutorial
Images
All Images not already on wiki are named and uploaded to File:at2_*
Markups
FIXME Comment
- When something needs a closer look, rewrite or other..
Tip
Delete ?
- Something You think should be deleted
This way it is easy to do a quick text search to find topics of concern
Introduction
This tutorial aims at giving you the basics to work with the Arch Workbench. I will try to make it simple enough so you don't need any previous experience with FreeCAD, but having some experience with 3D or BIM applications will be useful. In any case, you should be prepared to look for yourself for further information about how FreeCAD works on the FreeCAD documentation wiki. The Getting started page is a must read, if you have no previous experience with FreeCAD. Also check our tutorials section, and on youtube you will also find a lot more of FreeCAD tutorials.
The purpose of the Arch Workbench is to offer a complete BIM workflow inside FreeCAD. As it is still under development, don't expect to find here the same tools and level of completion as grown-up commercial alternatives such as Revit or ArchiCAD, but on the other hand, FreeCAD being used in a much bigger scope than these applications, the Arch Workbench greatly benefits from the other disciplines FreeCAD caters to, and offers some features rarely seen in traditional BIM applications.
Here are, for example, a couple of interesting features of FreeCAD's Arch Workbench that you'll hardly find in other BIM apps:
FIXME The next sentence, is that strictly true? Architectural objects are always solids. From FreeCAD's strong mechanical background, we learned the importance of always working with solid objects. This ensures a much more error-free workflow, and very reliable boolean operations. Since cutting through 3D objects with a 2D plane, in order to extract sections, is also a boolean operation, you can immediately see the importance of this point.
- Architectural objects can always have any shape. No restrictions. Walls don't need to be vertical, slabs don't need to look like slabs. Any solid object can always become any architectural object. Very complex things, usually hard to define in other BIM applications, like a floor slab curving up and becoming a wall (yes Zaha Hadid, it's you we're talking about), present no particular problem at all in FreeCAD.
- The whole power of FreeCAD is at your fingertips. You can design architectural objects with any other tool of FreeCAD, such as the PartDesign Workbench, and when they are ready, convert them to architectural objects. They will still retain their full modeling history, and continue being totally editable. The Arch Workbench also inherits much of the Draft Workbench functionality, such as snapping and working planes.
- The Arch Workbench is very mesh-friendly. You can easily design an architectural model in a mesh-based application such as Blender or SketchUp and import it in FreeCAD. If you took care of the quality of your model and its objects are manifold solid shapes, turning them into architectural objects only requires the press of a button.
At the time of writing, the Arch Workbench, as the rest of FreeCAD, suffers some limitations. Most are being worked on, and will disappear in the future.
- FreeCAD is no 2D application. It is made for 3D. There is a reasonable set of tools for drawing and editing 2D objects with the Draft Workbench and Sketcher Workbench, but it is not made for handling very large (and sometimes badly drawn) 2D CAD files. You can usually successfully import 2D files, but don't expect very high performance if you want to keep working on them in 2D. You have been warned.
- No materials support. FreeCAD will have a complete Material system, able to define very complex materials, with all the goodies you can expect (custom properties, material families, rendering and visual aspect properties, etc), and the Arch Workbench will of course use it when it is ready.
- Very preliminary IFC support. You can already import IFC files, quite reliably, provided IfcOpenShell is installed on your system, but exporting is still not officially supported. This is worked on both by the FreeCAD and IfcOpenShell developers, and in the future we can expect full-powered IFC support.
- Most Arch tools are still in development. That means that automatic "wizard" tools that create complex geometry automatically, such as Arch Roof or Arch Stairs can only produce certain types of objects, and other tools that have presets, such as Arch Structure or Arch Window only have a couple of basic presets. This will of course grow over time.
- Relations between objects in FreeCAD are still not officially available. These, for example the relation between a window and its host wall, are currently implemented in the Arch Workbench with temporary (and therefore somewhat limited) methods. Many new possibilities will arise when this feature will be fully available.
- Units are being implemented in FreeCAD, which will allow you to work with any unit you wish (even imperial units, you guys from the USA can be eternally grateful for this to Jürgen, FreeCAD's godfather and dictator). But at the moment the implementation is not complete, and the Arch workbench still doesn't support them. You must consider it "unit-less". This tutorial uses millimeters as units.
Typical workflows
In this tutorial we focus on a BIM oriented approach of using FreeCad. We will use mostly three workbenches: Arch Workbench and BIM, of course, but also Draft, whose tools are all included in Arch, so there is no need to switch workbenches, and Sketcher. Conveniently, can create a custom toolbar in your Arch workbench, with Tools → Customize, and add the tools from the sketcher that you use often.
Preparation
Instead of creating a project from scratch, let's take an example project to model, it will save us time. We'll use this wonderful house by the famous architect Vilanova Artigas (see a series of pictures by Pedro Kok), as used in the original FreeCAD Arch Tutorial made by Yorik. It is simple, it's a wonderful example of the amazing modernist architecture of São Paulo and the drawings are easily available. You can download drawings in dwg format here. To download the file, you'll need to make a free registration on the website. In alternative, you can grab directly a DXF version here) as a base to build our model. We recommend you to use DXF files instead of DWG, because FreeCAD handle those a lot better. Either way, is your decision.
After downloading and unzipping the file, you'll want to open it with a DWG application such as DraftSight. Alternatively, you can convert it to DXF with a free utility such as the Teigha File Converter. If you have the Teigha converter installed (and its path set in the Arch Preferences settings), FreeCAD is also able to import DWG files directly. But since these files can sometimes be of bad quality and very heavy, it's usually better to open it first with a 2D CAD application and do some cleaning. You should remove all the unnecessary information (title-blocks, page layouts, unused entities, layers, etc.) and organize the drawings in a logical way (sections and elevations aligned with the plan view, and move everything to the (0,0) point). After, you should organize your drawing it in different layers. This will be handy later on if you need to temporarily hide some of its elements to make it easy to model. This is the result when you import to FreeCAD after organizing the DXF in different layers:
Before importing your file, you want to make sure that you have the "Group layers into blocks" option selected. That way, each layer will be grouped as one object, making it easier to work within FreeCAD. To enable that option, you go to Edit > Preferences > Import-Export.
Sometimes when importing DXF files into FreeCAD, the drawing may be out of scale. If that happens, open the DXF on a program such as Draftsight, create a new file and copy/paste all objects. After, just save it as a new DXF file, give it a new name and import it again into FreeCAD.
You could also organize your layers accordingly to the different elements that make up the project. By that I mean you could make a layer for the plan view, another for the south elevation, north elevation, and so on. Feel free to try out and find the way it suits you best or follow the suggestions above if you prefer.
After that, our file can be opened quite efficiently in FreeCAD. Check the different options available in Edit → Preferences →
This is how the file looks after being opened in FreeCAD. In this example, thickness of walls were changed, and a couple of doors that were imported with wrong X scale were flipped, with the Draft Scale tool.
Preparing dwg / dxf Alternative text
For editing and exporting to dxf there are various free tools available. Like said before, one of free tools out there that works fine is [DraftSight by Dassault].
Sometimes, the files you'll use in your daily work can be in different units, since you'll find people with different work methods. If when imported your drawing is e.g. in millimeters and you work in meters, just scale by 1000 (it will scale correctly on all axis), either in FC or other system.
To model your project using plan views, sections and elevations, another method can be used: you can separate your project in several dxf files. This will give you the possibility to rotate the drawings in FreeCAD and position them where you want, independent from one another, as well as to hide part of them while keeping others, if necessary. For that, you'll need to create a .dxf file with the ground floor level, another with the level 1 (in the Artigas house, this corresponds to the studio), the north elevation, south elevation, section AA', BB', and so on. I would recommend you do this after the cleaning/organization process described before, to save you time and effort. Next, import all .dxf files to FreeCAD.
NOTE: Notice that by importing different .dxf drawings to one file, you'll be loading them as separate elements. In some computers, you might experience a slightly lower performance than if you would by importing just one .dxf file with all drawings. However, this option allows you to rotate and move these drawings independently from one another, to hide one elevation while keeping another, and so on. Besides, you can always hide all the imported elements and only keep the drawing you need for a particular operation, which will improve significantly your computer performance, if you have a problem with it. Experiment, give it a try and choose the work method that suits you better.
Tip
You may also want to try to import or save the various views into separate FCStd files. This keeps the files smaller and quicker to work with.
Naming of files is Your choice, but it is a good idea to use a naming convention.
Example files produced at various levels of this tutorial will be placed on GitHub FreeCad Examples at2_Examples
For dxf files, they are placed in a directory named ./ref/dxf below the project directory. If You want to skip this step, the imported dxf files can be found here.
Plan View
Start with importing and placing the Plan View.
If you don't have the option "Group layers into blocks" selected, as suggested before, when importing your DXF file your geometry will show up as several edges. This can make FreeCAD run slower. However, depending on what you want to do, you may want to have your object divided in edges instead of grouped into blocks. Either way, make a good habit of organizing your file by compiling these edges into a Group. The Group can be created before or after importing. Once you have imported your .dxf file into FreeCAD, just select all the imported edges and ‘drag/drop’ them into the Group.
Now, do the same for all the other views. Next in this document, we will place the various views at their location, elevation and rotation, according to our ArchAxisSystem. Before Rotating and placing the various views, we need to do some planning.
FreeCad dxf import treats everything as Edges or Shapes, This is generally ok for lines. Bad for circles. No easy way to find Center.
Planning
There are no set rules for how to organize Your work. Having said that, planning always pays off. The following list contains some points to get You started.
- Define a project origin
- Define an Arch Axis System
- Make appropriate as needed workplanes
- Name everything something logical
- Work with partial files
- Name Your various files logically
- Define a naming convention for files, or You may soon get lost
Most of the guidelines or rules proposed here, are common to any CAD system.
As a minimum
A defined project zero / origin – with local x,y,z coordinates 0,0,0 shall be defined and used throughout the project.
For further planning of File structure jump to the IFC section of this document
In this project we will follow Axis system of downloaded original Drawings.
Defining the project origin at intersection of Axis 01 & D. By our convention this equals SouthWest corner of model. Observe that the axis pass through the center of walls.
When modeling any Architectural model, You will most certainly want to split into separate files. By the way, partial IFC files seem to be the trend at the moment. Mainly split by discipline. The split can be by discipline or other. It is good practice to have a common origin and orientation across these models (files). This makes it easy to copy paste groups between files as needed. It also provides a good basis for several people to work on the project as needed.
For reference we have made the assumption that global Y-axis equals North.
Defining the Arch Axis System
We now want to make an ArchAxisSystem for reference when modeling our building. The result will look something like this:
To find the data for making the ArchAxisSystem study the Plan View of the imported dwg. This will show You Axis and Dimensions.
Alternatively measure between the various axis in Freecad. This can be done in several ways, using the part workbench Measure linear, Tape Measure works fine for this.
By Studying original dxf files.
When measuring distance between axis 10 and 11, we find Delta X = 3.6246 Index 11 above, has been adjusted since if possible, we like to work with ‘round’ figures.
We also observe that the Eastern Columns are tangent to East wall of Studio. This is not good practice.
Will reduce the distance between axis 10 and 11. Will try with 3550mm.
Arch axis X
Now, let’s make the Axis along global X: The Freecad Command is Arch Axis
Image shows Data and labels Used.
Arch Y-Axis
Image shows Data and labels Used.
Observe the 270deg rotation and offset of placement to get labels to get desired layout.
Combining to Axis System
Arch AxisSystem is used to combine the x and y Arch Axis into an Arch Axis system.
If You save Your AxisSystem to a file, without any other geometry, it does not seem to open as the first file. FreeCad simply Crashes. However, not such a big deal, because if You open another file containing geometry first, then You are able to open the file containing only the AxisSystem without any problem. Strange??
Axis System Forum posts
Placing and rotating 2d Views
In order to place 2d views in 3d, we need to prepare some helper objects. In FreeCad we have several ways we can set-up, store and name Working Planes . We can name these and store them by using a WorkingPlaneProxy object.
You should end up with something looking like this
By placing and rotating the imported 2d view, You will have a good way of checking their consistency.
Adding reference planes
After starting to look at #WokFeature_Approach. Think this is a great way of implementing working planes.
Modeling
Walls
Walls can be:
- Inner / Outer, Structural / Non Structural
- Walls should contain openings for doors, windows, or other
Like most Arch objects, walls can be built upon a big variety of other objects: lines, wires (polylines), sketches, faces or solid (or even on nothing at all, in which case they are defined by height, width and length). The resulting geometry of the wall depends on that base geometry, and the properties you fill in, such as width and height. As you might guess, a wall based on a line will use that line as its alignment line, while a wall based on a face will use that face as its base footprint, and a wall based on a solid will simply adopt the shape of that solid. This allows about any shape imaginable to become a wall.
There are different possible strategies to build walls in FreeCAD. One might want to build a complete "floor plan" with the sketcher, and build one, big, wall object from it. This technique works, but you can only give one thickness for all the walls of the project. Or, you can build each piece of wall from separate line segments.
Delete ?
Or, this is what we will do here, a mix of both: We will build a couple of wires on top of the imported plan, one for each type of wall:
Have found that editing a wire is currently more cumbersome than editing a line
The RED lines that will become concrete walls (a pictures search of the house can help you to see the different wall types), the GREEN ones are the exterior brick walls, and the BLUE ones will become the inner walls. Lines are passed through the doors, because doors will be inserted in the walls later, and will create their openings automatically. Walls can also be aligned left, right or centrally on their baseline, so it doesn't matter which side you draw the baseline. Take care on avoiding intersections as much as You can. Our model will be cleaner that way. This will save us some headache later, for example if we export our work to other applications, that might not like it.
When this is done, place all those lines in a new group if you want, select each line one by one, and press the Arch Wall tool to build a wall from each of them. You can also select several lines at once. After doing that, and correcting widths (exterior walls are 25cm wide, inner walls are 15cm wide) and some alignments, we have our walls ready:
You should now have a model resembling something like this.
Grouping
Grouping of Your various objects can come in handy at a later stage. How to Group Your model is Your choice.
Here is an example:
Note, Baselines for creating walls have also been grouped
Walls have been grouped like:
- Walls
- WallsExternal
- WallsInternal
Have found the KISS principle (Keep It Simple & Stupid) is a good approach.
- Using lines as a base for walls works fine.
- They are easy to move and change.
- When editing the line defining a wall, the wall will update
- At a later stage You can always join them as needed.
Saving Your walls to a new file at this stage can be a good idea.
One way of doing this is creating a new file.
- Activate Your file containing Walls You have just modelles
- Mark the groups You want in Your 'wallModelFile'
- Choose Edit->Copy
- Activate Your new file
- Choose Edit->Paste, or Ctrl+v
- Save Your new file to something meaningful for Your workflow.
- Suggestion At2_Walls_Initial
With this work flow:
- Pros
- You will be able to go back to Your starting point if anything goes wrong
- You will be building a model consisting of several partial models
- This is a good way of keeping file size down. You can work on one particual 'sub model' without caring about the overhead of the total model.
- Cons
- You will generate a lot of files
- Be particular how You name Your various files, or get lost.
So, how to organize? Believe the main differing factor is Structural / Non Structural Next Level Inner / Outer
Curtain Walls are always Non Structural
Joining Wall segments
All Arch objects have a great feature: you can add one to another. Doing that will unite their geometries, but they are still editable independently after. To add one of our crossing walls to the other, just select one, CTRL + select the other, and press the Arch Add tool:
On the left are the two intersecting walls, on the right the result after adding one to the other.
Something is important to consider already. As you can see, in FreeCAD, everything is parametric: Our new "united" wall is made from two walls, each based on a baseline. When you expand them in the tree view, you can see all that chain of dependencies. As you can imagine, this little game can quickly become very complex. Furthermore, if you already know how to work with the sketcher, you might have wanted to draw the baselines with constrained sketches. This whole complexity has a cost: it raises exponentially the number of calculations that FreeCAD has to perform to keep your model geometry up to date. So, think about it, don't add unnecessary complexity when you don't need it. Keep a good balance between simple and complex objects, and keep these for the cases where you really need them.
For example, I could have drawn all my baselines above without caring about what crosses what, and fix things with the Arch Add tool later. But I would have raised much the complexity of my model, for no gain at all. Better make them correct right from the start, and keeping them as very simple pieces of geometry.
Now that our walls are okay, we need to raise their height, until they intersect the roof. Then, since the wall object still cannot be cut automatically by roofs (this will happen some day, though), we will build a "dummy" object, that follows the shape of the roof, to be subtracted from our walls.
First, by looking at our 2D drawings, we can see that the highest point of the roof is 5.6m above the ground. So let's give all our walls a height of 6m, so we make sure they will be cut by our dummy roof volume. Why 6m and not 5.6m? You may ask. Well, if you already worked with boolean operations (additions, subtractions, intersections), you must already know that these operations usually don't like much "face-on-face" situations. They prefer clearly, frankly intersecting objects. So by doing this, we keep on the safe side.
To raise the height of our walls, simply select all of them (don't forget the one we added to the other) in the tree view, and change the value of their "height" property.
Studio Elevation
Before making our roof and cutting the walls, let's make the remaining objects that will need to be cut: The walls of the above studio, and the columns.
We will now make a Workplane and a workplaneProxy object at the studio elevation.
Before establishing the elevation, take a look at the base 2d drawings. Something is wrong in paradise.
We will set top of Studio floor (Slab) to 2425,0 mm
This can be done in many ways. Probably the easiest is to draw the baseline for studio wall on top of the Plan View, and moving it up 2425mm.
The walls of the studio are made the same way as we did, on the superior floor plan, but they will be raised up to level 2.6m. So we will give them the needed height so their top is at 6m too, that is, 3.4m. Once this is done, let's move our walls up by 2.6m: Select them both, put yourself in frontal view (View → Standard Views → Front), press the Draft Move button, select a first point, then enter 0, 2.6, 0 as coordinates, and press enter. Your objects now have jumped 2.6m high:
The Draft objects, and most Arch objects too, obey to a Draft system called working planes. This system defines a 2D plane where next operations will take place. If you don't specify any, that working plane adapts itself to the current view. This is why we switched to frontal view, and you see that we indicated a movement in X of 0 and in Y of 2.6. We could also have forced the working plane to stay on the ground, by using the Draft SelectPlane tool. Then, we would have entered a movement of X of 0, Y of 0 and Z of 2.6.
Alternative Approach
Now let's move our walls horizontally, to their correct location. Since we have points to snap to, this is easier: Select both walls, press the Draft Move tool, and move them from one point to the other:
Finally, I changed the color of some walls to a brick-like color (so it's easier to differentiate), and made a small correction: Some walls don't go up to the roof, but stop at a height of 2.60m. I corrected the height of those walls.
Subtractions
We will show two different approaches to creating the Subtraction Volume, one drawing on 3d SouthEleveation, second drawing on plan View, rotating and moving.
Approach one
In this Approach we will draw and extrude with correct 3d location
- Set Your WorkingPlane to Front
- Draw lines following the lower edge of roof
- Use DraftTrimex to extend and join lines so they form a closed loop
- Make sure the cutting volume we want to produce extends the bounds of what we want to cut
- Convert lines to closed dwire
- Extrude to a dimension larger than total width of elements we want to cut
- If needed, set workplane to top view, move to top view and move extrusion so it covers the with of the building
Approach Two
Now it is time to build our subtraction volume. The easiest way will be to draw its profile on top of the section view. Then, we will rotate it and place it at its correct position. See why I placed the sections and elevations like that before beginning? It will be very handy for drawing stuff there, then moving it to its correct position on the model.
Let's draw a volume, bigger than the roof, that will be subtracted from our walls. To do that, I drew two lines on top of the base of the roof, then extended them a bit further with the Draft Trimex tool. Then, I drew a wire, snapping on these lines, and going well above our 6 meters. I also drew a blue line on the ground level (0.00), that will be our rotation axis.
Now is the tricky part: We will use the Draft Rotate tool to rotate our profile 90 degrees up, in the right position to be extruded. To do that, we must first change the working plane to the YZ plane. Once this is done, the rotation will happen in that plane. But if we do like we did a bit earlier, and set our view to side view, it will be hard to see and select our profile, and to know where is the basepoint around which it must rotate, right? Then we must set the working plane manually: Press the Draft SelectPlane button (it is in the "tasks" tab of the tree view), and set it to YZ (which is the "side" plane). Once you set the working plane manually, like that, it won't change depending on your view. You can now rotate your view until you have a good view of all the things you must select. To switch the working plane back to "automatic" mode later, press the Draft SelectPlane button again and set it to "None".
Now the rotation will be easy to do: Select the profile, press the Draft Rotate button, click on a point of the blue line, enter 0 as start angle, and 90 as rotation:
Now all we need to do it to move the profile a bit closer to the model (set the working plane to XY if needed), and extrude it. This can be done either with the Part Extrude tool, or Draft Trimex, which also has the special hidden power to extrude faces. Make sure your extrusion is larger than all the walls it will be subtracted from, to avoid face-on-face situations:
Common to both approaches
Now, here comes into action the contrary of the Arch Add tool: Arch Remove. As you might have guessed, it also makes an object a child of another, but its shape is subtracted from the host object, instead of being united. So now things are simple: Select the volume to subtract (I renamed it as "Roof volume to subtract" in the tree view so it is easy to spot), CTRL + select a wall, and press the Arch Remove button. You'll see that, after the subtraction happened, the volume to subtract disappeared from both the 3D view and the tree view. That is because it has been marked as child of the wall, and "swallowed" by that wall. Select the wall, expand it in the tree view, there is our volume.
Now, select the volume in the tree vieew, CTRL + select the next wall, press Arch Remove. Repeat for the next walls until you have everything properly cut:
Remember that for both Arch Add and Arch Remove, the order you select the objects is important. The host is always the last one, like in "Remove X from Y" or "Add X to Y"
Arch objects that support such additions and subtractions (all of them except the "visual" helper objects such as the axes) keep track of such objects by having two properties, respectively "Additions" and "Subtractions", that contain a list of links to other objects to be subtracted or added. A same object can be in the lists of several other objects, as it is the case of our subtraction volume here. Each of the fathers will want to swallow it in the tree view, though, so it will usually "live" in the last one. But you can always edit those lists for any object, by double-clicking it in the tree view, which in FreeCAD enters edit mode. Pressing the escape key exits edit mode.
Work flow note:
It is probably a good Idea to store Your RoofCutVolume in a separate file for later
Bathroom Geometry
Looking at bathroom geometry, something is not clear.
Floors
Generally defined as Slabs
To start with, Create a Group for Floors
- Groups are created by Right + Click -> Create Group
- Groups are created at the position of Your Cursor, meaning You may also create a Group as a subgroup.
- You may also move a goup to another group by Drag & Drop
- Groups are Renamed by hitting F2, or right click a group and select Rename, or Double Click
By setting our Group to FloorSlabs, we insure that what we create from now on will be located in this group. (if You forget this step, You can always Drag&Drop entities to this group later)
Modeling FloorSlabs
In practice the inner walls (non structural) will probably be placed above the FloorSlabs. For tutorial purposes, we will assume that all walls and columns penetrate the FloorSlabs
Next set the desired snap settings. Especially for new users, conflicting snap settings are a cause of frustration.
In image above, we have the following snap settings active:
- Lock
- EndPoint
- Perpendicular
- Intersection
- WorkingPlane
Also make sure WorkingPlane is set to Top.
Now, draw a closed loop to make FloorSlab. This can be done either with lines, or with Draft Dwire. This is Your choice.
Remember that single lines are easier to edit than a dWire, so in many cases it is more efficient to draw single lines, edit, join and add to them, before Joining them to create a dwire.
You Should now have something Like image above. Observe we have changed the Label to FloorSlab, and ifcRole to Slab (We don't want our floor to be exported as a Column)
Cutting FloorSlabs
FIXME Yorik, can You please confirm best practice. Cloning walls to be used for cutting objects does not work. Need to copy cutting objects before
Remove?
In order to Cut FloorSlab with Our walls, without walls disappearing, we need to first make a Copy of them.
Select the walls You want to cut the FloorSlab with , and Copy/Paste them.
We can see that Copied walls have been created in the FloorSlab Group
Now select the cutting objects, and the object to be cut (Parent) as the last one, and Press the
Remove button
Your result should now look something like this. Observe the cutting objects have been 'swallowed' by the FloorSlab object.
Next we need to do the same with the Columns. But first we have to model them.
Columns
If you have started with making the Arch Grid, tis is a piece of cake. All columns are at intersections of grid lines.
When measuring the columns, we find they are ø300mm. Probably they could be thinner, but we will stick with original design here.
Probably the easiest is to use a circle with R=150 as base for columns. then extrude to 6000mm.
Adjust the height of Columns under Studio Slab.
We have Labeled the Columns according to the grid-lines the are placed on.
Next Cut the columns going up to the roof, using the same procedure and cutting object as You used whe cutting the walls previously.
Making the roofs
Starting With outer Beams
Looking at the section of the Outer Beams, we can see it is aligned with outer wall. At least in some countries with rougher weather conditions this would be bad practice. Will increase width to 200mm, and have the beam extend 50mm outside the wall.
Would also like to have what we sometimes call a drip nose. Feel it is a bit complicated to add at the moment.
Showing Section of Beam with DripNose
Created as separate extrudes, added to BuildingPart
Struggling with determining best way to model..
Tried using Part Boolean Cut For the roof canopy...
The cut results in error when exporting
Roof Center Slab
Open at2_ReferenceComplete (can be downloaded from here)
Choose Edit->Copy (Ctrl+C)
Make a new file
Choose Edit->Paste (Ctrl+V)
Make Your workplane perpendicular to the shapes. This can be done in many ways.
FIXME Comment
Add list and ill. of various ways.
Tip
If You made the slab by extrude from Front Plane, it will need to be moved by the global Y-axis.
If You move the extrusion, by means of Draft->Move, this will lead to wrongly placed geometry when exporting to IFC.
For IFC export to work correct, You need to also move the underlying or defining geometry.
FIXME Comment
Add Illustration + Arch Move
Look at Arch Component
Some posts relating to issue and resolution
Mods to roof
Correct supporting wall
If You cut the wall (RED in image above), we now discover that this is supporting The Roof Center Slab.
This gives us a great opportunity test editing this wall with Arch remove command
FIXME Think the doc needs some updating
In order to add some flexibility beneath Roof slabs, we have made them as image above.
This means modifying cuts to inner walls and adding a suspended ceiling.
We will also need to add some covering to the Roof Slabs
01
- Shorten supporting wall (Red in above image)
- First remove 'cut'
- Adjust height of wall
- Center The slab on supporting wall
02
- Adjust and construct link between Inner wall and roof of Dormer
- The inner wall (Green) needs to be combined with the Roof of the Dormer
The two highlighted inner walls should probably extend to form the side walls of Dormer
Right + Click, Go to Selection --> DblClick Gets You to Component Structure / Edit
Adding Roof slabs
It is tempting to the roof slabs by grabbing geometry from section A-A.
Set working plane to front.
FIXME needs image
Draw geometry from section A-A.
- If You use lines, join them to make a wire.
- If You draw them as a dwire for extrusion.
- You will need to add a plane to be able to extrude in correct normal direction.
- Or, You can drop the dwire to a wire, the downside of this is it is not as easy to edit as a dwire.
I am wondering why we have the two different entity types, wire and dwire.
- dwire entity is easily editable at vertex level, wire entity is not
It would be tempting to extrude symmetric elements like these slabs, with a symmetrical extrusion. This works fine in Freecad, but sadly this does not seem to export correctly if exporting to IFC
Adding Dormer
WokFeature Approach
Make a plane for the two half of the Roof using
Try to use Work features, installed as WorkBench
Also try Macro_Align_View_to_Face
Started Playing with this.. First interesting feature.. If You select An Arch Axis -> place point at extreme, it will place points at all ends of all the selected axis
View image, by selecting the X-Axis System and hitting WorkFeature->Create Points at Line Extreme. Thew workFreature macro will create workpoints at end of all defined lines in ArchAxis. In this case AxesX
Also:
- Planes created with WorkFeature are able to set workplane in draft. (Only tested 0.18)
- Planes created this way can be named as all other FC features
- Macro also contains Align View to Workplane feature
IFC note
When Building part is exported to IFC, it creates 4xIFCproxyElements, and a parent Beam object
FIXME needs updating Check if Fixed
Stairs
Modeling the Stairs may be done in several ways.
Here we will model them the traditional way, but feel free to experiment with the Automated functionality presented in Arch Stairs
Doors
Inner or outer
Windows
Inner or Outer
IFC and BIM
Building Information Modelling (BIM) is a very broad term that describes the process of creating a digital model of a building.
Planning
BEP ( BIM Execution Plan)
All BIM projects should have a BEP ( BIM Execution Plan)
As a minimum
Common Origin.
IFC Links
- IFC - Where it all started - The End of Babel - Part 1/2
- Planning and Standards by U.S. General Services Administration
- IFC4 - is it ready yet?
- BimServer Center
- BIMsie
- Sustainability of Digital Formats: Planning for Library of Congress Collections
- The Top 8 Free and Open Source BIM Software Tools
- Designing Buildings Wiki
- BuildingSmart schema after 2x3 TC1
IFC Collaboration
- Bimsync by Catenda (Norwegian company, dedicated to open standards)
- Open BIMserver
- Allplan BimPlus (a Nemetschek company)
Freecad BIM
IFC round tripping
Aim is to also test round tripping, exporting IFC from FreeCAD and importing same file for comparison.
BIM requirements by stakeholders.
Relevant Forum Posts
Have started gathering some forum post that might be relevant for the TutorialArchBim
- FreeCAD posts from Yorik's blog
- reorder objects
- Why Switch from FreeCAD to Blender
- Noob. Architecture best practices, workflow and other questions
- BIM Workbench
- xrefs
- IFC++
- controls the color of objects in a IFC?
- An arch project Postby sergiobini Thu Jul 26, 2018 12:18 pm
- Flameshot: Fantastic Screenshot software for Linux users
- Design for a staircase
- BIM / Arch tutorials
- Presenting FreeCad
- Document tree display
- Windows macro, various
- Reinforcement WB
- Yorik lecture hackable FC
- Very interesting presentation of FC and general views on OpenSource in Engineering by Joel Graff
General building terminology
ToDo
This paragraph or chapter will contain Ideas for improvements, expansion and view, based on communication from participants
Stubs
This is where we have temporarily stored snippets of text, that maybe should be placed somewhere in the document
These texts are all in a
FIXME Comment State
Snapping Tools
Noob. Architecture best practices, workflow and other questions Quoting forum post:
At first, I didn't understand correctly the snapping tools. The snaps seemed random, but thanks to Regis tutorials on Youtube (cheers mate!!) I started over, using the snaps correctly (almost). This second time, by distraction, I added walls to each other and now I got stuck. I need to subtract a volume because some walls intersect a small slab, and when I do it, nothing happens. At first, they were all disappearing; now, not even that. Now, I know the tutorial recommends that we shouldn't add to much stuff to each other in order to avoid unnecessary complexity, but since it is also a BIM app, shouldn't complexity be part of it? I mean, shouldn't walls, if not adding to one another, at least merge directly to each other, like in Revit for example?
Remember this was an issue for me to, and probably is for most people trying to learn FreeCAD.
Needs to be put somewhere in tutorial. Among others, have a look at Regis Snapping
The Snap Tools are one of Your best friends. However, remember that having all set will in most cases result in an illogical condition. Only leave on the snaps You want.
If You have struggled with this when learning FreeCAD, take some comfort in that You are not the only one
Customizing Arch WorkBench
This is an example "customized" Arch workbench:
In this tutorial, we will model the house in 3D, based on the 2D drawings we will download from the net, and extract from it 2D documents, such as plans, elevations and sections.
Abbreviations
make list of common abbreviations
One compilation of Acronyms can be found here
BEP | BIM Execution Plan
References & Links
Reference any input from users or outside sources
FCStd file
[File_Format_FCStd| File FormatFCStd]
Command line
command line interface
You can create a log file with the additional commandline parameter
Code: Select all
--log-file arg
Document Draft Snippets
Customizing Arch WorkBench
VDC
FIXME Want to fit VDC in somewhere
Virtual Design and Construction seems to be the next Buzz word after BIM.
virtual Design and Construction in Skanska Norway
Annex B
FreeCAD ifcOpenShell
import sys for p in sys.path: print p
ifcOpenShell from ppa
sudo add-apt-repository ppa:freecad-community/ppa sudo apt-get update
ifcOpenShell python unicode
ls -l /usr/lib/python2.7/sitecustomize.py lrwxrwxrwx 1 root root 31 sep. 4 07:46 /usr/lib/python2.7/sitecustomize.py -> /etc/python2.7/sitecustomize.py
Build OCE
No success so far
sudo apt-get install git cmake gcc g++ libboost-all-dev libicu-dev
compile OCE yourself (note that the build takes a long time):
$ sudo apt-get install libftgl-dev libtbb2 libtbb-dev libgl1-mesa-dev libfreetype6-dev $ git clone $ cd oce $ mkdir build && cd build $ cmake .. $ make -j $ sudo make install
IFC openshell Linux
Freecad syspath
import sys >>> for p in sys.path: ... print p ... /usr/lib/freecad-daily/Mod/Drawing /usr/lib/freecad-daily/Mod/Inspection /usr/lib/freecad-daily/Mod/Idf /usr/lib/freecad-daily/Mod/AddonManager /usr/lib/freecad-daily/Mod/Robot /usr/lib/freecad-daily/Mod/Arch /usr/lib/freecad-daily/Mod/Part /usr/lib/freecad-daily/Mod/Path /usr/lib/freecad-daily/Mod/Mesh /usr/lib/freecad-daily/Mod/Raytracing /usr/lib/freecad-daily/Mod/Material /usr/lib/freecad-daily/Mod/Plot /usr/lib/freecad-daily/Mod/Complete /usr/lib/freecad-daily/Mod/Tux /usr/lib/freecad-daily/Mod/TechDraw /usr/lib/freecad-daily/Mod/Import /usr/lib/freecad-daily/Mod/Test /usr/lib/freecad-daily/Mod/Draft /usr/lib/freecad-daily/Mod/Points /usr/lib/freecad-daily/Mod/Start /usr/lib/freecad-daily/Mod/Spreadsheet /usr/lib/freecad-daily/Mod/Fem /usr/lib/freecad-daily/Mod/OpenSCAD /usr/lib/freecad-daily/Mod/MeshPart /usr/lib/freecad-daily/Mod/Web /usr/lib/freecad-daily/Mod/Ship /usr/lib/freecad-daily/Mod/Measure /usr/lib/freecad-daily/Mod/PartDesign /usr/lib/freecad-daily/Mod/Surface /usr/lib/freecad-daily/Mod/Image /usr/lib/freecad-daily/Mod/Show /usr/lib/freecad-daily/Mod/ReverseEngineering /usr/lib/freecad-daily/Mod/Sketcher /usr/lib/freecad-daily/Mod /usr/lib/freecad-daily/lib64 /usr/lib/freecad-daily/lib /usr/lib/freecad-daily/Ext /home/peter /freecad-daily/Macro /usr/lib/freecad/lib /home/peter/.FreeCAD/Macro /home/peter/.FreeCAD/Macro/WorkFeature/WF_2015.py /home/peter/.FreeCAD/Macro/WorkFeature/ParCurve/WF_ObjParCurve_2016.py /home/peter/.FreeCAD/Macro/WorkFeature/ParCurve/WF_ObjParCurveEdit_2016.py >>>
add /usr/lib/python2.7/site-packages
import sys sys.path.append("/usr/lib/python2.7/site-packages")
FIXME This does not seem to work?
peter@peter-HP-Z400-Workstation:~/.FreeCAD/Macro$ sudo rsync -azv /home/peter/Downloads/ifcopenshell /usr/local/lib/python2.7/site-packages/ [sudo] password for peter: sending incremental file list ifcopenshell/ ifcopenshell/__init__.py ifcopenshell/_ifcopenshell_wrapper.so ifcopenshell/entity_instance.py ifcopenshell/file.py ifcopenshell/guid.py ifcopenshell/ifcopenshell_wrapper.py ifcopenshell/geom/ ifcopenshell/geom/__init__.py ifcopenshell/geom/app.py ifcopenshell/geom/main.py ifcopenshell/geom/occ_utils.py sent 19,305,512 bytes received 218 bytes 7,722,292.00 bytes/sec total size is 49,071,231 speedup is 2.54
Ended up placing ifcopenshell in ... dist-packages
Annex B IFC and FreeCAD
This chapter looks at how FreeCAD entities come across as IFC entities based on using IfcOpenShell as exporter, and following instructions in Arch and BIM workbenches
We start looking at basic objects like Wall and Structure.
Wall
Annex D IFC PlusPlus
Installation
New try with Ubuntu 18.04 LTS
Download Stretch--ifcplusplus.sh save to Your Home dir.
- Make executeble
- Open Terminal
- chmod u+x Stretch--ifcplusplus.sh
- Run the file
Error:
SimpleViewerExampled: error while loading shared libraries: libcarved.so: cannot open shared object file: No such file or directory
yorik wrote: Thu Aug 30, 2018 6:27 pm do you have a libcarved.so together with the SimpleViewerExample executable in Release subfolder?
Tried this script with Ubuntu 16.04 LTS, got all kinds of errors. Mostly Cmake wrong version. See ifcPlusPlus
Annex X
Freecad install directories on Ubuntu Linux
Binary executables
/usr/bin$ ls -l freec* lrwxrwxrwx 1 root root 26 aug. 19 21:25 freecad -> ../lib/freecad/bin/FreeCAD lrwxrwxrwx 1 root root 29 aug. 19 21:25 freecadcmd -> ../lib/freecad/bin/FreeCADCmd lrwxrwxrwx 1 root root 35 aug. 23 04:16 freecadcmd-daily -> ../lib/freecad-daily/bin/FreeCADCmd lrwxrwxrwx 1 root root 32 aug. 23 04:16 freecad-daily -> ../lib/freecad-daily/bin/FreeCAD -rwxr-xr-x 1 root root 717 aug. 23 01:03 freecad-daily-thumbnailer -rwxr-xr-x 1 root root 699 aug. 19 20:29 freecad-thumbnailer
Data directories FreeCad
/usr/share$ tree -d ./freecad ./freecad ├── examples ├── Gui │ └── Stylesheets │ └── images └── Mod -> ../../lib/freecad/ModUser Data in
/Home/User/.FreeCAD
seems to be shared with FreeCad-Daily
.FreeCAD ├── Macro ├── Macros └── Mod ├── assembly2 │ ├── docs │ ├── Gui │ │ └── Resources │ │ ├── icons │ │ └── ui │ └── tests ├── BIM │ ├── icons │ └── utils ├── flamingo │ ├── dialogs │ ├── examples │ ├── icons │ ├── shapes │ │ ├── ballValves │ │ └── butterflyValves │ ├── tables │ └── tutorials ├── FreeCAD_assembly2 │ ├── docs │ ├── Gui │ │ └── Resources │ │ ├── icons │ │ └── ui │ └── tests └── timber └── icons
link to Mod
/usr/lib$ tree -d ./freecad ./freecad ├── bin ├── Ext │ └── freecad ├── lib └── Mod ├── AddonManager ├── Arch │ ├── Dice3DS ├── icons │ └── ui ├── Idf │ └── Idflibs ├── Image │ └── Resources │ └── icons ├── Import ├── Inspection │ └── Resources │ └── icons ├── Material │ ├── FluidMaterial │ └── StandardMaterial │ └── Tools ├── Measure ├── Mesh │ └── Resources │ └── icons ├── MeshPart ├── OpenSCAD │ ├── ply │ └── Resources │ └── icons ├── Part │ ├── AttachmentEditor │ ├── BOPTools │ ├── CompoundTools │ └── Resources │ └── icons ├── PartDesign │ ├── fcgear │ ├── PartDesignTests │ ├── Resources │ │ └── icons │ ├── Scripts │ └── WizardShaft ├── Path │ ├── PathScripts │ │ └── post │ ├── PathTests │ └── Resources │ └── icons ├── Plot │ ├── plotAxes │ ├── plotLabels │ ├── plotPositions │ ├── plotSave │ ├── plotSeries │ ├── plotUtils │ └── resources │ └── icons ├── Points │ └── Resources │ └── icons ├── Raytracing │ ├── Resources │ │ └── icons │ └── Templates ├── ReverseEngineering │ └── Resources │ └── icons ├── Robot │ ├── Lib │ │ └── Kuka │ └── Resources │ └── icons ├── Ship │ ├── resources │ │ ├── examples │ │ └── icons ├── ProfileLib │ └── Resources │ └── icons ├── Spreadsheet │ └── Resources │ └── icons ├── Start │ ├── Resources │ │ └── icons │ └── StartPage │ └── images ├── Surface ├── TechDraw │ ├── LineGroup │ ├── PAT │ ├── Patterns │ ├── Resources │ │ ├── fonts │ │ └── icons │ ├── TDTest │ └── Templates ├── Test │ └── Resources │ └── icons ├── Tux └── Web └── Resources └── icons
Data directories FreeCad-Daily
/usr/share$ tree -d ./freecad-daily ./freecad-daily ├── examples ├── Gui │ └── Stylesheets │ └── images_dark-light └── Mod ├── Arch └── Resources │ └── icons ├── Image │ └── Resources │ └── icons ├── Import │ └── DxfPlate ├── Inspection │ └── Resources │ └── icons ├── Material │ ├── FluidMaterial │ └── StandardMaterial │ └── Tools ├── Mesh │ └── Resources │ └── icons ├── OpenSCAD │ └── Resources │ └── icons ├── Part │ └── Resources │ └── icons ├── PartDesign │ └── Resources │ └── icons ├── Path │ └── Resources │ └── icons ├── Plot │ └── resources │ └── icons ├── Points │ └── Resources │ └── icons ├── Raytracing │ └── Resources │ └── icons ├── ReverseEngineering │ └── Resources │ └── icons ├── Robot │ ├── Lib │ │ └── Kuka │ └── Resources │ └── icons ├── Ship │ └── resources │ └── icons ├── Sketcher │ └── Resources │ └── icons ├── Spreadsheet │ └── Resources │ └── icons ├── Start │ ├── Resources │ │ └── icons │ └── StartPage ├── TechDraw │ ├── LineGroup │ ├── PAT │ ├── Patterns │ ├── Resources │ │ ├── fonts │ │ └── icons │ └── Templates ├── Test │ └── Resources │ └── icons └── Web └── Resources └── icons
Also in
/usr/lib$ tree -d ./freecad-daily ./freecad-daily ├── bin ├── Ext │ └── freecad ├── lib └── Mod ├── AddonManager ├── Arch │ └── Dice3DS ├── Complete ├── Draft ├── Drawing └── ui ├── Idf │ └── Idflibs ├── Image │ └── ImageTools ├── Import ├── Inspection ├── Material ├── Measure ├── Mesh ├── MeshPart ├── OpenSCAD │ └── ply ├── Part │ ├── AttachmentEditor │ ├── BOPTools │ └── CompoundTools ├── PartDesign │ ├── fcgear │ ├── PartDesignTests │ ├── Scripts │ └── WizardShaft ├── Path │ ├── Images │ │ ├── Ops │ │ └── Tools │ ├── PathScripts │ │ └── post │ └── PathTests ├── Plot │ ├── plotAxes │ ├── plotLabels │ ├── plotPositions │ ├── plotSave │ ├── plotSeries │ └── plotUtils ├── Points ├── Raytracing ├── ReverseEngineering ├── Robot ├── Ship │ ├── resources │ │ └── examples └── ProfileLib ├── Spreadsheet ├── Start │ └── StartPage ├── Surface ├── TechDraw │ └── TDTest ├── Test ├── Tux └── Web | https://www.freecadweb.org/wiki/index.php?title=Sandbox:TutorialArchBIM&direction=next&oldid=468600 | CC-MAIN-2020-05 | en | refinedweb |
SomeCollection
A Swift Package to simplify working with Opaque Collections and Sequences.
Why Use SomeCollection
When working with a PATs (protocol with assoicatedtype) as an opaque type the
assoicatedtype informantion is lost and becomes opaque as well.
This means that if you are wanting to reutrn
some Sequence or
some Collection or
some LazySequenceProtocol or
some LazyCollectionProtocol the
Element type will be lost.
SomeCollection has been created to be able to help make it easy to return the
Sequence/
Collection PATs as the opaque type without losing what
Element is.
This is accomplished by providing protocols and conformances to these protocols such as:
CollectionOfInt which ensures you are getting a
Collection where the
Element type is
Int.
This is essentially the same as if you could say:
some Collection<Int>.
Swift Package Manager
Update your
Package.swift or Xcode 11+ to include this package as a dependency:
.package(url: "", from: "1.0.0")
Usage
import SomeCollection func foo() -> some CollectionOfInt { [1, 2, 3, 4] } print(foo().map({ $0 * 2 })) // [2, 4, 6, 8]
Supported Sequences and Collections
Here is a list of the common sequence and collection types supported. More are supported but they are less common and not listed here.
- Array
- Set
- Range Types
- Dictionary.Values
- Dictionary.Keys
- Unsafe[Mutable][Raw][Buffer]Pointer
- LazySequence Types
Supported Element Types
Here is a list the common element types supported. More are supported but they are less common and not listed here.
- Int
- Int8
- Int16
- Int32
- Int64
- UInt
- UInt8
- UInt16
- UInt32
- UInt64
- Double
- Float
- Bool
- Error
- String
- Substring
- Character
Supporting Custom Types
SomeCollection has been designed from the start to support custom types.
MakeSomeCollectionLib is the engine used to generate the
SomeCollection library.
It has been setup so users can depend on it to have their own
MakeSomeCollectionOfYourOrgName to generate their own additional conformances to
Sequence,
Collection, or
Element types.
You can do this by creating your swift package and having it depend on this package.
Create an executable and target along the lines of
MakeSomeCollectionOfYourOrgName that makes sense for you and have its target depend on
MakeSomeCollectionLib.
It is recommended that your library of generated code be called:
SomeCollectionofYourOrgName
You then need to modify the target's
main.swift to be similar to this:
import MakeSomeCollectionLib // YourOrg's Custom Sequences let sequences: Set<SequenceType> = [ "CustomSequence1", "CustomSequence2", ] // YourOrg's Custom Collections let collections: Set<CollectionType> = [ "CustomCollection1", "CustomCollection2", ] // YourOrg's Elements let elements: Set<ElementType> = [ "Element1", "Element2", ] // The matrix of new elements to generate conformances for. let matrix = GenerationMatrix( sequenceTypes: sequences.union(StandardLibrarySequenceType.values), collectionTypes: collections.union(StandardLibraryCollectionType.values), elementTypes: elements.union(StandardLibraryElementType.values) ) let generator = Generator(matrix: matrix) try! generator.generate( name: "SomeCollectionOfYourOrgLibrary", into: "Sources/SomeCollectionOfYourOrg", imports: ["YourOrgLibrary"] )
When doing this it is recommended but not required to have the
union() calls with the types defined in
MakeSomeCollectionLib.
These sets contain all of the types used to generate
SomeCollection.
By providing the standard library types they will have conformances added to support any new protocols generated through your
Element types and your
Sequence and
Collection types will get conformances to the protocols that already exist in
SomeCollection.
If the standard library types are provided or not your
Sequence and
Collection types will get conformances to support the new protocols generated from your
Element types.
SeqeunceType,
CollectionType, and
ElementType all support customization to limit the platforms and/or other types they work with.
These can be accessed thorugh calling the initializer directly instead of just specifying the name as a
String as shown in the example above.
The customization points have been documented so it is easy to work with as you support your own types.
If you want a more complex example look at
makeTestOutput() in
MakeSomeCollectionLibTests.swift which is very similar to what a
main.swift would need to be to use
MakeSomeCollectionLib.
All generated code is stable in its ordering as long as it is given the same inputs. This helps to cut down on conflicts and identifying what changes.
A Sequence/Collection/Element Type is Missing!?
I have almost certainly missed types and new ones can be added to the standard library each release. In this case you can either open an issue or PR.
- If you open an issue please specify what the type is and I will add support for it if it is in the standard library.
- If you want to submit a PR you will need to update
Sources/MakeSomeCollectionLib/StandardLibraryTypesfiles to know about the new type. Once you have updated the type lists use
swift runto have the
SomeCollectionlibrary rebuild.
What about Foundation?
I am planning on adding support for Foundation types right away and should have them very soon.
They will likely be a part of this same package but in a different library which will likely be named:
SomeCollectionOfFoundation.
Some Other Bug/Feature Request
Open up an issue on github.
Github
You may find interesting
Dependencies
Used By
Total: 0 | https://swiftpack.co/package/bscothern/SomeCollection | CC-MAIN-2020-05 | en | refinedweb |
world of JavaScript frameworks is continuously evolving. As a result, we receive requests for integration with a specific new library every day. For a while now, Vue.js has been mentioned to us more than others. The framework is growing into a serious contender in the UI space, having accumulated almost as many GitHub stars as React.
Since we already have the other main players covered — with our Angular integration and the new React Wrappers —, we decided to tackle Vue.js as the next most important platform.
In our upcoming release v18.1, we are introducing more than 65 Vue.js components, based on DevExtreme widgets. Here is the GitHub repository, where you can also find example code and getting-started instructions more detailed than the information in this post.
On a low level, our DevExtreme Widgets run JavaScript and render HTML, so they can be used in any HTML/JS application. However, when you look at different UI frameworks, you find that an important distinguishing aspect is the way libraries implement components, instantiation mechanisms, life-cycle management and runtime features like data binding. Integrating with a certain framework therefor means adopting the specific approaches that make our widgets “feel” native to the environment.
Several different Vue.js techniques can be used to instantiate a DevExtreme Vue component. First, you can include it in a single-file component:
<template>
<div>
<dx-button
<dx-button
text="I'm colored"
:
<dx-button
</div>
</template>
<script>
import { DxButton } from "devextreme-vue";
export default {
components: {
DxButton
}
}
</script>
Alternatively, components can be used as part of a template when creating a Vue instance:
new Vue({
el: '#app',
components: { DxButton },
template: '<dx-button :',
data() {
return { text: 'Hello!' };
}
});
A third option is to include our Vue components in your own HTML, like this live sample (alternative live sample link) does:
<html>
...
<body>
<div id="app">
<dx-data-grid
key-expr="orderId"
...>
...
</dx-data-grid>
</div>
</body>
</html>
Finally, our components are also compatible with JSX render functions.
All Vue.js data binding mechanisms are supported:
<dx-button :
<dx-text-box :value.
<dx-text-box
You can install listeners for all DevExtreme widget events using the standard Vue.js v-on or (shorthand) @ syntax.
<dx-button v-on:
Where our DevExtreme widgets support templating of components or elements, you can write these templates using Named Slots. Template data is scoped, with the slot-scope attribute pointing to a variable that can be used to access data within the template.
slot-scope
<div id="app">
<dx-list :
<div slot="item" slot-
<i>This is my template for {{data}}</i>
</div>
</dx-list>
</div>
All our DevExtreme Vue components publish Prop Validation requirement details. This means that you will receive console error messages when you are misusing component properties.
The public CTP of our DevExtreme Vue Wrappers is available now. For npm, you can use the pre-release package (and check out this post if you’re not using npm).
npm install devextreme@18.1-unstable devextreme-vue@18.1-unstable
Of course we are very interested in any of your thoughts or comments. However, we also need some help prioritizing a few features that have not been implemented yet:
Please get back to us if you have any thoughts about these features, or if you think we should prioritize something else. Feel free to comment on this post, or to participate in discussions on GitHub!
If you want to see all new features introduced in our v18.1 release, sign up for our upcoming webinar “New in v18.1 - DevExtreme HTML / JS Controls”, where you’ll have a chance to ask questions about all the new features as well.
Join the webinar:
This is great new and we're are excited about being able to use DevExtreme with Vue! I was testing the example plunker from the github page and I noticed that when I bind to a simple property like the boolean row-alternation-enabled the grid will automatically apply the change with the value is changed but a complex property like filterRow.visible does not cause an update in the grid. Here is an example of what I was trying to do: embed.plnkr.co/Jqnd4HB7CpFp1Xd3Ngj3 . Did I miss something or is this functionality not currently supported?
Thanks,
Clint
Here's the link to the plunker with my modifications embed.plnkr.co/J8TBf9Hn2nUBv1nNdDq6 the link in the post above is the original provided by DevExpress on github
Clint, Thank you!
I've created the issue (github.com/.../60) in the DevExtreme Vue repo.
:D VUE!
I can't wait to try this out. I've been too enthralled with Blazor lately but I'll definitely take some time to play around with it. I'm really happy to see you guys support Vue. For some reason its the only one of the major JS frameworks that I like.
Please
or
to post comments. | https://community.devexpress.com/blogs/javascript/archive/2018/05/09/devextreme-vue-js-wrappers-v18-1.aspx | CC-MAIN-2020-05 | en | refinedweb |
dart_simple_math 0.1.3
Dart LCG #
Basic linear congruential generator written in dart to get a feel of the dart programming language.
Inspired by SENG475 assignment 1, I tried to adhere to the api specifications in that assignments.
0.1.3 Adding rational number class 0.1.2 linking to github 0.1.1 updating version 0.1.0 INITIAL RELEASE
example/example.dart
import 'package:dart_lcg/lcg/lcg.dart'; void main() { LCG test = new LCG(5,4,3,2); }
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: dart_simple_math: _simple_math/lcg/lcg.dart'; import 'package:dart_simple_math/lcg/lcg_interface.dart'; import 'package:dart_simple_math/main.dart'; import 'package:dart_simple_math/rat/rational.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
Analysis issues and suggestions
Make sure
dartfmt successfully runs on your package's source files.
Running
dartfmt -n . failed with the following output:
Exception: dartfmt on lib/ failed with exit code 65 Could not format because the source could not be parsed: line 2, column 8 of lib/main.dart: Expected to find ';'. ╷ 2 │ export "rat/rational.dart" │ ^^^^^^^^^^^^^^^^^^^ ╵
Health issues and suggestions
Fix
lib/rat/rational.dart. (-25.75 points)
Analysis of
lib/rat/rational.dart failed with 1 error, 2 hints:
line 38 col 17: 'Rational.==' ('bool Function(Rational)') isn't a valid override of 'Object.==' ('bool Function(dynamic)').
line 98 col 7: DO use curly braces for all flow control structures.
line 100 col 7: DO use curly braces for all flow control structures.
Fix
lib/lcg/lcg.dart. (-25.38 points)
Analysis of
lib/lcg/lcg.dart failed with 1 error, 1 hint:
line 52 col 16: 'LCG.==' ('bool Function(LCG)') isn't a valid override of 'Object.==' ('bool Function(dynamic)').
line 19 col 3: Avoid return types on setters.
Fix
lib/main.dart. (-25 points)
Analysis of
lib/main.dart failed with 1 error:
line 2 col 8: Expected to find ';'.
Document public APIs. (-0.33 points)
43 out of 44 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
Fix
lib/lcg/lcg_interface.dart. (-0.50 points)
Analysis of
lib/lcg/lcg_interface.dart reported 1 hint:
line 16 col 3: Avoid return types on setters. | https://pub.dev/packages/dart_simple_math | CC-MAIN-2020-05 | en | refinedweb |
UIElement Class
Definition
public ref class UIElement : System::Windows::Media::Visual, System::Windows::IInputElement, System::Windows::Media::Animation::IAnimatable
[System.Windows.Markup.UidProperty("Uid")] public class UIElement : System.Windows.Media.Visual, System.Windows.IInputElement, System.Windows.Media.Animation.IAnimatable
type UIElement = class inherit Visual interface IAnimatable interface IInputElement
Public Class UIElement Inherits Visual Implements IAnimatable, IInputElement
- Inheritance
- UIElement
- Derived
-
- Attributes
-
- Implements
-
Remarks.
Important
Visibility state affects all input handling by that element. Elements that are not visible do not participate in hit testing and do not receive input events, even if the mouse is over the bounds where the element would be if were visible. | https://docs.microsoft.com/en-us/dotnet/api/system.windows.uielement?view=netframework-4.7.1 | CC-MAIN-2020-05 | en | refinedweb |
""" DDCMPolicy Module:
This module contains the Dynamic Duty Cycle Modulation (DDCM) based policy
aimed at mitigating workload imbalance in parallel applications that use
barrier synchronizations. It reduces duty cycle of cpus not on the critical
path of execution thereby reducing energy with little or no adverse impact
on performance.
This implementation specifically targets Intel architecture.
Please check your architecture specification for supported power control
mechanisms and other information.
Additional information:
1. Bhalachandra, Sridutt, Allan Porterfield, and Jan F. Prins. "Using
dynamic duty cycle modulation to improve energy efficiency in high
performance computing." In Parallel and Distributed Processing Symposium
Workshop (IPDPSW), 2015 IEEE International, pp. 911-918. IEEE, 2015.
2. Porterfield, Allan, Rob Fowler, Sridutt Bhalachandra, Barry Rountree,
Diptorup Deb, and Rob Lewis. "Application runtime variability and power
optimization for exascale computers." In Proceedings of the 5th
International Workshop on Runtime and Operating Systems for Supercomputers,
p. 3. ACM, 2015.
"""
import math
import coolr
import coolr.dutycycle
class DDCMPolicy:
""" Contains cpu-specific DDCM based power policy """
def __init__(self, maxlevel=16, minlevel=1):
self.maxdclevel = maxlevel
self.mindclevel = minlevel
# Relaxation factor
self.relaxation = 1
self.ddcmpolicyset = 0
self.ddcmpolicyreset = 0
self.dc = coolr.dutycycle.DutyCycle()
def print_stats(self, resetflag=False):
print('DDCM Policy: DDCMPolicySets %d DDCMPolicyResets %d' %
(self.ddcmpolicyset, self.ddcmpolicyreset))
if resetflag:
self.ddcmpolicyset = 0
self.ddcmpolicyreset = 0
def execute(self, cpu, currentdclevel, computetime, totalphasetime):
# Compute work done by cpu during current phase
work = computetime / totalphasetime
# Compute effective work based on current duty cycle(dc) level
effectivework = work * self.maxdclevel / currentdclevel
# Compute effective slow down in current phase
effectiveslowdown = work * self.mindclevel / currentdclevel
# Decrease or keep constant dc level in the next phase if the effective
# work done is equal or less than 1.0
if effectivework <= 1.0:
self.ddcmpolicyset += 1
# Compute by how many levels dc needs to decrease
dcreduction = math.floor(effectivework / 0.0625) - 15
# Compute new dc level for next phase
if -14 < dcreduction < 0:
# Note that dcreduction is a negative value
newdclevel = currentdclevel + dcreduction + self.relaxation
elif dcreduction < -13:
# Empirical observation shows reducing dc below 18.75% leads to
# excessive slowdown
newdclevel = currentdclevel - 13
else:
# If reduction required is 0
newdclevel = currentdclevel
# Check if new dc level computed is not less than whats permissible
if newdclevel < self.mindclevel:
newdclevel = self.maxdclevel
# If there was a slowdown in the last phase, then increase the duty
# cycle level corresponding to the slowdown
else:
self.ddcmpolicyreset += 1
# Compute by how many levels dc needs to increase
dcincrease = math.floor(effectiveslowdown / 0.0625)
newdclevel = currentdclevel + dcincrease
# Check if new dc level computed is not greater than whats
# permissible
if newdclevel > self.maxdclevel:
newdclevel = self.maxdclevel
# Set the duty cycle of cpu to the new value computed
self.dc.set(cpu, newdclevel)
return newdclevel | https://xgitlab.cels.anl.gov/argo/nrm/blame/d0499a023740f77439922f9df83633e99153029f/nrm/ddcmpolicy.py | CC-MAIN-2020-05 | en | refinedweb |
.
Here is a picture of my EP200Mmd. I bought it on eBay for a pretty decent price. This monochromator is slightly different than the one Shahriar had. Instead of using fiber optics to guide the light into the input slit, this one uses an input collimator/coupler to guide the light onto the input optical slit. Because of the reduced field of view, this setup is slightly less prone to stray light interference from the environment.
The desired wavelength can be selected using a screw micrometer. According to the specifications, the wavelength can be adjusted from 185nm to 925nm which covers most of the ultraviolet region, the visible light region (380 nm–700 nm) and all the way to the near infrared spectrum. You can see the micrometer mechanism above. In my particular unit, the upper range can only be ajusted to 903nm, but this should be sufficient for what I am doing. I might be able to re-calibrate it sometime in the future.
One thing I did notice during my initial testing of the monochromator was that the spectrum resolution was very poor, and the reason for this is that this monochromator was missing a crucial piece — the input slit. In place of the slit, there was a hole about a quarter inch in diameter, which is too big for any meaningful measurements. I am still pretty puzzled as to what happened to the slit as it did not appear that anyone had tampered with it before. Anyway, finding a proper slit for this monochromator could be quite challenging, so I decided to make one myself.
As it turned out, it was pretty easy to make a slit using a razor blade. The blades inside a razor are thin enough to be cut by scissors and can be positioned precisely. After I manipulated the pieces to get the desired opening width, I dabbed the area with tiny bit of glue so that the slit can remain be in place securely.
The picture below shows the makeshift slit I made. Features in this picture is magnified by roughly seven times (click on the image to see the full sized picture). The actual distance between the two horizontal mounting holes is 32 mm. So the opening of the slit is roughly 0.2 mm by estimation. According to the datasheet, this slit size should give us a resolution of 1 nm. Of course, if I do get hold of a proper slit assembly in the future I will swap this temporary one out.
Since I did not want to disassemble the monochromator like Shahriar did in his modification, I decided to use a different method to record the measurement results. The heart of the monochromator is a 1200 grooves/mm diffraction grating and it cannot be cleaned without suffering performance degradation and I didn’t want to risk damaging the delicate optics. So instead of fitting a custom shaft hub over the micrometer, which requires cutting an opening on one side of the case, I decided to use a belt to drive an optical encoder to record the micrometer readings.
The main benefit of this alternative method is that no modification to the monochromator is required. This is crucial since I do not have the equipment needed to design and build the custom mounting mechanism. Also there is always the risk of damaging the sensitive grating and other optics when opening up a precision instrument like this. Of course there are challenges to this approach as well. Because the shaft moves laterally, the belt assembly needs to be moved along when scanning through the wavelength range. Also the belt cannot exert too much force on the micrometer otherwise we run the risk of damaging it.
Given all these, I decided to drive the belt manually. In this way I can apply just enough force so that the belt does not slip and I can also adjust the horizontal alignment manually on the go. While this might sound a bit difficult to do, it is actually quite easy to accomplish in practice. You can see how this is done in my video later.
Below is a picture of the optical encoder assembly I built. The optical encoder used here was taken from an old HP equipment. The belt pulley wheel used was taken from a disassembled laser printer. The actual size of the wheel does not matter much. I glued a gear on the other side of the pulley wheel so that the belt would stay in place when rotating. Given this configuration, I get roughly 10 pulses per nanometer, which is more than adequate for the 1nm resolution we get from the slit size chosen. If you use a smaller wheel, you can achieve even higher resolutions.
The encoder readings are sent to a PC via an Arduino. Below is a picture of the simple shield I made. The 4 pin header connects to the optical encoder. Two of the encoder pins are routed to Arduino digital pin 5 and pin 6 (PWM pins) and the other two leads are for ground and Vcc respectively. I used an RCA jack to take analog signal from the monochromator detector output. Since the specified output signal from the monochromator goes from 0V to 10V but can go as high as 15V in overload situations, I included a voltage divider to divide the input voltage by three at the input in order for the analog input to stay within range.
Power comes in from a modified Global Specialties 1301A power supply (±15V supply voltages and the 2-10V photomultiplier control voltage) via a DB-9 connector.
The picture below shows the typical experiment setup.
To make manual adjustment slightly easier, each run starts at 200nm and ends when the micrometer hits the upper limit (in this case 903nm). This way, we do not need to worry about the optical encoder wheel to the micrometer turn ratio as the pulses recorded would always correspond to the 703nm travel range. Each time the optical encoder value is read, we also read back the analog input voltage and this voltage alone with the encoder value is sent over via the serial port in a space separated format.
A button on the Arduino digital pin 4 is used to send a special stop signal (9999 9999) manually, so we can let the program that is listening on the serial port know that the run has stopped. You can examine the Arduino code towards the end and see how this is done. Since the encoder value is only reset to 0 inside setup(), you will need to press the reset button prior to taking measurement each time (that’s what the hole on the shield is for).
I used MATLAB to plot the received data from the serial port. You can use pretty much any programming languages to receive and plot your data however. The MATLAB code is also included towards the end.
Now, let us take a look at the spectrum of different light sources (click to see larger picutres).
The first measurement shows the spectrum of a red Helium-neon laser. The characteristic spectrum is centered at 632.8nm. For the most accurate measurements, the monochromator must starts at 200nm precisely each time and there should be enough tension on the belt to ensure that it does not slip during the measurement.
The next couple of spectrum are taken from a couple of laser diodes I have on hand. The spectrum on the left is that of a red laser diode. This is a common GaInP laser with a wavelength of 635 nm. The picture to the right shows the spectrum from an old laser pointer. I got this laser pointer more than 20 years ago. It uses an AlGaInP laser diode. The AlGaInP laser has a peak at 670 nm. Due to its longer wavelength the light appears in deeper red. Red laser pointers nowadays mostly use GaInP laser diodes as they are cheaper and much brighter than the AlGaInP ones.
These two pictures are the spectrum of an violet LED (left) and a blue LED (right):
And here we have the spectrum of a green LED (left) and a yellow LED (right):
The pictures below are the spectrum of a red LED (left) and the spectrum of an infrared LED (right). Because the sensitivity at the infrared range is significantly lower for this monochromator (the ADC reading is only a tenth of the full scale), the spectrum peaks picked up from the lower wavelengths are likely from the environment and not from the infrared LED itself.
Here is the spectrum of a white LED. Since white light are essentially light from blue LED down-converted by the phosphor coating, you can see the characteristic blue LED spectrum (centered at roughly 450nm) and a much broader spectrum covering the entire visible light range from the light converted via the phosphor coating.
I then tested the light spectrum of two flash lights with incandescent light bulbs. The result is somewhat interesting as you can see below. Intuitively I was expecting a Gaussian shaped spectrum, but as you can see from the spectrum below, each has a peak in the 780 nm to 800 nm near infrared range.
Next let’s take a look at the spectrum of a neon bulb. These gas discharge indicators were quite popular in test gears back in the 70’s (this one was from the power indicator on my HP 6113A power supply). Different spectral lines can be seen clearly.
Finally, here is what the light spectrum looks in my lab. Almost all of my lights are CFL‘s and the measured spectrum is inline with the characteristics of fluorescent bulbs.
Arduino Code
#include <Encoder.h> #include <SPI.h> #define STOP_BTN_PIN 4 #define ENC_PIN_1 5 #define ENC_PIN_2 6 long data[2]; int adcOut; int buttonState; int lastButtonState = LOW; Encoder enc(ENC_PIN_1, ENC_PIN_2); long oldPos = -9999; long newPos; void setup() { pinMode(STOP_BTN_PIN, INPUT); digitalWrite(STOP_BTN_PIN, HIGH); Serial.begin(115200); } void loop() { newPos = enc.read(); adcOut = analogRead(A0); data[0] = newPos; data[1] = adcOut; if (newPos != oldPos) { oldPos = newPos; Serial.print(newPos); Serial.print(" "); Serial.println(adcOut); } if (digitalRead(STOP_BTN_PIN) == LOW) { Serial.println("9999 9999"); } }
MATLAB Code
startWL = 200; stopWL = 903; delete(instrfindall) serialPort = serial('/dev/ttyUSB0', 'BaudRate', 115200); serialPort.TimeOut = 60; fopen(serialPort); while 1 out = fscanf(serialPort) if strcmp(strtrim(out),'9999 9999') break end [x y] = strread(out) if x >= 0 w(x + 1) = x; v(x + 1) = y; end end w = w./length(w)* (stopWL - startWL) + startWL; plot(w,v); axis([min(w) max(w) 0 max(v) + 1]); grid on; shg; set(gca, 'xtick',[200:50:903]); fclose(serialPort); delete(serialPort); clear serialPort;
Thanks for posting this! Really interesting. I’m trying to do similar, but am having trouble powering my monochromator right. Would you be able to share a schematic of how you powered the various pins? I have an adjustable 0-30V power supply, but am a bit confused about the +/- 15V inputs and how to adjust gain. Any help much appreciated! Kind regards, Nick
Take a look at page 4 of this document:, pin 7/9 are common ground, and you will need a dual power supply to power pin 2(-15V) and pin 3(+15V) with respect to ground. A programming voltage on pin 1 between 2 to 10V can be used to adjust the gain. | http://www.kerrywong.com/2015/08/16/yet-another-scanning-monochromator-build/?replytocom=917803 | CC-MAIN-2020-05 | en | refinedweb |
[SOLVED] How to fix QtCreator and add QtSerialPort?
I've been trying to add the SerialPort-library to my pre-installed Qt-packages (Ubuntu 14.04). It failed: QtCreator threw an error on "QT += serialport" and "#include <QSerialPort>" lacked highlighting.
Next, I decided to try an installation from scratch. Being an amateur, I deleted the folders /usr/include/qt4 and /usr/include/qt5. Subsequently, I've used the apt-get functionalities to delete and install packages.
At this stage I've got my two deleted directories back (or: I installed 'qt-sdk' and some other packages), but things don't work as they used to do. When I open QtCreator, I'm getting the following error message:
": module "QtQuick" is not installed
import QtQuick 2.1
^ ",
although there is a QtQuick-folder in /usr/include/qt5. QtCreator opens next but the screen freezes. After opening a project, I'm able to go through its code but when I try to build it, I don't receive any response.
In the meantime I've found a broken 'plugins' link in /usr/share/qt4 that used to refer to /usr/lib/qt4/plugins. I've replaced this symbolic link with one that refers to the existing /usr/lib/x86_64-linux-gnu/qt4/plugins hoping that this would magically solve my problem. It didn't.
Any suggestions on how I would be able to a) get QtCreator back up and running, b) add the QtSerialPort-library?
add the QtSerialPort-library?
Just install the qtserialport library from the Ubuntu's repo. Or try to read the WIKI in case you want to have a fresh version of QSerialPort.
In the meantime, I've fixed a). The package 'qtcreator' depends on:
qtdeclarative5-qtquick2-plugin
qtdeclarative5-controls-plugin
qtdeclarative5-window-plugin
qtdeclarative5-localstorage-plugin,
which aren't automatically installed while installing 'qtcreator. Check also.
Thanks for the response, Kuzulis. Now i'll try (again) to tackle b).
Ok, following the wiki worked. | https://forum.qt.io/topic/55267/solved-how-to-fix-qtcreator-and-add-qtserialport/4 | CC-MAIN-2020-05 | en | refinedweb |
import "runtime"
Package runtime contains operations that interact with Go's runtime system,
such as functions to control goroutines. It also includes the low-level type information
used by the reflect package; see reflect's documentation for the programmable
interface to the run-time type system...
The net, net/http, and crypto/tls GORACE variable configures the race detector, for programs built using -race.
See for details..
alg.go
atomic_pointer.go
cgo.go
cgo_mmap.go
cgo_sigaction.go
cgocall.go
cgocallback.go
cgocheck.go
chan.go
compiler.go
complex.go
cpuflags.go
cpuflags_amd64.go
cpuprof.go
cputicks.go
debug.go
debugcall.go
debuglog.go
debuglog_off.go
defs_linux_amd64.go
env_posix.go
error.go
extern.go
fastlog2.go
fastlog2table.go
float.go
hash64.go
heapdump.go
iface.go
lfstack.go
lfstack_64bit.go
lock_futex.go
malloc.go
map.go
map_fast32.go
map_fast64.go
map_faststr.go
mbarrier.go
mbitmap.go
mcache.go
mcentral.go
mem_linux.go
mfinal.go
mfixalloc.go
mgc.go
mgclarge.go
mgcmark.go
mgcscavenge.go
mgcstack.go
mgcsweep.go
mgcsweepbuf.go
mgcwork.go
mheap.go
mprof.go
msan0.go
msize.go
mstats.go
mwbbuf.go
netpoll.go
netpoll_epoll.go
os_linux.go
os_linux_generic.go
os_linux_noauxv.go
os_nonopenbsd.go
panic.go
plugin.go
print.go
proc.go
profbuf.go
proflabel.go
race0.go
rdebug.go
relax_stub.go
runtime.go
runtime1.go
runtime2.go
rwmutex.go
select.go
sema.go
signal_amd64x.go
signal_linux_amd64.go
signal_sighandler.go
signal_unix.go
sigqueue.go
sigqueue_note.go
sigtab_linux_generic.go
sizeclasses.go
slice.go
softfloat64.go
stack.go
string.go
stubs.go
stubs2.go
stubs3.go
stubs_amd64x.go
stubs_linux.go
symtab.go
sys_nonppc64x.go
sys_x86.go
time.go
timestub.go
timestub2.go
trace.go
traceback.go
type.go
typekind.go
utf8.go
vdso_elf64.go
vdso_linux.go
vdso_linux_amd64.go
write_err.go
const (
c0 = uintptr((8-sys.PtrSize)/4*2860486313 + (sys.PtrSize-4)/4*33054211828000289)
c1 = uintptr((8-sys.PtrSize)/4*3267000013 + (sys.PtrSize-4)/4*23344194077549503)
)
type algorithms - known to compiler
const (
alg_NOEQ = iota
alg_MEM0
alg_MEM8
alg_MEM16
alg_MEM32
alg_MEM64
alg_MEM128
alg_STRING
alg_INTER
alg_NILINTER
alg_FLOAT32
alg_FLOAT64
alg_CPLX64
alg_CPLX128
alg_max
)
const (
maxAlign = 8
hchanSize = unsafe.Sizeof(hchan{}) + uintptr(-int(unsafe.Sizeof(hchan{}))&(maxAlign-1))
debugChan = false
)
Offsets into internal/cpu records for use in assembly.
const (
offsetX86HasAVX2 = unsafe.Offsetof(cpu.X86.HasAVX2)
offsetX86HasERMS = unsafe.Offsetof(cpu.X86.HasERMS)
offsetX86HasSSE2 = unsafe.Offsetof(cpu.X86.HasSSE2)
offsetARMHasIDIVA = unsafe.Offsetof(cpu.ARM.HasIDIVA)
)
const (
debugCallSystemStack = "executing on Go runtime stack"
debugCallUnknownFunc = "call from unknown function"
debugCallRuntime = "call from within the Go runtime"
debugCallUnsafePoint = "call not at safe point"
)
const (
debugLogUnknown = 1 + iota
debugLogBoolTrue
debugLogBoolFalse
debugLogInt
debugLogUint
debugLogHex
debugLogPtr
debugLogString
debugLogConstString
debugLogStringOverflow
debugLogPC
debugLogTraceback
)
const (
// debugLogHeaderSize is the number of bytes in the framing
// header of every dlog record.
debugLogHeaderSize = 2
// debugLogSyncSize is the number of bytes in a sync record.
debugLogSyncSize = debugLogHeaderSize + 2*8
)
const (
_EINTR = 0x4
_EAGAIN = 0xb
_ENOMEM = 0xc
_PROT_NONE = 0x0
_PROT_READ = 0x1
_PROT_WRITE = 0x2
_PROT_EXEC = 0x4
_MAP_ANON = 0x20
_MAP_PRIVATE = 0x2
_MAP_FIXED = 0x10
_MADV_DONTNEED = 0x4
_MADV_FREE = 0x8
_MADV_HUGEPAGE = 0xe
_MADV_NOHUGEPAGE = 0xf
_SA_RESTART = 0x10000000
_SA_ONSTACK = 0x8000000
_SA_RESTORER = 0x4000000
_SA_SIGINFO = 0x4
_SIGHUP = 0x1
_SIGINT = 0x2
_SIGQUIT = 0x3
_SIGILL = 0x4
_SIGTRAP = 0x5
_SIGABRT = 0x6
_SIGBUS = 0x7
_SIGFPE = 0x8
_SIGKILL = 0x9
_SIGUSR1 = 0xa
_SIGSEGV = 0xb
_SIGUSR2 = 0xc
_SIGPIPE = 0xd
_SIGALRM = 0xe
_SIGSTKFLT = 0x10
_SIGCHLD = 0x11
_SIGCONT = 0x12
_SIGSTOP = 0x13
_SIGTSTP = 0x14
_SIGTTIN = 0x15
_SIGTTOU = 0x16
_SIGURG = 0x17
_SIGXCPU = 0x18
_SIGXFSZ = 0x19
_SIGVTALRM = 0x1a
_SIGPROF = 0x1b
_SIGWINCH = 0x1c
_SIGIO = 0x1d
_SIGPWR = 0x1e
_SIGSYS = 0x1f
_FPE_INTDIV = 0x1
_FPE_INTOVF = 0x2
_FPE_FLTDIV = 0x3
_FPE_FLTOVF = 0x4
_FPE_FLTUND = 0x5
_FPE_FLTRES = 0x6
_FPE_FLTINV = 0x7
_FPE_FLTSUB = 0x8
_BUS_ADRALN = 0x1
_BUS_ADRERR = 0x2
_BUS_OBJERR = 0x3
_SEGV_MAPERR = 0x1
_SEGV_ACCERR = 0x2
_ITIMER_REAL = 0x0
_ITIMER_VIRTUAL = 0x1
_ITIMER_PROF = 0x2
_EPOLLIN = 0x1
_EPOLLOUT = 0x4
_EPOLLERR = 0x8
_EPOLLHUP = 0x10
_EPOLLRDHUP = 0x2000
_EPOLLET = 0x80000000
_EPOLL_CLOEXEC = 0x80000
_EPOLL_CTL_ADD = 0x1
_EPOLL_CTL_DEL = 0x2
_EPOLL_CTL_MOD = 0x3
_AF_UNIX = 0x1
_F_SETFL = 0x4
_SOCK_DGRAM = 0x2
)
const (
_O_RDONLY = 0x0
_O_CLOEXEC = 0x80000
)
const (
// Constants for multiplication: four random odd 64-bit numbers.
m1 = 16877499708836156737
m2 = 2820277070424839065
m3 = 9497967016996688599
m4 = 15839092249703872147
)
const (
fieldKindEol = 0
fieldKindPtr = 1
fieldKindIface = 2
fieldKindEface = 3
tagEOF = 0
tagObject = 1
tagOtherRoot = 2
tagType = 3
tagGoroutine = 4
tagStackFrame = 5
tagParams = 6
tagFinalizer = 7
tagItab = 8
tagOSThread = 9
tagMemStats = 10
tagQueuedFinalizer = 11
tagData = 12
tagBSS = 13
tagDefer = 14
tagPanic = 15
tagMemProf = 16
tagAllocSample = 17
)
Cache of types that have been serialized already.
We use a type's hash field to pick a bucket.
Inside a bucket, we keep a list of types that
have been serialized so far, most recently used first.
Note: when a bucket overflows we may end up
serializing a type more than once. That's ok.
const (
typeCacheBuckets = 256
typeCacheAssoc = 4
)
const (
// addrBits is the number of bits needed to represent a virtual address.
//
// See heapAddrBits for a table of address space sizes on
// various architectures. 48 bits is enough for all
// architectures except s390x.
//
// On AMD64, virtual addresses are 48-bit (or 57-bit) numbers sign extended to 64.
// We shift the address left 16 to eliminate the sign extended part and make
// room in the bottom for the count.
//
// On s390x, virtual addresses are 64-bit. There's not much we
// can do about this, so we just hope that the kernel doesn't
// get to really high addresses and panic if it does.
addrBits = 48
// In addition to the 16 bits taken from the top, we can take 3 from the
// bottom, because node must be pointer-aligned, giving a total of 19 bits
// of count.
cntBits = 64 - addrBits + 3
// On AIX, 64-bit addresses are split into 36-bit segment number and 28-bit
// offset in segment. Segment numbers in the range 0x0A0000000-0x0AFFFFFFF(LSA)
// are available for mmap.
// We assume all lfnode addresses are from memory allocated with mmap.
// We use one bit to distinguish between the two ranges.
aixAddrBits = 57
aixCntBits = 64 - aixAddrBits + 3
)
const (
mutex_unlocked = 0
mutex_locked = 1
mutex_sleeping = 2
active_spin = 4
active_spin_cnt = 30
passive_spin = 1
)
const (
debugMalloc = false
maxTinySize = _TinySize
tinySizeClass = _TinySizeClass
maxSmallSize = _MaxSmallSize
pageShift = _PageShift
pageSize = _PageSize
pageMask = _PageMask
// By construction, single page spans of the smallest object class
// have the most objects per span.
maxObjsPerSpan = pageSize / 8
concurrentSweep = _ConcurrentSweep
_PageSize = 1 << _PageShift
_PageMask = _PageSize - 1
// _64bit = 1 on 64-bit systems, 0 on 32-bit systems
_64bit = 1 << (^uintptr(0) >> 63) / 2
// Tiny allocator parameters, see "Tiny allocator" comment in malloc.go.
_TinySize = 16
_TinySizeClass = int8(2)
_FixAllocChunk = 16 << 10 // Chunk size for FixAlloc
// Per-P, per order stack segment cache size.
_StackCacheSize = 32 * 1024
// Number of orders that get caching. Order 0 is FixedStack
// and each successive order is twice as large.
// We want to cache 2KB, 4KB, 8KB, and 16KB stacks. Larger stacks
// will be allocated directly.
// Since FixedStack is different on different systems, we
// must vary NumStackOrders to keep the same maximum cached size.
// OS | FixedStack | NumStackOrders
// -----------------+------------+---------------
// linux/darwin/bsd | 2KB | 4
// windows/32 | 4KB | 3
// windows/64 | 8KB | 2
// plan9 | 4KB | 3
_NumStackOrders = 4 - sys.PtrSize/4*sys.GoosWindows - 1*sys.GoosPlan9
// heapAddrBits is the number of bits in a heap address. On
// amd64, addresses are sign-extended beyond heapAddrBits. On
// other arches, they are zero-extended.
//
// On most 64-bit platforms, we limit this to 48 bits based on a
// combination of hardware and OS limitations.
//
// amd64 hardware limits addresses to 48 bits, sign-extended
// to 64 bits. Addresses where the top 16 bits are not either
// all 0 or all 1 are "non-canonical" and invalid. Because of
// these "negative" addresses, we offset addresses by 1<<47
// (arenaBaseOffset) on amd64 before computing indexes into
// the heap arenas index. In 2017, amd64 hardware added
// support for 57 bit addresses; however, currently only Linux
// supports this extension and the kernel will never choose an
// address above 1<<47 unless mmap is called with a hint
// address above 1<<47 (which we never do).
//
// arm64 hardware (as of ARMv8) limits user addresses to 48
// bits, in the range [0, 1<<48).
//
// ppc64, mips64, and s390x support arbitrary 64 bit addresses
// in hardware. On Linux, Go leans on stricter OS limits. Based
// on Linux's processor.h, the user address space is limited as
// follows on 64-bit architectures:
//
// Architecture Name Maximum Value (exclusive)
// ---------------------------------------------------------------------
// amd64 TASK_SIZE_MAX 0x007ffffffff000 (47 bit addresses)
// arm64 TASK_SIZE_64 0x01000000000000 (48 bit addresses)
// ppc64{,le} TASK_SIZE_USER64 0x00400000000000 (46 bit addresses)
// mips64{,le} TASK_SIZE64 0x00010000000000 (40 bit addresses)
// s390x TASK_SIZE 1<<64 (64 bit addresses)
//
// These limits may increase over time, but are currently at
// most 48 bits except on s390x. On all architectures, Linux
// starts placing mmap'd regions at addresses that are
// significantly below 48 bits, so even if it's possible to
// exceed Go's 48 bit limit, it's extremely unlikely in
// practice.
//
// On aix/ppc64, the limits is increased to 1<<60 to accept addresses
// returned by mmap syscall. These are in range:
// 0x0a00000000000000 - 0x0afffffffffffff
//
// On 32-bit platforms, we accept the full 32-bit address
// space because doing so is cheap.
// mips32 only has access to the low 2GB of virtual memory, so
// we further limit it to 31 bits.
//
// WebAssembly currently has a limit of 4GB linear memory.
heapAddrBits = (_64bit*(1-sys.GoarchWasm)*(1-sys.GoosAix))*48 + (1-_64bit+sys.GoarchWasm)*(32-(sys.GoarchMips+sys.GoarchMipsle)) + 60*sys.GoosAix
// maxAlloc is the maximum size of an allocation. On 64-bit,
// it's theoretically possible to allocate 1<<heapAddrBits bytes. On
// 32-bit, however, this is one less than 1<<32 because the
// number of bytes in the address space doesn't actually fit
// in a uintptr.
maxAlloc = (1 << heapAddrBits) - (1-_64bit)*1
// heapArenaBytes is the size of a heap arena. The heap
// consists of mappings of size heapArenaBytes, aligned to
// heapArenaBytes. The initial heap mapping is one arena.
//
// This is currently 64MB on 64-bit non-Windows and 4MB on
// 32-bit and on Windows. We use smaller arenas on Windows
// because all committed memory is charged to the process,
// even if it's not touched. Hence, for processes with small
// heaps, the mapped arena space needs to be commensurate.
// This is particularly important with the race detector,
// since it significantly amplifies the cost of committed
// memory.
heapArenaBytes = 1 << logHeapArenaBytes
// logHeapArenaBytes is log_2 of heapArenaBytes. For clarity,
// prefer using heapArenaBytes where possible (we need the
// constant to compute some other constants).
logHeapArenaBytes = (6+20)*(_64bit*(1-sys.GoosWindows)*(1-sys.GoosAix)*(1-sys.GoarchWasm)) + (2+20)*(_64bit*sys.GoosWindows) + (2+20)*(1-_64bit) + (8+20)*sys.GoosAix + (2+20)*sys.GoarchWasm
// heapArenaBitmapBytes is the size of each heap arena's bitmap.
heapArenaBitmapBytes = heapArenaBytes / (sys.PtrSize * 8 / 2)
pagesPerArena = heapArenaBytes / pageSize
// arenaL1Bits is the number of bits of the arena number
// covered by the first level arena map.
//
// This number should be small, since the first level arena
// map requires PtrSize*(1<<arenaL1Bits) of space in the
// binary's BSS. It can be zero, in which case the first level
// index is effectively unused. There is a performance benefit
// to this, since the generated code can be more efficient,
// but comes at the cost of having a large L2 mapping.
//
// We use the L1 map on 64-bit Windows because the arena size
// is small, but the address space is still 48 bits, and
// there's a high cost to having a large L2.
//
// We use the L1 map on aix/ppc64 to keep the same L2 value
// as on Linux.
arenaL1Bits = 6*(_64bit*sys.GoosWindows) + 12*sys.GoosAix
// arenaL2Bits is the number of bits of the arena number
// covered by the second level arena index.
//
// The size of each arena map allocation is proportional to
// 1<<arenaL2Bits, so it's important that this not be too
// large. 48 bits leads to 32MB arena index allocations, which
// is about the practical threshold.
arenaL2Bits = heapAddrBits - logHeapArenaBytes - arenaL1Bits
// arenaL1Shift is the number of bits to shift an arena frame
// number by to compute an index into the first level arena map.
arenaL1Shift = arenaL2Bits
// arenaBits is the total bits in a combined arena map index.
// This is split between the index into the L1 arena map and
// the L2 arena map.
arenaBits = arenaL1Bits + arenaL2Bits
// arenaBaseOffset is the pointer value that corresponds to
// index 0 in the heap arena map.
//
// On amd64, the address space is 48 bits, sign extended to 64
// bits. This offset lets us handle "negative" addresses (or
// high addresses if viewed as unsigned).
//
// On other platforms, the user address space is contiguous
// and starts at 0, so no offset is necessary.
arenaBaseOffset uintptr = sys.GoarchAmd64 * (1 << 47)
// Max number of threads to run garbage collection.
// 2, 3, and 4 are all plausible maximums depending
// on the hardware details of the machine. The garbage
// collector scales well to 32 cpus.
_MaxGcproc = 32
// minLegalPointer is the smallest possible legal pointer.
// This is the smallest possible architectural page size,
// since we assume that the first page is never mapped.
//
// This should agree with minZeroPage in the compiler.
minLegalPointer uintptr = 4096
)
const (
// Maximum number of key/elem pairs a bucket can hold.
bucketCntBits = 3
bucketCnt = 1 << bucketCntBits
// Maximum average load of a bucket that triggers growth is 6.5.
// Represent as loadFactorNum/loadFactDen, to allow integer math.
loadFactorNum = 13
loadFactorDen = 2
// Maximum key or elem size to keep inline (instead of mallocing per element).
// Must fit in a uint8.
// Fast versions cannot handle big elems - the cutoff size for
// fast versions in cmd/compile/internal/gc/walk.go must be at most this elem.
maxKeySize = 128
maxElemSize = 128
// data offset should be the size of the bmap struct, but needs to be
// aligned correctly. For amd64p32 this means 64-bit alignment
// even though pointers are 32 bit.
dataOffset = unsafe.Offsetof(struct {
b bmap
v int64
}{}.v)
// Possible tophash values. We reserve a few possibilities for special marks.
// Each bucket (including its overflow buckets, if any) will have either all or none of its
// entries in the evacuated* states (except during the evacuate() method, which only happens
// during map writes and thus no one else can observe the map during that time).
emptyRest = 0 // this cell is empty, and there are no more non-empty cells at higher indexes or overflows.
emptyOne = 1 // this cell is empty
evacuatedX = 2 // key/elem is valid. Entry has been evacuated to first half of larger table.
evacuatedY = 3 // same as above, but evacuated to second half of larger table.
evacuatedEmpty = 4 // cell is empty, bucket is evacuated.
minTopHash = 5 // minimum tophash for a normal filled cell.
// flags
iterator = 1 // there may be an iterator using buckets
oldIterator = 2 // there may be an iterator using oldbuckets
hashWriting = 4 // a goroutine is writing to the map
sameSizeGrow = 8 // the current map growth is to a new map of the same size
// sentinel bucket ID for iterator checks
noCheck = 1<<(8*sys.PtrSize) - 1
)
const (
bitPointer = 1 << 0
bitScan = 1 << 4
heapBitsShift = 1 // shift offset between successive bitPointer or bitScan entries
wordsPerBitmapByte = 8 / 2 // heap words described by one bitmap byte
// all scan/pointer bits in a byte
bitScanAll = bitScan | bitScan<<heapBitsShift | bitScan<<(2*heapBitsShift) | bitScan<<(3*heapBitsShift)
bitPointerAll = bitPointer | bitPointer<<heapBitsShift | bitPointer<<(2*heapBitsShift) | bitPointer<<(3*heapBitsShift)
)
const (
_EACCES = 13
_EINVAL = 22
)
const (
_DebugGC = 0
_ConcurrentSweep = true
_FinBlockSize = 4 * 1024
// sweepMinHeapDistance is a lower bound on the heap distance
// (in bytes) reserved for concurrent sweeping between GC
// cycles.
sweepMinHeapDistance = 1024 * 1024
)
)
const (
fixedRootFinalizers = iota
fixedRootFreeGStacks
fixedRootCount
// rootBlockBytes is the number of bytes to scan per data or
// BSS root.
rootBlockBytes = 256 << 10
// rootBlockSpans is the number of spans to scan per span
// root.
rootBlockSpans = 8 * 1024 // 64MB worth of spans
// maxObletBytes is the maximum bytes of an object to scan at
// once. Larger objects will be split up into "oblets" of at
// most this size. Since we can scan 1–2 MB/ms, 128 KB bounds
// scan preemption at ~100 µs.
//
// This must be > _MaxSmallSize so that the object base is the
// span base.
maxObletBytes = 128 << 10
// drainCheckThreshold specifies how many units of work to do
// between self-preemption checks in gcDrain. Assuming a scan
// rate of 1 MB/ms, this is ~100 µs. Lower values have higher
// overhead in the scan loop (the scheduler check may perform
// a syscall, so its overhead is nontrivial). Higher values
// make the system less responsive to incoming work.
drainCheckThreshold = 100000
)
const (
// The background scavenger is paced according to these parameters.
//
// scavengePercent represents the portion of mutator time we're willing
// to spend on scavenging in percent.
//
// scavengePageLatency is a worst-case estimate (order-of-magnitude) of
// the time it takes to scavenge one (regular-sized) page of memory.
// scavengeHugePageLatency is the same but for huge pages.
//
// scavengePagePeriod is derived from scavengePercent and scavengePageLatency,
// and represents the average time between scavenging one page that we're
// aiming for. scavengeHugePagePeriod is the same but for huge pages.
// These constants are core to the scavenge pacing algorithm.
scavengePercent = 1 // 1%
scavengePageLatency = 10e3 // 10µs
scavengeHugePageLatency = 10e3 // 10µs
scavengePagePeriod = scavengePageLatency / (scavengePercent / 100.0)
scavengeHugePagePeriod = scavengePageLatency / (scavengePercent / 100.0)
//
)
const (
gcSweepBlockEntries = 512 // 4KB on 64-bit
gcSweepBufInitSpineCap = 256 // Enough for 1GB heap on 64-bit
)
const (
_WorkbufSize = 2048 // in bytes; larger values result in less contention
// workbufAlloc is the number of bytes to allocate at a time
// for new workbufs. This must be a multiple of pageSize and
// should be a multiple of _WorkbufSize.
//
// Larger values reduce workbuf allocation overhead. Smaller
// values reduce heap fragmentation.
workbufAlloc = 32 << 10
)
const (
numSpanClasses = _NumSizeClasses << 1
tinySpanClass = spanClass(tinySizeClass<<1 | 1)
)
const (
_KindSpecialFinalizer = 1
_KindSpecialProfile = 2
)
const (
// wbBufEntries is the number of write barriers between
// flushes of the write barrier buffer.
//
// This trades latency for throughput amortization. Higher
// values amortize flushing overhead more, but increase the
// latency of flushing. Higher values also increase the cache
// footprint of the buffer.
//
// TODO: What is the latency cost of this? Tune this value.
wbBufEntries = 256
// wbBufEntryPointers is the number of pointers added to the
// buffer by each write barrier.
wbBufEntryPointers = 2
)
pollDesc contains 2 binary semaphores, rg and wg, to park reader and writer
goroutines respectively. The semaphore can be in the following states:
pdReady - io readiness notification is pending;
a goroutine consumes the notification by changing the state to nil.
pdWait - a goroutine prepares to park on the semaphore, but not yet parked;
the goroutine commits to park by changing the state to G pointer,
or, alternatively, concurrent io notification changes the state to READY,
or, alternatively, concurrent timeout/close changes the state to nil.
G pointer - the goroutine is blocked on the semaphore;
io notification or timeout/close changes the state to READY or nil respectively
and unparks the goroutine.
nil - nothing of the above.
const (
pdReady uintptr = 1
pdWait uintptr = 2
)
const (
_FUTEX_PRIVATE_FLAG = 128
_FUTEX_WAIT_PRIVATE = 0 | _FUTEX_PRIVATE_FLAG
_FUTEX_WAKE_PRIVATE = 1 | _FUTEX_PRIVATE_FLAG
)
Clone, the Linux rfork.
const (
_CLONE_VM = 0x100
_CLONE_FS = 0x200
_CLONE_FILES = 0x400
_CLONE_SIGHAND = 0x800
_CLONE_PTRACE = 0x2000
_CLONE_VFORK = 0x4000
_CLONE_PARENT = 0x8000
_CLONE_THREAD = 0x10000
_CLONE_NEWNS = 0x20000
_CLONE_SYSVSEM = 0x40000
_CLONE_SETTLS = 0x80000
_CLONE_PARENT_SETTID = 0x100000
_CLONE_CHILD_CLEARTID = 0x200000
_CLONE_UNTRACED = 0x800000
_CLONE_CHILD_SETTID = 0x1000000
_CLONE_STOPPED = 0x2000000
_CLONE_NEWUTS = 0x4000000
_CLONE_NEWIPC = 0x8000000
cloneFlags = _CLONE_VM |
_CLONE_FS |
_CLONE_FILES |
_CLONE_SIGHAND |
_CLONE_SYSVSEM |
_CLONE_THREAD /* revisit - okay for now */
)
const (
_AT_NULL = 0 // End of vector
_AT_PAGESZ = 6 // System physical page size
_AT_HWCAP = 16 // hardware capability bit vector
_AT_RANDOM = 25 // introduced in 2.6.29
_AT_HWCAP2 = 26 // hardware capability bit vector 2
)
const (
_SS_DISABLE = 2
_NSIG = 65
_SI_USER = 0
_SIG_BLOCK = 0
_SIG_UNBLOCK = 1
_SIG_SETMASK = 2
)
const (
deferHeaderSize = unsafe.Sizeof(_defer{})
minDeferAlloc = (deferHeaderSize + 15) &^ 15
minDeferArgs = minDeferAlloc - deferHeaderSize
)
Keep a cached value to make gotraceback fast,
since we call it on every call to gentraceback.
The cached value is a uint32 in which the low bits
are the "crash" and "all" settings and the remaining
bits are the traceback value (0 off, 1 on, 2 include system).
const (
tracebackCrash = 1 << iota
tracebackAll
tracebackShift = iota
)
defined constants
const (
// _Gidle means this goroutine was just allocated and has not
// yet been initialized.
_Gidle = iota // 0
// _Grunnable means this goroutine is on a run queue. It is
// not currently executing user code. The stack is not owned.
_Grunnable // 1
// _Grunning means this goroutine may execute user code. The
// stack is owned by this goroutine. It is not on a run queue.
// It is assigned an M and a P.
_Grunning // 2
// _Gsyscall means this goroutine is executing a system call.
// It is not executing user code. The stack is owned by this
// goroutine. It is not on a run queue. It is assigned an M.
_Gsyscall // 3
// _Gwaiting means this goroutine is blocked in the runtime.
// It is not executing user code. It is not on a run queue,
// but should be recorded somewhere (e.g., a channel wait
// queue) so it can be ready()d when necessary. The stack is
// not owned *except* that a channel operation may read or
// write parts of the stack under the appropriate channel
// lock. Otherwise, it is not safe to access the stack after a
// goroutine enters _Gwaiting (e.g., it may get moved).
_Gwaiting // 4
// _Gmoribund_unused is currently unused, but hardcoded in gdb
// scripts.
_Gmoribund_unused // 5
// _Gdead means this goroutine is currently unused. It may be
// just exited, on a free list, or just being initialized. It
// is not executing user code. It may or may not have a stack
// allocated. The G and its stack (if any) are owned by the M
// that is exiting the G or that obtained the G from the free
// list.
_Gdead // 6
// _Genqueue_unused is currently unused.
_Genqueue_unused // 7
// _Gcopystack means this goroutine's stack is being moved. It
// is not executing user code and is not on a run queue. The
// stack is owned by the goroutine that put it in _Gcopystack.
_Gcopystack // 8
// _Gscan combined with one of the above states other than
// _Grunning indicates that GC is scanning the stack. The
// goroutine is not executing user code and the stack is owned
// by the goroutine that set the _Gscan bit.
//
// _Gscanrunning is different: it is used to briefly block
// state transitions while GC signals the G to scan its own
// stack. This is otherwise like _Grunning.
//
// atomicstatus&~Gscan gives the state the goroutine will
// return to when the scan completes.
_Gscan = 0x1000
_Gscanrunnable = _Gscan + _Grunnable // 0x1001
_Gscanrunning = _Gscan + _Grunning // 0x1002
_Gscansyscall = _Gscan + _Gsyscall // 0x1003
_Gscanwaiting = _Gscan + _Gwaiting // 0x1004
)
const (
// _Pidle means a P is not being used to run user code or the
// scheduler. Typically, it's on the idle P list and available
// to the scheduler, but it may just be transitioning between
// other states.
//
// The P is owned by the idle list or by whatever is
// transitioning its state. Its run queue is empty.
_Pidle = iota
// _Prunning means a P is owned by an M and is being used to
// run user code or the scheduler. Only the M that owns this P
// is allowed to change the P's status from _Prunning. The M
// may transition the P to _Pidle (if it has no more work to
// do), _Psyscall (when entering a syscall), or _Pgcstop (to
// halt for the GC). The M may also hand ownership of the P
// off directly to another M (e.g., to schedule a locked G).
_Prunning
// _Psyscall means a P is not running user code. It has
// affinity to an M in a syscall but is not owned by it and
// may be stolen by another M. This is similar to _Pidle but
// uses lightweight transitions and maintains M affinity.
//
// Leaving _Psyscall must be done with a CAS, either to steal
// or retake the P. Note that there's an ABA hazard: even if
// an M successfully CASes its original P back to _Prunning
// after a syscall, it must understand the P may have been
// used by another M in the interim.
_Psyscall
// _Pgcstop means a P is halted for STW and owned by the M
// that stopped the world. The M that stopped the world
// continues to use its P, even in _Pgcstop. Transitioning
// from _Prunning to _Pgcstop causes an M to release its P and
// park.
//
// The P retains its run queue and startTheWorld will restart
// the scheduler on Ps with non-empty run queues.
_Pgcstop
// _Pdead means a P is no longer used (GOMAXPROCS shrank). We
// reuse Ps if GOMAXPROCS increases. A dead P is mostly
// stripped of its resources, though a few things remain
// (e.g., trace buffers).
_Pdead
)
Values for the flags field of a sigTabT.
const (
_SigNotify = 1 << iota // let signal.Notify have signal, even if from kernel
_SigKill // if signal.Notify doesn't take it, exit quietly
_SigThrow // if signal.Notify doesn't take it, exit loudly
_SigPanic // if the signal is from the kernel, panic
_SigDefault // if the signal isn't explicitly requested, don't monitor it
_SigGoExit // cause all runtime procs to exit (only used on Plan 9).
_SigSetStack // add SA_ONSTACK to libc handler
_SigUnblock // always unblock; see blockableSig
_SigIgn // _SIG_DFL action is to ignore the signal
)
const (
_TraceRuntimeFrames = 1 << iota // include frames for internal runtime functions.
_TraceTrap // the initial PC, SP are from a trap, not a return PC from a call
_TraceJumpStack // if traceback is on a systemstack, resume trace at g that called into it
)
scase.kind values.
Known to compiler.
Changes here must also be made in src/cmd/compile/internal/gc/select.go's walkselect.
const (
caseNil = iota
caseRecv
caseSend
caseDefault
)
const (
_SIG_DFL uintptr = 0
_SIG_IGN uintptr = 1
)
const (
sigIdle = iota
sigReceiving
sigSending
)
const (
_MaxSmallSize = 32768
smallSizeDiv = 8
smallSizeMax = 1024
largeSizeDiv = 128
_NumSizeClasses = 67
_PageShift = 13
)
const (
mantbits64 uint = 52
expbits64 uint = 11
bias64 = -1<<(expbits64-1) + 1
nan64 uint64 = (1<<expbits64-1)<<mantbits64 + 1
inf64 uint64 = (1<<expbits64 - 1) << mantbits64
neg64 uint64 = 1 << (expbits64 + mantbits64)
mantbits32 uint = 23
expbits32 uint = 8
bias32 = -1<<(expbits32-1) + 1
nan32 uint32 = (1<<expbits32-1)<<mantbits32 + 1
inf32 uint32 = (1<<expbits32 - 1) << mantbits32
neg32 uint32 = 1 << (expbits32 + mantbits32)
)
const (
// StackSystem is a number of additional bytes to add
// to each stack below the usual guard area for OS-specific
// purposes like signal handling. Used on Windows, Plan 9,
// and iOS because they do not use a separate stack.
_StackSystem = sys.GoosWindows*512*sys.PtrSize + sys.GoosPlan9*512 + sys.GoosDarwin*sys.GoarchArm*1024 + sys.GoosDarwin*sys.GoarchArm64*1024
// The minimum size of stack used by Go code
_StackMin = 2048
// The minimum stack size to allocate.
// The hackery here rounds FixedStack0 up to a power of 2.
_FixedStack0 = _StackMin + _StackSystem
_FixedStack1 = _FixedStack0 - 1
_FixedStack2 = _FixedStack1 | (_FixedStack1 >> 1)
_FixedStack3 = _FixedStack2 | (_FixedStack2 >> 2)
_FixedStack4 = _FixedStack3 | (_FixedStack3 >> 4)
_FixedStack5 = _FixedStack4 | (_FixedStack4 >> 8)
_FixedStack6 = _FixedStack5 | (_FixedStack5 >> 16)
_FixedStack = _FixedStack6 + 1
// Functions that need frames bigger than this use an extra
// instruction to do the stack split check, to avoid overflow
// in case SP - framesize wraps below zero.
// This value can be no bigger than the size of the unmapped
// space at zero.
_StackBig = 4096
// The stack guard is a pointer this many bytes above the
// bottom of the stack.
_StackGuard = 880*sys.StackGuardMultiplier + _StackSystem
// After a stack split check the SP is allowed to be this
// many bytes below the stack guard. This saves an instruction
// in the checking sequence for tiny frames.
_StackSmall = 128
// The maximum number of bytes that a chain of NOSPLIT
// functions can use.
_StackLimit = _StackGuard - _StackSystem - _StackSmall
)
const (
// stackDebug == 0: no logging
// == 1: logging of per-stack operations
// == 2: logging of per-frame operations
// == 3: logging of per-word updates
// == 4: logging of per-word reads
stackDebug = 0
stackFromSystem = 0 // allocate stacks from system memory instead of the heap
stackFaultOnFree = 0 // old stacks are mapped noaccess to detect use after free
stackPoisonCopy = 0 // fill stack that should not be accessed with garbage, to detect bad dereferences during copy
stackNoCache = 0 // disable per-P small stack caches
// check the BP links during traceback.
debugCheckBP = false
)
const (
uintptrMask = 1<<(8*sys.PtrSize) - 1
// Goroutine preemption request.
// Stored into g->stackguard0 to cause split stack check failure.
// Must be greater than any real sp.
// 0xfffffade in hex.
stackPreempt = uintptrMask & -1314
// Thread is forking.
// Stored into g->stackguard0 to cause split stack check failure.
// Must be greater than any real sp.
stackFork = uintptrMask & -1234
)
const (
maxUint = ^uint(0)
maxInt = int(maxUint >> 1)
)
PCDATA and FUNCDATA table indexes.
See funcdata.h and ../cmd/internal/objabi/funcdata.go. = -0x80000000
)
Event types in the trace, args are given in square brackets.
const (
traceEvNone = 0 // unused
traceEvBatch = 1 // start of per-P batch of events [pid, timestamp]
traceEvFrequency = 2 // contains tracer timer frequency [frequency (ticks per second)]
traceEvStack = 3 // stack [stack id, number of PCs, array of {PC, func string ID, file string ID, line}]
traceEvGomaxprocs = 4 // current value of GOMAXPROCS [timestamp, GOMAXPROCS, stack id]
traceEvProcStart = 5 // start of P [timestamp, thread id]
traceEvProcStop = 6 // stop of P [timestamp]
traceEvGCStart = 7 // GC start [timestamp, seq, stack id]
traceEvGCDone = 8 // GC done [timestamp]
traceEvGCSTWStart = 9 // GC STW start [timestamp, kind]
traceEvGCSTWDone = 10 // GC STW done [timestamp]
traceEvGCSweepStart = 11 // GC sweep start [timestamp, stack id]
traceEvGCSweepDone = 12 // GC sweep done [timestamp, swept, reclaimed]
traceEvGoCreate = 13 // goroutine creation [timestamp, new goroutine id, new stack id, stack id]
traceEvGoStart = 14 // goroutine starts running [timestamp, goroutine id, seq]
traceEvGoEnd = 15 // goroutine ends [timestamp]
traceEvGoStop = 16 // goroutine stops (like in select{}) [timestamp, stack]
traceEvGoSched = 17 // goroutine calls Gosched [timestamp, stack]
traceEvGoPreempt = 18 // goroutine is preempted [timestamp, stack]
traceEvGoSleep = 19 // goroutine calls Sleep [timestamp, stack]
traceEvGoBlock = 20 // goroutine blocks [timestamp, stack]
traceEvGoUnblock = 21 // goroutine is unblocked [timestamp, goroutine id, seq, stack]
traceEvGoBlockSend = 22 // goroutine blocks on chan send [timestamp, stack]
traceEvGoBlockRecv = 23 // goroutine blocks on chan recv [timestamp, stack]
traceEvGoBlockSelect = 24 // goroutine blocks on select [timestamp, stack]
traceEvGoBlockSync = 25 // goroutine blocks on Mutex/RWMutex [timestamp, stack]
traceEvGoBlockCond = 26 // goroutine blocks on Cond [timestamp, stack]
traceEvGoBlockNet = 27 // goroutine blocks on network [timestamp, stack]
traceEvGoSysCall = 28 // syscall enter [timestamp, stack]
traceEvGoSysExit = 29 // syscall exit [timestamp, goroutine id, seq, real timestamp]
traceEvGoSysBlock = 30 // syscall blocks [timestamp]
traceEvGoWaiting = 31 // denotes that goroutine is blocked when tracing starts [timestamp, goroutine id]
traceEvGoInSyscall = 32 // denotes that goroutine is in syscall when tracing starts [timestamp, goroutine id]
traceEvHeapAlloc = 33 // memstats.heap_live change [timestamp, heap_alloc]
traceEvNextGC = 34 // memstats.next_gc change [timestamp, next_gc]
traceEvTimerGoroutine = 35 // denotes timer goroutine [timer goroutine id]
traceEvFutileWakeup = 36 // denotes that the previous wakeup of this goroutine was futile [timestamp]
traceEvString = 37 // string dictionary entry [ID, length, string]
traceEvGoStartLocal = 38 // goroutine starts running on the same P as the last event [timestamp, goroutine id]
traceEvGoUnblockLocal = 39 // goroutine is unblocked on the same P as the last event [timestamp, goroutine id, stack]
traceEvGoSysExitLocal = 40 // syscall exit on the same P as the last event [timestamp, goroutine id, real timestamp]
traceEvGoStartLabel = 41 // goroutine starts running with label [timestamp, goroutine id, seq, label string id]
traceEvGoBlockGC = 42 // goroutine blocks on GC assist [timestamp, stack]
traceEvGCMarkAssistStart = 43 // GC mark assist start [timestamp, stack]
traceEvGCMarkAssistDone = 44 // GC mark assist done [timestamp]
traceEvUserTaskCreate = 45 // trace.NewContext [timestamp, internal task id, internal parent task id, stack, name string]
traceEvUserTaskEnd = 46 // end of a task [timestamp, internal task id, stack]
traceEvUserRegion = 47 // trace.WithRegion [timestamp, internal task id, mode(0:start, 1:end), stack, name string]
traceEvUserLog = 48 // trace.Log [timestamp, internal task id, key string id, stack, value string]
traceEvCount = 49
)
const (
// Timestamps in trace are cputicks/traceTickDiv.
// This makes absolute values of timestamp diffs smaller,
// and so they are encoded in less number of bytes.
// 64 on x86 is somewhat arbitrary (one tick is ~20ns on a 3GHz machine).
// The suggested increment frequency for PowerPC's time base register is
// 512 MHz according to Power ISA v2.07 section 6.2, so we use 16 on ppc64
// and ppc64le.
// Tracing won't work reliably for architectures where cputicks is emulated
// by nanotime, so the value doesn't matter for those architectures.
traceTickDiv = 16 + 48*(sys.Goarch386|sys.GoarchAmd64|sys.GoarchAmd64p32)
// Maximum number of PCs in a single stack trace.
// Since events contain only stack id rather than whole stack trace,
// we can allow quite large values here.
traceStackSize = 128
// Identifier of a fake P that is used when we trace without a real P.
traceGlobProc = -1
// Maximum number of bytes to encode uint64 in base-128.
traceBytesPerNumber = 10
// Shift of the number of arguments in the first event byte.
traceArgCountShift = 6
// Flag passed to traceGoPark to denote that the previous wakeup of this
// goroutine was futile. For example, a goroutine was unblocked on a mutex,
// but another goroutine got ahead and acquired the mutex before the first
// goroutine is scheduled, so the first goroutine has to block again.
// Such wakeups happen on buffered channels and sync.Mutex,
// but are generally not interesting for end user.
traceFutileWakeup byte =
)
Numbers fundamental to the encoding.
const (
runeError = '\uFFFD' // the "error" Rune or "Unicode replacement character"
runeSelf = 0x80 // characters below Runeself are represented as themselves in a single byte.
maxRune = '\U0010FFFF' // Maximum valid Unicode code point.
)
Code points in the surrogate range are not valid for UTF-8.
const (
surrogateMin = 0xD800
surrogateMax = 0xDFFF
)
const (
t1 = 0x00 // 0000 0000
tx = 0x80 // 1000 0000
t2 = 0xC0 // 1100 0000
t3 = 0xE0 // 1110 0000
t4 = 0xF0 // 1111 0000
t5 = 0xF8 // 1111 1000
maskx = 0x3F // 0011 1111
mask2 = 0x1F // 0001 1111
mask3 = 0x0F // 0000 1111
mask4 = 0x07 // 0000 0111
rune1Max = 1<<7 - 1
rune2Max = 1<<11 - 1
rune3Max = 1<<16 - 1
// The default lowest and highest continuation byte.
locb = 0x80 // 1000 0000
hicb = 0xBF // 1011 1111
)
const (
_AT_SYSINFO_EHDR = 33
_PT_LOAD = 1 /* Loadable program segment */
_PT_DYNAMIC = 2 /* Dynamic linking information */
_DT_NULL = 0 /* Marks end of dynamic section */
_DT_HASH = 4 /* Dynamic symbol hash table */
_DT_STRTAB = 5 /* Address of string table */
_DT_SYMTAB = 6 /* Address of symbol table */
_DT_GNU_HASH = 0x6ffffef5 /* GNU-style dynamic symbol hash table */
_DT_VERSYM = 0x6ffffff0
_DT_VERDEF = 0x6ffffffc
_VER_FLG_BASE = 0x1 /* Version definition of file itself */
_SHN_UNDEF = 0 /* Undefined section */
_SHT_DYNSYM = 11 /* Dynamic linker symbol table */
_STT_FUNC = 2 /* Symbol is a code object */
_STT_NOTYPE = 0 /* Symbol type is not specified */
_STB_GLOBAL = 1 /* Global symbol */
_STB_WEAK = 2 /* Weak symbol */
_EI_NIDENT = 16
// Maximum indices for the array types used when traversing the vDSO ELF structures.
// Computed from architecture-specific max provided by vdso_linux_*.go
vdsoSymTabSize = vdsoArrayMax / unsafe.Sizeof(elfSym{})
vdsoDynSize = vdsoArrayMax / unsafe.Sizeof(elfDyn{})
vdsoSymStringsSize = vdsoArrayMax // byte
vdsoVerSymSize = vdsoArrayMax / 2 // uint16
vdsoHashSize = vdsoArrayMax / 4 // uint32
// vdsoBloomSizeScale is a scaling factor for gnuhash tables which are uint32 indexed,
// but contain uintptrs
vdsoBloomSizeScale = unsafe.Sizeof(uintptr(0)) / 4 // uint32
):
one of 386, amd64, arm, s390x, and so on.
const GOARCH string = sys.GOARCH
GOOS is the running program's operating system target:
one of darwin, freebsd, linux, and so on.
To view possible combinations of GOOS and GOARCH, run "go tool dist list".
const GOOS string = sys.GOOS
const (
// Number of goroutine ids to grab from sched.goidgen to local per-P cache at once.
// 16 seems to provide enough amortization, but other than that it's mostly arbitrary number.
_GoidCacheBatch = 16
)
The maximum number of frames we print for a traceback
const _TracebackMaxFrames = 100
buffer of pending write data
const (
bufSize = 4096
)
const cgoCheckPointerFail = "cgo argument has Go pointer to Go pointer"
const cgoResultFail = "cgo result has Go pointer"
const cgoWriteBarrierFail = "Go pointer stored into non-Go memory"
debugCachedWork enables extra checks for debugging premature mark
termination.
For debugging issue #27993.
const debugCachedWork = false
debugLogBytes is the size of each per-M ring buffer. This is
allocated off-heap to avoid blowing up the M and hence the GC'd
heap size.
const debugLogBytes = 16 << 10
debugLogStringLimit is the maximum number of bytes in a string.
Above this, the string will be truncated with "..(n more bytes).."
const debugLogStringLimit = debugLogBytes / 8
const debugPcln = false
const debugSelect = false
defaultHeapMinimum is the value of heapminimum for GOGC==100.
const defaultHeapMinimum = 4 << 20
const dlogEnabled = false
const fastlogNumBits = 5
forcePreemptNS is the time slice given to a G before it is
preempted.
const forcePreemptNS = 10 * 1000 * 1000 // 10ms
freezeStopWait is a large value that freezetheworld sets
sched.stopwait to in order to request that all Gs permanently stop.
const freezeStopWait = 0x7fffffff
gcAssistTimeSlack is the nanoseconds of mutator assist time that
can accumulate on a P before updating gcController.assistTime.
const gcAssistTimeSlack = 5000
const gcBitsChunkBytes = uintptr(64 << 10)
const gcBitsHeaderBytes = unsafe.Sizeof(gcBitsHeader{})
gcCreditSlack is the amount of scan work creditGoalUtilization is the goal CPU utilization for
marking as a fraction of GOMAXPROCS.
const gcGoalUtilization = 0.30
gcOverAssistWork determines how many extra units of scan work a GC
assist does when an assist happens. This amortizes the cost of an
assist by pre-paying for this many bytes of future allocations.
const gcOverAssistWork = 64 << 10
const hashRandomBytes = sys.PtrSize / 4 * 64
const itabInitSize = 512
const mProfCycleWrap = uint32(len(memRecord{}.future)) * (2 << 24)
const maxCPUProfStack = 64
const maxZero = 1024 // must match value in cmd/compile/internal/gc/walk.go
minPhysPageSize is a lower-bound on the physical page size. The
true physical page size may be larger than this. In contrast,
sys.PhysPageSize is an upper-bound on the physical page size.
const minPhysPageSize = 4096
const minfunc = 16 // minimum function size
const msanenabled = false
osRelaxMinNS is the number of nanoseconds of idleness to tolerate
without performing an osRelax. Since osRelax may reduce the
precision of timers, this should be enough larger than the relaxed
timer precision to keep the timer error acceptable.
const osRelaxMinNS = 0
const pcbucketsize = 256 * minfunc // size of bucket in the pc->func lookup table
persistentChunkSize is the number of bytes we allocate when we grow
a persistentAlloc.
const persistentChunkSize = 256 << 10
const pollBlockSize = 4 * 1024
const raceenabled = false
To shake out latent assumptions about scheduling order,
we introduce some randomness into scheduling decisions
when running with the race detector.
The need for this was made obvious by changing the
(deterministic) scheduling order in Go 1.5 and breaking
many poorly-written tests.
With the randomness here, as long as the tests pass
consistently with -race, they shouldn't have latent scheduling
assumptions.
const randomizeScheduler = raceenabled
const rwmutexMaxReaders = 1 << 30
Prime to not correlate with any user patterns.
const semTabSize = 251
const sizeofSkipFunction = 256
const stackTraceDebug = false
testSmallBuf forces a small write barrier buffer to stress write
barrier flushing.
const testSmallBuf = false
timersLen is the length of timers array.
Ideally, this would be set to GOMAXPROCS, but that would require
dynamic reallocation
The current value is a compromise between memory usage and performance
that should cover the majority of GOMAXPROCS values used in the wild.
const timersLen = 64
The constant is known to the compiler.
There is no fundamental theory behind this number.
const tmpStringBufSize = 32
treapFilterAll represents the filter which allows all spans.
const treapFilterAll = ^treapIterFilter(0)
const usesLR = sys.MinFrameSize > 0
const (
// vdsoArrayMax is the byte-size of a maximally sized array on this architecture.
// See cmd/compile/internal/amd64/galign.go arch.MAXWIDTH initialization.
vdsoArrayMax = 1<<50 - 1
)
var (
_cgo_init unsafe.Pointer
_cgo_thread_start unsafe.Pointer
_cgo_sys_thread_create unsafe.Pointer
_cgo_notify_runtime_init_done unsafe.Pointer
_cgo_callers unsafe.Pointer
_cgo_set_context_function unsafe.Pointer
_cgo_yield unsafe.Pointer
)
var (
// Set in runtime.cpuinit.
// TODO: deprecate these; use internal/cpu directly.
x86HasPOPCNT bool
x86HasSSE41 bool
arm64HasATOMICS bool
)
var (
itabLock mutex // lock for accessing itab table
itabTable = &itabTableInit // pointer to current table
itabTableInit = itabTableType{size: itabInitSize} // starter table
)
var (
uint16Eface interface{} = uint16InterfacePtr(0)
uint32Eface interface{} = uint32InterfacePtr(0)
uint64Eface interface{} = uint64InterfacePtr(0)
stringEface interface{} = stringInterfacePtr("")
sliceEface interface{} = sliceInterfacePtr(nil)
uint16Type *_type = (*eface)(unsafe.Pointer(&uint16Eface))._type
uint32Type *_type = (*eface)(unsafe.Pointer(&uint32Eface))._type
uint64Type *_type = (*eface)(unsafe.Pointer(&uint64Eface))._type
stringType *_type = (*eface)(unsafe.Pointer(&stringEface))._type
sliceType *_type = (*eface)(unsafe.Pointer(&sliceEface))._type
)
physHugePageSize is the size in bytes of the OS's default physical huge
page size whose allocation is opaque to the application. It is assumed
and verified to be a power of two.
If set, this must be set by the OS init code (typically in osinit) before
mallocinit. However, setting it at all is optional, and leaving the default
value is always safe (though potentially less efficient).
Since physHugePageSize is always assumed to be a power of two,
physHugePageShift is defined as physHugePageSize == 1 << physHugePageShift.
The purpose of physHugePageShift is to avoid doing divisions in
performance critical functions.
var (
physHugePageSize uintptr
physHugePageShift uint
)
var (
fingCreate uint32
fingRunning bool
)
var (
mbuckets *bucket // memory profile buckets
bbuckets *bucket // blocking profile buckets
xbuckets *bucket // mutex profile buckets
buckhash *[179999]*bucket
bucketmem uintptr
mProf struct {
// cycle is the global heap profile cycle. This wraps
// at mProfCycleWrap.
cycle uint32
// flushed indicates that future[cycle] in all buckets
// has been flushed to the active profile.
flushed bool
}
)
var (
netpollInited uint32
pollcache pollCache
netpollWaiters uint32
)
var (
// printBacklog is a circular buffer of messages written with the builtin
// print* functions, for use in postmortem analysis of core dumps.
printBacklog [512]byte
printBacklogIndex int
)
var (
m0 m
g0 g
raceprocctx0 uintptr
)
var (
argc int32
argv **byte
)
var (
allglen uintptr
allm *m
allp []*p // len(allp) == gomaxprocs; may change at safe points, otherwise immutable
allpLock mutex // Protects P-less reads of allp and all writes
gomaxprocs int32
ncpu int32
forcegc forcegcstate
sched schedt
newprocs int32
// Information about what cpu features are available.
// Packages outside the runtime should not use these
// as they are not an external api.
// Set on startup in asm_{386,amd64,amd64p32}.s
processorVersionInfo uint32
isIntel bool
lfenceBeforeRdtsc bool
goarm uint8 // set by cmd/link on arm systems
framepointer_enabled bool // set by cmd/link
)
Set by the linker so the runtime can determine the buildmode.
var (
islibrary bool // -buildmode=c-shared
isarchive bool // -buildmode=c-archive
)
var (
chansendpc = funcPC(chansend)
chanrecvpc = funcPC(chanrecv)
)
channels for synchronizing signal mask updates with the signal mask
thread
var (
disableSigChan chan uint32
enableSigChan chan uint32
maskUpdatedChan chan struct{}
)
initialize with vsyscall fallbacks
var (
vdsoGettimeofdaySym uintptr = 0xffffffffff600000
vdsoClockgettimeSym uintptr = 0
)
Make the compiler check that heapBits.arena is large enough to hold
the maximum arena frame number.
var _ = heapBits{arena: (1<<heapAddrBits)/heapArenaBytes - 1}
_cgo_mmap is filled in by runtime/cgo when it is linked into the
program, so it is only non-nil when using cgo.
go:linkname _cgo_mmap _cgo_mmap
var _cgo_mmap unsafe.Pointer
_cgo_munmap is filled in by runtime/cgo when it is linked into the
program, so it is only non-nil when using cgo.
go:linkname _cgo_munmap _cgo_munmap
var _cgo_munmap unsafe.Pointer
var _cgo_setenv unsafe.Pointer // pointer to C function
_cgo_sigaction is filled in by runtime/cgo when it is linked into the
program, so it is only non-nil when using cgo.
go:linkname _cgo_sigaction _cgo_sigaction
var _cgo_sigaction unsafe.Pointer
var _cgo_unsetenv unsafe.Pointer // pointer to C function
var addrspace_vec [1]byte
var adviseUnused = uint32(_MADV_FREE)
used in asm_{386,amd64,arm64}.s to seed the hash function
var aeskeysched [hashRandomBytes]byte
var algarray = [alg_max]typeAlg{
alg_NOEQ: {nil, nil},
alg_MEM0: {memhash0, memequal0},
alg_MEM8: {memhash8, memequal8},
alg_MEM16: {memhash16, memequal16},
alg_MEM32: {memhash32, memequal32},
alg_MEM64: {memhash64, memequal64},
alg_MEM128: {memhash128, memequal128},
alg_STRING: {strhash, strequal},
alg_INTER: {interhash, interequal},
alg_NILINTER: {nilinterhash, nilinterequal},
alg_FLOAT32: {f32hash, f32equal},
alg_FLOAT64: {f64hash, f64equal},
alg_CPLX64: {c64hash, c64equal},
alg_CPLX128: {c128hash, c128equal},
}
var argslice []string
var badmorestackg0Msg = "fatal: morestack on g0\n"
var badmorestackgsignalMsg = "fatal: morestack on gsignal\n"
var badsystemstackMsg = "fatal: systemstack called from unexpected goroutine"
var blockprofilerate uint64 // in CPU ticks
boundsErrorFmts provide error text for various out-of-bounds panics.
Note: if you change these strings, you should adjust the size of the buffer
in boundsError.Error below as well.
var boundsErrorFmts = [...]string{
boundsIndex: "index out of range [%x] with length %y",
boundsSliceAlen: "slice bounds out of range [:%x] with length %y",
boundsSliceAcap: "slice bounds out of range [:%x] with capacity %y",
boundsSliceB: "slice bounds out of range [%x:%y]",
boundsSlice3Alen: "slice bounds out of range [::%x] with length %y",
boundsSlice3Acap: "slice bounds out of range [::%x] with capacity %y",
boundsSlice3B: "slice bounds out of range [:%x:%y]",
boundsSlice3C: "slice bounds out of range [%x:%y:]",
}
boundsNegErrorFmts are overriding formats if x is negative. In this case there's no need to report y.
var boundsNegErrorFmts = [...]string{
boundsIndex: "index out of range [%x]",
boundsSliceAlen: "slice bounds out of range [:%x]",
boundsSliceAcap: "slice bounds out of range [:%x]",
boundsSliceB: "slice bounds out of range [%x:]",
boundsSlice3Alen: "slice bounds out of range [::%x]",
boundsSlice3Acap: "slice bounds out of range [::%x]",
boundsSlice3B: "slice bounds out of range [:%x:]",
boundsSlice3C: "slice bounds out of range [%x::]",
}
var buf [bufSize]byte
var buildVersion = sys.TheVersion
cgoAlwaysFalse is a boolean value that is always false.
The cgo-generated code says if cgoAlwaysFalse { cgoUse(p) }.
The compiler cannot see that cgoAlwaysFalse is always false,
so it emits the test and keeps the call, giving the desired
escape analysis result. The test is cheaper than the call.
var cgoAlwaysFalse bool
var cgoContext unsafe.Pointer
cgoHasExtraM is set on startup when an extra M is created for cgo.
The extra M must be created before any C/C++ code calls cgocallback.
var cgoHasExtraM bool
var cgoSymbolizer unsafe.Pointer
When running with cgo, we call _cgo_thread_start
to start threads for us so that we can play nicely with
foreign code.
var cgoThreadStart unsafe.Pointer
var cgoTraceback unsafe.Pointer
var cgo_yield = &_cgo_yield
var class_to_allocnpages = [_NumSizeClasses]uint8{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 2, 3, 1, 3, 2, 3, 4, 5, 6, 1, 7, 6, 5, 4, 3, 5, 7, 2, 9, 7, 5, 8, 3, 10, 7, 4}
var class_to_divmagic = [_NumSizeClasses]divMagic{{0, 0, 0, 0}, {3, 0, 1, 65528}, {4, 0, 1, 65520}, {5, 0, 1, 65504}, {4, 11, 683, 0}, {6, 0, 1, 65472}, {4, 10, 205, 0}, {5, 9, 171, 0}, {4, 11, 293, 0}, {7, 0, 1, 65408}, {4, 13, 911, 0}, {5, 10, 205, 0}, {4, 12, 373, 0}, {6, 9, 171, 0}, {4, 13, 631, 0}, {5, 11, 293, 0}, {4, 13, 547, 0}, {8, 0, 1, 65280}, {5, 9, 57, 0}, {6, 9, 103, 0}, {5, 12, 373, 0}, {7, 7, 43, 0}, {5, 10, 79, 0}, {6, 10, 147, 0}, {5, 11, 137, 0}, {9, 0, 1, 65024}, {6, 9, 57, 0}, {7, 9, 103, 0}, {6, 11, 187, 0}, {8, 7, 43, 0}, {7, 8, 37, 0}, {10, 0, 1, 64512}, {7, 9, 57, 0}, {8, 6, 13, 0}, {7, 11, 187, 0}, {9, 5, 11, 0}, {8, 8, 37, 0}, {11, 0, 1, 63488}, {8, 9, 57, 0}, {7, 10, 49, 0}, {10, 5, 11, 0}, {7, 10, 41, 0}, {7, 9, 19, 0}, {12, 0, 1, 61440}, {8, 9, 27, 0}, {8, 10, 49, 0}, {11, 5, 11, 0}, {7, 13, 161, 0}, {7, 13, 155, 0}, {8, 9, 19, 0}, {13, 0, 1, 57344}, {8, 12, 111, 0}, {9, 9, 27, 0}, {11, 6, 13, 0}, {7, 14, 193, 0}, {12, 3, 3, 0}, {8, 13, 155, 0}, {11, 8, 37, 0}, {14, 0, 1, 49152}, {11, 8, 29, 0}, {7, 13, 55, 0}, {12, 5, 7, 0}, {8, 14, 193, 0}, {13, 3, 3, 0}, {7, 14, 77, 0}, {12, 7, 19, 0}, {15, 0, 1, 32768}}
var class_to_size = [_NumSizeClasses]uint16{0, 8, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384, 416, 448, 480, 512, 576, 640, 704, 768, 896, 1024, 1152, 1280, 1408, 1536, 1792, 2048, 2304, 2688, 3072, 3200, 3456, 4096, 4864, 5376, 6144, 6528, 6784, 6912, 8192, 9472, 9728, 10240, 10880, 12288, 13568, 14336, 16384, 18432, 19072, 20480, 21760, 24576, 27264, 28672, 32768}
crashing is the number of m's we have waited for when implementing
GOTRACEBACK=crash when a signal is received.
var crashing int32
var dbgvars = []dbgVar{
{"allocfreetrace", &debug.allocfreetrace},
{"clobberfree", &debug.clobberfree},
{"cgocheck", &debug.cgocheck},
{"efence", &debug.efence},
{"gccheckmark", &debug.gccheckmark},
{"gcpacertrace", &debug.gcpacertrace},
{"gcshrinkstackoff", &debug.gcshrinkstackoff},
{"gcstoptheworld", &debug.gcstoptheworld},
{"gctrace", &debug.gctrace},
{"invalidptr", &debug.invalidptr},
{"madvdontneed", &debug.madvdontneed},
{"sbrk", &debug.sbrk},
{"scavenge", &debug.scavenge},
{"scheddetail", &debug.scheddetail},
{"schedtrace", &debug.schedtrace},
{"tracebackancestors", &debug.tracebackancestors},
}
Holds variables parsed from GODEBUG env var,
except for "memprofilerate" since there is an
existing int var for that value, which may
already have an initial value.
var debug struct {
allocfreetrace int32
cgocheck int32
clobberfree int32
efence int32
gccheckmark int32
gcpacertrace int32
gcshrinkstackoff int32
gcstoptheworld int32
gctrace int32
invalidptr int32
madvdontneed int32 // for Linux; issue 28466
sbrk int32
scavenge int32
scheddetail int32
schedtrace int32
tracebackancestors int32
}
var debugPtrmask struct {
lock mutex
data *byte
}
var didothers bool
var divideError = error(errorString("integer divide by zero"))
var dumpfd uintptr // fd to write the dump to.
var dumphdr = []byte("go1.7 heap dump\n")
var earlycgocallback = []byte("fatal error: cgo callback before cgo call\n")
var envs []string
var (
epfd int32 = -1 // epoll descriptor
)
var extraMCount uint32 // Protected by lockextra
var extraMWaiters uint32
var extram uintptr
var failallocatestack = []byte("runtime: failed to allocate stack for the new OS thread\n")
var failthreadcreate = []byte("runtime: failed to create new OS thread\n")
nacl fake time support - time in nanoseconds since 1970
var faketime int64
var fastlog2Table = [1<<fastlogNumBits + 1]float64{
0,
0.0443941193584535,
0.08746284125033943,
0.12928301694496647,
0.16992500144231248,
0.2094533656289499,
0.24792751344358555,
0.28540221886224837,
0.3219280948873623,
0.3575520046180837,
0.39231742277876036,
0.4262647547020979,
0.4594316186372973,
0.4918530963296748,
0.5235619560570128,
0.5545888516776374,
0.5849625007211563,
0.6147098441152082,
0.6438561897747247,
0.6724253419714956,
0.7004397181410922,
0.7279204545631992,
0.7548875021634686,
0.7813597135246596,
0.8073549220576042,
0.8328900141647417,
0.8579809951275721,
0.8826430493618412,
0.9068905956085185,
0.9307373375628862,
0.9541963103868752,
0.9772799234999164,
1,
}
var finalizer1 = [...]byte{
1<<0 | 1<<1 | 0<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 0<<7,
1<<0 | 1<<1 | 1<<2 | 1<<3 | 0<<4 | 1<<5 | 1<<6 | 1<<7,
1<<0 | 0<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 0<<6 | 1<<7,
1<<0 | 1<<1 | 1<<2 | 0<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7,
0<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 0<<5 | 1<<6 | 1<<7,
}
var fingwait bool
var fingwake bool
var finptrmask [_FinBlockSize / sys.PtrSize / 8]byte
var floatError = error(errorString("floating point error"))
forcegcperiod is the maximum time in nanoseconds between garbage
collections. If we go this long without a garbage collection, one
is forced to run.
This is a variable for testing purposes. It normally doesn't change.
var forcegcperiod int64 = 2 * 60 * 1e9
Bit vector of free marks.
Needs to be as big as the largest number of objects per span.
var freemark [_PageSize / 8]bool
freezing is set to non-zero if the runtime is trying to freeze the
world.
var freezing uint32
Stores the signal handlers registered before Go installed its own.
These signal handlers will be invoked in cases where Go doesn't want to
handle a particular signal (e.g., signal occurred on a non-Go thread).
See sigfwdgo for more information on when the signals are forwarded.
This is read by the signal handler; accesses should use
atomic.Loaduintptr and atomic.Storeuintptr.
var fwdSig [_NSIG]uintptr
var gStatusStrings = [...]string{
_Gidle: "idle",
_Grunnable: "runnable",
_Grunning: "running",
_Gsyscall: "syscall",
_Gwaiting: "waiting",
_Gdead: "dead",
_Gcopystack: "copystack",
}
var gcBitsArenas struct {
lock mutex
free *gcBitsArena
next *gcBitsArena // Read atomically. Write atomically under lock.
current *gcBitsArena
previous *gcBitsArena
}
gcBlackenEnabled is 1 if mutator assists and background mark
workers are allowed to blacken objects. This must only be set when
gcphase == _GCmark.
var gcBlackenEnabled uint
gcMarkWorkerModeStrings are the strings labels of gcMarkWorkerModes
to use in execution traces.
var gcMarkWorkerModeStrings = [...]string{
"GC (dedicated)",
"GC (fractional)",
"GC (idle)",
}
gcWorkPauseGen is for debugging the mark completion algorithm.
gcWork put operations spin while gcWork.pauseGen == gcWorkPauseGen.
Only used if debugCachedWork is true.
var gcWorkPauseGen uint32 = 1
Initialized from $GOGC. GOGC=off means no GC.
var gcpercent int32
Garbage collector phase.
Indicates to write barrier and synchronization task to perform.
var gcphase uint32
var globalAlloc struct {
mutex
persistentAlloc
}
handlingSig is indexed by signal number and is non-zero if we are
currently handling the signal. Or, to put it another way, whether
the signal handler is currently set to the Go signal handler or not.
This is uint32 rather than bool so that we can use atomic instructions.
var handlingSig [_NSIG]uint32
exported value for testing
var hashLoad = float32(loadFactorNum) / float32(loadFactorDen)
used in hash{32,64}.go to seed the hash function
var hashkey [4]uintptr
inForkedChild is true while manipulating signals in the child process.
This is used to avoid calling libc functions in case we are using vfork.
var inForkedChild bool
var inf = float64frombits(0x7FF0000000000000)
iscgo is set to true by the runtime/cgo package
var iscgo bool
var labelSync uintptr
mSpanStateNames are the names of the span states, indexed by
mSpanState.
var mSpanStateNames = []string{
"mSpanDead",
"mSpanInUse",
"mSpanManual",
"mSpanFree",
}
mainStarted indicates that the main M has started.
var mainStarted bool
main_init_done is a signal used by cgocallbackg that initialization
has been completed. It is made before _cgo_notify_runtime_init_done,
so all cgo calls can rely on it existing. When main_init is complete,
it is closed, meaning cgocallbackg can reliably receive from it.
var main_init_done chan bool
var maxstacksize uintptr = 1 << 20 // enough until runtime.main sets it for real
var memoryError = error(errorString("invalid memory address or nil pointer dereference"))
set using cmd/go/internal/modload.ModInfoProg
var modinfo string
var modulesSlice *[]*moduledata // see activeModules
var mutexprofilerate uint64 // fraction sampled
var nbuf uintptr
newmHandoff contains a list of m structures that need new OS threads.
This is used by newm in situations where newm itself can't safely
start an OS thread.
var newmHandoff struct {
lock mutex
// newm points to a list of M structures that need new OS
// threads. The list is linked through m.schedlink.
newm muintptr
// waiting indicates that wake needs to be notified when an m
// is put on the list.
waiting bool
wake note
// haveTemplateThread indicates that the templateThread has
// been started. This is not protected by lock. Use cas to set
// to 1.
haveTemplateThread uint32
}
oneBitCount is indexed by byte and produces the
number of 1 bits in that byte. For example 128 has 1 bit set
and oneBitCount[128] will holds 1.
var oneBitCount = [256]uint}
ptrmask for an allocation containing a single pointer.
var oneptrmask = [...]uint8{1}
var overflowError = error(errorString("integer overflow"))
var overflowTag [1]unsafe.Pointer // always nil
panicking is non-zero when crashing the program for an unrecovered panic.
panicking is incremented and decremented atomically.
var panicking uint32
physPageSize is the size in bytes of the OS's physical pages.
Mapping and unmapping operations must be done at multiples of
physPageSize.
This must be set by the OS init code (typically in osinit) before
mallocinit.
var physPageSize uintptr
pinnedTypemaps are the map[typeOff]*_type from the moduledata objects.
These typemap objects are allocated at run time on the heap, but the
only direct reference to them is in the moduledata, created by the
linker and marked SNOPTRDATA so it is ignored by the GC.
To make sure the map isn't collected, we keep a second reference here.
var pinnedTypemaps []map[typeOff]*_type
var poolcleanup func()
var procAuxv = []byte("/proc/self/auxv\x00")
var prof struct {
signalLock uint32
hz int32
}
var ptrnames = []string{
0: "scalar",
1: "ptr",
}
var racecgosync uint64 // represents possible synchronization in C code
reflectOffs holds type offsets defined at run time by the reflect package.
When a type is defined at run time, its *rtype data lives on the heap.
There are a wide range of possible addresses the heap may use, that
may not be representable as a 32-bit offset. Moreover the GC may
one day start moving heap memory, in which case there is no stable
offset that can be defined.
To provide stable offsets, we add pin *rtype objects in a global map
and treat the offset as an identifier. We use negative offsets that
do not overlap with any compile-time module offsets.
Entries are created by reflect.addReflectOff.
var reflectOffs struct {
lock mutex
next int32
m map[int32]unsafe.Pointer
minv map[unsafe.Pointer]int32
}
runningPanicDefers is non-zero while running deferred functions for panic.
runningPanicDefers is incremented and decremented atomically.
This is used to try hard to get a panic stack trace out when exiting.
var runningPanicDefers uint32
runtimeInitTime is the nanotime() at which the runtime started.
var runtimeInitTime int64
Sleep/wait state of the background scavenger.
var scavenge struct {
lock mutex
g *g
parked bool
timer *timer
// Generation counter.
//
// It represents the last generation count (as defined by
// mheap_.scavengeGen) checked by the scavenger and is updated
// each time the scavenger checks whether it is on-pace.
//
// Skew between this field and mheap_.scavengeGen is used to
// determine whether a new update is available.
//
// Protected by mheap_.lock.
gen uint64
}
var semtable [semTabSize]struct {
root semaRoot
pad [cpu.CacheLinePadSize - unsafe.Sizeof(semaRoot{})]byte
}
var shiftError = error(errorString("negative shift amount"))
}
var signalsOK bool
var sigprofCallersUse uint32
var sigset_all = sigset{^uint32(0), ^uint32(0)}
var sigtable = [...]sigTabT{
{0, "SIGNONE: no trap"},
{_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
{_SigNotify + _SigKill, "SIGINT: interrupt"},
{_SigNotify + _SigThrow, "SIGQUIT: quit"},
{_SigThrow + _SigUnblock, "SIGILL: illegal instruction"},
{_SigThrow + _SigUnblock, "SIGTRAP: trace trap"},
{_SigNotify + _SigThrow, "SIGABRT: abort"},
{_SigPanic + _SigUnblock, "SIGBUS: bus error"},
{_SigPanic + _SigUnblock, "SIGFPE: floating-point exception"},
{0, "SIGKILL: kill"},
{_SigNotify, "SIGUSR1: user-defined signal 1"},
{_SigPanic + _SigUnblock, "SIGSEGV: segmentation violation"},
{_SigNotify, "SIGUSR2: user-defined signal 2"},
{_SigNotify, "SIGPIPE: write to broken pipe"},
{_SigNotify, "SIGALRM: alarm clock"},
{_SigNotify + _SigKill, "SIGTERM: termination"},
{_SigThrow + _SigUnblock, "SIGSTKFLT: stack fault"},
{_SigNotify + _SigUnblock + _SigIgn, "SIGCHLD: child status has changed"},
{_SigNotify + _SigDefault + _SigIgn, "SIGCONT: continue"},
{0, "SIGSTOP: stop, unblockable"},
{_SigNotify + _SigDefault + _SigIgn, "SIGTSTP: keyboard stop"},
{_SigNotify + _SigDefault + _SigIgn, "SIGTTIN: background read from tty"},
{_SigNotify + _SigDefault + _SigIgn, "SIGTTOU: background write to tty"},
{_SigNotify + _SigIgn, "SIGURG: urgent condition on socket"},
{_SigNotify, "SIGXCPU: cpu limit exceeded"},
{_SigNotify, "SIGXFSZ: file size limit exceeded"},
{_SigNotify, "SIGVTALRM: virtual alarm clock"},
{_SigNotify + _SigUnblock, "SIGPROF: profiling alarm clock"},
{_SigNotify + _SigIgn, "SIGWINCH: window size change"},
{_SigNotify, "SIGIO: i/o now possible"},
{_SigNotify, "SIGPWR: power failure restart"},
{_SigThrow, "SIGSYS: bad system call"},
{_SigSetStack + _SigUnblock, "signal 32"},
{_SigSetStack + _SigUnblock, "signal 33"},
{_SigNotify, "signal 34"},
{_SigNotify, "signal 35"},
{_SigNotify, "signal 36"},
{_SigNotify, "signal 37"},
{_SigNotify, "signal 38"},
{_SigNotify, "signal 39"},
{_SigNotify, "signal 40"},
{_SigNotify, "signal 41"},
{_SigNotify, "signal 42"},
{_SigNotify, "signal 43"},
{_SigNotify, "signal 44"},
{_SigNotify, "signal 45"},
{_SigNotify, "signal 46"},
{_SigNotify, "signal 47"},
{_SigNotify, "signal 48"},
{_SigNotify, "signal 49"},
{_SigNotify, "signal 50"},
{_SigNotify, "signal 51"},
{_SigNotify, "signal 52"},
{_SigNotify, "signal 53"},
{_SigNotify, "signal 54"},
{_SigNotify, "signal 55"},
{_SigNotify, "signal 56"},
{_SigNotify, "signal 57"},
{_SigNotify, "signal 58"},
{_SigNotify, "signal 59"},
{_SigNotify, "signal 60"},
{_SigNotify, "signal 61"},
{_SigNotify, "signal 62"},
{_SigNotify, "signal 63"},
{_SigNotify, "signal 64"},
}
var size_to_class128 = [(_MaxSmallSize-smallSizeMax)/largeSizeDiv + 1]uint8{31, 32, 33, 34, 35, 36, 36, 37, 37, 38, 38, 39, 39, 39, 40, 40, 40, 41, 42, 42, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 47, 47, 47, 48, 48, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66}
var size_to_class8 = [smallSizeMax/smallSizeDiv + 1]uint8{0, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31}])
var skipPC uintptr
Global pool of large stack spans.
var stackLarge struct {
lock mutex
free [heapAddrBits - pageShift]mSpanList // free lists by log_2(s.npages)
}
Global pool of spans that have free stacks.
Stacks are assigned an order according to size.
order = log_2(size/FixedStack)
There is a free list for each order.
TODO: one lock per order?
var stackpool [_NumStackOrders]mSpanList
var starttime int64
startup_random_data holds random bytes initialized at startup. These come from
the ELF AT_RANDOM auxiliary vector (vdso_linux_amd64.go or os_linux_386.go).
var startupRandomData []byte
staticbytes is used to avoid convT2E for byte-sized values.
var staticbytes = [...,
}
var sysTHPSizePath = []byte("/sys/kernel/mm/transparent_hugepage/hpage_pmd_size\x00")
testSigtrap is used by the runtime tests. If non-nil, it is called
on SIGTRAP. If it returns true, the normal behavior on SIGTRAP is
suppressed.
var testSigtrap func(info *siginfo, ctxt *sigctxt, gp *g) bool
TODO: These should be locals in testAtomic64, but we don't 8-byte
align stack variables on 386.
var test_z64, test_x64 uint64
throwOnGCWork causes any operations that add pointers to a gcWork
buffer to throw.
TODO(austin): This is a temporary debugging measure for issue
#27993. To be removed before release.
var throwOnGCWork bool
var ticks struct {
lock mutex
pad uint32 // ensure 8-byte alignment of val on 386
val uint64
}
timers contains "per-P" timer heaps.
Timers are queued into timersBucket associated with the current P,
so each P may work with its own timers independently of other P instances.
Each timersBucket may be associated with multiple P
if GOMAXPROCS > timersLen.
var timers [timersLen]struct {
timersBucket
// The padding should eliminate false sharing
// between timersBucket values.
pad [cpu.CacheLinePadSize - unsafe.Sizeof(timersBucket{})%cpu.CacheLinePadSize]byte
}
var tmpbuf []byte
trace is global tracing context.
var trace struct {
lock mutex // protects the following members
lockOwner *g // to avoid deadlocks during recursive lock locks
enabled bool // when set runtime traces events
shutdown bool // set when we are waiting for trace reader to finish after setting enabled to false
headerWritten bool // whether ReadTrace has emitted trace header
footerWritten bool // whether ReadTrace has emitted trace footer
shutdownSema uint32 // used to wait for ReadTrace completion
seqStart uint64 // sequence number when tracing was started
ticksStart int64 // cputicks when tracing was started
ticksEnd int64 // cputicks when tracing was stopped
timeStart int64 // nanotime when tracing was started
timeEnd int64 // nanotime when tracing was stopped
seqGC uint64 // GC start/done sequencer
reading traceBufPtr // buffer currently handed off to user
empty traceBufPtr // stack of empty buffers
fullHead traceBufPtr // queue of full buffers
fullTail traceBufPtr
reader guintptr // goroutine that called ReadTrace, or nil
stackTab traceStackTable // maps stack traces to unique ids
// Dictionary for traceEvString.
//
// TODO: central lock to access the map is not ideal.
// option: pre-assign ids to all user annotation region names and tags
// option: per-P cache
// option: sync.Map like data structure
stringsLock mutex
strings map[string]uint64
stringSeq uint64
// markWorkerLabels maps gcMarkWorkerMode to string ID.
markWorkerLabels [len(gcMarkWorkerModeStrings)]uint64
bufLock mutex // protects buf
buf traceBufPtr // global trace buffer, used when running without a p
}
var traceback_cache uint32 = 2 << tracebackShift
var traceback_env uint32
var typecache [typeCacheBuckets]typeCacheBucket
var urandom_dev = []byte("/dev/urandom\x00")
var useAVXmemmove bool
var useAeshash bool
If useCheckmark is true, marking of an object uses the
checkmark bits (encoding above) instead of the standard
mark bits.
var useCheckmark = false
var vdsoLinuxVersion = vdsoVersionKey{"LINUX_2.6", 0x3ae75f6}
var vdsoSymbolKeys = []vdsoSymbolKey{
{"__vdso_gettimeofday", 0x315ca59, 0xb01bca00, &vdsoGettimeofdaySym},
{"__vdso_clock_gettime", 0xd35ec75, 0x6e43a318, &vdsoClockgettimeSym},
}
var waitReasonStrings = [...]string{
waitReasonZero: "",
waitReasonGCAssistMarking: "GC assist marking",
waitReasonIOWait: "IO wait",
waitReasonChanReceiveNilChan: "chan receive (nil chan)",
waitReasonChanSendNilChan: "chan send (nil chan)",
waitReasonDumpingHeap: "dumping heap",
waitReasonGarbageCollection: "garbage collection",
waitReasonGarbageCollectionScan: "garbage collection scan",
waitReasonPanicWait: "panicwait",
waitReasonSelect: "select",
waitReasonSelectNoCases: "select (no cases)",
waitReasonGCAssistWait: "GC assist wait",
waitReasonGCSweepWait: "GC sweep wait",
waitReasonGCScavengeWait: "GC scavenge wait",
waitReasonChanReceive: "chan receive",
waitReasonChanSend: "chan send",
waitReasonFinalizerWait: "finalizer wait",
waitReasonForceGGIdle: "force gc (idle)",
waitReasonSemacquire: "semacquire",
waitReasonSleep: "sleep",
waitReasonSyncCondWait: "sync.Cond.Wait",
waitReasonTimerGoroutineIdle: "timer goroutine (idle)",
waitReasonTraceReaderBlocked: "trace reader (blocked)",
waitReasonWaitForGCCycle: "wait for GC cycle",
waitReasonGCWorkerIdle: "GC worker (idle)",
}
var work struct {
full lfstack // lock-free list of full blocks workbuf
empty lfstack // lock-free list of empty blocks workbuf
pad0 cpu.CacheLinePad //
// Number of roots of various root types. Set by gcMarkRootPrepare.
nFlushCacheRoots int
nDataRoots, nBSSRoots, nSpanRoots, nStackRoots int
// to mark termination.
markDoneSema uint32
bgMarkReady note // signal background mark worker has started
bgMarkDone uint32 // cas to 1 when at a background mark completion point
//
q gQueue
}
// sweepWaiters is a list of blocked goroutines to wake when
// we transition from mark termination to sweep.
sweepWaiters struct {
lock mutex
list gList
}
//
}
Holding worldsema grants an M the right to try to stop the world
and prevents gomaxprocs from changing concurrently.
var worldsema uint32 = 1
}
var zeroVal [maxZero]byte
base address for all 0-byte allocations
var zerobase uintptr()
Breakpoint executes a breakpoint trap.
func CPUProfile() []byte
CPUProfile panics.
It formerly provided raw access to chunks of
a pprof-format profile generated by the runtime.
The details of generating that format have changed,
so this functionality has been removed.
Deprecated: Use the runtime/pprof package,
or the handlers in the net/http/pprof package,
or the testing package's -test.cpuprofile flag instead..
To translate these PCs into symbolic information such as function
names and line numbers, use CallersFrames. CallersFrames accounts
for inlined functions and adjusts the return program counters into
call program counters. Iterating over the returned slice of PCs
directly is discouraged, as is using FuncForPC on any of the
returned PCs, since these cannot account for inlining or return
program counter adjustment.
go:noinline
func GC()
GC runs a garbage collection and blocks the caller until the
garbage collection is complete. It may also block the entire
program.() string
GOROOT returns the root of the Go tree. It uses the
GOROOT environment variable, if set at process start,
or else the root used during the Go build.
func Goexit()
Goexit terminates the goroutine that calls it. No other goroutine is affected.
Goexit runs all deferred calls before terminating the goroutine. Because Goexit
is not a panic,()
Gosched yields the processor, allowing other goroutines to run. It does not
suspend the current goroutine, so execution resumes automatically.
func KeepAlive(x()
LockOSThread wires the calling goroutine to its current operating system thread.
The calling goroutine will always execute in that thread,
and no other goroutine will execute in it,
until the calling goroutine has made as many calls to
UnlockOSThread as to LockOSThread.
If the calling goroutine exits without unlocking the thread,
the thread will be terminated.
All init functions are run on the startup thread. Calling LockOSThread
from an init function will cause the main function to be invoked on
that thread.
A goroutine should call LockOSThread before calling OS services or
non-Go library functions that depend on per-thread state.() int64
NumCgoCall returns the number of cgo calls made by the current process.
func NumGoroutine() int
NumGoroutine returns the number of goroutines that currently exist..
On all platforms, the traceback function is invoked when a call from
Go to C to Go requests a stack trace. On linux/amd64, linux/ppc64le,
and freebsd/amd64, the traceback function is also invoked when a
signal is received by a thread that is executing a cgo call. The
traceback function should not make assumptions about when it is
called, as future versions of Go may make additional calls. is scheduled to run at some arbitrary time after the
program can no longer reach the object to which obj points. < 0.
(For n>1 the details of sampling may change.)()
StopTrace stops tracing, if it was previously enabled.
StopTrace only returns after all the reads for the trace have completed.()
UnlockOSThread undoes an earlier call to LockOSThread.
If this drops the number of active LockOSThread calls on the
calling goroutine to zero, it unwires the calling goroutine from
its fixed operating system thread.
If there are no active LockOSThread calls, this is a no-op.
Before calling UnlockOSThread, the caller must ensure that the OS
thread is suitable for running other goroutines. If the caller made
any permanent changes to the state of the thread that would affect
other goroutines, it should not call this function and thus leave
the goroutine locked to the OS thread until the goroutine (and
hence the thread) exits.
func Version() string
Version returns the Go tree's version string.
It is either the commit hash and date at the time of the build or,
when possible, a release tag like "go1.3".
func _ELF_ST_BIND(val byte) byte
How to extract and insert information held in the st_info field.
func _ELF_ST_TYPE(val byte) byte
func _ExternalCode()
func _GC()
func _LostExternalCode()
func _LostSIGPROFDuringAtomic64()
func _System()
func _VDSO()
func _cgo_panic_internal(p *byte)
func abort()
abort crashes the runtime in situations where even throw might not
work. In general it should do something a debugger will recognize
(e.g., an INT3 on x86). A crash in abort is recognized by the
signal handler, which will attempt to tear down the runtime
immediately.
func abs(x float64) float64
Abs returns the absolute value of x.
Special cases are:
Abs(±Inf) = +Inf
Abs(NaN) = NaN
func access(name *byte, mode int32) int32
Called from write_err_android.go only, but defined in sys_linux_*.s;
declared here (instead of in write_err_android.go) for go vet on non-android builds.
The return value is the raw syscall result, which may encode an error number.
go:noescape
func acquirep(_p_ *p)
Associate p and the current m.
This function is allowed to have write barriers even if the caller
isn't because it immediately acquires _p_.
go:yeswritebarrierrec
func add(p unsafe.Pointer, x uintptr) unsafe.Pointer
Should be a built-in for unsafe.Pointer?
go:nosplit
func add1(p *byte) *byte
add1 returns the byte pointer p+1.
go:nowritebarrier
go:nosplit
func addb(p *byte, n uintptr) *byte
addb returns the byte pointer p+n.
go:nowritebarrier
go:nosplit
func addfinalizer(p unsafe.Pointer, f *funcval, nret uintptr, fint *_type, ot *ptrtype) bool
Adds a finalizer to the object p. Returns true if it succeeded.
func addmoduledata()
Called from linker-generated .initarray; declared for go vet; do NOT call from Go.
func addspecial(p unsafe.Pointer, s *special) bool
Adds the special record s to the list of special records for
the object p. All fields of s should be filled in except for
offset & next, which this routine will fill in.
Returns true if the special was successfully added, false otherwise.
(The add will fail only if a record with the same p and s->kind
already exists.)
func addtimer(t *timer)
func adjustctxt(gp *g, adjinfo *adjustinfo)
func adjustdefers(gp *g, adjinfo *adjustinfo)
func adjustframe(frame *stkframe, arg unsafe.Pointer) bool
Note: the argument/return area is adjusted by the callee.
func adjustpanics(gp *g, adjinfo *adjustinfo)
func adjustpointer(adjinfo *adjustinfo, vpp unsafe.Pointer)
Adjustpointer checks whether *vpp is in the old stack described by adjinfo.
If so, it rewrites *vpp to point into the new stack.
func adjustpointers(scanp unsafe.Pointer, bv *bitvector, adjinfo *adjustinfo, f funcInfo)
bv describes the memory starting at address scanp.
Adjust any pointers contained therein.
func adjustsudogs(gp *g, adjinfo *adjustinfo)
func advanceEvacuationMark(h *hmap, t *maptype, newbit uintptr)
func aeshash(p unsafe.Pointer, h, s uintptr) uintptr
in asm_*.s
func aeshash32(p unsafe.Pointer, h uintptr) uintptr
func aeshash64(p unsafe.Pointer, h uintptr) uintptr
func aeshashstr(p unsafe.Pointer, h uintptr) uintptr
func afterfork()
func alginit()
func allgadd(gp *g)
func appendIntStr(b []byte, v int64, signed bool) []byte
func archauxv(tag, val uintptr)
func arenaBase(i arenaIdx) uintptr
arenaBase returns the low address of the region covered by heap
arena i.
func args(c int32, v **byte)
func argv_index(argv **byte, i int32) *byte
nosplit for use in linux startup sysargs
go:nosplit
func asmcgocall(fn, arg unsafe.Pointer) int32
go:noescape
func asminit()
func assertE2I2(inter *interfacetype, e eface) (r iface, b bool)
func assertI2I2(inter *interfacetype, i iface) (r iface, b bool)
func atoi(s string) (int, bool)
atoi parses an int from a string s.
The bool result reports whether s is a number
representable by a value of type int.
func atoi32(s string) (int32, bool)
atoi32 is like atoi but for integers
that fit into an int32.
func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer)
atomicstorep performs *ptr = new atomically and invokes a write barrier.
go:nosplit
func atomicwb(ptr *unsafe.Pointer, new unsafe.Pointer)
atomicwb performs a write barrier before an atomic pointer write.
The caller should guard the call with "if writeBarrier.enabled".
func badTimer()
badTimer is called if the timer data structures have been corrupted,
presumably due to racy use by the program. We panic here rather than
panicing due to invalid slice access while holding locks.
See issue #25686.
func badcgocallback()
called from assembly
func badctxt()
func badmcall(fn func(*g))
func badmcall2(fn func(*g))
func badmorestackg0()
go:nosplit
go:nowritebarrierrec
func badmorestackgsignal()
func badreflectcall()
func badsignal(sig uintptr, c *sigctxt)
This runs on a foreign stack, without an m or a g. No stack split.
go:nosplit
go:norace
go:nowritebarrierrec
func badsystemstack()
func badunlockosthread()
func beforeIdle() bool
func beforefork()
func bgscavenge(c chan int)
Background scavenger.
The background scavenger maintains the RSS of the application below
the line described by the proportional scavenging statistics in
the mheap struct.
func bgsweep(c chan int)
func binarySearchTree(x *stackObjectBuf, idx int, n int) (root *stackObject, restBuf *stackObjectBuf, restIdx int)
Build a binary search tree with the n objects in the list
x.obj[idx], x.obj[idx+1], ..., x.next.obj[0], ...
Returns the root of that tree, and the buf+idx of the nth object after x.obj[idx].
(The first object that was not included in the binary search tree.)
If n == 0, returns nil, x.
func block()
func blockableSig(sig uint32) bool
blockableSig reports whether sig may be blocked by the signal mask.
We never want to block the signals marked _SigUnblock;
these are the synchronous signals that turn into a Go panic.
In a Go program--not a c-archive/c-shared--we never want to block
the signals marked _SigKill or _SigThrow, as otherwise it's possible
for all running threads to block them and delay their delivery until
we start a new thread. When linked into a C program we let the C code
decide on the disposition of those signals.
func blockevent(cycles int64, skip int)
func blocksampled(cycles int64) bool
func bool2int(x bool) int
bool2int returns 0 if x is false or 1 if x is true.
func breakpoint()
func bucketEvacuated(t *maptype, h *hmap, bucket uintptr) bool
func bucketMask(b uint8) uintptr
bucketMask returns 1<<b - 1, optimized for code generation.
func bucketShift(b uint8) uintptr
bucketShift returns 1<<b, optimized for code generation.
func bulkBarrierBitmap(dst, src, size, maskOffset uintptr, bits *uint8)
bulkBarrierBitmap executes write barriers for copying from [src,
src+size) to [dst, dst+size) using a 1-bit pointer bitmap. src is
assumed to start maskOffset bytes into the data covered by the
bitmap in bits (which may not be a multiple of 8).
This is used by bulkBarrierPreWrite for writes to data and BSS.
func bulkBarrierPreWrite(dst, src, size uintptr)
bulkBarrierPreWrite executes a write barrier
for every pointer slot in the memory range [src, src+size),
using pointer/scalar information from [dst, dst+size).
This executes the write barriers necessary before a memmove.
src, dst, and size must be pointer-aligned.
The range [dst, dst+size) must lie within a single object.
It does not perform the actual writes.
As a special case, src == 0 indicates that this is being used for a
memclr. bulkBarrierPreWrite will pass 0 for the src of each write
barrier.
Callers should call bulkBarrierPreWrite immediately before
calling memmove(dst, src, size). This function is marked nosplit
to avoid being preempted; the GC must not stop the goroutine
between the memmove and the execution of the barriers.
The caller is also responsible for cgo pointer checks if this
may be writing Go pointers into non-Go memory.
The pointer bitmap is not maintained for allocations containing
no pointers at all; any caller of bulkBarrierPreWrite must first
make sure the underlying allocation contains pointers, usually
by checking typ.ptrdata.
Callers must perform cgo checks if writeBarrier.cgo.
func bulkBarrierPreWriteSrcOnly(dst, src, size uintptr)
bulkBarrierPreWriteSrcOnly is like bulkBarrierPreWrite but
does not execute write barriers for [dst, dst+size).
In addition to the requirements of bulkBarrierPreWrite
callers need to ensure [dst, dst+size) is zeroed.
This is used for special cases where e.g. dst was just
created and zeroed with malloc.
go:nosplit
func bytes(s string) (ret []byte)
func bytesHash(b []byte, seed uintptr) uintptr
func c128equal(p, q unsafe.Pointer) bool
func c128hash(p unsafe.Pointer, h uintptr) uintptr
func c64equal(p, q unsafe.Pointer) bool
func c64hash(p unsafe.Pointer, h uintptr) uintptr
func cachestats()
cachestats flushes all mcache stats.
The world must be stopped.
go:nowritebarrier
func call1024(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call1048576(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call1073741824(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call128(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call131072(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call134217728(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call16384(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call16777216(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call2048(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call2097152(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call256(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call262144(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call268435456(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call32(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
in asm_*.s
not called directly; definitions here supply type information for traceback.
func call32768(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call33554432(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call4096(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call4194304(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call512(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call524288(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call536870912(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call64(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call65536(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call67108864(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call8192(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call8388608(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func callCgoMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) uintptr
callCgoMmap calls the mmap function in the runtime/cgo package
using the GCC calling convention. It is implemented in assembly.
func callCgoMunmap(addr unsafe.Pointer, n uintptr)
callCgoMunmap calls the munmap function in the runtime/cgo package
using the GCC calling convention. It is implemented in assembly.
func callCgoSigaction(sig uintptr, new, old *sigactiont) int32
callCgoSigaction calls the sigaction function in the runtime/cgo package
using the GCC calling convention. It is implemented in assembly.
go:noescape
func callCgoSymbolizer(arg *cgoSymbolizerArg)
callCgoSymbolizer calls the cgoSymbolizer function.
func callers(skip int, pcbuf []uintptr) int
func canpanic(gp *g) bool
canpanic returns false if a signal should throw instead of
panicking.
func cansemacquire(addr *uint32) bool
func casfrom_Gscanstatus(gp *g, oldval, newval uint32)
The Gscanstatuses are acting like locks and this releases them.
If it proves to be a performance hit we should be able to make these
simple atomic stores but for now we are going to throw if
we see an inconsistent state.
func casgcopystack(gp *g) uint32
casgstatus(gp, oldstatus, Gcopystack), assuming oldstatus is Gwaiting or Grunnable.
Returns old status. Cannot call casgstatus directly, because we are racing with an
async wakeup that might come in from netpoll. If we see Gwaiting from the readgstatus,
it might have become Grunnable by the time we get to the cas. If we called casgstatus,
it would loop waiting for the status to go back to Gwaiting, which it never will.
go:nosplit
func casgstatus(gp *g, oldval, newval uint32)
If asked to move to or from a Gscanstatus this will throw. Use the castogscanstatus
and casfrom_Gscanstatus instead.
casgstatus will loop if the g->atomicstatus is in a Gscan status until the routine that
put it in the Gscan state is finished.
go:nosplit
func castogscanstatus(gp *g, oldval, newval uint32) bool
This will return false if the gp is not in the expected status and the cas fails.
This acts like a lock acquire while the casfromgstatus acts like a lock release.
func cfuncname(f funcInfo) *byte
func cgoCheckArg(t *_type, p unsafe.Pointer, indir, top bool, msg string)
cgoCheckArg is the real work of cgoCheckPointer. The argument p
is either a pointer to the value (of type t), or the value itself,
depending on indir. The top parameter is whether we are at the top
level, where Go pointers are allowed.
func cgoCheckBits(src unsafe.Pointer, gcbits *byte, off, size uintptr)
cgoCheckBits checks the block of memory at src, for up to size
bytes, and throws if it finds a Go pointer. The gcbits mark each
pointer value. The src pointer is off bytes into the gcbits.
go:nosplit
go:nowritebarrier
func cgoCheckMemmove(typ *_type, dst, src unsafe.Pointer, off, size uintptr)
cgoCheckMemmove is called when moving a block of memory.
dst and src point off bytes into the value to copy.
size is the number of bytes to copy.
It throws if the program is copying a block that contains a Go pointer
into non-Go memory.
go:nosplit
go:nowritebarrier
func cgoCheckPointer(ptr interface{}, args ...interface{})
cgoCheckPointer checks if the argument contains a Go pointer that
points to a Go pointer, and panics if it does.
func cgoCheckResult(val interface{})
cgoCheckResult is called to check the result parameter of an
exported Go function. It panics if the result is or contains a Go
pointer.
func cgoCheckSliceCopy(typ *_type, dst, src slice, n int)
cgoCheckSliceCopy is called when copying n elements of a slice from
src to dst. typ is the element type of the slice.
It throws if the program is copying slice elements that contain Go pointers
into non-Go memory.
go:nosplit
go:nowritebarrier
func cgoCheckTypedBlock(typ *_type, src unsafe.Pointer, off, size uintptr)
cgoCheckTypedBlock checks the block of memory at src, for up to size bytes,
and throws if it finds a Go pointer. The type of the memory is typ,
and src is off bytes into that type.
go:nosplit
go:nowritebarrier
func cgoCheckUnknownPointer(p unsafe.Pointer, msg string) (base, i uintptr)
cgoCheckUnknownPointer is called for an arbitrary pointer into Go
memory. It checks whether that Go memory contains any other
pointer into Go memory. If it does, we panic.
The return values are unused but useful to see in panic tracebacks.
func cgoCheckUsingType(typ *_type, src unsafe.Pointer, off, size uintptr)
cgoCheckUsingType is like cgoCheckTypedBlock, but is a last ditch
fall back to look for pointers in src using the type information.
We only use this when looking at a value on the stack when the type
uses a GC program, because otherwise it's more efficient to use the
GC bits. This is called on the system stack.
go:nowritebarrier
go:systemstack
func cgoCheckWriteBarrier(dst *uintptr, src uintptr)
cgoCheckWriteBarrier is called whenever a pointer is stored into memory.
It throws if the program is storing a Go pointer into non-Go memory.
This is called from the write barrier, so its entire call tree must
be nosplit.
go:nosplit
go:nowritebarrier
func cgoContextPCs(ctxt uintptr, buf []uintptr)
cgoContextPCs gets the PC values from a cgo traceback.
func cgoInRange(p unsafe.Pointer, start, end uintptr) bool
cgoInRange reports whether p is between start and end.
go:nosplit
go:nowritebarrierrec
func cgoIsGoPointer(p unsafe.Pointer) bool
cgoIsGoPointer reports whether the pointer is a Go pointer--a
pointer to Go memory. We only care about Go memory that might
contain pointers.
go:nosplit
go:nowritebarrierrec
func cgoSigtramp()
func cgoUse(interface{})
cgoUse is called by cgo-generated code (using go:linkname to get at
an unexported name). The calls serve two purposes:
1) they are opaque to escape analysis, so the argument is considered to
escape to the heap.
2) they keep the argument alive until the call site; the call is emitted after
the end of the (presumed) use of the argument by C.
cgoUse should not actually be called (see cgoAlwaysFalse).
func cgocall(fn, arg unsafe.Pointer) int32
Call from Go to C.
go:nosplit
func cgocallback(fn, frame unsafe.Pointer, framesize, ctxt uintptr)
func cgocallback_gofunc(fv, frame, framesize, ctxt uintptr)
Not all cgocallback_gofunc frames are actually cgocallback_gofunc,
so not all have these arguments. Mark them uintptr so that the GC
does not misinterpret memory when the arguments are not present.
cgocallback_gofunc is not called from go, only from cgocallback,
so the arguments will be found via cgocallback's pointer-declared arguments.
See the assembly implementations for more details.
func cgocallbackg(ctxt uintptr)
Call from C back to Go.
go:nosplit
func cgocallbackg1(ctxt uintptr)
func cgounimpl()
called from (incomplete) assembly
func chanbuf(c *hchan, i uint) unsafe.Pointer
chanbuf(c, i) is pointer to the i'th slot in the buffer.
func chanrecv(c *hchan, ep unsafe.Pointer, block bool) (selected, received bool)
chanrecv receives on channel c and writes the received data to ep.
ep may be nil, in which case received data is ignored.
If block == false and no elements are available, returns (false, false).
Otherwise, if c is closed, zeros *ep and returns (true, false).
Otherwise, fills in *ep with an element and returns (true, true).
A non-nil ep must point to the heap or the caller's stack.
func chanrecv1(c *hchan, elem unsafe.Pointer)
entry points for <- c from compiled code
go:nosplit
func chanrecv2(c *hchan, elem unsafe.Pointer) (received bool)
func chansend(c *hchan, ep unsafe.Pointer, block bool, callerpc uintptr) bool
* generic single channel send/recv
* If block is not nil,
* then the protocol will not
* sleep but return if it could
* not complete.
*
* sleep can wake up with g.param == nil
* when a channel involved in the sleep has
* been closed. it is easiest to loop and re-run
* the operation; we'll see that it's now closed.
func chansend1(c *hchan, elem unsafe.Pointer)
entry point for c <- x from compiled code
go:nosplit
func check()
func checkASM() bool
checkASM reports whether assembly runtime checks have passed.
func checkTimeouts()
func checkTreapNode(t *treapNode)
checkTreapNode when used in conjunction with walkTreap can usually detect a
poorly formed treap.
func checkdead()
Check for deadlock situation.
The check is based on number of running M's, if 0 -> deadlock.
sched.lock must be held.
func checkmcount()
func clearCheckmarks()
func clearSignalHandlers()
clearSignalHandlers clears all signal handlers that are not ignored
back to the default. This is called by the child after a fork, so that
we can enable the signal mask for the exec without worrying about
running a signal handler in the child.
go:nosplit
go:nowritebarrierrec
func clearpools()
func clobberfree(x unsafe.Pointer, size uintptr)
clobberfree sets the memory content at x to bad content, for debugging
purposes.
func clone(flags int32, stk, mp, gp, fn unsafe.Pointer) int32
func closechan(c *hchan)
func closefd(fd int32) int32
func closeonexec(fd int32)
func complex128div(n complex128, m complex128) complex128
func concatstring2(buf *tmpBuf, a [2]string) string
func concatstring3(buf *tmpBuf, a [3]string) string
func concatstring4(buf *tmpBuf, a [4]string) string
func concatstring5(buf *tmpBuf, a [5]string) string
func concatstrings(buf *tmpBuf, a []string) string
concatstrings implements a Go string concatenation x+y+z+...
The operands are passed in the slice a.
If buf != nil, the compiler has determined that the result does not
escape the calling function, so the string data can be stored in buf
if small enough.
func connect(fd int32, addr unsafe.Pointer, len int32) int32
func contains(s, t string) bool
func convT16(val uint16) (x unsafe.Pointer)
func convT32(val uint32) (x unsafe.Pointer)
func convT64(val uint64) (x unsafe.Pointer)
func convTslice(val []byte) (x unsafe.Pointer)
func convTstring(val string) (x unsafe.Pointer)
func copysign(x, y float64) float64
copysign returns a value with the magnitude
of x and the sign of y.
func copystack(gp *g, newsize uintptr, sync bool)
Copies gp's stack to a new stack of a different size.
Caller must have changed gp status to Gcopystack.
If sync is true, this is a self-triggered stack growth and, in
particular, no other G may be writing to gp's stack (e.g., via a
channel operation). If sync is false, copystack protects against
concurrent channel operations.
func countSub(x, y uint32) int
countSub subtracts two counts obtained from profIndex.dataCount or profIndex.tagCount,
assuming that they are no more than 2^29 apart (guaranteed since they are never more than
len(data) or len(tags) apart, respectively).
tagCount wraps at 2^30, while dataCount wraps at 2^32.
This function works for both.
func countrunes(s string) int
countrunes returns the number of runes in s.
func cpuinit()
cpuinit extracts the environment variable GODEBUG from the environment on
Unix-like operating systems and calls internal/cpu.Initialize.
func cputicks() int64
careful: cputicks is not guaranteed to be monotonic! In particular, we have
noticed drift between cpus on certain os/arch combinations. See issue 8976.
func crash()
func createfing()
func cstring(s string) unsafe.Pointer
func debugCallCheck(pc uintptr) string
debugCallCheck checks whether it is safe to inject a debugger
function call with return PC pc. If not, it returns a string
explaining why.
func debugCallPanicked(val interface{})
func debugCallV1()
func debugCallWrap(dispatch uintptr)
debugCallWrap pushes a defer to recover from panics in debug calls
and then calls the dispatching function at PC dispatch.
func debug_modinfo() string
go:linkname debug_modinfo runtime/debug.modinfo
func decoderune(s string, k int) (r rune, pos int)
decoderune returns the non-ASCII rune at the start of
s[k:] and the index after the rune in s.
decoderune assumes that caller has checked that
the to be decoded rune is a non-ASCII rune.
If the string appears to be incomplete or decoding problems
are encountered (runeerror, k + 1) is returned to ensure
progress when decoderune is used to iterate over a string.
func deductSweepCredit(spanBytes uintptr, callerSweepPages uintptr)
deductSweepCredit deducts sweep credit for allocating a span of
size spanBytes. This must be performed *before* the span is
allocated to ensure the system has enough credit. If necessary, it
performs sweeping to prevent going in to debt. If the caller will
also sweep pages (e.g., for a large allocation), it can pass a
non-zero callerSweepPages to leave that many pages unswept.
deductSweepCredit makes a worst-case assumption that all spanBytes
bytes of the ultimately allocated span will be available for object
allocation.
deductSweepCredit is the core of the "proportional sweep" system.
It uses statistics gathered by the garbage collector to perform
enough sweeping so that all pages are swept during the concurrent
sweep phase between GC cycles.
mheap_ must NOT be locked.
func deferArgs(d *_defer) unsafe.Pointer
The arguments associated with a deferred call are stored
immediately after the _defer header in memory.
go:nosplit
func deferclass(siz uintptr) uintptr
defer size class for arg size sz
go:nosplit
func deferproc(siz int32, fn *funcval)
Create a new deferred function fn with siz bytes of arguments.
The compiler turns a defer statement into a call to this.
go:nosplit
func deferprocStack(d *_defer)
deferprocStack queues a new deferred function with a defer record on the stack.
The defer record must have its siz and fn fields initialized.
All other fields can contain junk.
The defer record must be immediately followed in memory by
the arguments of the defer.
Nosplit because the arguments on the stack won't be scanned
until the defer record is spliced into the gp._defer list.
go:nosplit
func deferreturn(arg0 uintptr)
The single argument isn't actually used - it just has its address
taken so it can be matched against pending defers.
go:nosplit
func deltimer(t *timer) bool
Delete timer t from the heap.
Do not need to update the timerproc: if it wakes up early, no big deal.
func dematerializeGCProg(s *mspan)
func dieFromSignal(sig uint32)
dieFromSignal kills the program with a signal.
This provides the expected exit status for the shell.
This is only called with fatal signals expected to kill the process.
go:nosplit
go:nowritebarrierrec
func divlu(u1, u0, v uint64) (q, r uint64)
128/64 -> 64 quotient, 64 remainder.
adapted from hacker's delight
func doInit(t *initTask)
func dolockOSThread()
dolockOSThread is called by LockOSThread and lockOSThread below
after they modify m.locked. Do not allow preemption during this call,
or else the m might be different in this function than in the caller.
go:nosplit
func dopanic_m(gp *g, pc, sp uintptr) bool
func dounlockOSThread()
dounlockOSThread is called by UnlockOSThread and unlockOSThread below
after they update m->locked. Do not allow preemption during this call,
or else the m might be in different in this function than in the caller.
go:nosplit
func dropg()
dropg removes the association between m and the current goroutine m->curg (gp for short).
Typically a caller sets gp's status away from Grunning and then
immediately calls dropg to finish the job. The caller is also responsible
for arranging that gp will be restarted using ready at an
appropriate time. After calling dropg and arranging for gp to be
readied later, the caller can do other work but eventually should
call schedule to restart the scheduling of goroutines on this m.
func dropm()
dropm is called when a cgo callback has called needm but is now
done with the callback and returning back into the non-Go thread.
It puts the current m back onto the extra list.
The main expense here is the call to signalstack to release the
m's signal stack, and then the call to needm on the next callback
from this thread. It is tempting to try to save the m for next time,
which would eliminate both these costs, but there might not be
a next time: the current thread (which Go does not control) might exit.
If we saved the m for that thread, there would be an m leak each time
such a thread exited. Instead, we acquire and release an m on each
call. These should typically not be scheduling operations, just a few
atomics, so the cost should be small.
TODO(rsc): An alternative would be to allocate a dummy pthread per-thread
variable using pthread_key_create. Unlike the pthread keys we already use
on OS X, this dummy key would never be read by Go code. It would exist
only so that we could register at thread-exit-time destructor.
That destructor would put the m back onto the extra list.
This is purely a performance optimization. The current version,
in which dropm happens on each cgo call, is still correct too.
We may have to keep the current version on systems with cgo
but without pthreads, like Windows.
func duffcopy()
func duffzero()
func dumpGCProg(p *byte)
func dumpbool(b bool)
func dumpbv(cbv *bitvector, offset uintptr)
dump kinds & offsets of interesting fields in bv
func dumpfields(bv bitvector)
dumpint() the kind & offset of each field in an object.
func dumpfinalizer(obj unsafe.Pointer, fn *funcval, fint *_type, ot *ptrtype)
func dumpframe(s *stkframe, arg unsafe.Pointer) bool
func dumpgoroutine(gp *g)
func dumpgs()
func dumpgstatus(gp *g)
func dumpint(v uint64)
dump a uint64 in a varint format parseable by encoding/binary
func dumpitabs()
func dumpmemprof()
func dumpmemprof_callback(b *bucket, nstk uintptr, pstk *uintptr, size, allocs, frees uintptr)
func dumpmemrange(data unsafe.Pointer, len uintptr)
dump varint uint64 length followed by memory contents
func dumpmemstats()
func dumpms()
func dumpobj(obj unsafe.Pointer, size uintptr, bv bitvector)
dump an object
func dumpobjs()
func dumpotherroot(description string, to unsafe.Pointer)
func dumpparams()
func dumpregs(c *sigctxt)
func dumproots()
func dumpslice(b []byte)
func dumpstr(s string)
func dumptype(t *_type)
dump information for a type
func dwrite(data unsafe.Pointer, len uintptr)
func dwritebyte(b byte)
func efaceHash(i interface{}, seed uintptr) uintptr
func efaceeq(t *_type, x, y unsafe.Pointer) bool
func elideWrapperCalling(id funcID) bool
elideWrapperCalling reports whether a wrapper function that called
function id should be elided from stack traces.
func encoderune(p []byte, r rune) int
encoderune writes into p (which must be large enough) the UTF-8 encoding of the rune.
It returns the number of bytes written.
func ensureSigM()
ensureSigM starts one global, sleeping thread to make sure at least one thread
is available to catch signals enabled for os/signal.
func entersyscall()
Standard syscall entry used by the go syscall library and normal cgo calls.
This is exported via linkname to assembly in the syscall package.
go:nosplit
go:linkname entersyscall
func entersyscall_gcwait()
func entersyscall_sysmon()
func entersyscallblock()
The same as entersyscall(), but with a hint that the syscall is blocking.
go:nosplit
func entersyscallblock_handoff()
func envKeyEqual(a, b string) bool
envKeyEqual reports whether a == b, with ASCII-only case insensitivity
on Windows. The two strings must have the same length.
func environ() []string
func epollcreate(size int32) int32
func epollcreate1(flags int32) int32
func epollctl(epfd, op, fd int32, ev *epollevent) int32
func epollwait(epfd int32, ev *epollevent, nev, timeout int32) int32
func eqslice(x, y []uintptr) bool
func evacuate(t *maptype, h *hmap, oldbucket uintptr)
func evacuate_fast32(t *maptype, h *hmap, oldbucket uintptr)
func evacuate_fast64(t *maptype, h *hmap, oldbucket uintptr)
func evacuate_faststr(t *maptype, h *hmap, oldbucket uintptr)
func evacuated(b *bmap) bool
func execute(gp *g, inheritTime bool)
Schedules gp to run on the current M.
If inheritTime is true, gp inherits the remaining time in the
current time slice. Otherwise, it starts a new time slice.
Never returns.
Write barriers are allowed because this is called immediately after
acquiring a P in several places.
func exit(code int32)
func exitThread(wait *uint32)
exitThread terminates the current thread, writing *wait = 0 when
the stack is safe to reclaim.
func exitsyscall()
The goroutine g exited its system call.
Arrange for it to run on a cpu again.
This is called only from the go syscall library, not
from the low-level system calls used by the runtime.
Write barriers are not allowed because our P may have been stolen.
go:nosplit
go:nowritebarrierrec
go:linkname exitsyscall
func exitsyscall0(gp *g)
exitsyscall slow path on g0.
Failed to acquire P, enqueue gp as runnable.
go:nowritebarrierrec
func exitsyscallfast(oldp *p) bool
func exitsyscallfast_pidle() bool
func exitsyscallfast_reacquired()
exitsyscallfast_reacquired is the exitsyscall path on which this G
has successfully reacquired the P it was running on before the
syscall.
func extendRandom(r []byte, n int)
extendRandom extends the random numbers in r[:n] to the whole slice r.
Treats n<0 as n==0.
func f32equal(p, q unsafe.Pointer) bool
func f32hash(p unsafe.Pointer, h uintptr) uintptr
func f32to64(f uint32) uint64
func f32toint32(x uint32) int32
func f32toint64(x uint32) int64
func f32touint64(x float32) uint64
func f64equal(p, q unsafe.Pointer) bool
func f64hash(p unsafe.Pointer, h uintptr) uintptr
func f64to32(f uint64) uint32
func f64toint(f uint64) (val int64, ok bool)
func f64toint32(x uint64) int32
func f64toint64(x uint64) int64
func f64touint64(x float64) uint64
func fadd32(x, y uint32) uint32
func fadd64(f, g uint64) uint64
func fastexprand(mean int) int32
fastexprand returns a random number from an exponential distribution with
the specified mean.
func fastlog2(x float64) float64
fastlog2 implements a fast approximation to the base 2 log of a
float64. This is used to compute a geometric distribution for heap
sampling, without introducing dependencies into package math. This
uses a very rough approximation using the float64 exponent and the
first 25 bits of the mantissa. The top 5 bits of the mantissa are
used to load limits from a table of constants and the rest are used
to scale linearly between them.
func fastrand() uint32
func fastrandn(n uint32) uint32
func fatalpanic(msgs *_panic)
fatalpanic implements an unrecoverable panic. It is like fatalthrow, except
that if msgs != nil, fatalpanic also prints panic messages and decrements
runningPanicDefers once main is blocked from exiting.
func fatalthrow()
fatalthrow implements an unrecoverable runtime throw. It freezes the
system, prints stack traces starting from its caller, and terminates the
process.
func fcmp64(f, g uint64) (cmp int32, isnan bool)
func fdiv32(x, y uint32) uint32
func fdiv64(f, g uint64) uint64
func feq32(x, y uint32) bool
func feq64(x, y uint64) bool
func fge32(x, y uint32) bool
func fge64(x, y uint64) bool
func fgt32(x, y uint32) bool
func fgt64(x, y uint64) bool
func fillstack(stk stack, b byte)
func findObject(p, refBase, refOff uintptr) (base uintptr, s *mspan, objIndex uintptr)
findObject returns the base address for the heap object containing
the address p, the object's span, and the index of the object in s.
If p does not point into a heap object, it returns base == 0.
If p points is an invalid heap pointer and debug.invalidptr != 0,
findObject panics.
refBase and refOff optionally give the base address of the object
in which the pointer p was found and the byte offset at which it
was found. These are used for error reporting.
func findnull(s *byte) int
func findnullw(s *uint16) int
func findrunnable() (gp *g, inheritTime bool)
Finds a runnable goroutine to execute.
Tries to steal from other P's, get g from global queue, poll network.
func findsghi(gp *g, stk stack) uintptr
func finishsweep_m()
finishsweep_m ensures that all spans are swept.
The world must be stopped. This ensures there are no sweeps in
progress.
func finq_callback(fn *funcval, obj unsafe.Pointer, nret uintptr, fint *_type, ot *ptrtype)
func fint32to32(x int32) uint32
func fint32to64(x int32) uint64
func fint64to32(x int64) uint32
func fint64to64(x int64) uint64
func fintto64(val int64) (f uint64)
func float64bits(f float64) uint64
Float64bits returns the IEEE 754 binary representation of f.
func float64frombits(b uint64) float64
Float64frombits returns the floating point number corresponding
the IEEE 754 binary representation b.
func flush()
func flushallmcaches()
flushallmcaches flushes the mcaches of all Ps.
func flushmcache(i int)
flushmcache flushes the mcache of allp[i].
func fmtNSAsMS(buf []byte, ns uint64) []byte
fmtNSAsMS nicely formats ns nanoseconds as milliseconds.
func fmul32(x, y uint32) uint32
func fmul64(f, g uint64) uint64
func fneg64(f uint64) uint64
func forEachP(fn func(*p))
forEachP calls fn(p) for every P p when p reaches a GC safe point.
If a P is currently executing code, this will bring the P to a GC
safe point and execute fn on that P. If the P is not executing code
(it is idle or in a syscall), this will call fn(p) directly while
preventing the P from exiting its state. This does not ensure that
fn will run on every CPU executing Go code, but it acts as a global
memory barrier. GC uses this as a "ragged barrier."
The caller must hold worldsema.
go:systemstack
func forcegchelper()
func fpack32(sign, mant uint32, exp int, trunc uint32) uint32
func fpack64(sign, mant uint64, exp int, trunc uint64) uint64
func freeSomeWbufs(preemptible bool) bool
freeSomeWbufs frees some workbufs back to the heap and returns
true if it should be called again to free more.
func freeStackSpans()
freeStackSpans frees unused stack spans at the end of GC.
func freedefer(d *_defer)
Free the given defer.
The defer cannot be used after this call.
This must not grow the stack because there may be a frame without a
stack map when this is called.
func freedeferfn()
func freedeferpanic()
Separate function so that it can split stack.
Windows otherwise runs out of stack space.
func freemcache(c *mcache)
func freespecial(s *special, p unsafe.Pointer, size uintptr)
Do whatever cleanup needs to be done to deallocate s. It has
already been unlinked from the mspan specials list.
func freezetheworld()
Similar to stopTheWorld but best-effort and can be called several times.
There is no reverse operation, used during crashing.
This function must not lock any mutexes.
func fsub64(f, g uint64) uint64
func fuint64to32(x uint64) float32
func fuint64to64(x uint64) float64
func funcPC(f interface{}) uintptr
funcPC returns the entry PC of the function f.
It assumes that f is a func value. Otherwise the behavior is undefined.
CAREFUL: In programs with plugins, funcPC can return different values
for the same function (because there are actually multiple copies of
the same function in the address space). To be safe, don't use the
results of this function in any == expression. It is only safe to
use the result as an address at which to start executing code.
go:nosplit
func funcdata(f funcInfo, i uint8) unsafe.Pointer
func funcfile(f funcInfo, fileno int32) string
func funcline(f funcInfo, targetpc uintptr) (file string, line int32)
func funcline1(f funcInfo, targetpc uintptr, strict bool) (file string, line int32)
func funcname(f funcInfo) string
func funcnameFromNameoff(f funcInfo, nameoff int32) string
func funcspdelta(f funcInfo, targetpc uintptr, cache *pcvalueCache) int32
func funpack32(f uint32) (sign, mant uint32, exp int, inf, nan bool)
func funpack64(f uint64) (sign, mant uint64, exp int, inf, nan bool)
func futex(addr unsafe.Pointer, op int32, val uint32, ts, addr2 unsafe.Pointer, val3 uint32) int32
func futexsleep(addr *uint32, val uint32, ns int64)
Atomically,
if(*addr == val) sleep
Might be woken up spuriously; that's allowed.
Don't sleep longer than ns; ns < 0 means forever.
go:nosplit
func futexwakeup(addr *uint32, cnt uint32)
If any procs are sleeping on addr, wake up at most cnt.
go:nosplit
func gcAssistAlloc(gp *g)
gcAssistAlloc performs GC work to make gp's assist debt positive.
gp must be the calling user gorountine.
This must be called with preemption enabled.
func gcAssistAlloc1(gp *g, scanWork int64)
gcAssistAlloc1 is the part of gcAssistAlloc that runs on the system
stack. This is a separate function to make it easier to see that
we're not capturing anything from the user stack, since the user
stack may move while we're in this function.
gcAssistAlloc1 indicates whether this assist completed the mark
phase by setting gp.param to non-nil. This can't be communicated on
the stack since it may move.
func gcBgMarkPrepare()
gcBgMarkPrepare sets up state for background marking.
Mutator assists must not yet be enabled.
func gcBgMarkStartWorkers()Worker(_p_ *p)
func gcDrain(gcw *gcWork, flags gcDrainFlags)
gcDrain scans roots and objects in work buffers, blackening grey
objects until it is unable to get more work. It may return before
GC is done; it's the caller's responsibility to balance work from
other Ps.
If flags&gcDrainUntilPreempt != 0, gcDrain returns when g.preempt
is set.
If flags&gcDrainIdle != 0, gcDrain returns when there is other work
to do.
If flags&gcDrainFractional != 0, gcDrain self-preempts when
pollFractionalWorkerExit() returns true. This implies
gcDrainNoBlock.
If flags&gcDrainFlushBgCredit != 0, gcDrain flushes scan work
credit to gcController.bgScanCredit every gcCreditSlack units of
scan work.
func gcDrainN(gcw *gcWork, scanWork int64) int64
gcDrainN blackens grey objects until it has performed roughly
scanWork units of scan work or the G is preempted. This is
best-effort, so it may perform less work if it fails to get a work
buffer. Otherwise, it will perform at least n units of work, but
may perform more because scanning is always done in whole object
increments. It returns the amount of scan work performed.
The caller goroutine must be in a preemptible state (e.g.,
_Gwaiting) to prevent deadlocks during stack scanning. As a
consequence, this must be called on the system stack.
go:nowritebarrier
go:systemstack
func gcDumpObject(label string, obj, off uintptr)
gcDumpObject dumps the contents of obj for debugging and marks the
field at byte offset off in obj.
func gcEffectiveGrowthRatio() float64cFlushBgCredit(scanWork int64)
gcFlushBgCredit flushes scanWork units of background scan work
credit. This first satisfies blocked assists on the
work.assistQueue and then flushes any remaining credit to
gcController.bgScanCredit.
Write barriers are disallowed because this is used by gcDrain after
it has ensured that all work is drained and this must preserve that
condition.
func gcMark(start_time int64)
gcMark runs the mark (or, for concurrent GC, mark termination)
All gcWork caches must be empty.
STW is in effect at this point.
func gcMarkDone()RootCheck()
gcMarkRootCheck checks that all roots have been scanned. It is
purely for debugging.
func gcMarkRootPrepare()
gcMarkRootPrepare queues root scanning jobs (stacks, globals, and
some miscellany) and initializes scanning-related state.
The caller must have call gcCopySpans().
func gcMarkTermination(nextTriggerRatio float64)
func gcMarkTinyAllocs()
gcMarkTinyAllocs greys all active tiny alloc blocks.
func gcMarkWorkAvailable(p *p) bool
gcMarkWorkAvailable reports whether executing a mark worker
on p is potentially useful. p may be nil, in which case it only
checks the global sources of work.
func gcPaceScavenger()
gcPaceScavenger updates the scavenger's pacing, particularly
its rate and RSS goal.
The RSS goal is based on the current heap goal with a small overhead
to accomodate non-determinism in the allocator.
The pacing is based on scavengePageRate, which applies to both regular and
huge pages. See that constant for more information.
func gcParkAssist() bool
gcParkAssist puts the current goroutine on the assist queue and parks.
gcParkAssist reports whether the assist is now satisfied. If it
returns false, the caller must retry the assist.
func gcResetMarkState().
gcResetMarkState must be called on the system stack because it acquires
the heap lock. See mheap for details.
func gcSetTriggerRatio(triggerRatio float64).
func gcStart(trigger gcTrigger)cSweep(mode gcMode)
gcSweep must be called on the system stack because it acquires the heap
lock. See mheap for details.
go:systemstack
func gcWaitOnMark(n uint32)
gcWaitOnMark blocks until GC finishes the Nth mark phase. If GC has
already completed this mark phase, it returns immediately.
func gcWakeAllAssists()
gcWakeAllAssists wakes all currently blocked assists. This is used
at the end of a GC cycle. gcBlackenEnabled must be false to prevent
new assists from going to sleep after this point.
func gcWriteBarrier()
Called from compiled code; declared for vet; do NOT call from Go.
func gcallers(gp *g, skip int, pcbuf []uintptr) int
func gcd(a, b uint32) uint32
func gcenable()
gcenable is called after the bulk of the runtime initialization,
just before we're about to start letting user code run.
It kicks off the background sweeper goroutine, the background
scavenger goroutine, and enables GC.
func gcinit()
func gcmarknewobject(obj, size, scanSize uintptr)
gcmarknewobject marks a newly allocated object black. obj must
not contain any non-nil pointers.
This is nosplit so it can manipulate a gcWork without preemption.
go:nowritebarrier
go:nosplit
func gcount() int32
func gcstopm()
Stops the current m for stopTheWorld.
Returns when the world is restarted.
func gentraceback(pc0, sp0, lr0 uintptr, gp *g, skip int, pcbuf *uintptr, max int, callback func(*stkframe, unsafe.Pointer) bool, v unsafe.Pointer, flags uint) int
Generic traceback. Handles runtime stack prints (pcbuf == nil),
the runtime.Callers function (pcbuf != nil), as well as the garbage
collector (callback != nil). A little clunky to merge these, but avoids
duplicating the code and all its subtlety.
The skip argument is only valid with pcbuf != nil and counts the number
of logical frames to skip rather than physical frames (with inlining, a
PC in pcbuf can represent multiple calls). If a PC is partially skipped
and max > 1, pcbuf[1] will be runtime.skipPleaseUseCallersFrames+N where
N indicates the number of logical frames to skip in pcbuf[0].
func getArgInfo(frame *stkframe, f funcInfo, needArgMap bool, ctxt *funcval) (arglen uintptr, argmap *bitvector)
getArgInfo returns the argument frame information for a call to f
with call frame frame.
This is used for both actual calls with active stack frames and for
deferred calls or goroutines that are not yet executing. If this is an actual
call, ctxt must be nil (getArgInfo will retrieve what it needs from
the active stack frame). If this is a deferred call or unstarted goroutine,
ctxt must be the function object that was deferred or go'd.
func getArgInfoFast(f funcInfo, needArgMap bool) (arglen uintptr, argmap *bitvector, ok bool)
getArgInfoFast returns the argument frame information for a call to f.
It is short and inlineable. However, it does not handle all functions.
If ok reports false, you must call getArgInfo instead.
TODO(josharian): once we do mid-stack inlining,
call getArgInfo directly from getArgInfoFast and stop returning an ok bool.
func getHugePageSize() uintptr
func getRandomData(r []byte)
func getStackMap(frame *stkframe, cache *pcvalueCache, debug bool) (locals, args bitvector, objs []stackObjectRecord)
getStackMap returns the locals and arguments live pointer maps, and
stack object list for frame.
func getargp(x int) uintptr
getargp returns the location where the caller
writes outgoing function call arguments.
go:nosplit
go:noinline
func getcallerpc() uintptr
func getcallersp() uintptr
func getclosureptr() uintptr
getclosureptr returns the pointer to the current closure.
getclosureptr can only be used in an assignment statement
at the entry of a function. Moreover, go:nosplit directive
must be specified at the declaration of caller function,
so that the function prolog does not clobber the closure register.
for example:
//go:nosplit
func f(arg1, arg2, arg3 int) {
dx := getclosureptr()
}
The compiler rewrites calls to this function into instructions that fetch the
pointer from a well-known register (DX on x86 architecture, etc.) directly.
func getgcmask(ep interface{}) (mask []byte)
Returns GC type info for the pointer stored in ep for testing.
If ep points to the stack, only static live information will be returned
(i.e. not for objects which are only dynamically live stack objects).
func getgcmaskcb(frame *stkframe, ctxt unsafe.Pointer) bool
func getm() uintptr
A helper function for EnsureDropM.
func getproccount() int32
func getsig(i uint32) uintptr
func gettid() uint32
func gfpurge(_p_ *p)
Purge all cached G's from gfree list to the global list.
func gfput(_p_ *p, gp *g)
Put on gfree list.
If local list is too long, transfer a batch to the global list.
func globrunqput(gp *g)
Put gp on the global runnable queue.
Sched must be locked.
May run during STW, so write barriers are not allowed.
go:nowritebarrierrec
func globrunqputbatch(batch *gQueue, n int32)
Put a batch of runnable goroutines on the global runnable queue.
This clears *batch.
Sched must be locked.
func globrunqputhead(gp *g)
Put gp at the head of the global runnable queue.
Sched must be locked.
May run during STW, so write barriers are not allowed.
go:nowritebarrierrec
func goPanicIndex(x int, y int)
failures in the comparisons for s[x], 0 <= x < y (y == len(s))
func goPanicIndexU(x uint, y int)
func goPanicSlice3Acap(x int, y int)
func goPanicSlice3AcapU(x uint, y int)
func goPanicSlice3Alen(x int, y int)
failures in the comparisons for s[::x], 0 <= x <= y (y == len(s) or cap(s))
func goPanicSlice3AlenU(x uint, y int)
func goPanicSlice3B(x int, y int)
failures in the comparisons for s[:x:y], 0 <= x <= y
func goPanicSlice3BU(x uint, y int)
func goPanicSlice3C(x int, y int)
failures in the comparisons for s[x:y:], 0 <= x <= y
func goPanicSlice3CU(x uint, y int)
func goPanicSliceAcap(x int, y int)
func goPanicSliceAcapU(x uint, y int)
func goPanicSliceAlen(x int, y int)
failures in the comparisons for s[:x], 0 <= x <= y (y == len(s) or cap(s))
func goPanicSliceAlenU(x uint, y int)
func goPanicSliceB(x int, y int)
failures in the comparisons for s[x:y], 0 <= x <= y
func goPanicSliceBU(x uint, y int)
func goargs()
func gobytes(p *byte, n int) (b []byte)
used by cmd/cgo
func goenvs()
func goenvs_unix()
func goexit(neverCallThisFunction)
goexit is the return stub at the top of every goroutine call stack.
Each goroutine stack is constructed as if goexit called the
goroutine's entry point function, so that when the entry point
function returns, it will return to goexit, which will call goexit1
to perform the actual exit.
This function must never be called directly. Call goexit1 instead.
gentraceback assumes that goexit terminates the stack. A direct
call on the stack will cause gentraceback to stop walking the stack
prematurely and if there is leftover state it may panic.
func goexit0(gp *g)
goexit continuation on g0.
func goexit1()
Finishes execution of the current goroutine.
func gogetenv(key string) string
func gogo(buf *gobuf)
func gopanic(e interface{})
The implementation of the predeclared function panic.
func gopark(unlockf func(*g, unsafe.Pointer) bool, lock unsafe.Pointer, reason waitReason, traceEv byte, traceskip int).
func goparkunlock(lock *mutex, reason waitReason, traceEv byte, traceskip int)
Puts the current goroutine into a waiting state and unlocks the lock.
The goroutine can be made runnable again by calling goready(gp).
func gopreempt_m(gp *g)
func goready(gp *g, traceskip int)
func gorecover(argp uintptr) interface{}
The implementation of the predeclared function recover.
Cannot split the stack because it needs to reliably
find the stack segment of its caller.
TODO(rsc): Once we commit to CopyStackAlways,
this doesn't need to be nosplit.
go:nosplit
func goroutineReady(arg interface{}, seq uintptr)
Ready the goroutine arg.
func goroutineheader(gp *g)
func gosave(buf *gobuf)
func goschedImpl(gp *g)
func gosched_m(gp *g)
Gosched continuation on g0.
func goschedguarded()
goschedguarded yields the processor like gosched, but also checks
for forbidden states and opts out of the yield in those cases.
go:nosplit
func goschedguarded_m(gp *g)
goschedguarded is a forbidden-states-avoided version of gosched_m
func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer)
adjust Gobuf as if it executed a call to fn with context ctxt
and then did an immediate gosave.
func gostartcallfn(gobuf *gobuf, fv *funcval)
adjust Gobuf as if it executed a call to fn
and then did an immediate gosave.
func gostring(p *byte) string
This is exported via linkname to assembly in syscall (for Plan9).
go:linkname gostring
func gostringn(p *byte, l int) string
func gostringnocopy(str *byte) string
func gostringw(strw *uint16) string
func gotraceback() (level int32, all, crash bool)
gotraceback returns the current traceback settings.
If level is 0, suppress all tracebacks.
If level is 1, show tracebacks, but exclude runtime frames.
If level is 2, show tracebacks including runtime frames.
If all is set, print all goroutine stacks. Otherwise, print just the current goroutine.
If crash is set, crash (core dump, etc) after tracebacking.
func greyobject(obj, base, off uintptr, span *mspan, gcw *gcWork, objIndex uintptr)
obj is the start of an object with mark mbits.
If it isn't already marked, mark it and enqueue into gcw.
base and off are for debugging only and could be removed.
See also wbBufFlush1, which partially duplicates this logic.
func growWork(t *maptype, h *hmap, bucket uintptr)
func growWork_fast32(t *maptype, h *hmap, bucket uintptr)
func growWork_fast64(t *maptype, h *hmap, bucket uintptr)
func growWork_faststr(t *maptype, h *hmap, bucket uintptr)
func gwrite(b []byte)
write to goroutine-local buffer if diverting output,
or else standard error.
func handoffp(_p_ *p)
Hands off P from syscall or locked M.
Always runs without a P, so write barriers are not allowed.
go:nowritebarrierrec
func hasPrefix(s, prefix string) bool
func hashGrow(t *maptype, h *hmap)
func haveexperiment(name string) bool
func heapBitsSetType(x, size, dataSize uintptr, typ *_type)
heapBitsSetType records that the new allocation [x, x+size)
holds in [x, x+dataSize) one or more values of type typ.
(The number of values is given by dataSize / typ.size.)
If dataSize < size, the fragment [x+dataSize, x+size) is
recorded as non-pointer data.
It is known that the type has pointers somewhere;
malloc does not call heapBitsSetType when there are no pointers,
because all free objects are marked as noscan during
heapBitsSweepSpan.
There can only be one allocation from a given span active at a time,
and the bitmap for a span always falls on byte boundaries,
so there are no write-write races for access to the heap bitmap.
Hence, heapBitsSetType can access the bitmap without atomics.
There can be read-write races between heapBitsSetType and things
that read the heap bitmap like scanobject. However, since
heapBitsSetType is only used for objects that have not yet been
made reachable, readers will ignore bits being modified by this
function. This does mean this function cannot transiently modify
bits that belong to neighboring objects. Also, on weakly-ordered
machines, callers must execute a store/store (publication) barrier
between calling this function and making the object reachable.
func heapBitsSetTypeGCProg(h heapBits, progSize, elemSize, dataSize, allocSize uintptr, prog *byte)
heapBitsSetTypeGCProg implements heapBitsSetType using a GC program.
progSize is the size of the memory described by the program.
elemSize is the size of the element that the GC program describes (a prefix of).
dataSize is the total size of the intended data, a multiple of elemSize.
allocSize is the total size of the allocated memory.
GC programs are only used for large allocations.
heapBitsSetType requires that allocSize is a multiple of 4 words,
so that the relevant bitmap bytes are not shared with surrounding
objects.
func heapRetained() uint64
heapRetained returns an estimate of the current heap RSS.
func hexdumpWords(p, end uintptr, mark func(uintptr) byte)
hexdumpWords prints a word-oriented hex dump of [p, end).
If mark != nil, it will be called with each printed word's address
and should return a character mark to appear just before that
word's value. It can return 0 to indicate no mark.
func ifaceHash(i interface {
F()
}, seed uintptr) uintptr
func ifaceeq(tab *itab, x, y unsafe.Pointer) bool
func inHeapOrStack(b uintptr) bool
inHeapOrStack is a variant of inheap that returns true for pointers
into any allocated heap span.
func inPersistentAlloc(p uintptr) bool
inPersistentAlloc reports whether p points to memory allocated by
persistentalloc. This must be nosplit because it is called by the
cgo checker code, which is called by the write barrier code.
go:nosplit
func inRange(r0, r1, v0, v1 uintptr) bool
inRange reports whether v0 or v1 are in the range [r0, r1].
func inVDSOPage(pc uintptr) bool
vdsoMarker reports whether PC is on the VDSO page.
func incidlelocked(v int32)
func index(s, t string) int
func inf2one(f float64) float64
inf2one returns a signed 1 if f is an infinity and a signed 0 otherwise.
The sign of the result is the sign of f.
func inheap(b uintptr) bool
inheap reports whether b is a pointer into a (potentially dead) heap object.
It returns false for pointers into mSpanManual spans.
Non-preemptible because it is used by write barriers.
go:nowritebarrier
go:nosplit
func init()
start forcegc helper goroutine
func initAlgAES()
func initCheckmarks()
func initsig(preinit bool)
Initialize signals.
Called by libpreinit so runtime may not be initialized.
go:nosplit
go:nowritebarrierrec
func injectglist(glist *gList)
Injects the list of runnable G's into the scheduler and clears glist.
Can run concurrently with GC.
func int32Hash(i uint32, seed uintptr) uintptr
func int64Hash(i uint64, seed uintptr) uintptr
func interequal(p, q unsafe.Pointer) bool
func interhash(p unsafe.Pointer, h uintptr) uintptr
func intstring(buf *[4]byte, v int64) (s string)
func isAbortPC(pc uintptr) bool
isAbortPC reports whether pc is the program counter at which
runtime.abort raises a signal.
It is nosplit because it's part of the isgoexception
implementation.
func isDirectIface(t *_type) bool
isDirectIface reports whether t is stored directly in an interface value.
func isEmpty(x uint8) bool
isEmpty reports whether the given tophash array entry represents an empty bucket entry.
func isExportedRuntime(name string) bool
isExportedRuntime reports whether name is an exported runtime function.
It is only for runtime functions, so ASCII A-Z is fine.
func isFinite(f float64) bool
isFinite reports whether f is neither NaN nor an infinity.
func isInf(f float64) bool
isInf reports whether f is an infinity.
func isNaN(f float64) (is bool)
isNaN reports whether f is an IEEE 754 “not-a-number” value.
func isPowerOfTwo(x uintptr) bool
func isSweepDone() bool
isSweepDone reports whether all spans are swept or currently being swept.
Note that this condition may transition from false to true at any
time as the sweeper runs. It may transition from true to false if a
GC runs; to prevent that the caller must be non-preemptible or must
somehow block GC progress.
func isSystemGoroutine(gp *g, fixed bool) bool
isSystemGoroutine reports whether the goroutine g must be omitted
in stack dumps and deadlock detector. This is any goroutine that
starts at a runtime.* entry point, except for runtime.main and
sometimes runtime.runfinq.
If fixed is true, any goroutine that can vary between user and
system (that is, the finalizer goroutine) is considered a user
goroutine.
func ismapkey(t *_type) bool
func itabAdd(m *itab)
itabAdd adds the given itab to the itab hash table.
itabLock must be held.
func itabHashFunc(inter *interfacetype, typ *_type) uintptr
func itab_callback(tab *itab)
func itabsinit()
func iterate_finq(callback func(*funcval, unsafe.Pointer, uintptr, *_type, *ptrtype))
func iterate_itabs(fn func(*itab))
func iterate_memprof(fn func(*bucket, uintptr, *uintptr, uintptr, uintptr, uintptr))
func itoa(buf []byte, val uint64) []byte
go:nosplit
itoa converts val to a decimal representation. The result is
written somewhere within buf and the location of the result is returned.
buf must be at least 20 bytes.
func itoaDiv(buf []byte, val uint64, dec int) []byte
itoaDiv formats val/(10**dec) into buf.
func jmpdefer(fv *funcval, argp uintptr)
func key32(p *uintptr) *uint32
We use the uintptr mutex.key and note.key as a uint32.
go:nosplit
func less(a, b uint32) bool
less checks if a < b, considering a & b running counts that may overflow the
32-bit range, and that their "unwrapped" difference is always less than 2^31.
func lfnodeValidate(node *lfnode)
lfnodeValidate panics if node is not a valid address for use with
lfstack.push. This only needs to be called when node is allocated.
func lfstackPack(node *lfnode, cnt uintptr) uint64
func libpreinit()
Called to do synchronous initialization of Go code built with
-buildmode=c-archive or -buildmode=c-shared.
None of the Go runtime is initialized.
go:nosplit
go:nowritebarrierrec
func lock(l *mutex)
func lockOSThread()
func lockedOSThread() bool
func lowerASCII(c byte) byte
func mProf_Flush()
mProf_Flush flushes the events from the current heap profiling
cycle into the active profile. After this it is safe to start a new
heap profiling cycle with mProf_NextCycle.
This is called by GC after mark termination starts the world. In
contrast with mProf_NextCycle, this is somewhat expensive, but safe
to do concurrently.
func mProf_FlushLocked()
func mProf_Free(b *bucket, size uintptr)
Called when freeing a profiled block.
func mProf_Malloc(p unsafe.Pointer, size uintptr)
Called by malloc to record a profiled block.
func mProf_NextCycle()
mProf_NextCycle publishes the next heap profile cycle and creates a
fresh heap profile cycle. This operation is fast and can be done
during STW. The caller must call mProf_Flush before calling
mProf_NextCycle again.
This is called by mark termination during STW so allocations and
frees after the world is started again count towards a new heap
profiling cycle.
func mProf_PostSweep()
mProf_PostSweep records that all sweep frees for this GC cycle have
completed. This has the effect of publishing the heap profile
snapshot as of the last mark termination without advancing the heap
profile cycle.
func mSysStatDec(sysStat *uint64, n uintptr)
Atomically decreases a given *system* memory stat. Same comments as
mSysStatInc apply.
go:nosplit
func mSysStatInc(sysStat *uint64, n uintptr) madvise(addr unsafe.Pointer, n uintptr, flags int32) int32
return value is only set on linux to be used in osinit()
func main()
The main goroutine.
func main_main()
go:linkname main_main main.main
func makeslice(et *_type, len, cap int) unsafe.Pointer
func makeslice64(et *_type, len64, cap64 int64) unsafe.Pointer
func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer
Allocate an object of size bytes.
Small objects are allocated from the per-P cache's free lists.
Large objects (> 32 kB) are allocated straight from the heap.
func mallocinit()
func mapaccess1(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer
mapaccess1 returns a pointer to h[key]. Never returns nil, instead
it will return a reference to the zero object for the elem type if
the key is not in the map.
NOTE: The returned pointer may keep the whole map live, so don't
hold onto it for very long.
func mapaccess1_fast32(t *maptype, h *hmap, key uint32) unsafe.Pointer
func mapaccess1_fast64(t *maptype, h *hmap, key uint64) unsafe.Pointer
func mapaccess1_faststr(t *maptype, h *hmap, ky string) unsafe.Pointer
func mapaccess1_fat(t *maptype, h *hmap, key, zero unsafe.Pointer) unsafe.Pointer
func mapaccess2(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, bool)
func mapaccess2_fast32(t *maptype, h *hmap, key uint32) (unsafe.Pointer, bool)
func mapaccess2_fast64(t *maptype, h *hmap, key uint64) (unsafe.Pointer, bool)
func mapaccess2_faststr(t *maptype, h *hmap, ky string) (unsafe.Pointer, bool)
func mapaccess2_fat(t *maptype, h *hmap, key, zero unsafe.Pointer) (unsafe.Pointer, bool)
func mapaccessK(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, unsafe.Pointer)
returns both key and elem. Used by map iterator
func mapassign(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer
Like mapaccess, but allocates a slot for the key if it is not present in the map.
func mapassign_fast32(t *maptype, h *hmap, key uint32) unsafe.Pointer
func mapassign_fast32ptr(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer
func mapassign_fast64(t *maptype, h *hmap, key uint64) unsafe.Pointer
func mapassign_fast64ptr(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer
func mapassign_faststr(t *maptype, h *hmap, s string) unsafe.Pointer
func mapclear(t *maptype, h *hmap)
mapclear deletes all keys from a map.
func mapdelete(t *maptype, h *hmap, key unsafe.Pointer)
func mapdelete_fast32(t *maptype, h *hmap, key uint32)
func mapdelete_fast64(t *maptype, h *hmap, key uint64)
func mapdelete_faststr(t *maptype, h *hmap, ky string)
func mapiterinit(t *maptype, h *hmap, it *hiter)
mapiterinit initializes the hiter struct used for ranging over maps.
The hiter struct pointed to by 'it' is allocated on the stack
by the compilers order pass or on the heap by reflect_mapiterinit.
Both need to have zeroed hiter since the struct contains pointers.
func mapiternext(it *hiter)
func markroot(gcw *gcWork, i uint32)
markroot scans the i'th root.
Preemption must be disabled (because this uses a gcWork).
nowritebarrier is only advisory here.
func markrootBlock(b0, n0 uintptr, ptrmask0 *uint8, gcw *gcWork, shard int)
markrootBlock scans the shard'th shard of the block of memory [b0,
b0+n0), with the given pointer mask.
func markrootFreeGStacks()
markrootFreeGStacks frees stacks of dead Gs.
This does not free stacks of dead Gs cached on Ps, but having a few
cached stacks around isn't a problem.
func markrootSpans(gcw *gcWork, shard int)
markrootSpans marks roots for one shard of work.spans.
func mcall(fn func(*g))
mcall switches from the g to the g0 stack and invokes fn(g),
where g is the goroutine that made the call.
mcall saves g's current PC/SP in g->sched so that it can be restored later.
It is up to fn to arrange for that later execution, typically by recording
g in a data structure, causing something to call ready(g) later.
mcall returns to the original goroutine g later, when g has been rescheduled.
fn must not return at all; typically it ends by calling schedule, to let the m
run other goroutines.
mcall can only be called from g stacks (not g0, not gsignal).
This must NOT be go:noescape: if fn is a stack-allocated closure,
fn puts g on a run queue, and g executes before fn returns, the
closure will be invalidated while it is still executing.
func mcommoninit(mp *m)
func mcount() int32
func mdump()
func memclrHasPointers(ptr unsafe.Pointer, n uintptr)
memclrHasPointers clears n bytes of typed memory starting at ptr.
The caller must ensure that the type of the object at ptr has
pointers, usually by checking typ.ptrdata. However, ptr
does not have to point to the start of the allocation.
func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)
memclrNoHeapPointers clears n bytes starting at ptr.
Usually you should use typedmemclr. memclrNoHeapPointers should be
used only when the caller knows that *ptr contains no heap pointers
because either:
*ptr is initialized memory and its type is pointer-free, or
*ptr is uninitialized memory (e.g., memory that's being reused
for a new allocation) and hence contains only "junk".
The (CPU-specific) implementations of this function are in memclr_*.s.
go:noescape
func memequal(a, b unsafe.Pointer, size uintptr) bool
in asm_*.s
go:noescape
func memequal0(p, q unsafe.Pointer) bool
func memequal128(p, q unsafe.Pointer) bool
func memequal16(p, q unsafe.Pointer) bool
func memequal32(p, q unsafe.Pointer) bool
func memequal64(p, q unsafe.Pointer) bool
func memequal8(p, q unsafe.Pointer) bool
func memequal_varlen(a, b unsafe.Pointer) bool
func memhash(p unsafe.Pointer, seed, s uintptr) uintptr
func memhash0(p unsafe.Pointer, h uintptr) uintptr
func memhash128(p unsafe.Pointer, h uintptr) uintptr
func memhash16(p unsafe.Pointer, h uintptr) uintptr
func memhash32(p unsafe.Pointer, seed uintptr) uintptr
func memhash64(p unsafe.Pointer, seed uintptr) uintptr
func memhash8(p unsafe.Pointer, h uintptr) uintptr
func memhash_varlen(p unsafe.Pointer, h uintptr) uintptr
func memmove(to, from unsafe.Pointer, n uintptr)
memmove copies n bytes from "from" to "to".
in memmove_*.s
go:noescape
func mexit(osStack bool)
mexit tears down and exits the current thread.
Don't call this directly to exit the thread, since it must run at
the top of the thread stack. Instead, use gogo(&_g_.m.g0.sched) to
unwind the stack to the point that exits the thread.
It is entered with m.p != nil, so write barriers are allowed. It
will release the P before exiting.
func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32
func minit()
Called to initialize a new m (including the bootstrap m).
Called on the new thread, cannot allocate memory.
func minitSignalMask()
minitSignalMask is called when initializing a new m to set the
thread's signal mask. When this is called all signals have been
blocked for the thread. This starts with m.sigmask, which was set
either from initSigmask for a newly created thread or by calling
msigsave if this is a non-Go thread calling a Go function. It
removes all essential signals from the mask, thus causing those
signals to not be blocked. Then it sets the thread's signal mask.
After this is called the thread can receive signals.
func minitSignalStack()
minitSignalStack is called when initializing a new m to set the
alternate signal stack. If the alternate signal stack is not set
for the thread (the normal case) then set the alternate signal
stack to the gsignal stack. If the alternate signal stack is set
for the thread (the case when a non-Go thread sets the alternate
signal stack and then calls a Go function) then set the gsignal
stack to the alternate signal stack. Record which choice was made
in newSigstack, so that it can be undone in unminit.
func minitSignals()
minitSignals is called when initializing a new m to set the
thread's alternate signal stack and signal mask.
func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (unsafe.Pointer, int)
func modtimer(t *timer, when, period int64, f func(interface{}, uintptr), arg interface{}, seq uintptr)
func moduledataverify()
func moduledataverify1(datap *moduledata)
func modulesinit()
modulesinit creates the active modules slice out of all loaded modules.
When a module is first loaded by the dynamic linker, an .init_array
function (written by cmd/link) is invoked to call addmoduledata,
appending to the module to the linked list that starts with
firstmoduledata.
There are two times this can happen in the lifecycle of a Go
program. First, if compiled with -linkshared, a number of modules
built with -buildmode=shared can be loaded at program initialization.
Second, a Go program can load a module while running that was built
with -buildmode=plugin.
After loading, this function is called which initializes the
moduledata so it is usable by the GC and creates a new activeModules
list.
Only one goroutine may call modulesinit at a time.
func morestack()
func morestack_noctxt()
func morestackc()
This is exported as ABI0 via linkname so obj can call it.
go:nosplit
go:linkname morestackc
func mpreinit(mp *m)
Called to initialize a new m (including the bootstrap m).
Called on the parent thread (main thread in case of bootstrap), can allocate memory.
func mput(mp *m)
Put mp on midle list.
Sched must be locked.
May run during STW, so write barriers are not allowed.
go:nowritebarrierrec
func msanfree(addr unsafe.Pointer, sz uintptr)
func msanmalloc(addr unsafe.Pointer, sz uintptr)
func msanread(addr unsafe.Pointer, sz uintptr)
func msanwrite(addr unsafe.Pointer, sz uintptr)
func msigrestore(sigmask sigset)
msigrestore sets the current thread's signal mask to sigmask.
This is used to restore the non-Go signal mask when a non-Go thread
calls a Go function.
This is nosplit and nowritebarrierrec because it is called by dropm
after g has been cleared.
go:nosplit
go:nowritebarrierrec
func msigsave(mp *m)
msigsave saves the current thread's signal mask into mp.sigmask.
This is used to preserve the non-Go signal mask when a non-Go
thread calls a Go function.
This is nosplit and nowritebarrierrec because it is called by needm
which may be called on a non-Go thread with no g available.
go:nosplit
go:nowritebarrierrec
func mspinning()
func mstart()
mstart is the entry-point for new Ms.
This must not split the stack because we may not even have stack
bounds set up yet.
May run during STW (because it doesn't have a P yet), so write
barriers are not allowed.
func mstart1()
func mstartm0()
mstartm0 implements part of mstart1 that only runs on the m0.
Write barriers are allowed here because we know the GC can't be
running yet, so they'll be no-ops.
func mullu(u, v uint64) (lo, hi uint64)
64x64 -> 128 multiply.
adapted from hacker's delight.
func munmap(addr unsafe.Pointer, n uintptr)
func mutexevent(cycles int64, skip int)
go:linkname mutexevent sync.event
func nanotime() int64
func needm(x byte)
needm is called when a cgo callback happens on a
thread without an m (a thread not created by Go).
In this case, needm is expected to find an m to use
and return with m, g initialized correctly.
Since m and g are not set now (likely nil, but see below)
needm is limited in what routines it can call. In particular
it can only call nosplit functions (textflag 7) and cannot
do any scheduling that requires an m.
In order to avoid needing heavy lifting here, we adopt
the following strategy: there is a stack of available m's
that can be stolen. Using compare-and-swap
to pop from the stack has ABA races, so we simulate
a lock by doing an exchange (via Casuintptr) to steal the stack
head and replace the top pointer with MLOCKED (1).
This serves as a simple spin lock that we can use even
without an m. The thread that locks the stack in this way
unlocks the stack by storing a valid stack head pointer.
In order to make sure that there is always an m structure
available to be stolen, we maintain the invariant that there
is always one more than needed. At the beginning of the
program (if cgo is in use) the list is seeded with a single m.
If needm finds that it has taken the last m off the list, its job
is - once it has installed its own m so that it can do things like
allocate memory - to create a spare m and put it on the list.
Each of these extra m's also has a g0 and a curg that are
pressed into service as the scheduling stack and current
goroutine for the duration of the cgo callback.
When the callback is done with the m, it calls dropm to
put the m back on the list.
go:nosplit
func netpollDeadline(arg interface{}, seq uintptr)
func netpollReadDeadline(arg interface{}, seq uintptr)
func netpollWriteDeadline(arg interface{}, seq uintptr)
func netpollarm(pd *pollDesc, mode int)
func netpollblock(pd *pollDesc, mode int32, waitio bool) bool
returns true if IO is ready, or false if timedout or closed
waitio - wait only for completed IO, ignore errors
func netpollblockcommit(gp *g, gpp unsafe.Pointer) bool
func netpollcheckerr(pd *pollDesc, mode int32) int
func netpollclose(fd uintptr) int32
func netpolldeadlineimpl(pd *pollDesc, seq uintptr, read, write bool)
func netpolldescriptor() uintptr
func netpollgoready(gp *g, traceskip int)
func netpollinit()
func netpollinited() bool
func netpollopen(fd uintptr, pd *pollDesc) int32
func netpollready(toRun *gList, pd *pollDesc, mode int32)
make pd ready, newly runnable goroutines (if any) are added to toRun.
May run during STW, so write barriers are not allowed.
go:nowritebarrier
func newarray(typ *_type, n int) unsafe.Pointer
newarray allocates an array of n elements of type typ.
func newextram()
newextram allocates m's and puts them on the extra list.
It is called with a working local m, so that it can do things
like call schedlock and allocate.
func newm(fn func(), _p_ *p)
Create a new m. It will start off with a call to fn, or else the scheduler.
fn needs to be static and not a heap allocated closure.
May run with m.p==nil, so write barriers are not allowed.
go:nowritebarrierrec
func newm1(mp *m)
func newobject(typ *_type) unsafe.Pointer
implementation of new builtin
compiler (both frontend and SSA backend) knows the signature
of this function
func newosproc(mp *m)
May run with m.p==nil, so write barriers are not allowed.
go:nowritebarrier
func newosproc0(stacksize uintptr, fn unsafe.Pointer)
Version of newosproc that doesn't require a valid G.
go:nosplit
func newproc(siz int32, fn *funcval)
func newproc1(fn *funcval, argp *uint8, narg int32, callergp *g, callerpc uintptr)
Create a new g running fn with narg bytes of arguments starting
at argp. callerpc is the address of the go statement that created
this. The new g is put on the queue of g's waiting to run.
func newstack()
Called from runtime·morestack when more stack is needed.
Allocate larger stack and relocate to new stack.
Stack growth is multiplicative, for constant amortized cost.
g->atomicstatus will be Grunning or Gscanrunning upon entry.
If the GC is trying to stop this g then it will set preemptscan to true.
This must be nowritebarrierrec because it can be called as part of
stack growth from other nowritebarrierrec functions, but the
compiler doesn't check this.
func nextMarkBitArenaEpoch()
nextMarkBitArenaEpoch establishes a new epoch for the arenas
holding the mark bits. The arenas are named relative to the
current GC cycle which is demarcated by the call to finishweep_m.
All current spans have been swept.
During that sweep each span allocated room for its gcmarkBits in
gcBitsArenas.next block. gcBitsArenas.next becomes the gcBitsArenas.current
where the GC will mark objects and after each span is swept these bits
will be used to allocate objects.
gcBitsArenas.current becomes gcBitsArenas.previous where the span's
gcAllocBits live until all the spans have been swept during this GC cycle.
The span's sweep extinguishes all the references to gcBitsArenas.previous
by pointing gcAllocBits into the gcBitsArenas.current.
The gcBitsArenas.previous is released to the gcBitsArenas.free list.
func nextSample() uintptr
nextSample returns the next sampling point for heap profiling. The goal is
to sample allocations on average every MemProfileRate bytes, but with a
completely random distribution over the allocation timeline; this
corresponds to a Poisson process with parameter MemProfileRate. In Poisson
processes, the distance between two samples follows the exponential
distribution (exp(MemProfileRate)), so the best return value is a random
number taken from an exponential distribution whose mean is MemProfileRate.
func nextSampleNoFP() uintptr
nextSampleNoFP is similar to nextSample, but uses older,
simpler code to avoid floating point.
func nilfunc()
func nilinterequal(p, q unsafe.Pointer) bool
func nilinterhash(p unsafe.Pointer, h uintptr) uintptr
func noSignalStack(sig uint32)
This is called when we receive a signal when there is no signal stack.
This can only happen if non-Go code calls sigaltstack to disable the
signal stack.
func noescape(p unsafe.Pointer) unsafe.Pointer
noescape hides a pointer from escape analysis. noescape is
the identity function but escape analysis doesn't think the
output depends on the input. noescape is inlined and currently
compiles down to zero instructions.
USE CAREFULLY!
go:nosplit
func noteclear(n *note)
One-time notifications.
func notesleep(n *note)
func notetsleep(n *note, ns int64) bool
func notetsleep_internal(n *note, ns int64) bool
May run with m.p==nil if called from notetsleep, so write barriers
are not allowed.
func notetsleepg(n *note, ns int64) bool
same as runtime·notetsleep, but called on user g (not g0)
calls only nosplit functions between entersyscallblock/exitsyscall
func notewakeup(n *note)
func notifyListAdd(l *notifyList) uint32
notifyListAdd adds the caller to a notify list such that it can receive
notifications. The caller must eventually call notifyListWait to wait for
such a notification, passing the returned ticket number.
go:linkname notifyListAdd sync.runtime_notifyListAdd
func notifyListCheck(sz uintptr)
go:linkname notifyListCheck sync.runtime_notifyListCheck
func notifyListNotifyAll(l *notifyList)
notifyListNotifyAll notifies all entries in the list.
go:linkname notifyListNotifyAll sync.runtime_notifyListNotifyAll
func notifyListNotifyOne(l *notifyList)
notifyListNotifyOne notifies one entry in the list.
go:linkname notifyListNotifyOne sync.runtime_notifyListNotifyOne
func notifyListWait(l *notifyList, t uint32)
notifyListWait waits for a notification. If one has been sent since
notifyListAdd was called, it returns immediately. Otherwise, it blocks.
go:linkname notifyListWait sync.runtime_notifyListWait
func oneNewExtraM()
oneNewExtraM allocates an m and puts it on the extra list.
func open(name *byte, mode, perm int32) int32
func osRelax(relax bool)
osRelax is called by the scheduler when transitioning to and from
all Ps being idle.
func osStackAlloc(s *mspan)
osStackAlloc performs OS-specific initialization before s is used
as stack memory.
func osStackFree(s *mspan)
osStackFree undoes the effect of osStackAlloc before s is returned
to the heap.
func os_beforeExit()
os_beforeExit is called from os.Exit(0).
go:linkname os_beforeExit os.runtime_beforeExit
func os_runtime_args() []string
go:linkname os_runtime_args os.runtime_args
func os_sigpipe()
go:linkname os_sigpipe os.sigpipe
func osinit()
func osyield()
func overLoadFactor(count int, B uint8) bool
overLoadFactor reports whether count items placed in 1<<B buckets is over loadFactor.
func pageIndexOf(p uintptr) (arena *heapArena, pageIdx uintptr, pageMask uint8)
pageIndexOf returns the arena, page index, and page mask for pointer p.
The caller must ensure p is in the heap.
func panicCheck1(pc uintptr, msg string)
Check to make sure we can really generate a panic. If the panic
was generated from the runtime, or from inside malloc, then convert
to a throw of msg.
pc should be the program counter of the compiler-generated code that
triggered this panic.
func panicCheck2(err string)
Same as above, but calling from the runtime is allowed.
Using this function is necessary for any panic that may be
generated by runtime.sigpanic, since those are always called by the
runtime.
func panicIndex(x int, y int)
Implemented in assembly, as they take arguments in registers.
Declared here to mark them as ABIInternal.
func panicIndexU(x uint, y int)
func panicSlice3Acap(x int, y int)
func panicSlice3AcapU(x uint, y int)
func panicSlice3Alen(x int, y int)
func panicSlice3AlenU(x uint, y int)
func panicSlice3B(x int, y int)
func panicSlice3BU(x uint, y int)
func panicSlice3C(x int, y int)
func panicSlice3CU(x uint, y int)
func panicSliceAcap(x int, y int)
func panicSliceAcapU(x uint, y int)
func panicSliceAlen(x int, y int)
func panicSliceAlenU(x uint, y int)
func panicSliceB(x int, y int)
func panicSliceBU(x uint, y int)
func panicdivide()
func panicdottypeE(have, want, iface *_type)
panicdottypeE is called when doing an e.(T) conversion and the conversion fails.
have = the dynamic type we have.
want = the static type we're trying to convert to.
iface = the static type we're converting from.
func panicdottypeI(have *itab, want, iface *_type)
panicdottypeI is called when doing an i.(T) conversion and the conversion fails.
Same args as panicdottypeE, but "have" is the dynamic itab we have.
func panicfloat()
func panicmakeslicecap()
func panicmakeslicelen()
func panicmem()
func panicnildottype(want *_type)
panicnildottype is called when doing a i.(T) conversion and the interface i is nil.
want = the static type we're trying to convert to.
func panicoverflow()
func panicshift()
func panicwrap()
panicwrap generates a panic for a call to a wrapped value method
with a nil pointer receiver.
It is called from the generated wrapper code.
func park_m(gp *g)
park continuation on g0.
func parkunlock_c(gp *g, lock unsafe.Pointer) bool
func parsedebugvars()
func pcdatastart(f funcInfo, table int32) int32
func pcdatavalue(f funcInfo, table int32, targetpc uintptr, cache *pcvalueCache) int32
func pcdatavalue1(f funcInfo, table int32, targetpc uintptr, cache *pcvalueCache, strict bool) int32
func pcvalue(f funcInfo, off int32, targetpc uintptr, cache *pcvalueCache, strict bool) int32
func pcvalueCacheKey(targetpc uintptr) uintptr
pcvalueCacheKey returns the outermost index in a pcvalueCache to use for targetpc.
It must be very cheap to calculate.
For now, align to sys.PtrSize and reduce mod the number of entries.
In practice, this appears to be fairly randomly and evenly distributed.
func persistentalloc(size, align uintptr, sysStat *uint64) unsafe.Pointer
Wrapper around sysAlloc that can allocate small chunks.
There is no associated free operation.
Intended for things like function/type/debug-related persistent data.
If align is 0, uses default align (currently 8).
The returned memory will be zeroed.
Consider marking persistentalloc'd types go:notinheap.
func pidleput(_p_ *p)
Put p to on _Pidle list.
Sched must be locked.
May run during STW, so write barriers are not allowed.
go:nowritebarrierrec
func plugin_lastmoduleinit() (path string, syms map[string]interface{}, errstr string)
go:linkname plugin_lastmoduleinit plugin.lastmoduleinit
func pluginftabverify(md *moduledata)
func pollFractionalWorkerExit() bool
pollFractionalWorkerExit reports whether a fractional mark worker
should self-preempt. It assumes it is called from the fractional
worker.
func pollWork() bool
pollWork reports whether there is non-background work this P could
be doing. This is a fairly lightweight check to be used for
background work loops, like idle GC. It checks a subset of the
conditions checked by the actual scheduler.
func poll_runtime_Semacquire(addr *uint32)
go:linkname poll_runtime_Semacquire internal/poll.runtime_Semacquire
func poll_runtime_Semrelease(addr *uint32)
go:linkname poll_runtime_Semrelease internal/poll.runtime_Semrelease
func poll_runtime_isPollServerDescriptor(fd uintptr) bool
poll_runtime_isPollServerDescriptor reports whether fd is a
descriptor being used by netpoll.
func poll_runtime_pollClose(pd *pollDesc)
go:linkname poll_runtime_pollClose internal/poll.runtime_pollClose
func poll_runtime_pollOpen(fd uintptr) (*pollDesc, int)
go:linkname poll_runtime_pollOpen internal/poll.runtime_pollOpen
func poll_runtime_pollReset(pd *pollDesc, mode int) int
go:linkname poll_runtime_pollReset internal/poll.runtime_pollReset
func poll_runtime_pollServerInit()
go:linkname poll_runtime_pollServerInit internal/poll.runtime_pollServerInit
func poll_runtime_pollSetDeadline(pd *pollDesc, d int64, mode int)
go:linkname poll_runtime_pollSetDeadline internal/poll.runtime_pollSetDeadline
func poll_runtime_pollUnblock(pd *pollDesc)
go:linkname poll_runtime_pollUnblock internal/poll.runtime_pollUnblock
func poll_runtime_pollWait(pd *pollDesc, mode int) int
go:linkname poll_runtime_pollWait internal/poll.runtime_pollWait
func poll_runtime_pollWaitCanceled(pd *pollDesc, mode int)
go:linkname poll_runtime_pollWaitCanceled internal/poll.runtime_pollWaitCanceled
func preemptall() bool
Tell all goroutines that they have been preempted and they should stop.
This function is purely best-effort. It can fail to inform a goroutine if a
processor just started running it.
No locks need to be held.
Returns true if preemption request was issued to at least one goroutine.
func preemptone(_p_ *p) bool
Tell the goroutine running on processor P to stop.
This function is purely best-effort. It can incorrectly fail to inform the
goroutine. It can send inform the wrong goroutine. Even if it informs the
correct goroutine, that goroutine might ignore the request if it is
simultaneously executing newstack.
No lock needs to be held.
Returns true if preemption request was issued.
The actual preemption will happen at some point in the future
and will be indicated by the gp->status no longer being
Grunning
func prepGoExitFrame(sp uintptr)
func prepareFreeWorkbufs()
prepareFreeWorkbufs moves busy workbuf spans to free list so they
can be freed to the heap. This must only be called when all
workbufs are on the empty list.
func preprintpanics(p *_panic)
Call all Error and String methods before freezing the world.
Used when crashing with panicking.
func printAncestorTraceback(ancestor ancestorInfo)
printAncestorTraceback prints the traceback of the given ancestor.
TODO: Unify this with gentraceback and CallersFrames.
func printAncestorTracebackFuncInfo(f funcInfo, pc uintptr)
printAncestorTraceback prints the given function info at a given pc
within an ancestor traceback. The precision of this info is reduced
due to only have access to the pcs at the time of the caller
goroutine being created.
func printCgoTraceback(callers *cgoCallers)
cgoTraceback prints a traceback of callers.
func printDebugLog()
printDebugLog prints the debug log.
func printDebugLogPC(pc uintptr)
func printOneCgoTraceback(pc uintptr, max int, arg *cgoSymbolizerArg) int
printOneCgoTraceback prints the traceback of a single cgo caller.
This can print more than one line because of inlining.
Returns the number of frames printed.
func printany(i interface{})
printany prints an argument passed to panic.
If panic is called with a value that has a String or Error method,
it has already been converted into a string by preprintpanics.
func printbool(v bool)
func printcomplex(c complex128)
func printcreatedby(gp *g)
func printcreatedby1(f funcInfo, pc uintptr)
func printeface(e eface)
func printfloat(v float64)
func printhex(v uint64)
func printiface(i iface)
func printint(v int64)
func printlock()
func printnl()
func printpanics(p *_panic)
Print all currently active panics. Used when crashing.
Should only be called after preprintpanics.
func printpointer(p unsafe.Pointer)
func printslice(s []byte)
func printsp()
func printstring(s string)
func printuint(v uint64)
func printunlock()
func procPin() int
func procUnpin()
func procyield(cycles uint32)
func profilealloc(mp *m, x unsafe.Pointer, size uintptr)
func publicationBarrier()
publicationBarrier performs a store/store barrier (a "publication"
or "export" barrier). Some form of synchronization is required
between initializing an object and making that object accessible to
another processor. Without synchronization, the initialization
writes and the "publication" write may be reordered, allowing the
other processor to follow the pointer and observe an uninitialized
object. In general, higher-level synchronization should be used,
such as locking or an atomic pointer write. publicationBarrier is
for when those aren't an option, such as in the implementation of
the memory manager.
There's no corresponding barrier for the read side because the read
side naturally has a data dependency order. All architectures that
Go supports or seems likely to ever support automatically enforce
data dependency ordering.
func purgecachedstats(c *mcache)
func putCachedDlogger(l *dlogger) bool
func putempty(b *workbuf)
putempty puts a workbuf onto the work.empty list.
Upon entry this go routine owns b. The lfstack.push relinquishes ownership.
go:nowritebarrier
func putfull(b *workbuf)
putfull puts the workbuf on the work.full list for the GC.
putfull accepts partially full buffers so the GC can avoid competing
with the mutators for ownership of partially full buffers.
go:nowritebarrier
func queuefinalizer(p unsafe.Pointer, fn *funcval, nret uintptr, fint *_type, ot *ptrtype)
func raceReadObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr)
func raceWriteObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr)
func raceacquire(addr unsafe.Pointer)
func raceacquireg(gp *g, addr unsafe.Pointer)
func racefingo()
func racefini()
func racefree(p unsafe.Pointer, sz uintptr)
func racegoend()
func racegostart(pc uintptr) uintptr
func raceinit() (uintptr, uintptr)
func racemalloc(p unsafe.Pointer, sz uintptr)
func racemapshadow(addr unsafe.Pointer, size uintptr)
func raceproccreate() uintptr
func raceprocdestroy(ctx uintptr)
func racereadpc(addr unsafe.Pointer, callerpc, pc uintptr)
func racereadrangepc(addr unsafe.Pointer, sz, callerpc, pc uintptr)
func racerelease(addr unsafe.Pointer)
func racereleaseg(gp *g, addr unsafe.Pointer)
func racereleasemerge(addr unsafe.Pointer)
func racereleasemergeg(gp *g, addr unsafe.Pointer)
func racesync(c *hchan, sg *sudog)
func racewritepc(addr unsafe.Pointer, callerpc, pc uintptr)
func racewriterangepc(addr unsafe.Pointer, sz, callerpc, pc uintptr)
func raise(sig uint32)
func raisebadsignal(sig uint32, c *sigctxt)
raisebadsignal is called when a signal is received on a non-Go
thread, and the Go program does not want to handle it (that is, the
program has not called os/signal.Notify for the signal).
func raiseproc(sig uint32)
func rawbyteslice(size int) (b []byte)
rawbyteslice allocates a new byte slice. The byte slice is not zeroed.
func rawruneslice(size int) (b []rune)
rawruneslice allocates a new rune slice. The rune slice is not zeroed.
func rawstring(size int) (s string, b []byte)
rawstring allocates storage for a new string. The returned
string and byte slice both refer to the same storage.
The storage is not zeroed. Callers should use
b to set the string contents and then drop b.
func rawstringtmp(buf *tmpBuf, l int) (s string, b []byte)
func read(fd int32, p unsafe.Pointer, n int32) int32
func readGCStats(pauses *[]uint64)
go:linkname readGCStats runtime/debug.readGCStats
func readGCStats_m(pauses *[]uint64)
readGCStats_m must be called on the system stack because it acquires the heap
lock. See mheap for details.
go:systemstack
func readUnaligned32(p unsafe.Pointer) uint32
Note: These routines perform the read with an native endianness.
func readUnaligned64(p unsafe.Pointer) uint64
func readgogc() int32
func readgstatus(gp *g) uint32
All reads and writes of g's status go through readgstatus, casgstatus
castogscanstatus, casfrom_Gscanstatus.
go:nosplit
func readmemstats_m(stats *MemStats)
func readvarint(p []byte) (read uint32, val uint32)
readvarint reads a varint from p.
func ready(gp *g, traceskip int, next bool)
Mark gp ready to run.
func readyWithTime(s *sudog, traceskip int)
func record(r *MemProfileRecord, b *bucket)
Write b's data to r.
func recordForPanic(b []byte)
recordForPanic maintains a circular buffer of messages written by the
runtime leading up to a process crash, allowing the messages to be
extracted from a core dump.
The text written during a process crash (following "panic" or "fatal
error") is not saved, since the goroutine stacks will generally be readable
from the runtime datastructures in the core file.
func recordspan(vh unsafe.Pointer, p unsafe.Pointer)
recordspan adds a newly allocated span to h.allspans.
This only happens the first time a span is allocated from
mheap.spanalloc (it is not called when a span is reused).
Write barriers are disallowed here because it can be called from
gcWork when allocating new workbufs. However, because it's an
indirect call from the fixalloc initializer, the compiler can't see
this.
func recovery(gp *g)
Unwind the stack after a deferred function calls recover
after a panic. Then arrange to continue running as though
the caller of the deferred function returned normally.
func recv(c *hchan, sg *sudog, ep unsafe.Pointer, unlockf func(), skip int)
recv processes a receive operation on a full channel c.
There are 2 parts:
1) The value sent by the sender sg is put into the channel
and the sender is woken up to go on its merry way.
2) The value received by the receiver (the current G) is
written to ep.
For synchronous channels, both values are the same.
For asynchronous channels, the receiver gets its data from
the channel buffer and the sender's data is put in the
channel buffer.
Channel c must be full and locked. recv unlocks c with unlockf.
sg must already be dequeued from c.
A non-nil ep must point to the heap or the caller's stack.
func recvDirect(t *_type, sg *sudog, dst unsafe.Pointer)
func reentersyscall(pc, sp uintptr)
The goroutine g is about to enter a system call.
Record that it's not using the cpu anymore.
This is called only from the go syscall library and cgocall,
not from the low-level system calls used by the runtime.
Entersyscall cannot split the stack: the gosave must
make g->sched refer to the caller's stack segment, because
entersyscall is going to return immediately after.
Nothing entersyscall calls can split the stack either.
We cannot safely move the stack during an active call to syscall,
because we do not know which of the uintptr arguments are
really pointers (back into the stack).
In practice, this means that we make the fast path run through
entersyscall doing no-split things, and the slow path has to use systemstack
to run bigger things on the system stack.
reentersyscall is the entry point used by cgo callbacks, where explicitly
saved SP and PC are restored. This is needed when exitsyscall will be called
from a function further up in the call stack than the parent, as g->syscallsp
must always point to a valid stack frame. entersyscall below is the normal
entry point for syscalls, which obtains the SP and PC from the caller.
Syscall tracing:
At the start of a syscall we emit traceGoSysCall to capture the stack trace.
If the syscall does not block, that is it, we do not emit any other events.
If the syscall blocks (that is, P is retaken), retaker emits traceGoSysBlock;
when syscall returns we emit traceGoSysExit and when the goroutine starts running
(potentially instantly, if exitsyscallfast returns true) we emit traceGoStart.
To ensure that traceGoSysExit is emitted strictly after traceGoSysBlock,
we remember current value of syscalltick in m (_g_.m.syscalltick = _g_.m.p.ptr().syscalltick),
whoever emits traceGoSysBlock increments p.syscalltick afterwards;
and we wait for the increment before emitting traceGoSysExit.
Note that the increment is done even if tracing is not enabled,
because tracing can be enabled in the middle of syscall. We don't want the wait to hang.
func reflectOffsLock()
func reflectOffsUnlock()
func reflect_addReflectOff(ptr unsafe.Pointer) int32
reflect_addReflectOff adds a pointer to the reflection offset lookup map.
go:linkname reflect_addReflectOff reflect.addReflectOff
func reflect_chancap(c *hchan) int
go:linkname reflect_chancap reflect.chancap
func reflect_chanclose(c *hchan)
go:linkname reflect_chanclose reflect.chanclose
func reflect_chanlen(c *hchan) int
go:linkname reflect_chanlen reflect.chanlen
func reflect_chanrecv(c *hchan, nb bool, elem unsafe.Pointer) (selected bool, received bool)
go:linkname reflect_chanrecv reflect.chanrecv
func reflect_chansend(c *hchan, elem unsafe.Pointer, nb bool) (selected bool)
go:linkname reflect_chansend reflect.chansend
func reflect_gcbits(x interface{}) []byte
gcbits returns the GC type info for x, for testing.
The result is the bitmap entries (0 or 1), one entry per byte.
go:linkname reflect_gcbits reflect.gcbits
func reflect_ifaceE2I(inter *interfacetype, e eface, dst *iface)
go:linkname reflect_ifaceE2I reflect.ifaceE2I
func reflect_ismapkey(t *_type) bool
go:linkname reflect_ismapkey reflect.ismapkey
func reflect_mapaccess(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer
go:linkname reflect_mapaccess reflect.mapaccess
func reflect_mapassign(t *maptype, h *hmap, key unsafe.Pointer, elem unsafe.Pointer)
go:linkname reflect_mapassign reflect.mapassign
func reflect_mapdelete(t *maptype, h *hmap, key unsafe.Pointer)
go:linkname reflect_mapdelete reflect.mapdelete
func reflect_mapiterelem(it *hiter) unsafe.Pointer
go:linkname reflect_mapiterelem reflect.mapiterelem
func reflect_mapiterkey(it *hiter) unsafe.Pointer
go:linkname reflect_mapiterkey reflect.mapiterkey
func reflect_mapiternext(it *hiter)
go:linkname reflect_mapiternext reflect.mapiternext
func reflect_maplen(h *hmap) int
go:linkname reflect_maplen reflect.maplen
func reflect_memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)
go:linkname reflect_memclrNoHeapPointers reflect.memclrNoHeapPointers
func reflect_memmove(to, from unsafe.Pointer, n uintptr)
go:linkname reflect_memmove reflect.memmove
func reflect_resolveNameOff(ptrInModule unsafe.Pointer, off int32) unsafe.Pointer
reflect_resolveNameOff resolves a name offset from a base pointer.
go:linkname reflect_resolveNameOff reflect.resolveNameOff
func reflect_resolveTextOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
reflect_resolveTextOff resolves an function pointer offset from a base type.
go:linkname reflect_resolveTextOff reflect.resolveTextOff
func reflect_resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
reflect_resolveTypeOff resolves an *rtype offset from a base type.
go:linkname reflect_resolveTypeOff reflect.resolveTypeOff
func reflect_rselect(cases []runtimeSelect) (int, bool)
go:linkname reflect_rselect reflect.rselect
func reflect_typedmemclr(typ *_type, ptr unsafe.Pointer)
go:linkname reflect_typedmemclr reflect.typedmemclr
func reflect_typedmemclrpartial(typ *_type, ptr unsafe.Pointer, off, size uintptr)
go:linkname reflect_typedmemclrpartial reflect.typedmemclrpartial
func reflect_typedmemmove(typ *_type, dst, src unsafe.Pointer)
go:linkname reflect_typedmemmove reflect.typedmemmove
func reflect_typedmemmovepartial(typ *_type, dst, src unsafe.Pointer, off, size uintptr)
typedmemmovepartial is like typedmemmove but assumes that
dst and src point off bytes into the value and only copies size bytes.
go:linkname reflect_typedmemmovepartial reflect.typedmemmovepartial
func reflect_typedslicecopy(elemType *_type, dst, src slice) int
go:linkname reflect_typedslicecopy reflect.typedslicecopy
func reflect_typelinks() ([]unsafe.Pointer, [][]int32)
go:linkname reflect_typelinks reflect.typelinks
func reflect_unsafe_New(typ *_type) unsafe.Pointer
go:linkname reflect_unsafe_New reflect.unsafe_New
func reflect_unsafe_NewArray(typ *_type, n int) unsafe.Pointer
go:linkname reflect_unsafe_NewArray reflect.unsafe_NewArray
func reflectcall(argtype *_type, fn, arg unsafe.Pointer, argsize uint32, retoffset uint32)
reflectcall calls fn with a copy of the n argument bytes pointed at by arg.
After fn returns, reflectcall copies n-retoffset result bytes
back into arg+retoffset before returning. If copying result bytes back,
the caller should pass the argument frame type as argtype, so that
call can execute appropriate write barriers during the copy.
Package reflect passes a frame type. In package runtime, there is only
one call that copies results back, in cgocallbackg1, and it does NOT pass a
frame type, meaning there are no write barriers invoked. See that call
site for justification.
Package reflect accesses this symbol through a linkname.
func reflectcallmove(typ *_type, dst, src unsafe.Pointer, size uintptr)
reflectcallmove is invoked by reflectcall to copy the return values
out of the stack and into the heap, invoking the necessary write
barriers. dst, src, and size describe the return value area to
copy. typ describes the entire frame (not just the return values).
typ may be nil, which indicates write barriers are not needed.
It must be nosplit and must only call nosplit functions because the
stack map of reflectcall is wrong.
func reflectlite_chanlen(c *hchan) int
go:linkname reflectlite_chanlen internal/reflectlite.chanlen
func reflectlite_ifaceE2I(inter *interfacetype, e eface, dst *iface)
go:linkname reflectlite_ifaceE2I internal/reflectlite.ifaceE2I
func reflectlite_maplen(h *hmap) int
go:linkname reflectlite_maplen internal/reflectlite.maplen
func reflectlite_resolveNameOff(ptrInModule unsafe.Pointer, off int32) unsafe.Pointer
reflectlite_resolveNameOff resolves a name offset from a base pointer.
go:linkname reflectlite_resolveNameOff internal/reflectlite.resolveNameOff
func reflectlite_resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
reflectlite_resolveTypeOff resolves an *rtype offset from a base type.
go:linkname reflectlite_resolveTypeOff internal/reflectlite.resolveTypeOff
func reflectlite_typedmemmove(typ *_type, dst, src unsafe.Pointer)
go:linkname reflectlite_typedmemmove internal/reflectlite.typedmemmove
func reflectlite_unsafe_New(typ *_type) unsafe.Pointer
go:linkname reflectlite_unsafe_New internal/reflectlite.unsafe_New
func releaseSudog(s *sudog)
func releasem(mp *m)
func removefinalizer(p unsafe.Pointer)
Removes the finalizer (if any) from the object p.
func resetspinning()
func restartg(gp *g)
The GC requests that this routine be moved from a scanmumble state to a mumble state.
func restoreGsignalStack(st *gsignalStack)
restoreGsignalStack restores the gsignal stack to the value it had
before entering the signal handler.
go:nosplit
go:nowritebarrierrec
func retake(now int64) uint32
func return0()
return0 is a stub used to return 0 from deferproc.
It is called at the very end of deferproc to signal
the calling Go function that it should not jump
to deferreturn.
in asm_*.s
func rotl_31(x uint64) uint64
Note: in order to get the compiler to issue rotl instructions, we
need to constant fold the shift amount by hand.
TODO: convince the compiler to issue rotl instructions after inlining.
func round(n, a uintptr) uintptr
round n up to a multiple of a. a must be a power of 2.
func round2(x int32) int32
round x up to a power of 2.
func roundupsize(size uintptr) uintptr
Returns size of the memory block that mallocgc will allocate if you ask for the size.
func rt0_go()
func rt_sigaction(sig uintptr, new, old *sigactiont, size uintptr) int32
rt_sigaction is implemented in assembly.
go:noescape
func rtsigprocmask(how int32, new, old *sigset, size int32)
func runGCProg(prog, trailer, dst *byte, size int) uintptr
runGCProg executes the GC program prog, and then trailer if non-nil,
writing to dst with entries of the given size.
If size == 1, dst is a 1-bit pointer mask laid out moving forward from dst.
If size == 2, dst is the 2-bit heap bitmap, and writes move backward
starting at dst (because the heap bitmap does). In this case, the caller guarantees
that only whole bytes in dst need to be written.
runGCProg returns the number of 1- or 2-bit entries written to memory.
func runSafePointFn()
runSafePointFn runs the safe point function, if any, for this P.
This should be called like
if getg().m.p.runSafePointFn != 0 {
runSafePointFn()
}
runSafePointFn must be checked on any transition in to _Pidle or
_Psyscall to avoid a race where forEachP sees that the P is running
just before the P goes into _Pidle/_Psyscall and neither forEachP
nor the P run the safe-point function.
func runfinq()
This is the goroutine that runs all of the finalizers
func runqempty(_p_ *p) bool
runqempty reports whether _p_ has no Gs on its local run queue.
It never returns true spuriously.
func runqget(_p_ *p) (gp *g, inheritTime bool)
Get g from local runnable queue.
If inheritTime is true, gp should inherit the remaining time in the
current time slice. Otherwise, it should start a new time slice.
Executed only by the owner P.
func runqgrab(_p_ *p, batch *[256]guintptr, batchHead uint32, stealRunNextG bool) uint32
Grabs a batch of goroutines from _p_'s runnable queue into batch.
Batch is a ring buffer starting at batchHead.
Returns number of grabbed goroutines.
Can be executed by any P.
func runqput(_p_ *p, gp *g, next bool)
runqput tries to put g on the local runnable queue.
If next is false, runqput adds g to the tail of the runnable queue.
If next is true, runqput puts g in the _p_.runnext slot.
If the run queue is full, runnext puts g on the global queue.
Executed only by the owner P.
func runqputslow(_p_ *p, gp *g, h, t uint32) bool
Put g and a batch of work from local runnable queue on global queue.
Executed only by the owner P.
func runtime_debug_WriteHeapDump(fd uintptr)
go:linkname runtime_debug_WriteHeapDump runtime/debug.WriteHeapDump
func runtime_debug_freeOSMemory()
go:linkname runtime_debug_freeOSMemory runtime/debug.freeOSMemory
func runtime_getProfLabel() unsafe.Pointer
go:linkname runtime_getProfLabel runtime/pprof.runtime_getProfLabel
func runtime_pprof_readProfile() ([]uint64, []unsafe.Pointer, bool)
readProfile, provided to runtime/pprof, returns the next chunk of
binary CPU profiling stack trace data, blocking until data is available.
If profiling is turned off and all the profile data accumulated while it was
on has been returned, readProfile returns eof=true.
The caller must save the returned data and tags before calling readProfile again.
go:linkname runtime_pprof_readProfile runtime/pprof.readProfile
func runtime_pprof_runtime_cyclesPerSecond() int64
go:linkname runtime_pprof_runtime_cyclesPerSecond runtime/pprof.runtime_cyclesPerSecond
func runtime_setProfLabel(labels unsafe.Pointer)
go:linkname runtime_setProfLabel runtime/pprof.runtime_setProfLabel
func save(pc, sp uintptr)
save updates getg().sched to refer to pc and sp so that a following
gogo will restore pc and sp.
save must not have write barriers because invoking a write barrier
can clobber getg().sched.
func saveAncestors(callergp *g) *[]ancestorInfo
saveAncestors copies previous ancestors of the given caller g and
includes infor for the current caller into a new set of tracebacks for
a g being created.
func saveblockevent(cycles int64, skip int, which bucketType)
func saveg(pc, sp uintptr, gp *g, r *StackRecord)
func sbrk0() uintptr
func scanblock(b0, n0 uintptr, ptrmask *uint8, gcw *gcWork, stk *stackScanState)
scanblock scans b as scanobject would, but using an explicit
pointer bitmap instead of the heap bitmap.
This is used to scan non-heap roots, so it does not update
gcw.bytesMarked or gcw.scanWork.
If stk != nil, possible stack pointers are also reported to stk.putPtr.
go:nowritebarrier
func scanframeworker(frame *stkframe, state *stackScanState, gcw *gcWork)
Scan a stack frame: local variables and function arguments/results.
go:nowritebarrier
func scang(gp *g, gcw *gcWork)
scang blocks until gp's stack has been scanned.
It might be scanned by scang or it might be scanned by the goroutine itself.
Either way, the stack scan has completed when scang returns.
func scanobject(b uintptr, gcw *gcWork)
scanobject scans the object starting at b, adding pointers to gcw.
b must point to the beginning of a heap object or an oblet.
scanobject consults the GC bitmap for the pointer mask and the
spans for the size of the object.
func scanstack(gp *g, gcw *gcWork)
scanstack scans gp's stack, greying all pointers found on the stack.
scanstack is marked go:systemstack because it must not be preempted
while using a workbuf.
func scavengeSleep(ns int64) bool false if awoken early (i.e. true means a complete sleep).
func schedEnableUser(enable bool)
schedEnableUser enables or disables the scheduling of user
goroutines.
This does not stop already running user goroutines, so the caller
should first stop the world when disabling user goroutines.
func schedEnabled(gp *g) bool
schedEnabled reports whether gp should be scheduled. It returns
false is scheduling of gp is disabled.
func sched_getaffinity(pid, len uintptr, buf *byte) int32
func schedinit()
The bootstrap sequence is:
call osinit
call schedinit
make & queue new G
call runtime·mstart
The new G calls runtime·main.
func schedtrace(detailed bool)
func schedule()
One round of scheduler: find a runnable goroutine and execute it.
Never returns.
func selectgo(cas0 *scase, order0 *uint16, ncases int) (int, bool)
selectgo implements the select statement.
cas0 points to an array of type [ncases]scase, and order0 points to
an array of type [2*ncases]uint16. Both reside on the goroutine's
stack (regardless of any escaping in selectgo).
selectgo returns the index of the chosen scase, which matches the
ordinal position of its respective select{recv,send,default} call.
Also, if the chosen scase was a receive operation, it reports whether
a value was received.
func selectnbrecv(elem unsafe.Pointer, c *hchan) (selected bool)
compiler implements
case v = <-c:
... foo
default:
... bar
}
as
if selectnbrecv(&v, c) {
... foo
} else {
... bar
}
func selectnbrecv2(elem unsafe.Pointer, received *bool, c *hchan) (selected bool)
case v, ok = <-c:
... foo
default:
... bar
}
if c != nil && selectnbrecv2(&v, &ok, c) {
... foo
} else {
... bar
}
func selectnbsend(c *hchan, elem unsafe.Pointer) (selected bool)
case c <- v:
... foo
default:
... bar
}
if selectnbsend(c, v) {
... foo
} else {
... bar
}
func selectsetpc(cas *scase)
func sellock(scases []scase, lockorder []uint16)
func selparkcommit(gp *g, _ unsafe.Pointer) bool
func selunlock(scases []scase, lockorder []uint16)
func semacquire(addr *uint32)
Called from runtime.
func semacquire1(addr *uint32, lifo bool, profile semaProfileFlags, skipframes int)
func semrelease(addr *uint32)
func semrelease1(addr *uint32, handoff bool, skipframes int)
func send(c *hchan, sg *sudog, ep unsafe.Pointer, unlockf func(), skip int)
send processes a send operation on an empty channel c.
The value ep sent by the sender is copied to the receiver sg.
The receiver is then woken up to go on its merry way.
Channel c must be empty and locked. send unlocks c with unlockf.
sg must already be dequeued from c.
ep must be non-nil and point to the heap or the caller's stack.
func sendDirect(t *_type, sg *sudog, src unsafe.Pointer)
func setGCPercent(in int32) (out int32)
go:linkname setGCPercent runtime/debug.setGCPercent
func setGCPhase(x uint32)
func setGNoWB(gp **g, new *g)
setGNoWB performs *gp = new without a write barrier.
For times when it's impractical to use a guintptr.
go:nosplit
go:nowritebarrier
func setGsignalStack(st *stackt, old *gsignalStack)
setGsignalStack sets the gsignal stack of the current m to an
alternate signal stack returned from the sigaltstack system call.
It saves the old values in *old for use by restoreGsignalStack.
This is used when handling a signal if non-Go code has set the
alternate signal stack.
go:nosplit
go:nowritebarrierrec
func setMNoWB(mp **m, new *m)
setMNoWB performs *mp = new without a write barrier.
For times when it's impractical to use an muintptr.
go:nosplit
go:nowritebarrier
func setMaxStack(in int) (out int)
go:linkname setMaxStack runtime/debug.setMaxStack
func setMaxThreads(in int) (out int)
go:linkname setMaxThreads runtime/debug.setMaxThreads
func setPanicOnFault(new bool) (old bool)
go:linkname setPanicOnFault runtime/debug.setPanicOnFault
func setProcessCPUProfiler(hz int32)
setProcessCPUProfiler is called when the profiling timer changes.
It is called with prof.lock held. hz is the new timer, and is 0 if
profiling is being disabled. Enable or disable the signal as
required for -buildmode=c-archive.
func setSignalstackSP(s *stackt, sp uintptr)
setSignaltstackSP sets the ss_sp field of a stackt.
go:nosplit
func setThreadCPUProfiler(hz int32)
setThreadCPUProfiler makes any thread-specific changes required to
implement profiling at a rate of hz.
func setTraceback(level string)
go:linkname setTraceback runtime/debug.SetTraceback
func setcpuprofilerate(hz int32)
setcpuprofilerate sets the CPU profiling rate to hz times per second.
If hz <= 0, setcpuprofilerate turns off CPU profiling.
func setg(gg *g)
func setitimer(mode int32, new, old *itimerval)
func setprofilebucket(p unsafe.Pointer, b *bucket)
Set the heap profile bucket associated with addr to b.
func setsSP(pc uintptr) bool
Reports whether a function will set the SP
to an absolute value. Important that
we don't traceback when these are at the bottom
of the stack since we can't be sure that we will
find the caller.
If the function is not on the bottom of the stack
we assume that it will have set it up so that traceback will be consistent,
either by being a traceback terminating function
or putting one on the stack at the right offset.
func setsig(i uint32, fn uintptr)
func setsigsegv(pc uintptr)
setsigsegv is used on darwin/arm{,64} to fake a segmentation fault.
This is exported via linkname to assembly in runtime/cgo.
go:nosplit
go:linkname setsigsegv
func setsigstack(i uint32)
func settls()
Called from assembly only; declared for go vet.
func shade(b uintptr)
Shade the object if it isn't already.
The object is not nil and known to be in the heap.
Preemption must be disabled.
go:nowritebarrier
func shouldPushSigpanic(gp *g, pc, lr uintptr) bool
shouldPushSigpanic reports whether pc should be used as sigpanic's
return PC (pushing a frame for the call). Otherwise, it should be
left alone so that LR is used as sigpanic's return PC, effectively
replacing the top-most frame with sigpanic. This is used by
preparePanic.
func showframe(f funcInfo, gp *g, firstFrame bool, funcID, childID funcID) bool
showframe reports whether the frame with the given characteristics should
be printed during a traceback.
func showfuncinfo(f funcInfo, firstFrame bool, funcID, childID funcID) bool
showfuncinfo reports whether a function with the given characteristics should
be printed during a traceback.
func shrinkstack(gp *g)
Maybe shrink the stack being used by gp.
Called at garbage collection time.
gp must be stopped, but the world need not be.
func siftdownTimer(t []*timer, i int) bool
func siftupTimer(t []*timer, i int) bool
func sigInitIgnored(s uint32)
sigInitIgnored marks the signal as already ignored. This is called at
program start by initsig. In a shared library initsig is called by
libpreinit, so the runtime may not be initialized yet.
go:nosplit
func sigInstallGoHandler(sig uint32) bool
func sigNotOnStack(sig uint32)
This is called if we receive a signal when there is a signal stack
but we are not on it. This can only happen if non-Go code called
sigaction without setting the SS_ONSTACK flag.
func sigNoteSetup(*note)
func sigNoteSleep(*note)
func sigNoteWakeup(*note)
func sigaction(sig uint32, new, old *sigactiont)
func sigaddset(mask *sigset, i int)
func sigaltstack(new, old *stackt)
func sigblock()
sigblock blocks all signals in the current thread's signal mask.
This is used to block signals while setting up and tearing down g
when a non-Go thread calls a Go function.
The OS-specific code is expected to define sigset_all.
This is nosplit and nowritebarrierrec because it is called by needm
which may be called on a non-Go thread with no g available.
go:nosplit
go:nowritebarrierrec
func sigdelset(mask *sigset, i int)
func sigdisable(sig uint32)
sigdisable disables the Go signal handler for the signal sig.
It is only called while holding the os/signal.handlers lock,
via os/signal.disableSignal and signal_disable.
func sigenable(sig uint32)
sigenable enables the Go signal handler to catch the signal sig.
It is only called while holding the os/signal.handlers lock,
via os/signal.enableSignal and signal_enable.
func sigfillset(mask *uint64)
func sigfwd(fn uintptr, sig uint32, info *siginfo, ctx unsafe.Pointer)
func sigfwdgo(sig uint32, info *siginfo, ctx unsafe.Pointer) bool
Determines if the signal should be handled by Go and if not, forwards the
signal to the handler that was installed before Go's. Returns whether the
signal was forwarded.
This is called by the signal handler, and the world may be stopped.
go:nosplit
go:nowritebarrierrec
func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g)
sighandler is invoked when a signal occurs. The global g will be
set to a gsignal goroutine and we will be running on the alternate
signal stack. The parameter g will be the value of the global g
when the signal occurred. The sig, info, and ctxt parameters are
from the system signal handler: they are the parameters passed when
the SA is passed to the sigaction system call.
The garbage collector may have stopped the world, so write barriers
are not allowed.
func sigignore(sig uint32)
sigignore ignores the signal sig.
It is only called while holding the os/signal.handlers lock,
via os/signal.ignoreSignal and signal_ignore.
func signalDuringFork(sig uint32)
signalDuringFork is called if we receive a signal while doing a fork.
We do not want signals at that time, as a signal sent to the process
group may be delivered to the child process, causing confusion.
This should never be called, because we block signals across the fork;
this function is just a safety check. See issue 18600 for background.
func signalWaitUntilIdle()_disable(s uint32)
Must only be called from a single goroutine at a time.
go:linkname signal_disable os/signal.signal_disable
func signal_enable(s uint32)
Must only be called from a single goroutine at a time.
go:linkname signal_enable os/signal.signal_enable
func signal_ignore(s uint32)
Must only be called from a single goroutine at a time.
go:linkname signal_ignore os/signal.signal_ignore
func signal_ignored(s uint32) bool
Checked by signal handlers.
go:linkname signal_ignored os/signal.signal_ignored
func signal_recv() uint32
Called to receive the next queued signal.
Must only be called from a single goroutine at a time.
go:linkname signal_recv os/signal.signal_recv
func signalstack(s *stack)
signalstack sets the current thread's alternate signal stack to s.
go:nosplit
func signame(sig uint32) string
func sigpanic()
sigpanic turns a synchronous signal into a run-time panic.
If the signal handler sees a synchronous panic, it arranges the
stack to look like the function where the signal occurred called
sigpanic, sets the signal's PC value to sigpanic, and returns from
the signal handler. The effect is that the program will act as
though the function that got the signal simply called sigpanic
instead.
This must NOT be nosplit because the linker doesn't know where
sigpanic calls can be injected.
The signal handler must not inject a call to sigpanic if
getg().throwsplit, since sigpanic may need to grow the stack.
This is exported via linkname to assembly in runtime/cgo.
go:linkname sigpanic
func sigpipe()
func sigprocmask(how int32, new, old *sigset)
func sigprof(pc, sp, lr uintptr, gp *g, mp *m)
Called if we receive a SIGPROF signal.
Called by the signal handler, may run during STW.
go:nowritebarrierrec
func sigprofNonGo()
sigprofNonGo is called if we receive a SIGPROF signal on a non-Go thread,
and the signal handler collected a stack trace in sigprofCallers.
When this is called, sigprofCallersUse will be non-zero.
g is nil, and what we can do is very limited.
go:nosplit
go:nowritebarrierrec
func sigprofNonGoPC(pc uintptr)
sigprofNonGoPC is called when a profiling signal arrived on a
non-Go thread and we have a single PC value, not a stack trace.
g is nil, and what we can do is very limited.
go:nosplit
go:nowritebarrierrec
func sigreturn()
func sigsend(s uint32) bool
sigsend delivers a signal from sighandler to the internal signal delivery queue.
It reports whether the signal was sent. If not, the caller typically crashes the program.
It runs from the signal handler, so it's limited in what it can do.
func sigtramp(sig uint32, info *siginfo, ctx unsafe.Pointer)
func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer)
sigtrampgo is called from the signal handler function, sigtramp,
written in assembly code.
This is called by the signal handler, and the world may be stopped.
It must be nosplit because getg() is still the G that was running
(if any) when the signal was delivered, but it's (usually) called
on the gsignal stack. Until this switches the G to gsignal, the
stack bounds check won't work.
func skipPleaseUseCallersFrames()
This function is defined in asm.s to be sizeofSkipFunction bytes long.
func slicebytetostring(buf *tmpBuf, b []byte) (str string)
Buf is a fixed-size buffer for the result,
it is not nil if the result does not escape.
func slicebytetostringtmp(b []byte) string
slicebytetostringtmp returns a "string" referring to the actual []byte bytes.
Callers need to ensure that the returned string will not be used after
the calling goroutine modifies the original slice or synchronizes with
another goroutine.
The function is only called when instrumenting
and otherwise intrinsified by the compiler.
Some internal compiler optimizations use this function.
- Used for m[T1{... Tn{..., string(k), ...} ...}] and m[string(k)]
where k is []byte, T1 to Tn is a nesting of struct and array literals.
- Used for "<"+string(b)+">" concatenation where b is []byte.
- Used for string(b)=="foo" comparison where b is []byte.
func slicecopy(to, fm slice, width uintptr) int
func slicerunetostring(buf *tmpBuf, a []rune) string
func slicestringcopy(to []byte, fm string) int
func socket(domain int32, typ int32, prot int32) int32
func stackcache_clear(c *mcache)
func stackcacherefill(c *mcache, order uint8)
stackcacherefill/stackcacherelease implement a global pool of stack segments.
The pool is required to prevent unlimited growth of per-thread caches.
func stackcacherelease(c *mcache, order uint8)
func stackcheck()
stackcheck checks that SP is in range [g->stack.lo, g->stack.hi).
func stackfree(stk stack)
stackfree frees an n byte stack allocation at stk.
stackfree must run on the system stack because it uses per-P
resources and must not split the stack.
func stackinit()
func stacklog2(n uintptr) int
stacklog2 returns ⌊log_2(n)⌋.
func stackpoolfree(x gclinkptr, order uint8)
Adds stack x to the free pool. Must be called with stackpoolmu held.
func startTemplateThread()
startTemplateThread starts the template thread if it is not already
running.
The calling thread must itself be in a known-good state.
func startTheWorld()
startTheWorld undoes the effects of stopTheWorld.
func startTheWorldWithSema(emitTraceEvent bool) int64
func startTimer(t *timer)
startTimer adds t to the timer heap.
go:linkname startTimer time.startTimer
func startlockedm(gp *g)
Schedules the locked m to run the locked gp.
May run during STW, so write barriers are not allowed.
go:nowritebarrierrec
func startm(_p_ *p, spinning bool)
Schedules some M to run the p (creates an M if necessary).
If p==nil, tries to get an idle P, if no idle P's does nothing.
May run with m.p==nil, so write barriers are not allowed.
If spinning is set, the caller has incremented nmspinning and startm will
either decrement nmspinning or set m.spinning in the newly started M.
go:nowritebarrierrec
func startpanic_m() bool
startpanic_m prepares for an unrecoverable panic.
It returns true if panic messages should be printed, or false if
the runtime is in bad shape and should just print stacks.
It must not have write barriers even though the write barrier
explicitly ignores writes once dying > 0. Write barriers still
assume that g.m.p != nil, and this function may not have P
in some contexts (e.g. a panic in a signal handler for a signal
sent to an M with no P).
func step(p []byte, pc *uintptr, val *int32, first bool) (newp []byte, ok bool)
step advances to the next pc, value pair in the encoded table.
func stopTheWorld(reason string)
stopTheWorld stops all P's from executing goroutines, interrupting
all goroutines at GC safe points and records reason as the reason
for the stop. On return, only the current goroutine's P is running.
stopTheWorld must not be called from a system stack and the caller
must not hold worldsema. The caller must call startTheWorld when
other P's should resume execution.
stopTheWorld is safe for multiple goroutines to call at the
same time. Each will execute its own stop, and the stops will
be serialized.
This is also used by routines that do stack dumps. If the system is
in panic or being exited, this may not reliably stop all
goroutines.
func stopTheWorldWithSema()
stopTheWorldWithSema is the core implementation of stopTheWorld.
The caller is responsible for acquiring worldsema and disabling
preemption first and then should stopTheWorldWithSema on the system
stack:
semacquire(&worldsema, 0)
m.preemptoff = "reason"
systemstack(stopTheWorldWithSema)
When finished, the caller must either call startTheWorld or undo
these three operations separately:
m.preemptoff = ""
systemstack(startTheWorldWithSema)
semrelease(&worldsema)
It is allowed to acquire worldsema once and then execute multiple
startTheWorldWithSema/stopTheWorldWithSema pairs.
Other P's are able to execute between successive calls to
startTheWorldWithSema and stopTheWorldWithSema.
Holding worldsema causes any other goroutines invoking
stopTheWorld to block.
func stopTimer(t *timer) bool
stopTimer removes t from the timer heap if it is there.
It returns true if t was removed, false if t wasn't even there.
go:linkname stopTimer time.stopTimer
func stoplockedm()
Stops execution of the current m that is locked to a g until the g is runnable again.
Returns with acquired P.
func stopm()
Stops execution of the current m until new work is available.
Returns with acquired P.
func strequal(p, q unsafe.Pointer) bool
func strhash(a unsafe.Pointer, h uintptr) uintptr
func stringDataOnStack(s string) bool
stringDataOnStack reports whether the string's data is
stored on the current goroutine's stack.
func stringHash(s string, seed uintptr) uintptr
Testing adapters for hash quality tests (see hash_test.go)
func stringtoslicebyte(buf *tmpBuf, s string) []byte
func stringtoslicerune(buf *[tmpStringBufSize]rune, s string) []rune
func subtract1(p *byte) *byte
subtract1 returns the byte pointer p-1.
go:nowritebarrier
nosplit because it is used during write barriers and must not be preempted.
go:nosplit
func subtractb(p *byte, n uintptr) *byte
subtractb returns the byte pointer p-n.
go:nowritebarrier
go:nosplit
func sweepone() uintptr
sweepone sweeps some unswept heap span and returns the number of pages returned
to the heap, or ^uintptr(0) if there was nothing to sweep.
func sync_atomic_CompareAndSwapPointer(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
go:linkname sync_atomic_CompareAndSwapPointer sync/atomic.CompareAndSwapPointer
go:nosplit
func sync_atomic_CompareAndSwapUintptr(ptr *uintptr, old, new uintptr) bool
go:linkname sync_atomic_CompareAndSwapUintptr sync/atomic.CompareAndSwapUintptr
func sync_atomic_StorePointer(ptr *unsafe.Pointer, new unsafe.Pointer)
go:linkname sync_atomic_StorePointer sync/atomic.StorePointer
go:nosplit
func sync_atomic_StoreUintptr(ptr *uintptr, new uintptr)
go:linkname sync_atomic_StoreUintptr sync/atomic.StoreUintptr
func sync_atomic_SwapPointer(ptr *unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
go:linkname sync_atomic_SwapPointer sync/atomic.SwapPointer
go:nosplit
func sync_atomic_SwapUintptr(ptr *uintptr, new uintptr) uintptr
go:linkname sync_atomic_SwapUintptr sync/atomic.SwapUintptr
func sync_atomic_runtime_procPin() int
go:linkname sync_atomic_runtime_procPin sync/atomic.runtime_procPin
go:nosplit
func sync_atomic_runtime_procUnpin()
go:linkname sync_atomic_runtime_procUnpin sync/atomic.runtime_procUnpin
go:nosplit
func sync_fastrand() uint32
go:linkname sync_fastrand sync.fastrand
func sync_nanotime() int64
go:linkname sync_nanotime sync.runtime_nanotime
func sync_runtime_Semacquire(addr *uint32)
go:linkname sync_runtime_Semacquire sync.runtime_Semacquire
func sync_runtime_SemacquireMutex(addr *uint32, lifo bool, skipframes int)
go:linkname sync_runtime_SemacquireMutex sync.runtime_SemacquireMutex
func sync_runtime_Semrelease(addr *uint32, handoff bool, skipframes int)
go:linkname sync_runtime_Semrelease sync.runtime_Semrelease
func sync_runtime_canSpin(i int) bool
Active spinning for sync.Mutex.
go:linkname sync_runtime_canSpin sync.runtime_canSpin
go:nosplit
func sync_runtime_doSpin()
go:linkname sync_runtime_doSpin sync.runtime_doSpin
go:nosplit
func sync_runtime_procPin() int
go:linkname sync_runtime_procPin sync.runtime_procPin
go:nosplit
func sync_runtime_procUnpin()
go:linkname sync_runtime_procUnpin sync.runtime_procUnpin
go:nosplit
func sync_runtime_registerPoolCleanup(f func())
go:linkname sync_runtime_registerPoolCleanup sync.runtime_registerPoolCleanup
func sync_throw(s string)
go:linkname sync_throw sync.throw
func syncadjustsudogs(gp *g, used uintptr, adjinfo *adjustinfo) uintptr
syncadjustsudogs adjusts gp's sudogs and copies the part of gp's
stack they refer to while synchronizing with concurrent channel
operations. It returns the number of bytes of stack copied.
func sysAlloc(n uintptr, sysStat *uint64) unsafe.Pointer
Don't split the stack as this method may be invoked without a valid G, which
prevents us from allocating more stack.
go:nosplit
func sysFault(v unsafe.Pointer, n uintptr)
func sysFree(v unsafe.Pointer, n uintptr, sysStat *uint64)
Don't split the stack as this function may be invoked without a valid G,
which prevents us from allocating more stack.
go:nosplit
func sysHugePage(v unsafe.Pointer, n uintptr)
func sysMap(v unsafe.Pointer, n uintptr, sysStat *uint64)
func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (p unsafe.Pointer, err int)
sysMmap calls the mmap system call. It is implemented in assembly.
func sysMunmap(addr unsafe.Pointer, n uintptr)
sysMunmap calls the munmap system call. It is implemented in assembly.
func sysReserve(v unsafe.Pointer, n uintptr) unsafe.Pointer
func sysReserveAligned(v unsafe.Pointer, size, align uintptr) (unsafe.Pointer, uintptr)
sysReserveAligned is like sysReserve, but the returned pointer is
aligned to align bytes. It may reserve either n or n+align bytes,
so it returns the size that was reserved.
func sysSigaction(sig uint32, new, old *sigactiont)
sysSigaction calls the rt_sigaction system call.
go:nosplit
func sysUnused(v unsafe.Pointer, n uintptr)
func sysUsed(v unsafe.Pointer, n uintptr)
func sysargs(argc int32, argv **byte)
func sysauxv(auxv []uintptr) int
func syscall_Exit(code int)
go:linkname syscall_Exit syscall.Exit
go:nosplit
func syscall_Getpagesize() int
go:linkname syscall_Getpagesize syscall.Getpagesize
func syscall_runtime_AfterExec()
Called from syscall package after Exec.
go:linkname syscall_runtime_AfterExec syscall.runtime_AfterExec
func syscall_runtime_AfterFork()
Called from syscall package after fork in parent.
go:linkname syscall_runtime_AfterFork syscall.runtime_AfterFork
go:nosplit
func syscall_runtime_AfterForkInChild()
Called from syscall package after fork in child.
It resets non-sigignored signals to the default handler, and
restores the signal mask in preparation for the exec.
Because this might be called during a vfork, and therefore may be
temporarily sharing address space with the parent process, this must
not change any global variables or calling into C code that may do so.
go:linkname syscall_runtime_AfterForkInChild syscall.runtime_AfterForkInChild
go:nosplit
go:nowritebarrierrec
func syscall_runtime_BeforeExec()
Called from syscall package before Exec.
go:linkname syscall_runtime_BeforeExec syscall.runtime_BeforeExec
func syscall_runtime_BeforeFork()
Called from syscall package before fork.
go:linkname syscall_runtime_BeforeFork syscall.runtime_BeforeFork
go:nosplit
func syscall_runtime_envs() []string
go:linkname syscall_runtime_envs syscall.runtime_envs
func syscall_setenv_c(k string, v string)
Update the C environment if cgo is loaded.
Called from syscall.Setenv.
go:linkname syscall_setenv_c syscall.setenv_c
func syscall_unsetenv_c(k string)
Update the C environment if cgo is loaded.
Called from syscall.unsetenv.
go:linkname syscall_unsetenv_c syscall.unsetenv_c
func sysmon()
Always runs without a P, so write barriers are not allowed.
func systemstack(fn func())
systemstack runs fn on a system stack.
If systemstack is called from the per-OS-thread (g0) stack, or
if systemstack is called from the signal handling (gsignal) stack,
systemstack calls fn directly and returns.
Otherwise, systemstack is being called from the limited stack
of an ordinary goroutine. In this case, systemstack switches
to the per-OS-thread stack, calls fn, and switches back.
It is common to use a func literal as the argument, in order
to share inputs and outputs with the code around the call
to system stack:
... set up y ...
systemstack(func() {
x = bigcall(y)
})
... use x ...
func systemstack_switch()
func templateThread()
templateThread is a thread in a known-good state that exists solely
to start new threads in known-good states when the calling thread
may not be in a good state.
Many programs never need this, so templateThread is started lazily
when we first enter a state that might lead to running on a thread
in an unknown state.
templateThread runs on an M without a P, so it must not have write
barriers.
func testAtomic64()
func testdefersizes()
Ensure that defer arg sizes that map to the same defer size class
also map to the same malloc size class.
func throw(s string)
func tickspersecond() int64
Note: Called by runtime/pprof in addition to runtime code.
func timeSleep(ns int64)
timeSleep puts the current goroutine to sleep for at least ns nanoseconds.
go:linkname timeSleep time.Sleep
func timeSleepUntil() int64
func time_now() (sec int64, nsec int32, mono int64)
go:linkname time_now time.now
func timediv(v int64, div int32, rem *int32) int32
Poor mans 64-bit division.
This is a very special function, do not use it if you are not sure what you are doing.
int64 division is lowered into _divv() call on 386, which does not fit into nosplit functions.
Handles overflow in a time-specific manner.
This keeps us within no-split stack limits on 32-bit processors.
go:nosplit
func timerproc(tb *timersBucket)
Timerproc runs the time-driven events.
It sleeps until the next event in the tb heap.
If addtimer inserts a new earlier event, it wakes timerproc early.
func tooManyOverflowBuckets(noverflow uint16, B uint8) bool
tooManyOverflowBuckets reports whether noverflow buckets is too many for a map with 1<<B buckets.
Note that most of these overflow buckets must be in sparse use;
if use was dense, then we'd have already triggered regular map growth.
func tophash(hash uintptr) uint8
tophash calculates the tophash value for hash.
func topofstack(f funcInfo, g0 bool) bool
Does f mark the top of a goroutine stack?
func totaldefersize(siz uintptr) uintptr
total size of memory block for defer with arg size sz
func traceAcquireBuffer() (mp *m, pid int32, bufp *traceBufPtr)
traceAcquireBuffer returns trace buffer to use and, if necessary, locks it.
func traceAppend(buf []byte, v uint64) []byte
traceAppend appends v to buf in little-endian-base-128 encoding.
func traceEvent(ev byte, skip int, args ...uint64)
traceEvent writes a single event to trace buffer, flushing the buffer if necessary.
ev is event type.
If skip > 0, write current stack id as the last argument (skipping skip top frames).
If skip = 0, this event type should contain a stack, but we don't want
to collect and remember it for this particular call.
func traceEventLocked(extraBytes int, mp *m, pid int32, bufp *traceBufPtr, ev byte, skip int, args ...uint64)
func traceFrameForPC(buf traceBufPtr, pid int32, f Frame) (traceFrame, traceBufPtr)
traceFrameForPC records the frame information.
It may allocate memory.
func traceFullQueue(buf traceBufPtr)
traceFullQueue queues buf into queue of full buffers.
func traceGCDone()
func traceGCMarkAssistDone()
func traceGCMarkAssistStart()
func traceGCSTWDone()
func traceGCSTWStart(kind int)
func traceGCStart()
func traceGCSweepDone()
func traceGCSweepSpan(bytesSwept uintptr)
traceGCSweepSpan traces the sweep of a single page.
This may be called outside a traceGCSweepStart/traceGCSweepDone
pair; however, it will not emit any trace events in this case.
func traceGCSweepStart()
traceGCSweepStart prepares to trace a sweep loop. This does not
emit any events until traceGCSweepSpan is called.
traceGCSweepStart must be paired with traceGCSweepDone and there
must be no preemption points between these two calls.
func traceGoCreate(newg *g, pc uintptr)
func traceGoEnd()
func traceGoPark(traceEv byte, skip int)
func traceGoPreempt()
func traceGoSched()
func traceGoStart()
func traceGoSysBlock(pp *p)
func traceGoSysCall()
func traceGoSysExit(ts int64)
func traceGoUnpark(gp *g, skip int)
func traceGomaxprocs(procs int32)
func traceHeapAlloc()
func traceNextGC()
func traceProcFree(pp *p)
traceProcFree frees trace buffer associated with pp.
func traceProcStart()
func traceProcStop(pp *p)
func traceReleaseBuffer(pid int32)
traceReleaseBuffer releases a buffer previously acquired with traceAcquireBuffer.
func traceStackID(mp *m, buf []uintptr, skip int) uint64
func traceString(bufp *traceBufPtr, pid int32, s string) (uint64, *traceBufPtr)
traceString adds a string to the trace.strings and returns the id.
func trace_userLog(id uint64, category, message string)
go:linkname trace_userLog runtime/trace.userLog
func trace_userRegion(id, mode uint64, name string)
go:linkname trace_userRegion runtime/trace.userRegion
func trace_userTaskCreate(id, parentID uint64, taskType string)
go:linkname trace_userTaskCreate runtime/trace.userTaskCreate
func trace_userTaskEnd(id uint64)
go:linkname trace_userTaskEnd runtime/trace.userTaskEnd
func tracealloc(p unsafe.Pointer, size uintptr, typ *_type)
func traceback(pc, sp, lr uintptr, gp *g)
func traceback1(pc, sp, lr uintptr, gp *g, flags uint)
func tracebackCgoContext(pcbuf *uintptr, printing bool, ctxt uintptr, n, max int) int
tracebackCgoContext handles tracing back a cgo context value, from
the context argument to setCgoTraceback, for the gentraceback
function. It returns the new value of n.
func tracebackHexdump(stk stack, frame *stkframe, bad uintptr)
tracebackHexdump hexdumps part of stk around frame.sp and frame.fp
for debugging purposes. If the address bad is included in the
hexdumped range, it will mark it as well.
func tracebackdefers(gp *g, callback func(*stkframe, unsafe.Pointer) bool, v unsafe.Pointer)
Traceback over the deferred function calls.
Report them like calls that have been invoked but not started executing yet.
func tracebackinit()
func tracebackothers(me *g)
func tracebacktrap(pc, sp, lr uintptr, gp *g)
tracebacktrap is like traceback but expects that the PC and SP were obtained
from a trap, not from gp->sched or gp->syscallpc/gp->syscallsp or getcallerpc/getcallersp.
Because they are from a trap instead of from a saved pair,
the initial PC must not be rewound to the previous instruction.
(All the saved pairs record a PC that is a return address, so we
rewind it into the CALL instruction.)
If gp.m.libcall{g,pc,sp} information is available, it uses that information in preference to
the pc/sp/lr passed in.
func tracefree(p unsafe.Pointer, size uintptr)
func tracegc()
func typeBitsBulkBarrier(typ *_type, dst, src, size uintptr)
typeBitsBulkBarrier executes a write barrier for every
pointer that would be copied from [src, src+size) to [dst,
dst+size) by a memmove using the type bitmap to locate those
pointer slots.
The type typ must correspond exactly to [src, src+size) and [dst, dst+size).
dst, src, and size must be pointer-aligned.
The type typ must have a plain bitmap, not a GC program.
The only use of this function is in channel sends, and the
64 kB channel element limit takes care of this for us.
Must not be preempted because it typically runs right before memmove,
and the GC must observe them as an atomic action.
func typedmemclr(typ *_type, ptr unsafe.Pointer)
typedmemclr clears the typed memory at ptr with type typ. The
memory at ptr must already be initialized (and hence in type-safe
state). If the memory is being initialized for the first time, see
memclrNoHeapPointers.
If the caller knows that typ has pointers, it can alternatively
call memclrHasPointers.
func typedmemmove(typ *_type, dst, src unsafe.Pointer)
typedmemmove copies a value of type t to dst from src.
Must be nosplit, see #16026.
TODO: Perfect for go:nosplitrec since we can't have a safe point
anywhere in the bulk barrier or memmove.
func typedslicecopy(typ *_type, dst, src slice) int
func typelinksinit()
typelinksinit scans the types from extra modules and builds the
moduledata typemap used to de-duplicate type pointers.
func typesEqual(t, v *_type, seen map[_typePair]struct{}) bool
typesEqual reports whether two types are equal.
Everywhere in the runtime and reflect packages, it is assumed that
there is exactly one *_type per Go type, so that pointer equality
can be used to test if types are equal. There is one place that
breaks this assumption: buildmode=shared. In this case a type can
appear as two different pieces of memory. This is hidden from the
runtime and reflect package by the per-module typemap built in
typelinksinit. It uses typesEqual to map types from later modules
back into earlier ones.
Only typelinksinit needs this function.
func typestring(x interface{}) string
func unblocksig(sig uint32)
unblocksig removes sig from the current thread's signal mask.
This is nosplit and nowritebarrierrec because it is called from
dieFromSignal, which can be called by sigfwdgo while running in the
signal handler, on the signal stack, with no g available.
go:nosplit
go:nowritebarrierrec
func unlock(l *mutex)
func unlockOSThread()
func unlockextra(mp *m)
func unminit()
Called from dropm to undo the effect of an minit.
go:nosplit
func unminitSignals()
unminitSignals is called from dropm, via unminit, to undo the
effect of calling minit on a non-Go thread.
go:nosplit
func unwindm(restore *bool)
func updatememstats()
func usleep(usec uint32)
func vdsoFindVersion(info *vdsoInfo, ver *vdsoVersionKey) int32
func vdsoInitFromSysinfoEhdr(info *vdsoInfo, hdr *elfEhdr)
func vdsoParseSymbols(info *vdsoInfo, version int32)
func vdsoauxv(tag, val uintptr)
func wakeScavenger()
wakeScavenger unparks the scavenger if necessary. It must be called
after any pacing update.
mheap_.lock and scavenge.lock must not be held.
func wakep()
Tries to add one more P to execute G's.
Called when a G is made runnable (newproc, ready).
func walltime() (sec int64, nsec int32)
func wbBufFlush(dst *uintptr, src uintptr)
wbBufFlush flushes the current P's write barrier buffer to the GC
workbufs. It is passed the slot and value of the write barrier that
caused the flush so that it can implement cgocheck.
This must not have write barriers because it is part of the write
barrier implementation.
This and everything it calls must be nosplit because 1) the stack
contains untyped slots from gcWriteBarrier and 2) there must not be
a GC safe point between the write barrier test in the caller and
flushing the buffer.
TODO: A "go:nosplitrec" annotation would be perfect for this.
go:nowritebarrierrec
go:nosplit
func wbBufFlush1(_p_ *p)
wbBufFlush1 flushes p's write barrier buffer to the GC work queue.
This must not have write barriers because it is part of the write
barrier implementation, so this may lead to infinite loops or
buffer corruption.
This must be non-preemptible because it uses the P's workbuf.
go:nowritebarrierrec
go:systemstack
func wbBufFlush1Debug(old, buf1, buf2 uintptr, start *uintptr, next uintptr)
wbBufFlush1Debug is a temporary function for debugging issue
#27993. It exists solely to add some context to the traceback.
go:nowritebarrierrec
go:systemstack
go:noinline
func wirep(_p_ *p)
wirep is the first step of acquirep, which actually associates the
current M to _p_. This is broken out so we can disallow write
barriers for this part, since we don't yet have a P.
func write(fd uintptr, p unsafe.Pointer, n int32) int32
func writeErr(b []byte)
func writeheapdump_m(fd uintptr)
BlockProfileRecord describes blocking events originated
at a particular call sequence (stack trace).
type BlockProfileRecord struct {
Count int64
Cycles int64
StackRecord
}
The Error interface identifies a run time error.
type Error interface {
error
// RuntimeError is a no-op function but
// serves to distinguish types that are run time
// errors from ordinary errors: a type is a
// run time error if it has a RuntimeError method.
RuntimeError()
}
Frame is the information returned by Frames for each call frame.
type Frame struct {
// PC is the program counter for the location in this frame.
// For a frame that calls another frame, this will be the
// program counter of a call instruction. Because of inlining,
// multiple frames may have the same PC value, but different
// symbolic information.
PC uintptr
// Func is the Func value of this call frame. This may be nil
// for non-Go code or fully inlined functions.
Func *Func
// Function is the package path-qualified function name of
// this call frame. If non-empty, this string uniquely
// identifies a single function in the program.
// This may be the empty string if not known.
// If Func is not nil then Function == Func.Name().
Function string
// File and Line are the file name and line number of the
// location in this frame. For non-leaf frames, this will be
// the location of a call. These may be the empty string and
// zero, respectively, if not known.
File string
Line int
// Entry point program counter for the function; may be zero
// if not known. If Func is not nil then Entry ==
// Func.Entry().
Entry uintptr
// The runtime's internal view of the function. This field
// is set (funcInfo.valid() returns true) only for Go functions,
// not for C functions.
funcInfo funcInfo
}
func allFrames(pcs []uintptr) []Frame
allFrames returns all of the Frames corresponding to pcs.
func expandCgoFrames(pc uintptr) []Frame
expandCgoFrames expands frame information for pc, known to be
a non-Go function, using the cgoSymbolizer hook. expandCgoFrames
returns nil if pc could not be expanded.
Frames may be used to get function/file/line information for a
slice of PC values returned by Callers.
type Frames struct {
// callers is a slice of PCs that have not yet been expanded to frames.
callers []uintptr
// frames is a slice of Frames that have yet to be returned.
frames []Frame
frameStore [2]Frame
}
▹ Example
▾ Example
- more:true | runtime.Callers
- more:true | runtime_test.ExampleFrames.func1
- more:true | runtime_test.ExampleFrames.func2
- more:true | runtime_test.ExampleFrames.func3
- more:true | runtime_test.ExampleFrames
func CallersFrames(callers []uintptr) *Frames
CallersFrames takes a slice of PC values returned by Callers and
prepares to return function/file/line information.
Do not change the slice until you are done with the Frames.
func (ci *Frames) Next() (frame Frame, more bool)
Next returns frame information for the next caller.
If more is false, there are no more callers (the Frame value is valid).
A Func represents a Go function in the running binary.
type Func struct {
opaque struct{} // unexported field to disallow conversions
}
func FuncForPC(pc uintptr) *Func
FuncForPC returns a *Func describing the function that contains the
given program counter address, or else nil.
If pc represents multiple functions because of inlining, it returns
the a *Func describing the innermost function, but with an entry
of the outermost function..
func (f *Func) funcInfo() funcInfo
func (f *Func) raw() *. estimates // Go 1.2
// OtherSys is bytes of memory in miscellaneous off-heap
// runtime allocations.
OtherSys uint64 // Go 1.2
// // Go 1.4
// NumGC is the number of completed GC cycles.
NumGC uint32
// NumForcedGC is the number of GC cycles that were forced by
// the application calling the GC function.
NumForcedGC uint32 // Go 1.8
// // Go 1.5
//
}
}
A StackRecord describes a single execution stack.
type StackRecord struct {
Stack0 [32]uintptr // stack trace for this record; ends at first 0 entry
}
func (r *StackRecord) Stack() []uintptr
A TypeAssertionError explains a failed type assertion.
type TypeAssertionError struct {
_interface *_type
concrete *_type
asserted *_type
missingMethod string // one method needed by Interface, missing from Concrete
}
func (e *TypeAssertionError) Error() string
func (*TypeAssertionError) RuntimeError()
A _defer holds an entry on the list of deferred calls.
If you add a field here, add code to clear it in freedefer.
sp uintptr // sp at time of defer
pc uintptr
fn *funcval
_panic *_panic // panic that is running defer
link *_defer
}
func newdefer(siz int32) *_defer
Allocate a Defer, usually using per-P pool.
Each defer must be released with freedefer.
This must not grow the stack because there may be a frame without
stack map information when this is called. a deferreturn block from entry, if any.
pcsp int32
pcfile int32
pcln int32
npcdata int32
funcID funcID // set for certain special runtime functions
_ [2]int8 // unused
nfuncdata uint8 // must be last
}
A _panic holds information about an active panic.
This is marked go:notinheap because _panic values must only ever
live on the stack.
The argp and link fields are stack pointers, but don't need special
handling during stack growth: because they are pointer-typed and
_panic values only live on the stack, regular stack pointer
adjustment takes care of them.
go:notinheap
type _panic struct {
argp unsafe.Pointer // pointer to arguments of deferred call run during panic; cannot move - known to liblink
arg interface{} // argument to panic
link *_panic // link to earlier panic
recovered bool // whether this panic is over
aborted bool // the panic was aborted
}
Needs to be in sync with ../cmd/link/internal/ld/decodesym.go:/^func.commonsize,
../cmd/compile/internal/gc/reflect.go:/^func.dcommontype and
../reflect/type.go:/^type.rtype.
}
var deferType *_type // type of _defer struct
func resolveTypeOff(ptrInModule unsafe.Pointer, off typeOff) *_type
func (t *_type) name() string
func (t *_type) nameOff(off nameOff) name
func (t *_type) pkgpath() string
pkgpath returns the path of the package where t was defined, if
available. This is not the same as the reflect package's PkgPath
method, in that it returns the package path for struct and interface
types, not just named types.
func (t *_type) string() string
func (t *_type) textOff(off textOff) unsafe.Pointer
func (t *_type) typeOff(off typeOff) *_type
func (t *_type) uncommon() *uncommontype
type _typePair struct {
t1 *_type
t2 *_type
}
type adjustinfo struct {
old stack
delta uintptr // ptr distance from old to new stack (newbase - oldbase)
cache pcvalueCache
// sghi is the highest sudog.elem on the stack.
sghi uintptr
}
ancestorInfo records details of where a goroutine was started.
type ancestorInfo struct {
pcs []uintptr // pcs from the stack of this goroutine
goid int64 // goroutine id of this goroutine; original goroutine possibly dead
gopc uintptr // pc of go statement that created this goroutine
}
arenaHint is a hint for where to grow the heap arenas. See
mheap_.arenaHints.
type arenaHint struct {
addr uintptr
down bool
next *arenaHint
}
type arenaIdx uint
func arenaIndex(p uintptr) arenaIdx
arenaIndex returns the index into mheap_.arenas of the arena
containing metadata for p. This index combines of an index into the
L1 map and an index into the L2 map and should be used as
mheap_.arenas[ai.l1()][ai.l2()].
If p is outside the range of valid heap addresses, either l1() or
l2() will be out of bounds.
It is nosplit because it's called by spanOf and several other
nosplit functions.
func (i arenaIdx) l1() uint
func (i arenaIdx) l2() uint
type arraytype struct {
typ _type
elem *_type
slice *_type
len uintptr
}
Information from the compiler about the layout of stack frames.
type bitvector struct {
n int32 // # of bits
bytedata *uint8
}
func makeheapobjbv(p uintptr, size uintptr) bitvector
func progToPointerMask(prog *byte, size uintptr) bitvector
progToPointerMask returns the 1-bit pointer mask output by the GC program prog.
size the size of the region described by prog, in bytes.
The resulting bitvector will have no more than size/sys.PtrSize bits.
func stackmapdata(stkmap *stackmap, n int32) bitvector
func (bv *bitvector) ptrbit(i uintptr) uint8
ptrbit returns the i'th bit in bv.
ptrbit is less efficient than iterating directly over bitvector bits,
and should only be used in non-performance-critical code.
See adjustpointers for an example of a high-efficiency walk of a bitvector.
A blockRecord is the bucket data for a bucket of type blockProfile,
which is used in blocking and mutex profiles.
type blockRecord struct {
count int64
cycles int64
}
A bucket for a Go map.
type bmap struct {
// tophash generally contains the top byte of the hash value
// for each key in this bucket. If tophash[0] < minTopHash,
// tophash[0] is a bucket evacuation state instead.
tophash [bucketCnt]uint8
}
func makeBucketArray(t *maptype, b uint8, dirtyalloc unsafe.Pointer) (buckets unsafe.Pointer, nextOverflow *bmap)
makeBucketArray initializes a backing array for map buckets.
1<<b is the minimum number of buckets to allocate.
dirtyalloc should either be nil or a bucket array previously
allocated by makeBucketArray with the same t and b parameters.
If dirtyalloc is nil a new backing array will be alloced and
otherwise dirtyalloc will be cleared and reused as backing array.
func (b *bmap) keys() unsafe.Pointer
func (b *bmap) overflow(t *maptype) *bmap
func (b *bmap) setoverflow(t *maptype, ovf *bmap)
An boundsError represents a an indexing or slicing operation gone wrong.
type boundsError struct {
x int64
y int
// Values in an index or slice expression can be signed or unsigned.
// That means we'd need 65 bits to encode all possible indexes, from -2^63 to 2^64-1.
// Instead, we keep track of whether x should be interpreted as signed or unsigned.
// y is known to be nonnegative and to fit in an int.
signed bool
code boundsErrorCode
}
func (e boundsError) Error() string
func (e boundsError) RuntimeError()
type boundsErrorCode uint8
const (
boundsIndex boundsErrorCode = iota // s[x], 0 <= x < len(s) failed
boundsSliceAlen // s[?:x], 0 <= x <= len(s) failed
boundsSliceAcap // s[?:x], 0 <= x <= cap(s) failed
boundsSliceB // s[x:y], 0 <= x <= y failed (but boundsSliceA didn't happen)
boundsSlice3Alen // s[?:?:x], 0 <= x <= len(s) failed
boundsSlice3Acap // s[?:?:x], 0 <= x <= cap(s) failed
boundsSlice3B // s[?:x:y], 0 <= x <= y failed (but boundsSlice3A didn't happen)
boundsSlice3C // s[x:y:?], 0 <= x <= y failed (but boundsSlice3A/B didn't happen)
)
A bucket holds per-call-stack profiling information.
The representation is a bit sleazy, inherited from C.
This struct defines the bucket header. It is followed in
memory by the stack words and then the actual record
data, either a memRecord or a blockRecord.
Per-call-stack profiling information.
Lookup by hashing call stack into a linked-list hash table.
No heap pointers.
type bucket struct {
next *bucket
allnext *bucket
typ bucketType // memBucket or blockBucket (includes mutexProfile)
hash uintptr
size uintptr
nstk uintptr
}
func newBucket(typ bucketType, nstk int) *bucket
newBucket allocates a bucket with the given type and number of stack entries.
func stkbucket(typ bucketType, size uintptr, stk []uintptr, alloc bool) *bucket
Return the bucket for stk[0:nstk], allocating new bucket if needed.
func (b *bucket) bp() *blockRecord
bp returns the blockRecord associated with the blockProfile bucket b.
func (b *bucket) mp() *memRecord
mp returns the memRecord associated with the memProfile bucket b.
func (b *bucket) stk() []uintptr
stk returns the slice in b holding the stack.
type bucketType int
const (
// profile types
memProfile bucketType = 1 + iota
blockProfile
mutexProfile
// size of bucket hash table
buckHashSize = 179999
// max depth of stack to record in bucket
maxStack = 32
)
Addresses collected in a cgo backtrace when crashing.
Length must match arg.Max in x_cgo_callers in runtime/cgo/gcc_traceback.c.
type cgoCallers [32]uintptr
If the signal handler receives a SIGPROF signal on a non-Go thread,
it tries to collect a traceback into sigprofCallers.
sigprofCallersUse is set to non-zero while sigprofCallers holds a traceback.
var sigprofCallers cgoCallers
cgoContextArg is the type passed to the context function.
type cgoContextArg struct {
context uintptr
}
cgoSymbolizerArg is the type passed to cgoSymbolizer.
type cgoSymbolizerArg struct {
pc uintptr
file *byte
lineno uintptr
funcName *byte
entry uintptr
more uintptr
data uintptr
}
cgoTracebackArg is the type passed to cgoTraceback.
type cgoTracebackArg struct {
context uintptr
sigContext uintptr
buf *uintptr
max uintptr
}
type cgothreadstart struct {
g guintptr
tls *uint64
fn unsafe.Pointer
}
type chantype struct {
typ _type
elem *_type
dir uintptr
}
type childInfo struct {
// Information passed up from the callee frame about
// the layout of the outargs region.
argoff uintptr // where the arguments start in the frame
arglen uintptr // size of args region
args bitvector // if args.n >= 0, pointer map of args region
sp *uint8 // callee sp
depth uintptr // depth in call stack (0 == most recent)
}
type cpuProfile struct {
lock mutex
on bool // profiling is on
log *profBuf // profile events written here
// extra holds extra stacks accumulated in addNonGo
// corresponding to profiling signals arriving on
// non-Go-created threads. Those stacks are written
// to log the next time a normal Go thread gets the
// signal handler.
// Assuming the stacks are 2 words each (we don't get
// a full traceback from those threads), plus one word
// size for framing, 100 Hz profiling would generate
// 300 words per second.
// Hopefully a normal Go thread will get the profiling
// signal at least once every few seconds.
extra [1000]uintptr
numExtra int
lostExtra uint64 // count of frames lost because extra is full
lostAtomic uint64 // count of frames lost because of being in atomic64 on mips/arm; updated racily
}
var cpuprof cpuProfile
func (p *cpuProfile) add(gp *g, stk []uintptr)
add adds the stack trace to the profile.
It is called from signal handlers and other limited environments
and cannot allocate memory or acquire locks that might be
held at the time of the signal, nor can it use substantial amounts
of stack.
go:nowritebarrierrec
func (p *cpuProfile) addExtra()
addExtra adds the "extra" profiling events,
queued by addNonGo, to the profile log.
addExtra is called either from a signal handler on a Go thread
or from an ordinary goroutine; either way it can use stack
and has a g. The world may be stopped, though.
func (p *cpuProfile) addNonGo(stk []uintptr)
addNonGo adds the non-Go stack trace to the profile.
It is called from a non-Go thread, so we cannot use much stack at all,
nor do anything that needs a g or an m.
In particular, we can't call cpuprof.log.write.
Instead, we copy the stack into cpuprof.extra,
which will be drained the next time a Go thread
gets the signal handling event.
go:nosplit
go:nowritebarrierrec
type dbgVar struct {
name string
value *int32
}
type debugLogBuf [debugLogBytes]byte
type debugLogReader struct {
data *debugLogBuf
// begin and end are the positions in the log of the beginning
// and end of the log data, modulo len(data).
begin, end uint64
// tick and nano are the current time base at begin.
tick, nano uint64
}
func (r *debugLogReader) header() (end, tick, nano uint64, p int)
func (r *debugLogReader) peek() (tick uint64)
func (r *debugLogReader) printVal() bool
func (r *debugLogReader) readUint16LEAt(pos uint64) uint16
func (r *debugLogReader) readUint64LEAt(pos uint64) uint64
func (r *debugLogReader) skip() uint64
func (r *debugLogReader) uvarint() uint64
func (r *debugLogReader) varint() int64
A debugLogWriter is a ring buffer of binary debug log records.
A log record consists of a 2-byte framing header and a sequence of
fields. The framing header gives the size of the record as a little
endian 16-bit value. Each field starts with a byte indicating its
type, followed by type-specific data. If the size in the framing
header is 0, it's a sync record consisting of two little endian
64-bit values giving a new time base.
Because this is a ring buffer, new records will eventually
overwrite old records. Hence, it maintains a reader that consumes
the log as it gets overwritten. That reader state is where an
actual log reader would start.
type debugLogWriter struct {
write uint64
data debugLogBuf
// tick and nano are the time bases from the most recently
// written sync record.
tick, nano uint64
// r is a reader that consumes records as they get overwritten
// by the writer. It also acts as the initial reader state
// when printing the log.
r debugLogReader
// buf is a scratch buffer for encoding. This is here to
// reduce stack usage.
buf [10]byte
}
func (l *debugLogWriter) byte(x byte)
func (l *debugLogWriter) bytes(x []byte)
func (l *debugLogWriter) ensure(n uint64)
func (l *debugLogWriter) uvarint(u uint64)
func (l *debugLogWriter) varint(x int64)
func (l *debugLogWriter) writeFrameAt(pos, size uint64) bool
func (l *debugLogWriter) writeSync(tick, nano uint64)
func (l *debugLogWriter) writeUint64LE(x uint64)
type divMagic struct {
shift uint8
shift2 uint8
mul uint16
baseMask uint16
}
type dlogPerM struct{}
A dlogger writes to the debug log.
To obtain a dlogger, call dlog(). When done with the dlogger, call
end().
type dlogger struct {
w debugLogWriter
// allLink is the next dlogger in the allDloggers list.
allLink *dlogger
// owned indicates that this dlogger is owned by an M. This is
// accessed atomically.
owned uint32
}
allDloggers is a list of all dloggers, linked through
dlogger.allLink. This is accessed atomically. This is prepend only,
so it doesn't need to protect against ABA races.
var allDloggers *dlogger
func dlog() *dlogger
dlog returns a debug logger. The caller can use methods on the
returned logger to add values, which will be space-separated in the
final output, much like println. The caller must call end() to
finish the message.
dlog can be used from highly-constrained corners of the runtime: it
is safe to use in the signal handler, from within the write
barrier, from within the stack implementation, and in places that
must be recursively nosplit.
This will be compiled away if built without the debuglog build tag.
However, argument construction may not be. If any of the arguments
are not literals or trivial expressions, consider protecting the
call with "if dlogEnabled".
func getCachedDlogger() *dlogger
func (l *dlogger) b(x bool) *dlogger
func (l *dlogger) end()
func (l *dlogger) hex(x uint64) *dlogger
func (l *dlogger) i(x int) *dlogger
func (l *dlogger) i16(x int16) *dlogger
func (l *dlogger) i32(x int32) *dlogger
func (l *dlogger) i64(x int64) *dlogger
func (l *dlogger) i8(x int8) *dlogger
func (l *dlogger) p(x interface{}) *dlogger
func (l *dlogger) pc(x uintptr) *dlogger
func (l *dlogger) s(x string) *dlogger
func (l *dlogger) traceback(x []uintptr) *dlogger
func (l *dlogger) u(x uint) *dlogger
func (l *dlogger) u16(x uint16) *dlogger
func (l *dlogger) u32(x uint32) *dlogger
func (l *dlogger) u64(x uint64) *dlogger
func (l *dlogger) u8(x uint8) *dlogger
func (l *dlogger) uptr(x uintptr) *dlogger
type eface struct {
_type *_type
data unsafe.Pointer
}
func convT2E(t *_type, elem unsafe.Pointer) (e eface)
func convT2Enoptr(t *_type, elem unsafe.Pointer) (e eface)
func efaceOf(ep *interface{}) *eface
type elfDyn struct {
d_tag int64 /* Dynamic entry type */
d_val uint64 /* Integer value */
}
type elfEhdr struct {
e_ident [_EI_NIDENT]byte /* Magic number and other info */
e_type uint16 /* Object file type */
e_machine uint16 /* Architecture */
e_version uint32 /* Object file version */
e_entry uint64 /* Entry point virtual address */
e_phoff uint64 /* Program header table file offset */
e_shoff uint64 /* Section header table file offset */
e_flags uint32 /* Processor-specific flags */
e_ehsize uint16 /* ELF header size in bytes */
e_phentsize uint16 /* Program header table entry size */
e_phnum uint16 /* Program header table entry count */
e_shentsize uint16 /* Section header table entry size */
e_shnum uint16 /* Section header table entry count */
e_shstrndx uint16 /* Section header string table index */
}
type elfPhdr struct {
p_type uint32 /* Segment type */
p_flags uint32 /* Segment flags */
p_offset uint64 /* Segment file offset */
p_vaddr uint64 /* Segment virtual address */
p_paddr uint64 /* Segment physical address */
p_filesz uint64 /* Segment size in file */
p_memsz uint64 /* Segment size in memory */
p_align uint64 /* Segment alignment */
}
type elfShdr struct {
sh_name uint32 /* Section name (string tbl index) */
sh_type uint32 /* Section type */
sh_flags uint64 /* Section flags */
sh_addr uint64 /* Section virtual addr at execution */
sh_offset uint64 /* Section file offset */
sh_size uint64 /* Section size in bytes */
sh_link uint32 /* Link to another section */
sh_info uint32 /* Additional section information */
sh_addralign uint64 /* Section alignment */
sh_entsize uint64 /* Entry size if section holds table */
}
type elfSym struct {
st_name uint32
st_info byte
st_other byte
st_shndx uint16
st_value uint64
st_size uint64
}
type elfVerdaux struct {
vda_name uint32 /* Version or dependency names */
vda_next uint32 /* Offset in bytes to next verdaux entry */
}
type elfVerdef struct {
vd_version uint16 /* Version revision */
vd_flags uint16 /* Version information */
vd_ndx uint16 /* Version Index */
vd_cnt uint16 /* Number of associated aux entries */
vd_hash uint32 /* Version name hash value */
vd_aux uint32 /* Offset in bytes to verdaux array */
vd_next uint32 /* Offset in bytes to next verdef entry */
}
type epollevent struct {
events uint32
data [8]byte // unaligned uintptr
}
An errorString represents a runtime error described by a single string.
type errorString string
func (e errorString) Error() string
func (e errorString) RuntimeError()
evacDst is an evacuation destination.
type evacDst struct {
b *bmap // current destination bucket
i int // key/elem index into b
k unsafe.Pointer // pointer to current key storage
e unsafe.Pointer // pointer to current elem storage
}
NOTE: Layout known to queuefinalizer.
type finalizer struct {
fn *funcval // function to call (may be a heap pointer)
arg unsafe.Pointer // ptr to object (may be a heap pointer)
nret uintptr // bytes of return values from fn
fint *_type // type of first argument of fn
ot *ptrtype // type of ptr to object (may be a heap pointer)
}
finblock is an array of finalizers to be executed. finblocks are
arranged in a linked list for the finalizer queue.
finblock is allocated from non-GC'd memory, so any heap pointers
must be specially handled. GC currently assumes that the finalizer
queue does not grow during marking (but it can shrink).
type finblock struct {
alllink *finblock
next *finblock
cnt uint32
_ int32
fin [(_FinBlockSize - 2*sys.PtrSize - 2*4) / unsafe.Sizeof(finalizer{})]finalizer
}
var allfin *finblock // list of all blocks
var finc *finblock // cache of free blocks
var finq *finblock // list of finalizers that are to be executed
findfunctab is an array of these structures.
Each bucket represents 4096 bytes of the text segment.
Each subbucket represents 256 bytes of the text segment.
To find a function given a pc, locate the bucket and subbucket for
that pc. Add together the idx and subbucket value to obtain a
function index. Then scan the functab array starting at that
index to find the target function.
This table uses 20 bytes for every 4096 bytes of code, or ~0.5% overhead.
type findfuncbucket struct {
idx uint32
subbuckets [16]byte
}
FixAlloc is a simple free-list allocator for fixed size objects.
Malloc uses a FixAlloc wrapped around sysAlloc to manage its
mcache and mspan objects.
Memory returned by fixalloc.alloc is zeroed by default, but the
caller may take responsibility for zeroing allocations by setting
the zero flag to false. This is only safe if the memory never
contains heap pointers.
The caller is responsible for locking around FixAlloc calls.
Callers can keep state in the object but the first word is
smashed by freeing and reallocating.
Consider marking fixalloc'd types go:notinheap.
type fixalloc struct {
size uintptr
first func(arg, p unsafe.Pointer) // called first time p is returned
arg unsafe.Pointer
list *mlink
chunk uintptr // use uintptr instead of unsafe.Pointer to avoid write barriers
nchunk uint32
inuse uintptr // in-use bytes now
stat *uint64
zero bool // zero allocations
}
func (f *fixalloc) alloc() unsafe.Pointer
func (f *fixalloc) free(p unsafe.Pointer)
func (f *fixalloc) init(size uintptr, first func(arg, p unsafe.Pointer), arg unsafe.Pointer, stat *uint64)
Initialize f to allocate objects of the given size,
using the allocator to obtain chunks of memory.
type forcegcstate struct {
lock mutex
g *g
idle uint32
}
type fpreg1 struct {
significand [4]uint16
exponent uint16
}
type fpstate struct {
cwd uint16
swd uint16
ftw uint16
fop uint16
rip uint64
rdp uint64
mxcsr uint32
mxcr_mask uint32
_st [8]fpxreg
_xmm [16]xmmreg
padding [24]uint32
}
type fpstate1 struct {
cwd uint16
swd uint16
ftw uint16
fop uint16
rip uint64
rdp uint64
mxcsr uint32
mxcr_mask uint32
_st [8]fpxreg1
_xmm [16]xmmreg1
padding [24]uint32
}
type fpxreg struct {
significand [4]uint16
exponent uint16
padding [3]uint16
}
type fpxreg1 struct {
significand [4]uint16
exponent uint16
padding [3]uint16
}
A FuncID identifies particular functions that need to be treated
specially by the runtime.
Note that in some situations involving plugins, there may be multiple
copies of a particular special runtime function.
Note: this list must match the list in cmd/internal/objabi/funcid.go.
type funcID uint8.)
)
type funcInfo struct {
*_func
datap *moduledata
}
func findfunc(pc uintptr) funcInfo
func (f funcInfo) _Func() *Func
func (f funcInfo) valid() bool
}
type functab struct {
entry uintptr
funcoff uintptr
}
type functype struct {
typ _type
inCount uint16
outCount uint16
}
func (t *functype) dotdotdot() bool
func (t *functype) in() []*_type
func (t *functype) out() []*_type
type funcval struct {
fn uintptr
}
type g struct {
// Stack parameters.
// stack describes the actual stack memory: [stack.lo, stack.hi).
// stackguard0 is the stack pointer compared in the Go stack growth prologue.
// It is stack.lo+StackGuard normally, but can be StackPreempt to trigger a preemption.
// stackguard1 is the stack pointer compared in the C stack growth prologue.
// It is stack.lo+StackGuard on g0 and gsignal stacks.
// It is ~0 on other goroutine stacks, to trigger a call to morestackc (and crash).
stackLock uint32 // sigprof/scang lock; TODO: fold in to atomicstatus
goid int64
schedlink guintptr
waitsince int64 // approx time when the g become blocked
waitreason waitReason // if status==Gwaiting
preempt bool // preemption signal, duplicates stackguard0 = stackpreempt
paniconfault bool // panic (instead of crash) on unexpected fault address
preemptscan bool // preempted g does scan for gc
gcscandone bool // g has scanned stack; protected by _Gscan bit in status
gcscanvalid bool // false at start of gc cycle, true if G has not run since last scan; TODO: remove?
throwsplit bool // must not split stack
raceignore int8 // ignore race detection events
sysblocktraced bool // StartTrace has emitted EvGoInSyscall about this goroutine
sysexitticks int64 // cputicks when syscall has returned (for tracing)
traceseq uint64 // trace event sequencer
tracelastp puintptr // last P emitted an event for this goroutine
lockedm muintptr
sig uint32
writebuf []byte
sigcode0 uintptr
sigcode1 uintptr
sigpc uintptr
gopc uintptr // pc of go statement that created this goroutine
ancestors *[]ancestorInfo // ancestor information goroutine(s) that created this goroutine (only used if debug.tracebackancestors)
startpc uintptr // pc of goroutine function
racectx uintptr
waiting *sudog // sudog structures this g is waiting on (that have a valid elem ptr); in lock order
cgoCtxt []uintptr // cgo traceback context
labels unsafe.Pointer // profiler labels
timer *timer // cached timer for time.Sleep
selectDone uint32 // are we participating in a select and did someone win the race?
// gcAssistBytes is this G's GC assist credit in terms of
// bytes allocated. If this is positive, then the G has credit
// to allocate gcAssistBytes bytes without assisting. If this
// is negative, then the G must correct this by performing
// scan work. We track this in bytes to make it fast to update
// and check for debt in the malloc hot path. The assist ratio
// determines how this corresponds to scan work debt.
gcAssistBytes int64
}
var fing *g // goroutine that runs finalizers
func getg() *g
getg returns the pointer to the current g.
The compiler rewrites calls to this function into instructions
that fetch the g directly (from TLS or from the dedicated register).
func gfget(_p_ *p) *g
Get from gfree list.
If local list is empty, grab a batch from global list.
func globrunqget(_p_ *p, max int32) *g
Try get a batch of G's from the global runnable queue.
Sched must be locked.
func malg(stacksize int32) *g
Allocate a new g, with a stack big enough for stacksize bytes.
func netpollunblock(pd *pollDesc, mode int32, ioready bool) *g
func runqsteal(_p_, p2 *p, stealRunNextG bool) *g
Steal half of elements from local runnable queue of p2
and put onto local runnable queue of p.
Returns one of the stolen elements (or nil if failed).
func timejump() *g
func timejumpLocked() *g
func traceReader() *g
traceReader returns the trace reader that should be woken up, if any.
func wakefing() *g
A gList is a list of Gs linked through g.schedlink. A G can only be
on one gQueue or gList at a time.
type gList struct {
head guintptr
}
func netpoll(block bool) gList
polls for ready network connections
returns list of goroutines that become runnable
func (l *gList) empty() bool
empty reports whether l is empty.
func (l *gList) pop() *g
pop removes and returns the head of l. If l is empty, it returns nil.
func (l *gList) push(gp *g)
push adds gp to the head of l.
func (l *gList) pushAll(q gQueue)
pushAll prepends all Gs in q to l.
A gQueue is a dequeue of Gs linked through g.schedlink. A G can only
be on one gQueue or gList at a time.
type gQueue struct {
head guintptr
tail guintptr
}
func (q *gQueue) empty() bool
empty reports whether q is empty.
func (q *gQueue) pop() *g
pop removes and returns the head of queue q. It returns nil if
q is empty.
func (q *gQueue) popList() gList
popList takes all Gs in q and returns them as a gList.
func (q *gQueue) push(gp *g)
push adds gp to the head of q.
func (q *gQueue) pushBack(gp *g)
pushBack adds gp to the tail of q.
func (q *gQueue) pushBackAll(q2 gQueue)
pushBackAll adds all Gs in l2 to the tail of q. After this q2 must
not be used.
gcBits is an alloc/mark bitmap. This is always used as *gcBits.
type gcBits uint8
func newAllocBits(nelems uintptr) *gcBits
newAllocBits returns a pointer to 8 byte aligned bytes
to be used for this span's alloc bits.
newAllocBits is used to provide newly initialized spans
allocation bits. For spans not being initialized the
mark bits are repurposed as allocation bits when
the span is swept.
func newMarkBits(nelems uintptr) *gcBits
newMarkBits returns a pointer to 8 byte aligned bytes
to be used for a span's mark bits.
func (b *gcBits) bitp(n uintptr) (bytep *uint8, mask uint8)
bitp returns a pointer to the byte containing bit n and a mask for
selecting that bit from *bytep.
func (b *gcBits) bytep(n uintptr) *uint8
bytep returns a pointer to the n'th byte of b.
type gcBitsArena struct {
// gcBitsHeader // side step recursive type bug (issue 14620) by including fields by hand.
free uintptr // free is the index into bits of the next free byte; read/write atomically
next *gcBitsArena
bits [gcBitsChunkBytes - gcBitsHeaderBytes]gcBits
}
func newArenaMayUnlock() *gcBitsArena
newArenaMayUnlock allocates and zeroes a gcBits arena.
The caller must hold gcBitsArena.lock. This may temporarily release it.
func (b *gcBitsArena) tryAlloc(bytes uintptr) *gcBits
tryAlloc allocates from b or returns nil if b does not have enough room.
This is safe to call concurrently.
type gcBitsHeader struct {
free uintptr // free is the index into bits of the next free byte.
next uintptr // *gcBits triggers recursive type bug. (issue 14620)
}
}
func (c *gcControllerState) endCycle() float64
endCycle computes the trigger ratio for the next cycle.
func (c *gcControllerState) enlistWorker()
enlistWorker encourages another dedicated mark worker to start on
another P if there are spare worker slots. It is used by putfull
when more work is made available.
func (c *gcControllerState) findRunnableGCWorker(_p_ *p) *g
findRunnableGCWorker returns the background mark worker for _p_ if it
should be run. This must only be called when gcBlackenEnabled != 0.
func (c *gcControllerState) revise()) startCycle()
startCycle resets the GC controller's state and computes estimates
for a new GC cycle. The caller must hold worldsema.
type gcDrainFlags int
const (
gcDrainUntilPreempt gcDrainFlags = 1 << iota
gcDrainFlushBgCredit
gcDrainIdle
gcDrainFractional
)BackgroundUtilization is not
// an integer. The fractional worker should run until it is
// preempted and will be scheduled to pick up the fractional
// part of GOMAXPROCS*gcBackground)
)
type gcSweepBlock struct {
spans [gcSweepBlockEntries]*mspan
}
A gcSweepBuf is a set of *mspans.
gcSweepBuf is safe for concurrent push operations *or* concurrent
pop operations, but not both simultaneously.
type gcSweepBuf struct {
}
func (b *gcSweepBuf) block(i int) []*mspan
block returns the spans in the i'th block of buffer b. block is
safe to call concurrently with push.
func (b *gcSweepBuf) numBlocks()) pop() *mspan
pop removes and returns a span from buffer b, or nil if b is empty.
pop is safe to call concurrently with other pop operations, but NOT
to call concurrently with push.
func (b *gcSweepBuf) push(s *mspan)
push adds span s to buffer b. push is safe to call concurrently
with other push operations, but NOT to call concurrently with pop.
}
func (t gcTrigger) test() bool
test reports whether the trigger condition is satisfied, meaning
that the exit condition for the _GCoff phase has been met. The exit
condition should be tested when allocating.
type gcTriggerKind int
const (
// gcTriggerHeap indicates that a cycle should be started when
// the heap size reaches the trigger heap size computed by the
// controller.
gcTriggerHeap gcTriggerKind = iota
//
)
A gcWork provides the interface to produce and consume work for the
garbage collector.
A gcWork can be used on the stack as follows:
(preemption must be disabled)
gcw := &getg().m.p.ptr().gcw
.. call gcw.put() to produce and gcw.tryGet() to consume ..
It's important that any use of gcWork during the mark phase prevent
the garbage collector from transitioning to mark termination since
gcWork may locally hold GC work buffers. This can be done by
disabling preemption (systemstack or acquirem).
type gcWork struct {
// wbuf1 and wbuf2 are the primary and secondary work buffers.
//
// This can be thought of as a stack of both work buffers'
// pointers concatenated. When we pop the last pointer, we
// shift the stack up by one work buffer by bringing in a new
// full buffer and discarding an empty one. When we fill both
// buffers, we shift the stack down by one work buffer by
// bringing in a new empty buffer and discarding a full one.
// This way we have one buffer's worth of hysteresis, which
// amortizes the cost of getting or putting a work buffer over
// at least one buffer of work and reduces contention on the
// global work lists.
//
// wbuf1 is always the buffer we're currently pushing to and
// popping from and wbuf2 is the buffer that will be discarded
//
// Invariant: Both wbuf1 and wbuf2 are nil or neither are.
wbuf1, wbuf2 *workbuf
// Bytes marked (blackened) on this gcWork. This is aggregated
// into work.bytesMarked by dispose.
bytesMarked uint64
// Scan work performed on this gcWork. This is aggregated into
// gcController by dispose and may also be flushed by callers.
scanWork int64
// flushedWork indicates that a non-empty work buffer was
// flushed to the global work list since the last gcMarkDone
// termination check. Specifically, this indicates that this
// gcWork may have communicated work to another gcWork.
flushedWork bool
// pauseGen causes put operations to spin while pauseGen ==
// gcWorkPauseGen if debugCachedWork is true.
pauseGen uint32
// putGen is the pauseGen of the last putGen.
putGen uint32
// pauseStack is the stack at which this P was paused if
// debugCachedWork is true.
pauseStack [16]uintptr
}
func (w *gcWork) balance()
balance moves some work that's cached in this gcWork back on the
global queue.
go:nowritebarrierrec
func (w *gcWork) checkPut(ptr uintptr, ptrs []uintptr)
func (w *gcWork) dispose()
dispose returns any cached pointers to the global queue.
The buffers are being put on the full queue so that the
write barriers will not simply reacquire them before the
GC can inspect them. This helps reduce the mutator's
ability to hide pointers during the concurrent mark phase.
func (w *gcWork) empty() bool
empty reports whether w has no mark work available.
go:nowritebarrierrec
func (w *gcWork) init()
func (w *gcWork) put(obj uintptr)
put enqueues a pointer for the garbage collector to trace.
obj must point to the beginning of a heap object or an oblet.
go:nowritebarrierrec
func (w *gcWork) putBatch(obj []uintptr)
putBatch performs a put on every pointer in obj. See put for
constraints on these pointers.
func (w *gcWork) putFast(obj uintptr) bool
putFast does a put and reports whether it can be done quickly
otherwise it returns false and the caller needs to call put.
go:nowritebarrierrec
func (w *gcWork) tryGet() uintptr
tryGet dequeues a pointer for the garbage collector to trace.
If there are no pointers remaining in this gcWork or in the global
queue, tryGet returns 0. Note that there may still be pointers in
other gcWork instances or other caches.
go:nowritebarrierrec
func (w *gcWork) tryGetFast() uintptr
tryGetFast dequeues a pointer for the garbage collector to trace
if one is readily available. Otherwise it returns 0 and
the caller is expected to call tryGet().
go:nowritebarrierrec
A gclink is a node in a linked list of blocks, like mlink,
but it is opaque to the garbage collector.
The GC does not trace the pointers during collection,
and the compiler does not emit write barriers for assignments
of gclinkptr values. Code should store references to gclinks
as gclinkptr, not as *gclink.
type gclink struct {
next gclinkptr
}
A gclinkptr is a pointer to a gclink, but it is opaque
to the garbage collector.
type gclinkptr uintptr
func nextFreeFast(s *mspan) gclinkptr
nextFreeFast returns the next free object if one is quickly available.
Otherwise it returns 0.
func stackpoolalloc(order uint8) gclinkptr
Allocates a stack from the free pool. Must be called with
stackpoolmu held.
func (p gclinkptr) ptr() *gclink
ptr returns the *gclink form of p.
The result should be used for accessing fields, not stored
in other data structures. GOEXPERIMENT=framepointer
}
gsignalStack saves the fields of the gsignal stack changed by
setGsignalStack.
type gsignalStack struct {
stack stack
stackguard0 uintptr
stackguard1 uintptr
stktopsp uintptr
}
A guintptr holds a goroutine pointer, but typed as a uintptr
to bypass write barriers. It is used in the Gobuf goroutine state
and in scheduling lists that are manipulated without a P.
The Gobuf.g goroutine pointer is almost always updated by assembly code.
In one of the few places it is updated by Go code - func save - it must be
treated as a uintptr to avoid a write barrier being emitted at a bad time.
Instead of figuring out how to emit the write barriers missing in the
assembly manipulation, we change the type of the field to uintptr,
so that it does not require write barriers at all.
Goroutine structs are published in the allg list and never freed.
That will keep the goroutine structs from being collected.
There is never a time that Gobuf.g's contain the only references
to a goroutine: the publishing of the goroutine in allg comes first.
Goroutine pointers are also kept in non-GC-visible places like TLS,
so I can't see them ever moving. If we did want to start moving data
in the GC, we'd need to allocate the goroutine structs from an
alternate arena. Using guintptr doesn't make that problem any worse.
type guintptr uintptr
func (gp *guintptr) cas(old, new guintptr) bool
func (gp guintptr) ptr() *g
func (gp *guintptr) set(g *g)
}
func makechan(t *chantype, size int) *hchan
func makechan64(t *chantype, size int64) *hchan
func reflect_makechan(t *chantype, size int) *hchan
go:linkname reflect_makechan reflect.makechan
func (c *hchan) raceaddr() unsafe.Pointer
func (c *hchan) sortkey() uintptr
A heapArena stores metadata for a heap arena. heapArenas are stored
outside of the Go heap and accessed via the mheap_.arenas index.
This gets allocated directly from the OS, so ideally it should be a
multiple of the system page size. For example, avoid adding small
fields.
type heapArena struct {
// bitmap stores the pointer/scalar bitmap for the words in
// this arena. See mbitmap.go for a description. Use the
// heapBits type to access this.
bitmap [heapArenaBitmapBytes]byte
// spans maps from virtual address page ID within this arena to *mspan.
// For allocated spans, their pages map to the span itself.
// For free spans, only the lowest and highest pages map to the span itself.
// Internal pages map to an arbitrary span.
// For pages that have never been allocated, spans entries are nil.
//
// Modifications are protected by mheap.lock. Reads can be
// performed without locking, but ONLY from indexes that are
// known to contain in-use or stack spans. This means there
// must not be a safe-point between establishing that an
// address is live and looking it up in the spans array.
spans [pagesPerArena]*mspan
// pageInUse is a bitmap that indicates which spans are in
// state mSpanInUse. This bitmap is indexed by page number,
// but only the bit corresponding to the first page in each
// span is used.
//
// Writes are protected by mheap_.lock.
pageInUse [pagesPerArena / 8]uint8
// pageMarks is a bitmap that indicates which spans have any
// marked objects on them. Like pageInUse, only the bit
// corresponding to the first page in each span is used.
//
// Writes are done atomically during marking. Reads are
// non-atomic and lock-free since they only occur during
// sweeping (and hence never race with writes).
//
// This is used to quickly find whole spans that can be freed.
//
// TODO(austin): It would be nice if this was uint64 for
// faster scanning, but we don't have 64-bit atomic bit
// operations.
pageMarks [pagesPerArena / 8]uint8
}
heapBits provides access to the bitmap bits for a single heap word.
The methods on heapBits take value receivers so that the compiler
can more easily inline calls to those methods and registerize the
struct fields independently.
type heapBits struct {
bitp *uint8
shift uint32
arena uint32 // Index of heap arena containing bitp
last *uint8 // Last byte arena's bitmap
}
func heapBitsForAddr(addr uintptr) (h heapBits)
heapBitsForAddr returns the heapBits for the address addr.
The caller must ensure addr is in an allocated span.
In particular, be careful not to point past the end of an object.
func (h heapBits) bits() uint32
The caller can test morePointers and isPointer by &-ing with bitScan and bitPointer.
The result includes in its higher bits the bits for subsequent words
described by the same bitmap byte.
func (h heapBits) clearCheckmarkSpan(size, n, total uintptr)
clearCheckmarkSpan undoes all the checkmarking in a span.
The actual checkmark bits are ignored, so the only work to do
is to fix the pointer bits. (Pointer bits are ignored by scanobject
but consulted by typedmemmove.)
func (h heapBits) forward(n uintptr) heapBits
forward returns the heapBits describing n pointer-sized words ahead of h in memory.
That is, if h describes address p, h.forward(n) describes p+n*ptrSize.
h.forward(1) is equivalent to h.next(), just slower.
Note that forward does not modify h. The caller must record the result.
bits returns the heap bits for the current word.
go:nosplit
func (h heapBits) forwardOrBoundary(n uintptr) (heapBits, uintptr)
forwardOrBoundary is like forward, but stops at boundaries between
contiguous sections of the bitmap. It returns the number of words
advanced over, which will be <= n.
func (h heapBits) initCheckmarkSpan(size, n, total uintptr)
initCheckmarkSpan initializes a span for being checkmarked.
It clears the checkmark bits, which are set to 1 in normal operation.
func (h heapBits) initSpan(s *mspan)
initSpan initializes the heap bitmap for a span.
It clears all checkmark bits.
If this is a span of pointer-sized objects, it initializes all
words to pointer/scan.
Otherwise, it initializes all words to scalar/dead.
func (h heapBits) isCheckmarked(size uintptr) bool
isCheckmarked reports whether the heap bits have the checkmarked bit set.
It must be told how large the object at h is, because the encoding of the
checkmark bit varies by size.
h must describe the initial word of the object.
func (h heapBits) isPointer() bool
isPointer reports whether the heap bits describe a pointer word.
func (h heapBits) morePointers() bool
morePointers reports whether this word and all remaining words in this object
are scalars.
h must not describe the second word of the object.
func (h heapBits) next() heapBits
next returns the heapBits describing the next pointer-sized word in memory.
That is, if h describes address p, h.next() describes p+ptrSize.
Note that next does not modify h. The caller must record the result.
func (h heapBits) nextArena() heapBits
nextArena advances h to the beginning of the next heap arena.
This is a slow-path helper to next. gc's inliner knows that
heapBits.next can be inlined even though it calls this. This is
marked noinline so it doesn't get inlined into next and cause next
to be too big to inline.
go:nosplit
go:noinline
func (h heapBits) setCheckmarked(size uintptr)
setCheckmarked sets the checkmarked bit.
It must be told how large the object at h is, because the encoding of the
checkmark bit varies by size.
h must describe the initial word of the object.
The compiler knows that a print of a value of this type
should use printhex instead of printuint (decimal).
type hex uint64
A hash iteration structure.
If you modify hiter, also change cmd/compile/internal/gc/reflect.go to indicate
the layout of this structure.
type hiter struct {
key unsafe.Pointer // Must be in first position. Write nil to indicate iteration end (see cmd/internal/gc/range.go).
elem unsafe.Pointer // Must be in second position (see cmd/internal/gc/range.go).
t *maptype
h *hmap
buckets unsafe.Pointer // bucket ptr at hash_iter initialization time
bptr *bmap // current bucket
overflow *[]*bmap // keeps overflow buckets of hmap.buckets alive
oldoverflow *[]*bmap // keeps overflow buckets of hmap.oldbuckets alive
startBucket uintptr // bucket iteration started at
offset uint8 // intra-bucket offset to start from during iteration (should be big enough to hold bucketCnt-1)
wrapped bool // already wrapped around from end of bucket array to beginning
B uint8
i uint8
bucket uintptr
checkBucket uintptr
}
func reflect_mapiterinit(t *maptype, h *hmap) *hiter
go:linkname reflect_mapiterinit reflect.mapiterinit
A header for a Go map.
type hmap struct {
// Note: the format of the hmap is also encoded in cmd/compile/internal/gc/reflect.go.
// Make sure this stays in sync with the compiler's definition.
count int // # live cells == size of map. Must be first (used by len() builtin)
flags uint8
B uint8 // log_2 of # of buckets (can hold up to loadFactor * 2^B items)
noverflow uint16 // approximate number of overflow buckets; see incrnoverflow for details
hash0 uint32 // hash seed
buckets unsafe.Pointer // array of 2^B Buckets. may be nil if count==0.
oldbuckets unsafe.Pointer // previous bucket array of half the size, non-nil only when growing
nevacuate uintptr // progress counter for evacuation (buckets less than this have been evacuated)
extra *mapextra // optional fields
}
func makemap(t *maptype, hint int, h *hmap) *hmap
makemap implements Go map creation for make(map[k]v, hint).
If the compiler has determined that the map or the first bucket
can be created on the stack, h and/or bucket may be non-nil.
If h != nil, the map can be created directly in h.
If h.buckets != nil, bucket pointed to can be used as the first bucket.
func makemap64(t *maptype, hint int64, h *hmap) *hmap
func makemap_small() *hmap
makemap_small implements Go map creation for make(map[k]v) and
make(map[k]v, hint) when hint is known to be at most bucketCnt
at compile time and the map needs to be allocated on the heap.
func reflect_makemap(t *maptype, cap int) *hmap
go:linkname reflect_makemap reflect.makemap
func (h *hmap) createOverflow()
func (h *hmap) growing() bool
growing reports whether h is growing. The growth may be to the same size or bigger.
func (h *hmap) incrnoverflow()
incrnoverflow increments h.noverflow.
noverflow counts the number of overflow buckets.
This is used to trigger same-size map growth.
See also tooManyOverflowBuckets.
To keep hmap small, noverflow is a uint16.
When there are few buckets, noverflow is an exact count.
When there are many buckets, noverflow is an approximate count.
func (h *hmap) newoverflow(t *maptype, b *bmap) *bmap
func (h *hmap) noldbuckets() uintptr
noldbuckets calculates the number of buckets prior to the current map growth.
func (h *hmap) oldbucketmask() uintptr
oldbucketmask provides a mask that can be applied to calculate n % noldbuckets().
func (h *hmap) sameSizeGrow() bool
sameSizeGrow reports whether the current growth is to a map of the same size.
type iface struct {
tab *itab
data unsafe.Pointer
}
func assertE2I(inter *interfacetype, e eface) (r iface)
func assertI2I(inter *interfacetype, i iface) (r iface)
func convI2I(inter *interfacetype, i iface) (r iface)
func convT2I(tab *itab, elem unsafe.Pointer) (i iface)
func convT2Inoptr(tab *itab, elem unsafe.Pointer) (i iface)
type imethod struct {
name nameOff
ityp typeOff
}
An initTask represents the set of initializations that need to be done for a package.
type initTask struct {
// TODO: pack the first 3 fields more tightly?
state uintptr // 0 = uninitialized, 1 = in progress, 2 = done
ndeps uintptr
nfns uintptr
}
go:linkname main_inittask main..inittask
var main_inittask initTask
go:linkname runtime_inittask runtime..inittask
var runtime_inittask initTask
inlinedCall is the encoding of entries in the FUNCDATA_InlTree table.
type inlinedCall struct {
parent int16 // index of parent in the inltree, or < 0
funcID funcID // type of the called function
_ byte
file int32 // fileno index into filetab
line int32 // line number of the call site
func_ int32 // offset into pclntab for name of called function
parentPc int32 // position of an instruction whose source position is the call site (offset from entry)
}
type interfacetype struct {
typ _type
pkgpath name
mhdr []imethod
}
layout of Itab known to compilers
allocated in non-garbage-collected memory
Needs to be in sync with
../cmd/compile/internal/gc/reflect.go:/^func.dumptypestructs.
type itab struct {
inter *interfacetype
_type *_type
hash uint32 // copy of _type.hash. Used for type switches.
_ [4]byte
fun [1]uintptr // variable sized. fun[0]==0 means _type does not implement inter.
}
func getitab(inter *interfacetype, typ *_type, canfail bool) *itab
func (m *itab) init() string
init fills in the m.fun array with all the code pointers for
the m.inter/m._type pair. If the type does not implement the interface,
it sets m.fun[0] to 0 and returns the name of an interface function that is missing.
It is ok to call this multiple times on the same m, even concurrently.
Note: change the formula in the mallocgc call in itabAdd if you change these fields.
type itabTableType struct {
size uintptr // length of entries array. Always a power of 2.
count uintptr // current number of filled entries.
entries [itabInitSize]*itab // really [size] large
}
func (t *itabTableType) add(m *itab)
add adds the given itab to itab table t.
itabLock must be held.
func (t *itabTableType) find(inter *interfacetype, typ *_type) *itab
find finds the given interface/type pair in t.
Returns nil if the given interface/type pair isn't present.
type itimerval struct {
it_interval timeval
it_value timeval
}
Lock-free stack node.
Also known to export_test.go.
type lfnode struct {
next uint64
pushcnt uintptr
}
func lfstackUnpack(val uint64) *lfnode
lfstack is the head of a lock-free stack.
The zero value of lfstack is an empty list.
This stack is intrusive. Nodes must embed lfnode as the first field.
The stack does not keep GC-visible pointers to nodes, so the caller
is responsible for ensuring the nodes are not garbage collected
(typically by allocating them from manually-managed memory).
type lfstack uint64
func (head *lfstack) empty() bool
func (head *lfstack) pop() unsafe.Pointer
func (head *lfstack) push(node *lfnode) | https://golang.org/pkg/runtime/?m=all | CC-MAIN-2020-05 | en | refinedweb |
Trusted Web Activities (TWAs) can be a bit tricky to set up, especially if all you want to do is display your website. This guide will take you through creating a basic TWA, covering all the gotchas.
By the end of this guide, you will:
- Have built a Trusted Web Activity that passes verification.
- Understand when your debug keys and your release keys are used.
- Be able to determine the signature your TWA is being built with.
- Know how to create a basic Digital Asset Links file.
To follow this guide you'll need:
- Android Studio Installed
- An Android phone or emulator connected and set up for development (Enable USB debugging if you’re using a physical phone).
- A browser that supports Trusted Web Activities on your development phone. Chrome 72 or later will work. Support in other browsers is on its way.
- A website you'd like to view in the Trusted Web Activity.
A Trusted Web Activity lets your Android App launch a full screen Browser Tab without any browser UI. This capability is restricted to websites that you own, and you prove this by setting up Digital Asset Links. Digital Asset Links consist essentially of a file on your website that points to your app and some metadata in your app that points to your website. We'll talk more about them later.
When you launch a Trusted Web Activity, the browser will check that the Digital Asset Links check out, this is called verification. If verification fails, the browser will fall back to displaying your website as a Custom Tab.
Clone and customize the example repo
The svgomg-twa repo contains an example TWA that you can customize to launch your website:
- Clone the project (
git clone).
- Import the Project into Android Studio, using File > New > Import Project, and select the folder to which the project was cloned.
Open the app's
build.gradleand modify the values in
twaManifest. There are two
build.gradlefiles. You want the module one at
app/build.gradle.
- Change
hostNameto point to your website. Your website must be available on HTTPS, though you omit that from the
hostNamefield.
- Change
nameto whatever you want.
- Change
applicationIdto something specific to your project. This translates into the app’s package name and is how the app is identified on the Play Store - no two apps can share the
applicationIdand if you change it you’ll need to create a new Play Store listing.
Build and run
In Android Studio hit Run, Run ‘app’ (where ‘app’ is your module name, if you’ve changed it) and the TWA will be built and run on your device! You’ll notice that your website is launched as a Custom Tab, not a Trusted Web Activity, this is because we haven’t set up our Digital Asset Links yet, but first...
A note on signing keys
Digital Asset Links take into account the key that an APK has been signed with and a common cause for verification failing is to use the wrong signature. (Remember, failing verification means you'll launch your website as a Custom Tab with browser UI at the top of the page.) When you hit Run or Build APK in Android Studio, the APK will be created with your developer debug key, which Android Studio automatically generated for you.
If you deploy your app to the Play Store, you’ll hit Build > Generate Signed APK, which will use a different signature, one that you’ll have created yourself (and protected with a password). That means that if your Digital Asset Links file specifies your production key, verification will fail when you build with your debug key. This also can happen the other way around - if the Digital Asset Links file has your debug key, your TWA will work fine locally, but then when you download the signed version from the Play Store, verification will fail.
You can put both your debug key and production key in your asset link file (see Adding More Keys below), but your debug key is less secure. Anyone who gets a copy of the file can use it. Finally, if you have your app installed on your device with one key, you can’t install the version with the other key. You must uninstall the previous version first.
Building your app
- To build with debug keys:
- Click Run 'app' where 'app' is the name of your module if you changed it.
- To build with release keys:
- Click Build, then Generate Signed APK.
- Choose APK.
- If you're doing this for the first time, on the next page press Create New to create a new key and follow the Android documentation. Otherwise, select your previously created key.
- Press Next and pick the release build variant.
- Make sure you check both the V1 and the V2 signatures (the Play Store won’t let you upload the APK otherwise).
- Click Finish.
If you built with debug keys, your app will be automatically deployed to your device.
On the other hand if you built with release keys, after a few seconds a pop up will appear in the
bottom right corner giving you the option to locate or analyze the APK.
(If you miss it, you can press on the Event Log in the bottom right.)
You’ll need to use adb manually to
install the signed APK with
adb install app-release.apk.
This table shows which key is used based on how you create your APK.
Creating your asset link file
Now that your app is installed (with either the debug or release key), you can generate the Digital Asset Link file. I’ve created the Asset Link Tool to help you do this. If you'd prefer not to download the Asset Link Tool, you can determine your app's signature manually.
- Download the Asset Link Tool.
- When the app launches, you’ll be given a list of all applications installed on your device by
applicationId. Filter the list by the
applicationIdyou chose earlier and click on that entry.
- You’ll see a page listing your app’s signature and with a generated Digital Asset Link. Click on the Copy or Share buttons at the bottom to export it however you like (e.g., save to Google Keep, email it to yourself).
Put the Digital Asset Link in a file called
assetlinks.json and upload it to your website at
.well-known/assetlinks.json (relative to the root).
Play Store Signing
If you opt in to App signing by Google Play, Google manages your app's signing key. There are two ways you can get the correct Digital Asset Link file for a Google managed app signing key:
- With the Asset Link Tool:
- Download your app from the Google Play Store.
- Repeat Creating your asset link file.
- Manually:
- Open the Google Play Console.
- Select your app.
- Choose Release management and then App signing from the panel on the left.
- Copy the SHA-256 certificate fingerprint from under the App signing certificate section.
- Use this value in your Digital Asset Link file.
Ensuring your asset link file is accessible
Now that you’ve uploaded it, make sure you can access your asset link file in a browser.
Check that resolves to the file you just uploaded.
Jekyll based websites
If your website is generated by Jekyll (such as GitHub Pages), you’ll need to add a line of
configuration so that the
.well-known directory is included in the output.
GitHub help has more information on this topic.
Create a file called
_config.yml at the root of your site (or add to it if it already exists) and
enter:
# Folders with dotfiles are ignored by default. include: [.well-known]
Adding more keys
A Digital Asset Link file can contain more than one app, and for each app, it can contain more than
one key.
For example, to add a second key, just use the
Asset Link Tool to
determine the key and add it as a second entry to the
sha256_cert_fingerprints field.
The code in Chrome that parses this JSON is quite strict, so make sure you don’t accidentally add an
extra comma at the end of the list.
[{ "relation": ["delegate_permission/common.handle_all_urls"], "target": { "namespace": "android_app", "package_name": "com.appspot.pwa_directory", "sha256_cert_fingerprints": [ "FA:2A:03:CB:38:9C:F3:BE:28:E3:CA:7F:DA:2E:FA:4F:4A:96:F3:BC:45:2C:08:A2:16:A1:5D:FD:AB:46:BC:9D", "4F:FF:49:FF:C6:1A:22:E3:BB:6F:E6:E1:E6:5B:40:17:55:C0:A9:F9:02:D9:BF:28:38:0B:AE:A7:46:A0:61:8C" ] } }]
Troubleshooting
Viewing relevant logs
Chrome logs the reason that Digital Asset Links verification fails and you can view the logs on an
Android device with
adb logcat.
If you’re developing on Linux/Mac, you can see the relevant logs from a connected device
with:
> adb logcat -v brief | grep -e OriginVerifier -e digital_asset_links
For example, if you see the message
Statement failure matching fingerprint., you should use the
Asset Link Tool to see your app’s signature and make sure it matches that in your
assetlinks.json
file (Be wary of confusing your debug and release keys. Look at the
A note on signing keys section.)
Checking your browser
A Trusted Web Activity will try to adhere to the user’s default choice of browser. If the user’s default browser supports TWAs, it will be launched. Failing that, if any installed browser supports TWAs, it will be chosen. Finally, the default behavior is to fall back to a Custom Tabs mode.
This means that if you’re debugging something to do with Trusted Web Activities, you should make sure you’re using the browser you think that you are. You can use the following command to check which browser is being used:
> adb logcat -v brief | grep -e TWAProviderPicker D/TWAProviderPicker(17168): Found TWA provider, finishing search: com.google.android.apps.chrome
Next Steps
Hopefully, if you’ve followed this guide, you'll have a working Trusted Web Activity and have enough knowledge to debug what's going on when verification fails. If not, please have a look at the Troubleshooting section or file a GitHub issue against these docs.
For your next steps, I’d recommend you start off by creating an icon for your app. With that done, you can consider deploying your app to the Play Store.
RSS or Atom feed and get the latest updates in your favorite feed reader!Subscribe to our | https://developers.google.cn/web/updates/2019/08/twas-quickstart?hl=id | CC-MAIN-2020-05 | en | refinedweb |
measurements
A package providing basic classes for working with measurements such as Length and Mass. All provided classes provide the means to perform conversions, calculations and comparisons using objects.
Example
Conversions:
import 'package:measurements/measurements.dart'; void main(List<String> arguments) async { Length heightOfEverest = Length.fromMetres(8848); print("Height of Everest (in metres): ${heightOfEverest.inMetres}."); print("Height of Everest (in kilometres): ${heightOfEverest.inKilometres}."); print("Height of Everest (in yards): ${heightOfEverest.inYards}."); print("Height of Everest (in miles): ${heightOfEverest.inMiles}."); }
Calculations:
import 'package:measurements/measurements.dart'; void main(List<String> arguments) async { Length a = Length.fromCentimetres(87); Length b = Length.fromCentimetres(43); print("a + b is ${(a + b).inCentimetres} centimetres");//130 print("a - b is ${(a - b).inCentimetres} centimetres.");//44 print("a * b is ${(a * b).inCentimetres} centimetres.");//3741 print("a / b is ${(a / b).inCentimetres} centimetres.");//2.02325581395 }
Comparisons:
import 'package:measurements/measurements.dart'; void main(List<String> arguments) async { Mass elephantWeight = Mass.fromKilograms(5400); Mass zebraWeight = Mass.fromKilograms(380); if (elephantWeight == zebraWeight) { print("An elephant and a Zebra have the same weight."); } else if (zebraWeight < elephantWeight) { Mass difference = elephantWeight - zebraWeight; print("An elephant is ${difference.inPounds} pounds heavier than a zebra."); } else { Mass difference = zebraWeight - elephantWeight; print("A Zebra is ${difference.inPounds} pounds heavier than an elephant."); } }
Available Measurements
The available classes as well as those that will hopefully be implemented soon are listed below. If you are willing to speed up the process of implementing missing functionality, contributions are most welcome.
xLength
xMass
Contributing
There are couple of ways in which you can contribute.
- Propose any feature, enhancement
- Report a bug
- Fix a bug
- Participate in a discussion and help in decision making
- Write and improve some documentation. Documentation is super critical and its importance cannot be overstated!
- Send in a Pull Request :-) | https://pub.dev/documentation/measurements/latest/ | CC-MAIN-2020-05 | en | refinedweb |
Pets vs. Human Life
It's better to keep tropical fish. (1) they are silent (2) you always know where they are (3) most of them never bite (4) it costs almost nothing to keep them fed. (5) they are beautiful to watch and ask almost nothing in return (6)) filtration systems take care of any waste product (they cause no damage to your furniture, carpet, drapery, etc. (7) they never complain, bark, meow or whatever (8) you don't have to walk them and pick up their piles of crap or clean out a stinky cat box (9) they may not be "cuddly" but they do enjoy nibbling on your fingers (8) with an automatic feeding device you can leave them alone for weeks, and they don't get depressed (9) when one of them dies it just goes down the toilet (10) they do not leave hair all over your furnishings, do not require baths, combing or other grooming (11) they never annoy your neighbors (12 you can move them about with a small net -- no need for pet boxes. (13) they do not smell up your apartment (13) they do no drool. So, if you are thinking of having some kind of pet in your abode, give consideration to fish. You'll be infinitely stimulated as they move through the water, as if flying through an unseen atmosphere.
For those who cannot do without something furry to cuddle, I might suggest a faux fur. I have nothing against small animals such as cats or dogs, I just wouldn't want one of my own. As for the argument that these animals give you love, compassion, guardianship, etc., I would suggest that you find a human mate that might provide some (or all) of these pleasures. If you cannot locate such a mate, I think there is something intrinsically wrong with you. I would posit that you're interaction with human beings has been so negative that all you can call upon are small mammals. There are a million humans looking for human connectivity. If you cannot link up to at least one of them, you've got a big problem.
Okay, it's fine to keep a cat or dog in the house, but if this becomes a surrogate for a child... well, that's another issue entirely. And I've seen many (mostly women) treating their pets as if they were indeed children. And we've all heard the bizarre stories of people (mostly women) leaving their fortunes to their pets. If you are rich enough to buy your pooch a diamond collar -- what are you thinking? There are thousands of people in third-world countries who are surviving without food and pure water. Where are your priorities? Can your pooch survive without a diamond collar? Americans spend more on their pets than they donate to charitable causes. I'm not saying let your animals starve or even stop enjoying canned delicacies. Just try to give things some perspective. | https://hubpages.com/animals/Pets-vs-Human-Life | CC-MAIN-2017-34 | en | refinedweb |
Posted 22 Jul 2010
Link to this post
Posted 23 Jul 2010
Link to this post
First I would like to thank you for your valuable input. As it turns out there is a bug in the visualization of the stored procedures mappings. Even though the value is saved and it is not displayed in the details editor. If you are not convinced you can easily check this out by opening the rlinq file with a default xml editor in the Rlinq -> Runtime -> orm:namespace -> orm:class node you can find the definition of a serialized class. If you look around you will find the procedure mapping to have a field-name attribute that holds the property this parameter is mapped to.
The problem here is that we fully support mapping to procedures only with MS SQL. While you might be able to create such and map procedures to a model using MySql it is almost sure that you will find yourself in trouble. As a starting point I suggest configuring the views to not use any concurrency control. You can do this by selecting the view in the diagram and clicking F4, this will open up the property pane for this class.
You should note that when you create a procedure through the property pane it is not persisted to the database. In order to do so you have to open up the Update Database from Model Wizard and generate a script that would update your database with the desired procedure. We have found out that in some cases the wizard will try to generate a table with the name of the view. If that is the case just copy and execute only the parts you need from the create procedure scripts.
When you have this setup, I would suggest modifying the procedures that you have just created.
I do hope this helps. Do not hesitate to contact us back if you need assistance or face further issues. Please find your Telerik points updated for reporting this bug.
Posted 26 Jul 2010
Link to this post
Posted 29 Jul 2010
Link to this post
Can you please open your sql server and confirm that the stored procedures are indeed created on the server. Everything in the configuration of your project seems fine and the procedures should work as long as they are present on the server.
Posted 03 Aug 2010
Link to this post
I have successfully inserted an item to a view through the stored procedures that you have provided. The problem here most likely lies in the fact that you view does not have a primary key specified. You surely have a validation error in your error list saying so.
Please specify a primary key property for your view and try again. Also it would be a good idea to start up a Profiler in order to see what sql scripts OpenAccess is creating and executing.
I do hope this helps. | http://www.telerik.com/forums/unable-to-use-sp-to-insert-update-delete-from-view | CC-MAIN-2017-39 | en | refinedweb |
remove non-ascii from titles, otherwise we'll just corrupt them
use stock for buttons, swap image instead of destroy & rebuild
update some deprecated GTK functions
use stock image for play button
use stock image for select all button
use stock for check buttons, just swap image instead of destroy & rebuild
remove some obsolete stuff
c++ port of config rw
put internal functions in unnamed namespace
use STL to process config file
just write default value into config during init
convert config_rw into a class; still a global var, though
fix bug in reading empty string from config
rebuild to resolve merge conflict (should we even track these)?
const correctness, reorder functions, rm some prototypes, enforce enums
just use execlp instead of tring to emulate it with a wrapper around execvp
rm unused functions
rm bogus button, add eject
check that linux/cdrom.h exists
start converting to std::string & auto_ptr, fix a few more memory leaks
start changing some malloc to new
refactor error code into a class
add error handler interface for exceptions
make plugins compilable with g++; use g++ as default C compiler
Can compile in C++ now, but still compatable with GCC. Fix a few memory leaks, remove some preproc.
first compile with g++
more const correctness, to fix warnings in g++
convert a lot of #define to enum
fix a few memory leaks
improve const correctness
don't need values on some enums
Revert "fix a few memory leaks"
This reverts commit 914d7c452cc14b7d62e39c8775c8577788826f49.
apply string manipulation patches; thanks to Steve Sanberg
Fixed a few memory leaks, etc. spotted by running cppcheck on the source.
Updated the autotools processing, ran astyle against the source, and fix a couple obvious memory leaks in cddb.c
pass encoder extra options for FLAC; thanks to Robert Turnbull for the patch
add libdir to ripperX.pc.in; remove the autom4te.cache directory after running autogen
update CHANGES
add patches by Robert Turnbull for vorbis year tag and FLAC tag
changelog updates
remove po/*.gmo during distclean
include de in ALL_LINGUAS
updated po files
apply fix_underscore_in_id3_data patch by fractal13 - LP #671852
apply fix_path_buffer_overflow.diff patch by fractal13 - LP #514739
apply fix_2_digit_track_numbers.diff from fractal13 LP #514739
bump minor version number | https://sourceforge.net/p/ripperx/git/ci/59cedd05582e98acfb4d75d4c25266a54efa8084/log/?path= | CC-MAIN-2017-39 | en | refinedweb |
Is there an easy way to remove comments from a C/C++ source file without doing any preprocessing. (ie, I think you can use gcc -E but this will expand macros.) I just want the source code with comments stripped, nothing else should be changed.
EDIT:
Preference towards an existing tool. I don't want to have to write this myself with regexes, I foresee too many surprises in the code.
Run the following command on your source file:
gcc -fpreprocessed -dD -E test.c
Thanks to KennyTM for finding the right flags. Here’s the result for completeness:
test.c:
#define foo bar foo foo foo #ifdef foo #undef foo #define foo baz #endif foo foo /* comments? comments. */ // c++ style comments
gcc -fpreprocessed -dD -E test.c:
#define foo bar foo foo foo #ifdef foo #undef foo #define foo baz #endif foo foo | https://codedump.io/share/NibTbvBtnhnf/1/remove-comments-from-cc-code | CC-MAIN-2017-39 | en | refinedweb |
Textbox.
This is my first real project using C#/.NET, having come from C++/MFC and Java. I decided that a great way to learn was to take something I'm already familiar with and convert it to C#. This would allow me to learn the new technology as well as to make note of the differences. This article is the result of converting my Validating Edit Controls code, originally written in C++/MFC. The effort took around a month to complete and was a terrific learning experience. Enjoy!
There are two groups of classes, the behavior classes and the textbox classes, both of which are contained in the AMS.TextBox namespace. The behavior classes are designed to alter the standard behavior of textboxes so that the user can only enter a specific type of text into the control. For example, the DateBehavior only allows a date value to be entered into the textbox associated with it. The rest of the classes are simple TextBox-derived controls containing specific behaviors. For example, the DateTextBox control has the DateBehavior field inside of it and a property used to retrieve it.
AMS.TextBox
DateBehavior
TextBox
DateTextBox
Here's a listing of all the classes. If you need specific documentation on the available methods and properties, you may view the AMS.TextBox.chm help file, or just use the editor's Intellisense.
Behavior
Base class for all behavior classes. It has some basic functionality.
AlphanumericBehavior
Prohibits input of one or more characters and restricts length.
NumericBehavior
Used to input a decimal number with a maximum number of digits before and/or after the decimal point.
IntegerBehavior
Only allows a whole number to be entered.
CurrencyBehavior
Inserts a monetary symbol in front of the value and a separator for the thousands.
Allows input of a date in the mm/dd/yyyy or dd/mm/yyyy format, depending on the locale.
TimeBehavior
Allows input of a time with or without seconds and in 12 or 24 hour format, depending on the locale.
DateTimeBehavior
MaskedBehavior
Takes a mask containing '#' symbols, each one corresponding to a digit. Any characters between the #s are automatically inserted as the user types. It may be customized to accept additional symbols.
AlphanumericTextBox
Supports the Alphanumeric behavior.
NumericTextBox
Supports the Numeric behavior.
IntegerTextBox
Supports the Integer behavior.
CurrencyTextBox
Supports the Currency behavior.
Supports the Date behavior.
TimeTextBox
Supports the Time behavior.
DateTimeTextBox
Supports the DateTime behavior.
MaskedTextBox
Supports the Masked behavior.
MultiMaskedBehavior
Takes a mask and adopts its behavior to any of the above classes.
I've built all these classes into a DLL so that the TextBox-derived classes may be used inside the Visual Studio .NET IDE as custom controls. Here are the steps required for adding them to your project and using them in your code:
While porting these classes from C++, I came upon several important differences in how things are done. I decided to make note of these differences for future reference and added them here for anyone who may work on a similar task. If you want to read on, I recommend you first become familiar with the C++ classes.
In the .NET world, Edit boxes are called TextBoxes (and Text controls are called Labels). So I knew that to keep things as .NETish as possible I had to rename my classes. I replaced the "Edit" suffix with "TextBox" and I put everything into a namespace called AMS.TextBox to keep the names as simple as possible.
Labels
For years I've used my own variation of Hungarian notation in C++ code. I thought it was a great way to ease the pain of maintenance.
Then I started writing Java code and I had to conform to the standards set by my group: no Hungarian notation. So I stopped using it, at least for Java. And to my surprise after about a month, I wasn't missing it! It was actually liberating to write variables without the extra baggage of the type prefix. It also made the code easier to read. I came to the realization that in well written, modular code it's rarely necessary to make each variable's type evident within the name itself. It's just overkill and it makes the name larger and more cluttered.
So I gave it up for good in Java, while I kept it in my existing C++ code for the sake of consistency. I had even replaced the m_ prefix (for member variables) with the this. prefix.
m_
this.
Then came C# and this project. I knew that Microsoft's convention had been to drop Hungarian notation for .NET, so I happily continued on as I had with Java. But I faced a small problem. I wanted to make the code CLS compliant so that it could be used and extended by any .NET language. This caused a problem for protected variables with names like "separator" and then a corresponding property called "Separator". Since the names were the same except for the casing, the code was not CLS compliant (for case-insensitive languages). So I decided to switch from using this. for member variables back to the old m_ convention, which I had always liked.
m_
And that's the notation I use in this project. No Hungarian notation except for the m_ for all member variables (fields).
When I originally wrote my C++ classes, I made the decision to split the CEdit classes from their behaviors - I believe this follows the Bridge pattern. This strategy gave me the flexibility of being able to plug the behaviors into multiple CEdit-derived classes as needed, which worked great for the CAMSMultiMaskedEdit class. In addition, I used C++ multiple-inheritance feature to conveniently inherit the classes from CEdit and their respective behavior(s) simultaneously.
CEdit
CAMSMultiMaskedEdit
As we all know, .NET does not support multiple implementation inheritance, so I had to come up with an alternative. I initially decided to forgo the idea of the TextBox-derived classes having the methods and properties of their respective behaviors, which multiple inheritance so conveniently allowed me. Instead I added a read-only property to each class called Behavior which returns the Behavior-derived object currently associated with the TextBox object. So any behavior-specific action would be taken via this property.
This approach made life much easier for me, the library developer, but not for anyone using the library. Whereas in C++ you could do this:
CAMSDateTimeEdit dt ...
int day = dt.GetDay();
In C# now you would need to do this:
DateTimeTextBox dt ...
int day = dt.Behavior.Day;
I went with this design for some time until I came to the conclusion that it just wasn't right. It was a step backward, and all because I didn't want to spend extra time wrapping the Behavior's public members in the TextBox-derived classes. So I bit the bullet and did it; I went through each TextBox class and added its corresponding Behavior's public methods and properties as members of the class. This essentially turned the TextBox classes as wrappers of their Behavior classes. It was a lot of extra work (caused by the lack of MI), but I think it was worth it. Now the TextBox classes are similar to their C++ counterparts:
DateTimeTextBox dt ...
int day = dt.Day;
This is not only more intuitive but also makes the TextBox classes more friendly for the form designer.
For the C++ classes, I decided to make the CAMSEdit::Behavior class work only with classes derived from CAMSEdit. This definitely made life easier, since the CAMSEdit class was mine and I could enhance it with whatever methods were needed by the Behavior classes (i.e. GetText, GetValidText, IsReadOnly). But the problem was that this created a tight coupling between the Behavior classes and CAMSEdit, which any new class would have to account for.
CAMSEdit::Behavior
CAMSEdit
GetText
GetValidText
IsReadOnly
For C#, I changed the Behavior classes to be much more independent. Now they work with any classes derived from System.Windows.Forms.TextBoxBase. This gives them the flexibility to be associated with just about any TextBox class and not just the ones derived some class of mine.
System.Windows.Forms.TextBoxBase
Additionally, I made it very easy to associate Behavior classes to textboxes. You just instantiate the behavior class and pass the textbox object in the constructor. Here's an example:
MyTrustyTextBox textbox = new MyTrustyTextBox();
// Alter the textbox to only take Time values
TimeBehavior behavior = new TimeBehavior(textbox);
That's it! From that point on, the textbox behaves according to the rules of that behavior. This is in sharp contrast to C++ where not only did the class need to be derived from CAMSEdit, but you also needed to forward several message handlers to the associated Behavior, as explained next.
If you look at the C++ code, you'll notice that the Behavior classes rely on their associated CAMSEdit object to forward the relevant messages to them (OnChar calls _OnChar, OnKeyDown calls _OnKeyDown, etc.). Well, thanks to delegates I didn't need to do that in C#. All I had to do was make the Behavior class add event handlers to the textbox object that would call methods in the Behavior class. And since these methods are declared virtual in the Behavior class, then all the derived classes needed to do was, override them to provide their own functionality. This is a more elegant approach that in C++ would have ended up looking more like a hack if I had decided to implement it.
OnChar
_OnChar
OnKeyDown
_OnKeyDown
In addition, while in C++ I handled the messages directly (i.e., OnChar for WM_CHAR, OnKeyDown for WM_KEYDOWN, etc.), .NET does not provide direct handlers for some of these messages. The only way to do it, as far as I could see, was to override WndProc inside the textbox classes themselves and trap the messages there inside a switch statement.
WM_CHAR
WM_KEYDOWN
WndProc
switch
Instead, I decided to try the available event handlers to see if they could do the job. So I used the KeyPress event for WM_CHAR, KeyDown for WM_KEYDOWN, TextChanged for WM_SETTEXT and LostFocus for WM_KILLFOCUS. They worked just fine and allowed the Behavior classes do all the work, as described above.
KeyPress
KeyDown
TextChanged
WM_SETTEXT
LostFocus
WM_KILLFOCUS
The Behavior classes are all about validations - basically ensuring that the user enters the proper data into the textbox. Some validations are performed as the user types while others happen when the user leaves the control.
As you may know, the System.Windows.Forms.Control class contains properties and events designed to help the developer validate the control's value when control loses focus. I decided to take advantage of this built-in mechanism and move a lot of the functionality in the old OnKillFocus handlers to a Validating event hander I added to the Behavior class. This handler not only validates the data, but also gives error feedback to the user via a message beep, message box, or a small icon (ErrorProvider). It can even be configured to automatically set the control to a valid value if necessary.
System.Windows.Forms.Control
OnKillFocus
Validating
ErrorProvider
This is all accomplished by modifying the Flags property and setting the corresponding ValidationFlag value(s). Here's an example of how to make a beeping sound and show an icon if the control's value is empty or not valid when the Validating event is triggered:
Flags
ValidationFlag
DateTimeTextBox dt ...
dt.ModifyFlags((int)ValidatingFlag.ShowIcon
| (int)ValidatingFlag.Beep, true);
Of course, this also requires that the textbox's CausesValidation property is set to true, which by default it is. As an alternative, you may invoke all this functionality yourself via the textbox's Validate method. It is called by the Validating event handler to set the Cancel property.
CausesValidation
true
Validate
Cancel
First of all, I just have to say that I love properties! They're a welcome addition to C# (and they should have been part of Java). When converting these classes, a lot of methods became excellent candidates for properties. So I happily went and converted all of them.
Then I took a second look and reconsidered what I had done. I found that while a lot of methods were undeniably property-material, others were a bit more questionable. The most prominent one was Behavior.GetValidText. This one initially appeared like another method worthy of becoming a property with a getter. However, I later decided that properties should be treated by the programmer as convenient ways of quickly reading attributes of an object. If you look at the code for most GetValidText implementations, there is quite a bit of processing going on in there, much more than the typical return someField; which you find in most property getters. In other words, the "valid text" is not really a property of the behavior. It needs to be deciphered every time the method is called. So leaving it as a method does not give the impression that it's readily available and quickly retrieved.
Behavior.GetValidText
return someField;
This was the criteria I used when deciding which methods to turn into properties. If the property's getter had a simple implementation and the property itself made sense for the class, then I converted it; otherwise I left it as a method.
After I had finished porting the classes, I decided it would be nice to document the code. The C++ code already had comments on the top of every method, so that gave me a head start. However I decided to explore the XML Documentation tags to see what additional benefits I could gain.
My first impression is that they were very verbose. Most of them require an opening and closing tag, which if written on separate lines can make each section take at least 3 lines! For methods that take multiple parameters that would mean an extra 3 lines of comment per parameter. That's a lot of space taken up in comments!
The benefits were another story. You spend some time up-front putting up with all the verbosity, but the end result is nicely formatted online help. This would also mean that I wouldn't have to spend extra time documenting every method within this article, like I did for the C++ one. You just add the DLL and its XML file to your project - Visual Studio takes care of the IntelliSense for you automatically!
So I did it! I manually documented every method, property and field in the classes, even the private ones, right in the code. To cut down on the waste of space produced by the opening and closing tags, I decided to only put the opening tags on lines by themselves. Closing tags would simply go as part of the last line of the section. I also added a couple of spaces for indentation to the contents to make them easier to read. Here's an example:
/// <summary>
/// Initializes a new instance of the class by also setting its
/// mask and corresponding Behavior class. </summary>
/// <param name="mask">
/// The mask string to use for determining the behavior. </param>
/// <seealso cref="Mask" />
There's a tool called NDoc that generates help files from source code, in a variety of formats. I used it to generate an MSDN-style help file, AMS.TextBox.chm, which I've included in the download. Enjoy!
I'd like to thank Gerd Klevesaat for helping me understand the complexities of dealing with controls having sub-properties. I wanted to give users of my textbox controls, the ability to directly manipulate the various properties of the Behavior property, right from the form designer. After many trials and tribulations, I decided not to implement such functionality since it doesn't work as it should, but it was fine since I ended up wrapping most of the behavior public methods and properties inside the textbox classes.
Browsable(false)
Day
Month
Year
ControlDesigner
NumericBehavior.LostFocusFlag
Text
CallHandlerWhenTextPropertyIsSet
Hour
Minute
Second
DataBindings
Decimal
ErrorCa. | https://www.codeproject.com/Articles/5015/Validating-Edit-Controls?fid=23232&df=90&mpp=25&sort=Position&spc=Relaxed&tid=3414102 | CC-MAIN-2017-39 | en | refinedweb |
In this blog post I describe how the GlobalSearchAdapter in Open Event Android was made which enabled users to search quickly within the app. This post also outlines how to create Recycler Views with heterogenous layouts and explains how to write ViewHolders.
Adapter Logic
A custom adapter was built for the population of views in the Recycler View in the SearchActivity.
private List<Object> filteredResultList = new ArrayList<>(); //ViewType Constants private final int TRACK = 0; private final int SPEAKER = 2; private final int LOCATION = 3; private final int DIVIDER = 4;
The DIVIDER constant was assigned to the Result Type Header View.
In a gist all the item types such as Speaker, Track, Location, Divider etc have been designated some constants.
Getting the ItemViewType
@Override public int getItemViewType(int position) { if(filteredResultList.get(position) instanceof Track){ return TRACK; } else if(filteredResultList.get(position) instanceof String){ return DIVIDER; } ...Similarly for other ItemTypes such as Session or Location else{ return 1; } }
As the filteredResultList is of type Object we can insert objects of any type into the list as Object is a superclass of all classes. We would want a view which represents a TRACK if we have an object of type Track in the filteredResultList. And similarly for the other result types we could insert objects of type LOCATION, SPEAKER types in this list. getItemViewType() basically determines the type of the item that is visible to us. If the list consists of an item of type SPEAKER, in the RecyclerView.
Code for onCreateViewHolder in GlobalSearchAdapter for the Recycler View
@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { RecyclerView.ViewHolder resultHolder = null; LayoutInflater inflater = LayoutInflater.from(parent.getContext()); switch(viewType) { case TRACK: View track = inflater.inflate(R.layout.item_track, parent, false); resultHolder = new TrackViewHolder(track,context); break; case SPEAKER: View speaker = inflater.inflate(R.layout.search_item_speaker, parent, false); resultHolder = new SpeakerViewHolder(speaker,context); break; //Similarly for other types default: break; } return resultHolder; }
Depending upon the the viewType returned the desired layout is inflated and the desired ViewHolder is returned.
Code for onBindViewHolder in GlobalSearchAdapter for the Recycler View
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()){ case TRACK: TrackViewHolder trackSearchHolder = (TrackViewHolder)holder; final Track currentTrack = (Track)getItem(position); trackSearchHolder.setTrack(currentTrack); trackSearchHolder.bindHolder(); break; //Similarly for all the other View Types default: break; } }
These functions are being used to bind the data to the layouts that have been inflated already in the earlier snippet of code of onCreateViewHolder.
The bindHolder functions of each ViewHolder type are being used to do the view binding i.e converting the information in the Object Track into what we see in the TrackViewHolder as seen in TrackViewFormat.
All ViewHolders have been defined as separate classes in order to enable re usability of these classes.
ViewHolder Implementation
There are 4 main ViewHolders that were made to enable such a search. I’ll be talking about the TrackViewHolder in detail.
public class TrackViewHolder extends RecyclerView.ViewHolder { @BindView(R.id.imageView) ImageView trackImageIcon; @BindView(R.id.track_title) TextView trackTitle; @BindView(R.id.track_description) TextView trackDescription; private Track currentTrack; private Context context; private TextDrawable.IBuilder drawableBuilder = TextDrawable.builder().round(); public void setTrack(Track track) { this.currentTrack = track; } public TrackViewHolder(View itemView,Context context) { super(itemView); ButterKnife.bind(this, itemView); this.context = context; } public void bindHolder(){ //Set all Views to their correct configurations itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(context, TrackSessionsActivity.class); intent.putExtra(ConstantStrings.TRACK, currentTrack.getName()); // Send Track ID to Activity to leverage color cache intent.putExtra(ConstantStrings.TRACK_ID, currentTrack.getId()); context.startActivity(intent); } }); } }
Those @BindView annotations that we can see are the result of a library called as Butterknife which is used to reduce standard boilerplate findViewById lines.
@BindView(R.id.imageView) ImageView trackImageIcon; IS THE SAME AS THIS ImageView trackImageIcon = (ImageView)findViewById(R.id.imageView);
The advantage of such a ViewHolder is that it knows what kind of data it stores as compared to traditional ViewHolders which do not know the kind of data it stores.
By making ViewHolders separate from the RecyclerViewAdapter we are essentially decoupling classes and are enabling reusability of code. Also we make the ViewHolder a bit more intelligent by storing the object it binds in the ViewHolder itself. In the above example we are storing an object of Track which is bind to the ViewHolder. We also see that we do the view binding inside the viewholder itself. All this helps us to reduce code inside the adapter class.
A recent addition to the app was custom colors for all TRACKS in the app that improved the visual feel of the app. So basically, for example if a SESSION has been associated with the track of Blockchain it would be given a color such as purple. onClickListeners are also being set with some extras which are self-descriptive in nature. Similarly the other ViewHolders have been implemented.
Resources
- Heterogenous Recycler View :
- ViewHolder Pattern : | https://blog.fossasia.org/globalsearchadapter-setup-in-open-event-android-app/ | CC-MAIN-2017-39 | en | refinedweb |
I'm using Eclipse and even though I've done more challenging things than this I keep getting stuck no matter how hard I hammer away at it.
This is a package, so the end of the first part (Driver Class?) is really what I'm having trouble with. Comments are included in the code. Also including the second part/ class is included.
Any guidance, help, flashing light bulbs would be greatly appreciated.
package 6; import java.util.Scanner; import java.text.DecimalFormat; /** * @author Me * */ public class testAccount { /** * @param args */ public static void main(String[] args) { String input; double balance = 0, InterestRate = 0; double interest, deposit, withdrawals; double totalInterest=0, totalDeposits=0, totalWithdrawals=0; int month=0; char repeat='Y'; Scanner keyboard = new Scanner(System.in); DecimalFormat degrees = new DecimalFormat("#,###.00"); System.out.println("What is your account's starting balance?"); balance= keyboard.nextDouble(); System.out.println("What is your annual interest rate?"); InterestRate= keyboard.nextDouble(); SavingsAccount account= new SavingsAccount (balance, InterestRate); interest=account.MonthlyInterestRate(InterestRate); balance=account.calculateInterest(balance); //me testing to see If I can at least get the right balance but ///Something is wrong with my decimal formatter, //keeps adding two 00's when I tested it System.out.println("Your balance is is" +degrees.format(balance)); //How do I step into this Loop? while ( repeat =='Y'|| repeat =='y'); { month++; System.out.println("What are your deposits?"); deposit=keyboard.nextDouble(); account.deposit(deposit); System.out.println( "your deposits" +deposit); System.out.println("balance" +balance); System.out.println("What are your withdrawals?"); withdrawals=keyboard.nextDouble(); account.withdraw(withdrawals); //Around here I'm supposed to be using the Accumulators to set keep count of //totalwithdrawals,totaldeposits etc. System.out.println("Calculate Month" + (month +1) + "Y/N ."); repeat=keyboard.nextLine().charAt(0); } System.exit(0); } }
and this is what it links to
I'm pretty sure (92% at least)most of it is correct
package 6; /** The BankAccount class simulates a bank account. */ public class BankAccount { private double balance; // Account balance private double annualinterestrate; /** This constructor sets the starting balance at 0.0. * @param input2 * @param input */ public BankAccount() { balance = 0.0; annualinterestrate=0.0; } /** This constructor sets the starting balance to the value passed as an argument. @param startBalance The starting balance. */ public BankAccount(double startBalance, double InterestRate) { balance = startBalance; annualinterestrate=InterestRate; } public double MonthlyInterestRate(double annualrate) { annualinterestrate=annualrate; return annualrate /12; } //public void MonthlyInterestRate(String input2) { // TODO Auto-generated method stub //annualinterestrate= Double.parseDouble(input2); //} public double calculateInterest(double annualrate) { // add code to calculate interest balance += annualrate * balance; return balance; } /** This constructor sets the starting balance to the value in the String argument. @param str The starting balance, as a String. */ public BankAccount(String str ) { balance = Double.parseDouble(str); } /** The deposit method makes a deposit into the account. @param amount The amount to add to the balance field. */ public void deposit(double amount) { balance += amount; } /** The deposit method makes a deposit into the account. @param str The amount to add to the balance field, as a String. */ //This is. */ | https://www.daniweb.com/programming/software-development/threads/243278/somewhat-simple-java-programming-problem-i-ve-tackled-harder-but-am-stuck-on-this | CC-MAIN-2017-39 | en | refinedweb |
Hey guys,
So again, I'm trying to create one of the practice programs from my textbook without looking at the book's code. I want to test my skills...
But failure has befallen me and I've given up for tonight. Hopefully one of you can figure this one out.
So far, I have created three arrays: One for product numbers (int), one for the number of units sold (int), and another for sales (double). The directions say to display the list of products in the order of their sales from highest to lowest. The point of the exercise is to practice the selection sort algorithm.
Now, I'm not 100% sure that I did the sort algorithm correctly, so I ask that you don't point out any errors in that function unless you think that it is the cause of my problem:
Even with the dualSort function commented out (as well as the function call, of course), I cannot get the displaySales function to work. I get two linker errors:
Error 1 error LNK2019: unresolved external symbol "void __cdecl displaySales(double * const,int)" (?displaySales@@YAXQANH@Z) referenced in function _main C:\Users\Rob\Rob's Text Files\School Work\Fall 2011\Programming\Labs\Practice\Practice.obj
and
Error 2 error LNK1120: 1 unresolved externals C:\Users\Rob\Rob's Text Files\School Work\Fall 2011\Programming\Labs\Practice\Debug\Practice.exe 1
I've tried a whole bunch of things but I just don't know why I can't call this simple function. Perhaps I just need some sleep, but if anybody could give me a hand, I would very much appreciate it.
There is just one other question that I have: Why do I need to use the NUM_PROD constant as an argument in my function calls? I thought that the whole point of a global variable/constant was that you could reference it in any function. :SThere is just one other question that I have: Why do I need to use the NUM_PROD constant as an argument in my function calls? I thought that the whole point of a global variable/constant was that you could reference it in any function. :SCode://When sorting the Units Sold, also sort the Product Number, using the same index number. //Remember to properly swap the places of values in BOTH arrays. #include <iostream> using namespace std; //Function prototypes void dualSort(int [], double [], int); //highest to lowest int totalUnits(int[], int); //calc total units double totalSales(int[], int); //calc total sales void displaySales(double[], int); //TEMPORARY for testing sort function!!! //Global constant int const NUM_PROD = 9; int main() { int prodNum[NUM_PROD] = {914,915,916,917, //Product Numbers 918,919, 920, 921,922}; int units[NUM_PROD] = {842,416,127,514, //Number of units sold per month 437,269,97,492,212}; double sales[NUM_PROD] = {12.95,14.95,18.95, //total sales per month 16.95,21.95,31.95, 14.95,14.95,16.95}; cout << "Displaying non-sorted sales:" << endl; //call display sales displaySales(sales, NUM_PROD); //call sort function dualSort(prodNum, sales, NUM_PROD); cout << "Displaying sorted sales from HIGHEST to LOWEST:" << endl; displaySales(sales, NUM_PROD); return 0; } //dualSort function void dualSort(int num[],double sales[],int size) { //Hold the max values of sales double maxSale; int maxSaleIndex, startScan; for (startScan = 0; startScan < (size - 1); startScan++) { maxSaleIndex = startScan; for (int index = (startScan + 1); index < size; index++) { if (sales[index] > sales[maxSaleIndex]) { maxSale = sales[index]; maxSaleIndex = index; } } sales[maxSaleIndex] = sales[startScan]; sales[startScan] = maxSale; } } void displaySales(double sales[], double size) { for (int i = 0; i<size; i++) cout << sales[i] << " " << endl; } | https://cboard.cprogramming.com/cplusplus-programming/143110-linker-error.html | CC-MAIN-2017-39 | en | refinedweb |
At an open meeting on April 29, 2015, the SEC issued proposed rules under Section 953(a) of the Dodd-Frank Act that, if adopted, would require companies to provide new tabular disclosure in proxy and information statements of the relationship between executive compensation actually paid by a company and the company's financial performance. The proposal was approved by a 3 to 2 vote, with Chair White being joined by Commissioners Aguilar and Stein in voting for the proposal while Commissioners Gallagher and Piwowar voted against the proposal.
Comments on the proposed rules should be received by the SEC on or before July 6, 2015. To review the SEC's proposing release, click here. All comment letters received on the proposal are posted here on the SEC's website.
Proposed Rules
The proposed rules would require companies to disclose in a new table in the proxy or information statement the following information for each covered fiscal year:
- Executive compensation actually paid to the principal executive officer (PEO), which would be the total compensation as disclosed in the Summary Compensation Table already required in the proxy statement modified to exclude changes in actuarial present value of benefits under defined benefit and actuarial pension plans that are not attributable to the applicable year of service, and to include the value of equity awards at vesting rather than when granted. Therefore, for purposes of this table, equity awards would be considered actually paid on the date of vesting and valued at fair value on that date, rather than fair value on the date of grant as required in the Summary Compensation Table. The amount disclosed for the remaining named executive officers identified in the Summary Compensation Table would be the average compensation actually paid to those executives;
- The total executive compensation reported in the Summary Compensation Table for the PEO and an average of the reported amounts for the remaining named executive officers;
- The company's cumulative total shareholder return, using the definition of total shareholder return (TSR) included in Item 201(e) of Regulation S-K, which sets forth an existing requirement for a stock performance graph; and
- The cumulative TSR of the companies in a peer group, using the peer group identified by the company in its stock performance graph or in its Compensation Discussion and Analysis.
Using the information presented in the table, companies would be required to describe (i) the relationship between the executive compensation actually paid and the company's TSR, and (ii) the relationship between the company's TSR and the TSR of its selected peer group. This disclosure could be described as a narrative, graphically or a combination of the two.
The disclosure would be required for the last five fiscal years (or three in the case of smaller reporting companies). However, the proposed rules contemplate a phase-in for all companies whereby companies, other than smaller reporting companies, would be required to provide the information for three years in the first proxy or information statement in which they provide the disclosure, adding another year of disclosure in each of the two subsequent annual proxy filings that require this disclosure. Smaller reporting companies would initially provide the information for two years, adding an additional year in their subsequent annual proxy or information statement that requires this disclosure. Importantly, the proposed rules would not apply to emerging growth companies, which are exempt from the statutory requirement. However, business development companies would be subject to the proposed rules.
The proposed table is presented below. | https://www.lexology.com/library/detail.aspx?g=70572265-1429-4160-8af8-2148ec22ce2b | CC-MAIN-2017-39 | en | refinedweb |
WP.
A new drop of Prism has been published last Thursday. Among other things, in this drop we refactored
Francis has been a busy man lately on his blog with a series of posts on the various loosely coupled
Francis has been a busy man lately on his blog with a series of posts on the various loosely coupled
Francis has been a busy man lately on his blog with a series of posts on the various loosely coupled
As far as I understand, the Proxy is to be able to override Commands (extra layer of indirection) to mock them during testing.
I was thinking it would be a better idea, to just register a non-static CompositeCommand class with the Unity Container in the Bootstrapper which itself can be extended during mocking.
The extra benefit is, that now all my objects will be injected with the global commands by Unity, which allows a TestContainer to be specified for testing which automatically injects mocked GlobalCommands:
Here would be the Command class:
ublic virtual CompositeCommand SetTitlesCommand { get; protected set; }
public virtual IGlobalCommands InitializeCommands()
{
SetTitlesCommand = new CompositeCommand();
return this;
}
Here the registration in the Bootstrapper:
protected override void ConfigureContainer()
{
base.ConfigureContainer();
Container.RegisterInstance(new GlobalCommands().InitializeCommands());
}
And here an example of it being injected and executed:
public SecondViewModel(ISecondView view, IGlobalCommands globalCommands)
{
_view = view;
_view.Model = this;
OutputCommand = new DelegateCommand<string>(arg =>
{
globalCommands.SetTitlesCommand.Execute("Global Shell Title");
});
Just wanted to hear what other people think about this way of doing things – any objections?
Sorry, but the Command class didn’t paste completely, here it is:
public class GlobalCommands : IGlobalCommands
{
public virtual CompositeCommand SetTitlesCommand { get; protected set; }
public virtual IGlobalCommands InitializeCommands()
{
SetTitlesCommand = new CompositeCommand();
return this;
}
}
and the corresponding Interface:
public interface IGlobalCommands
{
CompositeCommand SetTitlesCommand { get; }
}
Cheers … | https://blogs.msdn.microsoft.com/francischeung/2008/05/30/decoupled-communication-with-prism-commanding/ | CC-MAIN-2017-39 | en | refinedweb |
RoamingSettings
The settings created by using the methods of the
RoamingSettings object are saved per add-in and per user. That is, they are available only to the add-in that created them, and only from the user's mail box in which they are saved.
While the Outlook Add-in API limits access to these settings to only the add-in that created them, these settings should not be considered secure storage. They can be accessed by Exchange Web Services or Extended MAPI. They should not be used to store sensitive information such as user credentials or security tokens.
The name of a setting is a String, while the value can be a String, Number, Boolean, null, Object, or Array.
The
RoamingSettings object is accessible via the
roamingSettings property in the
Office.context namespace.
Requirements
Members and methods
Example
// Get the current value of the 'myKey' setting var value = Office.context.roamingSettings.get('myKey'); // Update the value of the 'myKey' setting Office.context.roamingSettings.set('myKey', 'Hello World!'); // Persist the change Office.context.roamingSettings.saveAsync();
Methods
get(name) → (nullable) {String|Number|Boolean|Object|Array}
Retrieves the specified setting.
Parameters:
Requirements
Returns:
- Type
- String | Number | Boolean | Object | Array
remove(name)
Removes the specified setting.
Parameters:
Requirements
saveAsync([callback])
Saves the settings.
Any settings previously saved by an add-in add-in is used, use the
saveAsync method.
Parameters:
Requirements
set(name, value)
Sets or creates the specified setting.
The set method creates a new setting of the specified name if it does not already exist, or sets an existing setting of the specified name. The value is stored in the document as the serialized JSON representation of its data type.
A maximum of 2MB is available for the settings of each add-in, and each individual setting is limited to 32KB.
Any changes made to settings using the
set function will not be saved to the server until the
saveAsync function is called. | https://dev.office.com/reference/add-ins/outlook/1.5/RoamingSettings | CC-MAIN-2017-39 | en | refinedweb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.