text
stringlengths
454
608k
url
stringlengths
17
896
dump
stringclasses
91 values
source
stringclasses
1 value
word_count
int64
101
114k
flesch_reading_ease
float64
50
104
9, 2008 Copyright Date:506 T'he Sweetest StrawGerries This Side of -J.o;- /1 ..th .t. wr bo i'0 :t .. -/ n F j 1-. 700 USPS 062-700 Two Sections Starke, Florida Thursday, October 9, 2008 129th Year 11th Issue 50 CENTS w w btlga hc e ma l: S -6 0 iS Noteworthy People's Voice forum tonight The People's Voice will hold a question and answer session for can- didates running for county office. The forum will take place Thursday, Oct. 9, at 7 p.m. in the RJE gym- nasium on Pine Street in Starke. The public is invited to attend this forum and bring their questions for the candidates. Questions will be read by The People's Voice committee, and personal attacks will not be accepted. Members of The People's Voice include Joe Kiser, Darryl Hall, Esther Kelly, Gregory Haile, Dwayne Tyson and Loretha Hankerson. For more information, contact Hankerson at (904) 769-9298. Political forum set for Oct. 20 All state and local candidates have been invited to participate in a Candidates' Forum Monday, Oct. 20, at the Andrews Center Cul- tural Building of Santa Fe College in downtown Starke from 7-8 p.m. This event will be broadcast live on WEAG FM and AM radio stations. Ben Barksdale will be the moderator. Each candidate will give a brief pre- sentation and questions will be asked of the candidates. A committee is writ- ing and receiving questions in advance. Questions will be accepted from the audience only before or at the begin- ning of the forum. All questions will be screened by a committee. Ques- tions may be left at the Andrews Center in Judy Becker's box or with any of the other people listed below. The general election is Tuesday, Nov. 4. Early voting will begin' Monday, Oct. 20, for state and county officials. The Candidates' Forum is co-spon- sored by the Bradford Democratic Ex- ecutive Committee-Judy Becker, chair; the Bradford Republican Executive Committee-David Dodge, chair; the Bradford Education Association-Judy Dukes,president;andtheBradfordChap- ter of the NAACP-Isaiah Branton, chair. Refreshments will be served in the gazebo at the conclusion of the forum. Play and help Woman's Club raise funds On Monday, Oct. 20, beginning at 10:30 a.m., the Starke Woman's Club will be hosting a game day and luncheon. Guests may choose their games of choice-bridge, canasta, etc. Reservations are required and may be booked by calling Joan Rogers at (904) 964-7515 or Jo Ann Rowe at (904) 964-3571. The cost is $15 per person. The Woman's Club's prom- ises a delicious lunch and lots of fun. Proceeds will benefit the clubhouse. Library book sale Oct. 17-18 The Friends of the Library book sale will take place in the meeting room of the Bradford County Public Library on Friday, Oct. 17, from 9 a.m.-2 p.m. and on Saturday, Oct. 18, from 9 a.m.-lp.m. Books, videos, DVDs, CDs and more will be on sale, and all proceeds will be used to purchase art for the library. Donations are still being accepted for the sale. All donations may be dropped off at the library located at 456 W. Pratt St. in Starke. For more information, call (904) 368-3911. WWW. BCTELEGRAPH. COM ~iii- ~ I'y ~i~~~~;"""~~J ~Ci~~Li Srt ,, i...., -'i '' '' ' ' r1 P 1,: ' r ,~ e, ' re ~- r dti ''!'''' '' .r- I B r !Ci:.~ .* ; .L.LLe r'.?'r" '' 1 C"~ 1~ -*J '' ~"'' ?-, r .!. ,.;~.~,~~ '''' i i I : ,, . ~ I . ~?1: ~"~ I I 1E It.l -Ir ~ I~6: i' i$:~r LF~:: '.j ~. 1 j ~: F,. -~~.. ~-L~*4~LL~ ,. - ~x, I ..:~ .- . ' :-s -~ .-. I II1 ; : ;?.n: .q-,1.~ .F ,' ?nrl .. r. r-. c r. IU: . ,, r? .~~l.u '' I~i~B , I ~ a~W~l ~ ~ ~ ~ '7rw ~ i PLO" clAftaw" Camping, fishing, showing their animals at the fair, giving back~to the community -4-H. kids stay busy all year long. See what they've been up to this year as we mark 4< -H week. Thanks to 4-H1 and the extensilon off ice for information and photographs like the one above of Alec Harden, Madeline Strickland, Emily Luke and Shaina Harden at the county fair. Governments begin new fiscal year Taxpayers may notaget as much back as they thought Stay informed. Get involved. Be entertained. Ke;p in touch. Express yourself. Know your-community. Il~apl11 Deadline Monday 5 '~m. before publication -Phone (904~) 964-6305 -Fax (904) 964-8628.38 IiY MARK J. CRAWliFORD I Telegraph Editor ,*' LastWe nsday marked the beginning of a new fiscal yearfor local government. The county commission has approved a nearly $32.3 million budget for *the year, which is larger than the budget approved 'for last year. While the millage rate of 9.1769' mills, or around $9.18 for every $1,000 of property value, has not been changed, the amount of revenue generated for the, county by that rate has decreased from $8.24 million to $7.82 million. It's a reduction, but not the $800,000 cut ex- ec'ted based on the state's calculation. Nearly $5.89 million of' that property tax revenue is allocated to.the general fund, $1.7 million to the sheriff's office, $140,000to emergency' medical services and $90,000 to the health department. The budget is up from $30.1 million since the first draft presented was pr~e- sented at the end of July, a function of the finance department being asked to incorporate a raise force countyy employees as well as a half-million-dollar alloca- tion. In the end the $10.6 million general fund surpassed last year's total by more than $1 miillion, and the county appears to have survived the budgeting process without deep cuts that were predicted. The city's of Starke's budget is down more than $3.6 million to $20.8 rniil- lion primarily because revenue re- ceived for the sewer project last year is not longer a factor in this year's bud- County just Value County Tuaabe Value RUI at aiate Rearl Estate ParcelsS Total jutst Value Total T~uable Va~lue Now Constrpuction Homestead Parcels Home,%tead Exemption$ Save Our Rome Efxempt Taxakble Homesteal Tangible Personal, T"PP Accounts -Total lustllaluec Total T~axable Vatlue Centrallk~jAsseued4 (Railroad Propirty) Railroad Accounts Total Just Value Total Taxable VFalue ,$2,1275,418,215 $903,306,3967 $1,9366,191.462 $737.894,046 $30,095,7'14 1 6389 $160,113.4713 $1849,133,867 $313.351,187 1,475 $1935,795,965 420 $13,430,78aa W.430.788 $2,196,897,575 $8512,480,288 14,624 $1.968.1468,131 $696,682,248 $24,820,528 6.490 $167,485,538 $266,246, 187 477 $15.458.2033 $13,939,138 get. That translates to a larger drop in the utility fund, but general fund ex- penditures are down slightly as well. The city' commission increased its millage from 3.7290 to 3.9528, which will raise more than $30,000 in ad- ditional revenue, bringing the total property tax revenue to $588,500. Millage was slightly higher in Law- tey, Brooker, Hampton and the school district as -well. Like the county, the millage rate for-`the water man- agement district was unchanged. Taxing authorities such as the county commission, city council and school loard' establish your tax iig rate. The county property ap- praiser estimates the market val- ue of your property. The assessed or taxable value of your property is the market value minus ben- efits such as homestead exemp- tion. The tax rate established by the different taxing authori- ties, multiplied against the tax- See BUDGET page 3A 200S 2006 2007 2008 (So. Far) $99.286~ $100.614 $113,239 $W632Z 3SS i5 Leaders plan to fi'ht Mullins Grade plan BY MARK J. CRAWFORD Telegraph E~ditor Bradford County and city of Starke commissioners are aghast at the latest proposal to link S.R. 100 to U.S. 301 via Southeast 144' Ave., also known as Mullins Grade. Not only does the proposal not achieve the goal. of successfully alleviating some downtown traffic congestion by providing another route on the south side of the city, in the view of local leaders, it actually makes the. problem worse. That's because the new route would intersect with 301 across from Lewis Timber via Container Road but not via a signalized intersection. Instead, as currently proposed, traffic would only be permitted to turn right from Container Road onto 301. Directing traffic from 100 north is the opposite of what the county wanted to accomplish, but as currently proposed that traffic would only be able to go south by traveling north to the signalized intersection at Deerfoot Village Shopping Center and making a U-turn. In County Commissioner John Cooper's words, "That's not going to work." Cooper predicted the amount of traffic coming off of the new road, would astound. He said 3,000 cars would be trying to make a U-tumn at that red light every day if the latest proposal for Mullins Grade moves forward. Study of the traffic does not show a signal will be warranted at Container Road, according to bav'id Anderson of the Florida Department of Transportation. A set of 12 criteria was used and numbers were projected through 2011. None of the 12 signal warrants was met, he said. Anderson indicated that earlier on, plans in 'volved a signal at the 301/ Container Road, intersection, but an internal review at DOT pointed out potential problems -that would be created. DOT believes a light (and median' opening) at Container Road would be too close to the light at Deerfoot Village (less than 500 feet). if the light is removed at Deerfoot Village, the median would have to be closed there, and another median, at Steel Mill Road would have to be modified. Commissioners did not agree with this reasoning. "I 'would be to the point of telling you We're not going to come out at that point if we can't turn left on that road, because that makes 'absolutely no' sense to me:' Cooper said. They also fretted about disruptions that would be caused if the light is moved but truck traffic from Steel Mill Road and RV traffic from KOA would be impacted by altering that median. Left turns would be prohibited from either location. Losing the median at Deerfoot Village would also interfere with current traffic 'Patteins' in and out of the shopping center. Ideally commissioners want the intersection of the newly routed 144"" to be as far south -as possible. A plan that would have impacted Lincoln City has already been rejected because of resident objections to. the use of. Southeast 146 1h Terrace. Local officials, ~5~-T~"~~jslBliBkr~rr~'~*"P~P"~!U k~k~FJ3m'd~I~T~ 2004 320 $30.2 M $94,384~~s $44,8 M m4 $303 M rp Si3 MQ Page 2A TELEGRAPH October 9, 2008 TDC grant goes to fall speed festival BY MARK J. CRAWFORD Telegraph Editor The Bradford County Tour- ist Development Council has granted $2.000 to support a multi-day event at the Keystone Heights Airpark ;known as the Historic Fall Festival of Speed. European Rally School is sponsoring the event, which will take place Oct. 22-26 and show- case the recent completion of the motorsport park's two-mile paved road course, according to TDC's Ron Lilly. The third an- nual festival will feature a num- ber of competitive racing events for historic, vintage and modern cars and bikes. Historic vehicles are those 25 years and older, ac- cording to the event Web site, fallfestivalofspeed.com. Vintage vehicles' are 40 years or older. There will be opportunities to enter races and be spectator. Entry fees range from $30 to $55.depending on the number of days attended ($25-$45 if tick- ets are purchased in advance), but kids five and urider can en- ter for free. Everyone who en- ters must sign a liability waiver. Competition fees vary by event. Because the event is around the corner, European Rally School owner Ivor Wigham has already spent money promoting the speed festival in various car magazines. The $2,000 TDC grant will serve to reimburse some of what he has already invested,..in..the -event. The Tourist Development Council generates its revenue through bed taxes charged by hotels and businesses offer- ing overnight accommodations. Grants to local events-primar- ily for the purpose of publiciz- ing those events-are one of the ways in which that revenue is used. Through supporting such events, TDC is helping promote tourism in the area. Filling ho- tel rooms in turn generates more revenue to promote tourisln. European Rally School ex- pects to attract thousands of peo- ple to its facility, which has been around for nine years attracting race enthusiasts to the airpark. More than $1 million was spent constructing the new paved road course, according to Lilly. While the TDC board mem- bers approved European Rally School's application for fund- ing, it was the county commis- sion, which gave final permis- sion to award the grant funds. Keystone Heights Mayor Mary Lou Hildreth was present to thank the commission for its continued support of the airpark. "I'm sure you all realize what a hidden gem it is and the poten- tial for the economic develop- ment of the area," Hildreth said. Lilly's economic develop- ment experience will help now that he has been appointed to the airpark board, she said, as will the commission's inter- est in building a road to open up more land for development. "I just basically wanted to come to say thank you, and 1 think we should strive to work together on common goals for our area:' Hildreth said. mak- ing herself available to dis- cuss concerns and brainstorm future cooperative projects., Road priority requests updated The most recent priority list of road projects that the county wants added to the Florida De- partment of Transportation's five-year work program has been completed. Most involve resur- facing. The list in descending' order is C.R. 237 (Lewis); C.R. 325 (Hersey); C.R. 100A Griffis Loop (Cooper); Northwest C.R. 125 (Thomas); Northwest C.R. 225A (Thomas); Southwest C.R: 225A (Lewis); Northeast 19th Avenue (Chandler): C.R. 221 (Hersey); Northeast 173d Street (Chandler); Southeast 52nd Av- enue (Hersey); construction of the Starke U.S. 301 bypass west of the city; and a turn -lane re- quest off of Weldon at the inter- section of S.R. 16 and C.R. 229. Adkins to take office in courthouse Janet Adkins, the presump- Libraries receive grant for summer reading program New River Public Library Cooperative has announced a partnership with Target in rec- ognition of its efforts in to keep children reading during summer vacation. Grant funds will be used to enhance summer library programs for children in 2009. Public libraries in Florida work to keep children reading during summer vacations so that their reading skills are maintained. This grant will help the libraries present programs for children. This grant is part of on- going efforts by Target to strengthen families and communities throughout the country. Since opening its doors, Target has given 5 percent of its income to organizations that support education, the arts, social services and volunteerism. Today that translates to more --than $3 million every week. Sign up for computer classes offered at the library The Bradford County Public Library will offer free computer classes to the public. Two differ- ent classes will be offered-In- ternet and basic computing. Beginning Monday, Oct. 20, the library will offer an Internet for Beginners class. Classes will be held Mondays from 10-11 a.m. and 5:30-6:30 p.m, The class will cover Internet security and how to access the World Wide Web. Also, beginning Thursday, Oct. 23, the library will offer a Computer Basics class. This class will cover the very basic of computer skills, from how to turn on the computer to more difficult tasks that will be easy to learn. These classes will be held on Thursday from 10-11:00 a.m. and 5:30-6:30 p.m. Both classes will run for 4 weeks. Please call the library at (904) 368-3911 to sign up. Space is limited. "At Target, our local grants are making a difference in the com- munities we serve," said.Laysha Ward, vice president, community relations, Target. "We're proud to partner with the public libraries in Baker, Bradford and Union coun- ties as part of our ongoing com- mitment to give back to the com- munities where our guests and team members live and work." PARTRIDGE CARPET CLEANING "Always Quality Service you can Trust" Serving the Tri-County Area Add't rooms $15 3 Rooms for *699 Rooms over 250 sq. ft. U 0mS Eor 9 are considered 2 rooms uCENSED & INSURED FAMILY OWNED & OPERATED we 0jf We now offerTile Cleaning! 352-475-3413 MELROSE Nominal opening bids from $1,000 _100+ Florida Homes OCT 10 Oth 21st MANY PROPERTIES AVAILABLE FOR ONLINE BIDDING williamsauction.com 800.801.8003.. g ~li 5% Buyer's Premium May Apply WILLIAMS & WILLIAMS FL RE LIC BK3003737 DEAN C. WILLIAMS BROKER, W&W RE LIC 1032049, AUC LIC AU3278 MONTE W. LOWDERMAN AUCTIONEER. W&W AUC LIC AB-0000760 STOP LEG CRAMPS 4 . BEFORE THEY STOP YOU. CCa et Calcet's triple calcium formula is tolaSt 1 designed to help stop low calcium leg Iw cramps. Just ask your pharmacist. Tiple Calci S^-rabforb Countp delegrapb USPS 062-700 Published each Thursday and entered as Periodical Postage IvY I;, Paid at Starke, Florida under Act of March 3, 1879. c--- POSTMASTER: Send address changes to: Bradford County Telegraph 131 West Call Street Starke, Florida 32091 Web address: BCTelegraph.com Phone: 964-6305 P.O. Drawer A* Starke, FL 32091 Subscription Rate in Trade Area John M. Miller, Publisher 00 arEditor: Mark Crawford $34. r year: Sports Editor: Cliff Smelley $18.00 six monthS Advertising: Kevin Miller Darlene Douglass Outside Trade Are: Typesetting Sylvi Wheeler S .Advertising and :' . $34.00 per year: Newspapr Prod. Earl W. Ray S=Clas-irie~iAdv. Melisa Noble $18.00 six months Bookkeping: IKathi Bennelt tive replacement for Aaron Bean as representative for District 12, in the state House, has asked for office space in the Bradford County Courthouse. A member of Adkins staff will man that of- fice three days a week, according to details discussed during Mon- day's county commission meet- ing. It was stated that any costs incurred by the use of the office could be reimbursed by the state. The commission approved the request for office space and asked staff to invite Ad- kins to the next county com- mission meeting as some com- missioners had yet to meet her. Adkins won the Republican primary at the end of August, but will still appear on the November ballot, according to the supervisor of elections office, although her name will appear beside a blank line. Two write-in candidates also qualified to run for the seat. aT 1 ".. "- .... . .. ...... .- Out of Business Sale... Everything must goll! "It's been fun, but we're packin' it in" 2 weeks Oil Ct.25iStheI STDA Everything Marked Down Most Items 1/2 Price! 1/2 Price on Model RAILROAD TRAINS & Accessories v" %! I PolHookupss AA 1. ^ ^ii^" I.!V *i .Gats for s-chance todonate S 300 new or slightly \ tcrd by a parent or guardian. . used coats will be giv- Coat distribution will S en away Saturday, Oct. take place at 142 W. Call 11, beginning at 9 a.m. St. beginning at 9 a.m. This is a last chance to The Bradford County help the alliance reach its Ministerial Alliance with goal of 400 coats. Coat col- ---- the help of First Christian S election points are set up at Church. First United Meth- S all participating churches odist Church, Madison Street * and Hold On to Your Faith. Baplikt Church, Grace Com- SIf you, your church or or- niunitN Fellowship, Church ganization would like to of God by Faith, True Vine participate in this outreach, I 1linistries. Ebenezer Bap- please call First Christian S tist Church, Rock Primi- Church at (904) 964-6100. tive Baptist Church, Hold Coats for pre-K On to Your Faith, Kiwanis S through high school kids Acton Kids. The Arc of will be available Sat- Bradford County, Starke urday, Oct. 11, as long as supplies last. Woman's Club, Garfield Cleaners, Eric's Spin Registration begins at 8:30 a.m. at the Starke Class, WEAG, the Bradford County Tele- Woman's Club at 210 N. Walnut St., across from graph, and many individual donors of coats and First United Methodist Church. All children re- funds have provided a blessing for these kids. ceiving coats must be accompanied and regis- Thanks to a community that loves its kids! S. . .. *. c "L7 7 ' Sprint PCS/Nextel Phones FREE with New -L A 2 yr. Agreement.- ~ 1/2 Pricefor Purchase or Upgrade RadioShack in Starke Bradford Square Shopping Center on U.S. 3011 .___ 9041 964-4343 I '-- I II~ B~'~i October 9, 2008 TELEGRAPH Page 3A ROAD Continued from Page 1A The county's portion of the project, paving 144"' from S.R. 100 to the railroad crossing is "expected to take place during the current fiscal year, as it DOT's right of way acquisition. Beyond that, DOT hopes funds become available tocompleteconstruction of the road, likely in 2010-11. Both commissions voted unlinimously that they wouldn't supportanalternativethatrequired right-turn only intersection from the new road onto 301. Letters to that affect will be entered into the record at Monday's public hearing, and commissioners are expected to be on hand to personally voice their opposition. Anderson was not discouraged by that, saying it was this kind of input that could mold future projects, He did say that DOT had a few projects in recent years that did not move forward because the public was not happy with them. DOT instead m6ved on to projects that did have public support, of which there are a number. Starke Commissioner Tommy Chastain asked if rejection of this alternative for 144th would kill the project entirely. Anderson would only say that out of 16 alternatives, 15 were already determined to be unworkable. This current proposal was the only one that stood the best chance, he said. Interestingly, none of the 16 or so different design alternatives have contemplated using the existing intersections at Steel Mill Road. That was surprising to commissioners who thought that had been discussed in the past. The public hearing on the proposal will take place Monday, Oct. 13, at the county library. Doors open to the public at 4:30 p.m. and there will be two hours to review and discuss the plans with DOT representatives. The formal presentation and BUDGET Continued from Page i I 1A able value, generates the tax bill. Taxable values were dowh countywide-for-2008-The reduc- tion in taxable value is due most- ly to reductions in the amount of taxable value on homestead property, a result of voters pass- ing Amendment 1, which dou- bled homestead exemption for many (except on school taxes). Moves to reduce property taxes may not have as much affect as many were hoping, however. That's because it turns out a property's taxable value can rise, even if real es- tate market value takes a dive. It dates back to the Save Our Homes amendment ap- proved by voters in the early 1990s, which caps increases in a homestead's taxable value at 3 percent. That protects taxpay- ers when the real estate market prices climb as they did over a number of years, and the amend- ment has saved homesteaders an untold amount over the years. Florida law requires the prop- erty appraiser to determine the market value, or what a property would sell for, for all property each year. Occasional on-site ap- praisals combined with an analy- sis of recent sales and property improvements determine a prop- hearing will begin at 6:30 p.m. Fire prevention code adopted The county commission adopted the state fire prevention code into its own code of ordinances. The fire prevention code represents the minimum fire safety standards set by the state by occupancy. New occupancies are governed by stricter standards, according to Steve Kirker, who has recently completed the training necessary conduct fire inspection services for the county. The standards govern commercial and other public places, including schools and hospitals, but inspection authority does not extend to residential dwellings, he said. Inspections should be conducted on an annual basis, although that's not likely even in counties with more resources. The primary focus will be on educational and health care institutions, including nursing homes and assisted living facilities, and then businesses as time allows. He will only be inspecting buildings in. unincorporated Bradford County.' Part of the inspection process involves making notes on dangerous conditions .that firefighters could encounter at particular locations, information that can reduce risk. The county has software that would log that data, although the fire departments aren't yet equipped to interface with it, Kirker said. Kirker completed 200 hours at the Florida State Fire College in Ocala to make himself ready to conduct fire inspections. He is also a state-certified building inspector for the county and has begun training to be the county's next building official, the position currently held by Wilson Whidden. Adoption of the fire prevention code is a requirement, and has been for several years, although up until now, the county didn't have the capability to provide inspection services. Wilbur Waters Starke elects new mayor Starke city commissioners unanimously chose Commissioner Wilbur Waters to replace Woods as the city's mayor in this new year.. Waters won re-election to the District 5 seat by a narrow margin in 2006. Tommy Chastain was appointed vice mayor. During its reorganizational meeting, the commission also reappointed Millard Brown to the Bond Trustees Board for three years. Receiving five more years on the Recreation Board were Phil Pombier and Pat Welch. Judy Sumpter and Chrissy Allen were each reappointed to the Recreation Board for one year. Tommy Tyer will serve on the Zoning Board for three more years. erty's market value. Last year, The effect has particularly been however, real estate prices began noticed in South Florida where to drop, but a little-known rule 3 percent of an expensive prop- called the "recapture rule" means erty's value can add up to tens of the taxable values of properties::. thousands of dollars. The recap- will continue to increase by a ture rule was put into the state -mraximum-of--percent annually-administrative code by late Gov. until the taxable value catches up Lawton Chiles and his cabinet, with the real estate market value, responding to the fact that the Taxable value increases can Save Our Homes amendment offset the benefit of recent at- made no provision for what would tempts by lawmakers and voters happen to assessed property val- to lower local property taxes. ues if market values declined. Save Big on High-Speed Internet! Everything You Need for $99.95 (plus S&H) Hurry Offer Ends December 15, 2008! Includes Free Standard Installation! M WILDBLUE. 1-800-922-0439 L Subl ff 6 l l ue ul It'r. .i].:G.llll'h:I, VI e1,| ** a..iJO f.. L'.n i 'l 0 s' l li KN ."The love for a well-chosen 4- legged friend can transcend life itself." Ao J. Bryan Shelter Friend in honor of all '..1nm III NJ Kagan S8-;9 wee ks old, Denzell Malachi medium hair, 2 yr. old Labrador ' I-2vr old, white with black retriever, neutered domestic short patches, male, shy but hair, unneutered unneutered male, friendly, loves to male, white with very playful, loves run andaplav. ray patches, very to be held. ID#092208-HP2 Itriendk & loving ID#091508-DB BRADFORD PET CARE HOSPITAL 964-3906 701 E. Call St. Starke Buckwheat S-h, I- yr. old Pit/ Pilar Jr.o oxer AmericanBull mix, 8-9 weeks old, 3 y. o Boer/Bu male unneutered, domestic medium mix unneutered very playful and hair, female male, very sweet e.. unspayed, gray with natured, eager to enerd g etic. wunte fxweli i ....egerto wonderfuffy friendly white, extremely please, loves ID# 0 92 8HP friendly loves ID#09n 208-14 ID#09220 C2A 'IU I U0 I UO-IKV HOW TO ADOPT on Behalf Of: Bradford Animal Control Facility Adoption Fee: Dr. Joelle 606 Edwards Rd., Starke Sterile Non-Sterile Simon and "Your Dealer for 904-964-9200 Dogs $20 $40 "Hold Onto Life" Adoption Hours: Cats $1 5 $30 Your Faith" 964-3200 Mon-Fri 11am-4:45prnm Your Faith" 964-3200 See all our adoptable pets at: -Ministries 964-750 967500 The effect is less dramatic in Bradford County. According to the county, growth in prop- erty values helped offset the state's prediction and shrunk the reduction in property tax revenue from $800,000 to around $416,000. Taxable val- ues were down overall, but not by as much as they would have been without the recapture rule. Lawmakers are expected to take up the issue of the recap- ture rule when 'they convene next years. Attempts to address it during this year's legislative session were blocked given the amount of "property tax reform" that had already taken place. Some oppose any move to elim- inate the recapture rule because it would further imbalance a sys- tem that already -places a great- er tax burden on business and other nonhomestead properties. Then again, if the real es- tate market rebounds, any ac- tion on the recapture rule would be meaningless until the next time the market crashes. Library closed Oct. 13 The Bradford County Pub- lic Library will be closed on Monday, Oct. 13, for a staff, development day. The bobk- E - Macclenny NE FL Hospital Walmart Warehouse mobile will not run that day. The book drop 'at the li- brary entrance will be open, and online information is available through the library Web site,. Ready to quit smoking? A new Quit Smoking Now class will be held each Monday, Oct. 20 to Nov. 24, from 6-7:30 p.m. at the Bradford County Public Library. This free class offers group support to stop smoking and other tobacco use. Free nicotine replacement patches are avail- able to participants along with tips to help you quit and infor- mation on living a healthier life. .To register, call the Brad- ford ,. County .-. Health De- partmfi '(904) 964-7732.. GRAND ESTATES City water/sewer, walking trail, nature AUCTION COMPANY preserve, 80% financing available. ,, cal'f6r a FREE color brochure All Have Large Potential Rental Income and -araMinutesorigeonErge,Gatlinbrxg,, 800-552-8120 Hiking, Fising, Golfing, Shopping &Morel Winn-Dixie Warehouse Michaels Distribution Center Publix Warehouse Rosa L. Parks/FCCJ Transit Station Xo /: .,*" -- -- ---- -^- The Downtown Business Community Association proudly. Announces The 15th Annual Great Pumpkin Escape t ll take place Saturday, Oct. 25, from 5-9'p.m. on Call Street in downtown n Starke. All church leaders, political candidates, businesses and any others interested in booth space at the event can obtain their applications now from Joli Cheseux Salon and Spa, located downtown at the corner of Call and Walnut streets. Volunteers are also needed to help build the , haunted house, set up the day of the event, assist \ ith booths and cleanup after the event ends. , Interested parties needing more information, should contact Lee Sparks at (904) 966-1150, Connie Stocker Sat.904) 806-4191 or Norma Donn at (904) 964-5582. "- . . -. ,s ly, "'\ -' r gr ". Leave traffic behind. Baldwin Commuter Shuttle The shuttle operates Monday through Friday including holidays from 3 a.m. to 8 p.m. Major Destinations Include Call today to see how easy, i 11 i1lip 7 1111177-I I iii 7 A T r2LE(GRAf October;, : New 4-H horse club forming BY KATI TENDER Tele'grap)/ Stff Writer At the Bradfori d County Fair next year, a new 4-11 club will be showing off. The members of Hoof Beats, a new-horse club, are having their first official meeting on Sat- urday, Oct. 11, where they will elect their officers and discus business for the upcoming year. The 4-H Leader Kim Wilson, also leader of the dog club Wig- gles N Wags, is a member of the Bradford Riding Club. After a few girls approached her about the idea of a horse club, she agreed to help and got permission from the riding club to use its facilities. The goals for this upcoming year include showing the kids the different horse disciplines, and teaching them basic horseman- ship skills and how to take prop- er care of their horses. They are hoping to do activities with other local horse clubs such as those Duval County or Clay County. The group is made up of 15 kids age nine to 16 who come to the club with a wide vari- ety of experience. Hoof Beats members will be showing their horses at next year's Bradford County Fair. The group will have an official meeting once a month, but plan on doing more at the Riding Club together since most of the kids ride there. They will also have some workshops with speakers and hands-on demonstrations. "We have plans to grow in the future as we get more volunteers," said Wilson. She encourages anyone inter- ested in helping out to contact her. Likewise, anyone looking to get involved in any 4-H club, either as a child member or adult volunteer, can contact the exten- sion office at (904) 966-6224. Bradford 4-H kicks off National Youth Science Day Bradford County 4-H will celebrate the first 4-H National Youth Science Day with a never- before-seen event that will get .young people involved in and excited about science. Launched in support of 4-H's new public service campaign, "One Million New Scientists, One Million New Ideas," Bradford County 4-H's celebration of 4-H National Youth Science Day further promotes 4-H's long-term goal of attract- ing one million newyouth to 4-H science, engineering and technol- ogy programs by the year 2013. In celebration of the first-ever National Youth Science Day, lo- cal 4-H members, youth organi- zations and parents will partici- pate in 4-H's National Science Experiment-a new initiative that uses science principles to teach youth across the country about the importance of water cfdnsei:' UNITED STATES_- Statement of O g POSTAL SERVICE. (All Periodicals Publi BRADFORD COUNTY TELEGRAPH 4 I. F>ue-ar i - WEEKLY ovation. Participants will gather at the Bradford County Exten- sion Office from 3:30-4:30 p.m. Wednesday, Oct. 8, and will ex- amine the properties of water-ab- sorbing poly- I. and environmental cleanup. "4-H National Youth Science Day is a great opportunity for 4-H members and youth in Brad- ford County to get excited about sci- S ence," mers, Ih said which I here'sa little scientist Debbie are long Nistler, chains IflSBrad- of mol- ford ecules M County that can ,4-H be used youth in en- devel- viron- / opment mental ". agent. appli- .-- -.* ....... "These cations initia- such as rii*----* ---." tives agri- .UTHOalEnOCEDR help culture, spark ero- ..ung si'n control, soil management people's iinerest in science anEi : may inspire them to caploke scientific careers. The knowl- wnership, Management, and Circulation edge they gain will also help ications Except Requester Publications) them make a real difference sliT, 008* in their own communities." o0 6 2 ..17 0 0 SEPT 11.2008 Science education expert Steve -52 $4.00 Spangler worked closely with 52 .00 Kevin Miller P.O. DRAWER A, STARKE, FL 32091, BRADFORD COUNTY (904) 964-6305 P.O. DRAWER A, STARKE, FL 32091-9998 , -. John M. Miller, P.O. Drawer A, Starke, FL 32091-9998 Eci'rr a imf a- son M en:, "aig ediSs Mark Crawford, P.O. Drawer A, Starke, FL 32091-9998 lS.n4,nav Ecit himoe and Ocmi..els utt -g. o'cis,; John M. Miller, P.O. Drawer A, Starke, FL 32091-9998 Iah ,rxid tt oviow r ci i8 i I . ' -L .r' .5'. . .0-r' 4-H and Dr. Bob Horton, 4-H sci- ence education specialist for The Ohio State University Extension, to create the National Science Experiment and related activi- ties. Six million 4-H youth plus parents, teachers, students and youth organizations nationwide were invited to participate in 4-H National Youth Science Day. "The National Science Ex- periment is a hands-on proj- ect with practical benefits that educate youth about our envi- ronment-all the while mak- ing science fun." said Dr. Bob Horton. "The experiment helps youth not only understand how superabsorbent polymers can be used in horticulture, gardening, landscaping and specialty crop farming, but also how they can address water conservation and groundwater contamination is- sues in their own communities." As part of the Cooperative Extension System of the United States Department of Agricul- ture and the 106 Land-Grant Universities across the country, 4-H has been educating youth on agriculture and the sciences for over 100 years. In fact, 4-H's existing science curriculum. combined with riew initiatives like 4-H National Youth Sci- ence Day, will arm youth with the necessary technical skills to help America maintain its com- petitive edge in the global mar- ketplace. For more information on 4-H National Youth Science Day. please visit. 4-H is a community of 6 mil- lion young people across Amer- ica learning leadership, citizen- ship and life skills. National 4-H Council is the national, private- sector, nonprofit partner of the 4-H Youth Development Program and its parent, the Cooperative Extension System of the United States Department of Agriculture. Full Name Complete M.ling Addres Bradford County Telegraph, Inc. P.O. Drawer A, Starke, FL 32091-9998 John M. Miller & Madge A. Miller P.O. Drawer A, Starke, FL32091-9998 _ :i:l l S^ fi !^~r I.-.W I , ... . .. - run Nor, e Complyo s Mlalllfid 40rls= Ot aj. I' ;' ,n, au)i iu nJ r 1 ti n-i *. t -r;1 :i< ,i l 'h1 ,' pi oi)iaii)s1 at f *Ifl in W i t to1 ,,'I| I>fots o hi31.li:lC'cI,-.efrD.ii;i21Pcnulll:i) I 1441I' o lais C'w.uod 01.p0 'i'irj 12 l.Ii.' nPuDic'nno 'rruls 0;00'l1el4) oooi uI o(f :wo l i'. Ii'is 11i0)(4fi'i{ BRADFORD COUNTY TELEGRAPH SEPT. 11,2008 __________________ 0114 Oils(LII 1II u ii01 -,lu_ 1" 5850 5475 n~,,354 344 S611 599 -______________ 4348 __36 -0- -0- 0) 14ijii n "1n5313 4906 17 19 4)li 015 oln r li h 20 23 ,ig cO. -0- -0- -0- I 37 42 '1 0.n.isi)Oiciii slr coils ) 5350 4948 S500 527 .i...I. ...... 5850 5475 V 9% 99% ililiInn-slIIcIlorrnlinltsoAQ,,,iuII*o .. ,. i.n- ,-,-.----.- iciu ,, ,n con Ocoer020 1C~ll'Il lois~ i 1400, ~ lll*l~~~ IIII.I.)IYll lllinli( A~$ ~SEPT. 11, 2008 mmnrl ulllrn i ......... I.I I I .I - ---- --- --------------------- -lll~lll NOTICE OF RACIALLY NON-DISCRIMINATORY POLICY FOR STUDENTS r~, "".**-"* -,, .. ,.-<" -""--ma ----- ;-- m '"* rs - ASSELS CHBISTIAN ACADEMY: '02 fW.: Market 5r Stark;. FLia;4 4- ,45. ar studenrts.f a.y. I_~ G pro et moe tha cashback Getdoblecah bck WithReltioshi Rewrdsfro Mecanile ink yo ca ge cas bak wen ou hop.Andjus intim for he oliays fro Noembr Ithrugh eceber31,we'l gie yu D UBL cas bak*-p t 60 CAS BCK o deitcad urhass t unred o sors nd nlnereailrs Jstus yor eranil Bakdbi ad-rewihay for esna hckn ccut-adsar anigD UBEcshbc. Chevron IrOYS)US #Aly5DA0 MERCANTLE, BAN Whateer ittake 4 ti I t r October 9, 2008 TELEGRAPH Page 5A OH NO!! Look Who's The Big Lt 50! Jeffrey, We Love You, Your Family Protected Under 18 U.S.C. 707 Bradford County 4-Hers get familiar with lots of critters, large and small. Preston Stickland is pic- tured at left with a cow to be shown at the fair. Khalifa Barr is pictured at right with his modest catch while on a fishing trip. An epic crisis of global proportions connects the ancient past with the future of planet earth... ARE YOU READ? Episode 4: Good God! Bad World! Why? Episode 5: Echoes of Eternity Episode 6: The Child Born in the Middle East who wmi Change the World Location: L.I.F.E. Ministry Center 204 North Water Street 7' Starke, Fl 32091 The journey begins Oct. 24, 2008 at 7 p.i For more information call 904-964-575 Sponsored by "Hold On To Your F Ministris",'... 111"11 Il1 Happy 16th Birthday Ryan McKeown We Love You Mom, Dad, Logan & MeMal 4,.." III wlt Page 6A TELEGRAPH October 9, 2008 Bradford County Cooperative Extension Director Tim Wilson helps bait a hook for Kristen Hill above. -_ .. . - Canine care and training is entering its second year as a 4-H activity in Bradford County. Pictured above are Lizabeth Davis, Justin Martin, Logan Martin and Alex Wilson, and at left is Courtney Paul with her dog, Roxanne. hBui/ding Our future through 4 q-h Ray Daugherty Land Surveyor, Inc. 405 W. Georgia St., Starke, FL 904 964-6708 / Toll Free 1-800-671-6708 "Serving Union, Bradford, Baker, Clay & Alachua counties since 1992" We Support 4-H! ICS Community B State Bank "For All Your Banking Needs" Established in 1957 STARKE 811 S. Walnut St. (904) 964-7830 LAKE BUTLER 255 SE 6th Street (386) 496-3333 1 GOLD KEY 4 FARM & WESTERN STORE, INC. We Support BRADFORD 4-H CLUBS US-301 N., Starke 964-7871 We Support Our 4-H Clubs! The future is in your hands! 904-964-8061 US Hwy 301 South Starke, FL WE SUPPORT OUR Bradford 4-H Clubs Sales, Service & Installation TEAL TILE ( CARPETONE' FLOOR & HOME Commercial & Residential 904-964-7423 131 North Cherry St. Starke HAYES Electric & Air Conditioning 24-R.ERGiifiiENY C-SmnUt 24-HR. EMERGENCY SERVICE I *~ i 4 1 Master Licensed Lic. #ER-000357S RA 0033644 -Insured Corner of SR 16 and Hwv 301 North Sqana DAILY LUNCH SPECIALS STEAKS BURGERS SEAFOOD and HOME STYLE MEALS Great Food... Great Service For You! KIDS EAT FREE* Tues. Nights 4 p.m.-Close *with adult purchase Hwy 30 I South Starke *(904) 368-3800 ^fI~.l <2SS^I DAVIS EXPRESS, INC. Hwy 301 South, Starke, FL, (904) 964-6619 Congratulations 4-Hers on a job well done! TO OUR 4-H TEAM- FOR A JOB WELL DONE! S "The Undisputed Price Leader"' $ HONOR OUR 4-N.. `s!' ) SAWYER GAS Residential Commercial Agriculture Wendell Davis MANAGER 9449 US-301 S. 352-468-1500 STARKE 1-800-683-1005 MEMBER FDIC Pu VIA- iL-Westrn Wea I rrtrr-, CARPEr ONE'-.a I October 9, 2008 TELEGRAPH Page 7A Above, Markeisha Slocum tends to plants in a recently planted garden. At right, Kashondra McCallum plays ball, and to her right, Victoria Hill plays Santa by helping raise money for the Salvation Army-one of many ways 4-Hers give back to the community. Below kayaking was one of the many ways kids who attended at 4-H's Camp Cherry Lake spent their summer vacation. Roberts Insurance OF STARKE, INC. 986 N. Temple Ave. Starke CHIYSLEI Ainstate ~=bre in good hands. 7utwreA LORI THOMPSON Agent '0 (904)964-7826 'al I -*7 Beck Chevrolet "Your Dealer For Life" 1 North Starke (904) 964-7500 Digital Albums Photography Life, one memory at a time Weddings, family events and on-location photography sessions at your chosen site Call (904) 229-7751 or (904) 964-2913 SR-230 E (2 miles east of US-301) Golf & Country Club 8 Congratulations to all 4-H members for a job well done! ___ We Proudly Support Our 4-f ZamIt B HOME FURNISHINGS CENTER FURNITURE-APPLIANCES FLOOR COVERINGS-HOME ENTERTAINMENT Darren & Pam Summers OWNERS 128 S. Walnut St. Starke 904-964-5289 HELP OUR YOUTH Support 4-H! 0Capital City Bank "Over 100 years of Building financial Relationships" MEMBER FDIC KEYSTONE HEIGHTS 500 Green Way (SR 100 East) ,352.473-4952 Complete Line of Foreign & Domestic Parts THOMAS AUTO PARTS Autolite Plugs Hydraulic Equipment & Supplies Tractor Parts & Supplies 403 S. Temple Ave., Starke 964-5611 T&M TOWING Local & Long Distance Towing Flat-bed & Wheel Lift 403 S. Temple Ave., Starke 96465611 24-Hour Service ; Owners: Doyle and Brenda, Thomas .. Support 444 It's Growing the Future today! Jones-Gallagher Funeral Home HOSPITAL EQUIPMENT MONUMENTS 4 PRENEED PLANS Serving l. I All Joe Gallagher Faiths STARKE KEYSTONE HEIGHTS 904.964-6200 352-473-3176 514 East Nona SR-100 New Life Lawn 1. & Landscape, LLC FOQafity service from thegrounduy. Residential Commercial wl Licensed & Insured Call -Now Saluting 4-H! for Your Fall : --7Clean-Up 1 MOWING TRIMMING EDGING CLEANUP COMPLETE LAWN CARE Email: nevIifedawn&iandscape~embarqmail.com Phone: (904) 964-6166 Cell: (904) 364-8628 Supporting our Local 4-H and all their good work! SJackson Building Supply "Se on e.00 .wima 7r4 Ova 50 ewso " STARKE US-301S 964-6078 LAKE BUTLER 145 SW 6th Ave. 496-3079 Three Cheers For f Our ^ Bradford 4f'ers! " M B (904) 964-9139 Hwy. 301 South P.O. Box 71 Starke, FL 32091 Collision Repair Insurance Claims Foreign & Domestic Mosley Tire Co. *Mechanical repair Muffler Work Customer Towing * Complete Wheel Alignment *Computer Balancing Shop our full line of Cooper ,ires And Other Brands Available! US-301 South Starke 964-6600 SCOTT ROBERTS Owner/Agent 'A kripght U.S. 30 STARKE 350 N. Temple Ave. 904.964-7050 .. / '. - .j 2"696 US Hwy 301 South "Beside Crosley Trailers" Starke, FL ,Everything from mild to w4 i c SIGNS/INTERIOR & EXTERIOR SANDBLASTED/LIGHTED GRAPHICS/TRUCK LETTERING EMBROIDERY/SILK SCREEN :' H1AT TRANSFER/BUSINESS CARDS BANNERS/LOGO DESIGN 19041 964-2275 Email: carlssigns@earthlin.net ...........-- I Iowr" I~ Page 8A TELEGRAPH October 9, 2008 IN THE CIRCUIT COURT OF THE EIGHTH JUDICIAL CIRCUIT, IN AND FOR BRADFORD COUNTY, FLORIDA CIVIL ACTION CASE NO. 04-2007-CA-547 U.S. BANK NATIONAL ASSOCIATION, Plaintiff, vs. SALLIE W. ANDERSON, et al., Defendant(s). NOTICE OF RESCHEDULED N FORECLOSURE SALE NOTICE IS HEREBY GIVEN pursuant to an Order Rescheduling Foreclosure Sale dated 9/22, 2008 and entered in Case No: 04-2007-CA- 547 of the Circuit Court of the Eighth Judicial Circuit in and for Bradford County, Florida wherein U.S. BANK NATIONAL ASSOCIATION, is the Plaintiff and SALLIE W. ANDERSON are the Defendants, I will sell to the highest and best bidder for cash at FRONT HALL OF THE BRADFORD COUNTY COURTHOUSE, 945 NORTH TEMPLEAVENUE, STARKE, FLORIDA 32091 at 11:00 A.M., on the 20'" day of November, 2008, the following described property as set forth in said Final Judgment: LOT 16, THE MEADOW SUBDIVISION, ACCORDING TO PLAT THEREOF RECORDED IN PLAT BOOK 3, PAGE 61 OF THE PUBLIC RECORDS OF BRADFORD COUNTY, FLORIDA. A/KA/ 1035 MEADOWS DRIVE, STARKE,, FL 32091 Any person claiming an interest in the surplus from the sale, if any, other than the property owner as of the date of the Lis Pendens must file a claim within sixty (60) days after the sale. WITNESS MY HAND and the seal of this Court on 9/23/2008. Ray Norman Clerk of the Circuit Court By: Carol Wiliams, Deputy Clerk Florida Default Law Group, P.L. P.O. Box 25018 Tampa, Florida 33622-501866-6280 within 2 working days of your receipt of this notice; if you are hearing or voice impaired, call 1-800-855-8771. 10/2 2tchg 10/9-BCT PUBLIC AUCTION Ron Denmark Mini Storage will hold a Public Auction on Friday, October 17, 2008, at 10:00 a.m. at 2117 N. Temple Avenue, Starke, FL on the following storage units containing personal items: #28 & 99 D. CLAY #57 L. SIMMONS #78 M.OSTEEN #165 J. CHANDLER 10/2 2tchg 10/09-BCT NOTICE OF ENACTMENT OF ORDINANCE BY THE CITY COMMISSION OF THE CITY OF STARKE, FLORIDA NOTIgj.S 'HEREBY GIVEN that the ordinance, which title hereinafter appears, will be considered for enactment by the City Commission of the City of Starke, Florida, hereinafter referred to as the City Commission, at a public hearing on October 21, 2008 at 7:00 p.m., or as soon thereafter as the matter can be heard, in the City Commission Meeting Rooni, City Hall, located at 209 North Thompson Street, Starke, Florida. Copies of said ordinance may be inspected by any member of the public at the Office of the City Clerk, City Hall, located at 209 North Thompson Street, Starkej Florida, during regular business hours. On the date, time and place first above mentioned, all interested parties may appear and be heard with respect to the ordinance. ORDINANCE NO. 2008-0600 AN ORDINANCE OF THE CITY OF STARKE, FLORIDA, AMENDING THE ZONING MAP OF THE CITY OF STARKE LAND DEVELOPMENT CODE; RELATING TO THE REZONING OF LESS THAN TEN CONTIGUOUS ACRES OF LAND, PURSUANTTO ANAPPLICATION, Z 08-16, BY THE PROPERTY OWNER OF SAID ACREAGE; PROVIDING FOR REZONING FROM SINGLE FAMILY, MEDIUM DENSITY (R-1C) TO MULTI-FAMILY RESIDENTIAL DISTRICT (R-2 TIE 'CPTY 'OF STtRKPIE FLORIDA LAND 'DEVELOPMENT CODE '.'Y THE BOARD OF ADJUSTMENT OF THE 'CiTY 'OF STARKE, ::1l7~1,'\ NOTICE IS 'HEREBY '." 'Frn 'tl!ii pursuant 'to 'the 'City I v.l- 'i.ynr 'Devdeapmetht'Code, as .'nd.inP", 'heretihafter "referred 'tb as It'-L )Lnr 'Developmtent lt egtildtions, l'.'.~ l .' e 'rreblmlhtlehriddtibhs ahad S..mnTtri 'cbheCefhih 'va rianca, .d 'yesdibe' blOW, 'Wltlb b'heard' by j., ,'i Ai~ijustmn b t'dtf'thl 'City, Sttiake,' Flridba, at a Oubl c'hetarihb on'Obct'brir 23 2bbti Ai'tWbb' :iW.,B~ de Gihereltdr bs'ihe'hfti6ter'cb NWh','Par.,4f 1'..- h be lb i od .. r opt mb"IMA1te, ~~;be ranted as provided for in Section -47 A. 1-13 of the City of Starke Land Development Code to allow a Variance from Section 6.36.1 ground sign from allowed 32 sq ft to requested 72 sq ft. A parcel of land lying within Section 33, Township 6 South, Range 22 East, in the City o Starke, Bradford County, Florida. Being more particularly described, as follows: Parcel Number: 04438-0-00 October 23, 2008 at 6:00 p.m., or as soon thereafter as the matter can be heard, In the County Commission Meeting Room, North Wing, of the Bradford County Courthouse located at 945 North Temple Avenue, Starke, Florida. V-08-7, a petition by CB Sign Service, Inc and Patricia & Robert Mott as agents for McDonald's to request a Variance be granted as provided for in Section 3-47 A. 1-13 of the City of Starke Land Development Code to allow a Variance from Section 6-36.9 from allowed one (1) menu board sign to requested two (2) menu board signs and from allowed 40 sq. ft. to requested 87.4 sq. ft. and from one (1) directional sign to four (4) directional signs. A parcel of land lying within Section 33, Township 6 Sputh, Range 22 East, in the City of Starke, Bradford County, Florida. Being more particularly described, as follows: Parcel Number: 04438-0-00400 LEGAL NOTICE The Board of County Commissioners for Alachua and Bradford Counties will hold a Dual-County Consortium meeting on October 16, 2006 at 1:00 p.m. at the office of Focused Management Solutions/FloridaWorks, 4800 S.W. 130" Street, Gainesville, FL. Please call Celia Chapman at (352) 244-5148 with questions. 10/9 ltchg-BCT LEGAL NOTICE The First Jobs First Wages Committee of FloridaWorks will home a meeting on Thursday, October 16, 2008, at 2:00 p.m. at the Santa Fe College, Center for Innovation and Economic Development, 530 W. University Ave., Gainesville, FL 32601. Please contact Radha Selvester at 352-244- 5148 with questions. 10/9 Itchg-BCT LEGAL NOTICE The High Skills/High Wages Committee of FloridaWorks will hold a' meeting on Tuesday, October 14'" at 1:00 p.m. at Gainesville Job Corps Center, 5301 N.E. 40'" Terrace, Gainesville, FL 32409. Contact Celia Chapman, 352-244-5148. 10/9 1 tchg-BCT NOTICE OF SALE Pursuant to F S. 718.585, each of ,you are hereby notified the following 'vehicles will be sold at public sale. You may redeem said vehicles by payment ,of monies owed plus accumulated storagecharges or ih accordance with ,provisions of F;S. 559.917. Proper I.D. required. The owner ,or .any person claiming a lien/interest'has-a right to.a 'hearingipriortothe sale-date1by filing demahtd 'withhe 'Clerk of ;the .Circuit 'Court. Ahy proceeds remaining from 'the sale 't)f the motor 'vehicle After ipttay fiH t 'of thought ,claimed ,will hbe 'ilepbslted'With ',th(Ie'Clerkof 'the Court brOr ,i ,ip4t;tinh 'Ain,- r-n11.- r.r, rA.lI lbe'q larJ ;hprr. ,nre,r-nvp rl r, '1r/Il08 'I(tP6f, HampIr.n A\ ,r- '.irki- I:L. .-t ": 50 ,ic r, ir,ir,.-. ilw r.tiri Sections 163.3161 through 163.3215, Florida Statutes, as amended 081003 A, an application by the City Commission,. to amend the Future Land Use Plan Map of the Comprehensive Plan to change the future land use classification from MEDIUM DENSITY, RESIDENTIAL (more than 2 and less than or equal to 8 dwelling units per acre) to COMMERCIAL on property described, as follows: A parcel of land lying within Section 28, Township 6 South, Range 22 East, Bradford County, Florida. Being more particularly described, as follows: Bradford County-City of Starke Zoning Department located at 945 North Temple Avenue, North Wing, Starke, AN AMENDMENT TO THE CITY OF STARKE LAND DEVELOPMENT CODE BY THE PLANNING AND ZONING BOARD OF STARKE, FLORIDA, SERVING ALSO AS THE LOCAL PLANNING AGENCY OF THE CITY OF STARKE, FLORIDA, NOTICE IS HEREBY GIVEN that, pursuant the City of Starke Land Development Code, hereinafter referred to as the Land Development Code 08-17 an application by the City Commission, to amend the Zoning Map of the Land Development Code to change the zoning district from SINGLE FAMILY, MEDIUM DENSITY (R-1C) to COMMUNITY COMMERCIAL (B-2) on property described, as follows: A parcel of land lying within Section 28, Township 6 South, Range 22 East, From aff of usat WESTERN STEER FAMILY STEAKHOUSE US 301 S,, StarkeF 964-8061 St. Mark's-'-:-- Episecopal Chureh C~ w. .Lett W,4 W 7 Sunday Worship. 11:00.am Children's C-nurch:11.D01 arn ".5 21:! N. I1hii6iti SiieiSiarJ, 1 14 Lt6 -3"( tllen 21vple -Sta;4) ke,-ke, lL43 9l R4 (9Aji Bradford County, Florida. Being more particularly described, as follows: IN THE CIRCUIT COURT OF THE 8T JUDICIAL CIRCUIT, IN AND FOR BRADFORD COUNTY, FLORIDA CIVIL DIVISION CASE NO.: 04-2008-CA-000496 DEUTSCHE BANK NATIONAL TRUST COMPANY AS TRUSTEE UNDER POOLING AND SERVICING AGREEMENT DATED AS OF FEBRUARY 1, 2007 SECURITIZED ASSET BACKED RECEIVABLES LLC TRUST 2007-NC2 MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2007-NC2, Plaintiff, vs. JEFFREY DURRANCE A/K/A/ JEFFREY E. DURRANCE, et al, Defendants. NOTICE OF ACTION TO: UNKNOWN SPOUSE OF ELAINE H. DURRANCE LAST KNOWN ADDRESS: 8001 CAROLINA LANE, ORLANDO, FL 32825 CURRENT RESIDENCE UNKNOWN YOU ARE NOTIFIED that an action for Foreclosure of Mortgage on the following described property: Lot 24 of an Unrecorded.Map of LAKE SAMPSON VILLAS, as surveyed by Joseph G. Knapp, Registered Land, Surveyor, being more particularly described as: A parcel of land situated in FRACTIONAL SECTIONS 3 and 4 of TOWNSHIP 7 SOUTH. RANGE 21 EAST, Bradford County, Florida, described as follows: Commence at a concrete monument at the intersection of the Northerly right of way line of the Seaboard Coast Line Railroad right of way line with the East line of said Section 4 and run North 00027'29" West, along said East line 281.57 feet to the Northerly right of way line of Edmonds Drive; thence run North 71010'56" West, along the Northerly right of way line of said Edmonds Drive, 10.98 feet to the Point of Beginning; thence continue North 71*18'56" West, along said Northerly right of way line, 100 feet; thence run North 26057'03" East, 395.68 feet to the waters of Lake Sampson; thence run South 29017'58" East, along said waters, 120.00 feet to the point on a line bearing North 2604040" East from the Pointof Beginning. Thence run South 26040'40 West, 312.53 feet to the Point of Beginning. Also any lands between the above described lot and the waters of Lake Sampson. has been filed against you and you are required to serve a copy of your written defenses, if any, to it on Marshall C. Watson, P.A., Attorney for Plaintiff, whose address is 1800 NW 49"' Street, Suite 120, Fort Lauderdale, FL 33309, on or before November 09, 2008,. Persons with Disabilities requesting reasonable accommodation to participate In this proceeding should Suburban Carpet Cleaners Professional Carpet & Upholstery Cleoning "FOR IHOSE WHO 4NStON THE BEST" DAVID HAMILTON 964-1800 or 1-800-714-1184 Come worship with us STARKE SEVENTH DAY ADVENTIST CHURCH Churict saturday ,3D a.m. Sdiol Saturday :Il:45 am. Hid-w.wwk y Tueda. 7 3y r.nL V55 'Triee Ser'icr e F[omotnl k dl.t-IRI~ht Itfimnminu.gr-tm lpnwge ai,,4wlo Oma.- itara- EDTARLING tM Bll I 2W5{U36(~at7 contact the ADA Coordinator at (904) 374-3639 Voice/TDD or Via Florida Relay Service at 800-955-8771 at 945 N. Temple Avenue, Room 137, Starke, FL 32091. WITNESS my hand and the seal of this Court on this 6" day of October, 2008. RAY NORMAN Clerk of the Court By: Carol Williams Deputy Clerk 10/9 2tchg 10/16-BCT Meet the candidates at the market The community feel of the old market square will be rec- reated when candidates come to the Bradford Farmers Mar- ket to meet and greet voters. Come to the market this Satur- day, Oct. 11, to learn more about the candidates running for office. Healthy Start staff will also be available with information to help you keep your child safe. Come to the Bradford Farmers Market to buy wholesome pro-. duce, honey, eggs and more- plus get tips on child safety. * What's in: sweet potatoes, turnips "with" greens attached, lemons, fall's tomato crop and much more. The Bradford Farm- ers Market features only fresh, locally grown, locally baked and locally made products. Come support the local econ- omy, save gasoline and have fun seeing your friends and neighbors at the market every Saturday from 8 until noon, October through June, at the Bradford Health Department on, U.S. 301 North between Beck Chevrolet and the Bradford Mo- tel. (Follow the yellow signs.) For more information on the market or becoming a vendor, visit ww.brad- fordfarmers market.com. Bradford Dems meet twice this month With the general election less than a month away the Brad- ford County Democratic Ex- ecutive Committee will hold an extra meeting in October. That meeting will be held Monday, Oct. -'13) ;'adid the; regular monthly meeting is scheduled for Oct. 27. Both meetings are at 7 p.m. in the Andrews Center Boardroom. Items on the agenda include the upcoming Candidates' Fo- rum, to be held Oct. 20, and the general election. All interested Democrats are invited to attend. No regular meeting will be held in November as the reor- ganizational meeting will be held on Dec. 1. At that time officers for the next four years will be elected. Only those pre- cinct committeemen and com- mitteewomen who qualified in July are eligible to vote or to be nominated for an office. The Bradford DEC hosted a picnic at the Pleasant Grove park last weekend. Pictures of events and information about candidates can be seen on the First United Methodist Church iillli'T"imFI mti Fnm (904) 964-6864 830 & 11 a.m. Trad. Worship 9:45 am. Contemp. Worship DEMR -URNTR JACKSON 3U1LDI!NGSP' Wbere QuAIky SeNlke awe a Famfily Ali samy, nUc 1 'E."~l'l 075' up6R Bradford DEC Web site at bradfordcountydemocrats.org For information about be- ing a precinct representa- tive contact DEC Chair Judy Becker at (9040 782-3502. Hardy honored upon retirement Bradford High School will be honoring Don Hardy for hig 30 years of service as chorus director on Wednesday, Oct. 15,and would like to invite the community to a reception for him at the BHS Media Center from 2:15 to 3:15. For more information, please call BHS at (904) 966-6092. What you need to know about breast cancer A free community educa- tion program to discover the many resources available to help with the detection and pre- vention of breast cancer will be presented at Shands AGH on Saturday, Oct. 18, beginning at 1 p.m. Lunch will be provided. The hospital is located at 801 S.W. Second Ave. in Gainesville, and the program will take place in the first-floor, east cafeteria. RSVP by calling (352) 265-0943. The program is provided by the North Central Florida Oncology Nursing Society. Pleasant Grove meets Oct. 20 The Pleasant Grove Action Group will have its regular month- ly meeting on Monday, Oct. 20, at 7 p.m. in the annex of the Pleasant Grove United Methodist Church. Everyone is invited to attend. FFA raising money for teen trip The Bradford County FFA chapter is raising funds to send six students to the-Nitional FFA Convention in Indliaiapolis, Ind. According to its mission statement, FFA makes a posi- tive difference in the lives of students by developing their potential for leadership, per- sonal growth and career success through agricultural education. While at the convention with more than 50,000 other FFA members from around the coun- try, these six Bradford students will participate in leadership de- velopment workshops and learn from motivational speakers like Olympic gold medalist Dana Hee. The cost is $800 per stu- dent, which covers all food and travel expenses. And donation is appreciated. Contact Walt Westcott thought the Bradford- Union Area Career Techni- cal Center at (904) 966-6764. 9% ierLfe CliurchoJGod t so O k*" -: 2225 N. Tempth? Ave., 5Iz~rI~ 9644355 Jones~allagher Funera lome lir-r Cwr 00 I(Mh Jo. Gallagher- Owner sla" 8442po Keystone l ethts 473-a176 DOUGLAS BATTERY, OF STARKE Auto m maiines wlye fltteries 481DB E. Tale 9.64-rnl C~~~~~iu~~ S~tas BIaomkB~ !IsurhukeEirttlpukr~4-Ml~ Worship in the Mause of the Cord... Soamehere this week! The churches and businesses listed below urge you to attend the church of your choice! ~ IjIl j:)U"P;3WM I -.. ---.;;; _I I i PM 177977 October 9, 2008 TELEGRAPH Page 9A Southside Terrific Kids announced Church Nfews n Brooker BRapti t Churchl ill CCliCl 11.110Ill' i ]Inoi i ll c i 11ini u1lid..1 . OCK 12. ili ihe Re\ G.r'" cl iiin .i i ie -i pe.ikcil lie Ch l Ii11 111i 111 .ill ot II k11 Olll r imelmbers to Il.t, lello>>4,hi. and1 have a gieat mieal tollow\ing the morning worship service. Bethel Baptist Church, C.R. 230A in Starke. will celebrate homecoming Sunday, Oct. 12, beginning with a morning message from Director of Missions Dr. Jerry Gesell at 9:45 a.m. Music from New Beginning will follow at 11 a.m., and dinner on the grounds will be served at 12:30 p.m. Join the church in praise and worship as it celebrates its founding. Evergreen Baptist Church, 8025 N.W. C.R. 125 in Lawtey, will host is .Fall Spectacular Friday, Oct. 10, and Sunday, Oct. 12. Brother Doug McCart will provide Friday night comedy, Sunday morning worship, and a magical performance Sunday night. He will be joined by ventriloquist Greta McCart and Skip. Dinner will begin at 6:30 p.m. Friday night, with the program to follow at 7. Worship begins Sunday morning at 10:45 a.m. and Sunday evening at 6 p.m. with food and fellowship to follow the program. Beulah Baptist Church, 4579 S.R. 21 in Middleburg, will Driver safety program schedule announced AARP is offering its driver safety program monthly classes at a cost of $10. There are no tests. The two-day, four-hour classroom instruction refines driving skills and develops defensive driv- ing techniques. The three-year certificate qualifies graduates for an auto insurance discount. Gainesville, class,'dates will, be Oct. 14-15 ,fom-noon to 4,. p.m.; Oct. 28-29 from 9 a.m. to 1 p.m.; Nov. 6-7 and Nov. 17-18 from 9 a.m. to 1 p.m. For more information and to register, call (352) 333-3036. Vote in Honor of a Veteran Supervisor of Elections Terry Vaughan's Vote in Honor of a Vet- tran program exists to encourage voter participation and remind everyone of the sacrifices vet- erans of the Armed Forces have made to ensure a free and demo- cratic society for Americans. Veterans, their family mem- bers and friends may submit a photograph and complete a short biography of the vet they wish to honor at the supervisor of elections office. A scanned copy of that photograph will ap- pear on the Wall of Honor out- side the elections office, and in return, the person will receive a Vote in Honor of a Vet pin to wear that will encourage others to exercise their right to vote. lild ., Ceineclcr) HcilIa e [.\ S.110ld.1 ()' I I \ I'll the rold BIuLI. Cemieern in Caimp Bl.iiidin 1 'Iil menlbci-. tof the ltircli MNect .i1 the church on S R. 21 at S 45 a n The group m\ill continue to the cemetery , spend time there, and return to the church at 11:30 a.m. Lunch and fellowship will be enjoyed. Bring a covered dish. For more information, call Carolyn Weeks, (904) 529-9661. Bayless Highway Baptist Church, 11798 N.W. C.R. 225 in Starke, will host a Lay Renewal Weekend Oct. 10-12. Come enjoy good meals and fellowship with members of other churches. Please call (904) 964-6340 for more information. Love Grows-v Pentecostal Temple, 6947 N.W. C.R. 229, will host a family and friends service on Saturday, Oct. 18, at 5 p.m. Come enjoy a time of fellowship through song, spiritual psalms, and praise and worship. Grace United Methodist Church of Lawtey will celebrate its 119'h homecoming year on Sunday, Oct. 19. A potluck dinner will follow the 11 a.m. sermon of Pastor Al Brock. Join the congregation in worship and reflection on the church's longevity and vitality in the community. For more information, call (904) 966-6266, or visit Traditional Latin mass offered on the last Sunday of each month in Starke. Please call (904) 964- 4444 (Monday-Friday) for times and location. New Covenant Baptist Ministries, 863 E. Brownlee St. in Starke, will celebrate Pastor and Sister Isaac Brantley's third appreciation and sixth year with the church beginning, Sunday, Oct. 19, at 4 p.m. with the Rev. Charles Williams and New Hope of Williston. On Sunday, Oct. 26, at 11 a.m. the Rev. Jack Hawthorne and Cathedral of Faith of Pensacola will lead the service, followed by the Rev. James N. Wilcox and Ebenezer Baptist of Starke at 4 p.m. First Assembly of God of Keystone Heights, 8025 S.R. 100, will host its Third Annual Turkey Shoot Nov. 14-15 and 21-22. For more information, contact (352) 473-3432. E-mail the details of your congregation's upcoming events to editor@bctelegraph. com. Deadline is Monday at 5 p.m.. S a Works AlIachua/Bradtord A Community Partnrsrhipp.... GENESIS CHRISTIAN ACADEMY OPEN ENROLLMENT for the 2008-09 School Year K thru 12 We use the Ace Curriculum We accept the AMcKay & Hero Scholarships 386-496-2515 Located SR 121 Worthington on in Springs IMake a house your home. Conventional/FHA/VA IAffordable Housing I Land Loans Construction/Permnanent Financing I Refinancing SAdjustable & Fixed Rate I USDA Rural Housing I Interest Only O Capital Cit i Denise Ariale Norman Kropp Bank i:386.418.6015 352.338.6166 3.616 WfXHH^^ ^S Kiwanis Terrific Kids at Southside Elementary School are (front-back, I-r) Raynique Caines, Makalla Taylor, Connor Nugent, Logan Andrews, Alexa Smith, Cameron Raymond, Latrell Highsmith, Jordan Hill, Mason Kent, Julia Casey, Terry Spaulding, Sophie Davis, Jordan Rowe, Dasaray Steele, Thelma Tenly, Sean Greenough, Shelby Wilkinson, Joe Gorden, Maryellen Farrell, Sylvia Toms, Tessa Ricker, Amya Hill, Carson Elder, Nadine Black, Tara Pruitt, Garrett Huggins and Shane Griffis. Not pictured: Joseph Griffis. Teacher of the Month is Robin Frazer. COME JOIN EVERGREEN BAPTIST CHURCH IN OUR "FALL SPECTACULAR" -" Brother Doug McCart will provide Friday night comedy and a magical performance. Sunday S morning worship and a magical performance on Sunday night. He will be joined by Greta McCart and Skip for a ventriloquist performance. FRIDAY. OCT. 10, 2008 DINNER 6:30 PM PROGRAM BEGINS AT 7:00 PM SUNDAY. OCT. 12, 2008 10:45 AM- MORNING WORSHIP 6:00 PM EVENING PROGRAM FOOD& FELLOWSHIPAFTER'THE PROGRAM EVERGREEN BAPTIST CHURCH 8025 N.W. CR-1 25 SLawtey, FL 32058 904-782-3717 I- Business & Service Directory- UI. Building Supply SJackson BUILDING SUPPLY "Where Quality & Service are a Family Tradition" US 301 S. STARKE 964-6078 145 SW 6TH AVE LAKE BUTLER 496-3079 landyaenpserices z Mike's Handyman Services *Carpentry ", . SPainting SPlumbing *', p SElectrical * Mobile Home Repair * And Much More! Home (352) 473- 5 Cell (352) 745-0614 F Michael Horne Servtng the Lake Region Caterdg Service BERTIE Heating & Air Conditioning, Inc. 352331-2005 Prevenative Maintenance S Pays... Schedule your Summer Air. Conditioning and Check! 1730 NE 23rd Ave Gainesville, FL 14W My Dentist. Gregory Allen, D.M.D. P. James C. Brummett, D.M Cosmetic, Restorativ and General Dentist 255 SW Main Blvc Lake City, FL 320; 386-752-248 Parkers Painting Custom Work Painting A. a' .D. re, 7 ry d. i 'i 25 I - At 0 , Over 'Oyrs c exp :' ** FREE ESTIMATES *** *,Color Matching S*Cabinet Glazing 'Minor Sheetrock Repair *Pressure Washing i0 *and Much Morel REAT IPEAS FOK YOUR HOME... CALL US TOPAYI Timothy & Elisa Paiker, 3 2-481-0782 ll "L osSPCEAAIABE " 0 7Es WEGH!orA i, II Y ~ .:? ':I , I - I october 9, 2008 Page 10, Classified Ads SRead our Classifieds on the - r, World Wide Web S Where one call does it all (9041964-6305 *(3521473-2210 *386) 496-2261 - -- -- -i :TrnCounty Classifieds Bradford Union Clay 40 Notice 41 Vehicles Accessories 42 Motor Vehicles 43 RV's & Campers 44 Boats 45 Land for Sale 46 Real Estate Out of Area 47 Commercial Property Rent, Lease, Sale 48 Homes for Sale 49 Mobile Homes for Sale 50 For Rent Reach over 20,500 Readers Every Week! INDEX Laqd ,dded'to all billing to cover postage and handling. All ads placed by phone are riad back to the.advertiser at the time of placement.. However, the classified stzff cannot be held responsible for mistakes ip classified advertising taken by phone. The newspaper reserves the right to correctly classify arid edit all copy or to reject or cancel any'. advertisementsot any time. Only standard abbrev. For Sale in a down Real Estate Market:.. It may take a little longer to find a buyer..: Hang in and something good will happen! Our Classified Gets Actionl In Melrose, Starke, Keystone, Lawtey, Lake Butler, Raiford, Hampton, Brooker, Graham, Lulu, and f even Dukes! \. all Todayl C04-964-6305 386-496-2261 352-473-2210 42 Motor Vehicles 2000 PETERBILT MODEL 379, $45K. Owner fi- nancing. Call Anthony at 904-964-7537. '03 ECHO TOYOTA 100K MILES, GOOD CONDI- TION. 36mpg, 4dr, 352- 468-2704. '83 FORD RANGER 2.0 4CYL 4SP Runs, needs slave cylinder, $650 OBO. '89 AeroStar van runs, needs transmission, $500 OBO. Call 904- 364-3678. '94 F150 XLT 300, 6CYL, AUTOMATIC, long bed, little rust, low miles, like new, $2,500 OBO. '91 Chevy pick up 350 au- tomatic, has some new parts. $2,000 OBO. Call 904-364-3678. 43 RVs and Campers 2004 32' CEDAR CREEK FIFTH WHEEL 2 slides, rear kitchen and lots of storage. Excellent condi- tion, $18,500. Call 904- 219-9. ROOMS FOR RENT Economy Inn Lawtey, FL Low Daily & Weekly Rates Daily Rm Service Microwave CablelHBO Refrigerator. Local Phone (904) 782-3332 EXTRA CASHiN We specialize in helping I people sell throughout. I Classifieds' *YARDSAiS*AlUTOS *BOATS-* COTHES *APPLUAlCES- Th llstfgis OIL Call Mdlisa Today 904-964-6305 Commercial Property (Rent, Lease, Sale), SQ FT. Bradford Indus- trial Park. $1,000 for each bay. Smith & Smith Realty, 904-964-9222.. I No Job to Small Over 30 Years Experience P.O. Box 183 Lawtey, FL. 32058 SPerry Nicula Cell 904-364-7451 Len Eaves Cell 352-745-0650 ER-13013402 Emrail eavesl@windstream.net 49 Mobile Homes for Sale MACCLENNY LAND HOME PACKAGE New 1579sq ft 3/2 with deluxe kitchen appliances, island, lots of cabinets, formal dining and more on 1.5 shaded acres on the St. Mary's River. Was $135K, re- duced to $120K. Call 904-259-8028. 6RAND NEW 1369 SQ FT 3/2 -DELIVERED, set-up, A/C, skirting and steps all installed. $52K, call 904- 259-8028. BRAND NEW 4/2, 2280 SQ FT Delivered, set-up, A/C, skirting and steps all installed, $69,400. Call 904-259-8028. BRAND NEW 4/2, 1560 SQ. RENTTOOWN, PAYMENTS FROM $385/MTH. For details, call Hidden Oaks Mobile Home Park, 386- 496-8111. DOUBLEWIDE MOBILE HOME 3/2, $5K OBO. Outside in good shape, inside needs work. Must move. Call 352-468-, 3238. fees included. Call Bruce or Lynn at 386-344-3908. NO MONEY DOWN! 100% FINANCING forveterans. VAfinancing and 100% for land owners. FHA loans. Call 352-378-2453, Bruce -- BATHROOM EMODELING + MORE HANDYMAN SERVICES' Complete bathroom remodeling, Including wall an floor tilework.T'ub a'nd shower conves.i.ons \ remodeling. Fr kt d bh to exterior repis, wall-floor-tle work, built-in shower seating. References Available Lic. #202105 U j CALL STEVE 904-465-0078 or 352-468-2515 S1/1 Mobile Home w/lake access $450/mo & security. * 2/1 Cottage on Lake Geneva. $595/mo & security. * 1/1 Home on Brooklyn Lake $600/mo & security. S1/1 Apartment including all utilities - unfumished in Melrose area $650/mo & security * 3/2 Mi in Hampton $675/mo.& security. * 3/2 Home in Melrose, Clay County $850/mo & Security. * 3/1.5 Home in Keystone $900/mo & security * 2/1 Cottage in /Earleton $925/mo & security. * 4/2.5 Home on Bedford Lake $950/mo & security * 3/2 Home on Lake-a-wana $995/mo & security * 2/2 Home on Swisher Lake $1,100/mo & security. *4/3 on Lake Santa Fe $1,500/mo & security. -II .~:` i- u . ' t-.i$ 49678 Devils Den Road: 3BD/2BA, DWMH 1433 sq.ft. $720/month 6634 Brooklyn Bay Road: 2BD/2BA, Brick Home 1986 sq.ft. $995/month 6159 Hunter Ave.: 3BD/ 2BA, DWMH 1152 sq.ft. $720/month 160 Si .suma St. 3BD/ 1.5BA, Block Home 1478 sq.ft. $820/month BRADFORU ST., STARKE 3/2 CLOSE TO STARKE SCHOOLS. New heat pump, new windows, carpet and wood floors. Family safe neighbor- hood. Big, open back yard for privacy. First, last and deposit. $750 each, references required. Call 814-257-9825. STARKE 4/2 $850/MTH PLUS $900 DEPOSIT. Service animals only. Call 352-473-8055.255. STARKE AREA- 3/2 LAKE- HOUSE Very modern, clean, CH/A, secluded. Many amenities. $1,100/ mth, call 904-964-4005. HOUSE FOR RENT 3/1.5 ON 3 ACRES. Hwy 16 NW. $950/mth, first, last and $950/dep. Call 904- 233-6717. 1/1 WITH DEN, KITCHEN AND ELECTRIC A/C, cable TV, front and side porch. $600/mth, call 904-759-5873. '80 SINGLEWIDE IN KEY- STONE, 2/2 ON WATER (Deer Springs Lake). $695/mth plus deposit. Call 352-473-2252. FISHING AND SWIMMING IN PRIVATE BACK YARD park area. 3/1.5 house with CH/A and full wall brick fireplace. Outbde yard maintenance, wa- ter and septic, included. $700/mth, first, last and security. Call 352-475- 3440. WORTHINGTON SPRINGS 3/1 WITH HEAT AND AIR, stove and refrigera- for furnished. $575/mth, $400/dep. Call 386-496- 3253. 3/2 HOME FOR RENT - $800/MTH. Call 352-745- 1212, Broker owner. DOUBLEWIDE MOBILE HOME FOR RENT- Key- stone Heights. Newer 3/2 beautiful DW on large 1/3 acre lot with new carpet, fully equipped kitchen, washer/dryer hook-up. $650/mth plus deposit. Call 904-571-4264. SMALL APARTMENT FOR RENT 1/1 for one or two people, partially fur- nishdd, electric and TV furnished. $550/mthplus security deposit of $450. Call 352-473-8912. 51 Lost/Found FOUND BIKE GASOLINE ROAD AREA. Call 352- 473-7610, ask for Kenny. 52 Animals & Pets DOG TAGS DOG TAGS - DOG TAGSI Buy them at the Office Shop in Starke or Lynn at Gene, Jim and Roy's Westgate Homes. 50 years in business. ATTENTION QUALITY HOME BUYERS. Homes of Merit, Town Homes, Live Oak hPmes. Do not buy any of the above. 50 For Rent HAMPTON LAKE AREA 2/2 MOBILE HOME. $500/ mth plus deposit. Call 352-473-8981. FOR LEASE (OR SALE) KEYSTONE HEIGHTS MOBILE HOME 2/1 on one acre fenced lot, paved road. Close to town. First, last and se- curity. $500/mth, call 352-475-3094. TRAILER LOT FOR RENT -UNDER SHADE TREES in country. Lots of space, service animals only. Utilities included. Call 352-468-2684. SMALL TRAILER FOR RENT IN COUNTRY. Utilities included, call 352- 468-2684. FURNISHED ROOMS FOR RENT! COMPLETE with CH/A, cable provided, all utilities paid! Central loca- tion. 10%/6. WE HAVE 2 OR 3 bedroom MH, clean, dose to prison. Call 352-468-1323. SPECIAL RENTAL 2 & 3 BR OR LAKEFRONT 2 $525/mth plus electric. Also, studio apartment, utilities included. $400/ mth. Both first and secu- rity. Call 352-473-2919. 2/2 FOR RENT SERVICE ANIMALS ONLY, NO SMOKING, credit report required. $950/mth plus security. 525 Hebron Ave., Park of the Palms, Keystone Heights. Call 352-235-1586. 2/1 HOUSE WITH FENCED YARD AND A/C on St. Clair St. $450/mth plus deposit and security. Ser- vice animals only. Call Joan at 904-964-4303. LEASE OR RENT TO OWN CLEAN 2/1 SWMH on 75'x120' fenced lot close to shopping in Starke. Safe, quiet "all houses" neighborhood. $550/mth plus deposit. Senior dis- count. Consider small pet. Call 352-473-5214. 3/2 SINGLEWIDE MOBILE HOME ON GRIFFIS LOOP CH/A, quiet area. $485/mth plus deposit. Service animals only. Call 352-284-3310. 2/1 SINGLEWIDE MOBILE HOME MILES FROM LAKE BUTLER, 10 miles to Starke. $300/dep, $500/mth. Call 904-284- 9223 or 904-305-8287. COVE APARTMENTS 1/1 FOR RENT. Call for de- tails, 904-891-6779. 3/2 AND 2/1 MOBILE HOMES GRAHAM AREA. Service animals only, no smoking. Call 352-468-2544. 2/1.5 WITH FRONT SCREEN PORCH AND UTILITY ROOM. $525/ mth, many extras, senior discount. Call 904-964- 8218. 2/1 WITH CH/A, VERY NICE, ONE MILE from Super WalMart.ir Starke. Call 386-562-3408. LARGE 3/2 DOUBLEWIDE WITH STOVE, REFRIG- ERATOR and dishwasher on large lot. 107 Camp- bells Lane, downtown Melrose. $650/mth plus $600/dep. Call 352-475- 5533 or 352-226-9220. 4/2 COUNTRY HOME - SOME PASTURE. Lo- cated in Providence/ Worthington Springs area. CH/A, $925/mth. Call 386-496-2354. 2BR MOBILE HOME WITH SCREENED PORCH, nice lot and storage build- ing. 12 miles west of Starke, near prison, Rai- ford, Hwy 121. At Hwy 16W and NE 239th Place. Call 386-431-1200. 3/2 MOBILE HOME FOR RENT ON 2.5 ACRES. $700/mth plus security deposit. In Lawtey. Call 904-894-2552. STARKE 2/1 SINGLEWIDE MOBILE HOME, CH/A. $450/mth plus deposit. Call 352-235-6319. EFFICIENCY FOR RENT $450/MTH INCLUDES UTILITIES. Also 1/1, $375/mth plus utilities. S. Thompson St. First month rent, call 904-563- 5410. Offie: 904-966-065 Cell 904-364-8733 itil 16418 SW 66th Lane Starke, FL 32091 Bgto seven yo!l Small enough to know youl Lori Muse Born and raised in Bradford County 04 GMC EXT CAB SIT s9,880 05 GMC CANYON CREW CM 9,9 04 CHEVY S10 4X4. SO0,980 05 TOYOTA TACOMA TRD_ 1S8,98 06 CHEVY CREW CAB 44 820,880 mm, = Im SALE PRICE INCLUDES DEALER FEE PLUS TAX, TAG & TITLE. VEHICLES SUBJECT TO PRIOR SALE. DEALER NOT RESPONSIBLE FOR TYPOGRAPHICAL ERRORS. ALL PRE-OWNED SALE RIcES ARE LESS $4000 CASH OR TRADE EQUITY. OFFER GOOD THROUGH 1030O. SEE DEALER FOR DETAILS. -'- -800-397-6874 ' 6765 Womans Club Rd.':" 5BD/3.5BA, Block Home 2464 sq.ft. $920/month 6874 Deer Springs , Road: 2BD/2BA, A- Frame lake home 1064 sq.ft. $900/month 931 Euglid St.: 2BDI/1B "' Hore 644 sq.ft. $550/month. Avail. 1'1 .': 7995 Floral Ridge Circle: 2BD/2BA, SWMH $650/month Smith & Smith Realty Sheila Daugherty, "-- Realtor ..... S ......................................... $106,000 * 1.25 Acres ( 10 NE. 12th Ave & 171st Street. ... ... ...............$.. 18,000 * 2 Wooded Acres Just OffGriffis Loop ...............................REDUCED $29,950 * Two 1-Acre lots in City of Starke Back by Popular Demand "Killer Ribs" Delicious BBQ Hwy 1 6 across from NAPA Stop by for a FREE drink! (9041 966-7656 WE DELIVER 7408 SR21 N. t .1J'. . Keystone Heights, FL -- Showcase Propert-le' Inc. i Broker ." 352-473-4903 *.1 Want to reach people? Braborb- ell Now's the perfect time to see just how well our classified can work for you. Whether you're looking for a great buy or a great place to sell, call our classified department today. 904-964-6305 Askfor Melisa October 9, 2008 Page 10, k ..... hcJ SERVICgo. .Demolition *Road Grading *Fill Dirt *Umerock *Washout *Site Prep *Fire Line Plowing . -Land Clearning - *Ponds 'Dozer Work R.E. Jones *Road Building O *Driveways Owner *Heavy Brush Mowing Licensed & Insured Read our Classifieds on the Where one call Classified Ads World Wide Web WorldWideWeb aph.com (04964-6305(3521does a473-2210386496-226 Classified Ads 904] 964-6305 .13521473-2210 .3061 496-2261 5 or day iteevnota iam inimmp u on Call St. Only $4.75, including postage. Many colors, shapes and styles to choose from. Call 904-964-5764 for more information. PEKINGESE PUPPIES CKC REGISTERED. Health certificates, home grown. Call 352-468- 1045 or 352-475-2428. 2 SUNBURST BEARDED DRAGONS, 1 GREEN IGUANA, 3 cages. $300, call Edrick at 904-769- 9466 or e-mail hambo- ne232003@yahoo.com. 53A Yard Sales SATURDAY, OCTOBER 11, 8AM-2PM. Lots of nice misc. items, adult and children's clothing, some furniture, refrigerator, toys, Halloween and Christmas items, too much to list. Something for everyone. 756 W Market Rd., Starke by Fairgrounds, 904-964- 8592. FRIDAY AND SATURDAY, 5370 NW 196TH WAY OFF SR16W. 8am-? SATURDAY, SAM-? ACROSS FROM WINN DIXIE at Jimmy Bowen's home. Some furniture and lots of clothes. ESTATE SALE FARM ITEMS, CHINA, FURNI- TURE, pottery, cast iron and lots more. Friday and Saturday, 8am-2pm, 305 Clark St. MOVING YARD SALE - THURSDAY, FRIDAY AND SATURDAY, 8am- 1pm. Freezer, washer, dryer, misc. household items. Green Acres, 1412 Debra St. THURSDAY AND FRIDAY 3 FAMILY YARD SALE. Hwy 301 South before WalMart, turn at Knuckle Draggers, follow signs. Lots of stuff. Thelma, Cheryl and Gang. BIG YARD SALE- WEDNES- DAY, THURSDAY, Friday and Saturday, 9am-5pm. Take SR16 toward prison, turn right on CR225, 2 miles, look for signs. 4 FAMILY YARD SALE - SATURDAY, 8AM-2PM. New XBOX 360 games, women's clothes, baby clothes, purses, shoes, exercise equipment andr misc. items. 1002 Clark St., behind Powell's Dairy Freeze. GARAGE SALE FRIDAY AND SATURDAY, 8AM-? 41 SE 35th St. Enter- tainment center, dryer, Christmas items, adults and children's clothes. FREE CANNON CHURCH OF GOD'S PRAISE is having a yard sale Sat- urday, October 11, 7am- 3pm on the corner, 1010 Oak St. Clothes, house- hold items, etc. Please come. FRIDAY AND SATURDAY, 10A'M-5PM 5 miles weston SR16. Furniture, clothes, etc. Bar and res- taurant equipment. Call 352-745-0723. ESTATE SALE FRIDAY THROUGH SUNDAY, October 10-12, 8am-4pm. 16528 Hwy 301, Waldo, 1/8 mile south of Waldo Flea Market (beside Wal- do Motor Sports). Fur- niture, household items, clothing all sizes, and kitchen cabinets. Call 904-964-2941. 53B Keystone Yard Sales FRIDAY, OCTOBER 10, 8AM-2PM. New and qld, collectibles, gifts, kitCh- enware, linens, vintage clothes, old dolls, toys, pottery, household, fur- niture, glass and much more. 6888 Ridge St. be- hind Friendship Church, SR21. . MOVING SALE OCTOBER 17 AND 18, 9AM-? 5587 SE 7th Ave, Keystone Heights. Antique furniture and stove, refrigerators, electric fireplace, col- lectibles, arts and crafts items, many Christmas items, air compressor, Roto tiller, lawn sweeper, sprayer, leaf whacker and many more items. Ev- erything priced to sell. For more info, call 352- 473-3010. GREAT SALE FRIDAY, SATURDAY AND SUN- DAY, 9am-? Dressers, book shelf, baby stuff, glassware, Christmas stuff, large rabbit cage, fish tank, etc. Big Tree, 214 North to Mononga- hela to Cherokee. MULTI FAMILY 8335 SR100, JUST PAST CR219. Free items, household items, furni- ture, computer monitors, new items, handmade crafts, glassware. Christ- mas shopping. Saturday, October 11, Bam-2pm. 3 FAMILY YARD SALE OC- TOBER 10, 8AM-? 7000 M. Lake Rd. off 315C near McRae Elementary. 55 Wanted LOOKING FOR A EXPEDI- TION OR VAN for ex- panding family. Willing to Keystone Hauling & Handyman Service, LLC AimmI~tepaih .-Premnvvmf -Odd Jow , -YamdWixk GardenROW-Tling *IJus~d&Iwner. Owner: ,;Bush~Hog~awing IMvetinnwft&PRe nwoaal .SiteL'ImsUp .PhieBayd&CypIsMukL *Pb~Hodjcrsstle -RwPeasdmates r.Kerry Whitford ; I e. a Homes For Rent Homes, Lake Homes, Mobile Homes & Vacation Properties for Rent in the Keystone, ,Melrose, Starke, Hawthorne Area ranging from $550 to $1,200 per month. Call for Free List Professional Property Management Services Offered, by Trevor Waters Realty Quick Copy WHILE''OiU WAIT 110 WEST CALL ST., STAIRKE J904) 964-5764 Far w41-) 964-9S Fat, rleWly, rftd sel Hdl. D e t a i I s : (800)442-7906 or (336)789-2926. VA#2. Auto Donations DONATE YOUR VEHICLE RECEIVE $1000 GROCERY COUPON UNITED BREAST CANCER FOUNDATION Free Mammiinograms, Breast Cancer Info pay $8K. Must be in nice condition. Please call 904-364-9041.. COMPUTER NEW DELL 2-GIG XP PENTIUM 512 MB, 2 speakers, wireless mouse and keyboard. 17" LCD screen, many extras with 4yr warranty, $900. Call 386-496-0016. STEEL BUILDINGS-$1000 TO RESERVE. Factory direct, local consultant. Can erect (discount- ed).. Source#16H. Phone 904- 838-1399. KENMORE AND WHIRL- POOL WASHERS and dryers, new type $95 and up each. Electric stove, written guarantee, delivery available. For appointments, call 904- 964-8801. USED COMPUTERS, $99. WESTERN AUTO IN STARKE, call 904-964- 6841. ROCKFORD FOSGATE BOX ENCLOSED 12' sub woofer punch series - Never used, new $179.99, will sell for $90 firm. Call 904-964-2288. ED'S APPLIANCE Sales Service Nice selection of . Pre-Owned Refrigerators 'Starting at $ 165 GREAT FOR SUMMER VEGGIES Or RENTAL PROPERTY 904-964-2966 355 N Temple Ave Starke STORE DISPLAY FIX- TURES FOR SALE Call 904-964-4343 or 352- 682-6926. LIKE NEW BEDLINER FOR FORD F150 SHORT BED PICK-UP. $80 BO. Call 90-964-8325. METAL STORAGE BUILDING 10X24 IN EXCELLENT CONDI- TION, $2,000 firm. Also, generator, 10hp, 5,000 watts, has not been used much, $350. Call 352- 473-8257. RENO 4-WHEELER SCOOTER, 300LB ca- pacity, 20 mile range, 6mth old. New $1,599, will sell for $750. Easily taken apart for carrying in car trunk. Also, 6ft double fold portable ramp. New ,$189, will sell for $100. Call 352-473-8616. QUIK-N-CRISPY GREASE- LESS FRYER- 110V, fro- zen drink machine, nacho cheese dispensers, cool- ers, glasses, dressers, etc. Yard sale, Friday and Saturday, 5 miles west on SR16, 352-745-0723. 59 Personal Services CHILDCARE IN MY KEY- STONE HOME. Licensed CPR/First Aid. Hot meals, indoor play room, lots of activities. 12 years expe- rience. Near Twin Lake Soccer Park. Infants and up. Call 352-478-8040, Lic#F04CL01. JERHY'S HAULING Wt BUY JUNK CARS, run- ning or notl Will pick up anywhere. $150 and up. Call 904-219-9365 or 904-782-9822. PAUL MILLER TREE SER- VICE. Licensed and in- sured, free estimates. Call 904-796-2430. FAITHFUL'POOLS SERV- ING IN BRADFORD, Union, Baker, Alachua, Clay, St. John and Put- nam Counties. I can build you a very affordable pool for an affordable price. We also remodel decks, tile and refinish inside of your pool (color of your choice). Call 904-964- 7967, Starke. HOUSECLEANING DUST, MOP, SWEEP, vacuum, etc. One time, weekly, bi-weekly, monthly. Very honest, dependable with references. Leave mes- sage at 352-215-0507. 64 Business Opportunity LIQUOR LICENSE Brad- lord County. No transfer fee. RealtyMasters, Real- tors. 800-523-7651. 65 Help Wanted IRS JOBS $14.91-$32.61/ HR NOW HIRING. Paid ,training is provided. For. FREE Towing, Tax Deductible, Non- Runners Accepted, (888)468-5964. Building Supplies METAL ROOFING. Buy direct from manufacturer. Over 20 colors in stock, several profiles to choose from. Quick turnaround. Delivery available. (352)498- 0778, (888)393-0335.. com. Business Opportunities Financial Freedom for you. $1000/day returning phone calls. Not MLM. No buying or selling products. Legal, moral and e t h i c a l . bigmoney (888)276- 8596. ALL CASI CANDY ROUTE Do you earn $800 in a day? 30 Local Machines and Candy $9,995. (888)629-9968 B02000033. CALL US: We will not be undersold! $1,000 A DAY POSS BIBLE RETURNING PHONE CALLS NO SELLING, NOT MLM (800)479- 8 0 3 3 H.COM. Iliring! PIIAT JOB! NOW IIRING 18-24 SHARP ENTIIUSIASTIC MOTIVATED GUYS & GI.L.. ... t & GIRLS FREE, IU TRAVEL USA REPRESENTING 150+ LEADING PUBLICATIONS.: 2 WEEKS PAID T R A I N I N G' TRANSPORTATION PROVIDED. RETURN TRIP GUARANTE P: CALL TINA OR JIM (800)642-6147.' Need a career??? Become a Nationally Certified Heating/AC Tech. 3.5wk Nationally. Accredited program. Get EPA/OSI-A/. \. appointment and free government job Info, call American Association of Labor at 913-599-8244, 24hrs, emp. serve. ATLANTIC PUBLISHING HAS FT/PT WARE- HOUSE/Inventory Con- trol position available at our new Starke, FL warehouse. Warehouse ahd. com) or fax to 352-622- 1875. No walk-Ins. VERY BUSY CARRIER 100% 0/0. Pull vans, flats or tanks in Florida SE, Midwest and West, out and back. Paid empty and loaded, fuel card, no fees, paid, fuel tax, home weekends. Call904-781- 0457 or 800-606-8344. BRADFORD TERRACE IS NOW ACCEPTING AP- PLICATIONS for LPNs and RNs, full time for all shifts. Excellent pay and benefits. Apply In person at 808 S Colley (a) X' apr. Buy, 4/1BR. SILKSCREENER SHEET METAL FABRICATION company interested in ex- perience silkscreener or individual willing to train. Full time, good benefits. DFWP, 352-473-4984. ARNP WANT TO MAKE A DIFFERENCE in your community? Work in Pub- lic Health. The Bradford County Health Depart- ment is seeking an ARNP, position #64026936. Must be licensed as an ARNP In the state of Florida or certified as a Physician's-Assistant in the state of Florida. Must be fingerprinted and drug screened. May be re- quired to work extra hours EXCEPTIONAL FRANCHISE OPPORTUNITY Seeking hands-on entrepreneurs for unique restaurant ownership. Sites available in Keystone Heights, FL. Minimum $200K liquidity and $500K in assets. Contact Mark Cairns (800) 418-9555 x 1335 or days in the event of an emergency. Salary range is $1,283.74 to $3,336.13 bi-weekly. Applications will be accepted online at- florida.com/ or completed State of Florida applica- tions may be faxed to 904- 636-2627 by 10/13/08. Call 877-562-7287 for assistance in applying online. EEO/AANP Em- ployer. PLUMBER HELPER EX- PERIENCED ONLY RE- QUIRED. Drug free, call 352-478-2162. STAFF ASSOCIATE - STAFF ASSOCIATE TO HELP with miscellaneous projects. Must be pro- fessional and customer oriented. Valid driver's license. Must be able to eiei a minimum py oulus and adhere to on-call schedule. Part-time to full-time positions. $8- $10/hr depending on ex- perience plus on-call pay. Please respond via fax to 904-964-9233. PROVIDE ASSISTANCE TO QA DIRECTOR with compliance standards, developing training pro- grams and preparing documentation. Must possess Bachelor's de- gree in nursing, educa- tion or social science or Associate degree with 2 years related experience. Must have excellent com- munication and computer skills. Background and drug test is required. Ap- ply at ARC of Bradford County, 1351 S Water St., Starke, 904-964-7699. Property Manager/Maintenance Position Established, progressive management company seeks confident, experienced real estate management candidate to oversee small apartment community in Baldwin/Callahan area. Subsidy experience helpful; basic computer knowledge, strong communication skills and the ability to follow-through mandatory. * Life, health and dental insurance S401k, paid sick days, vacation and holidays_ * 35 hour work week Email resume to C. Saunders at csaunders@hallmarkco.com or fax resume to 352-224-2058 est a, t dIca\ D '1e1 al ccakit 3 u\?eter UU\ City College will prepare you for an exciting career in healthcare as a: Medical Assistant Medical Office Administrator Phlebotomist S Call us today to discover how a City College degree can get you on track for a career you'll love. Ca Ct vWto. w y our\\Ftoo;. City College Accredited by the Accrediting Council for Independent Colleges and Schools (ACiCS) Financial Ad ForThose Who Qualify Flexible Schedules with Day and Evening Classes Lilme Carer PlacementAssistance ., Earn your degree and prepare for a great career by contacting: 1.877.455,0092 I w 2400 S.W. 13th Street Oalnesville, 32608 $259/Mo! For listings (800)366-9783 Ext 5798. Miscellaneous B E N E F I T S, VACATIONS. CALL (800)910-9941 TODAY! REF #FL08. Real Estate TENNESSEE LAND RUSH! I Banberg CO. Peaceful/ secluded and loaded with deer, turkey, hogs and timber value too. 42ac- 85ac- 20. VIRGINIA MOUNTAINS 2 acres on mountain top near New River State Park. great fishing, view, private. $29,500 must sell, call owner (866)789-8535. ***FREE Foreclosure Listings*** Over 200,000 properties nationwide. LOW Down Payment. Call NOW! (800)817-5434. __ __ __ .1 L_ _ _ _ _ irdaWorks Alachua/Bradfoat ACamraEmilty Partnersht. SFull-time position Computer skills required 401k Vacation Insurance Apply in person Mon-Fri 8am-5pm No phone calls please SAWYER GAS "YOUR LOCAL FULL-SERVICE PROPANE DEALER" 9449 US Hwy 301 South Hampton, FL PARKLANDS REHABILITATION & NURSING CENTER A 120-Bed Skilled Nursing Facility in Gainesville Is currently accepting applications CNAs: Full & Part-Time, 7-3 & 3-11 LPNs: Full time-3-11, **Baylor Program** 7a-7p Weekends. Work 24 hrs., 'Get paid for 32! Join our dedicated team and receive: Competitive Wages SStrong benefits package SEmployee recognition programs Minimum Requirements: Current Certification/Licensure in the St. of Florida Criminal Background Check & Drug Screen. Required!! To apply: please email your resume to Jobs@COCare.com. You may also fax your resume to (800) 442-1353 or apply by phone toll free (877) 571-1952. We also accept applications in person. 1000 S.W. 16th Avenue Gainesville, Florida 32601 Tired of Banks & Loan Centers saying NQ, WE CAN HELP Good credit-Bad credit WE CAN-HELP S"-Biiinfritcy WE CAN HRELPQ- We offer many types of loans: business loans home & trailer loans personal loans car loans We say YES when others say NO! Call toll free 1-877-367-0130 Out Ot Area ulassiTleas "I" z--r- . I I Terrace residents g oing pink Brushing elbows with Obama ImmmZm]. '-.' BY MELISSA PYLE Special to the Telegraph In difficult circumstances, people can find joy in helping others. This is what some of the residents of Bradford Terrace have been working on lately. Louise Dyal Miller and Carter Harrington call their meeting nothing short of a miracle. The last few months have found a lifelong friendship. Miller has always been active in her community, serving 40 years in the Homemakers Club, collecting pop tops to cash in for the Ronald McDonald House, and now using her creative needlepointing to raise money for another great cause, breast cancer research. She had been making little "Cross in my Pocket" poem crafts for four years to give to friends, family and military members. She has sent more than 2,770 in care packages to service members in Iraq. These little cross poems and other yellow ribbons she'd been making and giving away to other Terrace residents gained Harrington's attention. Harrington's wife has. been going through cancer treatments for sometime. Because of his concern for her, he wanted to help, but his own illness seemed to limit what he could do. He and Miller began a project together. As most great things begin, it all started with the first ribbon. That one turned into many, and the residents began asking for their own pink ribbons. This gave birth to the idea of selling the ribbons and donating all the proceeds to the cancer center at Shands in Gainesville. So far, Miller has sold 50 of the homemade ribbons and, because of the small cost of materials, is going to be able to give almost all the proceeds to the hospital. HENDRICKS ~ ~ _c -%-h J-,I AYbA ~ _ 400s 68/palle+ Tax Pallet Deposit 400sq ft 68/pallet Delivery, installation and Turf Care Services also available Call us 386.496.2174 ATTN: Contractors! Check out our great wholesale prices At nearly 80 years of age, Miller doesn't plan on slowing down. although she does laugh at the thought of another r birthday. "It's beginning to put a cramp in my style," she said. Needlepoint for one ribbon can take her up to 52 minutes, but Miller is overjoyed to do \ the work. The nurses have found that the work is actually keeping her relaxed. Harrington wears his pink ribbon every day and Louise Dyal M has a larger one on the back of his scooter, right next to his Gators bumper sticker, which caused Miller to brand him with the nickname "Gator" Miller and Harrington have made a great- team out of inspiration and creativity. Barbara Wallace, .Bradford Terrace activities director said, "It's nice for them, who are in' the nursing home, to be so concerned about others, and to do something for one person and have it mean so much." Since Miller and Harrington have been working on the ribbons, many of the other residents have volunteered to help make them as more orders come in. Cancer ribbon making for charity is now becoming a Bradford Terrace activity. Get AwaU, Without Going Far-Celebrate the ( 233rd anniversary of the U.S. Navy In Jacksonville October 10-13. Jacksonville will welcome the USS SWhere lorida Beins. Stephen W GroMs, a gulded-misslle VsitJacksonville.com/escape Boo nw t Vsiti.ksnvl .c /" -ape 1 8'[00-73-2--68 TIRE I o FREE ROTATION Must Present Coupon Expires 10-31-08 I Oil Change Most Cars - Up to 5 $S895 qts. Oil SBrake Jobs 352 1468-1140 Starting,,At499s CITY OF STARKE UTILITY RESIDENTS NOTICE ... NOTICE ... NOTICE IN ORDER TO PROVIDE FASTER SERVICE FOR EMERGENCY AND "AFTER HOUR" CALLS, AFTER 5:00 PM. A NEW TELEPHONE NUMBER HAS BEEN PLACED IN SERVICE. THE NEW NUMBER IS 966-6161 THIS LOCATION IS AT THE DISPATCH CENTER "* IF YOU ARE AWARE OF A GAS LEAK, CALL THIS NUMBER IMMEDIATELY "* ANY REPORTS OF ELECTRIC, WATER, GAS, SEWER AND CITY STREET PROBLEMS SHOULD BE REPORTED TO THIS NUMBER. THANK YOU FOR YOUR COOPERATION. PLEASE PLACE THIS NOTICE BY YOUR TELEPHONE FOR USE AS NEEDED. PUBLIC AWARENESS SAFETY FIRST 1. Damage Prevention Awareness: Florida State Law, Chapter 556 in the Florida State Statute requires calling a one-call center before you dig. This does not necessarily mean only businesses. Homeowners putting in pools, clotheslines, mail boxes and playground equipment need to also consider that there could possibly be underground lines that could be tapped into. Anytime you dig for any reason, a call needs to be placed to the city. The city requires a city excavation form be filled out prior to any excavation work to be done. (904-964-5322) Sunshine State One Call of Florida, Inc. can be contacted at Toll-Free 800-432-4770. The law requires you call two days prior to digging. This will ensure that you do not cut any buried lines. There is no cost for this service. If you need additional information you can contact ww.callsunshine.com or call the City of Starke at (904) 964-5027 to have a Gas Representative come and speak with you and locate any gas lines. LEAK RECOGNITION AND RESPONSE What to do if you smell gas in your home or building? * Leave immediately and tell others to leave too. * From a safe distance, call City Hall (904) 964-5027 or after hours (904) 966-6161 Emergency dispatch and notify us. Never try to repair a gas leak yourself. Do not turn any lights on or off, smoke or use any phones or any equipment that could cause sparks. SPORTS PUB Halloween Costume Part Fri. Oct. 31st s- Best Costume Prizes i and More EVENT SCHEDULE Wednesdays Saturdays M Tnda Pool Tournament DJ Poker Tournament Thursdas and Dancing. STuesdays Karaoke TRIVIA "Fun for All" Fridays Live Music 301 East Call Street in Downtown Starke 964-WALE (9253) c miller and Carter Harrington One of the local churches has already= ordered several and Miller is asking for as many orders as possible. Her pink cross As a state trooper assisting the Secret Service during presidential candidate Sen. in the pockets sell for $1 and the Barack Obama's recent trip to Metropolitan Park in Jacksonville, Alex Cummings pink ribbons for $2. She and thought his chance to hear and see the candidate in person might be missed. Although Harrington are hoping to raise a he had considered taking the day off, he decided to back up his co-workers when he sizable amount to present to the heard about the need for assistance. But when supervisors had slots open for the hospital at the end of the month. photo opportunity later at Jacksonville International Airport, Cummings was able to If you are interested in ordering participate and meet Obama In person. someof the ribbons, please contact Wallace at (904) 964-6220. The team would love to impact breast cancer and other cancer research, so As Miller said, "No hank - they plan on continuing their of yarn has ever gone so far." l creative and charitable efforts. I =m A I 4 Section B: Thursday, October 9, 2008 Regional News News from Bradford County, Union County and the Lake Region area 2 scholarships helped pave road to nursing career The following is part of a Rotary Club's endowed "My family wasn't able to load. It would've been a longer his family. Thornton had been all trades there, working out in series of stories on people scholarship to attend Santa Fe. pay for (school)," he said. "If it process." working at Jackson Building the yard as well as working who've gone on to successful That helped shorten the hadn't been for (the School was put on hold after Supply in Starke-a job he inside, being involved in-sales careers with the help of Santa duration he spent in school scholarship), I wouldn't have Thornton earned his AA started right out of high school. Fe College scholarships. The earning his AA degree. been able to at least take a full degree so he could help raise He said he was like a jack of See SANTA FE, p. 3B college is raising funds to create more scholarship opportunities for Bradford students. Telegraph Staff Writer "' ' A supportive family war l.. ".'..' , important to Donnie Thornton when he made the decision to return to college, but what was also a tremendous help was the . fact he received a scholarship. The Santa Fe College Lillian Stump Nursing and Health HAVE A . Related Scholarship was a , blessing in Thornton's life, but : R it was also the second scholarship he received from 2 Santa Fe. The first was - awarded to him as a student preparing to graduate from '-fS. -4 1 Bradford High School in 1985. A That first scholarships ,Cre enabled Thornton to go W E REtAIR ,o school and earn his AA degree. I I Approximately 18s years later, the Stump scholarship helped 4 ease some of the burden on Y.. OE C Mu Do Not Ne d To Ha e Bot Y Thornton and his family when he chose to go back to school. Car Or Truck From Noegel s. .. -That was, Thornton admitted, a tough time for Thornton, his wife, Brenda, and their 1 :/ do It I.u'n k9 11/01' II P All l I :!! ! children. H e r v soon F 009 ._ A is "It was a blessing," i 1 . Thornton said. "I kind of had in to rely on God to get me wh o through all that. We were '93 BUICK LESABRE '97 CHEVY MALIBU '98 SATURN SW2 '01 SATURN SI-2 down to one iinncome. Thornton has srow been I$ 5" working as a nurse for more than three years. He will soon "'A." complete a year of working at Shands Starke, the hospital in his home county. N, -' Things have worked out :_..- pretty good for the kid who :"--- was unsure of what he wanted t;od' to do when he graduated from high school. ,";- 11111 "I enjoyed doing so many 95 4, things," Thornton said44TK1414421- part for me, trying to figure out99W N I'dhat exactly been ante d to de 00 DODGE STRATUS SE '02 FORD FOCUS SE '98 HONDA CIVIC UtL '00 MITSUBISHI rANTE person. I loved math an science.. I loved working with my hands." Abe. Thornton received the Starke ford , come as no surprise that a Fund raiser for thit Reddish at an event at TK TK146 STK #1443326 STK #1428 Mad i Stt Baptist Chu Oct on7riday, Oct. schedulegraph Stafor 01TOYTA COROLLA LE '00 MC JIMMY SLE 44 '00 HEAVY MALIBUS '031FORDRMUSANGERI Becky Reddish is.. remembered fondly for her ,'.7,ri wcenterkin the Bradford the event on" whichool system, so itshould are come as no surprise that a300 tickets," sain her honor isva being established at Santa Fe ,( College. fund, that's ought, and thel." scheduled to speak, while two a 5TK #I-IN STK I. I STK #14411 7 STK #14423 special videos will and rememlso ber 9 Rddishown. at an event at A Tgoal of raising $50,000 for the scholarship fund has been set. The current total stands at ,C l TODAY approximately $16,500. CALL TO "We hope the community 1018 N. TEMPLE AVE888-94-6461 will come out and support us," STARKE, FL 32091 Canova said. STARKE, FL 32091 OR 964-6461 Tickets can be obtained at OR 964-6461 the Andrewsv, Center and Capital City and Community UTO SALES State banks in Starke, or by calling Dana Blankenship at . (904) 964-6229. Donations may also be made. at the Andrews Center or ; ,--"" . mailed to: Santa Fe College l , Andrews Center, 209 W. Call St., Starke, FL 32091. Checks .' ':. ,. should be made out to SFC . .. Endowment. r. *, - Page 2B TELEGRAPH, TIMES & MONITOR--B-SECTION Oct. 9, 2008 CRIME Union rescue in crash in Gainesville A Gainesville teen was cited Oct. 5 after causing a crash with a Union County rescue unit. The rescue unit was southbound on Northwest 13"' Street in Gainesville with its lights and siren activated. Gainesville Cpl. David Blizzard was on duty and happened to be at the intersection of Northwest 16th Avenue, watching as the rescue unit stopped at the intersection before proceeding. A Honda Accord, driven by Crystal Bolton, 17, entered the intersection and collided with the ambulance, Bolton suffered minor injuries in the 9 p.m. crash. Those in the rescue unit were identified as: patient Marcela McIntire, 61, and her son Brian Mclntire, 29, driver and paramedic Archie Clemons, 28, and paramedic Robert Koch, 57, all of Lake Butler and Michael Pittman, S- 25, of Gainesville. Mclntire was being treated as a cardiac patient. It is unknown if she suffered additionally from the crash. She was transported by Shands rescue to AGH. Koch received minor injuries. Clemons, Koch and Pittman were transported by a Shands rescue unit to Shands University for observation, Cpl. Blizzard said. Bolton was cited for failing to yield right of way, driving while license suspended with knowledge and expired license tag, Cpl. Blizzard said. Total damages were estimated at $25,000. Recent domestic. Daugherty was charged with striking the victim several times in the back of her head and burning her on the leg with a cigarette, Deputy Waldorf said. A $15,000 surety bond was posted for Daugherty's release from custody. Nicole Barbour, 29, of Lake Butler was arrested Sept. 30 by Union Deputy Leslie Crews for aggravated Battery. Barbour was charged with striking the victim in the head with a stick during an argument. She also struck the windshield of the victim's vehicle with a hammer, Deputy Crews said. Barbour was released on her own recognizance. Rebecca Lynn Hughes, 24, of Lake Butler was arrested Sept. 30 by Union Deputy Kevin Hilliard for battery. Hughes was charged with kicking the victim in the arm and shoulder during an altercation. Hughes was released on her own recognizance. Rachel Kay Tillman, 42, of Starke was arrested Oct. 1 by Starke Sgt. William Murray for burglary and grand theft. Tillman was charged vith going onto the porch area of a residence on Lafayette Street where she removed a tool box containing assorted tools valued at $400, Sgt. Murray said. Total bond was set at $20,000. Letroy Shelton Guion, 40, of Starke was arrested Sept. 29 by Starke Sgt. Richard Crews for possession of firearm by a convicted felon and possession of cannabis. While serving a search warrant at Guion's residence on Pine Street, the officer located a .44 caliber revolver on top of a refrigerator. The 11.-.... f-II., 1 4-A weapon was ully loaded, arrestS Sgt. Crews said. In the In Bradford, bedroom two small bags of in Bra ord marijuana (approximately Clay or Union two grams) and several items y r U of drug paraphernalia were The following individuals found, Sgt. Crews said. Bond were arrested recently by was set at $11,000. Guion local law enforcement was also charged with officers in Bradford, Clay violation of probation. (Keystone. Heights area) of- Crystal L-yn Keen, 24, -f Union County: Crystal Lynn, Keen, 24, ofc .";~--g~--g~,dr w as t i.- -B tler:was~arres tedc(. i Jason Ray Daugherty, 27, 2 by Union Deputy Ken of Starke was arrested Oct. 4 Smith for possession of by Bradford Deputy B. controlled substance. Keen's Waldorf for felony battery vehicle was stopped on Main L1F !LMI IIKK m1 Florida Twin Theatre All Seats S5.00 Before 6 p.m. 964-5451 *CLOSED MON & TUES* Visit us on-line at Starts Frtd. ..j: Dennis Quaid in THE Fri, 8:00 Sat, 5:30, 8:00 Sun, 4-45, 7:05 Wed-Thurs, 7115 " Kirk Cameron in 1iu,139, , Fri, 8:15 Sat, 5:15, 8:15 Sun, 4:50, 7:10 Wed-Thurs, 7:30 I NOW PLAYING! FLORIDA TWIN I CALL FOR SHOWTIMES 101 West Call Street (904) 964-5451 Street after the deputy observed it swerving from lane to lane. Keen's speech was slurred when she was questioned, and she admitted to taking a Hydrocodone pill earlier in the day, Deputy Smith said. She failed testing and was placed under arrest. Ten Darvocet pills were found in her purse, Deputy Smith said. Bond was set at* $15,000. Keen was also charged with driving on a suspended driver's license and careless driving, Deputy Smith said. Ashley Jordan, 26, of Lake Butler was arrested Oct. 3 by Deputy Crews for possession of marijuana. While Deputy Crews was investigating a report of an intoxicated person in the Lake Butler Apartments complex, a strong odor of burnt marijuana was coming from where several individuals were standing. During questioning, none of the individuals was found with marijuana in his possession, Deputy Crews said. However Sabag of marijuana was found on the ground where 'Jordan was standing, Deputy Crews said. Joshua Eric Clemons, 19, of Starke was arrested Oct. 1 by Starke Patrolman Jason Crosby for possession of controlled substance with intent to sell and possession of alcohol by person under 21. Clemons was found with four Ixl bags of marijuana, a known method of packaging for sale and/or distribution, Patrolman Crosby said. Total weight was 3.2 grams. Bond was set at $51,000. Christopher Sean Hartley, 38, of Keystone Heights was arrested Oct. 2 by Sgt. (Sorry Mr. Obama, but Jesus Christ is t-heinuswer- I $600 Hair -6 Cuts Hairy Business Men Women Children WALK-INS WELCOME NO WAITING Now Hiring For 2nd Location Next to Auto Zone on S. Walnut St. Starke, FL 904-964-3338 Mon-Sat 10-5 Summer Riding rograp, Has Arrived! Call EUPHORIA STABLES RIDING LESSONS- Chldren &. Adults BOMDING- UGliGOITEDENA ROUND PEN TRAILS PASTURES Call (904) 364-8526 Starke, FL Murray for retail theft. Hartley was charged with concealing several items in bags and attempting to leave Wal-Mart without paying for the merchandise valued at $482.89. Bond was set at $5,000. Natalie Lorraine Wederski, 34, of DeFuniak Springs was arrested Oct. 4 by Patrolman Crosby for disorderly conduct. Wederski was creating a disturbance by screaming and yelling profanities in the parking lot of a convenience store on Brownlee Street. Officers told her to calm down, but she continued to be loud, Patrolman Crosby said. Wederski was released from custody after a $1,000 surety bond was posted. Charles Barry Butler, 58, of Suwannee was arrested Oct. 4 by Clay Deputy P.M. Reid for trespassing. The victim stated she arrived at her property on Hall Lake Road in Keystone Heights where she found Butler sitting on her front porch.. Deputy Reid said. He was intoxicated and would not leave the property. Melanie Rodgers, 23, of Keystone Heights was arrested Oct. 1 by Bradford Deputy Stephen Bivins for violation of probation on a charge of possession of marijuana. Rodgers was ordered to serve 30 days in the Bradford County Jail. Joseph McDaniel, 41, of Lawtey was arrested Oct. 5 by Bradford Deputy Josh Luke for violation of probation on a charge of domestic violence. McDaniel was ordered to serve 60 days in the county jail. Roquel Lawanda Leven, 36, of Lake Butler was arrested' by Alachua County deputies on a Bradford warrant for failure to return property over $300. Leven was transported Sept. 30 to the Bradford Jail where she was released after a $2,000 surety bond was posted. Elsheikh Ahmed Lagi, 46, of Jacksonville was arrested Oct. 1 by Duval deputies on a warrant from Bradford County for violation of probation with no bond. Vernon Reginald Godbolt, 50, of Lake Butler 'was ,;,arrested Sept. 19 by Union Deputy Jerry Feltner on a. warrant for sexual assault with no bond.. - Serena Henderson, 28, of Starke was arrested Oct. 4 by Deputy Luke on a warrant for perjury in official proceedings. She was released on recognizance. her own Israel Manuel Drago, 20, of Keystone Heights was arrested Oct. 4 by Clay deputies for violation of probation contributing to the delinquency of a minor with no bond. Ricky R. Jordan, 43, of Starke was arrested Oct. 4,by Starke Patrolman P.A. King for violation of probatiOf'bon a charge of retail theft. Jordan was ordered to serve 100 days in the county jail. David Lee Cox, 20, of Lawtey was arrested Oct. 3 by Bradford Deputy R.E. Pollard -on. a. warrant from Gilchrist County for failure to appear on unlawful possession of alcohol. Cox was released from custody after a $2,000 surety bond was posted. Sammy Lee Simmons, 17, of Lake Butler was arrested Oct. 1 by Union Capt. H.M. Tomlinson for failure to .appear for felony offense. Bond was set at $10,000. Prentis Lynn Jefferson, 30, of Lake Butler was arrested Oct. 6 by Capt. Tomlinson for violation of felony probation. He was released on his own recognizance. LAOBO Y GREAT SELECTION OF CHAIRS... LEATHER & CLOTH! CLOTH CASH IS KING Cash discounts for checks, from cash or credit cards. 19 Credit terms available. DENMARK FURNITURE "Serving the Area Since 1937" STORE HOURS: 434 91l CoA wtl 1 U l Jaidso St Stdk I Mon. & Tues. 9-7N Wed thru Fri. 9-6 (904) 964MM66 (90) 9 7 N = diT Spruce Up SYour Landscape Mulch Bulk Stone S *Cypress Blend Pea Gravel 4 *-Colored Mulch River Rock 4 o Pine Bark Red Rock S "Bulk or bagged" Marble Chips S*tHorse Bedding Crushed Concrete S Baled Pine Straw Railroad Ties STARK LANDSCAPE SUPPLY 9620 SES.R.100, Starke g? Tues-Fri. 7-5:30 (9041 964-3112 Prices& availability Sa.esoo r (9041 964-3112 P subac^e SSat,.7-3:30 subject to change 0 4 Closed Sun.&Mon. Approx. 2-miles E of U.S. 301 without notice. P h. * w SFREE gas for a Year! VICTORY, With any new Victory motorcycle purchase. THE NEW AMERICAN MOTORCYCLE T NW ARAN CYCL(offer expires October 13, 2008) Who says you aPLUS 5.99% on 2008 models can't buy an ATTITUDE? 2.99% on 2007 models ' *Offers are subject to credit approval Vegas Jackpot P L = li ^ POLRRIS- P North Central Florida's 'Largest Powersports ""& ,Marine Dealer 12556 NW HWY 441 (6 miles north of HWY Patrol)'"'. Gainesville S(386) 418-4244 i PolarisofGainesville.com ___ ^ ^ ^ ^ ^______- _- _ Oct. 9, 2000 ELEGRAPH, TIMES & MONITOR--B-SECTION Page 3B ,I Recent arrests in Bradford, Clay or Union The following individuals were arrested recently by local law enforcement officers in Bradford. Clay (Keystone Heights area) or Union County: SANTA FE Continued from page 1B and bookkeeping. Thornton worked there for approximately 18 years before deciding to return to school. He made the decision to go into nursing. It was a career he felt afforded him a more flexible schedule, allowing him to spend more time with his family. He also liked the fact that it allowed him to help people. The fact that he was an older student was more noticeable when he was taking classes at the Andrews Center, Thornton said. When he began taking classes at Santa Fe's Northwest Campus in Gainesville, Thornton said approximately half of the students in the nursing program were in his age range. As mentioned earlier, it was not an easy time for Thornton and his family, which consists of three children. However, his family made it possible for him to return to school and graduate. "Without their support, I never would've made it," Thornton said. "They're still my backbone and support. They made a lot of sacrifices to allow me to be able to do this." After graduating, Thornton went to work at Shands AGH in Gainesville. He worked some at Shands Starke while he was still in school and said his experience at Shands AGH, though it is a larger hospital, was similar. "It was still small enough where you had a close-knit group," Thornton said. He worked at Shands AGH for a little more than two years before being-.hired, at Shands---- St"rke-,-in December of last ye r. Thiortdnr sdid he has BY CLIFF SMELLEY Telegraph Staff Writer Santa Fe Community College is now known as Santa Fe College as it begins the transition to a four-year institution, which means people in Bradford County will have an opportunity to stay within the county and earn a four-year degree. However, students in Donald Richard Dowling, 70, of Raiford was arrested Oct. 2 by Bradford Deputy R. Watkins on a warrant for aggravated assault. A $20,000 surety bond was posted for his release from custody. On Oct. 3, Dowling was charged by Deputy Pollard on a warrant from Gilchrist County on a writ of attachment. He may purge by paying $1,896. He was released on his own Bradford County have another option, too, thanks to a partnership between Santa Fe and Saint Leo University. Students can earn four-year degrees in such areas of study as business administration, education, criminal justice and psychology through a combination of online classes and on-site classes ;at the Andrews Center in Starke and, recognizance on the charge. SLisa Nicole Bruno, 29, of Hampton was arrested Oct. 2 by Deputy Watkins on a warrant from Alachua County for violation of probation larceny. Bruno was released on her own recognizance. Nathan Allen Goode, 26, of Keystone Heights was Donnie Thornton, now a nurse at Shands Starke, received two Santa Fe College scholarships-- once when he was graduating from high school and then again when he returned to school later in life. Photo courtesy of Brenda Thornton. enjoyed his brief time there. when looking at the median "We have a great, great income of Bradford County. facility with great management Those scholarships create and great people," he said. options for children coming He has also enjoyed nursing out of high school who may as a career. Yes, he does have not go to college otherwise. to work long shifts, but he has "Even though they have the multiple days off during the drive to do it and the week, allowing him to have knowledge to do it, they may "quality family time," he said. not have the monetary Above all else, though, is the resources to do it," Thornton opportunity to be there for said. others. The college's endowment "The best thing I like is just corporation is in the midst of a talking with patients and being fundraising effort to create able to work with them and monetary resources for even help them know that we're more students. Donations will there to help them get better," all be matched by the state Thornton said. > eventually and do not have to Santa Fe College be cash. People can make scholarships helped make it all general donations or donate possible. Thornton thinks it's toward specific scholarships. great that there are so many If you would like to help or opportunities for Bradford learn more about the County students to get -scholarship--available, please scholarships to the college. call Cheryl Canova, the Santa Fe currently has 12 director of the Santa Fe endowed scholarships College Andrews Center, at specifically for Bradford (904) 964-5382 or the Santa Fe County students with another College Endowment three in the process of being Corporation at (352) 395-5200. established .,n -. -- ---You-may-also visit the Web .Thornton saiLkjnpmber, qf .siLe, schojlaships available is k plus www'.sfce eduScholarships. now, the Watson Center in Keystone Heights. "It's increasing our ability to offer more educational opportunities to students," said Bob Wolfson, the director of the Watson Center. Dia Harden,, an assistant academic adviser for Saint Leo, said Saint Leo caters to See ST. LEO, p. 4B E.Z. INSTALLERS Cabinets Countertops Windows Doors * Bathrooms Kitchens, etc.* FREE ESTIMATES Union-Clay-Bradford Counties DANNY LEE (904) 796-0592 arrested Oct. 3 by Clay Deputy Renee Scucci for violation of probation resisting an officer without violence with no bond. Jamic Louise Coakley, 27, of Starke was arrested Oct. 2 by Bradford Deputy Aaron Black on warrants for grand theft and uttering a counterfeit check. She was released on her own recognizance. Graylon A. Jones, 43, of Lake Butler was arrested Sept. 29 by Deputy Feltner for failure to appear for a misdemeanor offense. Bond was set at $1,500. Traffic James Harold Johns, 44, of Yulce was arrested Oct. 5 by Bradford Sgt. M.L. McKenzie for driving while license suspended or revoked (DWLS). After being told he was under arrest, Johns fled from the deputy and a trooper. He was eventually stopped and subdued when the deputy used a. Taser. Johns was also charged with resisting arrest without violence and on a warrant for failure to appear DWLS. Total bond was set at $11,000. Margaret Frances Snyder, 29, of Keystone Heights was, arrested Oct. 4 by Hampton Chief John Hodges for improper tag not assigned and possession of drug paraphernalia. Snyder's vehicle was stopped on C.R. 18. During a search the officer found a marijuana pipe with residue in her purse, Chief Hodges said. Snyder was released from custody after a $1,000 surety bond was posted. Nery E. Zambrano, 20, of Bradenton was arrested Oct. 5 by Lawtey Patrolman J.S. Bennett for no valid driver's license. Zambrano was also charged with giving a false name at the time of his arrest when he gave the officer a different name and date of birth. Troy Able Johns, 40, of Keystone Heights was arrested Sept. 30 by Clay Deputy M. Marvel on a capias for DUI and DWLS habitual. Bond was set at $5,003. L is up to :POLRRIS' Of Gainesville s2000 IN REBATES oeitn Censval NMth Central Forifda's Largest SIN Powersports A Marie Dealer (On Select Non-Current Models) 12556 NW Highway 441 (6 miles north of Highway Patrol) C 11N1 ESVI LLE (38 418-a 44 I I ol .c Back & Neck Pain Clinic "Modern methods With old-fashioned concern" * Auto Accidents * Work Injuries * Headaches * Neck and Back Pain Dr. VirgilA.Berry CHIROPRACTnC PN'S1CIAN Call Dr. Berry- Serving the Area for 21 Years 601 E. Call St. 964 Hwy. 230, Starke 9 4 01 Watson Center students can now take Saint Leo classes * I I II 5 1 ID Editorial/Opinion Thursday, October 9, 2008 Page 4B I Starke electric produces big money The term "big money" may have different meanings to different people, but when ,one casually speaks of $50,000-per-month electric bills, I begin to understand that big money is in the offing. While Starke doesn't have too many businesses in that category, it has numerous small business enterprises that experience utility bills in the $10,000- pe- month range. Visualize for a moment a small business owner who faces a $300 light bill each morning as he opens the door. The first $300 he takes in everyday is earmarked for electricity, and in all likelihood, any profit he makes arrives late in the day after utilities, payroll, taxes and other costs have been covered. Owning a business may not be all fun and profit. We know Clay Electric Cooperative and the city of Starke discontinued generating electricity several years ago, so where does their power come from? Primarily from two sources, each designed and operated for specific customers. Clay Electric Co-op buys exclusively from Seminole Electric Cooperative, a generating and transmission facility established in 1948 to give co-ops of electric customers buying power. Through its 10 member systems, Seminole Electric serves 1.7 million customers in 46 Florida counties. Headquartered in Tampa, Seminole has 300 miles of transmission lines and three generating power plants: a 1,300-megawatt plant on the St. Johns River in Putnam County, a nuclear plant at Crystal River, and a third plant near Wauchula. To provide perspective to Seminole Electric's contribution to the economy, it paid $35.8 million in payroll in 2007, and $9.4 million in property and sales taxes. The city of Starke once bought electricity from the Florida grid and Gainesville Regional Utilities, but now buys exclusively from Florida Municipal Power Agency, established in 1978 to provide electricity to member municipalities that had electric departments, that is, cities that were not being served by a private power company such as Florida Power and Light. Thirty municipalities, from Key West in the south to Havana in the northwest, are currently members of the agency, a number that has been constant for the past several years, although some have toyed with the idea of pulling out. That Part two of three West charges the highest rates in the state, possibly because of its location. Fuel adjustment charges are used throughout the industry to maintain a constant price per._- kilowatt-hour and reflect the fluctuations in cost of producing electricity. It is always listed as a separate item on the monthly statement. Since the city of Starke provides multiple utilities-electricity, gas, water and sewer-Starke customers receive a consolidated statement at the end of the month. A problem arises when a Starke utility customer compares his monthly statement with someone whose bill represents the cost of electricity only, putting Starke at a disadvantage. City officials caution Starke residents to compare the cost of electricity, plus the fuel adjustment charge with like services in other systems, and they may find that Starke's prices compare favorably. Or maybe not. The Starke electric department is a salable asset wholly owned by the city, that is subject to sale by city commissioners only after approval by three-fourths of qualified freeholders of the city. This information was contained in a letter from William C. Phillips, general manager and CEO of Clay Electric Co-op, dated Nov. 2, 1999, and addressed to Linda Johns, Starke city clerk. Subsequently, a meeting was held in which Clay Electric officials presented a proposal to purchase the utility from the city; but after due consideration, the offer was turned down. The purchase price was not disclosed, but the formula for purchasing customers by Clay Electric is probably standard throughout the industry, consisting of a payment equal to one year's revenue plus the value of the system, which may or may not be the owner's book value. In the 1999 offering, Clay Electric officials said the amount would pay all Starke's indebtedness to FMPA and allow the city to bank enough funds to provide income, when added to the franchise fee, to equal the city's present net-income. - Since that time there has been no movement between either side to reopen the discussion of buying/selling the city's electric system. When asked if Clay Electric is still interested in buying the city utility, Henry D. Barrow Jr., director of member and public relations, said Sthoughfis soon dismissed %%hen the member the co-op remains an interested:possible buyer, i city learns the cost of separating runs into the but it will not initiate any offers to purchase. millions of dollars. They find the long-term If city commissioners become interested in ..contractsffom-20-30years, subjects them to selling the utility, the co-op will submit an a pro rata share of the agency's indebtedness offer based on the standard formula, but it- incurred when FMPA buys or builds another will not make overtures to the city. generating station. Relations between the two entities remain Ten of the 30 FMPA members, including excellent. The two entered into a contract Gainesville, Orlando and Chattahoochee, did recently in which Clay Electric now remits to not purchase any electricity from the member- Starke a 6 percent franchise fee for serving a owned co-op in 2007. Gainesville owns GRU, handful of customers within the Starke city which generates surplus electricity. Orlando limits. The approximately 30 households owns and operates four generating stations, inside the city limits being served by the and Chattahoochee is served by Gulf Power co-op are located in the Lakewood area near and Progress Energy. Crosby Lake. The city of Starke gave some thought Throughouttheelectricindustryandcontrary to pulling out of FMPA, but the cost was to the price of commodities in a market prohibitive.Also,theopenmarkethaschanged economy in which higher volume lowers the and there may be insufficient electricity, price per unit, the more electricity a customer available to sustain uninterrupted electric uses, the higher the cost per kilowatt-hour, service. GRU once had surplus power, but the pricing unit for electric energy. Another Gainesville is a growing community and anomaly in the pricing structure, commercial may not be a reliable supplier for outlying users are charged more per kilowatt-hour towns. Starke is now an embedded customer than residential users, although the cost to of FMPA, bound with a long-term contract the retailer (think Clay Electric and City of and uninterested in looking elsewhere for a Starke) pays a flat rate for all the energy it supplier, buys from FMPA and Seminole Electric. Does FMPA charge its members more than Perhaps other industries have their own little they can buy power elsewhere? Probably not quirks and modus operandi known only to when one factors in the reliability factor and themselves. the long-term outlook. FMPA charges all Next week we'll continue the story of member cities the same rate, but the cities set Starke's electric system, citing some large their own retail residential ind commercial figures for a small community. It will be rates. Starke is mid-way on the scale of interesting and informative. FMPA members, with 13 cities charging less By Buster Rahn, per kilowatt-hour and 16 charging more. Key Telegraph Editorialist Cub Cadet/Yanmar Package Deal Se2400, 24HP, Hydrostatic i Transmission, Choice of Industrial or Turf Tires ..q R * CL 100 curved boom front loader ,4' Howse model 400 rotary cutter * 4' Howse box blade * 4 Howse disc, Middle buster plow, Sub soiler plow, 3 pt trailer hitch S2 HD straps O * 16' trailer wlbrakes onl'14, 999or213*,mo w/08i.doWn *Cub Cade/Yanmar payments figured with Campus for 96 months with 0 down. See dealer for financing details, IM-F95-St PTO members clear slate Dear Editor: As a member of last year's PTO at Starke Elementary and this year's as well, I was more than stunned at how the Telegraph reported on Mr. Hatcher's remarks at last week's meeting. While what was reported was true for the most part, the report neglected to report that the PTO members were being "held blameless" which were Mr. Hatcher's words. It is my understanding that the investigation is focused on what happened, if anything did happen, to the money after it had been turned over to the school's financial department. Instead the front page headline with ensuing article both seemed to imply that the PTO members themselves may be at fault. This is not the case. Leaving out this piece of information, intentionally or unintentionally, suggested impropriety on the part of PTO members where there was none. It's amazing to me that although we are almost to the Extension service offers small- ruminant workshops Agents from Bradford and Alachua County have teamed together to provide two small- ruminant workshops this nionth: Tuesday, Oct. 14, at the Bradford County Extension Office and Monday, Oct. 27, at the Alachua County Extension Office. The workshops are scheduled to begin at 5:30 p.m. with a light supper. The following topics will then be covered: internal parasite control, toxic plant identification and control, and winter annual planting decisions. One CEU will be available in one of the following categories: core, private applicator, and research and demonstration. Reservations for these end of the first 9 weeks of school and several of our grade levels still do not have all their reading material, or given that the Bradford County Fair was knowingly scheduled to coincide with the FCAT testing time, that the only real item deemed newsworthy from the school is a backhanded swipe at the hardworking dedicated volunteers who do want the best for our students at Starke Elementary. While I do not believe that was the newspaper's intention, that is how it was perceived by both PTO members (current and former) and community members at large. Since I had to repeatedly clarify this issue all weekend everywhere I went, I just wanted to set the record straight once and for all. The results of the investigation should be ready by the next PTO meeting, but until then, please remember that the PTO itself is not at fault. We are in the process of getting ready for our fall.festival and we rely on community donations to help make it a success. If our generous supporters do not understand that the PTO is not at fault, they will be less likely working days prior to the program in order for proper consideration to be given to the request. The only sensible ends of literature are, first, the pleasurable toil of writing; second, the gratification of one's family and friends; and lastly, the solid cash. Nathaniel Hawthorne' 1804-1864, American Novelist, Short Story Writer *4*< to donate. The money raised by PTO helps with many things necessary to give our children a quality program. It would be a shame if our children are the ultimate victims in all of this. Sherree Alvarez Editor's note: A review of - recording of the superintendent's discussion with the PTO reveals that that Superintendent Harry Hatcher, near the closing of his remarks, stated that the PTO would be held "harmless..and whole," meaning the money that was missing would be replaced--something he indicated more than once during the brief discussion. At no point did he state that the PTO would be "held blameless," and in fact, because .of the ongoing investigation, it appears great pains were taken not to indicate guilt or innocence on the part of anyone. Such is also the case with the article that appeared in the Telegraph, but we apologize if some feel that blame was implied. ST. LEO Continued from page 3B adult students who work full time and/or who have families by offering courses in the evening. The university's goal, she said, is to make education within reach for more people. "Education opens a lot of doors," Harden said. "We really believe in having an opportunity for as many students as possible." Saint Leo is a private university, so tuition is higher than at a public university, but Harden said financial assistance is available. For more information, please call (904) 562-9187. Harden may also be reached at the Andrews Center at (904) 964- 5382. Prospective students may also visit the Web site. The love of money is the root of all evil. Bible <*4* SANTA FE COLLEGE Think college isn't for you? Santa Fe has more than 70 career degrees and certificates-careers from welding to biotechnology, computers to carpentry, avia- _ I__Y 'I Oct. 9, 2008 TELEGRAPH, TIMES & MONITOR--B-SECTION Page 5B a for third straight S. undefeated season Bradford Middle School enters the Suwannee Middle Crawford, (back, I-r) assistant coach Samantha School Athletic Conference tournament with a 14-0 Harmon, Sonya Thornton, Morgan Green, Brlttney Hall, record. Pictured are: (front, I-r) Juanita Carter, Lainie Skyler Feltner, Nicole Jenkins, Lakla Bright, Jaqulesha Rodgers, Mackenzie Gualt, Jaci Atkinson, Taylor Williams and head coach Eric Verunac. 'Canes take perfect mark into tourney BY CLIFF SMELLEY Telegraph Staff Writer Bradford Middle School enters the Suwannee Middle School Athletic Conference tournament with a perfect record after defeating Williston Oct. 6. The Hurricanes (14-0) will play in the conference semifinals Monday, Oct. 13, at Lake Butler Middle School. If they win, they will play for the conference championship Thursday, Oct. 16, in Chiefland. Bradford settled for second place in the conference last season, blt that team had four losses during the regular season. Four eighth-graders who return from last year's team have provided a solid nucleus, but coach Eric Verunac said eighth-graders new to the sport have been big contributors, as well, along with one returning seventh-grader and three sixth- graders. If nothing else, the Hurricanes have proven to be a resilient group, having come out ahead in three tie-breakers to maintain their perfect record. Verunac said when the chips are down, the players seem to play harder. "This year's team plays with a lot of heart," he said. "They just seem to rise to the challenge." The four returning eighth- graders are Lakia Bright, Juanita Carter, Brittney Hall and Nicole Jenkins. All have made improvements from last year, Verunac said. Bright and Hall have great serves, he said. Bright has mastered a jump serve, while Hall's serve has so much power her nickname is "Fireball." Jenkins' play at the net has improved to where she's spiking and blocking, things she did not always do last year, Verunac said. As for Carter, Verunac said she just plays harder than anybody else, and she wants to stay on the floor and contribute. See'CANES, p. 10B BY CLIFF SMELLEY. Telegraph Staff Writer Lantz Lowery, the head coach of the Keystone Heights junior varsity football team, would've looked at you as if you were crazy if you had suggested his team could defeat a Yulee team loaded with athletes who run a spread offense by scoring just 14 points. Crazier still would be if you had mentioned the Indians would turn the ball over four times. Yet when time expired in the Oct. 2 game, the Indians stood victorious yet again by a score of 14-0.' It was the perfect example of how things have gone for Keystone this year- the offense leaves points on the field by committing turnovers and getting flagged at inopportune times, but a stout defensive effort allows the team to prevail. "Somehow the defense steps up when it has to step up," Lowery said. "We've been fortunate." The Indians have gone undefeated the past two seasons and improved to 4-0 this season with the win over Yulee. It has not been easy, though. The offense has scored just 46 points, with its 14-point total against Yulee tying a season high. Keystone wasted two scoring opportunities inside the 10-yard line against Yulee, fumbling the ball away once and turning the ball over on downs on another possession. Lowery said his team should've had at least 28 points. Yet Yulee had just one serious scoring threat, gaining a first down at the Keystone 20 in the third quarter. The Indians, though, would force the Hornets to turn the ball over on downs. Defensively, the Indians have allowed a total of six points this season. Lowery said the biggest reason for the team's success is that the players listen to defensive coordinator Mike Hartley and do what he says. "We don't get caught in the wrong defense," Lowery said. Some of the key players, he said, on the defensive side of the ball are Evan Harvey, Weston Jones, Chase Julius, Zach Lambert and Mike McRee, but Lowery said he could just as easily name every player. Lambert, an inside linebacker, is the best player on the team, Lowery said, adding that Lambert would be a starter on the varsity team if he was 15 pounds heavier. Lowery said Lambert, the team's leading tackler, possesses good speed, likes to hit and is smart. "He calls our defenses," See INDIANS, p. 10B WON rnr eln RULES OF THE GAMEN, Keystone Heights before 5 p.m. on Fridays. Fill in all the blanks with the name of the team you think will win. The person who picks the most games correctly will win $DO0. r1is Week's Wifner B.J. Amerson Missed 4 won w/tiebreaker r Dealer SPORTING , L2 a Boelles Radford CHANCE SLittle Caesarso 207 Orange St. 964-3300 Mau Fbnlanrl at Can Dipnn -LIK, 4 1 3q West Nassau 'S r ,..,,we,,NC. L .,, ,.C 904-964-3200 15000 U.S. 301 South at Keystone LARGE PEPPERONI PIZZA 1-866-665-2372 Starke 211 S. ORANGE ST., STARKE 964-7434 All Day Every Day Union County at Trinity Catholic 2 miles south of Starke on US-301 904-964-7200 Web address: SAWYER GAS SYour Local Full-Service Propane Dealer Wendell Davis, District Manager Taxas at Oklahoma (352) 468-1500 1-800-683-1005 Spires( "Hometown LAWTEY SUPERMARKET W Spi re 9 6 Proud" "Your Game Day Headquarters" 386-496-3361 Smoked & Fresh Meats Fresh Oysters in Stock I V Meat Freezer Packages Ice Cold Beer LSU at FloridaArizona St. at USCRepair 610 SW 1st St., Lake ButlerCoerUS 301 &CR 5 Sou Visit and contact us at: spiresiga.com (904) 782-3161 Lawtev. Fl (904) 964-6 ital City ik Tennessee at Georgia 350 N. Temple Ave. 500 Green Way S.R. 100E Starke, FL 32091 Keystone Heights, FL 32656 (904) 964-7050 (352) 473-4952 Vanderbilt at Mississlppl! iC' 2^^ State Sports Pub Come Watch any Football Game With Us! Great Food S everage Specials Deily! 904-964-WALE (9253) 301 E. Call St. in Downtown Starke western Auto For all your - Satellite Needs. 4. - s & Same Day Installation th Carolina at Kentucky 841 Lm,,II ownd 312 W. Call St. i8 1 operated ,over 40 vars. Starke. FL iys Steak House I City Bank *Gas GREAT STEAKS t AT A a GREAT PRICE! Beu I Central Florida "Your De at Miami US 301 S. STARKE, FL Handi-House Portable Buildings Over 65 buildings in stockl FINANCING~ AVAI ARI FI 964-8061 Jacksonville at Dnnver C US-301 North Starke St arolir Ji SBu Proudly s8avin Dal tarkP eA//eu CS Community wa hII B B Bradford County Teldegraph Establishcdinl57 State Bank /aler tor /Ye Sporting chance Penn St. at Wisconsin na at Tampa Bay STARKE LAKE BUTLER TownmandCountryFord 811 S. Walnut St. 255 SE Sixth St. hop (904) 964-7500 904-964-7830 "FDIC 386-496-3333 Community State Bank ackson Southern Professional lawteysupe aket Title Services, Inc. s Grocery ilding Supply Look For the llI)Door Beck Chevrolet our caMiNUty fr Or 448 year! For All Your land Tille Needs las at Arizona Baltimore at Indianapolis e tee lakp Rutlr T - D. Southern Professional Tile ................ 9.r-, ,PLO.......6......... LaKe Butler StarKe US 301 South 145 SW 6th Ave. 185 SE 1" Street 704 N. Lake St. Hand-House 904-964-3330 US-30 IS in Starke 964-6078 496-3079 386-496-0089 904-964-6872 SOffice Supplies Legal Forms FOR c Western Aut Gift Notions Greeting Cards since 1879H A % AES TIEBREA(ER SCORE: n Calculators Tewriters Co sersSnce87 f H A Y ES V, us f rtefrsA.i r Wjr ELECTRIC AND AIR CONDITIONING Sn UCorner of S.R. 16 & 301 N (904) 964-8744 FREE DEUVERY Mja 131 W. Call St. Starke, FL rmi NaNms: Miami at Houston Chicago at Atlanta Address: 110 WEST CALL STREET STARKE* (904) 964-5764 Email: editor@bctelegraph.com St, Louis at on ESIDENTIAL www. theofficeshopofstarke.com Fax (904) 964-6905 904-964-6305 Fax: 904-964-8628 T ER0> 00P Wash on Ms ter 6ho Insured Mc ., 0 5-IA0364" n,., ed 'I al a :IuaI --4 W I mrmrmrrrrrrrrrmmrnrrrmmrrrmmrm w % i ~ 1 :4- I Col Page 6B TELEGRAPH, TIMES & MONITOR--B-SECTION Oct. 9, 2008 OBITUARIES Dustin Marr Dustin Marr STARKE-Dustin "Dusty" Marr, 22, of Starke died Wednesday, Oct. 1,2008. Born in Gainesville, Mr. Marr was the son of Jackie Lee Marr and Rhonda Hinson Marr. He was a lifelong resident of Bradford County and attended Sampson City Church of God. Mr. Marr was an avid bow hunter and loved working on mud trucks and mud bogging. He was a great father and husband who loved spending time with his daughter most of all. Survivors include his wife, Christina Marr; his daughter Kailey Marr; his parents Jackie and Rhonda Marr and his grandparents, Wayne and Barbara Hinson. Dustin was preceded in death by his grandmother Donna Marr; his great-grandmothers Bertha Pentecost and Minnie Johns and great-grandfathers Pledger Johns and Henry Hinson. Funeral services for Dustin were held Saturday, Oct. 4, 2008 at 3 p.m. at Sampson City Church of God with Brother Gene Bass officiating. The family received friends from 6-8 p.m. Friday, Oct. 3, at the church. Arrangements were under the care and direction of Archie Tanner Funeral Services, Starke, FL. PAID OBITUARY Everett Padgett HAWTHORNE-Everett M. Padgett Sr., 84, of Hawthorne died Tuesday, Sept. 30, 2008. Born in Brooker, Mr. Padgett was the son of James William PREGNANCY TESTING RESOURCE AN -lEDICAL Information about Pregnancy Options, STDs, Sex and Relationships Completely Confidential ALL SERVICES ATNO COST M-W-F 10:30 -4:30 (904) 964-2007 766 A. N. Thompson St. Starke, Fl. (One block N. of S.R. 16) 1~ .. .. .. - REF Estimates SI *Collision Re Overall Pain Unibody Ali! *Welding *F "Thanks B For letting us se US-30 IN 2 miles north of Starke Padgett and Creasy Sweat Padgett. He was a resident of Hawthorne for the past 14 years and retired from Tachachale as a shift supervisor. Survivors include seven children, Randall Padgett (Lynn) of Gainesville, Janice Griffis (C.B.) and Everett "Marty" Padgett (Glenda), all of Starke, Gregory Padgett (Judy), Dana Padgett (Pam) and Kary Padgett, all of Hawthorne, and Roy "Benjie" Padgett of Jacksonville; two sisters, Cora Hilliard and Virginia Bleasdale; 20 grandchildren and 11 great- grandchildren. Mr. Padgett was preceded in death by his wife, Mary Kathryn Padgett; brothers Lloyd, Coleman, Abril "AZ" and Dewitt Padgett; a sister, Orene and a great-granddaughter, Alyssa Camille. Funeral services were held Saturday, Oct. 4, 20008, at 11 a.m. at Bayless Highway Baptist Church, Starke, with Brother James Parrish officiating. Burial was in Dedan Cemetery in Brooker under the care and direction of Archie Tanner Funeral Services, Starke, FL. The family received friends on Friday, October 3, 2008, from 6-8 p.m. at Archie Tanner Funeral Home. PAID OBITUARY Mary Davison BROOKER-Mary Colleen Davison, 53, of Brooker, died Wednesday, Oct. 1, 2008, in Gainesville, following a long illness. Born in Pinehurst, N.C., Mrs. Davison moved to Brooker from Gainesville. She was a member of St. Patrick's Catholic Church and a graduate of the University of Florida. Survivors include her husband, Pat Davison; three children, Caitlin Rose, Rosemary Christine, and William Lawrence; her mother, Catherine; sisters Deborah and Patricia; and a brother, David. A Mass of Christian Burial for Mrs. Davison was held Saturday, Oct. 3, 2008 at St Patrick's Catholic Church of Gainesville with Father Roland Julien conducting the services. Burial was in Gainesville under the direction of Williams-Thomas Funeral Home. In lieu of flowers, donations may be made to St. Patrick's Church Building Fund, 500 N.E. 161 Avenue, Gainesville, FL 32601. PAINT & BODY HOP, Inc. IANCE E - HOPla Ift pair Specialists it Jobs gnment/Framework iberglas & Glass radford County erve you for 9 years!" 90496' -:5: LS-.A No Paments No ayens fo.6MonhsAvailable-on Allodl- POLRRIS1 Of Gainesville Iris Brewer STARKE-Iris Vivian Brewer, 90, of Starke died Saturday, Oct. 4, 2008. Born in Portland, Ore., Mrs. Brewer wat the daughter of John Deardoff and Lillian Best Deardoff. She was a resident of Starke for the past six years and was a homemaker. She was preceded in death by her husband, John Henry Brewer. Survivors include her four children, Larry John Brewer of Palm Springs, Calif., Vivian Browden of Starke, Eddie Dean Brewer and Freddie Gene Brewer of Lebanon, Mo.; three sisters, her twin Lilly Brewer, Daisy Fuson and Marge Nordahl; a brother, Pete Deardoff, nine grandchildren and 18 great-grandchildren. Local arrangements are under the care of Archie Tanner Funeral Services. Leo DeSue Jr. STARKE-Leo DeSue Jr., 70, of Starke died Wednesday, Oct. 1, 2008 at Bradford Terrace Nursing Home of Starke following an extended illness. Born in Starke, Mr. DeSue was a lifelong resident and was a member of Pleasant Grove United Methodist Church. Survivors of Mr. DeSue include his companion, Dorothy H. Parrish of Hampton; his children, Emelene D. Wright, Martha J. Desue, Ronnie Risby, Donnie Risby, Roosevelt Risby, Connie Desue, and Ola Desue, all of Starke; stepsons Curtis Shell, Avery Schell and David Frazier; 26 grandchildren, 12 great- grandchildren; a brother damon Desue Sr. of Hawthorne; sisters Lydia D. Pittman, Marzie D. Jenkins, Issibelle D. Smith, Irene D. Kelly, and Rosa Desue. Funeral services for Mr. Desue will be held in the Desue Cemetery, Starke, under the direction of Haile Funeral Home. Visitation will be Friday, Oct. 10, with family hour 2-3 p.m.; friends 3-8 p.m. and one hour prior to services on Saturday. Lucille Tiller JACKSONVILLE-Lucille Strunk Tiller, 97, of Jacksonville, formerly of Keystone Heights and Kingsport, Tenn., died Monday, Oct. 6,2008. K; I Rodney King Sr SSTARKE-Rodney Wesley (R.W.) King Sr. died Monday, Oct. 6, 2008 at Shands AGH in Gainesville following an extended illness. Born in Auburndale, Mr. King lived most of his life in Starke. He was the son of Albert Wesley King and Ida Elaine Hodge King. Mr. King was a retired classification officer from Reception Medical Center Dept. of Corrections in Lake Butler. Mr. King was preceded in death by his son, Rodney W. King Jr. He was a member of the First Baptist Church of Starke. Survivors include his wife, Karen Parrish King; a son, Ricky Michael King and a grandson, all of Starke. Graveside funeral services will be held Thursday, Oct. 10, at 10:30 a.m. at Sapp Cemetery ii, Raiford with the Rev. Tim Rcesc officiating. The family will receive friends at the funeral home Wednesday evening from 6 to 8 p.m. Archer Funeral Home of Lake Butler is in charge of arrangements. "When You Say It With flowers ? It's beautifully Said" SJaia's ' SFlorist (904) 964-7711 8 wwwjN#lluflors Ave.coSr 218 N. Temple Ave.*Starke Born in Strunk, Ky., Mrs. Tiller was the daughter of Walter and Ella Strunk. Mrs. Tiller was preceded in death by her husband, James Kelly Tiller Jr.; brothers Olaf Strunk and Ronald Strunk of Hamilton, Ohio; a sister Opal Eversole of London, Ky. and a daughter Patricia Berry of Morrow, Ga. Survivors include her sons, James Kelly Tiller III (Rachel) of Hilton Head Island, SC and W. Gary Tiller (Susan) of Ponte Vedra Beach; seven grandchildren and six great-grandchildren. Funeral services will be held at 11 a.m. Thursday, Oct. 9, 2008 in Beach United Methodist Church of Jacksonville Beach. Graveside services will be held at 1 p.m. Saturday, Oct. 11 in Oak Hill Memorial Park of Kingsport, Tenn. The family encourages donations to the Mayo Clinic Jacksonville, 'Good Samaritan Fund' in memory of Mrs. Tiller, in honor of the nurses and medical team that provided her with such loving and compassionate care. Arrangements are under the care of Quinn-Shalz, A Family Funeral Home. & Cremation Centre, Jacksonville Beach. Gene Stewart STARKE-Bowman "Gene" Stewart, 67, of Starke died suddenly Friday, Oct. 3, 2008 at Shands Starke. Born in Americus, Ga., Mr. Stewart was the son of Eugene and Elizabeth Smith Stewart. He moved to Starke in 1982 from Georgia, retiring from the United States Navy as a Master Chief Petty Officer. He was of the Baptist faith. Survivors include his wife of 41 years, Patricia Kelley Stewart; a daughter and son-in-law, Sheila and Darren Evans and a son, Kelley Stewart, all of Starke; a brother, William "W.L." Stewart of Americus, Ga.; and two grandchildren, Easton and Logan Evans. Funeral services will be private at a later date. Jones-Gallagher Funeral Home is in charge of arrangements. PAID OBITUARY Since 19 a Since 1946 /y^ homo4 Kinetico home water syste-.ms 1-800-633-7114 "LOOK We Accept MEDICARE and MEDICAID Call Vision Tech, Grace by Dr. Gary Williams for your Pre-Eligibility at IndependentDoctor of Optometry .904-769-9593 : a Starke Wal-Mart CiVPOroiisUED COUPON REQUIRED CONTACT EYE rS LENS GLASS S^' M EXAM )R. WILLIAMS NOW ACCEPTS MEDICAID FOR EYE EXAMS 14 WAL*MART' '964-2250 ALWAS LOW PRC Vie.c. SOME FOOD FOR THOUGHT ABOUT BREAST CANCER. Breast Cancer Awareness Luncheon Friday. October 17. 2008 noon -1pm Shands Starke Atrium 922 E. Call Street In recognition of Breast Cancer Awareness Month in October. Shands Starke invites you to a special luncheon with a panel of experts: Bonnie Green. MD Family Medicine Shands Starke Medical Group Libby Brateman. PhD UF Associate Professor of Radiology and cancer survivor Joelle Innocent-Simon. I Family Medicine Shands Starke Medical Grou Reservations are suggested. but not required. The information you attain could be priceless. Shands Starke Shiands.org/stn rke I. I;i 12556 NW Highway 441 386-418-4244 #.. A.V "OW" **kb U.~Lam otOF& W3 1 anFII a mU 9- to re sevrl p St I 55da. . Give Up the Plastic Bottles, Not the Water (I got And Save Money Too! Reverse Osmosis 2 FREE Drinking s i REFILLABLE Water Purification I NON-TOXic B WATER BOTTLES FREE 90 DAY TRIAL IwITH EACH NEW s9U Rent with Option WTR SYSTEMIN L J - - - m MMMM ,Jcslll-r -c~cl~lt~L~I~s~lBI 'I LA/Al-I SExpires 10131/08 Expires 10/31/08 i' i:l . .'*1 Oct. 9, 2008 TELEGRAPH, TIMES & MONITOR--B-SECTION Page 7B OBITUARIES i, .. '. I i Allean Moore Allean Moore STARK'-Allean Moore, 100, of Starke died Tuesday, Sept. 30, 2008. Born and raised in Bradford Count\. Mrs. Moore was the daughter of Robert Haislop and Ella Sapp Haislop. She lived in HIillsboro County for many years before returning to Bradford County in 1970. Mrs. Moore was, of the Baptist faith. She was loved by everyone and helped her sister, the late Louise Ward, who was known as the Christmas Lady, decorate her home on the corner of Pratt Street and Orange Street. every year for many years. Survivors include her nieces, Nita Dobbs and Joyce Ward, both of Starke, Doris Johnston of Seattle. Wash.; and Judy Griggs and Kay Garver, both of Jacksonville. She leaves five grandchildren, 11 great- grandchildren and three great- great-grandchildren and many great nieces and nephews. Mrs. Moore was preceded in death by her husband, Claude Moore; her children, Preston (Jr.) Fillmon, Ralph (Tinky) Fillmon; a brother, Fred Haislop and sisters Inez Kelly, Louise Ward and Reba Crosby. Funeral services were held Friday, Oct. 3, 2008 at 3 p.m. at the Archie Tanner Funeral Home Chapel with Pastor Donnie Lott officiating. The family received friends Friday, Oct. 3, 2008, at 2 p.m., one hour prior to services. Arrangements were under the care and direction of Archie Tanner Funeral Services, Starke, Fl. PAID OBITUARY Howard Flynn MELROSE-Howard Lee Flynn, 94, of M2lrose died Thursday, Oct. 2, 2008 at Shands Starke. Mr. Flynn moved to Melrose 12 years ago from Walland, Tenn. after spending winters here for many years with friends. He worked for Alcoa Aluminum Company for 47 years, retiring in 1977. MIr. Flynn attended senior men's Sunday school classes at Eliam Baptist Church and enjoyed gardening and raising Chinese honeybees ---- ., --- ----.... Survivors include his son and daughter-in-law, Skip and Tina Flynn of Melrose; two grandchildren and four great- grandchildren. He is also'survived by, his lifetime friends, the Truman Perry family. Funeral services were held Saturday, Oct. 4, at Moring Funeral Home Chapel. Burial will be at a later date in Walland, Tenn. Arrangements were under the care of Moring Funeral Home. Herb Nelson KEYSTONE HEIGHTS- Ilerbert "Herb" Andrews Nelson Jr., 62, of Keystone Heights died Wednesday, Oct. I, 2008 at E.T. York Care Center in Gainesville. Born in Chicago, 111., Mr. Nelson was the son of Herbert A. Nelson and Mary Louise Ryan Nelson. Mr. Nelson grew up in the Keystone Heights area and received his BA degree from the University of Florida. Mr. Nelson served in the U.S. Navy Reserves and retired as a sales agent in real estate. He was an avid Gator fan and enjoyed fishing,, duck hunting, and was an avid golfer. Mr. Nelson also was a member of Am Vets and Ducks Unlimited. Survivors include his sons, Ryan Nelson of Texas and Byron Nelson of Gainesville; his step- mother, Lola Nelson of Gainesville; a sister Suzanne Szymanski of Wilmington, Dela.. Mr. Nelson was preceded in death by a sister, Mary Lu Hartman. Funeral services for Mr. Nelson were held Saturday, Oct. 4, 2008, in the Chapel at Jones-Gallagher Funeral Home. In lieu of flowers, the family requests that contributions be made to Haven Hospice, 4200 NW 90"' Blvd., Gainesville, FL 32606. R.J. Ridaught KEYSTONE HEIGHTS- Roderick Jennings "R.J." Ridaught 1I died Thursday, Oct. 2, 2008 at his home. Born in Johnson, Mr. Ridaught moved to Keystone Heights five years ago from Jacksonville. He was a retired police lieutenant for U.N.F. and also previously served as a Florida Highway Patrol state trooper. Mr. Ridaught was a salesman for Starke Ford, an avid Gator fan and was of the Baptist faith. Survivors of Mr. Ridaught include his children, Ray Ridaught of Callahan, Jeannie Allen of Hilliard, Michael Ridaught of Keystone Heights, Rod Ridaught of St. Augustine and Mark Ridaught of Jacksonville; a sister, Ann Ridaught of Tallahassee; six grandchildren and seven great- grandchildren. Funeral services for Mr. Ridaught were held Monday, Oct. 6, in the Chapel at Jones- Gallagher Funeral Home with Pastor Rob Morford officiating. Burial was in Ochwilla Cemetery in Hawthorne under the care of Jones-Gallagher Funeral Home of Keystone Heights. John Vaughn KEYSTONE HEIGHTS-John L. Vaughn 84, of Keystone Heights died Wednesday, Oct. 1, 2008 at E.T. York Care Center in Gainesville. Born in Charleston, W.Va., Mr. Vaughn was the son. of John L. and Rosabelie Vaughn. He moved to Keystone Heights in 1979 from Gainesville and was a member of the Keystone Heights United Methodist Church and Masonic Lodge. Before retiring,' Mr. Vaughn worked for the U.S. government as an auditor and served in the U.S. Navy. Survivors of Mr. Vaughn include his wife of 54 years, Joan Vaughn; a son, Thomas (Salina) Vaughn of Hawaii and six grandchildren. A memorial service was held Wednesday, Oct. 8, at 11:00 a.m. in the Keystone United Methodist Church with Pastor Don Corbitt officiating. Burial was in Keystone Heights Cemetery. In lieu of flowers, the family requests donations be made to the Lake Area Ministries, P.O. Box 1385, Keystone Heights, FL 32656. Arrangements were under the care of Jones-Gallagher Funeral Home of Keystone Heights. John Todd Sr. LAKE BUTLER-John Charles Todd Sr., 60, of Lake Butler died Wednesday, Oct. 1, 2008, at his home following an extended illness.. Born in Worthington Springs, Mr. Todd lived in Union County all his life. He was a truck driver and a member of the Baptist faith. He was preceded in death by his father, Lois Todd. Survivors include his wife, Tina Phillips Todd of Lake Butler; three sons and their spouses, John C. Todd Jr. (Loretta) and Justin C. Todd (Sara) all of Lake Butler and James Todd (Elizabeth) of Live Oak; his mother, Frances W. Todd of Lake Butler; a sister, Velma Jean Thomas of Lake Butler; two brothers, Gerald "Spook" Todd of Lake Butler and Melvin Todd of Lacrosse and three grandchildren. SR-230 E (2 miles east of US-301) AoM ~"-'~ II -.-~C~C-~-~ .Cd[) L~4177~ BBQ Night at the Country Club! All Thurs. Oct 16 5:30pm-8:30pm elcomel David's Famous BBQ Buffet Only $12 Speciality Desserts Beverage Children Catered by Cleo and David Elder 10 & under $5 Advance tickets available at the Pro-Shop Funeral services were held Monday, Oct. 6, 2008 in the Chapel at Archer Funeral Home of Lake Butler with the Rev. Terry Elixson officiating with cremation following, under the care of Archer Funeral Home. In Memory : In Loving Memory of My Dad Emmett Bright Jr. Jan. 5, 1935-0ct.9, 1998 I cannot believe it has been 10 years since I lost you. The pain is still as though it was yesterday. Words cannot express how much you are missed. So much has happened since you were taken from me. The most important of those is Igot remarried; his name is Tony. I really wish you were here to meet him. I am sure you would love him as much as I do and would be happy because your little girl is happy. The exact moment when I knew you would no longer be in my life was very painful. The day I saw you for the very last time is the greatest pain I carry with me. I know that our Lord and Savior knows best, and it is what gives me the courage and ability to live my life with a degree ofpeace and serenity without you being here. Dad, I love and miss you so very much! Your Baby Girl, Mischell Williams I.:,n Memory Card of Thanks We, the family of the late Sidney Williams Sr. would like to thank you for your calls, floral tributes, prayers, visits and all acts of kindness shown.during the demise of our loved one. We are grateful to be part of such a caring community. The Williams Family Happy Birthday Sidney Sr. October 9, 2008 Knowledge is not a passion from without the mind, but an active exertion of the inward strength, vigour and power of the mind, displaying itself from within. Ralph J. Cudworth British Theologian In Loving Memory of Emmett Bright Jr. Jan. 5, 1935-0ct.9, 1998 A golden heart stopped beating, hard-working hands at rest; God broke our hearts to prove He only takes the best. It's lonesome here without you; we miss you more each dby.. " We love and miss you dearly! Your Wife, Harridelle; Your Mother, Florence; and Your Children SFAY'S S Aesthetics & alt i 904-964-75791 Great New Look! CallFor Our Weekly Specials! 101-A Edwards Road ~ Starke tvvvww TvvwVVVTTVVVVVTTWwVwVVTYTVVwVV *i Site Work Clearing *Excavation Ponds Fill & Sand Ball Diamond Clay Limerock J ro.*.. ., Private Driveways Topsoil* Milling ....... I I,- .w aT 1, ,: ... : S(352) a4.021 We Also do Stumpgrinding! //ssA%- 11111 AA AAAAAAA AAAAAAAAA AAAAAAAA/AAAAAAA AAAAAAAA *Get Your FREE Spinal Screening Examination! ($125 Value) YOU MAY HAVE ONE OF THESE 16 DANGER SIGNALS OF PINCHED NERVES Dr. Martin Slaughter spine, an examination for swelling and muscle spasms and a private consultation with the doctor to Chiropractor discuss the results. This examination Is entirely FREE. ropr FREE LIMITED TIME OFFER. Call for your appointment TODAY! This entire examination is FREE. If you want more STARKE CHIROPRACTIC INC. care and treatment, we do all the paperwork. STARKE CHIROPRACTIC INC. 9 225 South Orange Street 904 368-0011 Stake, FL 32091 CALL NOW...BRING THIS COUPON WITH YOU *to Federally s may .n~~ l te I icrelu ka ldu o F klsule. UR OFFIC POUJCY I THE PATIENT*AND ANYOTIER PlERON RElSPO e PAYMENT HS A RIGa TTOIAUSE TO PY, CANCEL PAYMENT OR BE REIMiBU D FOR PAYMENT FOR ANY OTHER MERVIC EXAMINATION OR TREATMENY WHICH ac PE t ORMeD A A REIrao T OF Q WTIeN I HOURS OF RE OIN TO TE S ADVERI NT FOR TUEM FRE DIS OUNTED Frs O REEUCEDC FEE elRVICEl XAMINAI1ON OR TREATMENT. FDL 2005 FREE- - - - BRADFORD COUNTY EYE CENTER is peasedto announce the association of Dr. Michael Schlofman Optometrist S Dr. II I Dr. Leonard Schlofman ~ Optometrist Dr. Kevin McAuliffe Opthalmologist James Staman Diabetic Retina Specialist Medicare & Most Insurance Plans Accepted (904) 964-8076 eciali'S Saturday Morning Appointments Available 1105 S. Walnut St. (US 301 South) Starke, FL We offer these Special Packages for at-need and first-time pre-need subscribers A r bi r Pre-payment accepted) Funeral Home "Within Your Means Now, Peace ofMind Always " 386-496-2008 986-496-2056 55 North Lake Avenue Lake Butler, Florida 32054 ldika60 6)c4jc K-boh 'Ar14 a Kibo '3t< ljbort2la ' Tilme to AcessoNzize O ZERO Down! ZERO % On New Kubota Tractors and Implements 0% for 36 Months All New Kubota Tractors, Implements, , Accessories and Selected Land Pride Implements o 0% Down 0% for 42 Months Neq# Kubota Tractor Implement, Accessory ZD, F. BX, B Sand Selected Land Pride Implements * 0% Down 0% for 54 Months , SNew Kubota Tractor Implement, Accessory A L, M 821, 826 CE and Selected Land Pride Implements 0% Down 0 ) / r.With Approved Credit -Y I Program ends 12-31-08 1 -r-4502 NW 13th Street Gainesville lil(, enugliht, diii RIGHT. Smoll enough n C RE! 352-376-4506 0 OPEN: Monday Friday: 8 P.M. 5 P.M., t l. )o. P... ( j ,.)..j l j ..)-,i '' I I 4 d Page 8B TELEGRAPH, TIMES & MONITOR--B-SECTION Oct. 9, 2008 '. I c *- ' Carl J. Mitchell and Erica LEFT: Jaydin Alvarez. Andprson ABOVE: Dustin Homer Jr. Families give birth to cousins Aug. 29, Sept. 9 James and Mary Crawford Crawfords celebrate 50th anniversary James and Mary Crawford celebrated their 50th wedding anniversary at the Starke Woman's Club Saturday, Sept. 27,, 2008. The location was a very special one in that it was the site of their very first date. The couple enjoyed a sit- down candlelight dinner with over 50 family members and friends. Special words were given by their pastor, Dr. Rodney Coe; their good friend Laura Theus and their granddaughter, Amanda Stevenson. Son-in-law Martin Seay and Adam Stevenson entertained the guests with a special song. The Crawfords were married in Starke September 27, 1958. Following their retirement from the Army after 30 years of service, the couple returned home to Starke. The couple's daughter, Joella Seay and granddaughters Emily Seay and Amanda Stevenson, planned the occasion. Jimmy and Martha Sue Dyal Dyals celebrate 50th anniversary Jimmy anu Martnu Sue Dyal, who were married Sept. 12 1958, were'honored with a 50 anniversary dinner party Friday, Sept. 12, 2008. The celebration was held at the Starke Golf and Country ,Club and was given by their children, Terri and Larry Paterson and Eddie and Rhonda Dyal. The club was decorated entirely in gold and white lights. The tables were centered with gold candles surrounded by confetti made of the couple's original wedding pictures. The cake was a three- tiered white fondant wedding cake decorated with gold ribbon and gold dust and was topped with a gold and rhinestone "50". The cake was made and decorated by the couple's granddaughter, Hope Davis. The dinner was catered by Cooter Bob's Catering of Starke. Approximately 100 guests enjoyed the celebration including the best man, maid of honor and many friends and family from out of state. *W-lr, It Is easy to hate and It is difficult to love. This Is how the whole scheme of things works. All good things are difficult to achieve; and bad things are very easy to get. Morarli Desal, Indian Statesman, Prime Minister. Your Satellite Sales "j Additional Cable Runs Wnd Services & Phone Lines N E T WO R K %LW--l Authorized Local Dealer Paul Jones L.L.C. Office: (904) 364-6612 Cell: (904) 622-6492 Fax: (904) 964-2447 Email: gjones01 @embarqmail.com Jaydin Alvarez Billy Alvarez and Brittany Durrance of Keystone Heights announce the birth of their daughter, Jaydin Summer Alvarz, born Sept. 9, 2008, in Gainesville. Jaydin weighed 8 pounds and 7 ounces and was 21 inches in length. Maternal grandparents are Wendell and Patty Durrance of Gainesville and Howard Durrance, of Gainesville and Alene and Billy Mosley of Lawtey. Paternal grandparents are Tracie and Shawn Brown of Keystone Heights and Randy Alvarez of Starke. Paternal great grandparents are Don and Dot Denton of Keystone Heights and Owen and Julia Alvarez of Starke. Elias Feagle Justin and Kamie Feagle of Keystone Heights announce the birth of their son, Elias. Cooper Feagle, born Sept. 22, 2008, at 8:21 a.m. in Gainesville at Shands UF. He weighed 7 pounds 4 ounces and was 20 3 inches in length. Elias joins an older brother, Landin. Maternal grandparents are Dustin Ziek Homer Jr. Dustin Ziek Homer Sr. and Tamara Lynn Waters of Keystone Heights announce the birth of their son, Dustin Ziek Homer Jr., born Aug. 29, 2008, in Gainesville. He weighed 6 pounds and 14 ounces and was 191/2 inches in length. Maternal grandparents are Kenneth and Mary Waters Sr. of Starke. Paternal grandparents are Tammy Denton of Keystone Heights. Paternal great- grandparents are Don and Dot Denton, also of Keystone Heights. Jaydin Alvarez and Dustin Homer are second cousins. Jack and Vickie Moran of Hampton. Maternal great- grandparents are Lester and Betty Dawkins of Homestead and the late Don and Betty Guthrie, also of Homestead. Paternal grandparents are Joe and Dibble Feagle of Keystone Heights. Paternal great-grandparents are Virginia Bleasdale of Keystone Heights and the late James Feagle of Alachua. Pride Enterprises/Forestry Division 6 ft All wood picnic tables, made of sturdy 2x10 matral are available at our new low S price of $115.00 at Pride Forestry on SR 16, Ol aross the street from Union Correctional *hur .p Instibtion in Raiford, FL. Try us out and enjoy our new low prices on all of our products. 13518 NE 258th Ct. Raiford, FL 32083 Call us at: 1-866-228-5135 oron the web at: SOpen to the public: Mon-Fri 8:00 3:00 Anderson, Mitchell to wed Oct. 25 Erica Lynn Anderson and Carl .J. Mitchell, both of Lawtey, announce their upcoming marriage, set for Saturday, Oct. 25, 2008. The bride-elect is the daughter of Lamar and Terry Anderson"of Lawtey. She is a graduate of Bradford High School and is employed by Shands Medical Group. Ms. Anderson is also a member of Madison Street Baptist Church, Starke. The groom-to-be is the son of Carl Mitchell Sr. and Debra Mitchell of Keystone Heights. He is a graduate of Keystone Heights High School and is employed by West Frazier. The wedding will be a private ceremony Oct. 25, with a reception following at the Starke Golf and Country Club at 6:30 p m. Following the wedding, the couple will reside in Lawtey. Choose an author as you choose a friend. Sir Christopher Wren ++<* Etheridge, Tomlinson to wed Oct. 18 Jamie Etheridge, daughter of Steve and Debbie Ethqridge, and Matt Tomlinson, son of Marvin and Diane Tomlinson, all of Lake Butler, announce their upcoming marriage. The bride-elect is a Union County High School graduate of the class of 2002; a 2007 graduate of Lake City Community College and is employed by The Health Center of Lake City as an LPN. She is also a member of First Baptist Church of Lake Butler. The groom-elect is a 1997 graduate of the class of Union County High School and is a member of First Baptist Church of Lake Butler. The wedding is planned for Saturday, Oct. 18, 2008, in the First Baptist Church of Lake Butler with a reception to follow at Circle S. All friends and family members of the couple are invited to attend. Nine tenths of education is encouragement. Anatole France' 1844-1924, French Writer *** S'S Tree Service and Timber Company FREE ESTIMATES 24-Hr. Emergency Service * Removal1 1pping *Trimming Stump Grlinding, Storm Damage jaisadf J LfaltfAl Snm!t-di- Coun-tis. '- W L * RED STARLING RADFORD RESIDENT 352-485-2197 352-215-0337 CONSOLIDATE BILLS NO CLOSING COSTS TAX DEDUCTIBLE INTEREST Sound too good to be true? As a customer-owned financial institution, Florida Credit Union is dedicated to serving only the interests of our customers. Our success is not based on making a profit by charging high rates and fees. Receive a FREE credit report along with a FREE analysis and lower your rate today!. WFlorida MCredit Union Gainesville Ocila (352) 377-4141 (352) 237-8222 Lake City (386) 755-4141 Starke (904) 964-1427 . i Now at Bliss Salon 904-263-8061 417 Edwards Rd. Starke, FL b tour l:eam, you're the MVPI Danny Wuerffel Hesman rvtpn, M.tier, You've worked hard for your home now make it work for you with a Home Equity Line of Credit from Florida Credit Union. REDUCE MONTHLY PAYMENTS OBTAIN CASH TO PAY BILLS IMPROVE YOUR CREDIT SCORE 1 CASH REBATE!f S EXAMPLE: $50,o00 loan = $500. cash in your pocket! ' ,"' '*- .. I u wvifmr Tr mic i n1*FF nM AAI l II .1I I Mt UNLY LIUMW I Ktt XKVlr~~11( I L ----- I1hl Al w 1 rA LmI Illb KM1. 1, I Oct. 9, 2008 TELEGRAPH, TIMES & MONITOR--B-SECTION Page 9B Church to celebrate Pastor's Anniversary Magnolia Missionary Baptist Church of Raiford will be celebrating Pastor Henry and Sister Jackie Ortiz's first pastor's anniversary Sunday, Oct. 19, 2008, at 11 a.m. and 3:30 p.m. Associate pastor, James Parrish of Grace Baptist Church of Starke, will be the morning speaker. Pastor Alvin Greene and .-the. St. Paul Missionary Baptist Church of Winfield, Lake City, will be in charge of the 3:30 p.m. service. Directions to the church are Hwy. 100 through Lake Butler, turn left at CVS Drug Store/Hardees onto S.R. 121 North and travel approximately five miles. Magnolia Baptist Church is on the right. Griffis reunion set for Oct. 18 Descendents of Westberry Griffis (1835-1905) and successive wives, Penny Padgett Griffis, Eliza Wilkerson Griffis and Laura Blitch Griffis, will hold a family reunion Saturday, Oct. 18, 2008, at Evergreen Baptist Church, Hwy. 125, Lawtey, from 11 a.m. to 3 p.m. Please bring a covered dish. Tea, ice, plates and utensils will be provided. Any questions, contact Dorothy Griffis Lindsey, 386- 842-5007, or Norma Redding, (904) 259-2170. More income a retiremi 6.40%* Elbert Arnold Soiuthall, Agent 119 N Walnut Street Starke, FL32091 Bus: 904-964-5391 elbert.southall.b2vz@statefarm.com Brooker Fall Festival Oct. 18 Brooker Elementary's annual PTO Fall Festival will be held Saturday, October 18 at the school. The parade will begin at 4:30 p.m. All participants should meet at Loven' and Learning Day Care at 4 p.m. The Festival will begin at 5 p.m. Come and enjoy food from the concession stand, Bingo, Kid's booths, cake walk, train, pony rides, hay ride and much more. Give-Away prizes for $1 donation include a .12 gauge shotgun ($250 value, Wal Mart gift card); $200 gas card (gift card); evenings out gift certificates ($50 each to Outback, Olive Garden, TGI Fridays. For more information, call the school office, 352-485- 1812 or 904-966-6887. BHS Class of '78 planning class reunion The Bradford High School class of 1978 is planning its 30h reunion. Dates are Oct. 31 and Nov. 'l-to-.oincide(ivahoo.com. Swine Association meets Oct. 13 The Bradford-Union Swine Association will meet Monday, Oct. 13, at 7 p.m. in Lake Butler at the elementary school. The meeting is for registration. All meetings are mandatory. It 5 A ent? Single remium Defened Am*iy current effective annual interest rate for 10-year rest Rate Guarantee Period based on premium $50.000 as of 09/16/2008. Rate includes a 1.00% nus in the first year. At the end of the first year. e interest rate is reduced by 1.00% and is aranteed for the remainder of the guarantee riod. tax benefit today, plus retirement come you can't outlive. Let's talk bout the FUTURE INCOME PLUS eferre.d annuity from State Farm. sfatefarn cm* Lower rates apply for lower premium. Rate subject to rh.geq wttiui nolnce Ai1I31 rale cre died will b rate in effect on the day premium is received. After 10 year i. a new guarileed interest rate not les MI Aj0304/ & AJ03ir7 In N. 03l47 & 0( ij 7 in OR PA. IT and A03040 & A01090 in WI SuIte farm In:uian.e jriIpany Bloimiington iL INo l Icen;el in MA. NY and Wl) Staile F rm L[fe apd Ac lenl Asturdan,. Cri pany llooimi-nl on i (Licenerd in NY and WI) Poz820ao 0' IA Not FDIC In.uijid N)o B.anr, I.urnlnee M3y Lose value 4820 NW 13th ST E trt GAINESVILLE, FL 7ofEm ea 352-376-2637 STREITS.COM ATVs Mwth engines 90c or greater are t nmmmdned for ui only hI nd ers ge 16 year and older Ymaha unrommends that all ATV ndens tal an apilpod Iranning couse rTota iy and itininignlfomaon e your dealer o all the ATV Sletylnitute at 1-800-M 2887.7 *ATVscanbenhaurdcstoopeate forp u salesy Alwaysvoid pand surlfces NeO r ndeon publ rods Always wear helmet .ee prom iou a nd protectl clo hint nrev rcany pene Nr ng .ae.....inluon lidin Mn and lcomol / udonl m i, d a e, e i YAM AH A Speed An b particu. llrcalul on dilflHcul 1illn Prol .iionil idri depya d on i cloed coure Y Kilee Higgins Higgins passes state EMT exam Kilee K. Higgins, daughter of Debbie and Carl Halle of Starke, has successfully passed the Florida state emergency medical technician board examination and was nationally certified as an EMT on Sept. 11,2008. Higgins, a 2005 graduate of Keystone Heights High School, attended and graduated in July from Florida Medical Training Institute in Jacksonville. She received more than 80 hours of hands- on training by attending EMS rescue calls and working hospital shifts. Higgins is employed as a supervisor at Johnny's Bar-B- Q in Keystone while she continues her education and is actively involved with the Keystone Heights Volunteer Fire Department. She plans to attain an EMT position and pursue a career as a respiratory therapist. Book love... is your pass to the greatest, the purest, and the most perfect pleasure that God has prepared for His creatures. Anthony Trollope' 1815-1882"British Novelist R 0 T C IZN YOU LOOKED.... and so will others! Place your Ad here for $30 Call Darlene 904-964-6305 darlene()bctelegraph.com IMMEDIATE CARE CENTER of Starke 904-964-5455 Medical Care When You Need It! WALK-INS WELCOME 345 W. Madison St. Starke, FL ONE STOP TAILOR SHOP Alterations Embroidery. 904 Comer of Hwy 301 966-2002 & Edwards Rd. Starke, FL (UESTr Keystone Pq Auto Parts "Locally Owned & Operated" 352-473-3561' 7419 SR-21 N Keystone Heights, FL Food Mart* Gas* Coin Laundry 386-496-1601 260 W. Main St Lake Butler, FL HAYES ELECTRIC & AIR CONDITIONING 904-964-8744 T trU, State Lie. RA0033644 Corner of SR16 & US301 Starke UNION MEDICAL SUPPLY 386-496-3656 Complete Line of Home Recovery Equipment & Supplies 655 E. Main St. Lake Butler, FL Off to Iraq Company C of the 146th Signal Battalion, which deployed to Iraq Oct. 5, is composed of several people from the local area, including (from left) Ricky Kite of Starke, Shawn Miller of Starke, Mike Furhman of Lawtey, Becky Norman of Starke, David Steinmeyer of Lawtey and Chris Porter of Orange Park. .- --- -.----------- ------- ---~~\~~ The ceOWBOe Sauce Boss is Back! ffJ WI4/, He Sings the Blues -*4 -A , He Cooks the Gumbo UCIIU He Plays the Guitar -- He Feeds the Masses o M He Makes his n't, ,iStl Very Own Hot Sauce Don' Miss I! hat's why they call him... ,dJ A/A THE SAUCE BOSS! 2 Can Dine for $20 Mon.-Thurs. 4 p.m.-close Howiyli 3i0 S terL* at- Hwy 301 South Starke, FL 904-368-3800 Renovation, Remodeling New Construction - Residential and Commercial Richard 0. Tills Sst Contracting, Inc. 386-496-1360 ' Call for a Free Estimate | LIC# CBC1254779 190 West Main St Lake Butler, FL 32054 CROSSWORD 1." Like It Hot" 5. Kuwaiti, e.g. 9. Katherine _, German-American botar 13. Certain surgeon's "patient" 14. 0. Henry's "The Gift of the 15. Editor Harold 16. Acts of increasing wealth 19. Swedish shagtrug 20. Animal with a mane 21. Hang around 22. Abreast of. 23. Bundle 24. High land 27. Of heaven or the spirit 31. Air freshener option 32. Docs for dachshunds 33. Brown, e.g. 34. Extinct primitive toothed birds of the Jurassic period 38. "Didn't I tell you?" 39. Bit 40. Nitrogen compound 41. Rock boulders that differ from surroi bedrock due to glacier transportation 44. Admission 45. Magician 46. Small buffalo of the Celebes 47. More pale ' 50. Hodgepodge 51. All the rage 54. Englishmen from a high social class think they are Intelligpen and Important t not . 57. Reproductions of sound with little or distortion ' 58. Dash 59. Used in animal feed 60. "Beowulf,e.g. 61. 1992 Robin Williams movie 62. It may get into a jamb 1.Antares, for one 2. Bacchanal 3. Prefix with phone 4. Always, in verse 5. Embryonic sac 6. Heaviest of the inert gases 7. Not "fer" 8. Show 9. Plane, e.g. 10. Caroled 11. A chip, maybe 12. Union of Soviet Socialist Republics 15. "South Pacific" hero 17. Petting zoo animal 18. Go by, as time 22. Its motto is "Industry" 23. Montana city ' 24. Nonchalantly unconcerned 25. Personnel director 26. Gastric woe CROSSWORD PUZZLE ist 27. School rmos. 28. Mythical, female water creature in German folk tales 29. Perennials of the genus Geum 30. Dissolutions or destruction of cells 32. Express 35. Someone who leaves one country to settle in another 36. Masked omnivorous nocturnal mammal S37. Poolsite, maybe 42. Pertaining to a group of organic compounds of nitrogen derived from ammonia 43. Asian weight units 44. Negative particles 46. Forever (archaic) 47. Advil target 48. FedEx, say funding 49. LP player 50. Christiania, now 51. "My !" 52. Sundae topper, perhaps 53. Bomba, Western name for the RDS-220 hydrogen bomb 9-25-08 55. Undertake, with "out" S56. Clinker -. Answers to 10-2-08 puzzle *37 7 .jJ.^, .. ..a1ltaji.. ci.. Integrity- Fir Last, Always -i on The Law Qffices of Douglas E.Massey moving Hands ( .-- JASON'S IDEAL CRIMINAL DEFENSE et Sitn LAWN CARE SERVICES, LLC i SIGNS/ Interior & Exterior Owner Jason Neiss 4 (904) 964-6465 Leave your pets at home Sandblasted Lighted *Silk Screening Residential Commercial 19580 NW SR-16 Starke, FL while you travel! Logo Design Embroidery 352-235-7247 Serving Bradford and UnionCounties 352-473-4174 352-359-0575 12696 Hwy 301 S 904-964-CARL FREEE ESTIMATES! "3 * g>* *< - - , a I ~ ' : c. . c j I Page 10B TELEGRAPH, TIMES & MONITOR-B-SECTION Oct. 9, 2008 i keystone's Chase Julius va .iert) prepares to tackle a Yulee ball carrier. INDIANS Continued from page 5B Lowery said. "He gets us lined up correctly." As tough as the defense has been this season, one thing it has not done is create turnovers. In fact, the team had its first turnovers of the season against Yulee when Julius intercepted a pass and Jones recovered a fumble. Overall, the defense relies on quite a few freshmen, including both starting safeties and one starting corner. Lowery said he has played more freshmen this year than he has in the past. "That's not what I like to do," he said, "but the little dogs can hunt." There is minimal substitution on defense, which contrasts greatly with the offensive side of the ball. The team's offensive backfield, for example, has three' players who fill the fullback position, while nine fill the two running back positions. Most of the backs are starters on defense, so the liberal substitution helps keep them fresh, Lowery said. He wants his best 11 defensive players to be able to play every down on that side of the ball. The offensive line, though it has three freshmen in the starting lineup, has done a good job of blocking, Lowery said. The key player, he said, is left tackle Tyler Jolley, who is the best lineman Lowery has coached in a while. Jolley missed just one block against Why Pay More? We Invite Comparisons. Over 100 trusted companies ONE CALL WE DO ITALL *AUTO HOME MOBILE HOME BUSINESS GENERAL LIABILITY WORKER'S COMPENSATION *BONDS Easy pay plans, Fast computerized quotes. INSURANCE 1111 NW 231 AVE. GAINESVILLE, FL Hours: Mon-Fri 8:30-5:30 352-371-9696 Yulee. The reason for Jolley's success is not so hard to explain. "He locks on you. He doesn't let go," Lowery said. "It's real simple." Keystone opened the year with a 12-6 win over Bradford. Since that game, the Indians have not given up a point. They defeated Interlachen 14-0 and Union 6-0 prior to defeating Yulee Oct. 2. The defense set the tone early in the win over Yulee. The Hornets did quickly move into Keystone territory on a 15-yard run to the 37, but Jones blew up a running play in the backfield for a 4-yard loss, while Matthew Dickinson had a sack for a loss of 11 yards on a fourth-down play. A 15-yard run by Lambert and a 12-yard reception by William Howell .netted first downs for the Keystone Zach Lambert carries the ball for Keystone against Yulee. He scored one touchdown on a 12-yard run. SAN MATEO SEAFOOD ore ^ raid Shrmpaid you A r k! f just ,A g|KH4 '^1^^ W ADZenGl MADE WITHOUR ST. AUGUSTINE SECRET RECIPE (386-325-1871 Limit I coupon per person Must present to server. Exp. 10-31-08 offense on its first series, while an 8-yard run by Robert Rossano set up first-and-goal at the 10. The Indians would fumble the ball, however, with Yulee recovering. Late in the second quarter, the Indians were poised for a first-and-goal at the 9 after a weaving, 13-yard run by Lambert, but a personal foul at the conclusion of the play backed the Indians up to the 24. The next play, however, saw quarterback RJ. Buxton find Howell in the end zone for a touchdown and a 6-0 lead 11 seconds before halftime. Keystone fumbled the ball away on its first possession of the second half. Yulee drove to the Keystone 20 before eventually turning the ball over on downs. Lambert gave the Indians their second score when he scored on a 12-yard run -with 3:01 to play in the third quarter. Buxton's run on the two-point conversion capped the scoring. Yulee did try to drive downfield and get a score before the game ended. A 24- yard pass play put the Hornets at the Keystone 39, while a 7- yard run later gave Yulee a first down at the 27. The game would end, though, when McRee sacked the quarterback and forced a fumble. Lowery would like to see his team eliminate some of the mistakes that have plagued it all season long. The Indians' next three games are against West Nassau, Fort White and Clay. All three teams could beat Keystone, Lowery said. Still, Lowery preaches to his players every day in practice that have to forget their mistakes and move on. They've gotten that message so far as nothing seems to bother them. "It's a bunch of squirrely kids who don't seem to get too rattled by anything," Lowery said. The Indians' remaining schedule is: Oct. 9, at West Nassau; Oct. 16, Fort White; Oct. 23, at Clay; Oct. 30, Interlachen. All games are scheduled for 7 p.m. _- .. .: . .- First fish Meg Whitten, the daughter of Terry and Kathy Whitten of Starke and the granddaughter of Bob and Elaine Snyder of Starke, caught her first bass on Sept. 27. Meg was using a cane pole while fishing a private pond. The fish weighed approximately 4 pounds. 'CANES Continued from page 5B "She gets mad at me when I take her out (of a game)," Verunac said. The team's other eighth- graders are Skyler Feltner, Morgan Green, Sonya Thornton and Jaqueshia Williams. Returning seventh-grader MacKenzie Gault is the perfect example of a gym rat, Verunac said. She is always working on the court to try to improve her game. Sixth-graders who joined the team this year are Jaci Atkinson, Taylor Crawford and Lainie Rodgers. They are an impressive group, Verunac said. "They've really picked this game up," he said. , Verunac admitted that he felt this year's team would be good, but he never would've envisioned a chance at going through the season undefeated. "It's a welcome surprise," he said. Wit is educated insolence. Aristotle' BC 384-322, Greek Philosopher' *<'< Community Concerts Of Lake City PRESENTS: 2008-09 GOLDENANNIVERSARYSERIES OF LIVE PERFORMANCES At Levy Performing Arts Center Lake City Community College "Puss in Boots" s /iS "T I/ /lPff '-lria"dwaiy style ful'mcr ar THIS COMING FRIDA Y, OCT 10 at 7:30 PM Uocomino Performances > DANIEL NARDUCI, Movie-star handsome operatic baritone singer. 3 pm Sun Nov 9 > NUTCRACKER BALLET featuring Dance Alive National Ballet 3 & 7:30 pm Sat Dec 6 supported by a cast of fifty local dancers & tumblers. > PIANAFIDDLE honky-tonk pianist joins classical violinist. Fun! 7:30 pm Fri Jan 30 > HECTOR OLIVERA world class organist; sounds like an orchestra. 7:30 pm Fri Feb 20 > THORINGER SALONQUINTETT featuring John Denver music. 10:30 pm Tue Mar 10 Subscribe at the door, or website, or Lake City Chamber of Commerce for all six live programs: $50/Adult or ONLY $5/Student K-121 Tickets are also available at the door one hour before show: $18/Adult or $5/Student K-12, and $5 standby for LCCC students w/current ID Questions? Subscriptions? Visit or call (386) 466-8999 pi / Beth is a Lifelong Residentfof Bradford County. / Beth has Proven Character: Honest, Dependable, Consistent, and Fair / Beth has Educational Experience: 1 Bradford and Union County Schools Santa Fe Community College / Beth is Educated: 01 Doctorate Degree in Educational Leadership w* Current Florida Certification in Educational LeadersI Beth Moore has the right credentials for the 41 1~~' hilp, 4'1B MOO B for Superintendent of Bradford County Serving North Florida since 1979. Ucensed as a not-for-profit hospice since 1980. Please visit vww.votebethmoore.com .c: for more information. Pd. Pol. Adv. Paid for and approved by Beth Moore, Republican for Superintendent of Schools. >., 480 S. U.S. HWY. 17, SAN MATEO Just 4 miles S. of bridge In East Palatka Put Your in HAVEN, Elect r What qualifications are.you looking for in your next Superintendent of Schools? ..~I :, ;.l.IA. F, . I GRAPH, I vlLS & MONITGO. -B-SECTION Page 11B Indians lose heartbreaker in overtime to Fernandina Union County running back Najeeb Smith sprints ahead of the Santa Fe defense for an 85-yard touchdown in the second quarter of the Tigers' 49-22 win. r \ ---'--I i' 'Ih' ~QI; u .i-...~-...,,~. ,....... -. -- -ag~~.-t ,,a ..a-xl .*Q~~'~ Tigers run their way to 49-22 win over Santa Fe BY CLIFF SMELLEY Telegraph Staff Writer Deven Perry, fresh off of a standout effort in a loss to Newberry Sept. 26, turned in another strong performance, but this time he got plenty of help from backfield mates Najeeb Smith and Justin Tyson in the Union County football team's 49-22 win over visiting Santa Fe Oct. 3. Perry, who rushed for 188 yards against Newberry, gained 131 yards on 15 carries against Santa Fe, scoring three touchdowns in the process. He was just one of three backs who eclipsed the 100-yard mark for Union. Smith led all rushers with 142 yards and two touchdowns on 10 carries, while Tyson added 108 yards and a touchdown on seven carries. The trio helped power the Tigers (3-2) to their third win, which equals their win total from last season. Lane Presnell's 14-yard touchdown reception from Frank Sneak pulled the Raiders (1-4) within 22-14 in the second quarter, which is how the score stood at the half. Union pulled away with three touchdowns in the third quarter, while its defense pitched a shutout. Perry got the scoring started with a 1-yard touchdown run-the only Tigers' score that didn't cover at least 26 yards. Special teams got into the act when Adam Cason returned a punt 70 yards for a score that put the Tigers up 36- 14. The last score of the quarter was a 61-yard touchdown run by Tyson. It was a game of long runs. Perry, besides his I-yard score, found the end zone on runs of 26 and 43 yards, while Smith had the longest score of the night-an 85-yard run in the second quarter. Smith capped the scoring in the game with a 42-yard touchdown run in the final period. For the game, the Tigers rushed for 402 yards, averaging 12 yards per carry. Score By Quarter SFHS 0 14 0 8-22 UCHS 7 15 21 6-49 Scoring Summary U: Perry 43 run (Jernigan kick) U: Perry 26 run (Jernigan kick) S: Jenkins 20 pass from Snead (kick) U: Smith 85 run (Simmons run) S: Presnell 14 pass from Snead (kick) U: Perry 1 run (Jernigan kick) U: Cason 70 punt return (Jernigan kick) U: Tyson 61 run (Jernigan kick) S: Schaefer 6 pass from Snead (Snead run) U: Smith 42 run (kick failed) Team Statistics SF First Downs 13 Rushes/Yds. 34-198 Passing Yds. 124 Passes 7-18-0 Fumbles-Lost 1-1 Penalties 7-46 UC 12 34-402 30 2-6-1 1-0 7-38 Tornoesfl ..... 1-3 after 1 6-8 loss to Warriors BY CLIFF SMELLEY Telegraph Staff Writer The defense made the adjustments it had to, but offensively, the Bradford football team could not take full advantage of its opportunities at the end of the game, losing 16-8 to visiting West Nassau in a District 3-2A matchup on Oct. 3. West Nassau, taking advantage of a safety and a long return on the ensuing free kick, scored all of its points in the first quarter. The Warriors gained 118 yards in the quarter, but were held to 83 the rest of the game. Bradford, head coach Steve Hoard said the defense had to make an adjustment as West Nassau almost exclusively ran the ball, which has not been its tendency this- year. The Warriors attempted just three passes. The Tornadoes (1-3, 1-1) did make the adjustment, putting together a second half in which they held the Warriors to 49 yards and two first downs, as well as forcing two turnovers. However, Bradford's offense only managed one score despite driving inside the West Nassau 25 three times in the second half. That included one drive in which the Tornadoes had a first down at the West Nassau 17 before turning the ball over on downs at the 26. "We should've won that game, I feel like," Hoard said. It was a fast start for West Nassau (2-3, 1-1), which took the opening kickoff and marched 69 yards for a score. Bradford's Gerald Goodman dropped running back Jamal Jones for no gain on the first play from scrimmage, but Jones followed that up with a 10-yard run to pick up the first of nine first-half first downs for the Warriors. A pass proved to be one of the drive's biggest plays as quarterback Robbie Hern hooked up with Garrett Hammett for a 33-yard gain to the Bradford 14. From there, the Warriors ran the ball five straight times before. Hern scored on a quarterback sneak from a yard out to put West Nassau up 6-0 at the 7:09 mark of the first quarter. The result of Bradford's first offensive series was a three- and-out, but the snap on the punt attempt sailed over Tyler Cubbedge's head and into the end zone, giving the Warriors a safety. Hammett, on the ensuing free kick, returned the ball 27 yards to the Bradford 37. A 15-yard run by fullback David Price gave the Warriors a first down at the 11, but a holding penalty later backed them up to the 23. Hammett, though, would gain 14 yards on a run to the 9, which set up his own touchdown run with three minutes to play in the opening quarter. Cory Prescott's reception on the two-point conversion put the Warriors up 16-0. , Bradford's Reggie Thomas took his turn at returning a kick for a long gain when he took the ensuing kickoff 29 yards, to the West Nassau 47. See BHS, p. 12B Dixieland Music Park and Classic Cafe present Av ^ 1 sti Annual Waldo * 1Bike Fest ""4i Oct. 9-1 1 tteur Mud Bogg turday 1-4 p.m. OId Beer Swap Meet battle of the Bands Camping & Vending Space Available...Call Now (352)468-3988 Bring Your lawn Chairs Thursday Karoake 7 p.m. Sponsored by: Waldo Motorsports Cafe Risque Hillbilly Rock Overhead Doors Minnix Paint & Body BY ARNIE HARRIS Telegraph Staff Writer Missed opportunities and mistakes negated a big offensive performance from the Keystone Heights football team, which lost 20-17 in overtime 11 to visiting Fernandina Beach on Oct. 3. The loss, which dropped the Indians (1-3) to 1-1 in District 3-2A, occurred despite almost 400 yards from the offense. "We had a punt blocked, we missed a crucial field goal and were stopped at the 1-yard line after driving 98 yards-just too many missed opportunities," Keystone'head coach Chuck Dickinson said. That crucial field goal occurred in overtime. The Pirates (3-2, 1-1 in District 3) got the ball first and kicked a 27-yard field goal to go up 20- 17. The Indians, when it came to their turn to try to score, hurt themselves with two penalties. That forced them to settle for tying the game on a 27-yard field.goal attempt by STim Frysinger. Frysinger kicked a 26-yarder with 43 seconds remaining in regulation to force overtime, but he missed wide on his attempt in overtime. Keystone' also suffered a couple of key injuries in the game. Running back Marcel Robinson left the game late in the first half with an injured ankle, while quarterback Brantley Lott suffered a possible broken collarbone in the third quarter. Lott is expected to be out four to six weeks. "It was just a lot of little things going wrong that added up to a loss," Dickinson said. The Indians drew blood first when- they drove 90 yards behind the running, as well as pass receiving, of Robinson and fellow back Thomas Ricketts. A costly 15-yard chop-block infraction against the Pirates put the ball 10 yards from their own end zone. Robinson carried it in from there with 1:05 to go in the first quarter. Keystone took possession again when defensive back Ryan Latner picked off a pass, giving the Indians the- all on their *iwt "4.7.3tisa d-of' - capitalizing on the turnover, however, the Indians coughed up the ball on their third play from scrimmage, and the Pirates took possession on their own 38. Helped along by an unsportsmanlike conduct call against the Indians, Fernandina Beach drove the ball down to Keystone's 8. From there, quarterback Emory Wingard, on a keeper, found daylight and looked like he would cake walk into end zone, but Zak Davis jarred the ball loose before Wingard crossed the goal line. The Indians recovered the ball on the I-yard line..- With their backs to the wall, the Indians, again mostly behind the rushing of Ricketts and Robinson, drove the ball 98 yards to the Fernandina 1- yard line. There, the Indians felt the same' pain the Pirates experienced on the series before, coming so near yet so far, when the Fernandina U defense stopped them on tour plays. Just before the half ended, Keystone missed another chance to add points to the board when a 37-yard field- goal attempt went astray. When the Indians were forced three-and-out on their first series of the second half, a defender blocked the punt, and, after the scramble for the loose ball, Fernandina Beach recovered it on Keystone's.20. Four plays later, Pirates receiver Dominick Jones gathered in a 9-yard touchdown pass to tie the score at 7-all with 6:57 remaining in the third quarter. The Indians, on the ensuing series, took over on their own 35 and, after back-to-back receptions by TraviS Westberry and Ricketts, moved the ball 29 yards to the Fernandina 36. From there, Lott lofted a pass that Davis nabbed with a spectacular corkscrew leap at the 1-yard line. From there, Ricketts did the honors, toting the ball across the goal line at the 4:06 mark of the third quarter for a 14-7 lead.. Determined to even things up, the Pirates commenced a 90-yard drive from their own 10. Unleashing dogged running back Tahj Kimble, who chewed up huge chunks of Keystone turf, the Pirates once again knotted the score when Kimble took a short safety-valve pass from Wingard and took it 26 yards for a touchdown, with 11:45 left in the fourth quarter. The Pirates, quickly shutting down Keystone's next offensive effort, took possession at tne Keystone 47. Behind the running of Kimble, they moved the ball to the 12, where they were forced to settle for a 29-yard field goal. The Pirates, for the first time, -took the lead, at 17-14, with" 6:46 remaining in the game. With the final minutes ticking dowh, Keystone began a drive from their opponents' 45 and, with a crucial reception by Westberry and the rushing of Davis, moved the ball to the 9 to set up Frysigner's game-tying kick. When it was all said and done, the Indians outgained the Pirates 391-246, while the defense.forced three turnovers. "With all that, though, it's disappointing and frustrating that we couldn't get the game won," Dickinson said. "We let it slip away.". 10 3-20 3 0-17 Score By Quarter FBHS 0 0 7 KHHS 7 0 7 Scoring Summary K: Robinson 10 run (Frysinger kick) F: Jones 9 pass from Wingard (Shaw kick) K: Ricketts 1 run (Frysinger kick) F: Kimble 26 pass from Wingard (Shaw kick) F: Shaw 29 FG K: Frysinger 26 FG F: Shaw 27 FG Team Statistics FB First Downs 13 Rushes/ds. 29-114 Passing Yds. 132 Passes 9-21-2 Fumbles-Lost 1-1 Penalties 6-51 K 20 46-199 192 10-20-1 1-1 6-40 Familiar Face, New Location! - ---4200 SW 34th Street Gainesville, FL 32653 --w32-22W-2700-r cell 352--478-7267 --a Myma Jackson Loan Officer My a% and Weight Management LOOK GREAT & FEEL GREAT SDon't forget we have moved to Stake, . .... , , 116 North Walnut Street FL (Next to Starke Post Office) 904-964-7355 R:M MB R What happens in Merle Norman EN--:lE ER. Stays in Merle Norman. S mERLE noRmnn" Mere Norman Cosmetic Studios have been independently owned and operated shnce 1931 NOW AVAILABLE! Botox and Restylane Injections I owl Oct. 9, ^"' r- k~j~r~ ~8~*~:~8~ ~s~i~sl~sp~~ Page 12B TELEGRAPH, TIMES & MONITOR--B-SECTION Oci' Union faces second-ranked SCeltics in district game Friday Bradford's Tramaine Harris BHS Continued from page 11 B Quarterback Trey Winkler later gave the Tornadoes a first down at the 35 after an 1 1-yard run, but they were eventually forced to punt. A penalty on third-and-10 was costly, wiping out a first-down reception by Tramaine Harris. A 12-yard reception by Harris and an 8-yard run by Adrian Mosley resulted in.first downs on Bradford's next possession, with Mosley's run setting the Tornadoes up at the West Nassau 18. However, Mosley was dropped for a 2- yard loss on the next play, which was followed by three straight incompletions. The Tornadoes did little with their first possession of the second half, but seemed to be on the move on their second possession after a 16-yard reception by Harris to the West Nassau 38. Mosley set up second-and-2 after an 8-yard run, but Goodman was then held to no gain before Thomas was dumped for a 5-yard loss. Bradford was forced to punt, but Cubbedge's .kick was downed at the 9-yard line. West Nassau did nothing with the poor field position attempts to make a diving cd and punted after three plays. A short kick gave Bradford the ball at the West Nassau 32. Three plays later, the Tornadoes had the ball at the 17 after a 14-yard reception by Rodney Mosley. A penalty on West Nassau moved the ball to the 12, but Goodman was tackled for a loss of 2 yards. before a bad snap in shotgun formation resulted in a loss of 12 yards. Bradford eventually turned the ball over on downs. The Warriors picked up their first first down of the second half on the ensuing drive, but later fumbled the ball, which was recovered by Bradford's Terrence Slocum at the West Nassau 40. Adrian Mosley's 17-yard .run on the first play following the change of possession put the Tornadoes at the 23, but a penalty, a loss of a yard on a running play and three straight incompletions ended the promising series. Bradford's defense created another opportunity when Harris recovered another Warriors fumble. That gave the Tornadoes the ball at their own 43 with 7:16 to play. It was only fitting that the player who recovered the fumble would find the end zone for Bradford: Harris gained a first down on a 16- yard reception before later Itch in the end zone. scoring on a reverse yards out. Rodney run on the conversinn made thP 8. from 24 Mosley's two-point score 16- The Tornadoes had one last chance after their defense forced a three-and-out. Bradford had the ball on its .own...36 with 2:25 to play. Harris picked up a first down at the West Nassau 37 on a 27- yard reception, but the Tornadoes could only pick up 3 yards on the next four plays, turning the ball over on downs with 45 seconds left on the clock. "We had opportunities," Hoard said. Score By Quarter WNHS 16 0 0 0-16 BHS 0 0 0 8-8 Scoring Summary W: Hem 1 run (kick failed) W: Safety W: Hammett 9 run (Prescott pass from Hern) B: Harris 24 run (R. Mosley run) Team Statistics WN B First Downs 11 11 Rushes/Yds. 41-162 30-70 Passing Yds. 39 94 Passes 2-3-0 6-25-0 Fumbles-Lost 2-2 2-0 Bradford hosts 1 of state's BY CLIFF SMELLEY Telegraph Staff Writer Union County pulled the stunner last year with its defeat of Trinity Catholic, but to do so again this year, the Tigers will have to contend with a team that is scoring more than 40 points a game. The Tigers travel to Ocala Friday, Oct. 10, to play the Celtics (5-0) in a District 4-2B matchup at 7:30 p.m. Trinity, ranked second in the state, scored 20 points in a season- opening win over Tampa Catholic, but has scored at least 38 points in each game since. Trinity's latest win 'came against North Florida Christian, which was ranked number one in Class A. The Celetics scored two fourth quarter touchdowns for a 38- 27 win. Senior quarterback Rob Henry, a Purdue commitment, and junior wide receiver Kadron Boone, who recently received a scholarship offer from the University of Florida, were the key players in the win. Henry passed for 225 yards and three touchdowns, hooking up with Boone four times on the drive that gave the Celtics the lead for good. Boone caught nine passes for 181 yards and two touchdowns. Boone is averaging 30 yards per reception. He has 798 yards and eight touchdowns on 27 receptions. Henry has passed for 1,055 yards and 12 touchdowns. Running back Kedrick Rhodes entered the North Florida Christian game averaging 11 yards a carry, but he was held to 50 yards on 11 carries. He scored on a 24-yard run, though, and has 667 yards and seven touchdowns this season on 66 carries. The defense has, been vulnerable at times. Trinity got off to a 1-0 start in district play with a 56-3 win over P.K. Yonge on Sept. 26, but the week before saw the Celtics allow Williston to score 42 points. Williston was able to rush for 384 yards against Trinity, averaging 11 yards a carry and scoring on runs of 55 and 64 yards. (The Celtics won the game 63-42.) Last year, the Tigers lost a two-touchdown lead before finally coming out on top of the Celtics 29-28 in overtime. A 2-yard touchdown run' by graduate Justin Hanson put-the Tigers up 21-7, but Trinity answered the score, then added another after Union fumbled the ball on a kickoff return. Another fumble gave Trinity the ball back and a chance to win the game in regulation, but the Celtics missed a field goal. They did score first in overtime when Henry plunged into the end zone from a yard out. Union quarterback Chris Alexander threw a 6-yard touchdown pass .to graduate Jordan Ciyatt 6n a fourth-down play. Tigers head coach Andrew Zow decided to go for two and the win, and it paid off in the form of a successful Hanson run. Keystone, West Nassau each look to go 2-1 in district BY CLIFF SMELLEY Telegraph Staff Writer For the second straight year, the Keystone Heights football team is having to rebound from a District 3-2A loss to Fernandina Beach. The Indians will need a win over visiting West Nassau this Friday, Oct. 10, at 7:30 p.m. to remain in second place behind district leader Bolles. The Warriors (2-3) evened their district record with a 16-8 win over Bradford last week after opening district play with a 12-6 overtime loss to Yulee. West Nassau changed its offense against Bradford, neglecting its passing game for the most part. The Warriors attempted only three passes. Running back Horace Wilson, a returning starter from last season, missed the game with an injury, so the team relied heavily on returning starter Garrett Hammett and fullback David Price, who was pretty much a non-factor this season prior to the Bradford game. The Warriors got off to a good start against Bradford, gaining 85 yards rushing in the first quarter. Hammett had a 9- yard touchdown run that put his team up 16-0, but West Nassau was shut out after the first quarter, gaining just 83 yards the rest of the game. In fact, the Warriors' only sustained drive was a 69- yarder to open the game. That led to the game's first score-a 1-yard quarterback sneak by Robbie Hern. West Nassau's second scoring drive, after scoring on a safety, covered just 37 yards after a 27-yard kickoff return by Hammett. West Nassau's defense has fared better since district play started. Teams scored an average of 39 points against the Warriors in their first three games, but in the two games since, West Nassau has given up a total of three touchdowns. Friday's game will mark the 10'" straight year the Warriors and Indians have faced each other. Keystone has won the last three games. Last year, the Indians got two touchdown runs each from Matt Story and Greg Taylor en route to a 28-0 win. Keystone rushed for 286 yards, while its defense held the Warriors to 130 yards and forced three turnovers. best in district matchup Friday BY CLIFF SMELLEY Telegraph Staff Writer This Friday, Oct. 10, Bradford will become the next team to try to put a stop to a seemingly endless streak when the Bolles Bulldogs visit Starke for a 7:30 p.m. District 3-2A game. Bolles, a winner of three state championships over the past six years, has gone undefeated in district play 15 straight years. Since the districts were realigned in 2005, Bolles has had little trouble with Bradford and every other team in District 3. The average score for Bolles in those district games the last three years was 50-7. The Bulldogs' smallest margin of victory was 31 points in a 31-0 win over West Nassau last year. Oct. 7, 2005, was the last time Bolles lost a regular season game. The Bulldogs have gone 97-11 the last eight seasons, winning state championships in Class 2A in 2002 and 2006 and in Class 3A in 2004. They were runners-up in Class 3A in 2003 and in Class 2A in 2005 and last year The Bulldogs (4-0) have played two district opponents so far this year, defeating Ribault 47-3 and Yulee 63-3 (their other two victories were 42-32 over Archbishop Carroll and 21-13 over American Heritage). In those two games, Bolles has averaged 510 yards of offense, while its defense has yielded 136 yards per game. It is the rushing game that powers Bolles' offense. The Bulldogs have averaged 325 yards per game on the ground with backs Stephen Barnett and Jawan Jamison leading the way. Each back has averaged at least 10 yards per carry. Barnett, a senior who has committed to Tulane University, has rushed for 464 yards and six touchdowns on 47 carries, while Jamison, a junior who used to attend Bradford High School, has rushed for 318 yards and four touchdowns on 29 carries. Bolles utilized 10 running backs in its win over Yulee last week. The Bulldogs average 115 passing yards per game with quarterbacks Chandler Carr and Davis Skinner. Defensively, Bolles has given up art.average of 116 yards on the' ground and 87 yards through the air. Bradford,- which lost to Bolles by a combined score of 88-14 in 2005 and 2006, was trailing the Bulldogs by just seven points late in the first quarter of last year's matchup, but the Tornadoes would wind up losing 49-13. __Graduate ...Chuckie Covington returned a fumble 71 yards to pull Bradford within 14-7, but the Bulldogs scored on three straight possessions to take a 35-7 lead at the half. All of Bolles' scores came on the ground, with all but one covering at least 10 yards. Two of the scoring runs came from 55 and 66 yards out. 9oi s 9Wid, St Siucw 1982" COUPON NOW OPEN-- COUPON - $3 OFFI EVERYDAY! $5 F I I $ I S UT (904) Hi-Lite or Perm LGood thru03108__j 964-4151 L---- Gdthru031108 17 S.WI l int.Sr ui 10 tr ,F- Ci TOWNaCOUNTRY ,6 R Y;C FwORD MECY, WE'LL BEAT YOUR BEST PRICE... GUARANTEED! On all name-brand tires we sell - Including Goodyear, SContinental, Michelin and More The right tire at the right price. GOODYEAR @ntlnentald Open Saturday! MOTORCRAFT BRAKES, INSTALLED! $7Q95 or less AFTER $25 MARLIN REBATE Get the brakes engineered for your vehicle and save! Dealer.installed retail Motorcoaf' or Genuine Ford brake pads or shoes only. limit one redemption per axle, per customer. Maximum rebate o 25 per axle, by mail Pads or shoes only, on mosi cars and light tcks. Front or rear axle. Excludes machining rotors or drums. Taxes extra. Redempton form must be posrarked by 12/31/08. See paicipating dealership for mad-in redemption certicae and deltads through 11130/08. MOTORCRAFT" TESTED TOUGH* PLUS BATTERY MSRP AFTER $20 MALIN REBATE Engineered for your vehicle. With 84-month warranty. Wllh exchange, Taxes and nmsallalion extra, Warranty includes FREE towing on deal nsialled baltey. Redemption fom must be postmarked by 12/3108, See ppartopatng daership fo mad-in redemption cedrficale and limited-warranty devils through 11130/08 ' FUEL SAVER PACKAGE 29o AFTER $10 MAIL-IN REBATE Motorcraft Premium SyntUdc. Inspect break system Blend Oil and Filter change Test battery SRotat and inspect our ti Check belt and hose h Check air & cabin air fltaer Top off II fluids Up to fives uartns o Motornrna oil and Molorcralt oil Iler. Taxes, diesel vehle s and disposal leen xnra, Hybrld beatyP lest exuded. Rdemplon orm must bo maled by 1231/0 See pamrpalng dealrship for mall-in redempbon cernfcate, vehicle applcatons and delays Ihrough 11/30/0. BUY TIRES, GET FUEL! BUY 4 MICHELIN or BF GOODRICH" TIRES AND GET A S$50 GAS CARD ON USI BFGoodrlcdi Requires presentabon of competior's cunarnl price ad on exact tire sold by dealership ran 30 days of purcha o s Se parhcpatng dealarshp for details through 12131108. GENUINE MERCURY PARTS a RFRUICFS lp I V !i LI NO PAYMENTS "' ONE YEAR' a wlonr TEAL TILE CARPET ONE FLOOR TLAL T ONE & HOME 131 N. Cherry St., Starke (904) 964-7423 "W 're Eyour neigkborkol d store" - THREE EASY WAYS TO SHOP. For a freeroom mesurean fancng THREE EASY WAYS TO SHOP.,pro-approval visit Carpetone.com. LITIIIO N.S E O 'n ONLINe ..HO. *On all prlrui: Surljin to r:. dll l lltinrot .l. Fill:hinmg ]rou.ded lib CirlrrInclR i neldllAi Ser Divi, OI nWsitin CltloipT ul Bank, hb. Finanm ric rgn l giti to accile at thellne ol purdlle. No monllii pymori rlilirrd l ur i dring t hi 1 proimir l po rmil. Poyiiin m I ill O nl ll.lnt Iod IIl full m1 nroust 1I r rC eied rio to the OXirIst(ll Io ofhe ptnroil t plon riod n order for o d financ tyanor t o hoe wroed Olehrrwio. arued Ilnmr dhrgc, il be hraostodI 10 Ilo crouonl. Standard rale ?4% APr. Dtfollt rita 28.89% APR. Minimum fins'c 't'chage $,S0 See Crtdholder . ....:. ... ,. .r ,' i ... ... . . oie deta ls Not espoinlblib lor tpogrlphical I ots Not all produce avallabl at IIll locations. Photol lot I.,., ...... ... .. ..., .. .,.T ,,, ... ... J)no Floo &l0onre2007 . ^ . . . . . . . . . .~IP 39~`1~. I~U' - ~--~~~~~~~-~- ---uu--- -LNILY-- Y-II~I~YLU__~ i- - - I wo tv, ilicuc t u Ii B \, ,i AWOL Contact Us | Permissions | Preferences | Technical Aspects | Statistics | Internal | Privacy Policy © 2004 - 2010 University of Florida George A. Smathers Libraries.All rights reserved. Acceptable Use, Copyright, and Disclaimer Statement Last updated October 10, 2010 - Version 2.9.7 - mvs
http://ufdc.ufl.edu/UF00027795/04506
CC-MAIN-2018-17
refinedweb
37,424
74.79
Oracle TimesTen In-Memory Database Support User's Guide 12c Release 1 (12.1) for Windows E38358 covers TimesTen support of the ODP.NET 12.1 release. Note the following: You must have a TimesTen 11.2.2 release to use ODP.NET 12.1 with TimesTen. See "ODP.NET namespace and class support with TimesTen" for details of supported namespaces and APIs. ODP.NET 12.1 is available in corresponding Oracle Database or Oracle Data Access Components (ODAC) releases. Note:TimesTen release 11.2.2.4.0 or higher is recommended. for TimesTen: You must install TimesTen Data Manager or TimesTen Client or both 12.1 for TimesTen depends on Oracle Call Interface (OCI) support for TimesTen and requires the version of OCI that is provided with ODP.NET 12. ODP.NET for TimesTen supports the following features: Access to TimesTen CLOB, NCLOB and BLOB SQL column types: These SQL types can be accessed using the GetOracleClob and GetOracleBlob methods of OracleDataReader objects. For important additional information, refer to "Support for LOBs". Associative arrays (formerly known as index-by tables or PL/SQL tables): These are supported as IN, OUT, or IN OUT bind parameters in TimesTen PL/SQL and can be used from an ODP.NET application in a TimesTen environment (as previously supported from OCI, Pro*C/C++, and JDBC applications in TimesTen). This enables arrays of data to be passed efficiently between an application and the database. .NET Framework 4.5 environment: Also refer to the "Environments and TimesTen releases supported by ODP.NET". Note:New features listed in the "What's New" section of Oracle Data Provider for .NET Developer's Guide apply to Oracle Database, not to TimesTen. (Regarding ODP.NET 12.1 new features for character data type support, however, refer to "Support for VARCHAR2, NVARCHAR2 and VARBINARY data types".) This section discusses the following topics to help you start using ODP.NET. Note that installation steps are not TimesTen-specific. Post-installation path considerations Building an application for ODP.NET This section covers the following installation: Install ODP.NET as part of Oracle Database 12.1 Install ODP.NET as part of ODAC 12.1 for Windows, OUI version Install ODP.NET as part of ODAC 12: To use ODP.NET an Oracle Database 12.1 installation. Oracle Home User dialog, choose from among "Use Existing User", "Create New User", or "Use Built-in Account" according to what best fits your needs.) 12 12.1.x.x.x" (the appropriate point release number is indicated). Then choose Next. In the page for the installation location, you can either use the default value or specify a desired alternative location. Then choose Next. In the page to choose available product components, "Oracle Data Access Components for Oracle Client 12.1.0.1.0" is selected by default and cannot be deselected (given the selection of that product in step 2). Underneath that, confirm that Oracle Data Provider for .NET is selected (default). Also confirm that Oracle Instant Client, required for ODP.NET, is selected (default). All other components are optional for ODP.NET. Then choose Next. Note:Oracle Providers for ASP.NET is not relevant to TimesTen. You can deselect it unless you need it for other purposes. Note that if it is selected, you will see a page (not covered in these instructions) for running a set of SQL scripts. In the page for database connection configuration, you are prompted to specify a database connection entry (alias) that will be entered in the tnsnames.ora file, and the location of that file is indicated. Leave this page as is and choose Next. (Define a database connection later, as discussed in "Configuring TimesTen connections for an ODP.NET application".) Check the summary page, then choose Install. The installation page will indicate progress. After installation, there is an end page. You can choose Exit. Use these instructions to install ODP.NET as part of the Oracle XCopy version of Oracle Data Access Components (ODAC) 12.htm, which is also located in the installation directory. Important:The readme.htm use ODP.NET README file for any further information about setting up ODP.NET. For information about uninstalling Oracle Database products, including ODP.NET, refer to "Removing Oracle Database Software" in Oracle Database Installation Guide for Microsoft Windows. To uninstall an OUI installation, run setup.exe again (refer to "Install ODP.NET as part of ODAC 12.1 for Windows, OUI version"). In the OUI welcome page, choose Deinstall Products. In the resulting Inventory dialog, select the product or products to uninstall, then choose Remove. Then choose Yes in the Confirmation and Warning dialogs. Close the Inventory dialog once the products have been uninstalled. To uninstall an XCopy installation, execute the uninstall.bat batch file from your ODP.NET installation directory (refer to "Install ODP.NET as part of ODAC 12. The location of the Oracle.DataAccess.dll assembly and dependent libraries is according to your type of Oracle product installation and version of .NET. Refer to Oracle Data Provider for .NET Developer's Guide and the ODP.NET README file for information. TimesTen OCI error message mapping. TimesTen OCI errors are propagated to the ODP.NET application as OracleException objects. (Also see "OCI error reporting" in Oracle TimesTen In-Memory Database C Developer's Guide.) in a .NET environment. location of the Oracle.DataAccess.dll assembly and dependent libraries is according to your type of Oracle product installation and version of .NET. Refer to Oracle Data Provider for .NET Developer's Guide and the ODP.NET README file for information. The name of the TimesTen sample database in TimesTen 11.2.2 releases is sampledb_112). Note:ODP.NET 12.1, when used outside of a TimesTen environment, has a 32 KB size limit for character data, increased from a 4 KB limit in previous releases. TimesTen LOB support is limited to the LOB access methods associated with the default 0 (zero) setting of the InitialLobFetchSize property of the OracleDataReader object. If this property is changed to another value then TimesTen ignores such changes, assuming it retains the 0 setting. Also refer to "OracleDataReader class support". This section discusses limitations that are known as of release time..2.0.0" Change the service name in the tnsname.ora entry or easy connect string to reference a TimesTen 11.2.2 database. ODP.NET 12.1 applications cannot connect to TimesTen database versions prior to 11.2. If you have an existing ODP.NET application and want to see whether it uses ODP.NET 12 you attempt. Notes: While TimesTen supports the ImpliedRefCursors property, its use is complementary to the ADO.NET Entity Framework, which TimesTen does not support. ODP.NET for TimesTen does not support use of the InitialLOBFetchSize property. Changing its value has no effect. It is always effectively set to the default value of 0 (zero).. Note:ODP.NET for TimesTen does not support use of the InitialLOBFetchSizeproperty. Changing its value has no effect. It is always effectively set to the default value of 0 (zero)., 12c Release 1 (12.1) for Windows E38358-05.
http://docs.oracle.com/cd/E21901_01/win.1122/e38358/toc.htm
CC-MAIN-2017-43
refinedweb
1,190
53.17
Pre-ramble Appium is an excellent tool for testing an app running "for reals". No faking talking to other systems - it has to hit the real stuff. I prefer Appium for this as it forces that separation. It requires the application to be treated as a black box. If I want to use Espresso (and I might later) to validate UI behavior; I'll be able to treat the application as a whitebox and configure things as required to know what should be displayed. Appium; while I could fake servers and test environments; should operate on "unknown" data. This is the distinction I make between Espresso/androidTest type tests and those run via Appium; one is validating the UI is running as expected. Espresso is Functional Tests on the UI. Appium is integration tests on the app. I find the distinction meaningful to maintain the mental model of the purpose of the tests. With integration tests; you can't expect certain data (most of the time). You need to work with unknown and changing information. These can end up being far harder tests to write. You can't check that the top story title is exactly "Some Fancy Title"; but just that there's... something. The advantage is that you can store this title; go to another view; and confirm the string there matches the previous. While doable in Espresso; you can check each of those independently; you're not forced to track information. This is actually a good distinction; via an espresso test; I can directly test a non-launchable activity. I don't need to use the app to navigate to that UI. It can (and in my view should) skip the intermediary steps. Appium does not. You must take those steps to get there. This is why they are both valuable (says the guy skipping Espresso) and should be utilized to have a product where anyone can mercilessly refactor; as well as having no fear when working in the code. Setting up Appium Please check out my earlier TagAlong on Appium post where I got Appium set up locally. I would recap... but it's like 2 steps... The rest is the madness to figure them out. :-P IntelliJ This is going to require IntelliJ to run the Appium tests; for now. I can probably get it all configured into Gradle; but that's not the purpose here. I currently have it running via Maven/IntelliJ; I'll continue it there to be able to focus on the main point - an Appium Test. Hmmm... An emulator is apparently useful... so; getting that going. Unlike the iOS appium testing I set up previously; I need the JAVA_HOME and ANDROID_HOME configured. I used this StackExchange to make it a quick process. After a bit of futzing around with it - I've got a super simple Appium Test running. public class AppiumTest { private AppiumDriver driver; @Before public void setUp() throws Exception { DesiredCapabilities capabilities = new DesiredCapabilities(); File app = new File("../app/build/outputs/apk/app-debug.apk"); //capabilities.setCapability("avd","Nexus 5X API 25"); capabilities.setCapability("deviceName","Android Emulator"); capabilities.setCapability("platformVersion", "7.1"); capabilities.setCapability("app", app.getAbsolutePath()); capabilities.setCapability("appPackage", "com.quantityandconversion.hackernews"); capabilities.setCapability("appActivity", ".MainActivity"); driver = new AndroidDriver<>(new URL(""), capabilities); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); } @Test public void sampleTest(){ WebElement txt = driver.findElement(By.id("hello_world")); assertEquals("Hello World!", txt.getText()); } @After public void tearDown() throws Exception { if (driver != null) driver.quit(); } } I'm kinda regretting buying a mac-mini w/only 8GB of RAM... It's not happy running Android Studio; IntelliJ, Appium, Emulator... hehehe This is a quick simple appium set up. Currently it requires a device or emulator be running. I've gotta cycle back to get my environment variables set up correctly to have Appium launch an emulator. First Integration Test The first integration test I want is a simple display of the number of top stories. This is easily done by setting a string value and when it gets the total count; trying to parse it to a string. The number of stories doesn't matter; just that it's a number. I should get the Appium tests to run via command line... Later. Right now; working on the app going up; and failing due to not having a number! The test fails due to parsing! Exactly what we're looking for. Now to wire up the ItemAccess class and display a number of top posts. This actually get's us a little into applying VBM; we're going to have all the relevant layers. We could hack something in; but.. If you don't have time to do it right the first time; how in the hell will you have time to fix it? Sure... I'm writing a blog; but - Do it right the first time. I'm going to start from the default activity public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } and add a method to bind controls. Normally we want to write the test first; but we're at a boundary layer. Tests are harder. And that sounds like a cop out. It really does... I don't have a good way to TDD these. Additionally; the only thing I could do is testing the implementation - so; gonna see where this goes without it. I'm still looking for having test coverage that breaks if we delete the code; this just might end up being the Appium tests. Adding; the method to bind the control is pretty simple/straight forward - Bind it. private void bindViews() { topStoryCount = (TextView)findViewById(R.id.top_story_count); } Now to get data; This is where our Bridge comes into play. This is the class responsible for putting data into the View. We'll be able to unit test this class. A question that comes up for me is; "Do I want to drive from the UI down? or... Knowing that I'll need the VBM layers, go from bottom up?" I normally want to build bottom up; hence the network layer first. I find it easier to build when working on the foundational stuff first; but this is the UI layer; it makes sense to work top to bottom. Though I expect it'll end up being driven by the Bridge; which if you've read the VBM post; know I consider it the zipper; so it touches both sides. I'm writing some tests against the constructor of the MainActivityBridge. This will (likely) evolve into what I call "double constructor dependency injection". Once that comes about; I'll show it, but I don't want to force it in; gotta get the tests in place for it to evolve. Tangent: Integration vs Unit - Testing As I'm working on how to test make our Appium Test pass; I'm TDDing up the Bridge class and find an internal debate going on about how to TDD this. Do I create the Dependency Injection double constructor so that I can fake/mock the bookends; or do I do the tests as integration tests; have the test run all the way down to the network and have it faked there. ... I've spent a bit of time thinking about this; I favor the integration style tests. Here's what got me to favor them. - The second constructor is just for unit tests; that always feels wrong; but I can accept a little intrusion for tests. - Using a Mock/Fake ends up testing implementation. - Doesn't (or is hacked in) async behavior I still have a strong urge; and would love some discussion with the more experienced about this; where does the unit test of implementation get dropped in favor of integration tests? What kinda points is that switch made? I'm going to work with integration style tests for now; they feel like they produce cleaner code. I'm bad at the constant checking bit... I've got the View-Bridge-Mediator set up; and all tests pass... except... I wasn't expecting it to. Part of running with the integration tests I expected to have to set up the unit tests with the MockWebServer and configure that as we have for the network layer. This unexpectedly passing test was a shock - some quick debugging and... DUH... It's making an actual network request - we've got a Functional Test going on. I don't want this. Thought THIS test is unlikely to be flakey; no need to hammer the API when all I need is some fake data. The glorious bit of this; and it speaks to the power of having some functional tests - My API interface for Retrofit was wrong. 5 lines of code - bug. /* package */ interface ItemApi { String URL = ""; @GET("/topstories.json") Call<Items> topStories(); } Can you see it? It might take some experience with Retrofit to nail it down. I won't do the full debug adventure; but the URL that was getting called was. ... OK - It's in the @GET annotation; the leading / tells Retrofit that this is expected at the root of the path. Removing the / resolves the issue: /* package */ interface ItemApi { String URL = ""; @GET("topstories.json") Call<Items> topStories(); } But now - We're getting rid of the network. Now commit on github we have the fake network. OK; Mediator does it's job - Back to the Bridge... Which we now know needs the fake network in place to behave as I'm expecting. Since more of the Bridge was wired up for the test; it's how we got to requiring the Mediator; getting the test going was very simple. If you check the above linked commit; and this commit you'll see a lot of refactoring of the unit tests. I started to C&P the fake networking code and C&P is a smell; so that all got refactored into helper classes. If you call things "helper" or "util" I'll want to delete the code. All tests pass! If you take a look at the MainActivityBridge from the last commit; particularly line #13; you'll see that I'm doing new MainActivityMediator(...) inline; instead of in the constructor. While the constructor is where I'll move it to; TECHNICALLY - this is the simplest code to get it working; there's no need for it in the constructor. This is TDD; get it working; why move it? It's not duplicative; it's not needed anywhere; not persistence required... Looks fine to me. We all can expect this to change later; but it's not required to be different now; and I can't make it simpler. I've intentionally set up that method to fail our Appium Test. It set's the control to "value" and not a number. This exemplifies how focusing on a narrow strip won't guarantee correctness. The code under tests functions perfectly. The app will still break. Also highlights how integration and functional tests can find issues that slip through unit testing. All my Android Studio Unit Tests pass; let's go back to Appium and ... failed. But not via "value" it still tried to parse the original value. Looks like it's not waiting for the network round trip. Wonder how to fix that... I have a delay waiting for the text value to change... It's important to note that actually triggering the data load is useful... Rebuilding the app to be sure all changes are in place... HAHA... Internet permission... OK; the wait worked; it failed on trying to parse what we expected java.lang.NumberFormatException: For input string: "value" Go us! Now to wire it up to return the correct value... Slight modifications to the MainActivityBridge to take the Items from the Mediator. Let's build and Appium test! PASSING! BOO-YAH! It's kinda awesome. In the test @Test public void sampleTest(){ final WebDriverWait wait = new WebDriverWait(driver, 10); final WebElement txt = driver.findElement(By.id("top_story_count")); final String txtValue = txt.getText(); wait.until(new ExpectedCondition<Boolean>() { @Override public Boolean apply(final WebDriver webDriver) { return !txtValue.equals(webDriver.findElement(By.id("top_story_count")).getText()); } }); Integer.parseInt(txt.getText()); } I don't care what the value is; just that it's an integer. While this test will go away; this is my approach to UI testing; exact values are fragile. We now have a fully functional test along with our unit and integration tests. This is awesome! And the end of this post... Summary Functional and TDD Appium testing is set up and ready to go. It can take a lot of work in the app to make a functional test work. If this work is done TDD; as we did here; then it's going to be fine to have these functional tests in place. If there is just the functional test; then the innards will go putrid as all code does, but at an accelerated rate. I make this accelerated claim because the developers will be under the false impression that the test covered code results in good code. TDD is an approach to developing code; a mindset. The tests are the least important part of TDD. Any belief that tests ensure quality is a dilusion. I'll probably write a post on that later. We started the implementation of the View-Bridge-Mediator pattern to implement just one test. While there was an eye towards this pattern; it's what I've found falls out cleanly when not attempting to force other conventions; which does include databinding as a convention. The project at this point can be cloned from here for reference.
https://quinngil.com/2017/02/05/vbm-on-android-initial-appium/
CC-MAIN-2018-47
refinedweb
2,280
66.54
Linus Torvalds wrote:> If you want to change the owner of the file it points to, use:> > fd = open(...);> fchown(fd,..);> > which should always work the way you expect.So long as you can open the file. Its possible you want to chown a fileyou ownbut can't open, and if chmod is consistent with chown (which I certainlyhopeis the case), you won't be able to chmod it before trying to open it.> If you use "chown()" on the> pathname it will change the synlink itself (if you think about it, that is> actually the reasonable behaviour: otherwise you could never change the owner> of the symlink).It might be reasonable behaviour if there were ever a need to change theownerof a symlink. However, seeing as a symlink is a mere loophole in thenamespaceand has no function in itself, the owner, like its mode, is completelyirrelevent.The only time I can think of where you'd care about the owner is forquotas, andeven then that's pretty insignificant.It seems to me that not following symlinks will be more surprising thanfollowingthem, and therefore more likely to open holes. J
https://lkml.org/lkml/1996/7/9/15
CC-MAIN-2017-04
refinedweb
190
67.99
OK, lots of revisions. The approach to handling 'file' I have left up in the air. Biggest change is switching to "unprotected" and "sandboxed" for terms when referring to the interpreter. Also added a Threat Model section to explain assumptions about the basics of the interpreter. Hopefully it is also more clear about the competing approaches for dealing with 'file'. I am planning on starting work next week on implementation, but I will start with the least controversial and work my way up. One thing that is open that I would like some feedback on immediately is whether people would rather pass in PyObjects or C level types to the API. The latter makes implementing the Python wrapper much easier, but makes embedding a more heavy-handed. People have a preference or think that the Python API will be used more often than the C one? I am leaning towards making the C API simpler by using C level types (const char *, etc.) and just deal with the Python wrappings requiring more rejiggering between types. Once again, I have a branch going (bcannon-sandboxing) where the work is going to be done and where this doc lives. I don't plan on doing another post of this doc until another major revision. --------------------------------------------------------------------------------------------------------------- Restricted Execution for Python ####################################### About This Document ============================= This document is meant to lay out the general design for re-introducing a sandboxing model for Python. This document should provide one with enough information to understand the goals for sandboxing, what considerations were made for the design, and the actual design itself. Design decisions should be clear and explain not only why they were chosen but possible drawbacks from taking a specific approach. If any of the above is found not to be true, please email me at brett at python.org and let me know what problems you are having with the document. XXX TO DO ============================= * threading needs protection? * python-dev convince me that hiding 'file' possible? + based on that, handle code objects + also decide how to handle sockets + perhaps go with crippling but try best effort on hiding reference and if best effort holds up eventually shift over to capabilities system * resolve to IP at call time to prevent DNS man-in-the-middle attacks when allowing a specific host name? * what network info functions are allowed by default? * does the object.__subclasses__() trick work across interpreters, or is it unique per interpreter? * figure out default whitelist of extension modules * check default accessible objects for file path exposure * helper functions to get at StringIO instances for stdin, stdout, and friends? * decide on what type of objects (e.g., PyStringObject or const char *) are to be passed in * all built-ins properly protected? * exactly how to tell whether argument to open() is a path, IP, or host name (third argument, 'n' prefix for networking, format of path, ...) * API at the Python level * for extension module protection, allow for wildcard allowance (e.g., ``xml.*``) Goal ============================= A good sandboxing model provides enough protection to prevent malicious harm to come to the system, and no more. Barriers should be minimized so as to allow most code that does not do anything that would be regarded as harmful to run unmodified. But the protections need to be thorough enough to prevent any unintended changes or information of the system to come about. An important point to take into consideration when reading this document is to realize it is part of my (Brett Cannon's) Ph.D. dissertation. This means it is heavily geared toward sandboxing when the interpreter is working with Python code embedded in a web page as viewed in Firefox. pure Python application, the former will win out over the latter. Throughout this document, the term "resource" is used to represent anything that deserves possible protection. This includes things that have a physical representation (e.g., memory) to things that are more abstract and specific to the interpreter (e.g., sys.path). When referring to the state of an interpreter, it is either "unprotected" or "sandboxed". A unprotected interpreter has no restrictions imposed upon any resource. A sandboxed interpreter has at least one, possibly more, resource with restrictions placed upon it to prevent unsafe code that is running within the interpreter to cause harm to the system. .. contents:: Use Cases ///////////////////////////// All use cases are based on how many sandboxed interpreters are running in a single process and whether an unprotected interpreter is also running. The use cases can be broken down into two categories: when the interpreter is embedded and only using sandboxed interpreters, and when pure Python code is running in an unprotected interpreter and uses sandboxed interpreters. When the Interpreter Is Embedded ================================ Single Sandboxed Interpreter ---------------------------- This use case is when an application embeds the interpreter and never has more than one interpreter running which happens to be sandboxed. Multiple Sandboxed Interpreters ------------------------------- When multiple interpreters, all sandboxed at varying levels, need to be running within a single application. This is the key use case that this proposed design is targeted for. Stand-Alone Python ============================= When someone has written a Python program that wants to execute Python code in an sandboxed interpreter(s). This is the use case that 'rexec' attempted to fulfill. Issues to Consider ============================= Common to all use cases, resources that the interpreter requires to function at a level below user code cannot be exposed to a sandboxed interpreter. For instance, the interpreter might need to stat a file to see if it is possible to import. If the ability to stat a file is not allowed to a sandboxed interpreter, it should not be allowed to perform that action, regardless of whether the interpreter at a level below user code needs that ability. When multiple interpreters are involved (sandboxed or not), not allowing an interpreter to gain access to resources available in other interpreters without explicit permission must be enforced. Resources to Protect ///////////////////////////// It is important to make sure that the proper resources are protected from a sandboxed interpreter. If you don't there is no point to sandboxing. Filesystem =================== All facets of the filesystem must be protected. This means restricting reading and writing to the filesystem (e.g., files, directories, etc.). It should be allowed in controlled situations where allowing access to the filesystem is desirable, but that should be an explicit allowance. There must also be protection to prevent revealing any information about the filesystem. Disclosing information on the filesystem could allow one to infer what OS the interpreter is running on, for instance. Memory =================== Memory should be protected. It is a limited resource on the system that can have an impact on other running programs if it is exhausted. Being able to restrict the use of memory would help alleviate issues from denial-of-service (DoS) attacks on the system. Networking =================== Networking is somewhat like the filesystem in terms of wanting similar protections. You do not want to let unsafe code make socket connections unhindered or accept them to do possibly nefarious things. You also want to prevent finding out information about the network your are connected to. Interpreter =================== One must make sure that the interpreter is not harmed in any way from sandboxed code. This usually takes the form of crashing the program that the interpreter is embedded in or the unprotected interpreter that started the sandbox interpreter. Executing hostile bytecode that might lead to undesirable effects is another possible issue. There is also the issue of taking it over. One should not able to gain escalated privileges in any way without explicit permission. Types of Security /////////////////////////////////////// As with most things, there are multiple approaches one can take to tackle a problem. Security is no exception. In general there seem to be two approaches to protecting resources. Resource Hiding ============================= By never giving code a chance to access a resource, you prevent it from being (ab)used. This is the idea behind resource hiding; you can't misuse something you don't have in the first place. The most common implementation of resource hiding is capabilities. In this type of system a resource's reference acts as a ticket that represents the right to use the resource. Once code has a reference it is considered to have full use of resource that reference represents and no further security checks are directly performed (using delegates and other structured ways one can actually have a security check for each access of a resource, but this is not a default behaviour). As an example, consider the 'file' type as a resource we want to protect. That would mean that we did not want a reference to the 'file' type to ever be accessible without explicit permission. If one wanted to provide read-only access to a temp file, you could have open() perform a check on the permissions of the current interpreter, and if it is allowed to, return a proxy object for the file that only allows reading from it. The 'file' instance for the proxy would need to be properly hidden so that the reference was not reachable from outside so that 'file' access could still be controlled. Python, as it stands now, unfortunately does not work well for a pure capabilities system. Capabilities require the prohibition of certain abilities, such as "direct access to another's private state" [#paradigm regained]_. This obviously is not possible in Python since, at least at the Python level, there is no such thing as private state that is persistent (one could argue that local variables that are not cell variables for lexical scopes are private, but since they do not survive after a function call they are not usable for keeping persistent state). One can hide references at the C level by storing it in the struct for the instance of a type and not providing a function to access that attribute. Python's introspection abilities also do not help make implementing capabilities that much easier. Consider how one could access 'file' even when it is deleted from __builtin__. You can still get to the reference for 'file' through the sequence returned by ``object.__subclasses__()``. Resource Crippling ============================= Another approach to security is to not worry about controlling access to the reference of specific resource's reference leaking out to insecure code is alleviated. This does add extra overhead, though, by having to do so many security checks. It also does not handle the situation where an unexpected exposure of a type occurs that has not been properly crippled. FreeBSD's jail system provides a protection scheme similar to this. Various system calls allow for basic usage, but knowing or having access to the system call is not enough to grant usage. Every call 'file' as the example again, one could cripple the type so that instantiation is not possible for the type in Python. One could also provide a permission check on each call to a unsafe method call and thus allow the type to be used in normal situations (such as type checking), but still feel safe that illegal operations are not performed. Regardless of which approach you take, you do not need to worry about a reference to the type being exposed unexpectedly since the reference is not the security check but the actual method calls. Comparison of the Two Approaches ================================ >From the perspective of Python, the two approaches differ on what would be the most difficult thing to analyze from a security standpoint: all of the ways to gain access to various types from a sandboxed interpreter with no imports, or finding all of the types that can lead to possibly dangerous actions and thus need to be crippled. Some Python developers, such as Armin Rigo, feel that truly hiding objects in Python is "quite hard" [#armin-hiding]_. This sentiment means that making a pure capabilities system in Python that is secure is not possible as people would continue to find new ways to get a hold of the reference to a protected resource. Others feel that by not going the capabilities route we will be constantly chasing down new types that require crippling. The thinking is that if we cannot control the references for 'file', how are we to know what other types might become exposed later on and thus require more crippling? It essentially comes down to what is harder to do: find all the ways to access the types in Python in a sandboxed interpreter with no imported modules, or to go through the Python code base and find all types that should be crippled? The 'rexec' Module /////////////////////////////////////// The 'rexec' module [#rexec]_ was the original attempt at providing a sandbox environment for Python code to run in. It's design was based on Safe-Tcl which was essentially a capabilities system [#safe-tcl]_. sandboxed environment. Imports were checked against a whitelist of modules. You could also restrict the type of modules to import based on whether they were Python source, bytecode, or C extensions. Built-ins were allowed except for a blacklist of built-ins to not provide. One could restrict whether stdin, stdout, and stderr were provided or not on a per-RExec basis. Several other protections were provided; see documentation for the complete list. The ultimate undoing of the 'rexec' module was how access to objects that in normal Python require no imports sandboxed interpreter, one only had to ``del __builtins__`` to gain access to the full set of built-ins. Another way is through using the gc module: ``gc.get_referrers(''.__class__.__bases__[0])[6]['file']``. While both of these could be fixed (the former was a bug in 'rexec' that was fixed and the latter could be handled by not allowing 'gc' to be imported), they are examples of things that do not require proactive actions on the part of the programmer in normal Python to gain access to a resource. This was an unfortunate side-effect of having all of that wonderful reflection in Python. There is also the issue that 'rexec' was written in Python which provides its own problems based on reflection and the ability to modify the code at run-time without security protection. Much has been learned since 'rexec' was written about how Python tends to be used and where security issues tend to appear. Essentially Python's dynamic nature does not lend itself very well to a security implementation that does not require a constant checking of permissions. Threat Model /////////////////////////////////////// Below is a list of what the security implementation assumes, along with what section of this document that addresses that part of the security model (if not already true in Python by default). The term "bare" when in regards to an interpreter means an interpreter that has not performed a single import of a module. Also, all comments refer to a sandboxed interpreter unless otherwise explicitly stated. This list does not address specifics such as how 'file' will be protected or whether memory should be protected. This list is meant to make clear at a more basic level what the security model is assuming is true. * The Python interpreter itself is always trusted. * The Python interpreter cannot be crashed by valid Python source code in a bare interpreter. * Python source code is always considered safe. * Python bytecode is always considered dangerous [`Hostile Bytecode`_]. * C extension modules are inherently considered dangerous [`Extension Module Importation`_]. + Explicit trust of a C extension module is possible. * Sandboxed interpreters running in the same process inherently cannot communicate with each other. + Communication through C extension modules is possible because of the technical need to share extension module instances between interpreters. * Sandboxed interpreters running in the same process inherently cannot share objects. + Sharing objects through C extension modules is possible because of the technical need to share extension module instances between interpreters. * When starting a sandboxed interpreter, it starts with a fresh built-in and global namespace that is not shared with the interpreter that started it. * Objects in the default built-in namespace should be safe to use [`Reading/Writing Files`_, `Stdin, Stdout, and Stderr`_]. + Either hide the dangerous ones or cripple them so they can cause no harm. There are also some features that might be desirable, but are not being addressed by this security model. * Communication in any direction between an unprotected interpreter and a sandboxed interpreter it created. The Proposed Approach /////////////////////////////////////// In light of where 'rexec' succeeded and failed along with what is known about the two main approaches to security and how Python tends to operate, the following is a proposal on how to secure Python for sandboxing. Implementation Details =============================== Support for sandboxed interpreters will require a compilation flag. This allows the more common case of people not caring about protections to not take a performance hit. And even when Python is compiled for sandboxed interpreter restrictions, when the running interpreter *is* unprotected, there will be no accidental triggers of protections. This means that developers should be liberal with the security protections without worrying about there being issues for interpreters that do not need/want the protection. At the Python level, the __sandboxed__ built-in will be set based on whether the interpreter is sandboxed or not. This will be set for *all* interpreters, regardless of whether sandboxed interpreter support was compiled in or not. For setting what is to be protected, the PyThreadState for the sandboxed interpreter must be passed in. This makes the protection very explicit and helps make sure you set protections for the exact interpreter you mean to. All functions that set protections begin with the prefix ``PySandbox_Set*()``. These functions are meant to only work with sandboxed interpreters that have not been used yet to execute any Python code. The calls must be made by the code creating and handling the sandboxed interpreter *before* the sandboxed interpreter is used to execute any Python code. The functions for checking for permissions are actually macros that take in at least an error return value for the function calling the macro. This allows the macro to return on behalf of the caller if the check fails and cause the SandboxError exception to be propagated automatically. This helps eliminate any coding errors from incorrectly checking a return value on a rights-checking function call. For the rare case where this functionality is disliked, just make the check in a utility function and check that function's return value (but this is strongly discouraged!). Functions that check that an operation is allowed implicitly operate on the currently running interpreter as returned by ``PyInterpreter_Get()`` and are to be used by any code (the interpreter, extension modules, etc.) that needs to check for permission to execute. They have the common prefix of `PySandbox_Allowed*()``. API -------------- * PyThreadState* PySandbox_NewInterpreter() Return a new interpreter that is considered sandboxed. There is no corresponding ``PySandbox_EndInterpreter()`` as ``Py_EndInterpreter()`` will be taught how to handle sandboxed interpreters. ``NULL`` is returned on error. * PySandbox_Allowed(error_return) Macro that has the caller return with 'error_return' if the interpreter is unprotected, otherwise do nothing. Memory ============================= Protection -------------- A memory cap will be allowed. Modification to pymalloc will be needed to properly keep track of the allocation and freeing of memory. Same goes for the macros around the system malloc/free system calls. This provides a platform-independent system for protection of memory instead of relying on the operating system to provide a service for capping memory usage of a process. It PySandbox_SetMemoryCap(PyThreadState *, integer) Set the memory cap for an sandboxed interpreter. If the interpreter is not running an sandboxed interpreter, return a false value. * PySandbox_AllowedMemoryAlloc(integer, error_return) Macro to increase the amount of memory that is reported that the running sandboxed interpreter is using. If the increase puts the total count passed the set limit, raise an SandboxError exception and cause the calling function to return with the value of 'error_return', otherwise do nothing. * PySandbox_AllowedMemoryFree(integer, error_return) Macro to decrease the current running interpreter's allocated memory. If this puts the memory used to below 0, raise a SandboxError exception and return 'error_return', otherwise do nothing. Reading/Writing Files ============================= Protection -------------- XXX To open a file, one will have to use open(). This will make open() a factory function that controls reference access to the 'file' type in terms of creating new instances. When an attempted file opening fails (either because the path does not exist or of security reasons), SandboxError will be raised. The same exception must be raised to prevent filesystem information being gleaned from the type of exception returned (i.e., returning IOError if a path does not exist tells the user something about that file path). What open() returns may not be an instance of 'file' but a proxy that provides the security measures needed. While this might break code that uses type checking to make sure a 'file' object is used, taking a duck typing approach would be better. This is not only more Pythonic but would also allow the code to use a StringIO instance. It has been suggested to allow for a passed-in callback to be called when a specific path is to be opened. While this provides good flexibility in terms of allowing custom proxies with more fine-grained security (e.g., capping the amount of disk write), this has been deemed unneeded in the initial security model and thus is not being considered at this time. Why -------------- Allowing anyone to be able to arbitrarily read, write, or learn about the layout of your filesystem is extremely dangerous. It can lead to loss of data or data being exposed to people whom should not have access. Possible Security Flaws ----------------------- XXX API -------------- * int PySandbox_SetAllowedFile(PyThreadState *, string path, string mode) Add a file that is allowed to be opened in 'mode' by the 'file' object. If the interpreter is not sandboxed then return a false value. * PySandbox_AllowedPath(string path, string mode, error_return) Macro that causes the caller to return with 'error_return' and raise SandboxError as the exception if the specified path with 'mode' is not allowed, otherwise do considered safe based on the assumption that all resource harm is eventually done at the C level, thus Python source code directly cannot cause harm without help of C extension modules. Thus only C extension modules need to be checked against the whitelist. The requested extension module name is checked in order to make sure that it is on the whitelist if it is a C extension module. If the name is not correct a SandboxError exception is raised. Otherwise the import is allowed. Even if a Python source code module imports a C extension module in an unprotected interpreter it is not a problem since the Python source code module is reloaded in the sandboxed interpreter. When that Python source module is freshly imported the normal import check will be triggered to prevent the C extension module from becoming available to the sandboxed interpreter. For the 'os' module, a special sandboxed Why -------------- Because C code is considered unsafe, its use should be regulated. By using a whitelist it allows one to explicitly decide that a C extension module is considered safe. Possible Security Flaws ----------------------- If a whitelisted C extension module imports a non-whitelisted C extension module and makes it an attribute of the whitelisted module there will be a breach in security. Luckily this a rarity in extension modules. There is also the issue of a C extension module calling the C API of a non-whitelisted C extension module. Lastly, if a whitelisted C extension module is loaded in an unprotected interpreter and then loaded into a sandboxed interpreter then there is no checks during module initialization for possible security issues in the sandboxed interpreter that would have occurred had the sandboxed interpreter done the initial import. All of these issues can be handled by never blindly whitelisting a C extension module. Added support for dealing with C extension modules comes in the form of `Extension Module Crippling`_. API -------------- * int PySandbox_SetModule(PyThreadState *, string module_name) Allow the sandboxed interpreter to import 'module_name'. If the interpreter is not sandboxed, return a false value. Absolute import paths must be specified. * int PySandbox_BlockModule(PyThreadState *, string module_name) Remove the specified module from the whitelist. Used to remove modules that are allowed by default. Return a false value if called on an unprotected interpreter. * PySandbox_AllowedModule(string module_name, error_return) Macro that causes the caller to return with 'error_return' and sets the exception SandboxError if the specified module cannot be imported, otherwise PySandbox_Allowed() to protect unsafe code from being executed. Hostile Bytecode ============================= Protection -------------- XXX Why -------------- Without implementing a bytecode verification tool, there is no way of making sure that bytecode does not jump outside its bounds, thus possibly executing malicious code. It also presents the possibility of crashing the interpreter. Possible Security Flaws ----------------------- None known. API -------------- N/A Changing the Behaviour of the Interpreter ========================================= Protection -------------- Only a subset of the 'sys' module will be made available to sandboxed interpreters. Things to allow from the sys module: * byteorder (?) *. open() is to be used as a factory function to open a network connection. If the connection is not possible (either because of an invalid address or security reasons), SandboxError is raised. A socket object may not be returned by the call. A proxy to handle security might be returned instead. XXX PySandbox_SetIPAddress(PyThreadState *, string IP, integer port) Allow the sandboxed interpreter to send/receive to the specified 'IP' address on the specified 'port'. If the interpreter is not sandboxed, return a false value. * PySandbox_AllowedIPAddress(string IP, integer port, error_return) Macro to verify that the specified 'IP' address on the specified 'port' is allowed to be communicated with. If not, cause the caller to return with 'error_return' and SandboxError exception set, otherwise do nothing. * int PySandbox_SetHost(PyThreadState *, string host, integer port) Allow the sandboxed interpreter to send/receive to the specified 'host' on the specified 'port'. If the interpreter is not sandboxed, return a false value. * PySandbox_AllowedHost(string host, integer port, error_return) Check that the specified 'host' on the specified 'port' is allowed to be communicated with. If not, set a SandboxError exception and cause the caller to return 'error_return', otherwise do nothing. Network Information ============================= Protection -------------- Limit what information can be gleaned about the network the system is running on. This does not include restricting information on IP addresses and hosts that are have been explicitly allowed for the sandboxed interpreter to communicate with. XXX PySandbox_SetNetworkInfo(PyThreadState *) Allow the sandboxed interpreter to get network information regardless of whether the IP or host address is explicitly allowed. If the interpreter is not sandboxed, return a false value. * PySandbox_AllowedNetworkInfo(error_return) Macro that will return 'error_return' for the caller and set a SandboxError exception if the sandboxed interpreter does not allow checking for arbitrary network information, otherwise do nothing. Filesystem Information ============================= Protection -------------- Do not allow information about the filesystem layout from various parts of Python to be exposed. This means blocking exposure at the Python level to: * __file__ attribute on modules * __path__ attribute on packages * co_filename attribute on code objects * XXX Why -------------- Exposing information about the filesystem is not allowed. You can figure out what operating system one is on which can lead to vulnerabilities specific to that operating system being exploited. Possible Security Flaws ----------------------- Not finding every single place where a file path is exposed. API -------------- * int PySandbox_SetFilesystemInfo(PyThreadState *) Allow the sandboxed interpreter to expose filesystem information. If the passed-in interpreter is not sandboxed, return NULL. * PySandbox_AllowedFilesystemInfo(error_return) Macro that checks if exposing filesystem information is allowed. If it is not, cause the caller to return with the value of 'error_return' and raise SandboxError, otherwise do nothing. Stdin, Stdout, and Stderr ============================= Protection -------------- By default, sys.__stdin__, sys.__stdout__, and sys.__stderr__ will be set to instances of StringIO. Explicit allowance of the process' stdin, stdout, and stderr is possible. This will protect the 'print' statement, and the built-ins input() and raw_input(). Why -------------- Interference with stdin, stdout, or stderr should not be allowed unless desired. No one wants uncontrolled output sent to their screen. Possible Security Flaws ----------------------- Unless StringIO instances can be used maliciously, none to speak of. API -------------- * int PySandbox_SetTrueStdin(PyThreadState *) int PySandbox_SetTrueStdout(PyThreadState *) int PySandbox_SetTrueStderr(PyThreadState *) Set the specific stream for the interpreter to the true version of the stream and not to the default instance of StringIO. If the interpreter is not sandboxed, return a false value. Adding New Protections ============================= .. note:: This feature has the lowest priority and thus will be the last feature implemented (if ever). -------------- + Bool * int PySandbox_SetExtendedFlag(PyThreadState *, string group, string type) Set a group-type to be true. Expected use is for when a binary possibility of something is needed and that the default is to not allow use of the resource (e.g., network information). Returns a false value if used on an unprotected interpreter. * PySandbox_AllowedExtendedFlag(string group, string type, error_return) Macro that if the group-type is not set to true, cause the caller to return with 'error_return' with SandboxError exception raised. For unprotected interpreters the check does nothing. + Numeric Range * int PySandbox_SetExtendedCap(PyThreadState *, string group, string type, integer cap) Set a group-type to a capped value, 'cap', with the initial allocated value set to 0. Expected use is when a resource has a capped amount of use (e.g., memory). Returns a false value if the interpreter is not sandboxed. * PySandbox_AllowedExtendedAlloc(integer increase, error_return) Macro to raise the amount of a resource is used by 'increase'. If the increase pushes the resource allocation past the set cap, then return 'error_return' and set SandboxError as the exception, otherwise do nothing. * PySandbox_AllowedExtendedFree(integer decrease, error_return) Macro to lower the amount a resource is used by 'decrease'. If the decrease pushes the allotment to below 0 then have the caller return 'error_return' and set SandboxError as the exception, otherwise do nothing. + Membership * int PySandbox_SetExtendedMembership(PyThreadState *, string group, string type, string member) Add a string, 'member', to be considered a member of a group-type (e.g., allowed file paths). If the interpreter is not an sandboxed interpreter, return a false value. * PySandbox_AllowedExtendedMembership(string group, string type, string member, error_return) Macro that checks 'member' is a member of the values set for the group-type. If it is not, then have the caller return 'error_return' and set an exception for SandboxError, otherwise does nothing. + Specific Value * int PySandbox_SetExtendedValue(PyThreadState *, string group, string type, string value) Set a group-type to 'value'. If the interpreter is not sandboxed, return NULL. * PySandbox_AllowedExtendedValue(string group, string type, string value, error_return) Macro to check that the group-type is set to 'value'. If it is not, then have the caller return 'error_return' and set an exception for SandboxError, otherwise do nothing. Python API ============================= __sandboxed__ -------------- A built-in that flags whether the interpreter currently running is sandboxed or not. Set to a 'bool' value that is read-only. To mimic working of __debug__. sandbox module -------------- XXX References /////////////////////////////////////// .. [#rexec] The 'rexec' module () .. [#safe-tcl] The Safe-Tcl Security Model () .. [#ctypes] 'ctypes' module () .. [#paradigm regained] "Paradigm Regained: Abstraction Mechanisms for Access Control" () .. [#armin-hiding] [Python-Dev] what can we do to hide the 'file' type? () -------------- next part -------------- An HTML attachment was scrubbed... URL:
http://mail.python.org/pipermail/python-dev/2006-July/067291.html
crawl-002
refinedweb
5,187
53.21
I don't know whether to post this as a request for wisdom or as a meditation. I chose for the first because it has a question at the end. Anyway. I'm writing an chatbot. My design is modular: The bot has a connnection (aim/jabber/irc), a config, a brain, a scheduler, events, etc. All based on plugins so I can change parts while it is running. The problem is that connections are callback based, and each callback only gets the connection object passed to it. But the brain and the config need to be accessed from the callbacks. The naive solution is to use globals, but I want to be able to use a test and a production bot at the same time. The other naive solution is to inherit the ChatBot class from Net::OSCAR (which is what I'm using for AIM) and stick the other objects into it. But that makes it hard to have both AIM and Jabber connections at the same time. Hence I came up with Class::Bundle. The code is not really important here, if someone's interested let me know and I'll post it. Class::Bundle is to be used as a base class. package ChatBot; use base qw/Class::Bundle/; use ChatBot::Config; use ChatBot::Brain; use ChatBot::Logger; # exports logger() ... use Net::OSCAR; sub new { my($class, $name) = @_; my $self = bless { config => ChatBot::Config->new , brain => ChatBot::Brain->new , ... , oscar => Net::OSCAR->new } => ref($class) || $class; $self->bundle($name); # note 1) $self->inject('logger'); # note 2) } [download] So, now the im_in() callback from Net::OSCAR gets the connection object ($oscar) passed to it and I can find my config by doing $oscar->config; and my parent node by $oscar->parent; (or $oscar->whatever_name_I_passed_to_new();) etc. This means that Class::Bundle is effectively grouping unrelated classes into a cooperating bundle. Now, for the promised question(s): A typical approach is to adopt a layered architecture, where the lower-level objects don't know much about the higher-level ones. For example, perhaps instead of having references to all of the other objects, the connection object can get by with just converting the incoming message into a standard format and passing it to a callback function? That way, some object from a higher layer could create the connection, pass it the relevant configuration information, and register the callback to be invoked when a message is received. It's not that I'm injecting all methods from all objects into each others namespaces, just that every object carries a reference to it's 'siblings' and 'parent'. But your suggestion of using my own callbacks is one I'll explore. thanks. Tron Wargames Hackers (boo!) The Net Antitrust (gahhh!) Electric dreams (yikes!) Office Space Jurassic Park 2001: A Space Odyssey None of the above, please specify Results (107 votes), past polls
http://www.perlmonks.org/index.pl?node_id=415859
CC-MAIN-2014-35
refinedweb
481
62.78
Update of bug #41459 (project octave): Category: None => Octave Function Status: None => Need Info _______________________________________________________ Follow-up Comment #1: I see we do handle the "*" modifier in the interp1 function already. So you're saying this should apply to interp2 as well? What about interp3 or interpn? I don't see any mention of the "*" modifier on any of the Matlab help pages, is this an undocumented or legacy Matlab feature? It would be good to patch all of them at once, and follow the pattern of interp1 even if we don't handle the flag for now to make it easier to compare all 4 functions. Something like this maybe? Completely untested: ## FIXME: Handle starmethod interpolation starmethod = method(1) == "*"; if (starmethod) method(1) = []; warning (...) endif _______________________________________________________ Reply to this item at: <> _______________________________________________ Message sent via/by Savannah
https://lists.gnu.org/archive/html/octave-bug-tracker/2014-02/msg00660.html
CC-MAIN-2020-10
refinedweb
138
63.29
Smart optimizations and Backtrader Hi there! I've been trying to use Backtrader in order to backtest and optimize trading strategies. I've noticed that the optimizer is just going through all the parameter ranges without using any heuristics (for example hill-climbing). I tried to just create a cerebro instance, running it and getting the broke value at the end while using an optimizer from the outside, though this resulted in very slow performance, compared to optstrategy, even when considering multiple cpus. Does anyone here have any recommendations as to how to best use "smart" optimizers along with Backtrader? Thanks, Harel - backtrader administrators See this other thread: Community - Genetic Optimization Hey, thanks for the reply. That's pretty much what I did. It runs much slower (per parameter combination) than just running cerebro.optstrategy. @Harel-Rozental what did you use for smart optimization? @ab_trader For now I used exactly what they said in that thread, optunity library. But the problem isn't in the time it takes to choose new parameters (this wouldn't be Backtrader's problem), the problem is the time it takes to conduct one test (i.e going through 1 month or 1 year of minute data). I think I see what the source of the problem is. Creating the cerebro instance and loading the data is taking a lot of time. When using optunity it goes through the process of cerebro creation every time. Is there a way I can use the same instance (and same data) for every run, like it does when using cerebro.optstrategy ? @Harel-Rozental said in Smart optimizations and Backtrader: It runs much slower (per parameter combination) than just running cerebro.optstrategy. I am confused by this statement. optstrategyfor case shown in that thread with two parameters ranged [2, 55] will run cerebro 53 x 53 = 2,809 times. With optunityscript will run cerebro only num_evals=100times. How it can be slower? Slower per iteration. The iteration including initializing cerebro is more than 2x slower than optstrategy when using large amounts of data. Even a month of minute data takes about 10 seconds per iteration. - backtrader administrators optstrategyreuses the loaded data and shares it across worker processes. The usual approach to reduce loading time is to restrict the file to the actual data which will be used in the backtesting. Some ideas here: Community - How to speed up backtest Ok, got it now. .adddata()method takes long time. I use roughly 5,000+ bars so it doesn't affect me significantly. As a crazy idea (didn't check it, have no large data sets): def only_add_data_to_cerebro(data) cerebro = bt.Cerebro() cerebro.adddata(data) return cerebro data = bt.feeds.YahooFinanceData(...) cerebro_with_data = only_add_data_to_cerebro(data) def optstrategy(params): cerebro_with_data.addstrategy(SmaCross, params) cerebro_with_data.run() return cerebro.broker.getvalue() optstrategyfunction will be used for optimization runs. I've used such approach with .plot()method (fully initialized and processed cerebroin the function) and it worked. @backtrader I did restrict the file (actually I use a pandas dataframe) before loading it into a backtrader data object, though my restriction is changing minute-data from 7 years to 2 or 1 year. Even when resampling to say 30 mins, I still want the 1 minute to replay the data. I guess the reusing of optstrategy is what makes if faster, I'll try to mimic that. @ab_trader I don't know if running the same cerebro instance will work, but I will try something like it in order to, as I said, mimic optstrategy. A bit of an update: run multiprocessing by means of optunity? @ab_trader On a quick check I couldn't find a way to make optunity do multiprocessing, so I just run it [cores] times and take the best result. @Harel-Rozental in the documents (one of the examples) they offered to use the following for parallel processing: for solver in solvers: pars, details, _ = optunity.minimize(f, num_evals=100, x=[-5, 5], y=[-5, 5], solver_name=solver) # the above line can be parallelized by adding `pmap=optunity.pmap` # however this is incompatible with IPython I wasn't able to run it. @Harel-Rozental said in Smart optimizations and Backtrader: mind to share some code? Or kind of a layout of what and where was implemented in more details?
https://community.backtrader.com/topic/224/smart-optimizations-and-backtrader
CC-MAIN-2017-51
refinedweb
716
57.37
- Logic Games (eg Hooda Math) - Touchop - Drag-and-drop puzzle game for the browser - Simple Calculations - Comprehensive K-8 Math lessons, games, practice (eg AAA Math), but without the ads. - OLymPiC Math: a series of team and individual competitive math games utilizing the mesh feature for grades K-8 - Basic Calculators (eg GCalculator) - Calc for more basic tasks, BC for more difficult ones, and SC or a GUI based spreadsheet, perhaps. - Data Analysis and Visualization (as opposed to statistics) - Fractran interpretor in C from ADA graph language - LaTeX, this is free and powerful typesetting system creating beautiful documents - Spreadsheet software ( see request:Ban_Samkha ) - Financial tools - Budgeting - Loan calculators - Accounting software - Higher mathematics - Scientific calculators (eg GCalculator) - Graphing Calculators (eg GTKGraph (unmaintained)) - Typesetting/equation editing (eg ASCIIMath) - Algebraic solvers/explorers (eg NumExp) - Symbolic manipulation/Computer Algebra System (eg SymPy) ** Geometric exploration (eg PyGeo (note: not GTK)) - Fractal explorers (eg GnoFract4D) - Mathematica for children, for modeling and calculating - Financial Literacy - Cash vs. Credit - Banking - Interest and Borrowing - Basic Accounting - International Monies - Applied Mathematics - Digital Signal Processing (filters, echo, etc. in Electronic Music, voice-changer game, etc.) - Motion simulation (rocketry, planetary-motion) - Estimation through sampling (eg the total height of all the children, based on a sample) Language - Initial literacy (local language) See Category:Literacy ideas. -) (see also Words) - ScriptExplorer - explore fascinating writing systems of the world. See [1] for some ideas. - Phonetics toy - sort of like TamTam (Mini) but with IPA symbols and sounds. See PhoneticExplorer page. - Thesaurus - Spelling/vocabulary word list distribution, integrated homework exercises, practice quizzes, and teacher led tests live in class with results communicated to school server. - Mad-libs, Exquisite Corpse - Peer Editing Exchange - Speech recognition - Handwriting recognition - Augmentative and alternative communication (communication prosthetic for children with severe speech disabilities) - Speech synthesis - Show and tell (child's video about an object or a slide-show illustrated by text and photos, to practice first/second language) - Research and writing - a database program to store reference data when information is collected "cut-and-paste" style, or hard entered if a student has a book. For that information to automatically generate a reference list (MLA or APA style footnotes) to promote ease of preserving intellectual property. Additionally, a file of "notecards" to allow categorization, organization, and addition of personal summary notes that a student can then select from and insert into a document. Like traditional research notecards without all the paper and time spent copying reference data. Maybe something here would be portable. - Picture book - similar to the photo dictionaries, picture with numbered items, corresponding list with the name of the item, can select the language to have the item described. May have sponsorship potential by having companies provide the photos (home furnishing, garage, theater, transportaion...). - Automatic Language Translation Create a user-friendly application which can translation between any language pair, based on open-source technology from the Moses toolkit. - Translation from pictures of text. (like Google goggles ) Take a picture of a sign, etc. and get a translation. (Would be especially handy for languages that use other scripts.) Science - Starfield explorers (e.g. nightsky, StarChart) - PDF Organizer for Journal Articles Downloaded (capacity to automatically generate bibliography, keep track of running library, and the ability to search within the documents). - Chemical simulators - Physics simulators (Newtonian, for example Phun [2]) - Biological simulators (population simulators) - Genealogy software (e.g. Gramps) - Dynamic system simulators (e.g. ecological simulators, economic simulators) - Geography (mapping) software, coordinates, maps, data-overlays, GIS operations, FindTheCountry, USStates - Data collection tools - Unit conversion tools (e.g. GConvert) - Time-lapse photography tool - Photogrammetric Astronavigation (i.e. analyzing pictures of the night sky to determine the child's location) I do not believe the XO can do this. I ran an experiment on September 17th, 2008 using Record to attempt to photograph the night sky in the direction of Sagittarius. Even after extreme contrast enhancement at the limit of the noise, the only thing visible in the image was Jupiter. -- Davewa 13:50, 18 September 2008 (UTC) - Moon viewer for lunar phase information (e.g. Moon) - Earth viewer day/night cycle, for off-line use, lat/lon location tagging/sharing (planning to port EarthGlobe) See also SunriseActivity -- Davewa 00:53, 1 October 2010 (UTC) - Field Journal - where students can insert photos and commentary on native wildlife and domestic animals as a starting point to looking up those animals in field guides to expand with classification, behavior observations, etc. (keeping in mind a story I read of a 10 year-old boy who was so engrossed in his hobby of collecting and classifying ants that he identified several new species!) - An angle measurement tool by looking at the horizon with the camera. - Some motion or sound trigger with the camera to see a shy animal coming out of its hole. - A photo tool to calibrate the camera' background/noise out for long exposure images at night - An accoustic distance measurement tool using the loundspeakers and the microphone, or a tool which finds the resonance frequency of a pipe. I recall crawling through these huge concrete things to guide rainwater under a road, they have an awsome accoustics. - A simple function generator: set frequency, shape, amplitude, and loudspeakers on/off. Find out about Young's double slit diffraction experiment with the two loudspeakers running in phase at a few kHz. Use a narrow band accoustic spectrum analyzer on another OLPC to measure the sound amplitude in a sea of background noise, and display it - in LARGE letters, so everyone can see it 8) - Find out how far a lightning stroke is away; one could do that with a slow oscilloscope-type display with a trace for integrated light intensity seen by the camera and the response of the microphone Measure distances between two XOs via sound propagation / synchronization via wireless - See: Acoustical measure - Synchronize a group of XOs, and use them as a coherent sound source: Find out how a grating works, or direct the sound in a particular direction. Here goes your acoustic phased array antenna. Can perhaps be extended to a receiving array to find out where noise sources are in a class room. - Stick a transmission grating (perhaps a CD would do) in front of the camera lens and use it as a spectrophotometer. Should be good enough to see the difference between fluorescent lamps, sunlight, LEDs - and the OLPC computer screen? - A cheapo 2D graphical raytracer with a lens, a few rays and a perhaps a mirror or a prism one can move around to see how light can be focused or deflected - Listen to the ultrasonic sound of bats: mix down the Mic signal and reproduce it on the speaker. Watch the sound spectrum on the screen. Security (Ideas by Abhishek Indoria, hackerboymayabhi_AT_gmail_DOT_com and abhishek_AT_fossfy_DOT_co_DOT_cc...I will love to work on them. If there is any interested user, please email me.) - Maybe a firewall - Anti-virus utility/software - Anti-Spy utility AND/OR Anti-Spyware - Security Log viewers - Password protection for folders or files,maybe, activities. - Screen Freezer-Teachers can analyze the laptop screen of Children. Physical Education and Training - Training program tracker (e.g. PyTrainer) (Idea added to Health Software.) Art and Expression - Vector graphic creation (illustration) moovl, An on-line program using Java that combines art with physics. - Raster graphic creation (painting, sketching) - Collage operations (Etoys?) - Programmatic creation (Logo or the like) - Video creation - Animation - Stop-motion - Art History Studies - Performance broadcast (school plays and the like) - Panoramic photography (i.e. basic multi-photo stitching, to produce wide-angle/360-degree images - depending on the hardware specs, may also be used to produce higher pixel-count images than with the onboard camera itself) - Video wall - Self-organizing - Arrange bunch of laptops as an extended display (e.g. a matrix, a row, etc.) One laptop is turned to face the extended display. The camera image from the one laptop is used by the other laptops to determine the geometry of the display (which machine is next to which, etc.) Music - Voice/Ear training (e.g. Solfege) - Score display and creation (TamTam?) - Instrument tuning (e.g. guitar) - Viral OLPC Startup Sounds - edit short jingles and share them them with network neighbors. They could also "mutate" with each copy - minimalist keyboard -> audio keyboard program like tinypiano - track based editor like audacity - simple vst-based sound processor like VST Processor, or, possibly more in the spirit of olpc, a more mathematical/visual sound processing environment like Max/MSP. - Audio Editor (Audacity), possibly can work with Tamtam (MAGIX Music Maker) - Video Editor? - I am interested in developing it...anybody?-Abhishek Indoria(abhishek_AT_fossfy_DOT_co_DOT_cc) - MIDI input (e.g. M-Audio Keystation) for TamTam. - Chord Geometries - Music creation (ABC Notation to write songs?) abc2midi abcm2ps - Singing speech synthesizer (possibly built off of the voice function in Synthlab?) - Onboard client for music streaming services (Google Music, Amazon Cloud, iCloud) Communications - VoIP phone - Conferencing system, virtual classroom, shared presentations - Voice-mail (voice email and standard voicemail) - Web-page editor (wikidpad?) - Televised video (streaming video viewer) - Blog Tool - [Speech synthesis] - Automatically connect Patient's Insurance/payment group to Doctor/Hospital to Pharmacy. eGroupWare or similar - A repository system for multimedia content in school servers - A wiki engine for school servers - Drill and test software (Yes, even on a constructivist machine - follow the link for discussion) - Software for supporting teachers' use of rubrics - Software to enable simple anonymous group voting for a multiple choice questions. The class answers are then collated and displayed as a 4 element bar graph. Using the wireless mesh to enable the whole class to vote on a simple A,B,C,D multi choice question removes the social pressure to always provide the correct answer in frount of the group. In addition to quiz sessions it would also teach democratic behavoir and encourage voting amoung the young. ( think who wants to be a millionare ask the audience ! ) - Allow various forms of voting (e.g. single transferable vote).[8] Help familiarize students with various voting systems, facilitate group decision making. - Notecard software - Thinking Skills applications, such as the N-Back task. Note, this can also be made into a game, and possibly networked for multi-player. - Executable English [9] software. Kids and others can learn to write logical reasoning rules, run the rules, and can see English explanations of the results. Non-commercial use is free. - Catholic Education; teaching children to read the bible on their XO's. I am mainly thinking of Haiti and South America to deploy to. All coders are welcome to volunteer. (See Sword_read.) Games (see also Games) - Game framework: Multi-player, multi-team game architecture, so kids can make up their own games. - Game console emulators (needs content) - Strategy Games - Turn-based - Real-time Strategy - Simulation Games - SimCities micropolis - Pioneer / Oregon Trail - SimBusiness - (Lemonade Tycoon, Theme Park Tycoon, etc.) - Open Transport Tycoon Deluxe openTTD - CodeInvader CodeInvader - Networked Version of the World Game (see) - Balance of the Planet (open source versions: Balance of the Planet 2004 (Java), Flash) - Etoys Games - Puzzle Games - Crosswords - Jigsaw Puzzles - Word Searches - Word Jumbles - Hangman - Mazes - Sodoku (e.g. Python Sodoku) - Slither link (also called Loop the Loop), starting with very easy levels. See example in [10] - Rube Goldberg-like puzzles (e.g., The Incredible Machine) - Mastermind (see Wikipedia on Mastermind) - Knight and Knave logic puzzles (see Wikipedia - Knights and Knaves) -. - Arcade/shooter - Games like BoomingBang which require skills and quick actions as well as great fun! - 2d arcade/shooter multiplayer game with several modes such as well-known Deathmatch, Capture the flag, Domination, etc. But without violence and in child-oriented setting. - Virtual 2D or 3D world where users can create avatars, chat with other users, etc. (Sort of like Second Life for kids) Note: Can anybody please tell me how XO will be able to handle that much resources in 3D? Second Life LAGS on great machines and internet connection. It lags(not very much, though) on my 2 MBps internet Connection with Intel Core i7. -A.Indoria Responce: Even though, this is extreamly not the website/section to ask this question, i will answer your question anyways. Lag on any game can be based on CPU, Graphics Card (most likely), RAM (Second most likely), Disk Drive Speed (usually not the case), Internet Speed (third most likely). Play (like games, without winners and losers) - Peek-a-boom - ESP - There is a literature of this kind of social team-building play. For instance, adapt ideas from No Contest by Alfie Kohn. Technology - A online system to sling capital items around (buy and sell at a good clip). That is a ebay for stocks, homes, art works etc. - Microcontroller programmers/compilers (e.g. for irrigation systems, art installations and general automation) - CAD/CAM applications (e.g. PythonCAD) - Matrix CAD - a CAD system based on a standardized modular building system that lets students design, perform color graphic FEA on, and produce sharable 'recipes' for structures they can actually build and use. Matrix is a simple building system developed by designer Ken Isaacs in the 1960s as a DIY furniture building system and was later the basis of the Box Beam system promoted in the famous Box Beam Sourcebook of the 1970s. Based on 2x2 wood members connected with a tough but simple bolted 'trilap' joint, it allowed the creation of an endless variety of structures and was commonly used by renewable energy tinkerers of the late 1970s -until superseded by the introduction of aluminum T-slot profile products. Very well suited to solar energy projects, demonstration hydroponics, demonstration machines, puppet stages and school theatre sets, scroll or card picture boxes for traditional storytelling presentations, small animal enclosures, artists easels and pottery tables, light buildings and shade structures, and classroom or workshop furniture. Concept could be expanded to several different modular building systems such as T-slot, pipe clamp systems like Kee Klamp, the rod & clamp framing systems as currently employed in the RepRap design, or 'angle iron' space frame systems like that employed by the N55 design group, though these are using less easily obtained materials than simple 2x2 lumber. - Source-code editor with transparent native-language display. - Sharable interactive disassembler for Linux ELF x86, FLASH ActionScript bytecode, wireless firmware, Python *.pyc files, 8051 firmware, and other things found on the laptop. It can be the ultimate fall-back "show source" operation. Interactive disassembly is particularly well-suited to being a shared activity; as each person defines things (code or data, function name, data structures, etc.) the shared understanding becomes clearer. - Distributed WEP key cracking over the mesh, allowing a group of XO users to share the work of obtaining an internet connection. - Map making software, allowing kids to make decent maps from poor-quality measurements. For example, measuring some distances or angles around a garden or playground should allow the creation of a map. (angles alone gives you no scale of course) The software could treat the distances as springs, then try to find the least-stress deformation that allows all the numbers to work out. - A patch that acts on USB ports that makes the internal hard drive appear as a flash/thumb drive to another device (such as a car stereo that has USB in, or digital photo frame etc.) PIM - Vista-like sidebar for XP and/or Linux, Unix, Mac. (Similar to VistaRainbar) - Clock (Clock activity) - Contacts - Scheduling - To-do lists - Personal Wiki (eg TiddlyWiki) - juwo (please see. I shall need help porting it to Linux) - quizi Teaching Software eXe - an XHTML-Editor for creating E-Learnings. (You do not need any programming knowledge,) I draw your attention to vpython.org, where VPython = Python + numpy + Visual + OpenGL. The Visual module lets even novice programmers create mouse-navigable 3D animations, by making 3D graphics a side effect of Python calculations. This can be a highly enabling environment for kids. At an upper level, currently several thousand college students are writing VPython programs every semester in an introductory physics course at various institutions that include NCSU, Purdue, and Georgia Tech (see physics course). This is free open-source multiplatform software and runs on Linux, Windows, and Mac. There currently is a production version based on gtk1 and numeric and a beta version based on gtk2 and numpy. Most of the user base is on Windows and Mac, so the beta version hasn't gotten a lot of testing on Linux but seems to work fine (the Windows version is buggy, which is why the beta version hasn't been promoted to being the production version). The beta version adds the capabilities of transparency, surface textures, and sophisticated lighting (spotlights, specular highlights). Here is a complete runnable VPython program that displays a yellow brick beside a red sphere (pos is 3D position): from visual import * box(pos=(2,0,0), size=(2,6,1), color=color.yellow) sphere(pos=(-2,0,0), radius=1.5, color=color.red) Holding down the right mouse button, you can rotate the "camera" around the scene. Holding down both buttons you can zoom in and out. The beta version being based on gtk2 and Pango does provide some internationalization, but the Python program statements currently have to be written in English. For example, the object names "box" and "sphere" and their attributes are all English words. Obviously one could recompile the C++ code to change these names. I'm the gatekeeper for this open-source project and have contributed to its development. Bruce Sherwood 12:15, 30 September 2007 (EDT) Classroom tools The idea of activity sharing supports several important forms of classroom interaction, and can be stretched to accommodate many more. However the focus on constructionism means there's a lack of support for teacher-centric interactions, even ones which are useful in constructionist learning. Raising hands The fundamental model that's missing is the idea of questions or assignments, posed by the teacher and answered separately by each student or team of students. It is possible to accomplish this 'manually', but the technical shuffling makes it impractical to do so in a real-time, classroom situation, especially if it is desirable to keep data for later. For instance, I as a teacher want to be able to pose a question and have each student individually type a response. I could see, and record for later, who responded what and who didn't respond. After giving a brief interval, I could 'call on' a student either by my choice or randomly, and continue the discussion based on their answer. There are several obvious variations on this pattern - for instance, instead of typing a complete answer they could just indicate whether they have an answer, ie, 'raise their hands'; teams could present shared answers; etc. The software would help the teacher to keep track of each student's participation and to 'call on' students in a systematic manner. This type of interaction is so fundamental that it would be great to have it available independent of the currently shared activity. The obvious place to put it, therefore, would be in the bulletin board. This means the bulletin board would have to have some support for active logic. There are 3 ways to do this that I can see: somehow using AJAX for the bulletin board (advantages: highly flexible, tools exist; disadvantages: memory and processor hog, needs some server technology on the teacher's side); hard-coding this one case into the bulletin board (advantage: can be optimized better; disadvantage: inflexible); or somehow making a plugin system for the bulletin board (advantage: flexible; disadvantage: security issues, the world doesn't need yet another plugin architecture) (One disadvantage of using the bulletin board is that it could perpetuate the UI chasm between on-line and off-line communication. In-class questions are no more then small versions of out-of-class assignments, and the interface should be as similar as possible. But that is a bigger problem, one which permeates the XO, and deserves a separate discussion.) Homunq 08:12, 14 January 2008 (EST) Classroom management Motivation and interest are the best ways to achieve engagement, but social pressure and good examples are also a part of the picture, and these are impossible without transparency. If there is no easy way for teachers (or, for that matter, other students) to tell the difference between a student who is working on the laptop, and one who is playing DOOM, bad things happen. Intel/Microsoft's "Classmate" competitor is rumored to have tools for the teacher to freeze or take over the student's laptop, "to guide them through the interface". Regardless of whether this is a desirable relationship, it would be hard to accomplish within the security model and memory constraints of the XO. However, it would be good to have tools for all members of a shared activity to see the current state and recent history of all other current members. This protects privacy (after all, you can just quit the shared activity for privacy) while creating transparency. For it to be useful, it has to be simple and fast. Useful things to see are which activities have been used, and whether out-of-band communication has happened, over the last minute. Homunq 08:12, 14 January 2008 (EST) I can see this working by running a vncserver on all the XO laptops as a background task, the teacher laptop (which I see as being a conventional laptop) perhaps connected to a projector or interactive whiteboard (or a big OLED screen in a few years) would be able to run a vnc client like vinagre to be able to quickly bring up on screen any XO in the class. System software Follow System software link for some discussion of ideas. System Software Enhancements These are lower-level projects that would enhance the entire system's performance or usability. - compiler optimization: if you are a compiler wizard, we understand that the Geode lacks a specific back end code scheduler, which limits performance, particularly FP performance. We'd love to see work go on in this area which would help everyone. (See Geode optimization effort. - tickless operation: there are patches out of tree about to be integrated into Linux that allows Linux to function without periodic ticks; run: Bitfrost is a way to protect against Day 0 attacks; as a large ecosystem of similar machines, it is something worth seriously worrying about. - An update/software manager to handle updates and new software that come out after the laptop is given to the child - A pythonic database administrator for SQLite databases and a stepping stone towards MySQL client server web applications. Cultural - Recipe-managing (allowing kids and parents to create and share recipes with friends and world. eg Gourmet Recipe Manager) - Cultural Song Lyrics - search, share, contribute - Cultural/Historical Stories - search, share, contribute Social and collaborative - Multi-person simulations of markets, agriculture, government. - Yahoo Answers - IM, chat, Skype - Multi-person simulations of physics, biology, population, - Wiki-like group drawing tools - Wiki-like group music tools. - Social Networking to connect young people worldwide - Peoples safety). Not knowing much about python, I wonder about the feasibility of emulation on the OLPC, specifically for Apple II software. It seems there is a project - ApplePy - in the works. There are a large number of great educational apple II titles, many of which have no more recent ports or versions. Though the graphics are limited, making these availible in the short term might be a good start. As a long term project, it would be great to port/reversion/internationalize some classics like Odell Lake, Number Munchers, and Robot Odyssey. Dialectric 19:22, 26 November 2007 (EST) More generally, other emulators of older systems could open a wealth of already-written educational content. In addition to the Apple II, there's also a wealth of educational software for the Commodore 64 and early IBM PC (MS-DOS) platforms, among others. Most of it is poorly internationalized, but the C64 (the most widely produced single computer to date) spawned a large number of national communities in languages other than English, and the Apple II had a Soviet-made clone, the Agat. The C64 has at least two good modern emulators (Frodo and VICE), which could be profitably Sugarized. Early MS-DOS software can be run through dosbox, a Sugarization project for which is already under way. Emulators present the additional problem that ROM and OS images are copyrighted; any efforts by other volunteers to solicit donations of obsolete software from vendors (or their heirs and assigns) could help considerably here. Emulating or porting Sugar into a website that could become a web portal for users of any platform with any machine. It could become a social networking site demonstrating the Sugar user interface and sharing the Sugar perspective of human and machine interaction. - A software interface where the program has the same abilities as Helen Keller. That is it can read characters on a screen (with the help of some type of computer arm. It can type characters (again with the arm). It can have its arm be pushed around with a cursor. And the interface can have some type of reward / punish system (dope slap and stroking). This type of interface will provide a starting point for the development of AI software where the interface is not too complex.. Keyboarding/Typing Tutor - Anything lightweight enough to reside on local XO laptop as a tutorial program or game I wrote a typing method, THE ALPHABET TYPING METHOD, and have a copyright for teaching the keyboard, guaranttee 350 words in four hours. I taught 6 blind people to type. It does not follow the 'home-row' concept. I would like to offer it to OLPC. Can someone contact me about me how to conctact someone and get it the proper source for consideration? My e mail is: 5678@frontiernet.net. Thanks, John Del Monaco. External links Audio/Video edition of NGO-in-a-Box A set of Free Open-Source Video and Audio editing software-tools, documentation and tutorials for Non-Governmental Organizations and other groups for social change. They are available on CD or by download. Keyboarding Possibilities Could Tux Typing be a good addition? It is developed and released under the General Public License (GPL). It is part of the Tux4Kids project (Tux Paint and Tux Math), which is a Schoolforge member. I just don't know if it can run on Linux. Those of you who understand the prgram spec's might want to email: tuxmath-devel@lists.sourceforge.net . Software to create eLearning Salasaga is software I've (Justin Clift) been writing for the last two and a bit years, nearing its first reasonable release. It's for creating eLearning for graphical apps, and could significantly enhance the ease of creating "documentation", PLUS make documentation that's easier to absorb. See also: - The SchoolTool Project: calendaring and resource management; student information system; skills tracking program developed by Virginia students and teachers to track which skills students are acquiring in their classes and at what level of competency - Category:Software ideas contains many pages not yet indexed here - Sample Applications has a few more examples
http://wiki.laptop.org/go/Software_ideas/
CC-MAIN-2017-34
refinedweb
4,525
51.48
Suppose we have a string s whose length is even. We have to split this string into two different halves of same lengths. So consider 'a' is the first half and 'b' is the second half. We say two strings are alike when they have the same number of vowels (uppercase or lowercase). We have to check whether 'a' and 'b' are alike or not. So, if the input is like s = "talent", then the output will be True because two halves are "tal" and "ent", they are alike because they have only one vowel and two consonants. To solve this, we will follow these steps − a := left half of s b := right half of s count1 := 0, count2 := 0 for each c in a, do if c is a vowel, then count1 := count1 + 1 for each c in b, do if c is a vowel, then count2 := count2 + 1 return true if count1 is same as count2, otherwise false Let us see the following implementation to get better understanding − def solve(s): vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] a = s[:len(s)//2] b = s[len(s)//2:] count1 = 0 count2 = 0 for c in a: if c in vowels: count1 += 1 for c in b: if c in vowels: count2 += 1 return count1 == count2 s = "talent" print(solve(s)) "talent" True
https://www.tutorialspoint.com/program-to-check-whether-string-halves-are-alike-in-python
CC-MAIN-2022-21
refinedweb
228
65.09
IRC log of tagmem on 2012-01-06 Timestamps are in UTC. 14:07:24 [RRSAgent] RRSAgent has joined #tagmem 14:07:24 [RRSAgent] logging to 14:07:26 [trackbot] RRSAgent, make logs public 14:07:26 [Zakim] Zakim has joined #tagmem 14:07:28 [trackbot] Zakim, this will be TAG 14:07:28 [Zakim] ok, trackbot; I see TAG_f2f()7:30AM scheduled to start 97 minutes ago 14:07:29 [trackbot] Meeting: Technical Architecture Group Teleconference 14:07:29 [trackbot] Date: 06 January 2012 14:08:10 [masinter] masinter has joined #tagmem 14:08:16 [JeniT] Scribe: Jeni 14:08:19 [JeniT] ScribeNick: JeniT 14:09:22 [Ashok] Ashok has joined #tagmem 14:09:36 [JeniT] Topic: Mime and the Web (with Mark Nottingham) 14:09:55 [mnot] mnot has joined #tagmem 14:17:00 [JeniT] (introductions) 14:17:32 [JeniT] mnot: chairing HTTPbis, liaison from IETF to W3C 14:20:11 [JeniT] mnot: "Web Linking" spec is an attempt to respecify Link: header 14:20:26 [JeniT] ... lots of requirements for link-based protocols 14:20:30 [JeniT] ... and typed links 14:20:48 [JeniT] ... for example in HTML rel="stylesheet" 14:21:07 [JeniT] ... Atom used link relations as well 14:21:19 [JeniT] ... and there's a registry and an XML syntax for links and link relations 14:21:26 [JeniT] ... eg copyright statements, next/previous links 14:21:48 [JeniT] ... wanted to revive Link: HTTP header 14:22:43 [JeniT] ... to convey links in headers rather than body of the message 14:22:57 [JeniT] ... HTML had linking, Atom had linking, and they weren't matched 14:23:20 [JeniT] ... RFC provides a model that you can serialise in various ways 14:23:27 [JeniT] ... needs a context, a type, and a target 14:23:49 [JeniT] ... (which you could map to RDF if you wanted to) 14:24:00 [JeniT] jar: is that called out anywhere? 14:24:04 [JeniT] mnot: not particularly 14:24:23 [JeniT] ... and so to registration 14:24:30 [JeniT] ... link types being a particular example 14:24:35 [JeniT] ... we felt there should be one registry 14:24:48 [JeniT] ... the HTML groups wanted to use a wiki 14:25:09 [JeniT] ... we felt that was too freeform, and noisy 14:25:21 [JeniT] ... and could lead to changing semantics in a backwards-incompatible way 14:25:31 [JeniT] ... so we tried to address their concerns in the registry 14:25:50 [JeniT] ... but they (the HTML group) didn't feel it was an appropriate thing to use 14:25:53 [JeniT] ... time passes 14:26:06 [JeniT] ... the link relation registry is a lot of work to maintain 14:26:26 [JeniT] ... every interaction requires discussion with the author 14:26:48 [JeniT] noah: the overhead is high but the rate isn't high 14:26:59 [timbl] 14:27:07 [JeniT] mnot: we would like to see a higher rate, but can't support it at that overhead 14:27:15 [JeniT] jar: this is the same issue in journal publication 14:27:26 [JeniT] mnot: the question is whether value is being added 14:27:41 [JeniT] ... we have a common system of expert review in IETF 14:27:54 [JeniT] ... the underlying question is what is registry for? 14:28:09 [JeniT] ... some people see it as a gating function: if it's not registered, then it won't be used 14:28:18 [JeniT] ... to prevent stuff that is bad from being used 14:28:29 [JeniT] ... but the gating function makes people less likely to use the registry 14:28:45 [JeniT] noah: so people go ahead and do it anyway, without using the registry 14:29:06 [JeniT] mnot: we discovered this was common to registries for media types, link relations, HTTP headers and URI schemes 14:29:14 [JeniT] ... talked to Ned Freed 14:29:36 [JeniT] ... who runs the media type registry 14:29:46 [JeniT] ... saw that people were misinterpreting the function of registries 14:29:56 [JeniT] ... actually the registry should reflect what is in use 14:30:28 [JeniT] noah: is there a middle ground? 14:30:47 [JeniT] mnot: for a lot of people, registry is just a barrier to get past 14:30:54 [JeniT] ... especially because the work is all up-front 14:31:21 [JeniT] noah: no one says they would deploy more quickly if it was registered 14:31:28 [JeniT] mnot: there's no benefit in the registration 14:31:36 [JeniT] masinter: it just exposes you to criticism 14:31:52 [JeniT] timbl: text/n3 is an example for me 14:32:17 [JeniT] ... the best practice was to use Turtle, but people would use application/rdf+xml because it was registered 14:32:31 [JeniT] mnot: people who pay attention to standards might care 14:32:43 [JeniT] timbl: getting media types into Apache does have a big effect 14:32:56 [JeniT] mnot: Apache put lots of stuff in, it's driven by the market 14:33:23 [JeniT] timbl: why does Apache work and the registry not? 14:33:45 [JeniT] mnot: we want to create a virtuous cycle, for example with machine-readable registry data 14:34:02 [JeniT] ... for example for link relations that lets you add attributes to registry entries 14:34:12 [JeniT] ... so that a browser can see whether it's a link that could be followed 14:34:24 [JeniT] ... or archived and so on 14:34:45 [JeniT] ... so if I come up with a new link relation, and it's treated in a generic way 14:34:47 [timbl] s/why does Apache work and the registry not?/So Apache mime .types works and iana doesn't -- why doens't IANA use the same process as Apache?/ 14:34:54 [JeniT] ... the browsers can have a more automated process for adding semantics 14:35:34 [JeniT] noah: we have to give Jeff Jaffe early warning about potential larger issues 14:36:09 [JeniT] ... it seems that there's a bigger story here about market forces driving standards 14:36:48 [JeniT] q+ to ask whether browsers will really pick up on this metadata automatically 14:37:13 [JeniT] mnot: what we want to do is make IANA a suitable place for these registries 14:37:21 [JeniT] ... which is complex, but worth trying 14:37:25 [noah] ack next 14:37:26 [Zakim] JeniT, you wanted to ask whether browsers will really pick up on this metadata automatically 14:38:29 [noah] JT: You spoke of browsers automatically going to registries and doing something useful with what they find. Do you have actual experience with people being willing to do that? I haven't seen it in my work on RDF. 14:38:53 [noah] mnot: My understanding is that Ian Hickson and Anne van Kesteren felt this would be very helpful in the registries 14:39:33 [noah] mnot: I think one aspect of the value is during the browser development and QA process, where those building a browser can pull from the central registry, do some work to integrate with their browser or tests, and then deploy. 14:40:11 [noah] LM: It's almost as if you want to have so much in the IANA registry that you would never want to use it real time. 14:40:23 [noah] mnot: Hmm. Probably if you do things real time there will be attack vectors. 14:40:41 [noah] JT: And the process for staying in sync is to do a pull every time they release the browser. 14:40:51 [noah] mnot: Yes, but they are on very quick update cycles now 14:41:13 [noah] mnot: Seems unlikely we'll see people automatically supporting new media type handlers. 14:41:29 [noah] LM: I think I've seen things where apps on phones can register for URI prefixes 14:41:34 [JeniT] ScribeNick: JeniT 14:42:07 [JeniT] noah: has anyone looked at associating some a Javascript handler with eg a link relation 14:42:33 [JeniT] ... which the browser could then use to handle links of those types 14:43:04 [JeniT] mnot: that's a bit speculative 14:43:23 [JeniT] ... we want to focus on a virtuous cycle where code can use the information in the registry 14:43:48 [JeniT] timbl: ontologies are link this 14:43:52 [JeniT] s/link/like 14:43:53 [JeniT] s/link/like/ 14:44:15 [JeniT] mnot: the registry needs to reflect what's in use, not how things should be 14:44:21 [JeniT] ... you need to make the barrier to entry low 14:44:26 [JeniT] ... and iteration rapid 14:44:34 [JeniT] ... to incrementally improve the entry 14:44:56 [JeniT] noah: it sounds like you're going very far over to there being no barriers 14:45:10 [JeniT] ... towards something completely open like a wiki 14:45:31 [JeniT] ... I think it's more a shift towards that rather than going completely to the extreme 14:46:06 [JeniT] mnot: the problem is that expert reviewers have a tendancy to try to maintain quality and prevent new entries going in 14:46:07 [masinter] q?> 14:46:10 [masinter] q+ 14:46:19 [noah] ack next 14:46:37 [JeniT] mastinter: registries have rows and columns 14:46:48 [JeniT] ... there's a column with 'review status' which people making the entry can't change 14:46:57 [JeniT] ... which can be 'unreviewed' or 'unacceptable' 14:47:03 [plh] plh has joined #tagmem 14:47:10 [noah] Philippe le Hegaret joins us in the meeting room 14:47:21 [JeniT] mnot: yes, we've talked about having a range of statuses 14:47:38 [JeniT] ... it comes down to having a process to manage the registry 14:47:56 [JeniT] ... if you have a wiki, that's going to happen because there are going to be conflicts within the community 14:48:20 [JeniT] ... and there will be cases where you can't tell what to do, where there are two implementations using the same name with different semantics 14:48:33 [mnot] 14:48:35 [JeniT] ... so we started having meetings within IETF, and have set up a mailing list 14:49:20 [JeniT] ... FriendlyRegistryProcess 14:50:02 [JeniT] ... for example, turning the expert reviewer into more of a community moderator than a gatekeeper 14:50:20 [JeniT] ... for example, Apple is using a bunch of URI schemes which aren't currently in the registry 14:50:35 [JeniT] noah: should one size fit all? 14:50:48 [JeniT] ... it might be different for URI schemes than for link relations 14:50:52 [timbl] q+ 14:51:17 [JeniT] ... it might be that it has different technical consequences to introduce new URI schemes 14:51:38 [JeniT] ack timbl 14:52:01 [JeniT] timbl: there should be very few URI schemes added, but a larger number of media types 14:52:07 [JeniT] ... because that's how the system is designed 14:52:24 [JeniT] ... about switching to a model where you register what exists 14:52:34 [JeniT] ... that does avoid conflict 14:52:57 [JeniT] ... I would support a very open bug tracking system on the registry 14:53:20 [JeniT] ... suppose someone registers something, and that automatically opens up a bug tracker for them, so people could make comments on it 14:53:22 [masinter] q+ to encourage stepping back from calling "too many URI schemes" as "damage", as there is no evidence of harm here. (pointing out I was trying to work on this in 14:53:24 [JeniT] mnot: yes, we talked about this 14:53:56 [JeniT] timbl: not for the process of the registration, but to register technical issues 14:54:02 [JeniT] mnot: we talked about having a wiki page for each entry 14:54:13 [JeniT] ... there's a hidden bug tracker for IANA 14:54:55 [JeniT] timbl: tracker for issues about the entry 14:55:06 [JeniT] mnot: we do want to support third parties to register protocol elements 14:55:25 [JeniT] ... so if a company hasn't registered something, others can do it instead 14:55:45 [JeniT] timbl: ideally you want that to go through very fast, so that there can be feedback on the entry 14:55:55 [JeniT] mnot: and that comes back to the different statuses on the entries 14:56:10 [JeniT] ... to label that something has technical or legal issues 14:56:31 [JeniT] ... we want to order the entries to make the good ones more prominent 14:57:32 [masinter] q- 14:57:38 [JeniT] (moving on to next steps) 14:57:44 [noah] zakim, who is here? 14:57:44 [Zakim] TAG_f2f()7:30AM has not yet started, noah 14:57:45 [Zakim] On IRC I see plh, mnot, Ashok, masinter, Zakim, RRSAgent, jar, JeniT, plinss, DKA, noah, timbl, Norm, ht, darobin, plinss_, trackbot, Yves 14:58:08 [JeniT] mnot: we've had some discussions on this within IETF for the last year or so 14:58:51 [JeniT] ... Ned is doing a revision of [some RFC] 14:59:25 [JeniT] ... and revisions of link relations RFCs 14:59:34 [JeniT] ... and the message header registries RFCs 14:59:54 [JeniT] ... and another document to distil this discussion into "how to set up a registry" 15:00:16 [JeniT] masinter: I have done some work on that 15:00:28 [JeniT] mnot: there are things that IANA can do without updating RFCs 15:00:36 [JeniT] jar: are they cooperative? 15:00:51 [masinter] in 15:00:52 [JeniT] mnot: yes, they need the IETF to take the initiative and they are resource constrained 15:01:02 [JeniT] ... and we've talked about having Wiki pages for each entry 15:01:26 [JeniT] ... this is a long term project 15:01:48 [JeniT] ... the mailing list is the main contact place 15:01:58 [JeniT] ... I am the main contact 15:02:09 [JeniT] masinter: a little W3C resource would make things go a lot faster 15:02:22 [Yves] 15:02:37 [noah] 15:03:05 [JeniT] timbl: is anyone within the TAG following it? 15:03:13 [JeniT] yves: I am on the mailing list 15:03:17 [JeniT] masinter: I am as well 15:03:31 [JeniT] noah: I'm assuming Larry is our point person on this 15:03:54 [JeniT] masinter: I need help 15:04:19 [JeniT] ... I haven't been able to write this up in a way that was understood 15:04:38 [JeniT] ... we need some resources to make some things happen 15:04:51 [JeniT] ... and I don't know how to actually make this happen 15:06:05 [JeniT] noah: what aspects of this should be done within the TAG? 15:06:17 [JeniT] ... perhaps we could just free up some of Larry's time to work on it? 15:06:32 [JeniT] mnot: we would appreciate your review of what we have written up on the wiki 15:07:04 [JeniT] noah: so we should have one or two TAG members review it and frame a way forward 15:07:27 [JeniT] timbl: we can register our enthusiasm and encouragement 15:07:44 [masinter] the main problem i see is that current and previous TAG findings might be in conflict with the new directions being pursued, and that the TAG is more of a bottleneck than a group that can help. 15:07:51 [JeniT] ... on TAG ground, each registry is a piece of the architecture of the web 15:08:16 [JeniT] ... the TAG could dive into how much damage there is when someone makes a new URI scheme 15:08:38 [masinter] i prepared some material on this subject in the slides i put together for this meeting and was unable to get agenda time to present it 15:08:48 [JeniT] noah: arguably it's not a registry discussion 15:09:06 [JeniT] timbl: for a given registry, the TAG might want to point out the damage done by a badly designed scheme 15:09:23 [JeniT] mnot: so long as that doesn't prevent entries going into the registry 15:09:35 [JeniT] ... even if the bad ones are highlighted with blinking 'Evil' icons 15:10:55 [JeniT] noah: should we actually do this (about URI schemes) 15:11:27 [JeniT] ... is there any new work that we should kick off now? 15:12:10 [JeniT] ... also, does it help to have a formal TAG resolution to support this work? 15:12:30 [JeniT] mnot: probably not now, I just wanted to socialise this with you 15:13:19 [JeniT] noah: we're very interested in this, and we have been looking at this in an ongoing way, and we will keep on doing so 15:26:22 [JeniT] Topic: Web protocols: HTTP Futures & SPDY (with Mark Nottingham) 15:26:59 [JeniT] JeniT has left #tagmem 15:27:38 [JeniT] JeniT has joined #tagmem 15:35:18 [plh] plh has left #tagmem 15:35:37 [JeniT] noah: a few months ago, it started to look as though SPDY was expanding beyond Google 15:35:48 [JeniT] ... we had a technical discussion at TPAC 2011 15:36:23 [JeniT] ... it looks like there could be major changes to the web due to innovations such as SPDY 15:36:57 [JeniT] ... doing everything through SSL 15:37:11 [JeniT] mnot: the SPDY guys have strong dislike for transparent protocols (?) 15:37:30 [JeniT] noah: and there's a privacy angle here 15:37:47 [JeniT] ... we haven't for a while looked at this level of web architecture 15:38:05 [JeniT] ... we want to decide if this is an area where the TAG needs to do serious work, what the goals are, who is going to do it 15:38:23 [JeniT] ... and top priority is to have discussion with Mark 15:38:52 [JeniT] ... we could look at Yves email 15:39:12 [JeniT] ... to which there were some responses 15:39:56 [JeniT] mnot: I would like to talk for 10 minutes and then have discussion 15:42:40 [DKA] scribenick: DKA 15:43:07 [DKA] scribenick: JeniT 15:43:30 [JeniT] mnot: we started HTTPbis about 4 years ago 15:44:04 [JeniT] ... the idea was to revise HTTP because we now had 10 years of implementation experience of RFC2616 15:44:21 [JeniT] ... there was a lot of knowledge locked up in people's heads that we wanted to get written down 15:44:36 [JeniT] ... with quite a tight charter 15:44:51 [JeniT] ... not a new version of HTTP, no extensions, just fixing the specs 15:45:12 [JeniT] ... we're almost done 15:45:36 [JeniT] ... we have about 11 design tickets open, many of those will be closed really soon 15:45:49 [JeniT] ... the editors are Yves, Roy Fielding and Julian Reschke 15:46:08 [JeniT] ... we wanted to make something solid for 10-20 years 15:46:22 [JeniT] ... meanwhile implementers have come up with SPDY, mostly for performance 15:46:37 [JeniT] ... addressing a number of issues with HTTP and its serialisation over TCP (?) 15:46:56 [JeniT] ... the Google guys have an implementation, both server and client 15:47:41 [JeniT] ... Patrick McManus has done implementation in Firefox, also HTTP pipelining 15:48:00 [JeniT] ... he's found it easier to do SPDY than HTTP pipelining 15:48:13 [JeniT] ... it should be in Firefox 11 15:48:24 [JeniT] timbl: so it hasn't actually gone to market 15:48:36 [JeniT] yves: Opera also provided feedback on pipelining 15:48:51 [JeniT] mnot: the main problem with pipelining is that you have to use a lot of heuristics about when you can use pipelining 15:49:21 [JeniT] ... within pipelining, requests can block 15:49:32 [JeniT] noah: but in SPDY, you can interleave? 15:49:37 [JeniT] mnot: yes 15:49:49 [JeniT] ... Mike probably also covered Jim Getty's concerns about buffer bloat 15:50:13 [JeniT] ... I did an implementation of HTTP pipelining and SPDY in Python, and SPDY was much simpler 15:50:23 [JeniT] ... Amazon is using SPDY in the Kindle now, or are in process of doing so 15:50:44 [JeniT] ... Daniel Stenburg, behind curl, is implementing a C library for SPDY 15:51:17 [JeniT] noah: in Amazon Fire, there's the split browser, do they also use SPDY in requests out to the wider web? 15:51:22 [JeniT] mnot: I'm not sure 15:51:30 [JeniT] ... Google is practically the only server implementation 15:51:38 [JeniT] ... GenX has just announced implementation too 15:51:47 [JeniT] ... I noticed this momentum a couple of months ago 15:51:53 [JeniT] ... it's not just Google any more 15:52:19 [JeniT] ... I've had a lot of private discussions with various people, and everyone is very very interested in tracking/implementing this stuff 15:52:26 [JeniT] ... the market is choosing with its feet 15:53:00 [JeniT] ... the question is whether this gets done within a standards organisation, with interactions with other implementers than Google 15:53:14 [JeniT] ... it seems like it's necessary to take this work on 15:53:46 [JeniT] noah: we asked Mike how he felt about that, and he seemed to be keen on standardisation 15:54:09 [JeniT] mnot: we've had an ongoing discussion about standardisation 15:54:14 [JeniT] ... the team understands it will involve 15:54:26 [JeniT] ... there's a tension between getting to market and for everyone else to have their concerns met 15:54:49 [JeniT] ... I've been talking to people about this and putting together a proposed charter for this work 15:55:01 [JeniT] ... HTTPbis is just finishing up, and I don't want to distract from that 15:55:16 [JeniT] ... but time is important for the SPDY guys too 15:55:17 [timbl] q+ to ask about the extensibility point of HTTP headers in SPDY 15:56:08 [JeniT] ... I've been talking about rechartering the HTTPbis group to work on HTTP evolution 15:56:22 [JeniT] ... perhaps not saying that we should start from SPDY 15:56:45 [JeniT] ... Roy has been working on WOCCA (?) 15:56:56 [JeniT] ... but it's not been made public 15:57:38 [JeniT] ... looking at that and SPDY, I think they are conceptually very close 15:57:53 [Yves] s/WOCCA/WAKA 15:58:21 [JeniT] ... continuing the HTTP 1.1 revision 15:58:33 [JeniT] ... we have split up HTTPbis into components 15:58:56 [JeniT] ... SPDY only requires changes in one of those components 15:59:04 [JeniT] ... Part 1 of HTTPbis 15:59:15 [JeniT] timbl: what's SPDY's relationship to HTTP headers 15:59:27 [JeniT] mnot: it compresses them, but it uses the HTTP headers 15:59:45 [JeniT] ... there are some headers that aren't needed in SPDY 16:00:17 [JeniT] ... I used the same API as for HTTP when I did SPDY implementation 16:00:29 [JeniT] ... there might be other tweaks, but SPDY would be a superset 16:01:06 [JeniT] noah: SPDY would multiplex on one connection rather than having multiple connections 16:01:21 [JeniT] timbl: people have assumed HTTP would be replaced in the future 16:01:29 [JeniT] ... and therefore HTTP URIs would be replaced by other things 16:02:00 [JeniT] ... but the HTTP namespace can be persistent even if the protocol works 16:02:13 [JeniT] ... calling it HTTP 2 might be useful to avoid that confusion 16:02:32 [JeniT] mnot: questions about spdy: URIs have always been resisted 16:02:47 [JeniT] noah: there's an interaction with HTTPS and TLS and certificates 16:03:13 [JeniT] ... there are differences between http: and https: URIs, https: uses certificates and http: don't 16:03:38 [JeniT] mnot: there's a set of issues around TLS, about whether the CAs are a good source of truth 16:03:56 [JeniT] noah: how far has the discussion gone? 16:04:19 [JeniT] mnot: core people in SPDY feel that using TLS by default would improve the web 16:04:29 [JeniT] ... other people don't agree 16:04:50 [JeniT] noah: there are a bunch of issues with TLS, one of which is to do with name resolution 16:05:13 [JeniT] ... it means I have to get a certificate for my server 16:05:32 [JeniT] mnot: right now SPDY says you will deploy over TLS 16:05:57 [JeniT] timbl: what about certificates from DNS Sec? 16:06:07 [JeniT] mnot: there's a bunch of work on that, yes 16:06:19 [JeniT] ... which sometimes gets governments involved 16:06:27 [JeniT] ... the question is whether we can leverage it in time for SPDY 16:06:53 [JeniT] ... in the IETF people are uncomfortable with the 'S' in 'HTTPS' 16:07:08 [JeniT] ... that there shouldn't be a flag in the URI that indicates security 16:07:13 [JeniT] ... but the browser people like it 16:07:51 [JeniT] ... the concept of the origin server means having 'S' is really useful 16:08:04 [JeniT] timbl: but you may want to add more constraints, not just the 'S' bit 16:08:16 [JeniT] mnot: the question is about whether you should have it in the identifier 16:08:27 [JeniT] timbl: in RDF it's a real pain 16:08:47 [JeniT] ... moving to HTTPS wreaks havoc with links 16:09:01 [JeniT] ... I've wondered about using POWDER to put a label on the home page 16:09:16 [JeniT] ... to say that anything that starts 'https' should have the same identity as if you had 'http' 16:09:26 [JeniT] ... like a canonical link 16:09:42 [JeniT] mnot: I have a format for describing canonical URIs for a domain 16:09:53 [JeniT] ... but this is a real tangent 16:10:38 [JeniT] plinss: my understanding is that TLS and SPDY are orthogonal 16:10:59 [JeniT] mnot: the way it's currently defined, TLS and SPDY are bundled 16:11:09 [JeniT] ... I think there are cases where you don't want to use it 16:11:21 [JeniT] masinter: if you start with a HTTP URL, does it use SPDY? 16:11:36 [JeniT] mnot: it will upgrade the connection 16:12:00 [JeniT] ... for an HTTPS URI, there's another negotiation 16:12:16 [JeniT] noah: Google is using SPDY by default for HTTPS URIs 16:12:48 [JeniT] mnot: using NPN is an uncontroversial use 16:12:57 [JeniT] ... OpenSSL isn't going to support it until the next version 16:13:08 [JeniT] noah: how does this affect CDNs such as Akamai? 16:13:09 [Yves] s/NPN/TLS NPN/ 16:13:17 [JeniT] mnot: they will need to support it 16:13:36 [JeniT] ... it used to be hard because you need an IP per certificate 16:13:46 [JeniT] ... now there's SSNI (?) but it's not perfectly deployed 16:14:03 [JeniT] ... which is the Host header for TLS 16:14:03 [Yves] s/SSNI/TLS SNI extension/ 16:14:22 [JeniT] ... so that you can have 100 hostnames on one IP address 16:14:51 [JeniT] noah: how does the HTTPS work through something like Akamai? 16:15:00 [JeniT] mnot: they will need to know your private key or generate one for you 16:15:16 [JeniT] ... one of the metrics of a tracker is rapid changing of certificates 16:15:32 [JeniT] ... back to the charter 16:15:47 [JeniT] ... the new bit is working on HTTP 2.0 with the goal of improving performance 16:15:52 [JeniT] ... more efficient use of network resources 16:16:05 [JeniT] ... deployment on today's internet, using IPv4 and IPv6 16:16:17 [JeniT] ... maintaining ease of deployment 16:16:35 [JeniT] ... and balancing that with reflecting modern security requirements 16:16:58 [JeniT] ... there's a new requirement in IETF, any protocol has to have "mandatory to implement security" 16:17:14 [JeniT] ... it has to have an adequate security mechanism that implementations must support 16:17:54 [JeniT] ... the idea is to recharter the working group 16:18:04 [JeniT] ... starting work around end of March 16:18:15 [JeniT] ... which means HTTPbis needs to have been substantially done by then 16:19:27 [JeniT] ... I'm hoping the HTTPbis review will be fairly straightforward 16:19:34 [JeniT] ... because it's already gone through so much review 16:19:57 [JeniT] ... particularly because we're not introducing new things 16:20:23 [JeniT] ... we would put out a call for proposals for a starting point, one of which will be SPDY 16:20:35 [JeniT] ... there's a lot of running code out there for SPDY 16:21:15 [JeniT] ... the obvious question is why recharter the HTTP WG to do this, rather than creating a new one? 16:21:32 [JeniT] ... I think it's worthwhile because we have a good working pattern and an established community 16:21:53 [JeniT] ... we've talked about Mike Belshy and Julian Reschke being editors on the spec 16:22:05 [Yves] s/Belshy/Belshe/ 16:22:20 [JeniT] timbl: the WG might have to be warned about being open to new people 16:22:32 [JeniT] mnot: we have almost complete coverage of HTTP implementers 16:22:40 [JeniT] ... this needs to be a worthy replacement for HTTP 1.1 16:22:58 [JeniT] ... we've got firewall, client, library, intermediary, embedded guys 16:23:10 [JeniT] ... if I can't get it through, we'll charter a separate WG 16:23:43 [JeniT] ... this is obviously of interest and importance to the TAG 16:24:01 [JeniT] DKA: in naming it HTTP 2.0, isn't there a danger that the scope gets expanded? 16:24:12 [JeniT] mnot: yes, we've dealt with that in HTTPbis 16:24:29 [JeniT] ... and the charter is written in a focused way 16:24:35 [JeniT] ... to prevent that 16:24:52 [masinter] masinter has joined #tagmem 16:24:56 [masinter] 16:25:19 [DKA] ScribeNick: DKA 16:25:20 [mnot] mnot has joined #tagmem 16:26:01 [DKA] tim: looks good.... 16:26:12 [DKA] s/tim/timbl/ 16:26:25 [DKA] … I think it's good to bring it out under a http 2.0 banner - 16:26:34 [noah] q? 16:26:36 [noah] ack next 16:26:38 [Zakim] timbl, you wanted to ask about the extensibility point of HTTP headers in SPDY 16:27:16 [DKA] … I think the fine line between directly taking on board existing work and allowing people to make arbitrary changes to existing work that runs is one I understand... 16:27:17 [JeniT] ScribeNick: JeniT 16:27:34 [JeniT] jar: Jim Gettys gave us a presentation on buffer bloat, and I wondered how this related 16:27:39 [JeniT] ... is this radical enough? 16:28:30 [JeniT] ... he was talking about self-authenticating content and things 16:28:46 [JeniT] mnot: this enables a solution to buffer bloat 16:28:52 [JeniT] ... it will use TCP better 16:29:07 [JeniT] ... particularly when people pull content back onto single domains rather than sharding 16:29:33 [JeniT] ... right now the interest is in maintaining the client/server model 16:30:02 [JeniT] noah: I think Jim spoke sympathetically about SPDY 16:31:06 [JeniT] timbl: back to the HTTP level, I've been trying to push rather than a content-addressable system, you might be able to go back to the referer of a link to get information 16:31:15 [masinter] there's a possibility that the two go together: SPDY for interactive, dynamic, personal, private traffic, and content addressible networking for public, cachable, distributed content. 16:31:28 [JeniT] ... for example, to bootstrap into a peer-to-peer system 16:31:34 [JeniT] mnot: have you seen Metalink? 16:31:48 [JeniT] ... a new link relation called 'duplicate' 16:32:01 [DKA] rfc5854 16:32:10 [JeniT] ... an exact byte-for-byte duplicate for a given representation 16:32:17 [masinter] 16:32:41 [JeniT] timbl: the idea is to cache everything you link to to two levels 16:32:54 [JeniT] mnot: there's a lot of interesting things to do in caching 16:33:10 [JeniT] ... the quality of cache implementations is something that bothers me 16:33:18 [masinter] pursuing both simultaneously would mean you wouldn't have to rely on caching 16:33:26 [JeniT] ... I'm concerned around the parallel tracks of caching, for example with AppCache 16:33:47 [JeniT] timbl: caches tend to be temporary; this idea is a mutual-aid system 16:34:17 [masinter] wonder if some of hte weaker parts of HTTP could be left behind 16:34:22 [JeniT] ... you'd build it into Apache and the client, and you'd be able to get data from parts of the network that were cut off 16:34:46 [JeniT] masinter: there's lots of HTTP that isn't very good, that you could leave behind if you're not encapsulating all of HTTP 16:34:55 [JeniT] ... and others that you could promote 16:35:09 [JeniT] ... for example caching based on time stamps vs on ETags 16:35:32 [JeniT] ... also HTTP uses the same transport for dynamic, private, interactive content as for large, public, static content 16:36:09 [JeniT] ... right now we use Vary headers to distinguish between them 16:36:21 [JeniT] ... maybe there's some other way that would be more reliable 16:36:45 [JeniT] mnot: I'm nervous about that, because how far do you go? we don't want two separate protocols really 16:37:00 [JeniT] masinter: you only split things off when they really don't fit 16:37:05 [JeniT] mnot: I'm not convinced they don't fit 16:37:21 [JeniT] noah: you can use a new URI scheme, that requires an early commitment 16:37:41 [DKA] q+ 16:38:18 [JeniT] DKA: do you know of any mobile implementations of SPDY? 16:38:42 [JeniT] mnot: I don't know of any, but it looks like a tempting target for mobile, because the connection is used more efficiently 16:39:06 [JeniT] ... it looks like a real win, and you can use SPDY in the proxy 16:39:15 [JeniT] noah: what about battery drain on doing encryption? 16:39:17 [masinter] look at SPDY android 16:39:32 [JeniT] mnot: people claim TLS is not that hard; it depends on cipher strength 16:39:42 [JeniT] ... I consider TLS and wire protocols to be separate 16:40:00 [JeniT] DKA: the major battery drain aside from the display is usually the radio 16:40:36 [DKA] q- 16:41:20 [JeniT] noah: I propose that this is put on the alert list for Jeff 16:41:42 [JeniT] ... it sounds as if the right people are working on this in the IETF, but I can't see that we need to parachute in 16:42:00 [JeniT] ... I think we should have a contact point in the TAG, and monitor progress 16:42:30 [JeniT] mnot: I would add that this is likely to be discussed at Paris in late March 16:43:21 [JeniT] noah: Yves, you've traditionally had actions on this 16:43:39 [JeniT] yves: I will follow this for W3C anyway 16:44:12 [noah] close ACTION-640? 16:44:42 [noah] close ACTION-640 16:44:42 [trackbot] ACTION-640 Frame F2F discussion of SPDY/HTTP futures closed 16:45:05 [JeniT] yves: my email also touched on WebSocket 16:45:13 [JeniT] ... most of the communication on that won't use URIs 16:48:14 [noah] ACTION: Yves to prepare telcon discussion of protocol-related issues, e.g. Websockets/hybi (but not SPDY)Due: 2012-02-21 16:48:14 [trackbot] Created ACTION-658 - Prepare telcon discussion of protocol-related issues, e.g. Websockets/hybi (but not SPDY)Due: 2012-02-21 [on Yves Lafon - due 2012-01-13]. 16:49:54 [noah] ACTION: Yves to track IETF efforts on HTTP 2.0 & SPDY Due: 2012-03-20 16:49:55 [trackbot] Created ACTION-659 - Track IETF efforts on HTTP 2.0 & SPDY Due: 2012-03-20 [on Yves Lafon - due 2012-01-13]. 16:53:41 [JeniT] noah: we need to talk about things for Jeff 16:53:56 [mnot] 16:54:53 [JeniT] ... CA system 16:55:05 [JeniT] ... perhaps other security aspects 16:55:13 [JeniT] ... perhaps how to deal with the TAG issues 16:55:16 [JeniT] ... action item review 16:55:39 [JeniT] Topic: Redirect headers 16:55:41 [masinter] you might want to also look at the long list of dead TAG findings 16:55:47 [JeniT] Topic: Redirection semantics 16:55:57 [masinter] 16:56:04 [JeniT] mnot: issue with fragment identifiers and redirections 16:56:09 [masinter] and also "Approved findings" we no longer believe in 16:56:15 [JeniT] ... HTTP doesn't say which one gets precedence 16:56:39 [JeniT] ... we talked with you and at the time we said, 'there's not good interop here' 16:56:48 [JeniT] ... so didn't say what to do 16:57:02 [JeniT] ... we didn't cover when the request has a fragid and the redirect location doesn't 16:57:09 [JeniT] ... since then, we've tested implementations 16:57:17 [JeniT] ... and there is good interop 16:58:11 [JeniT] ... from a webarch standpoint would the TAG be concerned if the combination of fragid and redirect were determined by HTTP rather than media type dependent? 16:58:27 [JeniT] noah: ht might have input on this 16:58:44 [JeniT] mnot: we need an answer soon because we want it in HTTPbis 16:59:17 [JeniT] ... my opinion is that from an implementation standpoint it is bad to make it media type dependent 16:59:22 [noah] noah: would it be convenient for you to send an e-mail asking the TAG to consider this question? If so, i'll use that to trigger telcon discussion. 16:59:35 [noah] mnot: Fine, no problem, I'll send the note. 16:59:54 [JeniT] ... making it the same for everything is significantly less complex 17:00:19 [noah] Recent TAG finding on fragment identifiers in Web Applications 17:00:23 [JeniT] timbl: this is deeply connected with how the Semantic Web / Linked Data worked 17:00:37 [JeniT] ... to me it was a shock that you could redirect to something with a fragid in it 17:00:57 [JeniT] ... how common is it to have that kind of redirection? 17:01:04 [JeniT] jar: Dublin Core 17:01:36 [mnot] HTTPbis bug: 17:01:41 [JeniT] plinss: I think this is going to become more common as you have fragments on video/audio 17:01:48 [JeniT] jar: URL shorteners 17:02:03 [JeniT] timbl: do you have RDF test cases? 17:02:08 [JeniT] mnot: no 17:02:23 [JeniT] ... there's strong interop amongst the implementations we've checked 17:03:05 [JeniT] timbl: adding the fragid to the redirected URI isn't a problem 17:03:08 [JeniT] jar: +1 17:03:21 [JeniT] ... I think it's implied by RFC3986 17:03:45 [JeniT] masinter: one way or the other it has to be made explicit 17:03:58 [JeniT] mnot: I'll send noah an email and we'll take it forward 17:04:10 [JeniT] jar: I weighed in on this before and didn't get any reaction 17:04:25 [masinter`] masinter` has joined #tagmem 17:05:13 [noah] 17:05:14 [JeniT] noah: the TAG did quite a bit of work in the last year on web application state and fragid semantics 17:05:23 [JeniT] ... that might be of interest 17:05:40 [mnot] 17:05:52 [JeniT] Topic: Redirection of POST and User Intervention 17:06:09 [JeniT] mnot: most of the browsers redirect automatically 17:06:20 [JeniT] ... because the users don't know whether it's safe to redirect across domains 17:06:34 [JeniT] ... so perhaps we should remove that requirement from HTTP 17:06:50 [JeniT] ... but it's a fairly big change 17:07:02 [JeniT] ... but it doesn't reflect reality 17:07:09 [JeniT] timbl: has anyone suggested any improvement? 17:07:23 [JeniT] ... currently this is a fairly huge hole 17:07:37 [JeniT] mnot: there are so many ways to generate requests to multiple hosts in browsers 17:07:50 [JeniT] ... they are moving away from making security visible 17:07:58 [JeniT] ... because it doesn't meaningfully improve security 17:08:23 [JeniT] timbl: so it's a cross-domain issue? 17:08:48 [JeniT] mnot: we could phrase the requirement be about cross-domain redirects 17:08:49 [jar] n.b. the discussion is of 301 redirects specifically (with unsafe methods such as POST) 17:09:06 [JeniT] ... we can't make incompatible changes in HTTPbis unless it's a serious security issue 17:09:09 [JeniT] ... and this isn't serious 17:09:23 [JeniT] ... right now this applies same-domain 17:09:36 [JeniT] timbl: relaxing it for same-origin makes sense 17:09:47 [JeniT] mnot: one browser prompts in a couple of specific situations 17:09:54 [JeniT] ... but most already ignore the requirement 17:10:11 [JeniT] Topic: Identifier Overloading 17:10:21 [JeniT] mnot: Sec- prefix on HTTP headers 17:10:36 [JeniT] ... adding semantics to an identifier brings problems 17:10:41 [JeniT] ... how do you add more prefixes? 17:10:59 [JeniT] ... X- for experimental, then it gets adopted 17:11:10 [JeniT] ... (that is close to deprecated) 17:11:54 [JeniT] noah: how you support decentralised extensibility + smooth evolution from experimental to common is something the TAG could look at 17:12:13 [JeniT] ... I'm not sure we can do that well in the TAG 17:12:22 [JeniT] mnot: we're covering it a bit in happiana 17:13:00 [JeniT] jar: registries, decentralised extensibility and persistent naming are all closely related 17:13:12 [JeniT] noah: it's more about whether the community can see progress 17:13:33 [JeniT] (wrapup) 17:14:58 [plinss] <br type='lunch' duration='75min'> 18:10:07 [DKA] DKA has joined #tagmem 18:35:41 [masinter] masinter has joined #tagmem 18:35:49 [DKA] Scribe: Dan 18:35:53 [DKA] ScribeNick: DKA 18:36:59 [DKA] Minutes integration: Wednesday : Dan ; Thursday: JAR ; Friday : Dan 18:37:34 [DKA] s/Wednesday \: Dan/Wednesday \:Yves/ 18:38:55 [JeniT] "we need to talk about things for Jeff 18:38:57 [JeniT] CA system 18:38:58 [JeniT] perhaps other security aspects 18:39:00 [JeniT] perhaps how to deal with the TAG issues 18:39:01 [JeniT] action item review" 18:39:01 [trackbot] Sorry, couldn't find user - item 18:39:25 [DKA] Topic: Stuff for Jeff 18:39:58 [DKA] Noah: Jeff has asked the TAG to alert him to big controversies and threats to the Web that he might not know about. 18:40:10 [DKA] … I have ACTION-568. 18:40:13 [noah] ACTION-568? 18:40:13 [trackbot] ACTION-568 -- Noah Mendelsohn to draft note for Jeff Jaffe listing 5 top TAG priorities as trackable items. -- due 2012-01-03 -- OPEN 18:40:13 [trackbot] 18:40:16 [DKA] … We are overdue on this action. 18:40:29 [DKA] … We need a plan that will close in a few days for an initial note to Jeff. 18:40:42 [DKA] … This says "5" but I don't think 5 is a magic number. 18:40:46 [DKA] Yves: 20 items is too many. 18:40:53 [DKA] Noah: Let's see what we have. 18:41:06 [Yves] 18:41:44 [DKA] Noah: [outlines above list] 18:44:14 [DKA] [discussion on death of protocols] 18:44:47 [DKA] Yves: this is the list discussed during f2f in Edinburgh. 18:45:21 [DKA] Noah: two more - one is a think Dan asked for: should app cache vs app packaging be on the heads-up list for Jeff? 18:46:01 [DKA] … Noah: I think the only reason to highlight this is if it's not adequately highlighted in the workshop report. 18:46:50 [DKA] Dan: risk is more generally apps vs web. 18:46:57 [DKA] Jenit: which we already have. 18:47:16 [DKA] Ashok: [asks for clarification] 18:47:41 [DKA] Noah: We need descriptions of threats or potential threads to send to Jeff - between a paragraph and a short page. 18:50:39 [DKA] Noah: if people like the list, let's look at each one. 18:51:54 [DKA] JeniT: should the registries and IANA stuff get moved into the bigger section? 18:52:14 [DKA] … especially rdfa vs html link relations. 18:52:22 [DKA] Yves: this is not new. 18:52:47 [DKA] … if there will be more issues based on this - e.g. registries being misused - then yes. 18:53:18 [DKA] Noah: If we think e.g. Happiana will rise into a key issue then we might raise it to Jeff. 18:53:44 [DKA] … we could make it an addendum to the main list. 18:54:16 [DKA] Yves: "there have been issues - there will probably be more issues - there is this work happening (IANA)" 18:54:33 [DKA] JAR: … and a small effort by w3c staff could help. 18:54:48 [DKA] Noah: Jeff asked me for [major issues] that might hit him. 18:55:18 [DKA] JeniT: Along those lines, the section on SPDY and http - this feels less like something that we need to be mega-concerned about. 18:56:03 [DKA] Noah: I think http is a major part of the Web - we should [outline the key topics] and then say "we have been working with e.g. mnot about it and this is what's happening..." 18:56:46 [DKA] Noah: let's go through the things Yves has drafted on each of these. 18:58:02 [DKA] Noah: first - "Specifications with the Same Scope…" 18:58:39 [DKA] Noah: Question I would ask - you talk about RDFa 18:59:16 [DKA] Yves: With the evolution of different stacks, they step on other technology stacks' feet. It's difficult to predict that. 18:59:26 [JeniT] q+ to talk about HTML.next 18:59:36 [DKA] Noah: If we know of anything similar to microdata/rdfa then we should alert Jeff. 18:59:56 [DKA] Yves: another one might be xpath and css selectors. 19:00:12 [DKA] Noah: is that resolving? 19:00:21 [DKA] Yves: I think it's more or less under control. 19:01:00 [DKA] JeniT: We can say - following discussion with plh over html.next there seem to be areas e.g. speech but our advice from him was that this wasn't going to cause problems. 19:01:15 . 19:01:19 [JeniT] q- 19:01:26 [DKA] … the two things that could be hot topics look like they are being handled in the right way. 19:01:42 [DKA] Noah: I think this should come out under my signature on behalf of the TAG. 19:01:57 [DKA] … I feel sufficiently informed on this one to take a cut. 19:02:26 [noah] Current draft: The TAG, as part of its review activity will continue to monitor such 19:02:26 [noah] issues. 19:02:30 [noah] Suggested: The TAG, as part of its review activity will continue to monitor such 19:02:30 [noah] issues. 19:02:33 [DKA] Yves: last para where I said TAG is reviewing what is going on - even if we don't know an issue that will happen in the next 6 months, in 2 months we might discover an issue. 19:02:41 [noah] issues and we will alert you to any that we think are of particular concern. 19:02:56 [DKA] Noah: Next one - "phone apps vs web apps" 19:03:01 [JeniT] ScribeNick: JeniT 19:03:29 [JeniT] yves: there are a range of issues here, and I'm not sure what the crux is 19:03:38 [noah] YL: On the mobile, I'm not sure where the issues are. 19:03:41 [JeniT] DKA: there's things like URI schemes as well 19:03:50 [noah] DKA: It touches on things like vendor-specific URIs 19:05:52 [JeniT] ... and the "death of the web" 19:06:02 [JeniT] noah: can you send me an email? 19:06:14 [noah] ACTION: Dan to put together a bulleted list of items to go into this category 19:06:14 [trackbot] Sorry, couldn't find user - Dan 19:06:25 [JeniT] DKA: give me an action to include APIs, packaging, offline use, tools, monetisation 19:06:47 [JeniT] noah: if you could just draft a section? 19:07:14 [JeniT] DKA: ok 19:07:44 [JeniT] JeniT: do Facebook apps have similar characteristics? 19:08:17 [JeniT] DKA: the risk on mobile is apps running outside the browser, that could be done in the browser 19:08:23 [JeniT] ... due to artificial constraints 19:08:37 [JeniT] noah: widgets could run outside the browser, are they bad too? 19:08:52 [JeniT] DKA: this is where it's a grey area, because some people don't think Widgets are the Web 19:09:00 [JeniT] ... because they don't have addressability, for example 19:09:28 [JeniT] noah: outside the browser, forward/back navigation doesn't work 19:09:54 [JeniT] Ashok: are you thinking of Apps like iPad Apps? 19:10:12 [JeniT] DKA: it's definitely not just on the mobile phone, but this whole class of device 19:10:23 [JeniT] ... which uses the AppStore model 19:10:30 [JeniT] ... which diminishes the importance of the web 19:11:14 [JeniT] ... there are plenty of Apps that use web technologies 19:11:29 [JeniT] ... but you can't use the web to download them, rate them, talk about them etc 19:12:01 [JeniT] noah: I don't care about how I got the App but how you navigate out of the App 19:12:10 [JeniT] yves: so what about the Chrome Apps? 19:12:22 [JeniT] ... they are using web technologies 19:12:43 [JeniT] noah: if they're not linking to things on the web, then that's not so good 19:12:52 [JeniT] yves: the threat is the creation of a walled garden 19:13:02 [JeniT] Ashok: +1 19:13:19 [JeniT] DKA: so Chrome apps run in the browser, but you can only download them and use them in Chrome 19:13:39 [JeniT] noah: should we start each section with 'Threat:' 19:14:03 [JeniT] DKA: I think that's good: the threat is the browser is no longer the way that people find and download information 19:14:24 [JeniT] noah: I'm want to focus on the risk/threat for Jeff 19:15:10 [JeniT] DKA: the death of the browser as the mechanism for accessing information is the threat here 19:15:30 [JeniT] Ashok: in the browser, you can go to a different web page, and from an App you can't 19:15:42 [JeniT] noah: many Apps do it, but they break 19:16:07 [JeniT] Ashok: this is a way to try to earn money 19:16:23 [JeniT] ... to package something that you can then charge for 19:16:51 [JeniT] yves: not only for paying, but for editorial control: you can censor things 19:18:27 [JeniT] DKA: why should you care? because you won't be able to see information that isn't approved 19:18:35 [JeniT] ... on the web I can find other points of view 19:18:56 [JeniT] noah: most of this is stuff Jeff will be aware of 19:19:10 [JeniT] ... perhaps we want to say that he should be more worried about losing this war 19:19:37 [JeniT] DKA: there are other things about debunking claims such as not being able to charge for things 19:19:42 [JeniT] ... or accessing location 19:19:47 [JeniT] ... or accessing the camera 19:20:09 [JeniT] noah: in my experience geolocation doesn't work as well in the browser as in an App 19:20:26 [JeniT] DKA: the macro-issue is the other functions that the web can't do that Apps can 19:22:30 [JeniT] noah: vendors that support Apps may limit the ability of the browsers to perform as well as the Apps do 19:23:01 [JeniT] ... Apps have more complete access to the platform 19:23:10 [JeniT] ... they lose flexible linking to other web pages 19:23:31 [JeniT] ... the threat is that this remains attractive: the web hasn't blown these things away 19:24:14 [JeniT] Ashok: if APIs on the phone are really that much better than the APIs from the browser, that's a cause for concern 19:24:37 [JeniT] DKA: this is a complex area; highlighting some stuff on the technical level would be a good idea 19:24:42 [JeniT] ... let me draft something for Jeff 19:25:08 [JeniT] ... to give him some ammunition 19:25:21 [DKA] ScribeNick: DKA 19:25:24 [DKA] Noah: CAs 19:25:26 [masinter`] masinter` has joined #tagmem 19:26:05 [DKA] Yves: we should note that there is work going on in IETF and other places to help... 19:26:32 [DKA] JAR: Jeff ought to be mobilising w3c to work on this issue. This is really important. 19:26:45 [DKA] Tim: do you mean the first response or designing a better system? 19:27:03 [DKA] JAR: I mean that it's not obvious where to go. We have some ideas... 19:27:24 [DKA] JAR: Issue is the trust structure... 19:28:04 [DKA] Larry: In some case, if we don't figure it out then things won't advance. But in this case if we don't figure it out then bad things will happen. 19:28:10 [DKA] Noah: I think we all agree. 19:28:45 [DKA] Noah: [wordsmithing the description] 19:29:31 [DKA] … I'd like to see a paragraph "the practical effect of this is that right now in certain countries users are being redirected to fraudulent or improper copies of web sites - and that there is no way to fix this in the immediate future." 19:29:34 [masinter`] the concern is that these attacks point out a weakness in the architecture, and not just an isolated incident 19:29:50 [DKA] Yves: not only redirecting - but people having the feeling that they have a secure channel - and are not being spied on. 19:30:23 [DKA] Noah: We should start with some brief war stories - Another example: we have seen man-in-the-middle attacks to spy on politically sensitive traffic... 19:30:27 [DKA] Yves: as in Tunisia. 19:30:54 [DKA] Noah: I think it's important to say: right now it's not obvious how the technology will be deployed to stop this from happening. 19:31:44 [DKA] Larry: There's a concern that this is an architectural flaw rather than a set of isolated events. I share this concern. 19:31:55 [DKA] Yves: I can redraft this. 19:33:22 [DKA] Yves: we might expand on what we mean by trust issues... 19:33:35 [DKA] Noah: As long as the key points are up front. 19:33:35 [masinter`] Mark gave us 19:33:45 [DKA] JeniT: can we move that up to the top of the list? 19:33:49 [DKA] Yves: I agree. 19:33:56 [DKA] … add "red flag here." 19:34:05 [DKA] Noah: Now - "SPDY and HTTP" 19:34:31 [DKA] Noah: The highlight here is - this is not a threat, this is something you should be aware of … 19:35:29 [DKA] Yves: there should be info at the bottom about the new efforts in this space - the IETF httpbis rechartering. 19:35:41 [DKA] Noah: I can redraft this based on what we heard from Mark Nottingham. 19:35:54 [DKA] Noah: now "Death of Protocols" 19:36:24 [DKA] Noah: Can someone offer an example of this? 19:37:01 [DKA] Yves: not many things are using web sockets in a way you could call a "protocol." You just wait for data to come in without having the framing of http... 19:37:18 [DKA] … I'm not aware of any widely deployed app using web sockets though. So it's a potential threat. 19:37:43 [DKA] JAR: What's written here sounds right. 19:37:54 [DKA] Noah: Can you give me an example? 19:38:12 [DKA] Yves: e.g. the way communication was done in the past before TCP… 19:38:31 [DKA] Noah: Why is that death of protocols rather than "death of standardised interoperable protocols." 19:38:58 [DKA] JAR: It's not the death of existing protocol. It's the death of the process by which people publish their protocols. 19:39:24 [DKA] Tim: It could be the birth of many protocols… Some of these may get standardised, some won't... 19:40:22 [DKA]…). 19:40:41 [DKA] … what people are bothered by is - even though innovation is supported - that it's disruptive. 19:41:21 [DKA] Tim: if you run over TCP then you can tai end-to-end without talking to people... 19:42:45 [DKA]. 19:42:58 [masinter`] IETF and W3C have a role in management of protocols in insuring several kinds of policy-based criteria: internationalization, security, privacy, as well as the ability to manage the traffic in terms of ports, traffic shaping, firewalls, etc. If there's no need to ever do that review, how will those (apparent) community values be retained. 19:43:35 [masinter`] gopher and www were not started as standards 19:43:40 [masinter`] and gopher was never a standard 19:43:41 [DKA] Tim: issue Jonathan was raising - you used to take new protocols to the IETF. But as long as you use an existing underlying protocol then maybe you're safe now [for using these new protocols]. 19:43:47 [DKA] JAR: I think this is complicated. 19:43:59 [masinter`] and tim deployed some software which i downloaded, installed, and modified, without any IETF involvement 19:44:48 [DKA] … having to do with what layers in the stack have information about the traffic. It used to be that routers were pretty simple. Modern routers at wire speed are looking at things like the URI of an http request and making decisions as the packet goes by... 19:45:03 [DKA] … so it's a question of the locus of intelligent. 19:45:32 [DKA] Larry: 20 years ago some guy at CERN wrote some code and I downloaded it. The Web was deployed before there were any standards. 19:46:02 [DKA] Noah: But tim didn't download a new copy of the browser every time [he visited a web page.] 19:46:53 [DKA] Larry: IETF and w3c have policy initiatives around security, privacy, monitoring, ports, firewalls, etc… if there's never any need to do protocol review or standardisation, how do we retain those "community goods." 19:47:05 [noah] Possible message to Jeff: "As dynamically downloaded JavaScript libraries are increasingly used to implement ad-hoc, problem-specific protocols to access data, the usage and value of Web technologies such as URIs and HTTP may be reduced." 19:47:17 [DKA] Tim: e.g. quality review. 19:47:27 [DKA] Yves: there's also the possible reuse of that protocol. 19:47:48 [jar] goes to the network as a commons 19:47:56 [DKA] … if you're building something that gets widely used, and you're using a protocol that's not published then people will have a hard time reusing, etc... 19:48:31 [DKA] Tim: I think it's better to come to Jeff with possible failure scenarios. 19:49:18 [DKA] … one failure mode : when you buy some home automation hardware, it comes with its own Web server and runs its own protocol between the client and the server and as a result you have vendor lock-in. 19:49:44 }." 19:49:56 [JeniT] DKA: why is that any different now from in the past? 19:50:06 [JeniT] Yves: the difference is it's done in the browser 19:50:15 [masinter`] you odn't avoid vendor-lockin by using HTTP and URIs 19:51:00 [DKA] Tim: 2nd scenario : the toaster protocol might run on UDP so it brings my home network down… 19:51:03 [Yves] it's not vendor lock-in, it's difficult upgrade path, no review on what can go wrong (security etc...) 19:51:30 [DKA] Tim: these are hidden protocols. 19:52:00 [masinter`] vendor lockin is completely irrelevant here 19:52:29 [DKA] Tim: What's breaking is the ability to construct things in a modular way. 19:52:44 [DKA] Noah: No this might be well structured but it's all very immediate. 19:52:48 [DKA] Tim: What am I missing? 19:53:22 [DKA] Noah: I'm saying the right model is - I'd like to use this on things that don't support javascript, I'd like to be able to implement it in multiple environments, etc... 19:53:53 [DKA] Tim: What you're trying to do is to combine multiple components... 19:53:59 [masinter`] for the things you're talking about, there's no difference between non-standard protocols and SOAP 19:54:05 [DKA] Noah: damage would be no freedom of choice in toasters. 19:54:15 [noah] TBL: Issues include vendor lockin, badly designed (no IETF review) 19:54:22 [DKA] Peter: This happens now... 19:54:31 [DKA] JAR: difference is it goes through firewalls... 19:54:53 [DKA] Peter: I think the main difference is that it's going to happen within the web browser [with Websockets]. 19:55:17 [masinter`] between REST or SOAP vs. udp directly, what's really the difference, except that websockets doesn't incur the same overhead? And perhaps SPDY will make this concern moot. 19:55:31 [DKA] Tim: example of using libraries - standardisation will happen between people making the libraries. 19:56:09 [DKA] Peter: my fear is that people will use proprietary protocols so that makes it more difficult for others to re-use data across the Web. 19:56:40 [DKA] Larry: people have already been layering for decades proprietary protocols over http. Maybe this is actually not a problem. 19:56:50 [masinter`] at least a decade 19:57:13 [DKA] Noah: I'd like to take a look at where we stand. We're mostly there except on this one. 19:57:21 [DKA] …worth another 10-15 minutes? 19:57:29 [masinter`] i don't think we should raise to Jeff an issue if we can't articulate a problem 19:57:44 [DKA] JAR: What larry said. 19:57:53 [Yves] +1 19:58:00 [DKA] JeniT: Yes I agree we shouldn't raise it to Jeff if we can't articulate a problem. 19:58:03 [DKA] +1 19:58:33 [DKA] Noah: anyone who could offer something to discuss on a telecon. 19:58:52 [DKA] Noah: Ok - for the moment this will not be included in the note to jeff unless someone comes forward with a proposal on the text. 20:00:23 [DKA] Noah:. 20:00:39 [DKA] ACTION: Dan to draft text on apps and webapps 20:00:39 [trackbot] Sorry, couldn't find user - Dan 20:00:51 [noah] ACTION: Noah to integrate input from DKA and Yves for note to Jeff, and draft section on CA Due: 2012-10-17 20:00:52 [trackbot] Created ACTION-660 - Integrate input from DKA and Yves for note to Jeff, and draft section on CA Due: 2012-10-17 [on Noah Mendelsohn - due 2012-01-13]. 20:01:22 [noah] ACTION-660 Due 2012-01-17 20:01:23 [trackbot] ACTION-660 Integrate input from DKA and Yves for note to Jeff, and draft section on CA Due: 2012-10-17 due date now 2012-01-17 20:03:44 [DKA] [end of discussion on Jeff note] 20:03:52 [ht] ht has joined #tagmem 20:04:15 [noah] 20:04:32 [DKA] ACTION-344? 20:04:32 [trackbot] ACTION-344 -- Jonathan Rees to alert TAG chair when CORS and/or UMP goes to LC to trigger security review -- due 2012-01-01 -- OPEN 20:04:32 [trackbot] 20:06:09 [DKA] JAR: Answer has been "Ok - explain to users of the spec how to be careful." 20:06:58 [DKA] Topic: Action Item Review 20:07:06 [noah] ACTION-480? 20:07:06 [trackbot] ACTION-480 -- Daniel Appelquist to draft overview document framing Web applications as opposed to traditional Web of documents -- due 2011-07-05 -- OPEN 20:07:06 [trackbot] 20:07:18 [noah] close ACTION-480 20:07:18 [trackbot] ACTION-480 Draft overview document framing Web applications as opposed to traditional Web of documents closed 20:09:04 [DKA] ACTION-601? 20:09:04 [trackbot] ACTION-601 -- Noah Mendelsohn to document in product pages wrapup of HTML5 last call work, leading to HTML next review -- due 2011-12-27 -- OPEN 20:09:04 [trackbot] 20:09:13 [noah] action-601? 20:09:13 [trackbot] ACTION-601 -- Noah Mendelsohn to document in product pages wrapup of HTML5 last call work, leading to HTML next review -- due 2011-12-27 -- OPEN 20:09:13 [trackbot] 20:09:14 [DKA] Noah: I believe I did this - can I close this action? 20:09:18 [noah] close ACTION-601 20:09:18 [trackbot] ACTION-601 Document in product pages wrapup of HTML5 last call work, leading to HTML next review closed 20:10:39 [noah] ACTION-645? 20:10:39 [trackbot] ACTION-645 -- Noah Mendelsohn to take off draft indication and put dates on URI Definition and Discovery Product page -- due 2011-12-29 -- OPEN 20:10:39 [trackbot] 20:10:44 [noah] close ACTION-645 20:10:45 [trackbot] ACTION-645 Take off draft indication and put dates on URI Definition and Discovery Product page closed 20:16:17 [plinss] plinss has joined #tagmem 20:34:44 [DKA] Topic: CA Issue 20:35:21 [DKA] Noah: You could make a case this is a security problem that the TAG should be involved in in an ongoing way. Seems like a really important development to me. We should be involved. 20:35:30 [DKA] Ashok: It doesn't look like our's to tackle. 20:35:46 [DKA] JAR: Everyone should have awareness of, especially us. 20:36:05 [DKA] Noah: If we thought the Web was going to crumble then we should go to w3c membership and say that. 20:36:24 [DKA] JAR: at least 3 different solutions have been put forward and it's not clear [which is best]. 20:36:48 [jar] I think 20:36:52 [DKA] JAR: e.g. "SSL and the future of authenticity" 20:37:01 [DKA] JAR: …and a third one. 20:38:07 [DKA] JeniT: is there anything useful we can say to people developing web applications with SSL about what they should or should not be doing... 20:38:18 [jar] 20:38:23 [DKA] Yves: i think it's more for users - that they should rely on more than just the ssl padlock... 20:38:52 [DKA] Noah: How urgent is this? 20:39:12 [DKA] Yves: If it's easy enough to divert DNS and create fake certificates... 20:39:23 [DKA] JAR: whole part of the video [above] is that it's very easy to do this. 20:40:08 [DKA]… 20:40:45 [DKA] Dan: Isn't someone like EFF already providing that advice to end users? 20:41:17 [masinter] masinter has joined #tagmem 20:41:22 [DKA] Yves: yes - EFF worked on https everywhere - working against fire sheep - but this can give the sense of false security. You need a bit of judgement. 20:41:44 [DKA] … do you want to access sensitive data on a network with https if you think you might be snooped on. 20:42:10 [DKA] JAR: The point of the 3 proposed improvements is that thinks don't have to be as bad as they are. 20:42:21 [DKA] … question of how do you bootstrap trust... 20:42:39 [DKA] … my intuition is tat it's important. Can we weigh in, review the solutions, etc… 20:42:55 [DKA] JeniT: Larry suggests we get someone to brief us on these solutions. 20:43:06 [DKA] JAR: What can w3c do? 20:43:59 [masinter] Mark also pointed at effort in this area 20:44:01 [DKA] Tim: One intriguing thing - they use the same keys for webid, ssl and ssh. If you use a key from one world in another world then you won't have to have on trust system for each domain (web sites, email, etc…). 20:44:17 [DKA] … with some interoperability you could use a mixture of different sources of trust. 20:44:47 [DKA] … if you join a group (e.g. an employer), you can get some certificates and a level of trust within that group. 20:45:27 [DKA] … e.g. Csail - they sign their own certs, and you have to make browser exceptions in order to use their [secure web sites]. 20:45:55 [jar] timbl: trust interoperability 20:45:58 [DKA] … there should be a better way to do that - when you join a group you get trust associated with that groups including email certs, web browsing certs, etc... 20:47:21 [DKA] Dan: I think getting experts in would be good. 20:47:30 [DKA] JAR: I think Harry Halpin could do that. 20:48:44 [DKA] Ashok: I'll ask Harry to join us on a telco and talk to us. 20:49:44 [DKA] [Next step: Ashok to ask Harry to join us and brief us on the security proposals...] 20:50:04 [DKA] JAR: I recommend watching the video. 20:52:43 [jar] Looking at Harry's email 20:54:39 [DKA] Noah: One think I'd note is that web app sec as a narrower charter than web security ... 20:54:44 [DKA] Yves: yes - mostly to work on cors. 20:55:40 [DKA] Noah: Security domain lead - should we talk to Thomas and ask him "read harry's note - tell me what you're already doing about this?" 20:56:20 [DKA] Dan: could we get Harry and Thomas on the next call to discuss? 20:56:50 [DKA] ACTION: Ashok to ask harry and thomas to join us on a future TAG call. 20:56:50 [trackbot] Created ACTION-661 - Ask harry and thomas to join us on a future TAG call. [on Ashok Malhotra - due 2012-01-13]. 21:01:47 [RRSAgent] I have made the request to generate Yves 21:01:54 [DKA] DKA has joined #tagmem 21:01:57 [DKA] RRSagent, make minutes 21:01:57 [RRSAgent] I have made the request to generate DKA 21:02:03 [DKA] rrsagent, make logs public 21:06:19 [Zakim] Zakim has left #tagmem 21:08:25 [ht] ht has joined #tagmem 22:35:49 [ht] ht has joined #tagmem 23:20:22 [ht] ht has joined #tagmem
http://www.w3.org/2012/01/06-tagmem-irc
CC-MAIN-2017-30
refinedweb
12,112
68.2
For. I apologize that it took so long until I have found the week-end and night hours to write this up: I had the transceivers and boards quickly working after I have received the boards back in April this year. But writing a tutorial takes much more time than what I needed to write the application itself. Probably I’m doing that kind of software+hardware too many times, so it does not sound like a big deal for me. But I have received several requests to help them combining the Freescale FRDM-K64F board with the Nordic Semiconductor nRF24L01+ transceiver, so here we go….. Outline In this tutorial, I show the steps how to use the nRF24L01+ transceiver and RNet stack with the FRDM-K64F board.To keep things simple, the board will send periodically a PING message to another board. I’m using in this tutorial Eclipse Kepler with Processor Expert, but any other Eclipse based tool with Processor Expert (e.g. Kinetis Design Studio, IAR or Keil) can be used. Make sure you have loaded my latest Processor Expert components from GitHub, see “Processor Expert Component *.PEupd Files on GitHub“. In this tutorial I assume you have basic Eclipse and Processor Expert knowledge. Hardware You need a board (FRDM-K64F), a transceiver (nRF24L01+, you find many sources on the internet, I have mine from here:), headers and basic soldering skills ;-). And you need this twice to communicate between two boards. Solder the header to the board: Then put the module on the header: ❗ Check and verify the pin out of the module with the pins on the FRDM-K64F board. The pin mapping for the RF module are on the back of the FRDM-K64F board. Creating Project In Eclipse, create a new project for the FRDM-K64F for the MK64FN1M0VLL12 device on the board. Make sure you have the project with Processor Expert enabled. With this, I get a basic (empty) project for the FRDM-K64F: FreeRTOS Component I’m going to use the RNet stack for my communication, and this stack uses the FreeRTOS queues for message buffering. While it would be possible to use any kind of buffers (ring buffer, etc), I keep using FreeRTOS in this tutorial, as it simplifies things a lot, and I can use it later for a more complex application. So I’m adding the FreeRTOS Processor Expert component to the project. It will automatically add the Utility component too: The RTOS gets configured to use the Cortex-M4F as this is the processor on the FRDM-K64F: As we will need some Heap RAM for the transceiver buffers and stack, I increase the FreeRTOS heap size from the default 2K to something around 20k (I have plenty of RAM on the K64F): Compiler Settings In the project settings, I need to verify that the settings are matching a Cortex-M4 with hardware floating point unit (fpv4-sp-d16): CPU Clocks Next I’m configuring the CPU clocks. I just configure a rather high clock, so I will have a high clock for the SPI used by the nRF24L01+ transceiver. To reach an even higher CPU clock, see “FRDM-K64F at Maximum Speed of 120 MHz“. In this tutorial I’m using the 32 kHz RTC clock as reference. For this I enable the RTC clock in FEI mode: The FLL clock gets configured to 96 MHz (or close to this): Based on that 96 MHz clock, I can configure the clocks for the core and peripherals: SPI Component The nRF24L01+ uses an SPI interface to the microcontroller. I can use it two ways: - Hardware SPI: in this case the microcontroller hardware SPI peripheral is used. This is the preferred way, as the hardware does all the bit shifting and clocking. But in that case the transceiver module needs to be connected to hardware SPI pins on the microcontroller. - Software SPI: here normal general purpose (GPIO) pins are used. This is called ‘bit banging’, and the software does all the shifting and clocking. This takes a lot of CPU cycles, but the last resort e.g. if no hardware SPI is available. On the FRDM-K64F board, luckily the pins are connected to the hardware SPI, so I add the SynchroMaster (Hardware SPI) component to the project: The component shows errors, as it is not configured yet. According to the FRDM-K64F schematics, I need to assign the following pins for the SPI1 channel: - Interrupts enabled - MISO: PTD7 - MOSI: PTD6 - Clock: PTD5 - Slave Select pin disabled (the nRF24L01+ driver will do this) - Clock Speed: the nRF24L01+ allows a maximum clock speed of 8 MHz. - The Clock edge needs to be set to *falling edge*. This will set the SPI clock and data to ‘data is valid on clock leading/rising edge (CPHA=0). - The Shift clock idle polarity is set to *Low* (CPOL=0) - MSB (Most Significant Bit) first (MSB needs to be shifted first) Software SPI You *could* use the Software SPI too (you will need to select it in the RNet component, which comes next). In case you have no hardware SPI, then add the GenericSWSPI component to your project: You need to configure the clock, input (MISO) and output (MOSI) pins to the pins on your board. The picture below shows the component settings: - Clock edge: Falling edge - Clock idle polarity: low - Output pin idle polarity: high - MSB first set to yes RNet Component Next I’m adding the RNet Wireless stack component: nRF24L01+ Transceiver Component I configure the RNet component to use the nRF24L01+ transceiver and add a new component for it in the drop down box of the component: The RNet has other settings which we keep by default. Be free to change the settings once you have working version. You can configure the radio channel or the data rate. Both can be changed at runtime with methods provided by the component, so you can implement easily a channel hopping. The node network addresses are 8bit by default, so you can have up to 256 devices on a channel which should be enough for most cases. The address 0xFF (or 0xFFFF for 16bit addresses) are broadcast addresses. The queues are used to buffer incoming or outgoing messages. For this FreeRTOS queues are used: Using more queues will consume more memory. Each element in the queue will hold a full message, which is in our case 32 bytes plus one overhead byte (so 33 bytes). The blocking time specifies how long the task shall wait if the queue is full. Finally, a retry count can be specified. If greater than zero, it will retry to send the message if no acknowlege is received. SPI Block Transfer It asks me which SPI bus it shall us, and I can select the SPI component (SM1) I have configured in the previous step: However, the RNet stack requests block send and receive methods on the SPI bus, and this is not provided by default. Looking at the description oft the method it tells me that I need to use buffers in the SPI component: So I enable the buffers for SPI. The nRF24L01+ has a maximum payload of 32 bytes, so with the overhead I’m using 48 bytes each: Now the SPI component is happy again. CE and CSN Pins But I need to assign the CE and CSN pins of the nRF24L01 component: According to the schematics, CE is connected to PTC12 and CSN is connected to PTD4: ❗ NOTE that depending on the revision of the board the CE pin is on PTB20 instead of PTC12! E.g. SCH-28163 REV E3 boards use PTB20 for CE pin! Interrupt Pin There is one pin missing: the interrupt pin of the nRF24L01+ module! So I enable the interrupt pin in the nRF24L01+ component: The IRQ pin is routed to PTC18, triggering on falling edge: This completes the hardware part for the nRF24L01+. LEDs Because I want to show the transceiver activity with LEDs’, I’m adding three LED components for the RGB LED of the board, configured to PTB22, PTE26 and PTB21: Software Files I’m going to add three source files to my project: - RNet_App.c is my application file. - RNet_App.h is my interface for the above file. - RNet_AppConfig.h is my stack application configuration file. I discuss below the most important parts of each file. For the complete source files, see the project link at the end of the article. RNet_AppConfig.h In this header file I can configure the stack settings (I keep the defaults). And I should declare here the content of RAPP_MSG_Type as this will be my messages types. So for this tutorial I’m defining a PING message with numerical ID 0x55: /** * \file * \brief This is a configuration file for the RNet stack * \author (c) 2014 Erich Styger, * \note MIT License () * * Here the stack can be configured using macros. */ #ifndef __RNET_APP_CONFIG__ #define __RNET_APP_CONFIG__ /*! type ID's for application messages */ typedef enum { RAPP_MSG_TYPE_PING = 0x55, } RAPP_MSG_Type; #endif /* __RNET_APP_CONFIG__ */ RNet_App.h RNet_App.h is the interface to RNet_App.c. All what I need for now is just to call the Init() method which will initialize everything for me: /** * \file * \brief This is the interface to the application entry point. * \author (c) 2014 Erich Styger, * \note MIT License () */ #ifndef RNETAPP_H_ #define RNETAPP_H_ /*! \brief Driver initialization */ void RNETA_Init(void); #endif /* RNETAPP_H_ */ RNet_App.c The functionality of the application and stack is in RNet_App.c. The Init() method initializes the RNet Stack with RSTACK_Init(), assigns a message handler (RAPP_SetMessageHandlerTable(), more about this later) and creates an RTOS task. The RTOS scheduler itself will be started in main(). void RNETA_Init(void) { RSTACK_Init(); /* initialize stack */ if (RAPP_SetMessageHandlerTable(handlerTable)!=ERR_OK) { /* assign application message handler */ for(;;); /* "ERR: failed setting message handler!" */ } if (FRTOS1_xTaskCreate( RNetTask, /* pointer to the task */ "RNet", /* */ } } Radio Application Task In this tutorial, the application runs in a single task: RNetTask(). I suggest to use one task just to deal with the radio transceiver, and add extra tasks for anything your application is doing otherwise. And make sure that the task is processing the state machine frequently enough. How much is ‘frequently engough’ depens on the amount of messages and buffer (queue) sizes. I recommend something of at least 20 Hz or more. This is my RNetTask: static portTASK_FUNCTION(RNetTask, pvParameters) { uint32_t cntr; uint8_t msgCntr; (void)pvParameters; /* not used */ if (RAPP_SetThisNodeAddr(RNWK_ADDR_BROADCAST)!=ERR_OK) { /* set a default address */ for(;;); /* "ERR: Failed setting node address" */ } cntr = 0; /* initialize LED counter */ msgCntr = 0; /* initialize message counter */ appState = RNETA_INITIAL; /* initialize state machine state */ for(;;) { Process(); /* process state machine */ cntr++; if (cntr==100) { /* with an RTOS 10 ms/100 Hz tick rate, this is every second */ */ } FRTOS1_vTaskDelay(10/portTICK_RATE_MS); } /* for */ } First, it assigns a node address for itself. I assign here the broadcast address as default. Then I initialize the counter variables and the state machine state (appState). In the task loop I call Process(): this processes my state machine (more later). I’m using a counter to send every second a message, and I show this with a 20 ms blue LED blink. Sending date is done with RAPP_SendPayloadDataBlock(): Here I send a ‘PING’ message with an 8bit message counter: 0, 1, 2, 3, 4, 5, and so on. RAPP_SendPayloadDataBlock(&msgCntr, sizeof(msgCntr), RAPP_MSG_TYPE_PING, RNWK_ADDR_BROADCAST, RPHY_PACKET_FLAGS_NONE); The first argument is the pointer to the message data (&msgCntr), followed by the size of the buffer (sizeof(msgCntr)). RAPP_MSG_TYPE_PING is the type of the message. RNWK_ADDR_BROADCAST is the destination address (I send it to every node in the network). The last argument are special flags, but I do not need any here, so I use RPHY_PACKET_FLAGS_NONE. State Machine The task processes a state machine, which has the following states: typedef enum { RNETA_INITIAL, /* initialization state */ RNETA_POWERUP, /* powered up the transceiver */ RNETA_TX_RX /* ready to send and receive data */ } RNETA_State; The corresponding state machine is very simple: static void Process(void) { for(;;) { switch(appState) { case RNETA_INITIAL: appState = RNETA_POWERUP; continue; case RNETA_POWERUP: RadioPowerUp(); appState = RNETA_TX_RX; break; case RNETA_TX_RX: (void)RADIO_Process(); break; default: break; } /* switch */ break; /* break for loop */ } /* for */ } From the initial state, it powers up the transceiver. Once the transceiver is powered, it its ready to send and receive data and processes the Radio messages. This is a very basic state machine: I use more complex ones for channel hopping, dynamically powering down the transceiver to save energy and so on. But for this tutorial I want to keep things simple. Transceveiver Power-Up If you read the nRF24L01+ data sheet carefully, you will notice that it needs 100 ms after power is applied until it is ready. I have seen some transceivers which needed even 120 or 130 ms, so I decided to wait 150 ms for all. Accessing the transceiver too early will create strange effects (it took me a while to realize that 😦 ). To wait the needed time, I use the following routine called from the above state machine: static void RadioPowerUp(void) { /* need to ensure that we wait at least 100 ms (I use 150 ms here) after power-on of the transceiver */ portTickType xTime; xTime = FRTOS1_xTaskGetTickCount(); if (xTime<(150/portTICK_RATE_MS)) { /* not powered for 100 ms: wait until we can access the radio transceiver */ xTime = (150/portTICK_RATE_MS)-xTime; /* remaining ticks to wait */ FRTOS1_vTaskDelay(xTime); } (void)RADIO_PowerUp(); /* enable the transceiver */ } As this is called in the context of the RTOS, I can use the current tick counter of the RTOS to find out if 150 ms have been passed. If not, I simply wait for the needed ticks, and then I call RADIO_PowerUp() which will access the transceiver and initialize it from power-up. Message Handler So far I can send messages, but how to receive a message? For this I’m using a message handler table which has a NULL pointer at the end, so I can add more handlers as needed before the NULL sentinel: static const RAPP_MsgHandler handlerTable[] = { RNETA_HandleRxMessage, NULL /* sentinel */ }; The RNet stack is informed about that table with the code we have seen earlier in RNETA_Init(): if (RAPP_SetMessageHandlerTable(handlerTable)!=ERR_OK) { /* assign application message handler */ for(;;); /* "ERR: failed setting message handler!" */ } Whenever the low-level radio driver receives a message, it is passed up the RNet stack, until it reaches that message handler table. Then each handler can inspect the message and process it. For our tutorial application, I have implemented the handler as below: static uint8_t RNETA_HandleRxMessage(RAPP_MSG_Type type, uint8_t size, uint8_t *data, RNWK_ShortAddrType srcAddr, bool *handled, RPHY_PacketDesc *packet) { (void)srcAddr; (void)packet; switch(type) { case RAPP_MSG_TYPE_PING: /* <type><size><data */ *handled = TRUE; /* to be defined: do something with the ping, e.g blink a LED */ LED2_On(); /* green LED blink */ FRTOS1_vTaskDelay(20/portTICK_RATE_MS); LED2_Off(); return ERR_OK; default: break; } /* switch */ return ERR_OK; } Each handler receives the message type, the message size, the message payload data and who has sent the message (srcAddr). So all the message parts have been unpacked by the lower stack layers. But if you want to use the full packet, then it is passed as a pointer too. Finally there is a handled parameter: here I tell the caller that I was able to handle the message. In the handler I check for the type (RAPP_MSG_TYPE_PING), and then I’m free to do anything with that message or message data. Here I’m simply blinking the green LED for 20 ms to show that I have received the ping message. To access the message counter I have passed in the payload, I can use the *data pointer. main() The last step is to call the initialization from main(): That should complete all the needed steps. Generate Code (if not already done), compile and build, and this should go without errors. Running the Application Running the application on the boards should get you some blinking LED’s: - Each board sends a PING message every second, indicated with a blue LED blink: - Whenever a board receives a PING message, it will blink the green LED: Summary With this tutorial I have added nRF24L01+ Transceiver support the Freedom FRDM-K64F board. The FRDM-K64F makes it really ease: solder a header, plugin the transceiver and add Processor Expert component to a project and I can communicate with another remote board. So I can build a network of sensor nodes very easily, and connect it to the internet, and so on. While this tutorial uses the FRDM-K64F board, you can easily do the same for any other board: all what you need is to connect the SPI pins and power the module. And of course add the software. Done :-). This tutorial project is available on GitHub for Eclipse Kepler and the GNU ARM Eclipse. Happy Transceiving 🙂 Hi Erich, Thanks for this great tutorial … It helped me alot to get started with the FRDM-K64F, but I still had some trouble setting up everything … Precon: I used an Eclipse Environment as described in your “Constructing a Classroom IDE with Eclipse for ARM” tutorial. First problem: When I added the FreeRTOS component and made the proposed changes, I got compile errors in the generated Processor Expert code (E.g “selected processor does not support Thumb mode `vldmiaeq r0!,{s16-s31}’). I was able to fix this by changing “Project Properties > C/C++ Build > Settings > Tool Settings > Target Processor > Float ABI “Librbray with FP (softfp)” and FPU Type “fpv4-sp-d16”. Second Problem: I was not able to add the 8MHz as the max frequency for the SynchroMaster component. Only after I changed the Clock Settings (Enabled RTC oscillator in clock sources and used the RTC oscillator in the Clock Source settings 0 for MCG and changed the frequencies to 95MHz) the 8MHz option was available.(Per default the maximum freq. of the FRDM-K64F was around 20MHz). Do you have any idea, what may have caused caused the problems and is this the correct way to fix them? Maybe any missing steps in my Eclipse setup? With kind regards Frank Hi Frank, many thanks for your feedback, and indeed, I must have missed to describe some important steps and settings :-(. So nothing wrong on your side, it is mea culpa. I have added the missing steps in the following chapters: “Compiler Settings”, “CPU Clocks” and updated the screenshot with the FreeRTOS settings to have ‘floating point’ enabled too (otherwise the RTOS assumes no floating point operations are used). Thanks! Hi Erich, I want to test this project, but after import, I got a project with C++build/settings empty !!! Can you help me? Hello, into which toolchain have you imported that project? That project on GitHub is for Eclipse Kepler with GNU ARM Eclipse plugins I import this project with CW10.6 Should I install Eclipse Kepler? or can I convert this project to CW10.6? The build plugins are not compatible. Best if you create a new Processor Expert CW project in 10.6, then you can copy-paste the components to your project. Then copy the application source files, and check the Events.c and call the application from main(). That’s it (I hope). Just wondering if you had any luck using USB on the K64F? I am having difficulties porting my USB applications from my K70f, K60, K20 to the K64F using the FSL USB stack. No, I have had no luck with this neither. I believe something is missing in that stack to support these new Kinetis devices, and I got lost in the complexity of that USB peripheral on the K64F. I need to look at the Kinetis SDK USB stack instead: there I made some progress, but had no time to publish an article about it (yet). Oh well… Thanks Erich! I will look into using the Kinetis SDK USB stack instead. BTW, very many thanks for putting this site together. It is really a treasure trove. I am coming from the 8/16 bit world of pic microcontrollers, and I was up and running in a few hours thanks to mcuoneclipse. So far, I have had no difficulties in making the transition, and I have been able to get answers to many of my questions from your site. Keep up the very excellent work!! . Just wanted to follow up with you on this topic. After months of tinkering with USB on the kinetis platforms, I am now able to get USB working on the FRDM-k64f using the FSL USB 4.11 stack in CW. I was also able to get USB up and running in KDS using my own lightweight stack with the FRDM-K64F, FRDM-K22F, FRDM-K20D50M, TWR-K70F120M and TWR-K60D120M respectively. The main difference between USB on the K64f and most other kinetis family is the presence of a memory protection unit on the K64f. This must be disabled with the command MPU_CESR = 0 prior to initializing any USB stack. oh wow, thanks for that hint! It indeed could be that missing link why I was not able to get the 4.1.1 stack up and running. I need to check this out on my side. Thanks for sharing! Unbelievable, that was the problem, IT WORKS!!!! Thank you, thank you, thank you! Pingback: Zumo Robot with WiFi and GPS | MCU on Eclipse Just recieved frdm-k64f board today, looking forward to try this out, the nordic-semiconductor-nrf24l01 are available locally here so… all nice. Hi, in trying to reproduce this great tutorial using Kinetis Design Studio, when I reach the configuration of nRF24L01 component, Processor Expert reports conflict errors when I try to select PTD4 pin for CSN1 and PTC18 for IRQ1: CSN1/Pin for I/O Processor Expert Problem BitIoLdd2/Pin for I/O Processor Expert Problem Selected value is in conflict with other configuration(s) property ‘Pin for I/O’ from component BitIoLdd2, property ‘General purpose IO pin 4’, property ‘Low-leakage wake-up channel 14’ Exclusive connection required by ; Selected value is in conflict with other configuration property ‘Pin for I/O’ from component BitIoLdd2, conflict in configuration of MUX bit-field of PORTD_PCR4 register. (SPI peripheral chip select(output) 0 or slave select(input)) K64F_nRF24L01p pin_mux/SPI peripheral chip select(output) 0 or slave select(input) Processor Expert Problem I followed all the instructions step by step but I am unable to find where the problem is. Any hint will be appreciated! I’m sorry, I had not had time to really look into this. I try to reproduce this on my end. Hi Francesco, I tried this on my end with KDS v1.1.1, and I don’t see what you report? Maybe you can send me your project? Hi Erich, thank you for your answer! Unfortunately I have already deleted the project with the intention to restart it from the beginning but until now I had no time to do it. However I successfully imported your original project and it compile correctly, so now I have a reference to compare my work with. I will post a comment when I discover where I was wrong in my first attempt. Thank you again for your support. Regards Francesco Pingback: Sensor and Communication Shield for Sumo Robot | MCU on Eclipse Pingback: BBQ Smoker Monitoring Robot | MCU on Eclipse Pingback: Cheap and Simple WiFi with ESP8266 for the FRDM Board | MCU on Eclipse Pingback: USB CDC with the FRDM-K64F, finally! | MCU on Eclipse Hi Eric Could you explain why you use the Nordic Semi module rather than a Kinetis chip with an internal transceiver? [i.e. MKW2xDxxx] I know that the Nordic Semi one is probably faster and possibly easier to use but it would be interesting to be able to do more or less the same thing using a single Kinetis chip. Thanks Mark Hi Mark, there are several reasons to use the nRF24L01+ chip instead e.g. the KW2 or any other of this kind. First, such an integrated solution like the KW2 absolutely makes sense if PCB space or cost (in volume) are a concern. But otherwise I think an external transceiver is the prefered solution: you are independent of the microcontroller, you have better debug support (you can probe the signals) and know what is going on, and you can combine the best microcontroller with the best transceiver. When I started using the nRF, there were no KW2 available, or only on a TWR board. No small and inexpensive modules from anyone. The nRF is readily available from many sources, it is well known, used in many projects, and there are tons of forums/drivers available. And as you say: easier to use, and the specs are in some aspects even better than the KW variants. As you say, you can do more or less the same thing with the KW or the nRF. It boils down if you really need to have it in one device or not. For me using a dual-device approach worked out very well. Eric I don’t know much about the 2.4GHz radio protocols but the KW2 supports ZiggBee and there is no mention of that in the Nordic Semi’s data sheets. Supposedly there are different protocols that can be usedin that band. Do you know whether a KW02 (using one of its modes/protocols) and a nRF24L01+ can work together? That is, have a K64 (for example) and nRF24L01+ at one and and a KW02 at the other? Regards Mark Both the nRF24L01+ and KWx are using the 2.4 GHz band (as WiFi), but the are not compatible. The channel bands and the encoding on the channel are different and not compatible. ZigBee (and the KWx parts) are building on top of the IEEE802.15.4 PHY and MAC layers, while nRF24L01+ is using its own coding and no IEEE protocol. The nRF24L01+ is more like BLE (Bluetooth Low Energy) and you can use it in special mode to listen to BLE packets (but not sending it), at least I have seen articles about this. To answer your question: you cannot talk between a nRF24L01+ and a KW02. Erich Hello Eric I have also received a few of these modules and have connected them up to FRDM-K64 and FRDM-K22 boards (these both have the RF sockets on them, making them practical). In the case of the FRDM-K22 the resistor R52 needs to be removed otherwise the accelerometer IRQ output short circuits with the nRF24L01+ IRQ output. Initially I also didn’t know that the SPI used by the K64 doesn’t have the normal 4 deep FIFO, but only one, which caused some confusion. For this I used the Enhanced ShockBurst(TM) mode since it seems to generally allow maximum power efficiency and allows the transceiver to take over much of the low level details – also the TX enable signal can be left at ‘1’ and basically higher throughput efficiency This means that I have the K64 as PTX and the K22 as PRX with the K64 sending regular messages and the K22 receiving them, and optionally sending data back using the “ACK with payload” function. If I understand correctly you have also used these advanced modes so I am wondering whether you have any advice on the following? – Essentially I need to add fragment/deframent on the RF interface so that I can send larger messages (full size Ethernet). – Then I need to configure a bridge/router in the K64 end of the SW so that it passes IP traffic across the RF link (internally generated or from Ethernet) – The K22 has a TCP/IP stack and local web server so will use the RF link to send and receive this data. – The result is that the web server on the K22 can be contacted from the LAN that the K64 is on (using its routing/bridging function and the RF link) – There can be multiple K22s (or others) taking part, each with their own RF module (i.e. each contactably on their own IP address from the LAN) What I am mainly wondering about is what would be the best technique for this? If the K64 is in PTX mode it can periodically poll each K22 (send a dummy frame for example if there is no data to be sent at the moment) so that the K22s (PRX nodes) can send data from their output queue. The K64 can of course send at any time in this mode. This would need a fast polling rate to keep delays from the K22s low. Pipe 0 would be used for this and each K22 have its own unique 5 byte address. For broadcast transmissions from the K64 to the K22s I think that a second pipe where all K22s have the same 5 byte address may be suitable if the K64 sends such payloads with the auto ACK disabled (W_ACK_PAYLOAD_NOACK instead of W_TX_PAYLOAD). Since I don’t yet have any more experience with the RF modules, apart from checking the basic Enhanced ShockBurst(TM) mode [1Mbps with 500us timeout and 5 repetitions] between the K64 and K22, do you have any advice as to what may cause problems or could be done better? – hopefully the broadcast strategy is suitable (K64 sends in parallel to all K22s but without any guarantie, since no ACK) (?) – is the fixed PTX and all K22s as PRX (and polling) the best strategy or do people use some arbitration method so that the rolls can be swapped dynamically (?) to avoid un-necessary polling (and reduce power at the K64 when there is no activity?). At the moment I have only one FRDM-K22 so will need to wire up an adapter to some other board to try to verify the broadcast technique – if you confirm if it isn’t possible beforehand it would save some time 😉 Regards Mark Hi Mark, yes, I have used Enhanced Shockburst mode for my modules, as this greatly simplifies the protocol. From your question I understand that every module in your network will have its own address. Then should be generally ok. But you might need to add an additional layer of ACK message protocol to make sure that the messages get transmitted: the 5 retries might not be enough. The biggest problem I have with the nRF24L01+ modules is that they do not support a broadcast: it is not easily poosible to build up a network from scratch (with all modules having the same initial address): If you have say more than 3 or 5 modules listening, they all will answer with an ACK confusing the sender. But if you preprogram each module with a specific address, you should be fine. The other thing to consider: check the power consumption of your modules. I had received some which work, but draw always about 30 mA. There are some reports in the forums too. One theory is that they have an internal OTP, and if it gets somewhow corrupted, the module is always in RX/TX mode power-wise. And properly buffer the power supply of the module: fluktuations or spikes on the power supply will cause the modules to lock up. Good luck! Erich Eric Thanks for the tips, which I will be considering during the work. I am also thinking about a method of automatically assigning addresses to the boards but initially I will be setting individual ones – they also need unique MAC addresses anyway, plus have a matching RF channel. In parallel to this I have to add a second Ethernet interface to the K64 (also SPI based with a Microchip ENC424J600 which I haven’t used before) so will have to make small steps at the beginning. Regards Mark Hello, I stumbled on this site while searching about the SPI FIFO. Actually, according to the MK64FN1M0VLL12 manual (page 159), SPI0 has a 4 Word FIFO. However, SPI1 & 2 only 1. Regards, Gunter hi Erich, I am trying this project from git hub. Ever since you posted this project Freescale has updated SDK and KDS to new versions. I am getting following error make: *** No rule to make target `C:/Freescale/KDS_2.0.0/eclipse/ProcessorExpert/lib/Kinetis/pdd2/MK64FN1M0LL12/system/CPU_Init.c’, needed by `Static_Code/System/CPU_Init.o’. Stop. make: *** No rule to make target `C:/Freescale/KDS_1.0.1/eclipse/ProcessorExpert/lib/Kinetis/pdd2/MK64FN1M0LQ12/system/CPU_Init.c’, needed by `Static_Code/System/CPU_Init.o’. Stop. I am using KDS_3.0 and KSDK 1.3.0 Where and what changes do you suggest to build this project with latest versions properly? Hi Ammad, that project is for Eclipse Mars or Luna, not for KDS. Plus this project is not using the Kinetis SDK. And given the make messages, you are using a mixture of KDS v2.0.0 and KDS v1.0.1? I checked again the project on GitHub, and it builds fine for me? But it might be that the Static_Code folder is not present for you? I will add it to the project just in case. I will post the necessary changes for Eclipse MARS today too (just in case this matters). Pingback: Infotronic WS2014 Sumo Robots are Ready! | MCU on Eclipse Pingback: Kinetis Drone: Frame Construction with Graupner Race Copter Alpha 250 Q | MCU on Eclipse Hi Erich. Its working fine now. Thanks for the help. Where do you configure the addresses for the board? Could you please point me to the file and function? Hi Erich, Sorry for cluttering your page. I was wondering if you have done any such example with KSDK? That way we could utilize the existing facilities like lwIP and other stuff. It would be fun to do so. Its a pity that KSDK doesnt include examples for nRF24L01. Freescale should consider adding it to their library given they provide special space for the module. No, I don’t have an example with the KSDK. I had an example working with the SDK v1.1, then SDK v1.2 came out and everything was not compatible. I ported it to v1.2 and when done, SDK v1.3 came out and again everything was incompatible and stopped working. I stopped spending my time with it. I quickly checked if I still have that SDK project available, but it seems I have removed it. So at the end, it was much easier to use Processor Expert, especially because the drivers keep being compatible. But at the end I think it is a question of personal taste, and how much efforts you are willing to spend. I hope that with the next version of the SDK the API will stabilize so I can move more and more projects to the Kinetis SDK. Thanks for the help. I am still not getting green LED blinking. I was wondering to come up with a way to debug the RF module. I want to read and write the registers of RF module with custom messages to make sure the SPI messages are being correctly written on RF module. I have got blue LEDs blinking but never turn green. After reading the code I am not sure Blue LED blinking means for sure that the RF module has transmitted something. It just means board has called that transmission function. I want something which can assure me that the RF module is working, the only way seems to me is start reading the module’s registers. We know that there are certain commands to read write the registers. Could you tell me which function is doing that? It could be that your wiring is not correct. Or that you are using a fake nRF24L01+ module (I have myself received some cheap modules from China which did not work at all). I recommend that you hook up a logic analyzer to the signals to the transceiver so you see what is going on. For reading/writing the transceiver registers: the nRF24L01 (RF1) component has read and write functions implemented. H Erich, I would like your expert opinion on the following data. I tried this: */ x = RF1_ReadRegister(0x08); x = RF1_ReadRegister(0x00); x = RF1_ReadRegister(0x01); x = RF1_ReadRegister(0x02); x = RF1_ReadRegister(0x03); x = RF1_ReadRegister(0x04); Register 0x08 is the is the OBSERVE_TX register which tells you if something has been transmitted. (Correct me if i am wrong). For the sake of being sure I read the values of several registers. I get the following values: 0x00 = 0xE 0x01 = 0x1 0x02= 0x1 0x03= 0x03 0x04 = 0x2F 0x08 = 0x00 I bought 5 RF modules in a single batch. Seems like none of them has a working RF. I feel I can safely declare all 5 modules as faulty. What do you think? I really don’t knwo what is wrong with your modules. If you got counterfeit modules, then very likely all of them will be counterfeit. I received once a batch of modules which were not trimmed: the antennas/sending frequency where several MHz off the center bands, being able to barely to communicate. I heard that in China they take the ‘bad devices’ which do not pass the quality tests of Nordic and then sell the devices as low cost ones. For sure I had received such a bad badge from a vendor. Have you checked the interrupt line of the module if it is behaving properly? No i havent checked the interrupt line. On the packaging it says nRF24L01+ but when I magnified the chip on the module it says Si24R1. Did you manage to make those cheap modules work? Any work around for them? My modules have “nrf24l01” on it, see. I ordered once some devices from china supposed to be compatible with the Nordic NRF24L01, but they did not work. So I think you have some incompatible devices? The transceiver address is specifed in Generated_Code\radio.c: static const uint8_t RADIO_TADDR[5] = {0x11, 0x22, 0x33, 0x44, 0x55}; /* device address, as specified in the properties */ It is configured in the settings of the RNet component. So you need the files to be generated with Processor Expert as the generated files are not pushed on GitHub. I hope this helps, Erich Hi Erich, Thanks for the help. If you still have projects from previous SDK’s working could you email me the zip file? That would be really helpful. I have tried including processor expert as well as SDK into a single project but that doesnt seem to work. It seems I do not have them any more: I have deleted them as with the SDK changes they code was not compiling any more, and it was too much pain to move from one SDK version to another :-(. Hi, I apologize for bothering you again and again. I am new to this board stuff. I have downloaded build and loaded binaries on to two board. No changes in the code yet. Only Blue LEDs are blinking. I have marked break points on SM1_OnRxChar and SM1_OnTxChar. Both functions are repatedly hit but no green LED blinks. Could you please tell me what have I not configured? I was also wondering what do you recommend to print messages on serial com since PRINTF from SDK is not not working in this project. I want to send custom data on boards what functions in this stack should i call? Again Thanks for for your help and time. I found your forum really helpful since started with FRDM boards You can use RAPP_SendPayloadDataBlock() (it is used in the demo too), simply add your own message ID and format. I use the AsynchroSerial component for writing to a terminal, or you could use the Term component (see). I hope this helps, Erich Thanks Erich, I have tried reading and writing registers. Seems like module is reading and writing. Did your fake module read or write on registers? I do not have a logic analyzer so I am relying on reading the registers of module in the code. If the module is reading and writing that means RF is is fine I guess. Whats your opinion on this? I have got my modules from China. On the packing it says SEED STUDIO INNOVATE with China. Was your vendor same? Yes, I was able to read/write to the modules, but they were not sending or receiving anything. Reading or writing registers only tells that you can access the transceiver, but not if the RF is working. I don’t have the modules with me, so I cannot tell you what was written on them. Thanks a lot Erich. That was really helpful. I might check with a field detector if they are sending any RF signal. It was driving me crazy now as the registers were reading all fine. Ammad To check functionality, there is a reference binary that can be loaded to the FRDM-K64F at Beware that there are FRDM-K64F Rev. D and E boards and there are some wiring differences between the two which affect the RF module connection – the reference is for the Rev. D board. Regards Mark Pingback: How to Add Bluetooth Low Energy (BLE) Connection to ARM Cortex-M | MCU on Eclipse Pingback: nRF24L01+ 2.4 GHz Wireless Connectivity with the tinyK20 Board | MCU on Eclipse Hi Erich, I want to use a nRF24L01+ on a 8bit freescale microcontroller (HCS08GT60), off course I won´t use FreeRTOS, then, Do you have some sample of How can I use the nRF24L01 PE component? thank you. Hi Camilo, why ‘of course not using FreeRTOS’? I think you wanted to say ‘of course using FreeRTOS’? I’m using FreeRTOS in most of my S08 projects as it is very small. The RNet stack actually takes advantage of FreeRTOS and makes the nRF driver and stack much simpler. Really? Can I use FreeRTOS on a S08? Please tell me how. Thank you. Yes, of course. There are tutorials (altough a written a while back) like Make sure you use the latest components from SourceForge (). Examples are on GitHub: I have not used CodeWarrior much recently, but I think you will find your way. Thank you. Erich, I tried to add FreeRTOS on my project but I couldn’t Enable “settings for the scheduler” because there are only three options. ColdfireV1, ColdfireV2 and Kinetics. My microprocessor is a S08GT60. How can I to proceed? Hi, this is my error when I tried to use FreeRTOS on S08GT60. Thanks Description Resource Path Location Type C1019 Incompatible type to previous declaration (found ‘unsigned char (*) ()’, expected ‘unsigned long (*) ()’) FRTOS1.c /Generated_Code line 4545 C/C++ Problem Hi Camilo, well, that does not help me much. I have sent you an email so we can discuss it. Or you can open a ticket on GitHub: Thanks, Erich Pingback: Disabling EzPort on NXP Kinetis to Solve Power-On Issues | MCU on Eclipse
https://mcuoneclipse.com/2014/07/01/tutorial-nordic-semiconductor-nrf24l01-with-the-freescale-frdm-k64f-board/
CC-MAIN-2017-13
refinedweb
7,132
70.13
Developing Content-Driven Web Apps with karma-jcr Everyone seems to be talking about making development simpler these days, and for good reason: Look at some of the J2EE technologies out there, like the EJB 2.1 specification. That's one of those specifications that makes outsiders think J2EE is a platform primarily for academics only. But the good news is there's a growing awareness of the hurdles of J2EE complexity, and for this reason the JSR 220 expert group designed the new EJB 3 specification from the ground up with simplicity in mind. Every day another Ruby on Rails Clone seems to pop up somewhere. For those of you who are unaware, Ruby on Rails is the framework known for its productivity. While Ruby is truly superior to most frameworks in productivity, as a language it lacks industry support and will probably have a hard time making its way into the big enterprises any time soon. So what does that mean for our Java projects? They are getting tougher every day, and schedules are tight. The J2EE world offers a great stack of frameworks, but they don't come as easy and integrated as the Rails stack. It takes a lot of preparation, experience, and most of all smart architectural decisions to get things rolling. What is the karma framework? The karma framework was created to tackle the problem of unnecessary complexity, to reduce the amount of configuration needed to get simple things working. The key is that it uses a set of conventions to find stuff. This approach is called convention over configuration—an approach that isn't so unusual these days but was not widely implemented when I started the framework about a year ago. "">karma mvc is the core component of the framework. It is a fairly universal interpretation of the Model View Controller (MVC) pattern targeted mainly for web application development (Servlet/JSP), but with some tweaking it could also be used in an EJB context, as a stand-alone on a command-line, or even as a web service framework. Yes, in a sense karma mvc is just another web framework! It has a little bit of Struts, a little bit of Webwork, and some pieces of Spring. I tried to extract the best parts and ideas of each of them and combine them into one simple-to-learn and easy-to-use MVC framework. If you are familiar with the ideas and concepts of MVC frameworks I'm certain you can learn karma mvc in an hour. If you aren't familiar with it, don't worry. I will summarize it for you. All requests that need to go to your application are routed through a central controller, which is where the framework lives. Actually, you don't have much work to do here except to tell the controller where to route the requests. You can do this in two ways: The first one is to use the default URL pattern-based method; this approach doesn't require any configuration. The second one is to use an XML-based configuration file. The karma controller looks at the URL that is invoked by the client. It splits the URL into so-called request elements, and figures out what needs to be done. For example: This URL pattern requires karma to call the Register action and then dispatch to the register view. If you think this may be a security issue for your application, you can configure it in an XML file. These configurations are called aliases. You can define an alias called register for this workflow. The URL would then be much smaller: Have a look at the "">karma documentation for more information. This controller also invokes actions. Each action, a single use-case, is a simple Java class (a "">POJO) that contains your business logic. The whole idea is to divide your business logic into short, easy-to-maintain, specialized action classes. This is where you make use of your Application model composed of JavaBeans. It is worth mentioning that actions do not have bindings to the servlet container in which your application runs (great conditions for unit testing). The karma-mvc framework creates a new ActionContext object for each invocation of an action. This generic ActionContext contains form values, parameters, session objects, and application objects. Last but not least, views—single JSP files that should not contain any Java business logic—display the processing results of your actions. Views simply display the objects that your actions give them access to. Interceptors and filters are advanced topics that I won't go into detail about in this article. What is a Java Content Repository? Most Java developers today have a basic need for CRUD (create, retrieve, update, and delete) capabilities in their web applications. They need to persist their model data quickly and easily to persistent storage. That is where databases and Object-Relational Mapping frameworks come into place. In the Java world, you would use Hibernate or iBatis, for example. In Rails you have Active Record, which is part of the core framework. The karma framework addresses this need for persistence and comes with an additional component called "">karma-jcr, an Object Persistence framework for Java Content Repositories. Repositories are well known in content management and portals but are not particularly common in web application development. A Java Content Repository (JCR) is a standard infrastructure for content storage specified in ""> JSR-170 (JCR 1.0). It is a "content database" that can consist of several workspaces each with a tree of items (nodes). Each node can have a number of properties of different types (primitives types, xml data and binary files). The nature of a node (its set of properties or subnodes) is defined by its node type, which compares to classes in the Java world. Take a look at Chapter 4 ("The Repository Model") of the JCR specification for more information. karma-jcr is able to persist your model classes to a JCR in a very high-level way. Most of your standard JavaBeans can be used with karma-jcr. Supported properties include all primitives, "complex" JavaBeans, Arrays, and most Java Collection types. karma-jcr comes with Content-, Search-, Login-, and Admin Managers, which cover common tasks needed for working with a repository. The Manager classes are service classes that are used for specific tasks, and are the only classes in karma-jcr that you need to deal with. Internally karma-jcr uses "">Jackrabbit from Apache; this is the reference implementation of the JCR 1.0 standard for communicating with the repository. To summarize it, karma-jcr is a very easy-to-use abstraction layer on top of Jackrabbit and JCR. Let's develop an application Enough theory. Let's get our hands dirty. We are going to develop a web application with a simple back office to publish news articles that will be stored in a Java Content Repository. We need a page to display articles and a protected page with a login to enter news articles. There are different ways to solve this problem. We are going to use a karma barebone starter application. The barebone contains a complete project structure with configuration files, a build file, and skeleton code. You should always use the latest barebone from "">CVS when you start a new project, but for this article I have prepared a ""> download archive to get you started instantly. System requirements Make sure you have "">J2SDK 1.4.2+, "">Maven 1.0.x, and "">Tomcat 5.0.x available on your system. Maven is a popular Java build system similar to Ant. Refer to the "">Maven user guide for instructions on how to install it. You can also use Ant, but you'll need to set up the project manually. If you prefer, you can use a different servlet engine from Tomcat. I assume you have your environment all set up now and you've fired up your favorite IDE. You will also need to access the command line. Unzip the barebone archive to your workspace directory. You should see something like Figure 1: "Directory structure" /> Figure 1. Directory structure The config directory contains the configuration files for your Java Content Repository. In the src directory there are two subdirectories: java for your Java source files, and webapp for your web-related files like JSP and CSS. Note that there are no jar files in the barebone folder because Maven fetches the needed jars from the remote Maven Repositories specified in the project.properties file. For this to work properly, make sure your system is connected to the Internet. To test your barebone, open up a command-line shell and go to the barebone folder. Enter maven war. This maven command will create a war file artifact that will be used with Tomcat later on. Figure 2 shows the results of this command. Figure 2. Maven build On the first run of maven, a lot of jars will be downloaded, so this could take a while. You should now have a war file artifact, called karma-jcr-starter-barebone.war, in the target folder of your barebone. Before deploying the war file to your Tomcat server, you need to make some configuration adjustments, indicating where you want your Java Content Repository to be. Open the applicationContext.xml file in the src/webapp/WEB-INF folder. This is a Spring framework configuration file that is used internally by the karma framework. You need to look for the jaasConfigFile, configFile, and repositoryDir properties. Specify the absolute paths to the jaas.config and repository.xml files in your barebone config folder. You also need to enter an absolute path for repositoryDir. This is the actual filesystem location of your Java Content Repository. You then need to rerun Maven to apply these configuration changes to your war file artifact. Enter on the command line. You can now copy this file to youron the command line. You can now copy this file to your maven clean war Tomcat webapps folder and start Tomcat. Then open up your favorite web browser, and go to the URL. You should now see the welcome page shown in Figure 3. "Web application welcome page" /> Figure 3. Web application welcome page If you don't see this page, check the catalina.out logfile of your Tomcat server. The barebone application comes with a single action that you can use to create a new Java Content Repository. Click the link. You only need to do this on the first run of the application. It is for convenience only; never use it in a production environment. If things go wrong, doublecheck the paths in your applicationContext.xml configuration file. Rerun maven clean war, and redeploy the war file to your Tomcat webapps folder. It's now time to do some coding to get your news application going! Let's create your first karma action This hasn't been too tough so far, has it? Let's get to the fun part now. First, you need to create a login page containing a simple HTML form with a username and password textfield for your news back office. karma-jcr comes with the built-in concept that everything should be kept in the repository. While initializing the repository, the standard admin user with password password has already been created for you. You will use the Login Manager to perform the authentication. But first, have a look at the Init.java file. You can find it in the src/java/com/inceedo/karma/jcr/barebone/actions folder. Init.java package com.inceedo.karma.jcr.barebone.actions; // imports public class Init implements IAction { private RepositoryAdminManager repositoryAdminManager; public void process(IActionContext context) { try { getRepositoryAdminManager().initRepository(); } catch (RepositoryInitializationException e) { e.printStackTrace(); context.returnToInput(); } } // getters and setters } The Init action is a simple Java class implementing the IAction interface, which is required for all karma actions. Init implements a single process method that is invoked by the framework. Note that there are no bindings to the servlet container, so you can easily create JUnit tests for your actions. The Admin Manager takes care of initializing the Java Content Repository. It creates a repository layout for you where you can store users, groups, and your content objects. It comes with a domain concept. Domains are logical subroots of your content. You can create different domains within your Java Content Repository where you can separate your content. For example, you can create domains like company_a and subdivision_b. If you don't specify any other domains (use the applicationContext.xml file to do so), karma-jcr creates a default domain for you. One more interesting aspect about the Init action is how the RepositoryAdminManager is injected into the action. When the web application is started, by default karma scans all the action classes defined in the aliases, looking for dependencies. It reflects on the class properties and compares them to beans managed by the Spring container. It keeps a map of all dependencies and injects the beans into the action at invocation time, so you don't have to take care of that. Of course, you can manually retrieve beans from the Spring container by invoking the getComponent method on the IActionContext object. The action alias init is used to call this action. Let's look at the aliases.xml (in src/webapp/WEB-INF): aliases.xml <definitions> <alias aliasName="init" actionName="Init" viewName="success.jsp" inputName="/index.jsp" /> </definitions> karma expects all your classes to be beneath a base package. In this case it's the com.inceedo.karma.jcr.barebone package, which is defined in the web.xml (in src/webapp/WEB-INF). All actions go into the actions package, all interceptors into interceptors, and all filters into filters beneath the base package, so you only have to define this once. Alias definitions are very straightforward. You have to define an alias name ( aliasName) that maps to an Action class ( actionName) whose result is displayed in a view ( viewName). In case something goes wrong, it returns to the input view ( inputName). Note that actions are not supposed to make workflow decisions: the workflow is always defined outside the action. Next up is the Login action. First, you need to create a simple login.jsp file that goes into the src/webapp folder. login.jsp <%@ page <html> <head> <title>Login</title> </head> <body> <c:if <font color="red"> <b>${errormessage}</b> </font> <br /> </c:if> <form method="POST" action="${ctx}/do/login"> Username: <input type="text" name="username" /> <br/> Password: <input type="password" name="password" /> <br/> <input type="submit" /> </form> </body> </html> There's nothing unexpected here—just an HTML form to submit username and password to the Login action by calling the login alias. Create a Login.java file in src/java/com/inceedo/karma/jcr/barebone/actions. Login.java package com.inceedo.karma.jcr.barebone.actions; // imports public class Login implements IAction { private RepositoryLoginManager repositoryLoginManager; public void process(IActionContext context) { String username = context.getForm().getProperty("username"); String password = context.getForm().getProperty("password"); if (!getRepositoryLoginManager().domainLogin( "default", username, password)) { context.addToRequest("errormessage", "Login failed!"); context.returnToInput(); } else { context.addToSession("authenticatedUser", username); } } // getters and setters } The Login action uses the Login Manager to perform a domain login. It retrieves the form values using the Form object in the IActionContext. The Form object is created dynamically by the karma framework. If the domain login fails, an errormessage is created and added to the request. By setting the returnToInput flag, karma knows that the action failed and that the workflow needs to return to the input view, which is the login.jsp in this case. If the domain login succeeds, the username is added to the session for later reuse. Next, add a new alias to your aliases.xml file: aliases.xml <definitions> <alias aliasName="login" actionName="Login" viewName="addnews.jsp" inputName="/login.jsp" /> </definitions> After that you have to create an addnews.jsp file, as defined in viewName, in the src/webapp/views folder. karma expects all views that participate in workflows to be there. You can, of course, create subfolders. login.jsp is outside the views folder because it will be called directly. addnews.jsp <c:if <font color="red"> <b>${message}</b> </font><br /> </c:if> <form method="POST" action="${ctx}/do/addarticle"> <table border="0"> <tr> <td>Headline:</td> <td> <input type="text" name="headline" /> </td> </tr> <tr> <td>Author:</td> <td> <input type="text" name="author" /> </td> </tr> <tr> <td>Text:</td> <td> <textarea name="text" rows="8" cols="60"> </textarea> </td> </tr> <tr> <td>&nbsp;</td> <td> <input type="submit" /> </td> </tr> </table> </form> This is the JSP with an HTML form to add a news article. News articles will consist of a headline, an author, and text. You need to create a corresponding JavaBean class representing this model. Article.java package com.inceedo.karma.jcr.barebone.model; public class Article { private String headline; private String author; private String text; // getters and setters... } Now all you have to do is create an AddArticle action that populates the Article JavaBean from the submitted form values and saves the Article object to the repository. To save objects you have to use the Content Manager. The repository has a tree structure, so you have to determine the path at which you want to add the object. AddArticle.java package com.inceedo.karma.jcr.barebone.actions; // imports public class AddArticle implements IAction { private RepositoryContentManager repositoryContentManager; public void process(IActionContext context) { Article article = new Article(); article.setAuthor( context.getForm().getProperty("author")); article.setHeadline( context.getForm().getProperty("headline")); article.setText( context.getForm().getProperty("text")); try { getRepositoryContentManager().addObject( "default", "domains/default/objects/" + article.getHeadline(), article, (String) context.getFromSession("authenticatedUser"), new NodeRights()); context.addToRequest("message", "Object created!"); } catch (Exception e) { e.printStackTrace(); context.addToRequest("message", "Object could not be created: " + e.getMessage()); } } // getters and setters } Besides the object itself, you have to specify the creator of the object and attach the rights to it. By creating a default NodeRights object, you can use the default set of rights, but you can also specify in detail who is going to be able to access the object. Next, add another alias to your aliases.xml file: aliases.xml <definitions> <alias aliasName="addarticle" actionName="AddArticle" viewName="addnews.jsp" /> </definitions> In the final step, you are going to create a page to show the available articles. You need a JSP to display all articles and a ShowArticle action to load a single article from the repository using the Content Manager. Then you need to create a JSP to display this particular article. Let's first create the GetArticleNames action. GetArticleNames.java package com.inceedo.karma.jcr.barebone.actions; // imports public class GetArticleNames implements IAction { private RepositorySearchManager repositorySearchManager; public void process(IActionContext context) { try { HashMap map = (HashMap) getRepositorySearchManager(). getContentObjectNamesFromPath( "domains/default/objects", true); context.addToRequest("articles", map); if (map == null || map.size() == 0) { context.addToRequest("noarticles", "true"); } } catch (JcrRepositoryActionException rae) { rae.printStackTrace(); context.returnToInput(); } } // getters and setters } This action basically reads all object names at a given path and then adds them to the request for the following JSP to display. articles.jsp <h2>available news articles:</h2> <c:if <font color="red"> <b>No articles found.</b> </font> <br /> </c:if> <c:forEach <a href="${ctx}/do/showarticle?name=${article.key}"> ${article.key} </a> <br/> </c:forEach> This JSP fragment for the articles.jsp shows how to iterate the articles' HashMap using the JSTL core taglib. Figure 4 shows what the article listing looks like. "Articles listing" /> Figure 4. List of all articles ShowArticle.java package com.inceedo.karma.jcr.barebone.actions; // imports public class ShowArticle implements IAction { private RepositoryContentManager repositoryContentManager; public void process(IActionContext context) { try { ContentBean contentBean = getRepositoryContentManager().getObject( "default", "domains/default/objects/" + context.getParameter("name")); Article article = (Article) contentBean.getObject(); article.setText( article.getText().replaceAll("\n", "<br/>")); context.addToRequest("article", article); } catch (Exception e) { e.printStackTrace(); context.returnToInput(); } } // getters and setters } ShowArticleretrieves a single article from the repository using the Content Manager. showarticle.jsp <h2>${article.headline}</h2> <small>from ${article.author}</small> <p>${article.text}</p> This JSP fragment for showarticle.jsp shows how to display the article. aliases.xml <alias aliasName="articles" actionName="GetArticleNames" viewName="articles.jsp" inputName="/index.jsp" /> <alias aliasName="showarticle" actionName="ShowArticle" viewName="showarticle.jsp" /> Finally, you have to add some aliases to your aliases.xml file. Figure 5 shows the showarticle action in your browser. "Article details" /> Figure 5. Article details Conclusion This article showed you how to build a simple karma-based web application using a Java Content Repository to store your content objects. This is only an introduction, and the source code does not suffice for a real-world project, but it should help you get started on this topic. karma-jcr comes with easy-to-use abstract Manager classes to perform basic tasks. It is a very young project, as young as the JCR 1.0 standard itself, so feedback and patches are very welcome. Resources - ""> Barebone Download - ""> Full Source Download - ""> JCR-1.0 Specification (JSR-170) - karma Framework project site - karma Framework Wiki - ""> karma Getting Started Guide - "">karma-mvc API Docs - "">karma-jcr API Docs - "">karma-jcr Repository Browser - Apache Jackrabbit - Ruby on Rails - Login or register to post comments - Printer-friendly version - 5454 reads
https://today.java.net/pub/a/today/2005/09/29/content-driven-web-apps-with-karma.html
CC-MAIN-2015-14
refinedweb
3,552
50.02
Hi. I'm beginner at competitive programming and there is 100% that this topic is not original, but, in spite of this, I decided to publish it. So, (you are still reading, that's achievement for me :D). Sometimes we need to associate string with some object and then quickly find it by those key string. Prefix trees are good thing to do it. For more information about them read this, or this. Algorithm complexities: Add element O(1) // iterations are equal to length of string Remove element O(1) Search element O(1) Memory: In worse case each bound's weight is 300 bytes, but you can reduce this by using function to get child id by character (see in code), and saving pointer to object you are pushing. Need a more detailed analysis, but, in generally we can see that this structure is very fast, but not so effective in memory usage, you can use it when you are need to balance memory and time. Here is realization, hope some will use in their solution: template <class T, std::size_t ALPHA_SIZE> class prefix { public: prefix(std::size_t (* f)(char)) : I(f), m_root(new node) {} ~prefix() { rec_del(m_root); } T & operator[] (std::string s) { node * curr = m_root; for (auto e: s) { size_t i = I(e); if (curr->next[i] != nullptr) { curr = curr->next[i]; } else { curr = curr->next[i] = new node; } } curr->used = 1; return curr->val; } bool thereis(std::string s) { node * curr = m_root; for (auto e: s) { size_t i = I(e); if (curr->next[i] != nullptr) { curr = curr->next[i]; } else { return 0; } } return curr->used; } private: struct node { T val; uint8_t used; node * next[ALPHA_SIZE]; node(): used(0) { for (size_t i = 0; i < ALPHA_SIZE; ++i) next[i] = nullptr; } ~node() {} } * m_root; std::size_t (* I)(char); void rec_del(node * curr) { if (curr == nullptr) { return; } else { for (size_t i = 0; i < ALPHA_SIZE; ++i) rec_del(curr->next[i]); } delete curr; } }; And this is test program. #include <iostream> #include <cassert> #include <cstdio> #include <string> #include "prefix_tree.hpp" inline std::size_t iofc(char c) { return static_cast<std::size_t>(c); } int main() { using namespace std; tree::prefix<int, 127> tree(iofc); tree["hello this is where you are!"] = 2; assert(tree.thereis("0000000000000000000000000000") == 0); assert(tree.thereis("hello this is where you are!") == 1); return 0; } Yes, many useful functions are absent, (such as remove for example, iterators). But the first step is made, so, let's improve it, good luck and have fun!
http://codeforces.com/blog/entry/10587
CC-MAIN-2019-43
refinedweb
410
57.5
I am not much good with Excel, but I encounter it a lot as data source. AutoIt is not too shabby for fast for-the-task programs that handle arrays. So I had looked into automated way to read data from Excel sheet into AutoIt array. Native way AutoIt has bundled UDF for work with Excel. It is very easy to use and gets work done in just a few lines of code. Reading sheet of data into array would be like: #include <Excel.au3> $oExcel = _ExcelBookOpen("fileName.xls") _ExcelSheetActivate($oExcel,"sheetName") $result=_ExcelReadSheetToArray($oExcel) _ExcelBookClose($oExcel) Open book, open sheet, get data. Straightforward but in reality it can be very slow. For sheets with tens of thousands rows it can take well over minute (or few). Workaround I had tried to work around it and turns out simply copying sheet into clipboard and processing from there into array takes much less time (at the price of writing some code). It is broken into several functions. Func _StringCount($string, $substring) Local $i, $count = 0 For $i = 1 To StringLen($string) If StringMid($string, $i, StringLen($substring)) = $substring Then $count = $count + 1 EndIf Next Return $count EndFunc This one I had simply looked up on AutoIt forums. It counts number of string occurrences in another string. Used later to determine number columns by counting delimiter (TAB) that Excel inserts into table when it is copied to clipboard. Func ExcelSheetToClip($excel, $sheet) _ExcelSheetActivate($excel, $sheet) ClipPut("") Send("^{HOME}^a^c") Do Sleep(100) Until ClipGet() Return ClipGet() EndFunc Function automates getting sheet into clipboard. Takes Excel object and sheet name for parameters and then: - switches to sheet; - clears clipboard (I had Excel throwing up occasional error otherwise); - sends series of hotkeys: - Ctrl+Home to go on first cell and clear selection; - Ctrl+A to select all, Excel will ignore whitespace; - Ctrl+C to copy it; - waits for data to properly get in clipboard; - returns that data. Func String2DSplit($string,$rowDelimiter=@CRLF,$columnDelimiter=" ") $lines = StringSplit(StringStripWS($string, 3), $rowDelimiter, 1) $columnsNum = _StringCount($lines[1], $columnDelimiter) + 1 Dim $result[$lines[0]][$columnsNum] = [[0]] For $i = 1 To $lines[0] $columns = StringSplit($lines[$i], $columnDelimiter) For $j = 1 To $columns[0] $result[$i - 1][$j - 1] = $columns[$j] Next Next Return $result EndFunc This one I had also picked up from forums, but reworked. It turns giant string into actual two-dimensional array: - splits string into array of lines; - counts number of delimiter occurrence in first line to determine number of columns; - defines empty array with dimension equal to amount of lines and columns; - loops through each line, splits it into values and fills large array; - returns array when done. And just a simple wrapper function to bring two main pieces together: Func ReadSheet($excel, $sheet) Return String2DSplit(ExcelSheetToClip($excel, $sheet)) EndFunc Required some additional code and plenty of polish, but resulting usage is hardly complicated: #include <Excel.au3> $oExcel = _ExcelBookOpen("fileName.xls") $result = ReadSheet($oExcel, "sheetName") _ExcelBookClose($oExcel) And about 50-60 times faster for sheets I tried it on. Overall Using native Windows paths is often more convenient and bulletproof. But for specific cases bit of specialized code can give program excellent speed boost. Script PS method also turned out useful to get data out of spoiled file Excel file (overflowing with weird embedded objects for some reason). 4 Comments Rodney # Great post. Your AutoIt forum searching ability is inspirational because you found some great code fragments. Thank you for putting the time and effort into making this post. It has helped me a lot in working with AutoIt strings… and Excel :-) Rarst # @Rodney You are welcome. :) I am not using AutoIt much lately, but documentation and forums has always been very helpful. mobin # hi, very nice function. saved me 5mins a day :) big thanks AJ # Thank you, it helped me do a summary report from Excel. I used your sample code in the link. It was a learning experience to realise that the Excel file has to be opened and closed. I didn’t need the Excel file elsewhere so I modified the ExcelSheetToClip function: Func ExcelSheetToClip($excel, $sheet) ; following statement added to open Excel $oExcel = _ExcelBookOpen($excel, 1) _ExcelSheetActivate($excel, $sheet) ClipPut(“”) Send(“^{HOME}^a^c”) Do Sleep(100) Until ClipGet() ; following statement added to close Excel _ExcelBookClose($oExcel, 0) Return ClipGet() EndFunc ;==>ExcelSheetToClip
http://www.rarst.net/code/array-from-excel/
CC-MAIN-2015-22
refinedweb
723
52.29
The Path interface is provided to Kotlin by the java.nio.file.Paths package. It represents Paths on the underlying file system and provides a number of useful utility methods for working with paths. Here is an example program followed by output and an explanation. import java.io.BufferedWriter import java.io.FileWriter import java.nio.file.Paths val belchers = "belchers.txt" fun makeBelcherFile(){ val names = listOf("Bob", "Linda", "Tina", "Gene", "Louise") BufferedWriter(FileWriter(belchers)).use { writer -> names.forEach { name -> with(writer){ write(name) newLine() } } } } fun main(args : Array<String>){ //Just make a file on the file system for demonstration purposes makeBelcherFile() //Get a reference to our example path on the disk. //In this case, we are using Paths.get() to get a reference to the current working directory //and then using the resolve() method to add the belchers.txt file to the path val belcherPath = Paths.get(System.getProperty("user.dir")).resolve(belchers) val template = "\t%-30s => %s" with(belcherPath){ println("File Information") //The fileName property returns the name of the file println(template.format("File Name", fileName)) //The root property return the the root folder of the path println(template.format("File Path Root", root)) //The parent property returns the parent folder of the file println(template.format("File Path Parent", parent)) //The nameCount returns how many items are in the path println(template.format("Name Count", nameCount)) //The subpath() method returns a portion of the path println(template.format("Subpath (0, 1)", subpath(0, 1))) //The normalize method returns items such as . or .. from the path println(template.format("Normalizing", normalize())) //True if this is an absolute path otherwise false println(template.format("Is Absolute Path?", isAbsolute)) //Convert to an absolute path if needed println(template.format("Absolute Path", toAbsolutePath())) //Check if the path starts with a path. In this example, we are using the home folder println(template.format("Starts with ${System.getProperty("user.home")}?", startsWith(System.getProperty("user.home")))) println() println("Elements of the Path") //We can print each portion of the path individually also! forEach { it -> println("\tPortion => $it") } } } Here is the output when run on my machine. File Information File Name => belchers.txt File Path Root => / File Path Parent => /Users/stonesoup/IdeaProjects/OCJAP Name Count => 5 Subpath (0, 1) => Users Normalizing => /Users/stonesoup/IdeaProjects/OCJAP/belchers.txt Is Absolute Path? => true Absolute Path => /Users/stonesoup/IdeaProjects/OCJAP/belchers.txt Starts with /Users/stonesoup? => true Elements of the Path Portion => Users Portion => stonesoup Portion => IdeaProjects Portion => OCJAP Portion => belchers.txt Explanation The program writes out a basic text file to the file system for demonstration purposes. We are going to focus on the main function. Our first task is to get a Path object that points to our belchers.txt file. We use the Paths.get() factory method and path in a path on the file system. In our example, we use the current working directory by using the System property “user.dir”. We could have also added the belchers.txt to the end of the current working directory. However, I wanted to demonstrate the resolve method that combines two paths into a single path. So we chain the resolve method to the returned Path object and add belchers.txt. The returned Path object points to the path of belchers.txt on the file system. The next part of the program demonstrates commonly used methods found on the Path interface. Line 33 prints the name of the file by using the fileName property. Next we print out the root of the path by using the root property (line 36). When we want to know the parent of a path, we can use the parent property (line 39). The Path interface has a nameCount property (line 42) that returns the number of items in a path. So if a path is /Users/stonesoup/IdeaProjects/OCJAP/belchers.txt, nameCount returns 5, one for each item between each slash (/) character. The nameCount is useful when working with the Subpath function (line 45), which accepts a start index (inclusive) and an end index (exclusive) and returns a Path object based on the indexes. Sometimes paths are abnormal paths and may have “.” or “..” characters in the path. When we want to remove such characters, we use the normalize() function (line 48) which strips out abnormal characters from the path. Depending on the work we may be doing, we may want to test if the Path is a relative path or an abosulte path. The Path interface has an isAbsolute property (line 51) for such purposes. It returns true if the path is an absolute path otherwise false. Should we wish to convert a relative path into an absolute path, we only need to call the toAbsolutePath() function (line 54) and we will get an absolute path. We can also check if a path starts with a certain path. In our example, line 57, we check if our path starts with the users home directory (user.home). It returns true or false based on the outcome. Path supports the forEach() function. Line 62 shows an example of how we can iterate through each part of the Path. The it variable holds each portion of the path and the program prints each part of the path. Common Methods We spoke about each method as it relates the program above. Here are each of the commonly used methods broken down. Paths.get(first : String, varages more : String) : Path The get() converts a String (or URI in the overloaded version) into a Path object. When we use use the varags part, the Path will use the OS name seperator. So Unix paths will have a forward slash, while Windows ones will have a backslash. val home = Paths.get(System.getProperty("user.home")) parent : Path The parent property returns a Path object that points to the parent of the current Path object. val parent = home.parent nameCount : Int The nameCount returns the number of items in the path. val count = home.nameCount subPath(beginIndex : Int, endIndex : Int) : Path The subPath method is used to return a portion of the path object. The beginIndex is inclusive while the endIndex is exclusive. val part = home.subPath(0, 2) normalize() : Path The normalize() method returns a Path object without unneeded characters. val norm = home.normalize() resolve(other : Path) : Path, resolve(other : String): Path Returns a Path object that is a combined path between the current path and the other parameter. val belchers = home.resolve("belchers.txt") isAbsolute : Boolean True if the Path is an absolute path otherwise it’s false. val absolute = home.isAbsolute startsWith(path : String) : Boolean, startsWith(path : Path) : Boolean True if the current path starts with the supplied path argument. val hasRoot = home.startsWith("/") toAbsolutePath() : Path Returns a Path object that is the aboslute path of the current Path. val abs = home.toAbsolutePath() References
https://stonesoupprogramming.com/tag/nio2/
CC-MAIN-2021-39
refinedweb
1,140
59.9
Subject: Re: [boost] Logging library From: Ivan Le Lann (ivan.lelann_at_[hidden]) Date: 2011-06-28 05:59:07 ----- . (...) > So I decided to implement such logging library. I put it in namespace > "tlog" > by now, for "Tree Logging". In my implementation hierarchical messages > are > presented in XML format, as it is some standard for tree-like data. > There are two attached files. The library itself is in "tlog.hpp" > file, and > "main.cpp" contains a sample application which is using the library > and > writes log to "tlog.xml" file. They are written in MS Visual Studio > 2008. > Log messages are written with help of 4 macros: > > TLOG_INFO( Logger, Text ) : logs > with specified text to specified logger with priority "information" > TLOG_WARNING( Logger, Text ) : logs > message with > specified text to specified logger with priority "warning" > TLOG_ERROR( Logger, Text ) : logs > with specified text to specified logger with priority "error" > TLOG_SCOPED_NODE( Logger, NodeName ) : opens xml element in > the log > file. The element will be closed at the end of scope, so there is no > need to > close it manually. > > I think that the best way to implement entering/leaving subnodes of > the log > file, is to use scopes of the code. > > Please review run result and the code, and see if it can be useful > for boost. Have you tried Boost.Log and its attributes ? Ivan Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk
https://lists.boost.org/Archives/boost/2011/06/183261.php
CC-MAIN-2021-39
refinedweb
244
68.47
System for managing development buildouts Project description. Change History 2.13.8 (2022-09-16) Support python310-315 in conditional section expressions. 2.13.7 (2022-03-31) Support python37, python38 and python39 in conditional section expressions. 2.13.6 (2021-11-25) 2.13.5 (2021-10-15) 2.13.4 (2021-03-08) 2.13.3 (2020-02-11) 2.13.2 (2019-07-03) Fixed DeprecationWarning on python 3.7: “‘U’ mode is deprecated”. 2.13.1 (2019-01-29) Documentation update for the new buildout query command. 2.13.0 (2019-01-17) Get information about the configuration with new command buildout query. 2.12.2 (2018-09-04) Upon an error, buildout exits with a non-zero exit code. This now also works when running with -D. Fixed most ‘Deprecation’ and ‘Resource’ warnings. 2.12.1 (2018-07-02) zc.buildout now explicitly requests zc.recipe.egg >=2.0.6 now. 2.12.0 (2018-07-02) 2.11.5 (2018-06-19) 2.11.4 (2018-05-14) 2.11.3 (2018-04-13) Update to use the new PyPI at. 2.11.2 (2018-03-19) Fix for the #442 issue: AttributeError on pkg_resources.SetuptoolsVersion. 2.11.1 (2018-03-01) Made upgrade check more robust. When using extensions, the improvement introduced in 2.11 could prevent buildout from restarting itself when it upgraded setuptools. 2.11.0 (2018-01-21) Installed packages are added to the working set immediately. This helps in some corner cases that occur when system packages have versions that conflict with our specified versions. 2.10.0 (2017-12-04) Setuptools 38.2.0 started supporting wheels. Through setuptools, buildout now also supports wheels! You need at least version 38.2.3 to get proper namespace support. This setuptools change interfered with buildout’s recent support for buildout.wheel, resulting in a sudden “Wheels are not supported” error message (see issue 435). Fixed by making setuptools the default, though you can still use the buildout.wheel if you want. 2.9.6 (2017-12-01) Fixed: could not install eggs when sdist file name and package name had different case. 2.9.5 (2017-09-22) Use HTTPS for PyPI’s index. PyPI redirects HTTP to HTTPS by default now so using HTTPS directly avoids the potential for that redirect being modified in flight. 2.9.4 (2017-06-20) Sort the distributions used to compute __buildout_signature__ to ensure reproducibility under Python 3 or under Python 2 when -R is used on PYTHONHASHSEED is set to random. Fixes issue 392. NOTE: This may cause existing .installed.cfg to be considered outdated and lead to parts being reinstalled spuriously under Python 2. Add support code for doctests to be able to easily measure code coverage. See issue 397. | RSS feed Download files Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
https://pypi.org/project/zc.buildout/
CC-MAIN-2022-40
refinedweb
492
71.61
Welcome to this AWS hands-on lab for Using CloudWatch for Resource Monitoring! This lab provides practical experience with creating and configuring multiple custom AWS CloudWatch dashboards and widgets. The primary focus will be on the following features within CloudWatch: 1. CloudWatch Dashboards 1. Dashboard Widgets 1. CloudWatch Metrics CloudWatch Dashboards built with custom widgets allow you to visually monitor resources and proactively take actions. After, setup a widget within the DMZ Layer dashboard for the bastion host instance, set to monitorthe CPUUtilizationmetric. - In the AWS Management Console, navigate to CloudWatch. - Select Dashboards - Choose Create dashboard (Give your dashboard a name) - Select a Line widget. - Under All Metrics > EC2 > Per-instance Metrics, enter CPUUtilizationinto the search bar. Find the bastion-host server row, select it, and then choose Create widget. - Create a CloudWatch Dashboard for the Application Layer Create a separate CloudWatch dashboard with widgets displaying metrics specific to the Application Layer. You will set up the following metrics for both instance-wordpress instances and the database instance: CPUUtilizationand NetworkIn. - In the AWS Management Console, navigate to CloudWatch. - Select Metrics - Choose Create new at the dashboard selection. Name and save it. - Select a Stacked area widget. - Under All Metrics > EC2 > Per-instance Metrics. From there find CPUUtilization, click on it, then choose Search for this only in the dropdown. - Find the instance-wordpress rows and the database row. Select them, and then choose Create widget. - Find the database row, select it, and then choose Create widget. - Repeat these steps that guided you in setting up the CPUUtilizationmetric for the instance-wordpress and database instances, but this time choose the NetworkInmetric. You will also set up the following metric for the Application Load Balancer named load-balancer: RequestCount. - In the AWS Management Console, navigate to CloudWatch. - Select Dashboards - Choose the App Layer specific dashboard. - Select Add widget - Select a Number widget. - Under All Metrics, select the ApplicationELB namespace, then Per AppELB Metrics. From there find RequestCount and find the load-balancer row, then choose Create widget.
https://acloudguru.com/hands-on-labs/using-cloudwatch-for-resource-monitoring
CC-MAIN-2021-10
refinedweb
335
51.65
Logged In: YES user_id=884175 Originator: NO Once there's nothing else to do... This is a concept I like a lot. I would love to register a listener for a given namespace that would have associated with it a deserializer and a callback routine. For example, I could register a WS-Security listener that could be called by SOAP::Lite when a WS-Security header is encountered - this could provide an automatic way of performing authentication. The callback could conceivably hijack the whole request-response by returning a SOAP Fault if an error occurred. This would also make SOAP::Lite quite extensible, and would be a core differentiator to other toolkits IMHO. Logged In: YES user_id=884175 Originator: NO Once there's nothing else to do... Log in to post a comment.
https://sourceforge.net/p/soaplite/feature-requests/14/
CC-MAIN-2017-17
refinedweb
133
55.74
Azure Storage – Hands on with Queues, Part 1 April 16, 2009 6 Comments This is what I get for wanting to understand the basics. I spent about 4 hours reverse engineering the StorageClient sample project and reconciling it against the Azure Storage Queue API. I do want to give a salute to the Azure team’s sample project. Its a great example and I have little doubt that many shops will simply adopt it as their standard client. And while I understand the need to promote the platform agnostic nature of consuming storage via its REST api, I am still a bit disappointed we’re not hearing more about an “official” .NET library for access. Before I dive in there’s a couple things I’d like to make perfectly clear. First off, I don’t have much practical experience with doing REST based calls. I’ve been fortunate enough that most of the time I have someone on the team that really enjoys doing those types of things so I’m able to dodge it. Secondly, the approach I’m going to show you is a bit more complex then just building the request via a stringbuilder but also not as flexible as the StorageClient sample project. I’ll also admit that my example is going to be very crude, and extremely basic. Just please keep in mind that the goal for this isn’t to enforce/promote best practices but to give you a straightforward example of making these rest based calls. Ok, on to business. The process of creating a rest call is actually pretty straight forward: - Construct the URI - build the appropriate HTTPWebRequest - digitally sign the request using HMACSHA256 (Message Authentication Code, Secure Hash Algorithm) - call the HTTPWebRequest.GetResponse method - close the response and release resources. Creating the Solution Start by firing up Visual Studio and creating a new “Web and Worker Cloud Service” project. I’ve named mine “QueueDemo”. And because I’m going to want to access my Azure Storage classes from both the Web and Worker roles, I’ll add a class library called “StorageDemo”. If you use the “Class Library” template, we’ll want to also add the following references: Microsoft.ServiceHosting.ServiceRuntime (Windows Azure Service Hosting namespace), and System.DataServices.Client (for accessing ADO.NET Data Services). Lastly, rename the default class to “AzureQueue”. At this point, I’m not 100% certain we need the ServiceHosting reference, but I’m adding it because we are doing an Azure application and the StorageClient sample uses it. Later I’ll play around and see if I really need it. I also left out a reference to System.Configuration. While best practices tell me to put my account information into a configuration file, I want to do a seperate blog post at a later date on configuration options in Azure, so for the moment I’m just going to hard-code my credentials. Also, our sample project will only work against development storage for now. We’ll switch this later. Now, enhance the AzureQueue class in our web role project as seen below: public class AzureQueue: Object{public static AzureQueue Create(){}} We’re going to start our hands on journey with creating a queue. We’ll extend this initial example over several more articles in the coming weeks. Generate the URI Regardless of the operation we’re performing, we need to know the URI that we’ll be using. Using the host, our account name, and a handful of optional parameters we can create two types of URI’s. For local development storage we’ll use a “path style” URI. Hosted storage uses a “host style” URI. The primary difference between the two is where the account name will end up. Path Style (development):<accountname>/<queuename> Host Style: http://<accountname>.queue.core.windows.net/<queuename> There’s also the option of appending query string parameters to these URI’s. The StorageClient sample project includes a “timeout” parameter for the queue timeout. We’ll leave that one off our example for the moment. To handle this, lets add a private string to our AzureQueue class to store the proper value for our example. Mine will look like this:private static string myURI = ""; Note that I’m leaving both the account name and queue name off so I can append them appropriately for each queue I need to create. I made it static just to keep things easy for me when I’m using this value later. We’ll also add two private static values that hold our account name and key. Since we’re access development storage, these are the same for EVERYONE. As I mentioned earlier, we’ll discuss putting these values into a configuration file and accessing them from there in another article. Next up, we’re going to add a private string to hold my QueueName, a public property that exposes it, and finally we need to enhance the class constructor so that we assign the parameter to my private value. We’re also going to add a property that generates our path style URI for us using the account and queue names. The updated class looks like this:public class AzureQueue: Object{private static string myURI = "";private static string myAccountName = "devstoreaccount1"; // same for everyoneprivate static string myAccount==";private string myQueueName = string.Empty;public string Name{get { return myQueueName.Trim(); }}public Uri URI{get { return new Uri(myURI + myAccountName + "/" + Name.Trim()); }}public AzureQueue(string QueueName): base(){myQueueName = QueueName.Trim();}public static AzureQueue Create(string QueueName){}} Create the HTTPWebRequest That takes care of setting the stage for us to execute our request. So we’ll start filling in the Create method we just added as this is where the actual execution of our REST call will happen. We’ll start this by creating our HTTPWebRequest object as follows: - create an instance of the System.Net.HttpWebRequest class using our generated/composite URI property - set the Timeout and ReadWriteTimeout property to our Timeout in Milliseconds - set the appropriate http method (put, get, etc… more in a few on this) - set the content length (which is zero for this operation) - add a header for the date/time For other Azure Storage requests, we may also have some request headers that may need to be set. But for this initial example, this is all we need. Now about the http method. Thes HTTP methods help control the type of operation we’re performing on containers, or for this example, our queue. You can find all these in the MSDN API reference, but here’s a short list of methods for queues: public static AzureQueue Create(string QueueName){bool result = false;AzureQueue tmpQueue = new AzureQueue(QueueName); // create base object// create our web requestHttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(tmpQueue.URI); // create queuerequest.Timeout = (int)TimeSpan.FromSeconds(30).TotalMilliseconds; // 30 second timeoutrequest.ReadWriteTimeout = request.Timeout; // same as other valuerequest.Method = "PUT"; // we want to create a queuerequest.ContentLength = 0;request.Headers.Add("x-ms-date", DateTime.UtcNow.ToString("R", CultureInfo.InvariantCulture)); // always use UTC date/time// return the resultreturn (result?tmpQueue: null);}} We could do a few extra operations before we call this, such as making sure the queue doesn’t already exist in storage. But you’ll see later that this isn’t always necessary. Update May 13th: I’d like to point out that in the development storage, queue names can be a mix of upper and lower case. However, when accessing hosted azure storage, upper case is not allowed. Be sure to adhere to the API rules for queue names if you plan to deploy.Oh, and don’t forget to add some using clauses for the System.Net and System.Globalization namespaces. 🙂 Helps avoid nasty red lines when compiling. Sign our request on the dotted line Ok, we have our URI, we’ve built a request object, but because we’re being nice and secure, we need to make sure we sign our request using MACSHA (Message Authentication Code, Secure Hash Algorithm – yeah, I looked it up). This occurs in two stages, canonizing the request, and computing the digital signature. If you look at the SampleStorage project, they have some excellent bits of code written that will handle the canonization for us. You can find this looking at the MessageCanonicalizer class found in the Authentication.cs file. If you like, you can just grab that code and implement it to do the work for you. However, to be more in keeping with the intent of this article, we’re going to grab a string that is shown in the Authentication Schemes API reference found on MSDN.StringToSign = VERB + “\n” + Content-MD5 + "\n" + Content-Type + "\n" + Date + "\n" + CanonicalizedHeaders + "\n" + CanonicalizedResource; The resulting code will be inserted into our Create method right above the return. Here’s what I ended up with:// create the canonized string we're going to signstring StringToSign = request.Method + "\n" + // "VERB", aka the http methodString.Empty + "\n" + // "Content-MD5", we not using MD5 on this requestrequest.ContentType + "\n" + // "Content-Type"String.Empty + "\n" + // "Date", this is a legacy value and not really needed"x-ms-date:" + request.Headers["x-ms-date"] + "\n" + // "CanonicalizedHeaders", we only have one, so we'll do it manually"/" + myAccountName + tmpQueue.URI.AbsolutePath; // "CanonicalizedResources", just storage account name and path for this request With the canonized string created, we next need to generate the MACSHA hash and attach that calculated signature to our message. This is pretty straight forward as seen below:// compute the MACSHA signaturebyte[] KeyAsByteArray = Convert.FromBase64String(myAccountKey);byte[] dataToMAC = System.Text.Encoding.UTF8.GetBytes(StringToSign)); To review this, we convert the account key private static variable and our canonized string to byte arrays. Using the keys byte array as for our hash seed, we compute the hash on the canonized string. We then add this signature to the request as a header named “Authorization”. The Queue service will then compute the hash just as we have and verify that the two values match before accepting our request. Execute the HTTPWebRequest and parse the response So we’ve created our request and created its digital signature. Now all that remains is to execute it and check our response. To do this, I’m going to borrow the code used in the StorageClient sample almost verbatim.// execute our request and process the response// (taken almost word for word from the StorageClient sample project)try{using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()){if (response.StatusCode == HttpStatusCode.Created){// as an addition we could parse the result and retrieve// queue properties at this pointresult = true;}else if (response.StatusCode == HttpStatusCode.NoContent)result = true;elseresult = false;response.Close();}}catch (WebException we){if (we.Response != null &&((HttpWebResponse)we.Response).StatusCode == HttpStatusCode.Conflict){result = true;}elseresult = false;} And there we have it, all the code necessary to generate our “create queue” request against the Azure Storage service. 🙂 I did mention above that we didn’t have to check for the pre-existance of the queue. If you look at our example, there are several options that return true. While its more obvious in the original StorageClient example, one of these is the result of a queue already existing. We could just have easily handled this differently. So the final implementation is up to you.Putting it all to work Of course all this code is worthless without some function to access it. I’ve already been wordy enough so I’ll just explain this the quick way… Go to the web role project and add 3 controls to the default.aspx page: a text box, a button, and a label. Name and position them all as you see fit. Wire up the click event of the button and inside that handler create an instance of our Azure Queue using the value entered into the text box for the queue name. Here’s the sample code I used:AzureQueue tmpQueue = AzureQueue.Create(tbQueueName.Text.Trim());if (tmpQueue != null)lblResult.Text = "Queue Created";elselblResult.Text = "Creation Failed"; If you’ve done everything correctly, you should be a confirmation message. If not, good luck troubleshooting the error. During my initial test run I kept getting a “Forbidden” response from the Azure Storage Services. Turned out it was due to two errors I had made, one on the URI and one on the canonized signature. Took about an hour to work out so I’m hoping over time I get more adept at troubleshooting these types of problems. I can also see that unless things change, its going to be difficult to support these. Ug! Next time, our intrepid code monkey ventures deeper into the Storage Jungle I had wanted to cover a bit more but this has already drug on long enough. So I’m going to delay 3 topics until my next post. So tune back in again in about a week and I’ll cover getting a list of the available queues, as well as putting and getting queue messages. All these will be based on the work I’ve started here, so I’ve uploaded a copy of my AzureQueue.cs file for you to check out. Till then! I\’ve added a small update to this article to reflect a difference I uncovered between development and hosted stroage. Namely that while development storage supports the use of upper case letters in queue names, hosted storage does not. this is awesome! I\’ve got 2 main concerns:1. static create method. makes it alot readable i guess, however at the expense of making it harder for creating a mock for it (in the context of BDD)2. Do you worry about racing conditions? i kinda wish that I could create the queue upon first request rather than onApplicationStart. And in that case there might be 2 requests coming in almost at the same time, and will cause 2 requests for creating queue. the first would succeed and the second might throw an error? do you feel the need to introduce locking as I do when calling create()? Ronald, both good questions.1) I took the static method approach because is a lazy man\’s implementation of a object factory pattern. I personally like that pattern but didn\’t want to bog down my post by creating a full factory. The real goal of the article was to strip away all the layers that are in the StorageClient sample application so that you could easily create your own solution. :)2) I\’m actually not worried about that. Given that the actual creation of the queue happens within the Azure Storage "engine", any type of cross-thread locking I were to put in place would occur two far away from the actual creation of a queue to do much good. I could make it request safe, but what if I have a web role and a worker role that both try to ensure that the queue is there at the same instance. Ultimate Azure storage needs to be the authority. In that case, the 2nd item will return a "conflict" response that my sample traps for that simply tells me that the queue already existed. For your specific implementation, you can handle it differently if you like. Hi Brent, I agree that Azure storage needs to be the authority. However, I still think it\’s not acceptable for the 2nd item to return a \’conflict\’ response. I put into more thoughts into what you build, and I guess what I have a better understanding to what I\’m trying to achieve:1. create() needs to return a newly created queue if doesn\’t exist, 2. but return an existing queue if it already exist. 3. It also needs to have a threadsafe mechanism to check whether queue has already been created or notOtherwise, let\’s imagine how your class is going to be used without them:1 public void run(string msg)2 {3 // we can put this in a static variable but will introduce more complexities4 // in multiple threads. so let\’s not do that for now.5 AzureQueue q = AzureQueue.Get("testQueue");6 7 if (!isQueueFound(q))8 {9 AzureQueue.Create("testQueue");10 }11 12 q.AddToQueue(msg);13}the method is ran by 2 different users nearly at the same time.user 1 hits line 9. azure storage is being createduser 2 hits line 5. azure storage is not ready yet return QueueNotFound(404)user 1 hits line 12. azure storage is created. successfully add msg to queueuser 2 hits line 9. azure storage creation is declined. QueueAlreadyExist(404)user 2 hits line 12. nullreference exception IMHO You\’ve made a solution that\’s more difficult then it needs to be and subsequently creates the very situation you\’re trying to avoid. You also still haven\’t addressed that fact that even if one application has thread safe management of the queue, what happens when two applications are both trying to access the queue service?A call to the create method I spec\’d out will return an object regardless of it it had to create it or it already existed. Your test of \’does it exist\’ does not add any value given this scenario. If you were trying to save the create call (when the queue exists), you\’ve only replaced it with a different call that will have a potentially larger return result.simply handle the \’already exists\’ scenario and don\’t focus on trying to check for its existance. Pingback: Writing to an Azure Storage Queue from a Micro Framework device | devMobile's blog
https://brentdacodemonkey.wordpress.com/2009/04/16/azure-storage-%E2%80%93-hands-on-with-queues-part-1/
CC-MAIN-2017-22
refinedweb
2,935
64
I want single random document from mongoDB collection. Now my mongoDB collection contains more then 1 billion collections. How to get single random document from that collection ? Add an additional column named random to your collection and make that the value in it is between 0 to 1. You can assign random floating points between 0 to 1 into this column for each record via [random.random() for _ in range(0, 10)]. Then:- import random collection = mongodb["collection_name"] rand = random.random() # rand will be a floating point between 0 to 1. random_record = collection.find_one({ 'random' => { '$gte' => rand } }) MongoDB will have its native implementation in due course. Filed feature here - Not yet implemented at time of writing.
https://codedump.io/share/ZSBff7s1bQ6k/1/how-to-get-random-single-document-from-1-billion-documents-in-mongodb-using-python
CC-MAIN-2017-04
refinedweb
117
60.11
Simplicity wins again. Much as there are more RESTful APIs than SOAP, XML-RPC or other protocols, JSON is gaining ground on the old favorite, XML. Last fall we said JSON is the developer's choice and therefore it's becoming the API provider's choice, too. XML still wins overall, but more new APIs use JSON than XML. Of APIs we've seen in 2011, 20% only use JSON, meaning 1 in 5 are saying goodbye to XML. JSON's simplicity means easy parsing into most languages, which XML can make a chore . It's especially easy to interpret JSON in JavaScript because it is JavaScript. When APIs support JSONP, developers can make calls to APIs directly from the browser, when appropriate. JSON, without opening and closing tags, is lighter weight, which both developers and providers appreciate. There also isn't the overhead of namespaces and schemas The trend in our API directory is quite apparent: XML is on the decline. But is that a good thing? Enterprises may prefer XML because they have the tools in place to support it. Also, much of the reason XML is complex is that it's trying to solve complex problems of data interchange by providing a meta language to describe the data. As JSON gains wider adoption, it will face some of the same issues XML tackled over the last decade. The JSON Schema project is one example of standardization happening within JSON. Will developers continue to choose a more complex JSON? Will providers return to XML for the tools it has to support complexity? [...] Web APIs verabschieden sich von XML (pfleidi,Felix) [...] I definitely prefer JSON. It's generally simpler, which is great from the programmer's perspective. There seems to be a by-product of its simplicity in that it seems less likely to be wrong/invalid, which isn't always the case with XML. [...] a enterprise consultant. JSON is where it’s at. It’s new. It’s cool. Why even bother with stupid old XML. JSON is just plain better. [...] I love JSON because it's way easier to design documents in and to parse. Also, libraries for working with JSON (in general) seem to be better designed and easier to use. There may be a bit of a skew to this as well. A new project to use a new technology on an old problem doesn't negate an existing project that uses the old technology on the old problem. Someone wanting to address it with XML will latch onto an existing project while someone wanting JSON will have to start a new project. I do find it funny how these technologies are new, old, simple, and overcomplicated, depending on who's talking. It hasn't been five years since I've seen XML billed as the new, simple way to do everything and watched Microsoft, Apple and everyone else shove malformed XML into every nook and cranny of their applications, with particular zeal in putting it where it didn't belong. Now JSON is new and simple and XML is old and complex, yet if you solve the same problem with each, they rise to the same level of complexity, and XML is about 3 years older than JSON, it was just more quickly adopted because of its SGML roots. In short, this is classic Developer's New Toy syndrome. Nothing better or worse inherently to the technology. No time savings that stand out on balance when all things are considered. No logic to how it's applied over the alternative. But it's visually more like what the vocal crowd is working with now, so it's "simpler", and anyone who points out the problems with Javascript that it inherits is a curmudgeon. Neither XML nor JSON is appropriate for what they're mostly used for. They both claim to be human readable, but the average user is just as lost looking at them as they are a hex editor's screen. I can still encode, transmit and decode CSV faster than both, and write a parser in half the time. And for what reason are we making "human readable" this data that is sent between computers, never to be read by human eyes? If you're hand-coding XML/JSON or reading it, you either are playing around for your own amusement, or you're debugging, which could just as easily use a tool. The only reason 90% of developers use XML or JSON is because the tool they use or the services they connect to require it. I think they both have their places. As a previous commenter noted, XML is very suitable for complex data interchanges whereas json is not so suitable for those situations. On the other hand, XML is WAY overkill if all you need to do is pass some poco's around from client to server and vice versa. The overhead of parsing said XML into the poco is a barrier enough and that's without taking into account all the complexities of XML, namespaces, validation and such. Json is a simple eval way from hydrating poco's passed across the wire. JSON is not expressive at all; not to anybody but a developer and it lacks a means to encapsulate, describe and document meta data on a file system. When and if it is made to try to do so it will be even worse than XML. It's not a matter of preference, it's a matter of right tool for the job. For APIs JSON makes sense, for mixed content XML makes sense. For API that serve mixed content - shaky waters but you are probably better off with XML? [...] at hand is the evolution of the web. APIs are available for so many social applications now and those applications are moving towards JSON as the data format. There is also a very good reason for this. Many applications are focused on [...] [...] The company also added JSON as a response format, as so many other APIs have lately. Unlike the APIs ditching XML, Quova is keeping the XML format and expanding developer options. Also, the company added a [...] I'm 43 and I prefer JSON, so I'm not sure age has much to do with it. Perhaps it's a MS / corporate IT view vs a web view? XML particularly in SOAP form just becomes over verbose for me, then you get into the whole discussion about when to use attributes and when to use elements and often have to deal with others choices, JSON doesn't seem to have that issue. JSON and XML do very different things even though they are both equally expressive when used at a structural level (XML does allow markup, and JSON is better for unnamed stuff). For instance, in one of my systems, the config and some templating are in XML, while JSON moves the data back and forth between the client and server. That plays to the strength of each. I don't think XML is dying, but it was getting over used there for a while... Paul. Stewart made an interesting point about descriptors (wsdl). But I guess that's too corporate to be cool and hype. There are other advantages of XML as pointed by other people in here. JSON has its own advantages too, which everybody seem to be talking about at the moment for some reason. The title of this blog post doesn't resource to a good choice of words. "Goodbye XML", as if the two technologies would be two absolute competitors. That doesn't make sense. Their purposes overlap a great deal, no doubt, but they are still distinct in many aspects. See you within 2 years or so for the "goodbye JSON" festival, when all the cool kids have moved to some other format. Once JSON schemas become more commonplace, then I reckon XML APIs will start to drop in popularity. XML is way too verbose, particularly when it's meant for computer consumption. [...] servers and browsers and between independent, cooperating web pages. It’s increasingly the format of choice for website [...] [...] between servers and browsers and between independent, cooperating web pages. It’s increasingly the format of choice for website [...] [...] at hand is the evolution of the web. APIs are available for so many social applications now and those applications are moving towards JSON as the data format. There is also a very good reason for this. Many applications are focused on [...] What is there to be so giddy about? The fact that there are less options to work with? Does the fact that Facebook and Google ONLY return JSON really affect the world at large? No. I'm an advocate of options...the more the better. I guess what I'm trying to say is let the JSON fan-boys use JSON, but keep XML as an option (like the grown ups: YDN, Microsoft, all Govt Open Data APIs, etc. [...] their API.  XML was the format of choice in the original iteration.  This is yet another sign of JSON’s wide acceptance as a standard in the API [...] [...] is popular, at least when it comes to API data formats. Of the new APIs we added to our directory, one in five supports only JSON. But how many support JSONP, which allows developers to load data directly on the client side no [...] [...] to the modern API, it only returns JSON and has an option for a callback function, so you can integrate directly into your JavaScript [...] [...] is embracing the trend where 1 in 5 new APIs do not support XML. The trend is playing out, appropriately enough, with Twitter’s endpoint for accessing global [...] It will be interesting to see how the battle between JSON and XML will affect the delivery of the Smartphone services, I noticed twitter and Amazon have migrated their API's from xml to json as well. ..and yet on the other hand I have to disagree with James in the previous comment. XML is blindingly obvious to read, even for humans. XML is no more or less likely to be wrong, unless while coding you're susceptible to bouts of typing "I hate XML" at random points. Either your code is correct or it's not, regardless of output format. What would be interesting is seeing if there's a correlation developer age and preferred choice of output format. Maybe the young 'uns prefer JSON ? I think one needs to question where these results come from. I suspect there's a huge number of APIs used internally in organisations and products that are not exposed publicly, and I'm willing to bet that a large proportion of these are XML / SOAP based. There are many advantages of JSON in a RESTful style, but there are many APIs that do use JSON and do not follow a RESTful approach (not necessarily a bad thing, just an inconsistency). Also JSON does little to enforce a contract in terms of the data types used. On a similar note, XML based web services with exposed WSDL documents present an excellent standardised interface which developers can look at for an impression of the features available and use automated tools to test and generate code from the web service. It is very much up to the developer of a JSON / RESTful API to document how it should be used and the format of the interaction with the API. For me, the most important feature of XML based services is WSDL (and the ability to generate it from the code that most platforms have). In my view WSDL essentially documents the web service itself. Perhaps WSDL with REST will become more popular in the future? I think it is indisputable that JSON reduces the barrier of entry for programs running on less powerful mobile platforms or written for environments which do not have feature rich and easy to use XML processing libraries readily available. While XML may be overkill for for exchanging simple structured data, it has lots of useful features for creating more complex resource representations. I would not write off XML yet. [...] increasingly at the expense of SOAP. More than 55% of those same APIs support JSON output, with 20% opting not to offer XML at all. Platforms that support modern protocols, formats and outputs enable developers to build great [...] XML is not at all overkill. It's by far the easiest to implement, to this day I can't find what on earth json is. @hadron: Whu? Why would you need anything as complex as XPath for JSON? var jsonObj = { "foo": "bar", "arr": [0, 1, 2, 3, 4, 5], "obj": { "hello": "world", "val": true } }; jsonObj.foo => "bar" jsonObj.arr[3] => 3 jsonObj.obj.hello => "world" In JSON, there is only one tree where children are indexed by strings (objects) or implicitly by numbers (arrays). XML has some serious advantages, since you can easily mix-and-match XML documents using XML technologies that are ubiquitous. We have yet to develop industry-grade variants of XPath, XSL, and so forth for JSON. As those replacement technologies appear, the need for XML will dwindle accordingly, and it will settle into the niches it SHOULD have been used in. Ten years later, the same will happen to JSON, as the "me too" craze slowly realizes JSON it just as much of a pain in the ass and is largely reinventing wheels. At the very least, you could quote the sources for your information. Where are you compiling these stats from? You mention the "APIs we've seen", but where have you seen these APIs? The stats come from our own API directory, which now has over 3,500 APIs. I've updated the post with a link and to make it clear where the data is coming from. [...] with many new APIs we see, Google Plus returns only JSON, not XML. Also interesting, OAuth 2.0 is already supported. Currently it appears that authenticating the [...] @Andy Davies I'm 28 and I prefer XML, so yes you're right, age is not really a factor just a matter of personal preference. @Tool Yes, I've done that with both JavaScript and Flash and its really not that bad. SOAP sucks in alot of ways, yes, but has a few useful if not redeeming features. Can you point a tool at a JSON endpoint and magically get runnable code to implement it? Not yet... so mainly WSDL makes SOAP usable, which Stewart Sims already mentioned. Other benefits are WS-security and some (but definitely not all) of the WS-* standards. Obviously I wouldn't want to call SOAP from the browser for huge amounts of data but it definitely is useful in some cases, like synchronous requests for mission-critical data submissions or asynchronous background processes (WebWorkers in HTML5 will make this much more pratical since we won't have to wait in the UI at all for data to be passed back and forth). Obviously it makes sense to learn how to work with both, since each have their valid use cases. I prefer JSON for some specialized tasks such as frequent bursty-data directly to a web app, while I prefer XML overall for most other cases but its main use cases for me are in use for application configurations, deployment, validation of data and any situations where strict typing is useful (i.e. passing a DateTime object, which can have almost an infinite number of serializations in JSON but with XML just one is valid using XML Schema's dateTime, and how to format it is specified by a global panel of super geeks lead by W3C, including the founder of the web Tim Berners-Lee). Time will tell what the future holds but take a look at the Linked Open Data (LOD) movement which has largely gone on off ProgrammableWeb's radar. The Linked Data cloud is exploding, mostly with RDF/XML data: If you tally up the total amount of data in the many XML variations out there, I'm sure it eclipses JSON. HTML itself is XML when its well-formed, so if people would just write bloody valid code the entire web would be a data graph not just separate unrelated documents... but that's another story! Last but not least lets not forget Semantics though. With namespaces, we can differentiate between types of data and instead of just providing textual descriptions of something we can actually programmatically describe an instance of a real identifiable thing, indexed by a URI and referenced against an Ontology or other clear vocabulary. The power of this is immense and if it wasn't important I don't think the creator of the platform upon which we discuss this topic right now would invest so much of his and MIT's time and research energies into it. Also, efforts like RDF/JSON and JSON schema would not exist either. I've worked on projects where they wanted to use SOAP Web Services or RDF/XML Semantic Web markup and define many complex XML formats, just to accomplish a simple task (to say they did it "semantically") that could have been done in JSON. Likewise, I've worked with some clients who insisted on using JSON when the data they were working with was so complex it took way too many nested structures to model it properly so that the "dotted" access would make it intuitive to parse. Going forward, I just hope people can make the right call on which technology works best for a given problem and leave their XML and JSON baggage at the door. Json can be mapped to most dynamic languages' data structures whereas XML needs extremely complicated libraries and nasty memory requirements, any practical and reasonable person would choose the first. XML/SOAP is a monster created to cash-milk the enterprise and governments, I have seen big companies pay $1000/10000 for each stupid SOAP webservice. Facebook have also replaced xml with JSON for some of their web service api's as well which should improve site functionality even further and probably senda asignal to others to do likewise. [...] you to look somewhere else. Like maybe the current trends in web development. As of mid 2011, 20% of the API’s were using strictly JSON. This may not seem that high but when you consider this is up from less than 5% only 3 years prior [...] Ever tried calling a SOAP service directly from the browser? This is why JSON is popular, it's a simple as that. All this other talk is just people chattering to hear themselves, no? I’ve worked on projects where they wanted to use SOAP Web Services or RDF/XML Semantic Web markup and define many complex XML formats, just to accomplish a simple task (to say they did it “semanticallyâ€) that could have been done in JSON. Likewise, I’ve worked with some clients who insisted on using JSON when the data they were working with was so complex it took way too many nested structures to model it properly so that the “dotted†access would make it intuitive to parse. I have used them both, and I have arguements on both, it's based on perspective not age, i'm 22. [...] you to look somewhere else. Like maybe the current trends in web development. As of mid 2011, 20% of the API’s were using strictly JSON. This may not seem that high but when you consider this is up from less than 5% only 3 years prior [...] [...] is the current format we send data to Solr to be indexed in, but as Web APIs did previously –- weÂ’re going to challenge its verboseness as we ruthlessly hunt down [...] mailbait.info makes heavy use of json. it was a perfect fit for light server side hosting requirements. cehck it out. [...] rapidly moving towards a predominantly mobile desktop metaphor based on JSON, HTML5 and Javascript, there seems no room for old-style ‘enterprisey’ XML in a future that is rushing towards [...] [...] to it, because of its simple interface and streamlined results. Even the developer preference for JSON over XML hasn’t tempered interest in a Google weather [...] [...] in the decade, JSON came on quickly. In 2011, Programmable­Web reported that one new API in five supported [...] [...] JSON has been apparent for some time. Previously we’ve pointed out that 1 in 5 new APIs were choosing JSON over XML. The trend has continued, with an even greater percentage of APIs saying goodbye to XML. [...]
http://www.programmableweb.com/comment/38222
CC-MAIN-2016-18
refinedweb
3,452
70.84
Migrating a Windows Phone 7 app to JavaScript Migrating a Windows Phone 7 Silverlight app to a Windows Store app using JavaScript can be either a straightforward effort or a difficult one, depending on the type of app. If you are porting a simple UI app—a utility or lightweight game—JavaScript can be an effective destination platform for Windows 8 ports from Windows Phone 7, using well-known, standard web-development technologies. If you are porting an app with significant UI components or a graphics-rich environment, you should consider a Windows Store app using C++, C#, or Visual Basic and XAML. Preparing to port a Windows Phone 7 Silverlight app to JavaScript Porting a Silverlight Windows Phone 7 app to a Windows Store app using JavaScript requires a certain level of preparation, especially if you are new to Windows 8 development. Note these considerations: - You must know HTML5, CSS3, and JavaScript. For more info, see the Create your first Windows Store app using JavaScript tutorial. - You must understand how you can use HTML5 and CSS to reconstruct the user interface of your application. You should identify the UI elements you are using from Silverlight, and review the controls provided in HTML5 and the Windows Library for JavaScript toolkit for controls analogous to those in your Silverlight app. Then review how your UI components and containers can be expressed as HTML5 pages and elements (<div>). Some controls might require using the elements provided in the Windows.UI namespace of the Windows Runtime. - You must understand how to redevelop core behaviors by using JavaScript. If the functionality you need is not available in JavaScript or the Windows Library for JavaScript , you can use a specific subset of APIs from the .NET Framework by referencing the Windows Profile run-time libraries in your application. - You must evaluate the assets and UI of your application to see if they can cleanly support a variety of screen resolutions, the majority of which are larger than the native Windows Phone 7 resolution of 800 x 480 pixels. Consider redrawing and redeveloping your assets if they are static bitmaps. Windows Store apps using JavaScript can also support vector images using the Scalable Vector Graphics (SVG) support provided by WWAHost and can scale them appropriately, although you should consider alternate aspect ratios (4:3, 16:9, and 16:10). If you are porting a game or graphics-intensive application, you must use the functionality provided in the Trident graphics model, including Canvas and SVG support, for WWAHost and Internet Explorer 10. This HTML-specific graphics model includes support for 2D and 3D transformations through W3C standards-compliant CSS behaviors. For more information, please see the W3C CSS 3D Transform draft specification. Porting a Windows Phone 7 app to JavaScript You develop a Windows Store app using JavaScript by using JavaScript, HTML5, and CSS3. So you must redesign the presentation components of your app and redevelop them as HTML documents, and you must represent all behaviors as JavaScript and CSS behaviors. Some tips: - You can express individual screens as HTML pages. Within these pages, you can express containers and discrete organizational elements with <div> elements or "frames" (connected or static). - You can implement controls using HTML control elements and input types (such as <input> or <textarea>), or through CSS3 and JavaScript (custom interactive elements). - You can perform drawing behaviors with the <canvas> element in HTML5 and JavaScript. In addition, your Windows Store app using JavaScript can take advantage of Windows-specific libraries to increase functionality and use operating system-level functions. These libraries include: - The Windows Library for JavaScript -- A toolkit of JavaScript libraries that support improved event handling and DOM query behaviors, enable new control types, and provide developer-friendly patterns for other common JavaScript behaviors. - Trident 6.0 -- An HTML- and CSS-based model for the layout and rendering of visual components that implements Canvas for the real-time drawing and manipulation of bitmap graphics, and Scalable Vector Graphics (SVG) support for vector graphics. (Trident 6.0 is the set of libraries used by Internet Explorer 10 for the display of content, and can be used to support additional graphics and rendering behaviors.) - The Windows Runtime -- OS-level functions made available to JavaScript. The following table provides a list of Silverlight APIs and their Windows Runtime counterparts (as made available to JavaScript). This table does not suggest a one-to-one mapping of functionality; one platform may have more or less functionality than its counterpart. Also note that some Windows Runtime APIs are not available to Windows Store apps using JavaScript, such as the Windows.UI.Xaml namespaces and types. This is because HTML5 provides user interface elements, behaviors, and rendering for you to use instead. You can access much of the .NET Framework Class Library by using the Windows Runtime. Silverlight functionality that is not specific to the Windows Phone platform typically has a counterpart API in the .NET Framework Class Library. For example, classes and methods available in the Silverlight version of the System and System.Diagnostics namespaces may also be available in the Windows Runtime as their .NET Framework counterparts. For the complete set of .NET Framework APIs available in Silverlight, and which may also be accessible in the Windows Profile, see the Silverlight class reference documentation. Note The Windows Profile provides a wrapper for over 12,000 of the .NET Framework APIs. However, not all of the .NET Framework APIs are currently supported. For a complete list, please refer to the Windows Profile API documentation. Note If you want to create a graphics-rich experience for your ported Windows Phone 7 Silverlight app (such as a game) and you don't want to use the XAML or JavaScript models because of the limitations of those models, consider porting it to a C++ app with DirectX. Build date: 5/10/2013
http://msdn.microsoft.com/library/windows/apps/hh465128.aspx
CC-MAIN-2013-20
refinedweb
979
53
>> k-th missing element in sorted array that finds out the k-th missing element in the given sorted array. Find the k-th number that is missing from min to max in the given unsorted array. Let's see the steps to solve the problem. - Initialise the sorted array. - Initialise two variables difference and count with k. - Iterate over the array. - If the current element is not equal to the next element. - Find the difference between the two numbers. - If the difference is greater than or equal to k, then return current element plus count. - Else subtract difference from the count. - Return -1. Example Let's see the code. #include <bits/stdc++.h> using namespace std; int findMissingNumber(int arr[], int k, int n) { int difference, count = k; for(int i = 0 ; i < n - 1; i++) { if ((arr[i] + 1) != arr[i + 1]) { difference = arr[i + 1] - arr[i] - 1; if (difference >= count) { return arr[i] + count; }else { count -= difference; } } } return -1; } int main() { int arr[] = { 1, 2, 3, 5, 10 }, n = 5; int k = 3; cout << findMissingNumber(arr, k, n) << endl; return 0; } Output If you run the above code, then you will get the following result. 7 Conclusion If you have any queries in the tutorial, mention them in the comment section. - Related Questions & Answers - k-th missing element in an unsorted array in C++ - Missing Element in Sorted Array in C++ - K-th Element of Two Sorted Arrays in C++ - Find missing element in a sorted array of consecutive numbers in Python - Find missing element in a sorted array of consecutive numbers in C++ - K’th Smallest/Largest Element in Unsorted Array in C++ - Find m-th smallest value in k sorted arrays in C++ - C# program to find K’th smallest element in a 2D array - Python program to find k'th smallest element in a 2D array - K-th Greatest Element in a Max-Heap in C++ - Find the K-th minimum element from an array concatenated M times in C++ - K’th Smallest/Largest Element using STL in C++ - K’th Least Element in a Min-Heap in C++ - Find k-th smallest element in given n ranges in C++ - Find the only missing number in a sorted array using C++ Advertisements
https://www.tutorialspoint.com/k-th-missing-element-in-sorted-array-in-cplusplus
CC-MAIN-2022-40
refinedweb
379
56.29
#include <stdio.h> #include <laptop.h> int main() { int x; printf("\t\t\t\t***********************\n"); printf("\t\t\t\t***** Welcome ********\n"); printf("\t\t\t\t**You know what to do**\n"); printf("\t\t\t\t***********************\n"); printf("Mount or Dismount: "); scanf("%d", &x); if ( x == 1) { system("truecrypt /v \Device\Harddisk0\Partition4 /l z /c n /q"); decision(); } else { system("truecrypt /d /f /q"); coverUp(); } return 0; } My problem is that when I run truecrypt.exe it pops up the password box but when inputted, it says system can not find file specified, because when I try to launch '\Device\Harddisk0\Partition', it makes it located under the directory the file is in. But in a batch, it just runs in '\Device\'. I tried using chdir() but I do not know the directory needed for a partition to be mounted. I used a system() call because you drop the executable into C:\WINDOWS, making it valid syntax. If my header is needed, which it most likely isn't because I have a problem mounting before going to my decision() function, I will post it. I do not know if I should bring this to the TC forums or here seeing as I am doing it in C.
https://www.dreamincode.net/forums/topic/120028-system-can-not-find-file-specified/
CC-MAIN-2018-30
refinedweb
211
65.76
This page explains several aspects of the software used in the Boldport project #9 “PissOff”. It also describes the commands of the maintenance mode and how you prepare the SD card for the project. See also the document “PissOff Troubleshooting” for some hints to troubleshoot the project. Table of Contents: - Language and Style - Download - The C++ Wrapper - Components and Namespaces - Peripheral Abstraction Layer - The SD Card Component - The Audio Player - The Detector Component - The Application Logic - The Maintenance Mode - Preparing a SD Card - Thank You Language and Style The software is written for the MKE04Z8VWJ4 MCU from NXP. This is a Cortex-M0+ architecture with 8KB flash memory and 1KB SRAM. It is a 32-bit processor which is using a special instruction set called “Thumb”. This instruction set is optimised for size, and has a very good code density. NXP provides a integrated development environment for this series of MCUs, called Kinetis Studio. There is an integrated assistant, called “Processor Expert”, which automatically generates code for the various peripherals in the MCU. There are several problems with the approach of this IDE. - First it generates C based code, even there is a fully functional C++ toolchain available which produces way better results. - The generated code from the “Processor Expert” is complicated and wastes resources for nothing. The 8KB flash of the MCU is easily filled with complicated processor expert code and there is no space left for the application. Therefore I reduced the use of the processor expert tool to the minimum and used a procedural C++ approach to implement the software. - I use the initialisation code from the processor expert, which setups some of the peripherals and creates the interrupt vector. - To come free from the C code, I implemented a simple C++ wrapper which the compiler optimises away. Documentation The whole software is well documented, especially the interfaces. As an experienced software developer, you should not have any problems to understand how the software works. There are also a few comments in the functions itself, but in most cases the code speaks for itself. Download The software can be downloaded from the GitHub repository. To use this code in the IDE, you have to generate the processor expert code first. The C++ Wrapper The C++ wrapper is defined in the Wrapper.h and Wrapper.cpp file. It is a simple function with a C interface, so it can be integrated into main.c. The function itself calls Application::initialize() to initialise the device, and then calls Application::main() to start the main loop of the application. This call never returns. So all code after lrMain() in main.c is not executed. Components and Namespaces The software is built using several logical components. Each component has its own namespace. There is a common namespace lr, which stands for Lucky Resistor, and nested inside of this namespace there are the component namespaces. You will see code like this: namespace lr { namespace Component { // ... function declarations ... } } This code embeds the declaration or implementation in a namespace. In this example in two namespaces, resulting in the namespace lr::Component. No Class? Classes combine a data structure with functionality. This is extremely useful if you have multiple instances of this data structure and would make sure, each function accesses the data structure of a certain instance. If you have functionality, where you know there will be only one single instance of the data structure, usually a C++ programmer will create a singleton class. It is a class which enforces there is only one instance. This instance is usually created at the start of the application and destroyed at the end. All components of this software are “singletons” because they provide an abstraction for a functionality which only can exist once. Therefore, using a singleton classes wold be a waste of resources. Ideally the compiler would optimise all overhead away, still there would be the challenge to make the right components accessible to each other. Therefore I decided to use a procedural approach with namespaces. Namespaces Namespaces are a really important language feature of C++ (and of many other languages). They allow to group names, from variables and functions, into logical “spaces”. These spaces can be nested to create a hierarchy of namespaces. They prevent name collisions: You can use simple and speaking names for variables and functions but do not have to fear name collisions. There can be a function initialize() in namespace Application and in SimpleADC without conflict. There is another feature called anonymous namespace: namespace { } If you declare a namespace without explicitly set a name, as shown in the example above, you create an anonymous namespace. The compiler automatically generates a random name, which is unique for the compiled unit. You use these usually in cpp files to elegantly prevent any linker problems if you declare internally used global variables. To address functions or variables declared in namespaces, you simple use the :: operator. It works like a file path. You only have to specify as much as required to resolve the name. The compiler starts its search from the current namespace, then goes up in the hierarchy. If you start a name with ::, then this is like an absolute filename. In this case, the compiler starts at the global namespace. Nice if you want to ensure you use a function declared in the global namespace. If you are new to namespaces, please read more about namespaces here, or search for more detailed description. Peripheral Abstraction Layer In OO design, there is a basic and very important rule: “Program to an interface, not an implementation”. In the case of MCUs, this means: Never program peripherals directly via registers, always write/use an abstraction layer. It is true in both bases for the same reasons. Abstractions will let you port, maintain and refactor your code way easier. The compiler also gets a better “understanding” of your peripheral access and can optimise your code for speed or size. The software contains the following abstractions: SimpleADC This is an abstraction to access the analog digital converter from the MCU. SimpleIO This abstraction is for accessing the IO lines of the chip. It is used to control the signal and IR LED, enable the audio amp and control the digital analog converter part of the device. SimpleSPI A simple abstraction to use the SPI bus, which is attached to the SD card. SimpleSerial This is an abstraction to use the serial line for sending and receiving data. It contains a few methods to convert numbers into a hexadecimal form. SimpleTimer An abstraction to use a timer to measure time or wait for a given amount of time. TimedInterrupt This abstraction is to control an interrupt which is triggered using a timer. It uses a simple callback mechanism, where you can register a function which is called for each interrupt. In this software it is used to blink the LED in case of an error, to control the detection mechanism while the MCU is in sleep mode and to play the sound samples in the correct intervals. You can use these simple abstractions to build an own application and you will never get in touch with the hardware details. In case you would like to port the software to a different kind of MCU, you can simple replace the implementations of these abstractions and most likely – everything else will work without any additional code changes. The SD Card Component The SD card component ( SDCard.h and SDCard.cpp) implements a very minimal access to SD cards using the SPI protocol (using the SimpleSPI abstraction). The component can read single blocks, or multiple sequential blocks from the card. It also implements the Micro Disk format as a very basic file directory. There is already a detailed documentation about the communication between the MCU and the SD card. The discussed library in this article is very similar to the used one in this software, but meanwhile a few years old. Nevertheless, the basic principle did not change, so you should easily understand how everything works. The component of this software is much simpler with less code as the one described in the article. The SD card component uses the SimpleSPI abstraction for the communication and the SimpleTimer abstraction to detect time-outs in the communication with the card. The Audio Player The audio player component plays sound files from the SD card. The player assumes the sound data is stored as uncompressed, mono, unsigned, 8-bit data on the SD card. If you call playSound() it will start reading from the given block on the SD card and play size bytes of sound. To reproduce the sound as good as possible, an interrupt is used to play the samples while there is a buffer which is filled in the main process. This guarantees an exact sample frequency, which is key for passable sound output. The precision of the sample output is more important than the bit resolution. The audio player uses the SimpleIO abstraction to enable the audio amp and output the samples to the digital analog circuit. It also uses the TimedInterrupt abstraction for the interrupt. The Detector Component The detector component encapsulates the task of detecting an obstacle in front of the device. This is done using an IR LED and an IR transistor in front of the device (the eyes of the head) which point straight forward. While this is the absolute minimum setup you can have for optical distance sensing, there are a number of disruptive influences you have to consider: - The IR transistor is sensible to visible daylight and other IR devices. - There is stray light from the side, directly from the IR LED. - There is a reflection and stray light from the room. I choose an approach which works best in most situations, which makes the device flexible in the range of used IR LEDs and IR transistors. It is a static approach which cannot deal with slowly changing stray light or day light, but it is simple enough to understand easily. For your own experiments, simple attach two probes of your oscilloscope to the two wires holding the head of the device, where the IR LED signal and the IR transistor signal is transmitted (looking to the “back side” of the head, these are the middle and right wire). Have a look at the following measurement: The yellow line is the IR LED signal. It is inverted, because the MOSFET driving the LEDs is attached at the cathode. So if the LED lights up, this signal will go to ground. In the shown measurement, if the line goes up, the IR LED is enabled. The blue line shows the measurement from the IR transistor. The middle line of the screen is 0V and each dotted line is 1V. The detector is sending eight very short light pulses, every 200ms and measures the feedback from the IR transistor. Now have a closer look to the signal and the response from the IR transistor: This is the situation in a quite dark room, the head is pointing into the empty room. You can see there is only a minimal base voltage, around 0.2V, and very small spikes from the stray light or reflection from the room. If there is an obstacle in front of the device, the measurements will look like this: You can see the strong response to the signal, up to 2.6V. You also notice, the response has a delay. This is the delay from the IR transistor, how fast it reacts to the light. This would be an ideal situation, and if this would be the only case, the detection would be similar to the detection of a key press. If I turn the light on in the room, the situation looks like this: Even without any obstacle in front of the sensor, the IR transistor passes 3.1V. You still can see the small spikes from the stray light or background reflection, but it got very subtle. So how should an algorithm look like to be able to work reliable in any condition? Measurements For each signal pulse, three measurements are made. For each measurement, 16 samples are taken from the ADC and an average value is calculated. This reduces the influence from any sampled noise. The first measurement is taken just before the IR LED is enabled. This value is recorded as signal minimum. Now, the IR LED is turned on and the routine waits a certain time to compensate for the IR transistor delay. Then the second measurement is taken. The difference between the signal minimum and this measurement is recorded. The IR LED is turned off and again, the routine waits a certain time to allow for the IR transistor delay. Now the third measurement is taken. The difference between the last and this measurement is recorded. This is repeated eight times to produce a clear signal, which is hopefully different from any other device using an IR transmitter. At the end we have the average of all recoded signal minimum values and the average of all signal differences. Normalisation The first step is to “remove” the background light from the signal. This is easily done with a normalisation. A head room value is calculated. This is the difference between the absolute possible maximum of the signal and the measured average signal minimum. Any signal will be in this range. Therefore the signal average is converted into a relative value between 0 and 1000. It is always relative to the current signal headroom. This is not perfect, because most IR transistor are not linear, but it compensates many unwanted effects. Threshold Now the normalised signal value is compared with a threshold value. If the signal exceeds this threshold, the a positive counter is increased. If the signal is below the threshold, a negative signal counter is increased. A number of positive signals trigger an alarm, while a number of negative signals will reset the positive signal counter. The threshold is determined at the start, using a short calibration phase. Here a signal threshold is set from a single measurement. Then this threshold is tested for a longer time span and if there are no false positives, this threshold is set for the device. Otherwise the threshold is increased. The Application Logic The application logic is implemented in Application.h and Application.cpp. It is a simple state machine with a loop. The application is always in one of the states defined with the State enumeration. Depending of the current state, different things are processed in the loop. The Maintenance Mode There is a maintenance mode built-in the software. If you connect a serial cable (3.3V!) and open a console and connect with 112500 baud, 8-N-1, no flow control. If you start the device, you should see a number of messages and in case of any problem an error message. To enter the maintenance mode, type main, then press enter. You should get a message that you are in the maintenance mode now. To leave the maintenance mode, type exit and press enter. There are a number of commands you can use: main: Enter the maintenance mode. exit: Exit the maintenance mode or stop any measurement. dump: Start a sensor dump output. In this mode every second a measurement is made and the current sensor value and head room is displayed in the console. You can start this mode to try different light conditions or use it to compare different LED shields or IR transistors. play: Just plays the next sound from the SD card. cali: Calibrates the sensor and shows the new threshold value and head room. info: Get the version of the firmware. rawd: Start a raw sensor dump. Here you get the raw value from the IR transistor. help: Shows a list with all commands. Preparing a SD Card You can download a prepared SD card image with a “dog barking” sound from here: Do not simple copy this file on the SD Card! Please read below! Unzip this archive and copy the disk.img exactly as you would install a Raspberry Pi operating system image to this disk. You find the process for your operating system in this article: Using Own Sounds You can easily use your own sounds. Follow these steps to prepare an image with your own sounds: - Convert your sound files to 1 channel, uncompressed, unsigned 8-bit data. The best tool to do this is sox. Download SOX here. With sox, use this command line to convert demo.wavinto demo.raw: sox demo.wav -e unsigned-integer -b 8 -c 1 -r 44.1k -S -t raw demo.raw - Repeat this until you have all files prepared. If you create a disk with multiple files, the device will cycle through your sounds. - Use the Micro Disk tool to create a disk image from the converted files. Download Micro Disk here. Make sure you use very short names for the files. I recommend you use s1, s2, etc. as name. - Copy the disk image to the SD card as described above. Thank You I hope you enjoyed reading all the details about the software of the PissOff project. Subscribe to this blog or to my Twitter feed to get updates about current and new projects. I would like to encourage you: - Play with shields on the LED and IR transistor to reduce the stray light. It will improve the detection quite a lot. - Connect a larger speaker! The amplifier can produce very loud sounds – it is only limited by the speaker. A 2W speaker will also increase the sound quality. The only requirement for the speaker is 8Ω impedance. - Make changes to the code. All what you need is a SWD programmer. I recommend the one from Segger, they are universal and you can also use them to program the Boldport Touchy project using C2. Segger has a special version of the programmer for hobbyists and students. - Implement your own (better) detection algorithm. Let me know what you could achieve with the same device and better software. - Try different/better IR LEDs and/or transistors. Have fun!
https://luckyresistor.me/projects/boldport-pissoff/
CC-MAIN-2018-26
refinedweb
3,042
65.01
AWS Key Management Service Metrics and Dimensions When you use AWS Key Management Service (AWS KMS) to import key material into a customer master key (CMK) and set it to expire, AWS KMS sends metrics and dimensions to CloudWatch. For more information, see Monitoring with Amazon CloudWatch in the AWS Key Management Service Developer Guide. AWS KMS Metrics The AWS/KMS namespace includes the following metrics. - SecondsUntilKeyMaterialExpiration This metric tracks the number of seconds remaining until imported key material expires. This metric is valid only for CMKs whose origin is EXTERNALand whose key material is or was set to expire. The most useful statistic for this metric is Minimum, which tells you the smallest amount of time remaining for all data points in the specified statistic period. The only valid unit for this metric is Seconds. Use this metric to track the amount of time that remains until your imported key material expires. When that amount of time falls below a threshold that you define, you might want to take action such as reimporting the key material with a new expiration date. You can create a CloudWatch alarm to notify you when that happens. For more information, see Creating CloudWatch Alarms to Monitor AWS KMS Metrics in the AWS Key Management Service Developer Guide. Dimensions for AWS KMS Metrics AWS KMS metrics use the AWS/KMS namespace and have only one valid dimension: KeyId. You can use this dimension to view metric data for a specific CMK or set of CMKs.
http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/kms-metricscollected.html
CC-MAIN-2017-09
refinedweb
251
51.99
On Mon, Jun 14, 2010 at 7:58 PM, Eli Zaretskii <address@hidden> wrote: >> From: Lennart Borgman <address@hidden> >> Date: Mon, 14 Jun 2010 08:11:59 +0200 >> Cc: >> >> === modified file 'src/w32proc.c' >> --- trunk/src/w32proc.c 2010-06-04 14:13:35 +0000 >> +++ patched/src/w32proc.c 2010-06-14 05:53:50 +0000 >> @@ -121,9 +121,17 @@ >> { >> char buf[1024]; >> va_list args; >> + char *buf_pos = buf; >> + >> + /* On NT add thread id */ >> +#ifdef WINDOWSNT >> + DWORD thread_id = GetCurrentThreadId (); >> + sprintf (buf_pos, "[Th%04x] ", thread_id); >> + buf_pos = buf_pos + 10; >> +#endif > > The above #ifdef is unnecessary: all the platforms that compile this > file have WINDOWSNT defined by definition. OK, I thought it maybe was used by the ms-dos port too. > Also, why do you use magic constants such as 10, instead of the value > returned by `sprintf'? Eh, because my C fu is low. Of course the return value should be used instead. >> - DebPrint (("reader_thread.SetEvent failed with %lu for fd %ld\n", >> - GetLastError (), cp->fd)); >> + DebPrint (("reader_thread.SetEvent failed with %lu for fd %ld, pid >> %ld\n", >> + GetLastError (), cp->fd, cp->pid)); > > cp->fd and cp->pid are both `int', so no need for `l' in `%ld'. Just > use `%d'. > >> +If the message is longer than 1000 chars it will be split in several >> +lines. > > Not really 1000, since you are prepending a thread ID, no? Yes, I was not very specific there. I did not think it was that important.
http://lists.gnu.org/archive/html/bug-gnu-emacs/2010-06/msg00310.html
CC-MAIN-2016-50
refinedweb
239
82.04
19 January 2011 17:03 [Source: ICIS news] By Nigel Davis ?xml:namespace> Downstream demand in Europe and elsewhere appears to have held up remarkably well in the fourth quarter, complementing the still strong demand pull from Releasing its annual financial results on Tuesday, SABIC said that fourth quarter net profits of SR5.81bn ($1.55bn) were 27% up on the fourth quarter of 2009 and 9% higher than in the third quarter of 2010. Net profits for the year were SR21.59bn from SR9.07bn. It attributed the increases to higher sales prices for most petrochemicals and plastics and increased production, however, and said little about volumes. The fourth quarter results also were under consensus and the company’s shares had lost close to 3% in value by late afternoon on Wednesday. Markets are tight, with producers in many supply chains appearing to be able to match supply to demand much more closely than they might have done before the recession. This more "just in time" approach has led to increased price volatility but generally to higher prices with it sometimes being difficult to keep production units in operation. Production capacities taken off line during the recession have not always restarted, leading to additional tightness as demand has improved. Some of these trends were noted on Tuesday by Standard & Poor’s in its annual European chemicals credit outlook and overview. The credit rating agency called the volume rebound in S&P analysts expect 2010 profits to set a record for BASF and double compared with 2009 for some sector firms, including INEOS, LANXESS and Clariant. They look at the earnings and debt profiles of 30 regional sector companies. Management action has helped most companies get to where they are today and some chemical producers have come out of the crisis surprisingly well, S&P believes. There were many more upgrades than downgrades for chemical firms last year indicating that financially, producers are in good shape. Investors see the sector differently, certainly than they did in the early years of the last decade. Doing things right, of course, helps greatly. And the focus on cash through the crisis has been of great benefit. The appetite for mergers and acquisition (M&A) activity is increasing with more of a feeling that deals can be dusted off and done in an improved operating and financial market environment. Some seven important M&A deals (larger than $40m) have been announced in the past two months. So much of the confidence in the chemicals sector, however, is linked to emerging market growth and it will be the way in which national emerging markets develop that will have the most impact on the fortunes of chemicals players in 2011. It is not surprising that 2011 chemicals growth forecasts for the sector in Europe and Upstream While regional chemicals markets reacted similarly in the downturn, the recovery is exposing the growth potential of some and the burdened maturity of others. The outlook is not all discouraging. The credit rating agency’s economists suggest that global indicators point to accelerating manufacturing activity. ($1 = SR3.75, €1 = SR4.98) For more on SAB
http://www.icis.com/Articles/2011/01/19/9427581/insight-heading-for-record-2010-chemicals-players-look-to-demand.html
CC-MAIN-2014-10
refinedweb
525
51.58
Changes: - MLuaBind uses std::tr1 extensions instead of Loki Typetraits now. - Fixed some issues for 64bit compilation, so MLuaBind works well on x64. Changes: - Major meta-programming changes. Most of Loki typelists was removed for a faster compilation. - [const] void* pointers can be transmitted via lightuserdata now. Transparently support void* pointers as return values and as parameters. - __cast_unsafe can convert void* pointers to desired class. - Minor bugfixes. Version changes: - Native support for enums (no need to convert to int type). - Constants within classes(i.e. from their namespaces) now are accessible from objects too. - Valid conversation from NULL-ptrs to nil and vice versa. - A LOT of changes in STL-binding code. - STL-binding code now work with STLPort and with containers <T*>. - Few major bugfixes: - bug in constructor's parameters verbal output leads to undefined behaviour - bug in member's operator= with constant right operand - bug with not calling policies for a implicitly created objects - Code optimization for run and compilation time. - Client-side interface code switched to char* from std::string (breaking change). Version changes: - Manual in html. - Convert<T> and BaseNoDynCast<T> adapters for classes. - Some code optimization for faster compilation - Minor bugfixes.
https://sourceforge.net/p/mluabind/news/?source=navbar
CC-MAIN-2017-04
refinedweb
196
52.66
chdir() Change the current working directory Synopsis: #include <unistd.h> int chdir( const char* path ); Arguments: - path - The new current working directory. Library: libc Use the -l c option to qcc to link against this library. This library is usually included automatically. Description: The chdir() function changes the current working directory to path, which can be relative to the current working directory or an absolute path name. Returns: Errors: - EACCES - Search permission is denied for a component of path. - ELOOP - Too many levels of symbolic links or prefixes. - ENAMETOOLONG - The path argument is longer than PATH_MAX, or a pathname component is longer than NAME_MAX. - ENOENT - The specified path doesn't exist, or path is an empty string. - ENOMEM - There wasn't enough memory to allocate a control structure. - ENOSYS - The chdir() function isn't implemented for the filesystem specified in path. - ENOTDIR - A component of path is not a directory. Examples: ; } } Classification: Caveats: There's only one current working directory per process. In a multithreaded application, any thread calling chdir() will change the current working directory for all threads in that process.
https://developer.blackberry.com/playbook/native/reference/com.qnx.doc.neutrino.lib_ref/topic/c/chdir.html
CC-MAIN-2020-40
refinedweb
182
50.23
Board index » C Language All times are UTC Thank you in advance, Shellye Clark -- Shellye T. Clark U S WEST Communications, Inc. Network & Technology Services Denver,CO -->The above expressed opinions are not those of U S WEST Inc., or any of its subsidiaries. <-- : Does anyone know if it's possible to search for executables using C? A : previous user (not willing to help) has hardcoded path names for : executables into some of his scripts and we need to find them. These : programs are embedded all over the place and it's just one big mess! We : are trying to clean all of this up as soon as possible. I would : appreciate any help given. Take a deep breath and _slowly_ explain the problem. 1) You are looking for executables. Are you looking for the physical files on a disk (or tape or whatever), or references to them in the program ? 2) What kind of system are you on ? On a UNIX machine, the simplest way to find executables is a csh script something like: #!/bin/csh # find_exe - a script to find executables foreach th ( * ) if ( -x $th ) then if ( -d $th ) then push $th find_exe popd else echo $th endif endif Warning, that's just off the top of my head, so it might need tweeking. 3) If it's the references you're after, greping/searching for them should be sufficient ? -- (no email please) always black stuart 1. SoftEng or CS Graduate Program Search 2. Need help on this programming problem ( PLEASE HELP!!!) 3. newbe/cs student, need help w/ code 4. NEED HELP WITH PRITING AN ARRAY, PLEASE PLEASE HELP 5. help: Guru needed please please please 6. Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!! 7. I need some help with this program, please!!!!!!!!!! 8. I need some help with this program, please!!!! 9. executable -> source code programs needed 10. Need Help Converting Small Borland Program Please! 11. Needed: HTML Search program 12. Need HELP with a creating a self-extracting executable file
http://computer-programming-forum.com/47-c-language/fa681b8e2690570b.htm
CC-MAIN-2020-29
refinedweb
343
76.52
What is JavaScript? is Java script and other java related queries. How to define what is JavaScript... related topic visit What is Java Script? Thanks...What is JavaScript? Hi, Sometime the students trying to know make javascript script tag fields - Java Beginners javascript script tag fields hi all, i wanted to know what is meaning of type property in javascript script tag? In most cases we write type... of tag specifies the MIME type of a script. Javascript is the default scripting javascript javascript write a java script program that would input the ff:Student Name,Average,Tuition Fee and output Total Tuition Fee. Formula: Total Tuition Fee=Tuition Fee-Discount If average is: 95-100 100% discount 90-94 25% 85-89 10 JavaScript - JavaScript Tutorial JavaScript Tutorials is one of the best Quick reference to the JavaScript. In this JavaScript reference you will find most of the things about java script... interactive user interface design. What is JavaScript? This section JavaScript - JavaScript Tutorial most of the things about java script. JavaScript tutorial is classified... email address in you JSP program using JavaScript. Java Script... design. What is JavaScript? This section will introduce What is JavaScript? - Definition What is JavaScript? - Definition  ... the basics of JavaScript and create your first JavaScript program. What...;head> <title>First Java Script</title> <script Java Script Java Script What is Java Script? How to learn Java Script? Hi Java Script is client side programming language. It runs on browser.... You can learn Java Script from our JavaScript - JavaScript Tutorial pages JavaScript for beginners . In this tutorial, you will What... is the code of JavaScript program <html> <head> <title>First Java Script</title> <script language="JavaScript"> function sayhello, Read Here Thanks javascript javascript hi sir, if i want to learn javascript. what concepts i want to know | Conditions In Java Script | Looping in JavaScript | Functions in JavaScript... | validation is JSP using JavaScript | Java Script Code of Calendar... What is JavaScript? | Writing Simple JavaScript | Statements What is difference between the java and javascript? What is difference between the java and javascript? What is the difference beteen the java and javascript? Hello Friend, Difference: 1...) Java creates applications that run in a virtual machine while JavaScript code Javascript Javascript Dear Sir, Thank You a lot for your continuos support.Again i am in need of your help. What is the javascript code to disable a link,once... javascript or css Please help me.Urgent Regards Debasis Hello Friend java script - Development process JavaScript String Functions What is the string function in JavaScript Javascript Javascript <html> <head> <script type="text/javascript"> function validateForm() { var sname=document.getElementById('spocname'); var scontact=document.getElementById('spoccontact'); if(sname.value.length javascript javascript please tell me sir,this query not validating correctly..whats wrong in this query? <HTML> <HEAD> <TITLE>validate <Script language = JavaScript> function validate(theForm) { var why=""; why javascript javascript how to create random question using javascript?  ...); Questions[0] = "What is the capital of India ?"; Questions[1] = "What is the capital of USA ?"; Questions[2] = "What is the capital of Sri Java Script Java Script I want to display an error message for the validation of email at the top of the page in red font i want to use java scripts but i dont want to use alert box what i need to do <html> <script> javascript javascript <HTML> <HEAD> <TITLE>validate <Script language = JavaScript> function validate(theForm) { var why=""; why... Hi Friend, We have modified your code: <Script language javascript javascript Hi deepak, sample example on javascript form validation <html> <script> function checkName(text) { if(isNaN(text...;/form> </html> <html> <script > function Javascript Querry Javascript Querry How to export the ms access header data to excel using java script javascript - Java Interview Questions javascript we can use tag in tag and tag, what is difference between in these 2 ways? Hi Friend, The difference is the sequence of code execution. If you placed the script tag inside the head will be execute What is JavaScript and its Features? on JavaScript. Every person has used the java script. All browsers have support...JavaScript is a scripting programming language that is used to make desktop... web browsers support JavaScript. Body: JavaScript is a programming language Java Script location.replace method Java Script location.replace method Hi, What does `Print `{<SCRIPT LANGUAGE="JavaScript"> location.replace("} & urlpop & {","BOTTOM") </SCRIPT>} this mean as this is written in an Lotus Script agent and I Javascript and flex called function defined in action script. Sometimes you may need to call a javascript... are following The java Script file are following...Javascript and flex Hi..... How do you call javascript from Flex Javascript conflict Javascript conflict Hi Sir/Mdm, Recently I developed one site... mouse leave the place, the box couldn't close itself, from the script of the source... box will close when I leave the search field, but, if I turn on this script Looping In Java Script Looping In Java Script In this article you learn the basics of JavaScript and create your first JavaScript program. What is JavaScript loop?  ... the know in advance how many times of the script should run. JavaScript loop What is a JavaScript engine? What is a JavaScript engine? What is a JavaScript engine What is eval() in JavaScript? What is eval() in JavaScript? What is eval() in JavaScript url capture in javaScript ; <title>Show all names</title> <script type="text/javascript">... is not appropriate,what I need.Below is my code,where do I need to change it: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding Popup Window Example in JavaScript in java script. Three kinds of popup windows are available in java script. these are alert confirm prompt What is JavaScript? JavaScript... Popup Window Example in JavaScript   String Number Operations in JavaScript of JavaScript and create your first JavaScript program. What is String Number...: <html> <head> <script language="JavaScript">... String Number Operations in JavaScript   Javascript - JDBC Javascript Hi, I am doing a project in healthcare domain... and javascript I want to write the event handling code in another jsp page .so... should be displayed out. I am beginner in java field so using JDBC. anybody can Java Script. Java Script. Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm What is JavaScript Variables ? What is JavaScript Variables ? Hi, My question is that What is Variable in JavaScript Programming Language. How to declare variables in JavaScript Program. Thanks javascript validation conditions through java script: min 6 characters, max 50 characters must...;title>Java Script Strong Password Validtion</title> </head>...;/script> <script language="javascript"> function java script - JSP-Servlet java script what is the use of hidden fields in java script? if a page has 3 links the first link should be enabled and others should be disabled.../javascript/ Thanks. Amardeep JavaScript Functions the JavaScript functions. What is JavaScript Function? Java script Function... click here. What is the use of JavaScript Functions: The java Script... the java script code are written inside the curly braces. Example What is javascript Arrays? What is javascript Arrays? Hi, I am learner of JavaScript. My question is that What is JavaScript Arrays ? How to Define the JavaScript arrays in you program. Please give an example show that i will try my self. Thanks javascript loop examples javascript loop examples While running a javascript loop function i am getting an error ..can any one post an example of writing loops in javascript? Looping In Java Script Java Script. Java Script. The below code is nit working in Google chrome can any one tell me the solution as soon as possible. <script type="text/javascript"> <!-- function setValue(){ var val=""; var frm jsp and java script it to a javascript variable if the value is less than 3 i want to display a alert box am getting value into javascript but alert box is not displaying what could...jsp and java script <%@taglib prefix="logic" uri="http What is properties in javascript What is properties in javascript What is properties in javascript? How can i delete the properties javascript - JavaMail javascript Hello Can u send me mail function through java and java script? Thanks in advance Hi friend, Code to help in solving the problem : import java.util.*; import javax.mail.*; import javascript string - Java Beginners javascript string what is the differenece between ' and " in javascript. Hi!Friend. here is your answer............. The only advantage I have seen in using ' to build strings is that I can do stuff javascript drag drop treeview - Ajax what i need is not just click drag script. I want to create Javascript which...javascript drag drop treeview Hello Friends, I want to create javascript treeview which display folders and files from actual location of client java script java script how will you identify whether the number entered... digit or two digit number. <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function getvalue(){ var v=document.getElementById("text JavaScript types JavaScript types What are JavaScript types UIWebView call javascript function UIWebView call javascript function Hi, I am developing web browser for iPhone and iPhone devices. I want to call the java script in my html page... say: <Script Language="JavaScript"> function sayHello(){ alert("hello Java script in servlet Java script in servlet Hi. How to use javascript inside java servlet? Thanks in advance javascript set scroll height :scroll; } JavaScript ScrollTo method <script type="text/javascript">...javascript set scroll height How to set scroll height in JavaScript... the Value of Scroll Bar in Java Swing javascript where to declare variables variables Javascript variable always be declared inside script tag...;script // declare variable or do your calculation... a variable in JavaScript. <Script Language="JavaScript"> var name, age; name Navigation with Combo box and Java Script Navigation with Combo box and Java Script  ... the basics of JavaScript and create your first JavaScript program. What is JavaScript in Navigation with Combo box? JavaScript is a 2-level combo box menu script Inform user to enable JavaScript with JavaScript , then it will not work. What option we have when this situation occurs... Document </TITLE> <body> <script type="text/javascript">...Inform user to enable JavaScript Hi sir How can we inform user javascript - Java Beginners TextBox JavaScript Validation Can you please give an example of text box validation in JavaScript? hi<html><head><script...;script language=javascript>document.write("<input type=text name=limit JavaScript and ECMAScript JavaScript and ECMAScript What?s relationship between JavaScript and ECMAScript JavaScript Variables ;script var x=12; document.write("Value of x is " + x...JavaScript Variables: Variables are like containers, which contains a value. In JavaScript variables dependent on the value, not on the datatype that means javascript cookie - Java Beginners javascript cookie hi all, i wanted to know how to set expire attribute of cookie in javascript. heres the code : document.cookie = 'cookie2... that ";" is expected. if possible then please let me know the correct statemet. and what URL validation in JavaScript to validate a URL in JavaScript. Java Script is a Scripting language. A Java Script language is a lightweight programming language. JavaScript code are written into the html page. Using Java Script we are going to validate a URL, entered recursive - Java Beginners javascript recursive Hi,Sir I have a problem with javascript recursive function This function is used to read dynamically read xml node names... unterminate the script Please help me my problem Prototypes for JavaScript Prototypes for JavaScript What's Prototypes for JavaScript java script books - Design concepts & design patterns java script books Hi All, How are u? My Question is related to java script , what is the best book for javaScript (core and the advance feature). and also send me the name of WebSites. thanks and regards JavaScript JavaScript clone JavaScript JavaScript Alert YES NO JavaScript Alert YES NO How to send an alert to a user to confirm if there request is valid or not? I wants to send the alert message in Java Script. You can use the confirm() method in Java Script. if (confirm Download Java Script Download Java Script Hi, How I can download JavaScript for my browser? Thanks Hi, You don't have to download JavaScript for browser. JavaScript support is provided in web browser. You have to enable Conditions In Java Script Conditions In Java Script  ... of JavaScript and create your first JavaScript program. About JavaScript Java... the user's browser opens the HTML file. JavaScript is different from the Java language Writing Simple Java Script Program JavaScript Program In the last lesson you learned how to create simple java script... java script example</b></p> <p><a href="javascript... Writing Simple Java Script Program   Passing a java property to a javascript variable /javascript"); %> var collegename = ''; Java Script code: alert("collegename...Passing a java property to a javascript variable i want to assign...;'; Java Script code: alert("collegename"+collegename) it show on IE Javascript array methods this: <script type="text/javascript"> var lang = new Array(); lang[0] = "C"; lang[1] = "Java"; lang[2] = ".NET"; lang[3] = "PERL"; document.write...Javascript array methods Write a Javascript code,for array element javascript javascript javascript code to dynamically add table on button click.../javascript/javascriptexamples/javascript-add-row-dynamically.shtml Javascript and PHP ;script function hello() { alert("Hello World"); } </script> <? echo "<SCRIPT LANGUAGE='javascript'>hello();<...Javascript and PHP Hello, I want to know how to call javascript form to java script conversion form to java script conversion I am using a form one more form cotain a piece of code . how to convert it to java script to function it properly...; </form> <script type="text/javascript" src=" Simple Calculator Application In Java Script Simple Calculator Application In Java Script  ... the basics of JavaScript and create your first JavaScript program. What is simple...; <html> <head> <script language="JavaScript Javascript Javascript How validations are done using javascript ,with example? and interview questions on javASCRIPT javascript query javascript query how to get javascript variable value into java variable?? i have one value in javascript variable(var name = value ) i want this name variable value in java variable (string name1 should use JavaScript? Thanks Hi, JavaScript is scripting language that runs on browser. You have to embed JavaScript in HTML page. Please see JavaScript tutorial. Thanks Java Script With Links and Images Java Script With Links and Images  ...;head> <SCRIPT LANGUAGE="JavaScript"> <... of JavaScript and create your first JavaScript program. JavaScript Images java script - Java Beginners java script how to get the variable value declared in javascript to the scriptlet of a jsp without using form Hi Friend, Try it: function hello(){ var myvar=document.getElementById("text").value document.cookie() in Java Script document.cookie() in Java Script Can you give me a simple program to set Cookie in a JSP Program using Javascript . . . and about "Argument... visit the following link: Javascript Cookies Java Script - JSP-Servlet Java Script I can't find any tutorial on JavaScript. Please help me out Hi Friend, Please visit the following link: Thanks Hi Friend, Go to this link here you JavaScript Object Oriented Feature the basics of JavaScript and create your first JavaScript program. What is Object...; <head> <Script language="JavaScript"> function...; <html> <head> <Script language="JavaScript"> javascript javascript Hi sir, This is sinduri, i want to learn javascript, so plz can u help me.how to learn javascript javascript how to set the request or session attribute in javascript head part of jsp page JavaScript array of functions in understanding a JavaScript array of functions. For this we are using Java Script... JavaScript array of functions  ... a variable hold the string. The for loop execute and run the script till variable i JavaScript Array of checkboxes that help you in understanding JavaScript Array of checkboxes. For this we are using JavaScript as Script language. In this example we make a HTML form... JavaScript Array of checkboxes   Advertisements If you enjoyed this post then why not add us on Google+? Add us to your Circles
http://www.roseindia.net/tutorialhelp/comment/95346
CC-MAIN-2015-35
refinedweb
2,681
67.25
Problem An irrational decimal fraction is created by concatenating the positive integers: \[0.123456789101112131415161718192021...\] It can be seen that the 12th digit of the fractional part is 1. If $d_n$ represents the nth digit of the fractional part, find the value of the following expression. \[d_1\times d_{10}\times d_{100}\times d_{1000}\times d_{10000}\times d_{100000}\times d_{1000000}\] Python Solution This was coded in Python using the Sage Notebook (for speed). The idea is to concatenate the string representations of increasing integers into a single string, turn that string into a list with the appropriate index range, and take the appropriate product from within that list. I use the range 400000 to form the string, guessing (correctly) that this would provide enough digits in the resulting string/list. import time start = time.time() s = "" for i in range(400000): s += str(i) d = list(s) n = prod([ZZ(d[10**i]) for i in range(7)]) elapsed = time.time() - start print "result %s found in %s seconds" % (n, elapsed) When executed, we get the following result. result 210 found in 0.369875907898 seconds
http://code.jasonbhill.com/2013/08/
CC-MAIN-2017-13
refinedweb
189
63.29
I'm using DFS to replicate a drive to an off-site server located at a data center. There's a dozen or so directories and the only file is a test .txt I created to test replication. It seems that replication works for the .txt file but not the directories as any file I put in there gets replicated but no directories. Edit: Any new directory will get replicated..not the existing ones. Am I missing something? 14 Replies Dec 27, 2010 at 11:47 UTC dfs replicate all, the old and new directory. it is rare to not replicate the directory to you. first you create a namespace, and then create a folder target. second add a folder target, and create a replication group, take care with which is the primary member, is who have the files. full mesh if you want replication in both directions. now you have the folder targets and a replication. remember that in the replication you can change the schedule, normally they replicate with active directory frs(it not replicate immediately that a change occurs). (it depends how you configure your ad replication between DCs). also depends in the quota of the staging (4096 mb standard), if it's too small it have problems to replicate big files, and if it's too big it take up much disk space. Dec 27, 2010 at 12:00 UTC take a look here it's a step by step guide. Dec 27, 2010 at 12:49 UTC It set this up just like your first post. I set the schedule adjusting for bandwidth. This is primarily for backup purposes so I didn't publish the location. Previously the files were being copied via xcopy (not my idea) so the target drive on the backup server already had the majority of the directory structure and files there. Once I set up DFS and the topology checked out I tested replication with a test file and it replicates both directions. About a week later...now all directories that were previously on the backup server via xcopy are gone but the drivespace is the same, mostly taken up by a hidden directory called DfsrPrivate. Though replication on test files/directories happen normally. Dec 27, 2010 at 3:07 UTC I figured out where the directories went. In the DfsrPrivate directory there's a folder called PreExisting which has all the files/folders but they're renamed for the DFS system (I'm assuming). Does anyone know how to undo this so I don't have to start from scratch and sync up over 250 gigs of data? Dec 28, 2010 at 3:04 UTC If memory serves you need to be logged into the server where the Pre-existing content is showing and move the files out of the pre-existing folder and rename as per the manifest file in dfsprivate HTH Des Dec 28, 2010 at 4:13 UTC I always start with a empty folder as a second folder target. if the file exist in the both directories win who have a most recent date and is copied to the other folder target. Check the event viewer, you have a DFS entry to check the errors. I make a test for what happend when you create the replication with files in the both directories, i tell you later what happend. Dec 28, 2010 at 4:24 UTC In dfsprivate folder you have the changed files to be syncronized, and the deleted files. in the replication group you can set the amount of space you want to use to it. when more space more quicly is the first syncro, but if you have a file more large than the staging maybe have problems to copy it to the other folder. Check the event viewer to know what happend. Dec 28, 2010 at 5:08 UTC I make a test for what happend when you create the replication with files in the both directories, i tell you later what happend. Ok, this is the test result: when you create the replication group you select the primary member, all the files in the other folder target are deleted previous the syncro. Make a prior xcopy does not work (Is a waste of time), because all files are deleted before the first synchronization. Dec 28, 2010 at 8:54 UTC Looks like the existing data is no good if I want to use it in the replication config. My thoughts are either to start over with an empty target drive or to copy the data to a USB drive and get it to the data center to restore into the DFS store. Would that work? Dec 28, 2010 at 9:42 UTC if you copy the data from the usb before creating the replication, it be deleted, if you copy it after creating the replication it try to copy to the original folder target. i recomend you start with an empty target. if you have 250 gb to syncronize set the staging to a big number, like 20 gb or more, but still it will take too much time to do. when finish set the staging to 4 gb again, depending in the size of the files. Dec 29, 2010 at 3:05 UTC Okay, here's the problem now. I started from scratch by deleting the DFS config, deleting all the data from the target drive, and reconfiguring everything in DFS. Now, according to DFS and the diagnostic report all is well, but nothing is getting replicated. If I create a test doc on either server it get replicated right away, but the existing data on the primary server is not getting replicated over to the target. What am I missing? Edit: Forgot to mention this has been running for 24 hours. Dec 29, 2010 at 6:31 UTC Try restarting the DFS Replication service at each server You can preload the folders on the non primary servers using USB drives etc the only issue I have found is that any additional/more recent files will be moved to the DFSPrivate\PreExisting folder and renamed as per the manifest. Are you looking for just replication or do you want the namespace functions as well Mostly I just use the replication function Dec 29, 2010 at 6:39 UTC I just want the replication. I'll try restarting the services when I get back to work in the morning. If I'm not mistaken this should just recreate the folder structure at the target location, right? The idea is that if the main file server goes down we can just make a DNS change and point users to the backup server. Dec 30, 2010 at 4:06 UTC have you any error on the event viewer on the dfs replication entry?
https://community.spiceworks.com/topic/122977-windows-2003-dfs-replication-issue
CC-MAIN-2017-22
refinedweb
1,141
69.41
import {favRestaurants} from '/lib/collections'; import {Meteor} from 'meteor/meteor'; import {check} from 'meteor/check'; export default function () { Meteor.methods({ 'favRestaurants.create' (id, name, rating, priceLevel, type) { check(id, String); check(name, String); check(rating, Number); check(priceLevel, Number); check(type, String); const createdAt = new Date(); const restaurant = {id, name, rating, priceLevel, type, createdAt}; if(check(Meteor.user()) == null){ console.log('onlye logged in users can data'); }else{ FavRestaurants.insert(restaurant); } } }); } Meteor.loggingIn(() => { console.log('check for user method'); var restId = 0; if(Meteor.user() != null){ console.log('created new collection for the user'); const FavRestaurants = new Mongo.Collection('favRestaurants' + restId); } restId++; }); Answering your first question, to allow only logged-in clients to access a method, you should use something like: if (!Meteor.userId()) { throw new Meteor.Error('403', 'Forbidden'); } Now, I see you want a collection to store favorite restaurants for each user in client side. But as I see it, there'd be only one logged in user per client, so you don't need a separate collection for each user (as the collection is in each client), you can just refer the user with it's id, and then fetch a user's favorite restaurants by a query like: FavRestaurants.find({user: Meteor.userId()}); Moreover, as the docs suggest, Meteor.loggingIn is a method which tells you if some user is in the process of logging in. What you are doing is over-riding it, which doesn't make sense. You should do something like: if (Meteor.loggingIn()) { // Do your stuff } Hope it gives you more clarity.
https://codedump.io/share/9pKpzhwSZ2js/1/create-personal-collections-for-logged-in-users
CC-MAIN-2018-26
refinedweb
260
56.66
-- #hide {- Copyright .Utils Copyright : Copyright (C) 2005 John Goerzen License : GNU LGPL, version 2.1 or above Maintainer : John Goerzen <jgoerzen@complete.org> Stability : provisional Portability: portable Internal module -- not exported directly. Everything in here is expoerted by "Database.HDBC". Please use -- and read -- "Database.HDBC" directly. Written by John Goerzen, jgoerzen\@complete.org -} module Database.HDBC.Utils where import Database.HDBC.Types import qualified Data.Map as Map import Control.Exception import Data.Char import Data.Dynamic import System.IO.Unsafe import Data.List(genericLength) {- | h f = catchDyn f h {- | Given an Exception, return Just SqlError if it was an SqlError, or Nothing otherwise. Useful with functions like catchJust. -} sqlExceptions :: Exception -> Maybe SqlError sqlExceptions e = dynExceptions e >>= fromDynamic {- |) {- | Like 'run', but take a list of Maybe Strings instead of 'SqlValue's. -} sRun :: IConnection conn => conn -> String -> [Maybe String] -> IO Integer sRun conn qry lst = run conn qry (map toSql lst) {- | Like 'execute', but take a list of Maybe Strings instead of 'SqlValue's. -} sExecute :: Statement -> [Maybe String] -> IO Integer sExecute sth lst = execute sth (map toSql lst) {- | Like 'executeMany', but take a list of Maybe Strings instead of 'SqlValue's. -} sExecuteMany :: Statement -> [[Maybe String]] -> IO () sExecuteMany sth lst = executeMany sth (map (map toSql) lst) {- | Like 'fetchRow', but return a list of Maybe Strings instead of 'SqlValue's. -} sFetchRow :: Statement -> IO (Maybe [Maybe String]) sFetchRow sth = do res <- fetchRow sth case res of Nothing -> return Nothing Just x -> return $ Just $ map fromSql x {- |. -} withTransaction :: IConnection conn => conn -> (conn -> IO a) -> IO a withTransaction conn func = do r <- try (func conn) case r of Right x -> do commit conn return x Left e -> do try (rollback conn) -- Discard any exception here throw e {- | 'finish'ed.]] fetchAllRows sth = unsafeInterleaveIO $ do row <- fetchRow sth case row of Nothing -> return [] Just x -> do remainder <- fetchAllRows sth return (x : remainder) evalAll :: [[a]] -> IO Integer evalAll inp = do r1 <- mapM (evaluate . genericLength) inp evaluate (sum r1) {- | Strict version of 'fetchAllRows'. Does not have the side-effects of 'fetchAllRows', but forces the entire result set to be buffered in memory. -} fetchAllRows' :: Statement -> IO [[SqlValue]] fetchAllRows' sth = do res <- fetchAllRows sth evalAll res return res {- | Like 'fetchAllRows', but return Maybe Strings instead of 'SqlValue's. -} sFetchAllRows :: Statement -> IO [[Maybe String]] sFetchAllRows sth = do res <- fetchAllRows sth return $ map (map fromSql) res {- | Strict version of 'sFetchAllRows'. -} sFetchAllRows' :: Statement -> IO [[Maybe String]] sFetchAllRows' sth = do res <- sFetchAllRows sth evalAll res return res {- |AL :: Statement -> IO (Maybe [(String, SqlValue)]) fetchRowAL sth = do row <- fetchRow sth case row of Nothing -> return Nothing Just r -> do names_raw <- getColumnNames sth let names = map (map toLower) names_raw return $ Just $ zip names r {- | Strict version of 'fetchRowAL' -} fetchRowAL' :: Statement -> IO (Maybe [(String, SqlValue)]) fetchRowAL' sth = do res <- fetchRowAL sth case res of Nothing -> return 0 Just x -> evaluate ((genericLength x)::Integer) return res {- | Similar to 'fetchRowAL', but return a Map instead of an association list. -} fetchRowMap :: Statement -> IO (Maybe (Map.Map String SqlValue)) fetchRowMap sth = do r <- fetchRowAL sth case r of Nothing -> return Nothing Just x -> return $ Just $ Map.fromList x {- | Strict version of 'fetchRowMap' -} fetchRowMap' :: Statement -> IO (Maybe (Map.Map String SqlValue)) fetchRowMap' sth = do res <- fetchRowMap sth case res of Nothing -> return 0 Just x -> evaluate ((genericLength (Map.toList x))::Integer) return res {- | Like 'fetchAllRows', but instead of returning a list for each row, return an association list for each row, from column name to value. See 'fetchRowAL' for more details. -} fetchAllRowsAL :: Statement -> IO [[(String, SqlValue)]] fetchAllRowsAL sth = do names_raw <- getColumnNames sth let names = map (map toLower) names_raw rows <- fetchAllRows sth return $ map (zip names) rows {- | Strict version of 'fetchAllRowsAL' -} fetchAllRowsAL' :: Statement -> IO [[(String, SqlValue)]] fetchAllRowsAL' sth = do res <- fetchAllRowsAL sth evalAll res return res {- | Like 'fetchAllRowsAL', but return a list of Maps instead of a list of association lists. -} fetchAllRowsMap :: Statement -> IO [Map.Map String SqlValue] fetchAllRowsMap sth = fetchAllRowsAL sth >>= (return . map Map.fromList) {- | Strict version of 'fetchAllRowsMap' -} fetchAllRowsMap' :: Statement -> IO [Map.Map String SqlValue] fetchAllRowsMap' sth = do res <- fetchAllRowsMap sth evaluate ((genericLength res)::Integer) return res {- | A quick way to do a query. Similar to preparing, executing, and then calling 'fetchAllRows' on a statement. See also 'quickQuery'' -} quickQuery :: IConnection conn => conn -> String -> [SqlValue] -> IO [[SqlValue]] quickQuery conn qrystr args = do sth <- prepare conn qrystr execute sth args fetchAllRows sth {- | Strict version of 'quickQuery'. -} quickQuery' :: IConnection conn => conn -> String -> [SqlValue] -> IO [[SqlValue]] quickQuery' conn qrystr args = do res <- quickQuery conn qrystr args evalAll res return res
http://hackage.haskell.org/package/HDBC-1.1.4/docs/src/Database-HDBC-Utils.html
CC-MAIN-2014-41
refinedweb
734
63.09
18 October 2017 How to beat the bookies by turning their odds against them Matthew Lloyd/Bloomberg via Getty Images THE chances of making a profit by betting on football matches, say, are extremely low in the long run. Now a trio of researchers has managed to beat the odds with a simple formula. Mathematicians had already developed bookie-beating models that attempt to predict sporting outcomes, but they are hard to devise and don’t perform consistently. So Lisandro Kaunitz at the University of Tokyo and his colleagues tried a more direct approach: using the bookmakers’ odds against them. The team studied data on nearly half a million football matches and the associated odds offered by 32 bookmakers between January 2005 and June 2015. For every game, the trio looked for odds that might yield a better return than the average offered by bookies – say, 5 to 1 versus a mean of 2 to 1. Advertisement number of games. In a simulation, their strategy made a return of 3.5 per cent – beating random bets, which resulted in a loss of 3.32 per cent. So the trio decided to try it in the real world. They developed an online tool to apply their odds-averaging formula to upcoming football matches. For five months, they placed $50 bets around 30 times a week. It worked. The team made a profit of $957.50, or an 8.5 per cent return (arxiv.org/abs/1710.02824). But the streak was cut short. Following a series of small wins, the trio were surprised to find limits imposed on their accounts, restricting how much they could bet to as little as $1.25. A spokesperson for William Hill, one of the bookmakers the team used, said such measures are sometimes used. The gambling industry has long restricted players who appear to show an edge over the house, says Mark Griffiths at Nottingham Trent University, UK. A classic example is card-counting – mentally noting the cards already played – which can help players win at blackjack. Casinos are quick to expel those who try it, but it is not illegal in the US or the UK. Griffiths compares the team’s approach to card-counting. “It’s not cheating at all – it’s using mathematics to try and beat a particular system,” he says. Online bookmakers sometimes briefly offer generous odds on certain matches to lure automated or expert betting systems into the open, says economist David Forrest at the University of Liverpool, UK. “Anyone who responds has their account closed.” The researchers may have fallen foul of this. In some cases they found they could not bet at all after signing up with certain bookies. This suggests their technique really was finding the best odds out there. But the house still always wins in the end. This article appeared in print under the headline “Beat bookies with their own odds”
https://www.newscientist.com/article/mg23631481-400-how-to-beat-the-bookies-by-turning-their-odds-against-them/
CC-MAIN-2018-47
refinedweb
487
64.61
inspired by some lisp magic of runtime edit sourcecode, I want to do it in ruby. looks like I cannot get sourcecode from method/class, is there a way to do it? I write a sample sourcecode here: def helloworld n "hello #{n}" end o = Kernel.method :helloword Kernel.define_singleton_method o.name do |n| eval o.source_code.sub('hello', 'hello world') end helloworld 'halida' #=> 'hello world halida' You can't get the string representation of a part of the code, edit it and expect Ruby to reevaluate your changes. The only way to do something near to what you want is using ParseTree to get s-expressions of the source, edit and use Ruby2Ruby to generate a string of ruby code. Them add def ... and end to the string and call eval with it. It's too hard and error-prone to be useful in a real-world situation. But I don't know any other way. Note: ParseTree only works on Ruby 1.8.
https://codedump.io/share/M4hAwJGFathR/1/how-to-get-source-code-text-in-ruby
CC-MAIN-2016-50
refinedweb
165
75.61
Self 2017.1 released in May 2017.[1].[2] Self was designed mostly by David Ungar and Randall Smith in 1986 while working at Xerox PARC. Their objective was to push forward the state of the art in object-oriented programming language research, once Smalltalk-80 was released by the labs and began to be taken seriously by the industry. They moved to Stanford University and continued work on the language, building the first working Self compiler in 1987. At that point, focus changed to attempting to bring up an entire system for Self, as opposed to just the language. The first public release was in 1990, and the next year the team moved to Sun Microsystems where they continued work on the language. Several new releases followed until falling largely dormant in 1995 with the 4.0 version. The 4.3 version was released in 2006 and ran on Mac OS X and Solaris. A new release in 2010[3], version 4.4, has been developed by a group comprising some of the original team and independent programmers and is available for Mac OS X and Linux, as are all following versions. The follow-up 4.5 was released in January 2014[4], and three years later, version 2017.1 was released in May of 2017. Self also inspired a number of languages based on its concepts. Most notable, perhaps, were NewtonScript for the Apple Newton and JavaScript used in all modern browsers. Other examples include Io, Lisaac and Agora. The IBM Tivoli Framework's distributed object system, developed in 1990, was, at the lowest level, a prototype based object system inspired by Self. Traditional class-based OO languages are based on a deep-rooted duality: For example, suppose objects of the Vehicle class have a name and the ability to perform various actions, such as drive to work and deliver construction materials. Bob's car is a particular object (instance) of the class Vehicle, with the name "Bob's car". In theory one can then send a message to Bob's car, telling it to deliver construction materials. This example shows one of the problems with this approach: Bob's car, which happens to be a sports car, is not able to carry and deliver construction materials (in any meaningful sense), but this is a capability that Vehicles are modelled to have. A more useful model arises from the use of subclassing to create specializations of Vehicle; for example Sports Car and Flatbed Truck. Only objects of the class Flatbed Truck need provide a mechanism to deliver construction materials; sports cars, which are ill-suited to that sort of work, need only drive fast. However, this deeper model requires more insight during design, insight that may only come to light as problems arise. This issue is one of the motivating factors behind prototypes. Unless one can predict with certainty what qualities a set of objects and classes will have in the distant future, one cannot design a class hierarchy properly. All too often the program would eventually need added behaviours, and sections of the system would need to be re-designed (or refactored) to break out the objects in a different way.[].[] Dynamic languages such as Smalltalk allowed for this sort of change via well-known methods in the classes; by changing the class, the objects based on it would change their behaviour. However, such changes had to be done very carefully, as other objects based on the same class might be expecting this "wrong" behavior: "wrong" is often dependent on the context. (This is one form of the fragile base class problem.) Further, in languages like C++, where subclasses can be compiled separately from superclasses, a change to a superclass can actually break precompiled subclass methods. (This is another form of the fragile base class problem, and also one form of the fragile binary interface problem.) In Self, and other prototype-based languages, the duality between classes and object instances is eliminated. Instead of having an "instance" of an object that is based on some "class", in Self one makes a copy of an existing object, and changes it. So Bob's car would be created by making a copy of an existing "Vehicle" object, and then adding the drive fast method, modelling the fact that it happens to be a Porsche 911.. Self objects are a collection of "slots". Slots are accessor methods that return values, and placing a colon after the name of a slot sets the value. For example, for a slot called "name", myPerson name returns the value in name, and myPerson name:'foo' sets it. Self, like Smalltalk, uses blocks for flow control and other duties. Methods are objects containing code in addition to slots (which they use for arguments and temporary values), and can be placed in a Self slot just like any other object: a number for example. The syntax remains the same in either case. Note that there is no distinction in Self between fields and methods: everything is a slot. Since accessing slots via messages forms the majority of the syntax in Self, many messages are sent to "self", and the "self" can be left off (hence the name). The syntax for accessing slots is similar to that of Smalltalk. Three kinds of messages are available: receiver slot_name receiver + argument receiver keyword: arg1 With: arg2 All messages return results, so the receiver (if present) and arguments can be themselves the result of other messages. Following a message by a period means Self will discard the returned value. For example: 'Hello, World!' print. This is the Self version of the hello world program. The ' syntax indicates a literal string object. Other literals include numbers, blocks and general objects. Grouping can be forced by using parentheses. In the absence of explicit grouping, the unary messages are considered to have the highest precedence followed by binary (grouping left to right) and the keywords having the lowest. The use of keywords for assignment would lead to some extra parenthesis where expressions also had keyword messages, so to avoid that Self requires that the first part of a keyword message selector start with a lowercase letter, and subsequent parts start with an uppercase letter. valid: base bottom between: ligature bottom + height and: base top / scale factor. can be parsed unambiguously, and means the same as: valid: ((base bottom) between: ((ligature bottom) + height) and: ((base top) / (scale factor))). In Smalltalk-80, the same expression would look written as: valid := self base bottom between: self ligature bottom + self height and: self base top / self scale factor. assuming base, ligature, height and scale were not instance variables of self but were, in fact, methods. Consider a slightly more complex example: labelWidget copy label: 'Hello, World!'. makes a copy of the "labelWidget" object with the copy message (no shortcut this time), then sends it a message to put "Hello, World" into the slot called "label". Now to do something with it: (desktop activeWindow) draw: (labelWidget copy label: 'Hello, World!'). In this case the (desktop activeWindow) is performed first, returning the active window from the list of windows that the desktop object knows about. Next (read inner to outer, left to right) the code we examined earlier returns the labelWidget. Finally the widget is sent into the draw slot of the active window. In theory, every Self object is a stand-alone entity. Self has neither classes nor meta-classes. Changes to a particular object do not affect any other, but in some cases it is desirable if they did. Normally an object can understand only messages corresponding to its local slots, but by having one or more slots indicating parent objects, an object can delegate any message it does not understand itself to the parent object. Any slot can be made a parent pointer by adding an asterisk as a suffix. In this way Self handles duties that would use inheritance in class-based languages. Delegation can also be used to implement features such as namespaces and lexical scoping. For example, suppose an object is defined called "bank account", that is used in a simple bookkeeping application. Usually, this object would be created with the methods inside, perhaps "deposit" and "withdraw", and any data slots needed by them. This is a prototype, which is only special in the way it is used since it also happens to be a fully functional bank account. Making a clone of this object for "Bob's account" will create a new object which starts out exactly like the prototype. In this case we have copied the slots including the methods and any data. However a more common solution is to first make a more simple object called a traits object which contains the items that one would normally associate with a class. In this example the "bank account" object would not have the deposit and withdraw method, but would have as a parent an object that did. In this way many copies of the bank account object can be made, but we can still change the behaviour of them all by changing the slots in that root object. How is this any different from a traditional class? Well consider the meaning of: myObject parent: someOtherObject. This excerpt changes the "class" of myObject at runtime by changing the value associated with the 'parent*' slot (the asterisk is part of the slot name, but not the corresponding messages). Unlike with inheritance or lexical scoping, the delegate object can be modified at runtime. Objects in Self can be modified to include additional slots. This can be done using the graphical programming environment, or with the primitive '_AddSlots:'. A primitive has the same syntax as a normal keyword message, but its name starts with the underscore character. The _AddSlots primitive should be avoided because it is a left over from early implementations. However, we will show it in the example below because it makes the code shorter. An earlier example was about refactoring a simple class called Vehicle in order to be able to differentiate the behaviour between cars and trucks. In Self one would accomplish this with something like this: _AddSlots: (| vehicle <- (|parent* = traits clonable|) |). Since the receiver of the '_AddSlots:' primitive isn't indicated, it is "self". In the case of expressions typed at the prompt, that is an object called the "lobby". The argument for '_AddSlots:' is the object whose slots will be copied over to the receiver. In this case it is a literal object with exactly one slot. The slot's name is 'vehicle' and its value is another literal object. The "<-" notation implies a second slot called 'vehicle:' which can be used to change the first slot's value. The "=" indicates a constant slot, so there is no corresponding 'parent:'. The literal object that is the initial value of 'vehicle' includes a single slot so it can understand messages related to cloning. A truly empty object, indicated as (| |) or more simply as , cannot receive any messages at all. vehicle _AddSlots: (| name <- 'automobile'|). Here the receiver is the previous object, which now will include 'name' and 'name:' slots in addition to 'parent*'. _AddSlots: (| sportsCar <- vehicle copy |). sportsCar _AddSlots: (| driveToWork = (''some code, this is a method'') |). Though previously 'vehicle' and 'sportsCar' were exactly alike, now the latter includes a new slot with a method that the original doesn't have. Methods can only be included in constant slots. _AddSlots: (| porsche911 <- sportsCar copy |). porsche911 name:'Bobs Porsche'. The new object 'porsche911' started out exactly like 'sportsCar', but the last message changed the value of its 'name' slot. Note that both still have exactly the same slots even though one of them has a different value. One feature of Self is that it is based on the same sort of virtual machine system that earlier Smalltalk systems used. That is, programs are not stand-alone entities as they are in languages such as C, but need their entire memory environment in order to run. This requires that applications be shipped in chunks of saved memory known as snapshots or images. One disadvantage of this approach is that images are sometimes large and unwieldy; however, debugging an image is often simpler than debugging traditional programs because the runtime state is easier to inspect and modify. (Interestingly, the difference between source-based and image-based development is analogous to the difference between class-based and prototypical object-oriented programming.) In addition, the environment is tailored to the rapid and continual change of the objects in the system. Refactoring a "class" design is as simple as dragging methods out of the existing ancestors into new ones. Simple tasks like test methods can be handled by making a copy, dragging the method into the copy, then changing it. Unlike traditional systems, only the changed object has the new code, and nothing has to be rebuilt in order to test it. If the method works, it can simply be dragged back into the ancestor. Self VMs achieved performance of approximately half the speed of optimised C on some benchmarks.[5] This was achieved by just-in-time compilation techniques which were pioneered and improved in Self research to make a high level language perform this well. The garbage collector for Self uses generational garbage collection which segregates objects by age. By using the memory management system to record page writes a write-barrier can be maintained. This technique gives excellent performance, although after running for some time a full garbage collection can occur, taking considerable time. The run time system selectively flattens call structures. This gives modest speedups in itself, but allows extensive caching of type information and multiple versions of code for different caller types. This removes the need to do many method lookups and permits conditional branch statements and hard-coded calls to be inserted- often giving C-like performance with no loss of generality at the language level, but on a fully garbage collected system.[6] Manage research, learning and skills at defaultLogic. Create an account using LinkedIn or facebook to manage and organize your IT knowledge. defaultLogic works like a shopping cart for information -- helping you to save, discuss and share.
http://www.defaultlogic.com/learn?s=Self_(programming_language)
CC-MAIN-2017-30
refinedweb
2,367
61.67
As the subject says: "I don't like doing this but i'm desperate"...I have analyzed my program bit by bit to try to figure out what I am doing wrong, but I haven't been able to find my mistake. It is a simple stack program, with no purpose. The problem is that I can execute the program without any problems, until I try to see the elements of my stack, then it says that there are no elements...which leads me to think that something is wrong in my push function. Here is the code that I have: I have taken out the "pop" function because it is working OK.I have taken out the "pop" function because it is working OK.PHP Code: /* Stack example */ #include <stdio.h> struct information { int number; struct information *next; }; struct information *first_element; /* points to the first element */ /* function prototypes */ void push(void); /* insert a new item into the stack */ void pop(void); /* remove an existing item from the stack */ void show_stack(void); int show_menu(void); int main() { int choice; /* since the list is empty, the first element points to null */ first_element = (struct information *) NULL; while((choice = show_menu()) != 4) { switch(choice) { case 1: push(); break; case 2: pop(); break; case 3: show_stack(); break; default: printf("Not an element\n"); break; } } } void push() { /* create a pointer to the struct for the new element */ struct information *new_element; /* obtain memory for the new element, make sure there is enough memory */ new_element = (struct information *) malloc(sizeof(struct information)); if (new_element == NULL) { printf("\nNot enough memory."); } else { /* obtain new data */ printf("\nWhat number would you like to insert? "); scanf("%d", &new_element->number); if(first_element == NULL) { /* this is the first element being stored */ first_element == new_element; new_element->next = NULL; } else { /* new_element->next will now point to the element that the first element used to point to. It ocuppies the first position */ new_element->next = first_element; first_element = new_element; } } } void show_stack() { struct information *temp; int i; /* counter */ i = 0; /* start from the beginning */ temp = first_element; while(temp != NULL) { printf("%d -> ", temp->number); i++; /* follow the -link- */ temp = temp->next; } if(i == 0) printf("\nThere are no elements in the stack."); else printf("\nThere are %d element in the stack", i); } int show_menu() { int choice; printf("\n--- Options ---\n" "1. Push\n" "2. Pop\n" "3. Show stack\n" "4. Exit\n?"); scanf("%d", &choice); return choice; } I can't find the problem with the "push" function. Please help, I am going mad. Thanks.
http://cboard.cprogramming.com/c-programming/22094-i-don't-like-doing-but-i'm-desperate.html
CC-MAIN-2014-52
refinedweb
412
67.38
titicJlttxrtir Situations and Help Wanted Not Exceeding Thrco Linos Insortod Without Charge 111HTH, MARRIAGE, DEATH AND FUNBRAL , NOTIOE8-notoxcoodlnsr3 linos Froo. Other nilrcrtl-cmenls under the minor cU'tlftal headings, one rent n ucml or seven rents a line tint In-erttoii; five cents a lino each -iibac'incut Insertion. THE 0E1TI0, FOUNDED 18G8, WHOIE NO. 7,10 I, VT ASHING TON, D. C, WEDNESDAY EVENING, MAY 13, 1891. TWO CENTS A COPY. --io CENTS A MONTH. subscription rates; . 25 Cents Por Month; $3.00 Per Year. Less Than One Cent a Day. Delivered In this fclly, Georgetown, Anacostla and Alex amltin or by mnll anywhere la tbo United Stales. ht ' - srnoiAij notioks. THWESTV PER CENT. To reduce my Immense stock of AMERICAN WATCHES, DIAMONDS, CLOCKS, JEW ICLliY mid SILVHUWAHK, I offer to tho pub lic n "-pedal dlfcount ot 50 por cent, for SPOT CASH for n SHOUT time only on the nuovo .goods. A L. SALTZSTKIN.Jtl., Manufacturing Jeweler, C03 Seventh t. n.'w. HltAlNAIM) H. WARNER, President. JOHN JOV KDSON, Vice-President. W.M. II. GURI.EY, Treasurer. WJI, U. HOMSON, Secretary. rilltUST COMPANIES. THE PRESERVATION OP PROPERTY. It has been correctly stated that tho manage ment of any estate, he ltclthorreatorperflonal, requires ns much tact and ability as Is required to accumulate It. There may ho somo differ ence of opinion about this, hut the great an noyance experienced In making Investments tind taking care of property has led largely to tho organization of trust companies. The Washington Loan and Trust Company Is building the splendid new building at the corner of Ninth and I' streets northwest. It Is built of granite and Is fireproof and has all modern conveniences. It Is Urst-claes In every particular. If you aro going to Europe this company will tnko charge of your cn'.lro es tate, glvo you a receipt for money, notes, Blocks and bonds, attend to tho collection of tiny amounts that may he due and reinvest Innds from time to time. Thochargo for so doing Is exceedingly moderate and yon are vlrtually.eavcd nil responsibility aud annoy mice. This Is of great advantage to peoplo of means. The cash capital of this corporation Is one million dollars. Open an account with It, lor IT PAYS INTEREST ON DEPOSITS. It also acts as executor, administrator, trustee, transfer agent and attends to atl fiduciary busi ness. DIRECTORS: John T. Arms, Charles IS. Ilailcy, Charles S. llaker, tames L. Harbour, II, S. Cummlngs, ,1. J. Darlington, John Jov Ednon, William 1). Gurlcy, John A. Hamilton, Albert I. Pox, ). C. Orcen, John 13. 1.arner, A. S. W Charles Ilanm, John lildout, George V. Schafor, N. H. Shea, Thos. Soracfvlllo, John A. Swope, J. S. Swormstedt, Gcorgo Truesdcll, 1). II. Warner, A. A. Wilson. L. I). Wine, S. W. Woodward, ortblngton. THE NATIONAL SAFE DEPOSIT COM PANY OP WASHINGTON. Chartered by special act of Congress January 22, IcOT. Reorganized as a TRUST COMPANY Under act of Congress October 1, 1S0O. This company "bege to announce that It has received from the Controller of tho Currency Its certificate of reorganization under tho act of Congress of October 1, 1810. As heretofore, and . for twenty-four years past, this company will rcceivo securities, ell verwnre and other valuables for safe-keeping In its lire-proof building, and will rent sates or hoxc In Its now fire and burglar-proof vaults, which havo time locks and all other modern appliances. Under and bv vlrtno of the act of Congress of October 1, lS'Jt, and the certificate of the Controller of the Currency, that It has fully complied with the law In nil respects, this company will, In addition to tho business Iieretoforc transacted by It, act as executor, ndmlulstrator, receiver, assignee nnd as com mittee or guardian or estates and will rcceivo nnd cxecuto trusts of every description com mitted to It by any court or by Individuals. All trust funds and trust Investments aro kept separuto and apart from the assets of tho company. Besides which protection the com pany lias a capital c t $1,000,000. Deposits will be received from ten cents np ward and interest will bo allowed on such de posits. Wills receipted for and kept without charge XJEN.TAMIN P. SNYDEH, President. CHAItI.ES ('. GLOVEIt, First Vice-President. JAS. M. JOHNSTON. Second Vice-President. K. PHANCIS RIGGH, Treasurer. ALBERT L. STUHTEVANT, Secretary. Directors: William E. Clork, It. Ross Perry, Lewis Clephnnc, George II. Plant, Matthew u. Emery, 12. Francis Hlggs, Charles C. Glover, Zenas O. Hobblus,, Thomas Hyde, John P. Hodgcrs, Charles A. James, Dcnjamln P. Snyder, .Tomes 51. Johnston, Albert L. Sturtovnnt, John G. Parke, Henry A.Wlllard, Andrew Wylle. AEUNDEL-ON-THE-BAY. Beautifully located on Chesapeake Bay, three-quarters of a mile south of Bay Ridge, aid., with n long water front on tho bay, high louwl and thickly wooded with some of tho grandest shado trees. Boating, bathing, fishing, crabbing and fhootlng. One and n-halt hours from Wash ington; one hour from Baltimore. A number cf llrst-class cottages aro now being creeled. Lots from $150 to $ 100, on easy terms. Plata and Information furnished by DAVID D. STONE, SIANAOEH OF TnE CHESAPEAKE AND COLUMBIA INVESTMENT CO. No. 800 F STREET NORTHWEST. JMP JIPOItTANT NOTICE TO GAS CONSUME HS. For the convenience of persons living In tho eastern and western sections of tho city, ar rangements havo been made by which thoy can pay their gas bills during banking hours at the NATIONAL CAPITAL BANK onTiin WEST END NATIONAL BANK. Bills paid otter tho 8th of each month will not bo entitled to tho discount of 25 cents por 1,000 cubic feet. W13HINGTON GASLIGHT CO. "" TUK FIRE AND HURULAH PROOF BUILDING, THE WASHINGTON SAFE DEPOSIT CO., 010 Pennsylvania avenue, Contains STOltAGE DOOMS Constructed entirely of Brlck.wlth Steel Doors. For Kent nt Minimum Kates. STEEL VAULTS Por storage ot Silver-Plate, Jewelry, and all other valuables at minimum charges. SAFE-DEPOSIT BOXES Kent for f S, $7.60, $10, and upward per year, Inspection Invited. SEOUIIK DIIY BASEMENTS AND OEL lars, ice., from a material that will never deteriorate by ago by using w It Is cheaper than brick. Au 18-Inch FOUNDATION AV.VT.t, Can be built of Potomac Blue Stono, best workmanship, for tho same cost ot nil-Inch brick wall. For heavier walk tho cost Is much less, In pioportlon. Any quantity dcllvored promptly by boat at any point on tho river front or by wagonB to any part ot tho city. Juarrlcs oxteudhig 2M miles on tho Potomac, between Aqueduct and Chain Brldgos. Bridge btoue, Block Slone for building fronts, rango und broken ashler work, Also Broken Stone, JJaeo, Binder and Granolithic. 1'uro ground htono Dust at n very low price; excellent ma terial for lawns and walks. Broken Stono from elevated hint loaded upon vessels and wagons. Tho Potomac Blue Stono was used to bullet the Catholic University, Georgetown College aud many other largo buildings In tho city: ulso for foundations ot most ot tho largo Government buildings In Washington, Onlco at Docks, trttO Water street. Box at Builders' Exchange, Telephone No. 1078. POTOMAC STONE CO, WHY NOT HAVE YOUR BHIHTS made by ono of tho most celebrated .cutters In America! Prices samo as thoso tthlrd-rate cutters charge. t. T. HALL, 803 F treat a it, BI'KCIAT. notices. TO HOME SEEKERS. TO SPECULATORS. TO INVESTORS. Lots and Villa Sites Por Sale la FORT MEYER HEIGHTS Magnificent locality. highest elevation. puiie watek. conv enient to the capital. on the military toad, adjoins foht meyku and aiilingtox, FOR A FEW WEEKS ONLY We Offer BEAUTIFUL LOTS AND VILLA SITES At Prices Hanging Prom 4Centsto 10 Cents per St. Foot. Property adjoining Is Selling nt doublo these prices. We aro offering Special Inducements to those who will build. Several handsome hoiircs contracted for to he built at once. ThcElcctrlc Hoadto pass the property will soon bo built, thus placing the residents ot the Heights within easy reach ot the city. Buy How anil Sell Again at a Hana soiiio Profit. Present Extremely Low Prices Will Last for a SHORT TIME ONLY. For Pull Paitlcul.irs, Maps, At., Call on or Address ROBINSON & LODGE, Real Estate Brokers, ATLANTIC BUILDING. Teams Always on Hand to Show Property. w OODS ii CO., BANKEHS, law p st. SOME FEATURES OF OUR BUSINESS. The rapid Increase in our business In the last six months forced ns to move Into larger nnd better appointed ofllces sooner than wo had anticipated, where with Increased room nnd our own vaults wo nre fully prepared to transact n general oaniiing imsmcs. ACCOUNTS OP Individuals, tlrnis and cor porations solicited. Wo feel confident that our methods of doing business will please our patrons. We desire to rail attention to our house, hoping that those who con template changing their bank account or opening a new ono will call nnd sco us, feeling suro that any who do so will remain with us. made and exchange drawn frco ot charge to our depos itors, investors will unu Tlivnofmnntt' with us Investments in both llllUolllllilllbi largo nnd small amounts secured by deeds of trust and real estatu. It not on hand In Him to suit wo will allow Interest on deposits until satisfac tory Investments arc found. PmirifinQinrj nf " l""o 'rllc certificates UiullllUCUuO Ul of deposit drawing Interest rate ucpcnuiiig on length ot timo they nro Issued for, thus offering capitalists and Investors a safe investment und prompt Interest. Wo pay Interest monthly, semi annually or annually as de tired. In this way we offer every legitimate, facility consist cut with good banking to those who do business with us. Special attention given them; coun-cllng and ns- Ladies. siBtiugiuom in an nusiuess transactions It desired. We (iirnUli them good, sate, conservative Invest inents, collecting Interest If desired und rcinlttlng us directed. SCClirGu DGGQS lOperccutuni-he'l'uuiso desiring them. We offer flf TnilUt nothing but tho best securl- Ul 11 llol. ties to our customers. Call In and sec us. Wo will take pleasure In showlnyoiiour In vestments at all times. If jou wish to open a bank account I! you wish to place your funds Where they will draw Interest- if you wish to make ugood Investment If yon wish exchange, on Now York, Baltimore nnd Chicago It you havu a collection to inako if you have a note to discount If you wish to raise money on collaterals call and see us. WOODS ii CO., BANKEUS, !! P street, Troffciris" IuTiTeIiT in vkn'tiiat 'the L annual meeting of the stockholders ot the National Life-Maturity Insurance. Com pany of Washington, D, C. will -bo hold at Harper's Perry, W, Vn., at Green',, Hotel, at 1 o'clock p. 111., Oil TUESDAY, MAY 111, 18111, for tho pttrposo of electing thirteen Directors to servo dm Ing tlio succeeding year and until their successors nro elected and qunlllled, and tor the transaction of such other business ns may properlv como before said ineotlng. By order of the Board ot Directors. GEO. I), EL DIIIDGE, Secretary, Washington, 1). fMay 7, imh, Forest Oien Hote II. A O. Metropolitan Branch, Tfozres-b GKLem., H&3L. G. SMITH WQRMLEY, PKOPIUETOIt, Will Open on rrvCAST 30 for the reeep tlou of guests and regular boarders. TrcviiBiont, $3 Por Day. FOHEST GLEN Is beautifully situated, high and salubrious. Tho Hotel is oleicnutly fur nished nnd tlio tnblo will bo unsurpassed, under the special catorlug of Mr. Wormloy, rKItKELEY PUHE RYE WHISKY. $1 A GALLON, $1 A QUART, 60c. A PINT, JAMES THAUP, 813 P STHEKT. BPKCIAl, NOTICK3. mm: ckitic-becohd suBscnuiEits in "the tcrtltory bounded by Eleventh and Sixteenth, Cnnil Boundary streets northwest, nro hereby notified that the undersigned havo taken charge of tho delivery, Charlc Bowman retiring from May, 1, 1SU. In cao ot the. slightest Irregularity tit delivery tho under signed would highly nppreciato notice thereof, nnd will gunrnnleo Immediate remedy, II. C. KNAPP A; CO., Crlllc-ltecnrd Olllce. p HEAT FALLS ICE COMPANY. OFFICE: Ml PENNSYLVANIA AVENUE. Wholesale nnd lletall Dcalcts In KENNEBEC 1I1VEH ICE. Supplies practically INEXHAUSTIBLE. Storage Facilities UNEOUALED. Service UNSUIIPASSED. Ico deliveries throughout the city by attcu- Hvo nnd experienced employes, Leave orders nt the olllco or with drivers of delivery wagons. A NTON LEHCII, DYEING. HCOUIIING AND DIIY CLEANING ESTABLISH. MENT, 12tO New York Avenue Northwct, Washington, D. C. Laces, Satins and all kinds ot Pine Lndies' Work a Specialty. Formerly vlHiA;Plshcr. LOOAIj WEATHER FORECAST. 1'or the District of Columbia, t.'tistcm rcnnflhautit, Xeio Jeney, Delaware awl Maryland, down's Thursday; continued low temjxrature;' north Kinds, THE DKl'ATJIEN'K. XU-VA Y'S A' irs . I Kl) rsc 1 It vx rs JX THE 1'VmHtATj Vl'J'Jt'JSS, EXECUTIVE MANSION. Kx-Scnritor'nntl non-Minister lllnlrls still In Washington urixiously awaiting Iho return of tho President. It is expected that the ex-Senator will be consoled for the China incident by being accredited to the Knipire of the Mikado. STATE DEPARTMENT. Tlio Italian Government has notilicd tho. 'Department of State that it has" desig nated Cesarc Potna, tlio Italian Vice Consul at Boston, to discharge the offices now performed at New Orleans by Consul Pasqualo Cortes TREASURY DEPARTMENT. The I'irst Xntionnl Dank of Cunonburg, Pa., lias been authorized to begin business. Capital J0O.0GO. Government receipts to-day from cus toms, (1TP,037.HI; from internal revenue, Sr.0."i.00.rl; from miscellaneous source, $28,032.11; total, $S12,31U.70. Tho Secretary of tlio Treasury has ad ,vised a New York correspondent that cigarettes, intended for use or as samples cannot bo imported in a less uuantity than 3,000 in a single package. The Government lias decided to ask the Supreme Court to review tho decision of the Circuit Court of New York as to tlio dutiable character of certain paintings on glass imported for tho use of tlio Convent of the Sacred Heart, Philadelphia. The special committee raised in the Treasury to investigate the matter of se curing new paper for the currency havo about completed their report, although it has not been made public. It is thought that the recommendation will bo to dis continue the ust! of the silk thread paper now in use and which has been so sttc- cesslully counterfeited. Tho action of the Comptroller of the Currency in appointing the Hon. It. M. Yardley as receiver of tho Keystone Hank at Philadelphia has given great satisfac tion in that city. Mr. Yardley will lake charge of tho bank on nc.xtMonday. Tho bond required of him is ?,r0,00u. The Commonwealth Title Insurancoand Trust Company will make it. Who Wn.r. Dit.vw run Pm.i: ? TlieSec retnry of tho Treasury has under advise ment a plan to carry out the provisions of section 12 of the act authorizing tlio World's Fair ICxhibition, the same having, relation to tho introduction of foreign goods free of duty when tlio samo nro in tended for exhibit. An appropriation of $20,000 was voted to make tills part of tho Exposition scheme feasible and it is prob able that a number of special agents will be appointed to proceed to Kuropo and further this part of the Kxposition work. Who theso lucky individuals will be re mains to be seen. Their names may bo announced to-day or to-morrow. A Sl'iT.i:Mi:.vr.vi:v C'tnill.Aii. Tho Tret sury Department has issued a sup plementary circular, modifying and rein forcing the Xcbecker proclamation of May 1, in reference to the distribution of fractional coin, In this new paper notice is mado that tlio original circular docs not cliango tlio negotiation for ob taining fractional coin, except to limit the deposit therefor to WOO, instead of $500, mid. that banks located in stib-trcnsurv cities must obtain their fractional coin from tlio branch olllco, rather than semi here for it. Tho further information is ventured that tho supply of dimes is short, but that such banks as are in press ing need of small change can bo sup plied with any quantity of nickels. A lliiANihNmv T.vitirK Dodok. Tho Tieasury Department olllclaU havo been made nwaro of n shrewd scheme on the part of Cuban cigarmakcrs to beat tho Tnriff bill. Section 2111, schedule F. of the McKlnley bill raises the import duty on imported cigars from $2.50 to $1.50 per pound. As soon as tho act. went into effect tho Cuban makers commenced wrapping their cigars lighter, so that u paclcago of 1,000 of tho lightly wrapped smokers would weigli less In reality than 1,000 cigars used to weigh under Mm terms of tho old act. lly this means tlio import duty was kept down to the llgurcs prescribed In tho old tariff law and tho consumers and tho Government wero both leeched. A special agent, Mr. .lohu W. Link, has been detailed to investigate this new tariff dodge, t'oxi'inxxciw or A iTii usF.rss, Secretary Foster has directed that quarterly con ferences of local appraisers of customs bo continued during the next llscal year In New York, tho tuno of meeting to bo tho third Tuetilay of July and tlio second Tuesdays of October, 1MU, January and April, 1S02. Tlio conference in July will bo attended by tlio appraisers tit New York, lloston, Philadelphia, llaltlmoro, Chicago, New Orleans aud Cleveland; tho October conference by tho appraisers- of the first three cities ami St. l.oius, Detroit, Cincinnati and San Francisco; the Jan uary equforenco by tlio nppraisera of tlio Ills! three cities and Portland, Me., Buf falo, Chicago and llaltlmoro; tho Aurll conference by tho appraisers of tho llrst three cities and San FrancUco, Detroit, bt. Lotus milt ueveinnu. Tun W.vti ox CiiiKf Mi:iiKiiTH. The Knights of Labor havo not let up in their war on Chief Meredith of tlio lluroau of Printing and Kngravlng, Tho local Knights havo been rciutorced roecnty by Messrs. Delevin and Ilnyos, associates of Master Workman Powdcrly, both of whom uro members of the oxecutivo com mittee, of tho order. These olllcials re newed tho oldchargesof drunkenness and incompenlency against Mr. Meredith and the urgency of tlicir complaint led tho Secretary of tlio Treasury to refer tho lat ter accusation to tlio special committee, who hnvo been seeking rt substitute for the currency paper. Tho chargoof intent peranco the Secretary would not entertain and that had been amply disproved. It is regarded as n significant fact that tlio Knights agree to withdraw their charges If Mr. Mercditli would agree to reinstate seven plate printers discharged on his re commendation. . WAR DEPARTMENT. ToMr.r.T Tin; PrmstunxT. The follow ing oillcers were detailed by General Itugcr to ho present at Portland, Ore., to take part in tho ceremonies hold In honor" of President Harrison: Major Thotnas Waul, Assistant Adjutant-General; Cap thin Charles McClurc, A. A U.S. A.; Major J; Gi C. Lee, Quartormn,ler; Cap tain Charles II. Ingalls, Asslslant Quar tirinastcr; "Major William II. Nash, Com nMssary of Subsistence; Licutcnalit Oolonel Charles 0. llyrne, Surgeon! Major Charles A. Wlkoff, Fourteenth Infantry; Major John Muhlenberg, Paymaster. Aiimv Ohiiinis. Captain James C. Mer rill, assistant surgeon, detailed as a mem ber of the Army Retiring Hoard in this city, vice Major Robert II. While, relieved. First Lieutenant Melgar G. Richards, Third Artillery, to report to Brigadier-General William Smith, Paymaster-General, for examination. Twenty days' leave of absenco granted Captain Henry J. Haysworth, assistant quartermaster. Discharged tho service: Private llcnj. Arlinghousc, Troop H, Seventh Cavalry; Henri llrussa, Comnany I!, Fifth Infan try; Klam 1!. Crosier, Troop K, Sixtli Cav alry. Discharged for enlistment under false pretenses: Privates William J. Ccelev, Troop K, Fiftli Cavalry; George W. Rey nolds, mounted service. LeaVo of absenco of First Lieutenant Oatewood, Sixth Cavalry, extended One month on account of sickness. First Lieutenant William II. Gordon, Ordnance Department, from Watcrvliet Arsenal to Morgan F.neineeringCompany, Alliancp, Ohio, for duty in connection with the manufacture of disappearing gun-carriage. Changes of station: First Lieutenant Hiram M. Chittenden relieved from duty at Omaha, Neb., to take, station at St. PauLMinn.; First Lieutenant William K. Craigiiill, at St. Paul, to tako station at Montgomery, Ala.; First Lieutenant Charles L. Potter, at Montgomery, Ala., t tako station ut San Francisco, Cal. Captain Richard E. Thompson, Signal Corps, to proceed to Frankford Arsenal, Pa., on public business. Leave of absenco for three months on surgeon's certificate of disability granted Post Chaplain William H. Pearson. Lieutenant-Colonel Dallas Ilache. sur geon, relieved from duty as a member of the Army examining board, New York City, and to return to his station at Qmaha as medical director of the Depart ment of the Platte. NAVY DEPARTMENT. Private Secretary Raymond was at his desk to-day, after a short trip out of town. Tlio commandant of the navy yard at Norfolk reports tlio Atlanta is out of stono dock. Tho commandant of tho navy yard at Mare Island reports the Mohican tin- uocKcu yesterday. Tun Asiatic Station. The commander-in-chief of tho Asiatic station reports the following location of tho ships of that squadron on April 22: Mnnocacy (tem porary flagship) at Yokohama, Japan; Alliance Iett kobo on tlio 11th and ar rived at Chemulpo, Corea, on the I8th; Palos left Nagasaki, Japan, on tlio 1 Ith and arrived tit Amoy, China, on the 18th; will go to Tai-wan-forand from that place will proceed to Hong-Kong and Canton, unina. Navai. Oiim:n. Surgeon II. L. Maekie, as a member and recorder of tlio Naval Medical Examining Hoard, New York, Juno 1. Passed Assistant Paymaster Frank H. Clark (on the expiration or his furlough Juno 1), to the Fish Commission steamer A lliatross. Surgeon Thomas II. Streets, ns a mem ber of tho Naval Examining Hoard, New York, June 1, and ordered to hold himself in readiness for sea service. Assistant Paymaster Charles S. Wil liams, from the Albatross, to settle ac counts, and then granted thrco mouths' leave. I.eavegranted to Rcar-Admlrul John II. Upshur (retired) for six months from Juno 20, with permission to leave the United States. TiuTiTor Tin: Vcsi'vu-s. The dyna mite cruiser Vesuvius will bo tested tho latter part of this week by the following board of oillcers; Commander Robley 1), Evans, Lieutenant-Commander Albert It. Coudcn and Lieutenant John F. Meigs. The test will tako place in tlio neighbor hood of Norfolk. It will bo tho llrst scri-ous-test of whether such a vessel would be of effective use In actual warfare. Secretary Tracy is not only anxious that every facility should be afforded for a thorough experiment, but has given di rections for tlio accommodation of press representatives on vessels on tho occasion, sO'tlitit as complete n report as possible may be made. Tho Vesuvius, which was built by Wm. CrampitSons, Philadelphia, is 251 feet!) inches long on tlio water lino, 20 feet f inches in extremo breadth, 0 feet draught, displaces 72.") tons, has a 3,71)1 horse-power, and is credited with 21.") knots speed. Her armament consists of three l.i-ineh dynamitogmis and thrco 3 pounder rapid-lire cannon, Tho main ob jection so far found to tlio Vesuvius is, that with tltreo dynamite guns llxcd, as they are, forward on tho main deck, the whole vessel is practically tho gun car riage, and it would bo no littlo trouble tu get a bearing; INTERIOR DEPARTMENT. Tlio Census llurean has hv preparation, and will shortly issue, a bulletin giving tlio distribution of population in accord ance with topographic features, Mr. J. II. Wardle, tho popular assistant chief clerk of tlio Census Olllco, who is now acting superintendent, was hand somely remembered to-day by tho clerks of tho various divisions of tho olllco on tho occasion of his forty-llfth birthday. Mr, Wardlo's olllco bears many tokens of expression and esteem in which ho is held by ids associates and colleagues. IIo has tho distinction of being the only census olllelal who was retained in active duty since tho Tenth Census. DEPARTMENT OP JUSTICE. Tho Government District Attorney at Philadelphia lias been Instructed by tho Attorney General to proceed against tlio owners of the steamship Maine, now in Mint harbor, for allowing tho escape of an immigrant ordorod to bo deported. Tho procedure will bo instituted under section 10 of the new immigration law. AGRICULTURAL DEPARTMENT, Dr. William Dickson, the assistant chiof of tho Hurran of Animal Industry of tlio Agricultural Department, died suddenly at ids residence 1121 1 street northwest, yoktcrdav morning shortly after It o'clock, Ho has ur-cn ill with a slight cold since last Friday nnd conlluod to his house, but did not deem it necessary to call a pity slcmii. His mail was brought to him yesterday morning, and while lie was reading ft he fell trout the chair to tho floor. The colored servant hastened to tho room nnd found Dr. Dickson laying unconscious on the lloor. Bhosummoned Professor Mlrscli and Mrs Adams, who reside in the house. Physicians wero htiriedly sent for. nnd Dm, f.ovejoy and Dauforth responded, but Dr. Dickson was dead when thov arrived. Tlio de ceased was a native of Scotland and n grad ualo of Edinburgh University and also nf Dick's Veterinary College. He canto to tills country some years ago and mado Ids residence in Litclillcld, Minnesota, whero lie successfully pursued his aocat(on mh vertcrlnary surgeon until his appoint ment by Secretary Rusk last March. Ho was nbout 40 years of age. His tcmains will bo taken to ills homo in Minnesota for interment. CONGRESSMAN CHAIN Ultcrn n l'civ I'topliorlnn of u I'uroly l'nlltlcal Nntnro. Congressman William II. Craln of Texas arrived in tlio city yesterday. He Is hero on private business. Asked about tho political outlook for 1802, the Lone Star statesman said: "Tlio outlook for Democratic success is very bright, indeed. Our nominee for President will win, whoever ho may bo." "What about tho third party?" "I hardly think thero will be a Farmers' Allianco candidate in tlio Held, but if Micro' is it will not affect us as much as it will tho Republican party." Mr. Grain, in speaking of tlio Speaker ship" light, said his friend and colleague, Mr, Mills would unquestionably be suc cessful, A JIOTIIM'S PLEA FOR HER TWO CHILDREN, WHO ARE NOW DETAINED IN AN ASYLUM. The Asylum Authorities Say the Mother Wants Possession of the Children to Obtain Their Inheritance Which Would Otherwise Revert to Tliem Upon Attaining; Their Majority. Mrs. Susannah Ilakcr, at whose Instance the writ of habeas corpus was issued yes terdoy for possession of her children, took a seat in tlio Court in General Term this morning at 10 o'clock. Site was accom panied by her niece, who was dressed in deep mourning, and her solicitor, J. Pres ton Williams. Mrs. Ilakcr glanced very frequently at Mie door of tho court room in anticipation of an opportunity to see nnd coress her son and daughter, who had, as sho claimed, been separated from her for some timo. She was, however, doomed to disappointment, for when Judge James came into Chambers the writ of habeas corpus ordered issued by him. command ing tho presence of Mrs. A. I). Lee in Court with the two children, bore the following return: "Mrs. Lee not to be found. Out of city. "Danu:i. M. Raxsdi:i,i "P. S. Marshal." Mrs, Ilakcr left tlio City Hall in com pany witli her solicitor, but she was quite demonstrative and declared most posi tively that she would not be trilled with in this manner. The case was briefly referred to in yes terday's CiUTit-Rixoni), in which it was stated that Mrs. Raker's two children, i.steiio aim Vt illts, wero uniawiitlly de tained and imprisoned in tlio Washing ton Orphan Asylum and without tlio con sent ordesire of the mother. The case ns told by her is quite an iu lorestiig oijc. Six years ago sho lost her husband, Jacob Ilakcr, who left her with thrco children, Jacob Townscnd, l'stello and Willis Raker. She was thus le.ft dependent almost entirely upon her own resources, but she went to work with a will and succeeded in sinmortiiig her children quite comfortably. Two vears ago sho was taken sick and found it necessary to send her two younger children, the two asked for by tlio habeas corpus, to tho Washington Orphan Asy lum. She was confined to hor bed for somo timo but finally gained full health and strength and was ablo to again fill her position. it was then that sho desired tho pres ence of her younger children, but some what to her surprise tho asylum authori ties positively declined to turn them over to her and, as she states in her petition, have refused to do so repeatedly since, She insists that by her own efforts she was able to support them and very anxious to do so. Only a short time ago Mie mother of her husband died in Mas sachusetts, leaving quite considerable property; also a provision Mint so much a month should bo paid toward tlio sup port of her son's thrco children in Wash ington. Mr. W. P. Williams was named ns guardian, and for somo months ho lias been paying tlio share allotted to Jacob Townscnd Ilakcr, the only one that the mother has control of. Mr. Williams stands ready to pay an equal sharo to the children who arc at tlio Washington Asylum. The return made on tho writ did not surr"iso Mrs. linker or her counsel com pletely. While they wero satisfied that Mrs. Lee was tlio manager of tho institu tion, thoy have been apprised Miat there are others who are responsible and who havo tho custody of tho children. Another petition will be filed to-day by -Mrs. llaker. Tho Other Side. At tho asylum it was stated that, when Iho children were placed thero two years ago. the mother complied with all the regulations and executed a formal relin quishment of her rights to their control, as is usual in cases whero children aro placed in such institutions, aud gave the asylum authorities full control of them until tney attained ineir majority. Tho board of trustees pass upon all ap plications for the return of children, and, whereit is proven that the person is com petent to properly care for them and of good moral character, tho requests nre usually granted. in this case, however, the board was not satisfied Hint tbo mother was ablo to provide for her children and havo re fused to return them to her. It was also stated at tlio asylum to-day that tho object of tlio mother to regain control of her children was simply to enable her to use mo money iett mem ty tneir grand mother. It tney remain in Mio asylum this money will not be touched, but will be turned ovor to them when thoy attain their majority, with tlio accrued Interest. Tho acting superintendent alsobtatcd that Mrs. llaker could see her children upon the regular visiting days, as sho had been in the habit of doing, and at such other times as tbo board deemed proper, but (lint tho children would not bo sur rendered to hor unless Mie court so di rected. It Is not known when Mrs, Lee will return. A (leiicrnl St rllm. lli:rhKi.i, May 15, It has been decided by u commltteo composed of workiugmon delegates from the various branches of tho iron Industry of tlio country, to order a general strike of irou-workors throughout Belgium. JMr. tllmWtono Mutter. London, May 13. News from Mr. Glad stone's sick room is to tho effect that lie is progressing favorably and that the fovor which ycktorday was tho cause of some slight uneasiness to Ills physician has greatly abated. JM1 .Inclines llmlly Hint. Newton, Mask., May 13. A cablegram says Miss Jacques was seriously injured bv the mob in Florence, as rejiorted the oilier day, The family have gone to that city. M, CIIOUNSE'S CASE. ON TRIAL TO-DAY ON A CHARGE OP CRIMINAL LIBEL. Dr. Hammond Appears Against II I in In the Police Court nnd Relates the Story ol the Publication In the "World" of the Alleged Libel. At 1:30 o'clock this afternoon tiiocnso of Dr. William A. Hammond against W. L. Crounso of tlio New York World, charging lilm with criminal libel, was called up before Judge Miller In the Police Court. Tlio Government was represented by Assistant Attorney Amies, while Mr. A. A. Lipscomb looked after tho interests of Mr. Crounse. Dr. Hammond testified to reading tlio nrticles in tlio H'orW describing Iho re moval, by him, of a ntolo from the head of Mrs. Senator Stanford, and his charge for.operation of $5,000. Ito telephoned to tlio IlorW' bureau on Fourteenth street and denied the story, nnd Mr. Crounso promised Miat it would be retracted on Sunday. A denial, ho said, was printed that dav, but not in n very conspicuous placo hi the paper, nnd Mr. Crounse wrote that, but for tho lateness of tlio hour when it was sent over tlio wires it would have appeared on tho first page. The letter was read to the Court and thejifry. Tho witness said that ho had llrst read tho HorW's article at tho Metro politan Club and afterward in various' other papers. The Doctor said lie saw Mr. Crounse on the 21th of April and had a talk witli him. Mr. Lipscomb then took up the cross examination, he started out by reading a retraction printed in the H'orW Satur day, April 21, but in answer to a question askcd Dr. Hammond said that it did not 'appear in Mie edition that lie received from New' York through tho mail that day. "Do you think a special was printed especially for that notice," asked Judge Miller ot the Doctor. "Oh, no; 1 perhaps got hold of the wrong paper," was Mm answer. Tho doctor said most positively that ho did not care to prosecute Mr. Crounse, but lie did want vindication. He had reason to believe that his business had been injured by the publication of the article, aud that it had a tendency to keep patients away from his ollice. "There was no ill-feeling whatever to ward the defendant on my part," con tinued the witness, "because I Invited Mr. Crounso to my house to dinner after the publication of the article. "All that I wanted was a fair correction of Mie publication in a conspicuous place jn the paper, as the original had appeared at the head of the column on the llrst page. "You do not consider that Mr. Crounse bad anything to do with the make-up ot the paper in New York," questioned ;Mr. Lipscomb. "Probably not," replied Dr. Hammond, After further testimony the case was sent to tlio grand jury and Mr. Crounso was bound over in $300 bond, which was furnished. STILL IN PURSUIT. Tlio Charleston Holds On All Night Arn-i- tho riccing Hutu. Sax Dti'do, C.u.., May 13. The cruiser Charleston was sighted far out to sea on Monday night by the steamer Crescent City, which arrived at Cedros Islands last night. The p.isongeis report that when the Crescent City was about ten miles bo low Ensnada the Charleston was sighted. Tho cruiser immediately changed her course and made for the Crescent City. When the Charleston approached.tho cap tain of tho Crescent City hoisted Mie American Hag and saluted. The Charles ton then steamed away to tho southwest and was soon lost to sight. Nothing was known of the Rata. The L'oiitriilinnillhtH' Trial. I.cs Axoki.ks, C'ai.., May 13. The ex amination of the parties concerned in Mie Robert and Minnio case lias been set down for next Tuesday. Attorney Cole nnd Marshal Gard had a long conference yesterday with United States Solicitor General Taft. Tho sailors of tlio Robert and Minnie aro still in jail, no ono having appeared to go on their bond. Hurt and OrFnrrel expect to have ball furnished in their cases to-day by San Francisco parties. MR. HLAINE'S HEALTH. A Slury Tlint Ho In forbidden to Work for "Weoks. Ni:w Yoiik, May 13. Secretary of State James G. lllaino was stated this morning to be greatly Improved in health. He will remain in the city for two or thrco days. The iconic r says: It was learned yesterday the doctor had positively for bidden Mr. lllalne to return to his duties. Ho said lie must not thinkof working for two months or work might become an impossibility. Mrs. Damrosch said yes terday Miat it was likely that Mr. lllaino would go to Maine for tho rest and quiet he much needed. STATE OP THE SHOREHAM. Inspector 1'iitvtlHlo Makes u Report Shotting Its Condition. In view of the injurious rumors relating to the Shorehoni Hotel Inspector En twisle lias prepared a statement of tho present condition of Mie build ing and tlio work of repair. Tho tiled doors only havo been taken up. Those of board aro in a good condi tion. Tho hallwavs in Mireeof thostorics have been reconstructed. Tlio work is being done in sections to avoid closing the hotel. The hotel, Mr. Entwisle says, is safe. The walls aro constructed as soundly ns any building in tho city; the elevators have Mie most approved safety appliances, and travelers or guests need havo no ap prehension of u repetition of tho hallway accident. Vice-President Morton has been very liberal in allowing funds for the repairs, and tho work Is being pushed rapidly. Mr. Entwislo makes this statement in order that tho public may know that con trary reports tire merely sensational, and confidence be restored In the safety of the building. Mnriliigo l.lcimsus, The following marriage licenses wero issued to-day; Oscar T. Towner and Lillie A. Price, Otto .1. Carlton and Anna Mom berry, John Ridout anil Sally Shields, John W. Ruppcl and MultluE. Dolomau, William Thomas aud Maria Duckett, William Edward Ilarr and Annio llaker, Washington; Benjamin F. Brooks and Annio Henderson, Clureneo Atchison and Mtqjglo E. Mills, Prince George's County, Md.; James II. Allen and Martha E. Smith, Auacostia; .lames Collins and Man A. Wheelan, Toiinallytown; John L. Koontz and Dora 11. Hutchinson, Lurav. Vo.: Reuben lleimor and Florence Weaver, Philadelphia. In the Circuit Court. Judgo Cox on tho Bench Hoggs vs. Downey; motion for a new trial filed, Rowland vs. Crobs; motion for writ of possession granted. Ellen Donohoo vs. Washington and Georgetown Railroad Company; given to jury. Book vs. Downov; motion for now trial by defend ant, li. P. Phlllli vs. J. P. Herron; motion for want of duly verified picas granted. -....! -- I,- ... Remember tho boys' short pants and suits wo advertise from $2 up, Eisemaii Bros., Seventh and E, THE RIPPER'S VICTIM. Tlio Inqiirxt Itegiiu To-day An l'rel Icnt iTttry. Nmv Yoni;, May 13. Coroner SchulU to-day began the Inquest on the body of Catrlc Drown, tho victim of "Jack the Hipper." Tlio three parlors of tho Coro ner's olllrc wero crowded nnd the array of Wntcr-strect habitues was something startling. Tlio eight females who aro held as witnesses wore also present. Ameer Hen All, or French), No. 1, was also thero under guard. On Mio jury were ex-Charity Commis sioner llrennnn, L. J. Merklc, maltster; Horry Miner, ot theatrical fame; J. T. Itoetncr nnd George Ilrockwny, tho hotel keepers; Richard M. Walters, Iho piano manufacturer; Jacob Ruppcrt, jr., the brewer, and F. Slaughter, tho clothier. The first witness was Mary Corcoran, tlio housekcoicr of MioEast River Hotel. Her testimony in regard to the occur rences of that night did not differ from that sho has already given. Police Captain Richard O'Connor of tho Oak-street station testified that ho found drops of blood in Mie hallway leading from room 32, whore tlio woman was murdered, to room 33, where Frcnchy No. 1 slept that night; also to blood on tho panel of t lie door of room 33; also near the handle of the door on Mie inside of Mie door Micro was a small spot of blood. He also referred to the other blood spots found on tho bed, etc., in room 33. Ho then identified the shirt Miat Frenchy No. 1 had on when arrested, Tlio blood marks on the shirt had been carefully cut opt by the district attorney. Detective Crowley also testified. IJIUCE'S BOODLE. JAY GOULD SAID TO HAVE MADE A PLAY FOR IT "Ami Surrounded It to the Extent of $('.,000.000 It Looks Like Another Case of Jim Kcene Coming Inn Palace Car nnd Returning by "Way Freight. Cincinnati, Ohio, May 13. The 1'ost publishes a story said to have been fur nished by an ex-judge and corporation attorney, relating to big losses by Senator Drice, Governor Campbell and General Thomas, and of big profits by Jay Gould. Messrs. Price,' Campbell nnd Thomas arc represented as having combined with Mr. C. P. Huntington "to rout Jay Gould from the Richmond Terminal and shut him out from his Pacific Mail holdings." Mr. Gould "let go so easily that at once the story was telegraphed thoughout the financial world that Gould had at last been worsted." Mr. Gould sold out Rich mond Terminal at 63. Tho buyers thought to havo it raise, but it loll to -13. Then, it is asserted, Mr. Campbell and others went to Mr. Gould to sell their stock, hut he told them tho stcck was all right and they should margin mi. A few rl.avs Intpp it, fr-ll ton iininlq more and finally went down to 23, when Mie syndicate again went to Mr. Gould in quest of relief. "Oh.it will come out all right," Mr. Gould is reported as saving. "It will keep on fulling, and I think it will go toO." Mr. Gould then offered to trade Western Union at 7fl for tlio syndicate's stock of Richmond Terminal at 13. This was ac cepted. Tlicstoiy In conclusion says: "A week IctT there came a drop in 'U estern Union and a rise in Richmond Terminal. Hrico is said to havo lost over $0,000,000 and Campbell nearly all, if not all, he had." NICE CLERGYMEN THESE WILL RE. Disgraceful Actions or Divinity Stu ilouts nt Oliorlln I nlvcrMty. OnriEiN, Ouin, May 13. There is a big row among the students at Oberlin Col lege, which may result in bloodshed. A few days ago Mie juniors began missing their silk hats and tlio thefts were attrib uted to Mie seniors. The trouble brewed for a time and burst out in earnest yester day morning, when the juniors armed themselves with hatchets, revolvers, axes, shot guns, etc., and began parading the streets, threatening to kill several mem bers of the senior class. The juniors at tended prayer.''in Mie chapel, arrayed in the cowboy habiliments, and aro still on the warpath. Warrants have been issued for Mie arrest of several of the unruly stu dents. A RIOT IMMINENT. lYius of Jtuco Troulilii Over u Maryland Lynching. IIalti.moi:i:, Mil, May 13. A dispatch from Centruvillc, Md., says the colored residents of tlio town aro muttering threats of vengeance for tho lynching of Asburv Green yesterday. Of tlio 1,100 inhabitants 300 are colored and they may do much mischief. At a late hour last night they wero collected in groups upon the street comers nnd trouble is feared. One hundred white citizens are patroling Mie streets nnd the whole town is awake awaiting developments. lie Whipped a Wuiiiiui. Wn.LMON, Onto, May 13. Peter Galla gher, superintendent and mine boss of the Comet Coal Company and cx-Coimciliuan, today gave Mlis Kosler a cowhiding in the public road. Mr. Gallagher, while hi the Council was the means of having a road established which passed through tlio beautiful farm of Miss Foster, since which Mine tho young lady has on every occa sion, ho says, taken it upon herself to in sult ntld obstruct Gallagher while on his Way to tlio mines. Yesterday she stopped his. carriago and began clubbing him, when he lost control of himself aud gavo her a cowhidinf. Both ncrsonsaroaniomr tho host people. Lost III tlio I. like. Dnr.oiT, Mini., May 13. A special from Traverso City says: Tlio schooner KUlball sailed from Manistee on tlio even ing of May fl for Nortliport, loaded with shingles and salt. She lias not yet arrival at her destination. Shingles nave been seen floating between Cat Head Point and Manitou Island, and a trunk has como ashoro. Besides the crew a number of prominent citizens of Nortliport were aboard. Tho owners think that the vescel and all on board arc lost. A lllili Cm-go, San Fiivntiwo, May 13, Tho Customs House oillcers are keeping n sharp look out along the coast for tho vacht Halcyon which tho steamer Australia Miat arrived hero from Honolulu yesterday reported on her wav here with a cargo of opium worth $I,Uoo,ikK. The captain of tlio Australia says that the Halcyon is about due. A MMIng Man. 1Utiu.o, N. Y., Mnv l.'l.-Willlam Thomas, president of the Seaman's Union, is missing. He left his homo lat Friday and has not since been seen or heard of. His books and accounts are straight. Mrs. Thomas thinks ho may havo shipped on one of tlio vessels and goue, perhaps, to Chicago. She, however, fear foul I'lny. l'leelduut HtOnmliH. Omaha, Wny 13,-Tue President ana patty arrived hero to-day. The demon st rat ion was greater than that which greeted President Cleveland. The princi pal buildings were decorated, the weather Jiue aud everybody came out, FOBEIGN NEWS I5UDGET. GLEANINGS OP INTERESTING ITEJI3 BY EUROPEAN 'EWSGATIIERERS. The Russian Jews Said In Regard the Attempt Upon the Life of the C.arc witch ns a Stroke of Divine Ven geance Leveled nt Their Cruel Perse tutors. London, May 13. A Vienna dispatch says that somoof the Hebrews In Miatcity arc not slow to evince tlicir satls'actoii at the distress of the Russian Imperial family owing to Mio attack on the ('.arc witch, and aver that it is a just retribution for the frightful calamities indicted on the Hebrews by the Czar's government. In Warsaw Mio police havo orrestcd several men who were, distributing Mm news in an exoggcrated form to Mie effect that tlio Czarowitch was dead. The Aus trian Emperor has telegraphed liis condol ence to Mie Czar, witli (in anxious inquiry as to Mie latest news of the Czarcwltch'.-)' condition. Tlio Austrian authorities in Galieia have been ordered to repress sternly any exhibition of satisfaction with tho occurrence, but groups of peoplo in Cracow lined Mie streets Inst night, talk ing over tho event witli evident pleasure. Cracow is full of Hebrew refugees ami. there was no concealment of delight at the blow which had fallen on tho house hold of the autocrat. This feeling is not so strange, when it is remembered that according to the latest advices the roads fiom Moscow to the frontier and the pale were strewn in somo places last week with thehmainsof the aged and of iiHauts who bud perished from hardship. I.UlOltTRUim.r'S I'J'ARKtl. Great excitement exists in Brussels'. The worklngmen arc determined to hold their parade in defiance of the city au thoritits and the burgomaster Is eqnally stubborn. The troops nre in readiness to suppress any outbreak, the gendarmes having spent all night under arms. Tlio working people of Ghent aro nut in force today and similar demonstrations are re ported in various cities of Belgium. Tlio troops on tlio Belgian frontier, adjoining France, havo captured a large quantity of circulars, printed, it is thought, in Eng land. These circulars appeal to the p ple to strike n blow'forllberty and not be any longer the slaves of n monarchy. a oi:i:at lll'KI-'H itxkkm.. Tho funeral of the Grand Duke Nicho las was one of the most splendid exhibi tions ever witnessed in Russia. The body was saluted by 100,000 troops on its way to St. Petersburg. The Czars court is now iti double mourning. Tlio remains of Nicholas Is interred in the Cathedral of St. Peter and St. Paul. The illegitimate children of the late Grand Duke, four in number, havo been taken under the special protection of tho Imperial houso and will lie trained accordingly. Till; WISTrilAI.IAN stiiiki:. The leaders of the strike at the West phalia mines who were nut under nrrosfc when the strike movement began haw been released without trial. The mines are in such a dilapidated condition Miat tho production in fargo quantities will not be possible forseverul days to come. Gov ernment Inspectors aro busy examining the mines and ascertaining what, if any, danger exists. Tho workingmen of Bo chum not engaged in coal mining have subscribed a sum of money for tho benefit of tho poorer miners, who, in Mie midst of plenty, are actually starving. The .sur render of the miners is duo to this fact. Dr. Ilrasscrt, who is charged witli the ad ministration of mines, Is quotod as say ing that the safety of the mines is now more carefully attended to than in Ger many, which is Mie reason that Mie emu try is comparatively free from great min ing catastrophes. roirxnui.'H riNKs. The desperate financial situation of Portugal has been impending for many months. The Miguel" bondholders, who have tried to discredit the Portuguese Uo crnnicnt by every means in their power, are rejoicing over the result of their work. Portugal is virtually driven out, for the present, of the great stock markets of Europe, and her best securities aro with out an offer of purchase. It is said that King Charles has offered for tho present to givo up his income from national sources, until such timo as Portugal will bo better able to pay. As the Queen is wealthy, both by descent and bequest, the King's offer, should it be accepted, fcrould not involve him in poverty. lliiri-ucks Destroyed. I'o.Mr, May 13. Information bus readied this city that during the progress of :i fierce storm which recently visited Masso wali a building, used as a barracks, aud containiiiga number of soldiers, collapsed. Six men were killed, and ten scriouslv in jured . A I'll I ill i:il(islon. Cur.o, In.., May 13. Three men were hurled to death about 8 o'clock Monduy night by tho bursting of a boiler on the two boat My Ctioicc in Mie Mississippi River above here. The boat was under a full head of steam and in midstream when the catastrophe occurred. Three of the crew, Dick Slcason, James Lawronce and John Arnold, wero blown into Mie water nnd were seen no more. Three others wero severely injured. Tlio tug with her barges was saved. A l-i'ciillur TrlHl. Si'i:iNi.iu:i.i, Miss., May 13, Yesterday Janus Dumford and Ellen Wholadiiu. both ot Holyoke, were given separates trials on the charge of adultery witli each other. The evidence in each case was the same, but Mie llrst jury acquitted the wo man, who was discharged, wldlo the sec ond jury found Dumford guilty and he was sentenced to six months at hunt labor In jaih Italian Laliurors right. Wiieklix", W. V., May 13. A riot oc curred between Italian and American la borers In Mie oniploy of Alexander Gra ham, a Belmont County (Ohio) piko con tractor, at Piko Creok Monday, which resulted in one being killed, two fatally wounded ami ten more or loss hurt. No details or names are known excepting that tho troublo was precipitated by an Italian attacking the foreman with an iron bar. A Tough Lot. Truly, Ciiattanimk.v, Tknn.. May 13. The young woman who was recently whipped by women white cajw near Dtiektown has since died, and iter assailants are under nrroit. Friends of these women say they will never go to jail, and a fltelit U Immi nent between the mob and tho oillcers. The outcome will probably lie more inur dor, as tho inhabitants of the section un known as "a tough lot." Great .Sellouts of llorriug. IIw.ifax, X. S., May 13. Herring in large schools have struck Mie coast of Nova Scot in and Prince Edward Maud nnd the fishermen are makimr lsru,' hauls. A Meet of l.VJ sail of American and Canadian fishermen bailed iu a few hours, and boats and small schooners came from all directions aud loaded for the next tieet. Steamship Arrivals. At New York Elder, from Bremen Androria, from Glasgow; Denmark, lroiu Liverpool, Majestic, from Liverpool. At Breiueu Weimiui. from IMtimor,-. passed Browhond; Teutonic, from Nvn York. At Rotterdam Maasdam from Ne York Ai Southampton I aim from v. uik, X IV xml | txt
http://chroniclingamerica.loc.gov/lccn/sn87062228/1891-05-13/ed-1/seq-1/ocr/
CC-MAIN-2017-30
refinedweb
8,939
65.62
Hello and thanks for your time in advance! What created the problem: I'm a newbie to AVRs and tried to run the ATMEGA328P with an external crystal, but instead configured the fuses for external clock. (also i'm very worried that USBasp might have been set in a pretty high speed, could that get some of the fuses wrong?) Tools: I do not have access to a programmer other than USBasp which I used along with AVRDUDESS 2.4 to kill the chip but I have access to more avrs. Other info: The chip was loaded with Blink example project before changing the fuses and was loaded with the UNO bootloader. Usbasp is properly connected, tried with another chip and is detected as it should. Error: Every attempt to write to chip since messing with the fuses ended with this: avrdude.exe: error: programm enable: target doesn't answer. 1 avrdude.exe: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. and the atmega328 did not blink anymore. What I tried: I read this and loaded this #include <avr/io.h> int main(void) { DDRB = 0xFF; while(1) { PORTB ^= 0xFF; } } to another ATMEGA328P with 16MHz clock to provide an external clock from PB1 pin. What happened: Now the atmega blinks every ~78 seconds but is still unresponsive to AVRDUDESS or the IDE with the above error in all possible AVRDUDESS bit clocks. Thats around 205kHz of clock from the 16Mhz of input, tried to communicate with it via 16kHz but no luck. Another problem is that not both ATMEGAs can be powered from the 5V of the USBasp, so i use an external source to the clocked one, could that be a problem? Screenshots: Circuit and Fuse settings Can you please help me recover it? UPDATE: Text was updated, I used nano originally which wan't properly grounded but ki0bk helped me figure it out. For the pulse then switched to attiny, pictures were updated too but same results this far. UPDATE: Changed the ATTINY85 with another ATMEGA328P with 16MHz clock You probably still have the clock/8 fuse set, so set the isp clock (-B) to a lower setting, until you can read the chip signature and erase it. The ISP clock must be less then 1/4 the cpu clock for it to talk to the chip. Jim Top - Log in or register to post comments You did connect the nano's gnd to the common gnd of the 328, yes? Top - Log in or register to post comments Hello, thanks for the answer. Nope, I hadn't connected the nano's GND, but i did now. (I knew something was off in the setup :P). I then tried to rewrite the fuses with the defaults with -B5 up to -B10 but still no luck, just in case I will link a picture of the AVRDUDESS in case I don't know what i'm talking about. I manually selected the MCU, it still can't detect it. EDIT: Is erasing something different? Attachment(s): Top - Log in or register to post comments
http://www.avrfreaks.net/comment/2312476
CC-MAIN-2018-09
refinedweb
524
70.84
SageMath 8.0 using Windows installer I have installed SageMath 8.0 on Windows 10 as the following instruction. wiki.sagemath.org/SageWindows Everything ᅟ seemed to work well first, but I got an error message as follows. sage: 1+1 2 sage: plot(sin(x)) /opt/sagemath-8.0/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.py:590: RichReprWarning: Exception in _rich_repr_ while displaying object: 'ascii' codec can't decode byte 0xea in position 6: ordinal not in range(128) RichReprWarning, Graphics object consisting of 1 graphics primitive sage: Does anybody know a solution for this problem? I reported it as a bug at... Welcome to Ask Sage and thanks for reporting this! Is it possible the user's username contains non-ASCII characters? If so, I don't think this a problem specific to Windows. Or perhaps, more precisely, on your machine, in the Sage prompt what does from sage.env import SAGE_TMP; SAGE_TMPoutput? To Iguananaut, thanks for comments. You are right. The username of windows account contains non-ascii character, which is very common situation in Windows Korean distribution. I wil try to use new account of ascii acaracter. And, here is the output from your command;
https://ask.sagemath.org/question/40131/sagemath-80-using-windows-installer/
CC-MAIN-2018-05
refinedweb
203
60.51
Introduction. What is servlet. Why we need servlets Before servlets there was another API called Common Gateway Interface (CGI) for developing web-based applications. Let's have a look at CGI. What Common Gateway Interface (CGI) is: This method is invoked only once just after a servlet object is created. It is used by the server to provide a refrence of the servlet configuration object to the servlet. The Servlet config is an interface of the servlet API. Implementation of it is provided by the servlet vendor. This method is invoked by the server each time a request is received for the servlet. This method is used by the servlet for processing a request. In this method a reference of an object is type ServletRequest and ServletResponses are provided by the server. This objects facilitates transfer of input between servlet and server. This method is invoked only once just before a servlet is unloaded. Used to obtain the reference of the ServletConfig object from the servlet. Used to obtain the description of the servlet. Servlet Implementation //implementation of Servlet through GenericServletpublic class MyServlet extends Generic Servlet{ //service() method is defined} How we create a connection between client and server public MyServlet extends HttpServlet{ //Either doGet or doPost() // or both are used} In the syntax above we see that there are two methods, doGet() and doPost(), Now understand the differences between them. There are the following differences between the doGet() and doPost() methods. 1. Conventionally get requests are used for static contents from the server and post requests are used for getting dynamic content from the server. 2. The technical difference is that a getRequest request is sent as part of a header size of a HTTP package header is fixed hence only a limited amount of data can be sent as part of a getRequest. When PostRequest data is sent as part of a body, the size of the HTTP package body can be unlimited, hence an unlimited amount of data can be sent with a postRequest. 3. When getRequest requested data is append to the URL, it is visible in the address bar. The postRequest request data is not append to the URL, hence it is not visible in the address bar of the browser. 4. When getRequest requested data is transmitted over the network it is submitted by the user whereas postRequest requested data is encrypted using a standard 32-bit encryption algorithm and is transmitted over the network. 5. getRequest is idempotent postRequest is not. Understand how to create a servlet using example. In this example we create a servlet which takes user input names and displays them using the prefix "Welcome", as for example I provide a name "Sandeep" and it prints "Welcome Sandeep". In this example we need to create the following classes: 1. Index.html This HTML file creates an interface in which the user enter his/her name and a submit button is used for processing the request. 2. web.xml A XML file maps our servlet with the web-server. It provides the information of the application's components to the server. A simple web.xml for a servlet needs to provide the following information to the server in the web.xml file: <wep-app><servlet-name>Unique Identifier</servlet-name><servlet-class>Class-Name</servlet-class></servlet><servlet-mapping><servlet-name>Unique Identifier</servlet-name><url-pattern>URL need to invoke servlet</url-pattern></servlet mapping></web-app> 3. MyFirstServlet.java This file contains servlet code in which we use either doGet() or doPost() methods. In this example we use the doPost() method. To develop a servlet API we use the Netbeans IDE. <html><head><title>My First Servlet Page</title></head><body><form method="Post" action="MyFirstServlet">Name: <input type="text" name="name"><br><input type="submit" value="submit"></form></body></html> Step 7 Now create a Java file as shown below. Right-click on the project then select "New" -> "Servlet". Step 8 Now click on "Next" and type your class name as "MyFirstServlet" then click on "Finish" as shown below. Step 9 MyFirstServlet.java import java.io.*;import javax.servlet.http.*;import javax.servlet.*;public class MyFirstServlet extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String name = request.getParameter("name"); response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("Welcome " + name); out.close(); }}.
http://www.c-sharpcorner.com/UploadFile/fd0172/a-brief-introduction-about-servlet-in-java/
CC-MAIN-2015-32
refinedweb
729
56.05
Introduction to Reinforcement Learning with Python Reinforcement Learning is definitely one of the most active and stimulating areas of research in AI. The interest in this field grew exponentially over the last couple of years, following great (and greatly publicized) advances, such as DeepMind's AlphaGo beating the word champion of GO, and OpenAI AI models beating professional DOTA players. Thanks to all of these advances, Reinforcement Learning is now being applied in a variety of different fields, from healthcare to finance, from chemistry to resource management. In this article, we will introduce the fundamental concepts and terminology of Reinforcement Learning, and we will apply them in a practical example. Reinforcement Learning (RL) is a branch of machine learning concerned with actors, or agents, taking actions is some kind of environment in order to maximize some type of reward that they collect along the way. This is deliberately a very loose definition, which is why reinforcement learning techniques can be applied to a very wide range of real-world problems. Imagine someone playing a video game. The player is the agent, and the game is the environment. The rewards the player gets (i.e. beat an enemy, complete a level), or doesn't get (i.e. step into a trap, lose a fight) will teach him how to be a better player. As you've probably noticed, reinforcement learning doesn't really fit into the categories of supervised/unsupervised/semi-supervised learning. In supervised learning, for example, each decision taken by the model is independent, and doesn't affect what we see in the future. In reinforcement learning, instead, we are interested in a long term strategy for our agent, which might include sub-optimal decisions at intermediate steps, and a trade-off between exploration (of unknown paths), and exploitation of what we already know about the environment. For several decades (since the 1950s!), reinforcement learning followed two separate threads of research, one focusing on trial and error approaches, and one based on optimal control. Optimal control methods are aimed at designing a controller to minimize a measure of a dynamical system's behaviour over time. To achieve this, they mainly used dynamic programming algorithms, which we will see are the foundations of modern reinforcement learning techniques. Trial-and-error approaches, instead, have deep roots in the psychology of animal learning and neuroscience, and this is where the term reinforcement comes from: actions followed (reinforced) by good or bad outcomes have the tendency to be reselected accordingly. Arising from the interdisciplinary study of these two fields came a field called Temporal Difference (TD) Learning. The modern machine learning approaches to RL are mainly based on TD-Learning, which deals with rewards signals and a value function (we'll see more in detail what these are in the following paragraphs). We will now take a look at the main concepts and terminology of Reinforcement Learning. A system that is embedded in an environment, and takes actions to change the state of the environment. Examples include mobile robots, software agents, or industrial controllers. The external system that the agent can "perceive" and act on. Environments in RL are defined as Markov Decision Processes (MDPs). A MDP is a tuple: $$ (S, A, P, R, \gamma) $$ where: A lot of real-world scenarios can be represented as Markov Decision Processes, from a simple chess board to a much more complex video game. In a chess environment, the states are all the possible configurations of the board (there are a lot). The actions refer to moving the pieces, surrendering, etc. The rewards are based on whether we win or lose the game, so that winning actions have higher return than losing ones. State transition probabilities enforce the game rules. For example, an illegal action (move a rook diagonally) will have zero probability. The reward function maps states to their rewards. This is the information that the agents use to learn how to navigate the environment. A lot of research goes into designing a good reward function and overcoming the problem of sparse rewards, when the often sparse nature of rewards in the environment doesn't allow the agent to learn properly from it. Return Gt is defined as the discounted sum of rewards from timestep t. γ is called the discount factor, and it works by reducing the amount of the rewards as we move into the future. Discounting rewards allows us to represent uncertainty about the future, but it also helps us model human behavior better, since it has been shown that humans/animals have a preference for immediate rewards. The value function is probably the most important piece of information we can hold about a RL problem. Formally, the value function is the expected return starting from state s. In practice, the value function tells us how good it is for the agent to be in a certain state. The higher the value of a state, the higher the amount of reward we can expect: The actual name for this function is state-value function, to distinguish it from another important element in RL: the action-value function. The action-value function gives us the value, i.e. the expected return, for using action a in a certain state s: The policy defines the behaviour of our agent in the MDP. Formally, policies are distributions over actions given states. A policy maps states to the probability of taking each action from that state: The ultimate goal of RL is to find an optimal (or a good enough) policy for our agent. In the video game example, you can think of the policy as the strategy that the player follows, i.e, the actions the player takes when presented with certain scenarios. A lot of different models and algorithms are being applied to RL problems. Really, a lot. However, all of them more or less fall into the same two categories: policy-based, and value-based. In policy-based approaches to RL, our goal is to learn the best possible policy. Policy models will directly output the best possible move from the current state, or a distribution over the possible actions. In value-based approaches, we want to find the the optimal value function, which is the maximum value function over all policies. We can then choose which actions to take (i.e. which policy to use) based on the values we get from the model. The trade-off between exploration and exploitation has been widely studied in the RL literature. Exploration refers to the act of visiting and collecting information about states in the environment that we have not yet visited, or about which we still don't have much information. The ideas is that exploring our MDP might lead us to better decisions in the future. On the other side, exploitation consists on making the best decision given current knowledge, comfortable in the bubble of the already known. We will see in the following example how these concepts apply to a real problem. We will now look at a practical example of a Reinforcement Learning problem - the multi-armed bandit problem. The multi-armed bandit is one of the most popular problems in RL: You are faced repeatedly with a choice among k different options, or actions. After each choice you receive a numerical reward chosen from a stationary probability distribution that depends on the action you selected. Your objective is to maximize the expected total reward over some time period, for example, over 1000 action selections, or time steps. You can think of it in analogy to a slot machine (a one-armed bandit). Each action selection is like a play of one of the slot machine’s levers, and the rewards are the payoffs for hitting the jackpot. Solving this problem means that we can come come up with an optimal policy: a strategy that allows us to select the best possible action (the one with the highest expected return) at each time step. A very simple solution is based on the action value function. Remember that an action value is the mean reward when that action is selected: We can easily estimate q using the sample average: If we collect enough observations, our estimate gets close enough to the real function. We can then act greedily at each timestep, i.e. select the action with the highest value, to collect the highest possible rewards. Remember when we talked about the trade-off between exploration and exploitation? This is one example of why we should care about it. As a matter of fact, if we always act greedily as proposed in the previous paragraph, we never try out sub-optimal actions which might actually eventually lead to better results. To introduce some degree of exploration in our solution, we can use an ε-greedy strategy: we select actions greedily most of the time, but every once in a while, with probability ε, we select a random action, regardless of the action values. It turns out that this simple exploration method works very well, and it can significantly increase the rewards we get. One final caveat - to avoid from making our solution too computationally expensive, we compute the average incrementally according to this formula: import numpy as np # Number of bandits k = 3 # Our action values Q = [0 for _ in range(k)] # This is to keep track of the number of times we take each action N = [0 for _ in range(k)] # Epsilon value for exploration eps = 0.1 # True probability of winning for each bandit p_bandits = [0.45, 0.40, 0.80] def pull(a): """Pull arm of bandit with index `i` and return 1 if win, else return 0.""" if np.random.rand() < p_bandits[a]: return 1 else: return 0 while True: if np.random.rand() > eps: # Take greedy action most of the time a = np.argmax(Q) else: # Take random action with probability eps a = np.random.randint(0, k) # Collect reward reward = pull(a) # Incremental average N[a] += 1 Q[a] += 1/N[a] * (reward - Q[a]) Et voilà! If we run this script for a couple of seconds, we already see that our action values are proportional to the probability of hitting the jackpots for our bandits: 0.4406301434281669, 0.39131455399060977, 0.8008844354479673 This means that our greedy policy will correctly favour actions from which we can expect higher rewards. Reinforcement Learning is a growing field, and there is a lot more to cover. In fact, we still haven't looked at general-purpose algorithms and models (e.g. dynamic programming, Monte Carlo, Temporal Difference). The most important thing right now is to get familiar with concepts such as value functions, policies, and MDPs. In the Resources section of this article, you'll find some awesome resources to gain a deeper understanding of this kind of material.
https://www.codevelop.art/introduction-to-reinforcement-learning-with-python.html
CC-MAIN-2022-40
refinedweb
1,813
52.09
Hi, I have one query about the compatiblity between Tornado2.0 and Tornado2.2.1 We have built our libraries which uses C++ features like RTTI, Virtual functions, Inheritance in Tornado2.2.1 (VxWorks5.5.1) using PPC604gnu tool chain. We tested the libraries which are built in Tornado2.2.1 in Tornado2.0 using PPC604gnu tool chain. These libraries are working fine which means all our test cases are passing. I would like to know whether there will be any risks/issues in using the libraries built in Tornado2.2.1 in Tornado2.0 application. Please let me know if anybody has idea regarding this. P.S : We are doing as above because Tornado2.0 compilation is not supporting namespaces. Regards Satish.
http://fixunix.com/vxworks/518209-reg-compatibility-between-tornado2-0-tornado2-2-1-a-print.html
CC-MAIN-2016-18
refinedweb
123
71.61
import de.popforge.* Popforge is an Actionscript 3 code sandbox started by Andre Michelle and Joa Ebert. Packages The Popforge library is the sum of several free time and research activities. Each piece in its own a project itself. Not all of our projects made it to here. We have a lot in the pipe we want to share with the community but still want to assure high quality content. Currently you will find the audio library sources online. import de.popforge.audio.*. Future projects Projects that are not online yet but may be released within the next couple of months. import de.popforge.imageprocessing.* The ImageProcessing library is mainly a set of filters that allows you to synthesize, modify and analyze images within Flash. There are more than 50 filters and several utilities included. Read more... import de.popforge.cubicvr.* CubicVR 360° is a Flash 9 panorama viewer with pixel exact rendering which results in high quality pictures and no distortion. It is highly customizable and supports custom keymaps, hotspots, JavaScript interaction and motion blur to name just a few features.
http://code.google.com/p/popforge/
crawl-002
refinedweb
182
55.34
Hi Im trying to convert a string (combination of mobile number and password) to a Base64 string. I seem to be running into a couple of issues (please excuse my ignorance, I am totally new to Python): 1. I have tried to import the following library (import base64), but I get an error saying "No module named base64". 2. I have read some conflicting info. Some say that (base64.b64encode) only works on byte arrays, while others are using it with a string. Do I need to convert my string to a byte array first, or will this work on a string. 3. Does anyone by chance have a snippet or a script showing how to do this. Thanks Drew 2 Comments Hi Drew, IronPython is an implementation of the Python language, that targets the .NET framework. As a result, you won’t be able to use Python specific libraries, but should use the .NET classes/namespace. Below is an example of how to do this: clr.AddReference("System.Text") from System import Convert from System.Text import ASCIIEncoding toEncodeAsBytes = ASCIIEncoding.ASCII.GetBytes(toEncode) encodedString = Convert.ToBase64String(toEncodeAsBytes) Thanks, Scott Thanks Scott, that worked.
https://support.verivo.com/hc/en-us/articles/216399903-Converting-a-string-to-Base64-in-echelon
CC-MAIN-2019-09
refinedweb
194
67.65
STAFService - Perl extension for writing STAF Services easily. On the staf.cfg file: SERVICE service_name LIBRARY PERLSRV EXECUTE SimpleService Or if SimpleService is not in the PERL5LIB: SERVICE service_name LIBRARY PERLSRV EXECUTE SimpleService OPTION USELIB="c:/STAF/Perl/handler" And SimpleService.pm should look like that: package SimpleService; sub new { my ($class, $params) = @_; print "Params: ", join(", ", map $_."=>".$params->{$_}, keys %$params), "\n"; return bless {}, $class; } sub AcceptRequest { my ($self, $params) = @_; return (0, 42); } 1; This package supply the nessery dynamic library (or shared object) needed for running Perl Services under STAF version 3. Version 0.21 is identical to the DLL that delivered by the STAF distribution v3.2.4. In this simple module, every service have it's own Perl Interperter, and the access is single-threads. (meaning that there won't be two concurent AcceptRequest calls) For multi-threaded services, see below. STDOUT is redirected to STAF's log file. So don't worry about this and just print whatver you think should go to that log file. prints to STDERR will be displayed in the STAFProc's window. You know the drill. perl Makefile.pl make make test make install The name of the service. Can be whatever you can think about, and not nessesrialy connected to the package name, or anything else. Tells STAF that this service will be executed using a DLL/SO called PERLSRV. (The SO might be called libPERLSRV.so, if this is you system convension) Tells the PERLSRV DLL to use and new the SimpleService package. The following steps (basically) will be executed: use SimpleService; my $obj = SimpleService->new($new_params_hash_ref); # Incoming Requests ($ret_code, $answer) = $obj->AcceptRequest($request_pararms_hash_ref); # And in the end: undef($obj); So please supply a DESTROY sub for cleanup, if needed. You can specify three additional optional options. two of them are standard in STAF, and the third is not. The maximum number of log files to keep. Older log files will be deleted. The maximum size for a log file. (in bytes) The default value is 1MB. The size is checked only on service's startup. Use this option to 'use lib' other locations before loading your package. this option gives the ability to store your package on location other then the STAF's bin directory. This option can be specified multiple times for multiple locations. Whatever you write after this keyword, will be passed to your service handler. (in the new call) SERVICE Mufleta LIBRARY PERLSRV EXECUTE SimpleService OPTION USELIB=c:/mylib PARMS "some text" Should create a new service handler. returning anything other then an object, will be treated as error and the service will be terminated. 'new' will recieve a hash ref, containing the following fields: ServiceName ServiceType - An integer refering to the type of the service. refere to STAF's documentation. WriteLocation - A directory for temporary files, if needed. Params - Whatever is writen in the PARMS in the config file. Note that if a STAF handle is needed for this service, this is a good place to register it. The worker function. will be called for every request that need to be served. Should return two values: ($ret_code, $answer), where return code 0 represent success. for other return code, please refer to STAF's documentation. returning anything else will be treated as error. 'AcceptRequest' will recieve a hash ref, containing the following fields: stafInstanceUUID machine machineNickname request - The request itself. user endpoint physicalInterfaceID trustLevel isLocalRequest diagEnabled trustLevel requestNumber - needed for threaded services handleName - of the requesting process handle - the handle number of the requesting process If cleanup is needed, you can implement a DESTROY method that will be called then the service will be shut down. A STAF service has five steps of its life: Construct, Init, ServeRequests, Terminate, Destroy. and these step are mapped to the following parts of your module: Construct: The module is being loaded. Init: the new function is called. this is the place to create a STAF handle, if needed. ServeRequest: the AcceptRequest function is called for every request Terminate: the object is DESTORYed. Please unregister your STAF handle here. Destroy: the Perl interpreter is closed. END blocks will be executed and global objects will be destroyed here. It is useful to have the service single-thread. For example, when handling external equipment that can not handle concurrent requests, when decisions need to be made without race conditions, the requests are guaranteed to come synchronically. But sometimes it is needed to serve multiple requests concurently. For writing a STAF Service that can serve multiple request concurently, you need to answer a request with the $STAF::DelayedAnswer special variable. Asynchronically, Some internal thread inside the service should call: STAF::DelayedAnswer($requestNumber, $return_code, $answer); The request number is supplied with the request. Note that it is your own responsibility to manage your own threads. It is possible is to use mixed approche. For answers that don't take much time to answer, answer immidiately. (for example, to a query request) And for questions that take time, take the threaded approche and deglate the work for one of the worker threads. For example, this is the SleepService.pm used for testings: package SleepService; use threads; use threads::shared; use Thread::Queue; use strict; use warnings; # In this queue the master threads queue jobs for the slave worker my $work_queue = new Thread::Queue; # keeps track of how many free worker there are. can be below zero, if the # number of worker reached max_workers, and more request are being recieved # then being serviced. my $free_workers : shared = 0; sub new { my ($class, $params) = @_; # this will be printed to the log file print "Params: ", join(", ", map $_."=>".$params->{$_}, keys %$params), "\n"; my $self = { threads_list => [], worker_created => 0, # limiting the number of created worker to some constant. max_workers => 5, }; return bless $self, $class; } sub AcceptRequest { my $self = shift; my $params = shift; # Primilinary checking. maybe we can satisfy this request immidiately, # and won't need to hand it off to a worker thread. if ($params->{trustLevel} < 3) { return (25, "Only trusted client can sleep here"); # kSTAFAccessDenied } if ($params->{request} == 0) { return (0, "still tired"); } # Do we have a waiting worker? if not, create a new one. if ($free_workers <= 0 and $self->{worker_created} < $self->{max_workers}) { my $thr = threads->create(\&Worker); push @{ $self->{threads_list} }, $thr; $self->{worker_created}++; } else { lock $free_workers; $free_workers--; } my @array : shared = ($params->{requestNumber}, $params->{request}); $work_queue->enqueue(\@array); return $STAF::DelayedAnswer; } sub DESTROY { my ($self) = @_; # The main service object itself is being copied with the worker threads, # and in the end of the program they are destroyed. this line make sure # that only the main thread will kill the worker threads. return unless threads->tid == 0; # Ask all the threads to stop, and join them. for my $thr (@{ $self->{threads_list} }) { $work_queue->enqueue('stop'); } for my $thr (@{ $self->{threads_list} }) { eval { $thr->join() }; print STDERR "On destroy: $@\n" if $@; } } sub Worker { my $loop_flag = 1; while ($loop_flag) { # protect myself against exception that will kill a worker eval { # Step one - get the work from the queue my $array_ref = $work_queue->dequeue(); if (not ref($array_ref) and $array_ref eq 'stop') { $loop_flag = 0; return; } my ($reqId, $reqTime) = @$array_ref; # Step two - sleep, and return an answer sleep($reqTime); STAF::DelayedAnswer($reqId, 0, "slept well"); # Final Step - increase the number of free threads { lock $free_workers; $free_workers++; } } } return 1; } 1; Third approch is to use the same API in a single threaded service. Usefull when answer to one client has to wait for a request from other client. Here is a simplified example, that each request will wait until other request will be made: package RollingCatch; use strict; my $last = undef; sub new { my ($class, $params) = @_; return bless {}, $class; } sub AcceptRequest { my ($self, $params) = @_; STAF::DelayedAnswer($last, 0, "byebye") if defined $last; $last = $params->{requestNumber}; return $STAF::DelayedAnswer; } sub DESTROY { STAF::DelayedAnswer($last, 0, "goodbye") if defined $last; } 1; Note that when trying to remove this service, the STAF framework will wait a bit for the last request to end (and it won't, because it is waiting for something to happen) and only then will remove the service. (act that will release the last requestor) For a more advanced/useful example, see t/PerlLocks.pm that emulate Perl's locking and signaling, using single threaded service. Non known. STAF homepage: Fomberg Shmuel, <owner@semuel.co.il> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://search.cpan.org/dist/STAFService/lib/STAFService.pm
CC-MAIN-2015-06
refinedweb
1,406
62.98
Getting started with AMQP and RabbitMQ Getting Started The Advanced Message Queuing Protocol (AMQP1) is an application layer protocol specification for asynchronous messaging. Being built as a wire-level protocol instead of an API (like e.g. JMS2) AMQP clients should be capable of sending and receiving message regardless of their respective vendors. As of now there are already quite a number of server3and client4implementations on multiple platforms available. While the original use case for the AMQP was to provide an interoperable messaging protocol for the financial industry the current standard aims to provide an universal construction kit for generic message queue architectures. In that sense concepts of message-oriented middleware (MOM) systems such as publish/subscribe queues are not implemented directly as first class citizens. Instead users are given the means to establish such concepts by wiring relatively simple AMQ entities together. These entities are also part of the specification and form a layer on top of the wire level protocol: the AMQP model. This model unifies messaging patterns such as the before mentioned publish/subscribe, queues, transactions and streaming while adding extra capabilities such as easily extensible, content-based routing. Publish/subscribe in this context means the decoupling of producers and consumers: producers do not need to know based on what criteria consumers will receive messages. Queues are the structures holding messages in a first-in, first-out fashion. Routing encapsulates the decision which message will eventually turn up in the messages queues present in an asynchronous messaging system. In this introduction I will try to illustrate the concepts introduced by this model using an AMQP client implementation5written by Aman Gupta in Ruby6. It uses a event-driven architecture (based on EventMachine7) and therefore may look and work a bit unfamiliar. However the design of the API shows the correspondence between the AMQ model entities in a very straightforward fashion and should be of value even for programmers not familiar with the Ruby language. It should be noted that there are at least three more Ruby clients available 8, 9, 10. One of those clients, Carrot, has been explicitly written to get back to non-event-driven, synchronous Ruby while preserving much of the clean style in which the event-driven Ruby API is written. The AMQP server used in this article is the RabbitMQ server written in Erlang11. It is an implementation of the release 0-8 of the AMQP specification12, targeting 0-9-1 in the near future. One last thing before getting started: asynchronous messaging is a very common and widespread technology, ranging from the various instant messenger protocols such as Skype or XMPP/Jabber to the good old email. These services all share a couple of traits: -They carry messages with some more or less arbitrary content (e.g. an email containing text and a PowerPoint presentation about office jokes) and some routing information (e.g. an email address) which is somewhat more formalized. -They are asynchronous which means they have to decouple producer and consumer and thus may have to queue messages (e.g. someone sends you a chat message but you are offline or your mailbox receives an email). -The producer and the consumer are distinct roles with different knowledge. I do not need to know your IMAP username and password in order to send you an email. In fact I don’t even need to know if you email address is an alias or a “real" address let alone that you use IMAP to access your mails. This distinction also means that a producer does not control which content is actually read/being subscribed to – exactly like my email application chooses to drop most of the unsolicited medical adverts that are send hourly to my mailbox. The fact the AMQP is an abstract protocol (in the sense that it does not address one specific use case) does not make things much more complicated. On the contrary: the Internet made the metaphors and patterns of messaging ubiquitous. People generally are used to them and asynchronous messaging solves many problems in a straightforward and scalable fashion. As soon as the initial learning roadblock has been overcome modelling asynchronous messaging architectures in AMQ will not add any unnecessary complexity to it. In order to get started with the examples you probably need to install some software. If you already have Ruby running on your system this should take less than 10 minutes. The RabbitMQ site also carries a lot of information13 to get you started as soon as possible. You will need: -The Erlang/OTP package. See for download and for installation instructions. -The RabbitMQ broker. See for download and for installation instructions. -A Ruby VM. If there is no Ruby interpreter installed on your platform of choice you will probably want to download the Ruby MRI VM. See downloads/ for download options and installation instructions. -Two Ruby "gems" (packaged libraries). The gem utility should be distributed along with your Ruby installation. - Update the gem utility itself if you did a fresh install/are not sure if it’s current or not. Type gem update --system. On BSD/UNIX systems you might need to perform this (and the following operations) as superuser. - Tell gem to search for packages on the Github site: gem sources -a - Install the AMQP gem: gem install tmm1-amqp. This should also install the event-machine gem. Now all you need to do is to start the RabbitMQ server14. The AMQ model There are several entities described in the AMQ specification. One way to distinguish between them is whether they are configured by the server administrator or if they are declared on the fly by clients. The configured entities are: - The message broker server itself which listens to AMQ messages e.g. on a TCP/IP socket. -The virtual host which partitions a message brokers data into distinct sets, very much alike the virtual host concept in webservers such as the Apache http daemon. - The user which connects to a virtual host using credentials. 1 require 'rubygems' 2 require 'mq' 3 4 event_loop = Thread.new do 5 EM.run do 6 EM.add_timer(1) do 7 EM.stop 8 end 9 end 10 end 11 12 # connect to the rabbitmq demonstration broker server () 13 14 AMQP.start :host => 'dev.rabbitmq.com', :port => 5672, :user => 'guest', :password => 'guest', :vhost => 'localhost' 15 16 event_loop.join It is noteworthy that any access control beyond the granting of access for a specific user to a specific virtual host has been deprecated in the specification and is subsequently no longer supported by RabbitMQ. Consequently a vendor specific solution15 which addresses this gap is expected to arrive in the next major version of the server. The functionality however16 is already available via the Mercurial source code repositories default branch17 and is actively being used by several RabbitMQ users. In order to operate on the broker a client opens one or more connections to it. These connections are always bound to combination of user and virtual host. The default assumed by the client implementation are the credentials guest/guest and the virtual host /. Both are part of any default installation of the RabbitMQ broker. On a connection the client declares a channel. A channel serves as a logical connection inside of the network connection to the message broker. Such a multiplexing mechanism is required due to the stateful nature of some operations in the protocol. Subsequently concurrent access to a broker over a single connection should be modelled using a pool of channels with serialized access or e.g. thread-local channels in case of a threaded model of concurrency. The Ruby API used in the examples hides the channel management details from the user. Operating on a channel the client is now ready to declare AMQ components. A declaration serves a an assertion that the specified component exists on the broker – if it does not, it is created on the fly. These components are: -The exchange which is the entity to which messages are sent. -The queue which is the entity which receives messages. -The binding which connect exchanges and queues and encapsulates routing information. All these component have different properties but only the exchange and the queue are named. Knowing the name of an exchange grants a client the power to publish messages to it, knowing the name of a queue the capability to receive messages from it. Since there is no standard way to receive the names of all components using the AMQ protocol this implies that access to queues and exchanges can be facilitated or restricted by using well-known or secret names (see18 for an interesting association of this principle with access control). Bindings have no names and are dependant on the lifecycle of the exchange and queue they tie together. If one of those two gets deleted the binding is also void. This implies that knowing the exchange and queue name is required to setup message routing. A message is an opaque piece of data with properties. Among these properties are: -Metadata such as the type of the content encoding or e.g a field identifying the producing application. -Flags regarding delivery and/or storage guarantees for the message. -A special field called routing key. 2.1 Receiving and sending messages: exchange types Sending a message is a straightforward process. The client declares the exchange it wants to send the message to and publishes the message to it. The easiest way to receive a message is to setup a subscription. In order to do that the client declares a queue and a binding between the previously declared exchange and that queue. On that binding a subscription can be set up.') 15 queue = MQ.queue('my-fanout-queue') 16 17 queue.bind(exchange).subscribe do |header, body| 18 yield header, body 19 end 20 21 end 22 23 def send_to_exchange(message) 24 25 exchange = MQ.fanout('my-fanout-exchange') 26 exchange.publish message 27 28 end 29 30 subscribe_to_queue do |header, body| 31 p "I received a message: #{body}" 32 end 33 34 send_to_exchange 'Hello' 35 send_to_exchange 'World' 36 37 event_loop.join Three things determine if a message is actually delivered to a queue: - The type of the exchange. In this example the type is fanout. - The properties of the message. In this example the message has no properties,it just contains a payload (first Hello, then World). - The single, optional, property of the given binding: it’s key. In our example the binding has no key. The type of the exchange determines it’s interpretation of the binding. As our example already hinted the fanout exchange does not interpret anything at all: it delivers messages to all the queues bound to it. Without bindings the exchange would simply never deliver the message to a queue but just drop them. With a subscription on a queue in place the subscriber consumes the message, removing it from the queue. The following exchange types are mentioned in the specification. I will describe them in order of increasing complexity: - The direct exchange delivers messages when the routing-key property of the message is identical to the key property of the binding. 1 require 'rubygems' 2 require 'mq' 3 4 event_loop = Thread.new do 5 EM.run do 6 EM.add_timer(1) do 7 EM.stop 8 end 9 end 10 end 11 12 def subscribe_to_queue(key) 13 14 exchange = MQ.direct('my-direct-exchange') 15 queue = MQ.queue('my-direct-queue') 16 17 queue.bind(exchange, :key => key).subscribe do |header, body| 18 yield header, body 19 end 20 21 end 22 23 def send_to_exchange(message, key) 24 25 exchange = MQ.direct('my-direct-exchange') 26 exchange.publish message, :routing_key => key 27 28 end 29 30 subscribe_to_queue('hello_world') do |header, body| 31 p "I received a message: #{body}" 32 end 33 34 send_to_exchange 'Hello', 'hello_world' 35 send_to_exchange 'Cruel', 'ignored' 36 send_to_exchange 'World', 'hello_world' 37 38 event_loop.join The topic exchange also takes the routing-key property of the message into account by performing a pattern match on it. It does this by splitting the character data of the routing key and binding key intowords. These words are strings seperated by dots. It also recognizes two wildcard characters in the binding key: # matches zero or more words and * matches one word. Example: the binding key *.stock.# matches the routing keys usd.stock and eur.stock.db but not stock.nasdaq. 1 require 'rubygems' 2 require 'mq' 3 4 event_loop = Thread.new do 5 EM.run do 6 EM.add_timer(1) do 7 EM.stop 8 end 9 end 10 end 11 12 def subscribe_to_queue(key) 13 14 exchange = MQ.topic('my-topic-exchange') 15 queue = MQ.queue('my-topic-queue') 16 17 queue.bind(exchange, :key => key).subscribe do |header, body| 18 yield header, body 19 end 20 21 end 22 23 def send_to_exchange(message, key) 24 25 exchange = MQ.topic('my-topic-exchange') 26 exchange.publish message, :routing_key => key 27 28 end 29 30 subscribe_to_queue('hello.*.message.#') do |header, body| 31 p ”I received a message: #{body}” 32 end 33 34 send_to_exchange 'Hello', 'hello.world.message.example.in.ruby' 35 send_to_exchange 'Cruel', 'cruel.world.message' 36 send_to_exchange 'World', 'hello.world.message' 37 38 event_loop.join -There are other exchanges mentioned in the specification such as theheaders exchange (which matches based on application specific properties of a message which are marked as required or optional in the binding key), failover and system exchange types. However none of those types are implemented in the current release of RabbitMQ. In contrast to queues, exchanges have been shown to have a type associated with them that dictates their routing behaviour (usually in collaboration with bindings). Since exchange are named entities the attempt to declare a previously existing exchange with a different type results in an error. Clients must delete such an exchange before declaring it again with the changed type. Exchanges also do have properties. These are: -Durability: if set to true the exchange will survive a broker restart. -Auto deletion: if set to true the exchange will get deleted after all queues bound to it have been deleted. -Passivity: this will not declare the exchange but will cause an exception if no such exchange is present. 2.2 Default exchanges and bindings Each AMQP broker declares one instance of each supported exchange type on it’s own (for every virtual host). These exchanges are named after the their type with a prefix of amq., e.g. amq.fanout. The empty exchange name is an alias for amq.direct. For this default direct exchange (and only for that) the broker also declares a binding for every queue in the system with the binding key being identical to the queue name. This behaviour implies that any queue on the system can be written into by publishing a message to the default direct exchange with it’s routing-key property being equal to the name of the queue. 2.3 Queue properties and multiple bindings This default binding behaviour implies that multiple bindings can exist – from one or many queues to one or many exchanges. This enables the routing of messages send to different exchanges with different routing keys (or other message properties) into a single queue. 1 require 'rubygems' 2 require 'mq' 3 4 event_loop = Thread.new do 5 EM.run do 6 EM.add_timer(1) do 7 EM.stop 8 end 9 end 10 end 11 12 def subscribe_to_queue(*keys) 13 14 exchange = MQ.direct('my-direct-exchange') 15 queue = MQ.queue('my-direct-queue-with-multiple-bindings') 16 17 bindings = keys.map do |key| 18 queue.bind(exchange, :key => key) 19 end 20 21 bindings.last.subscribe do |header, body| 22 yield header, body 23 end 24 25 end 26 27 def send_to_exchange(message, key) 28 29 exchange = MQ.direct('my-direct-exchange') 30 exchange.publish message, :routing_key => key 31 32 end 33 34 subscribe_to_queue('foo', 'bar', 'wee') do |header, body| 35 p "I received a message: #{body}" 36 end 37 38 send_to_exchange 'Hello', 'foo' 39 send_to_exchange 'You', 'gee' 40 send_to_exchange 'Cruel', 'bar' 41 send_to_exchange 'World', 'wee' 42 43 event_loop.join Apart from being named, queues also do carry properties. These are basically the same properties exchanges carry: -Durability: if set to true the queue will survive a broker restart. -Auto deletion: if set to true the queue will get deleted after all consumers have ceased using it. -Passivity: this will not declare the queue but will cause an exception if no such queue is present. -Exclusivity: if set to true this queue can only be used by the declaring consumer. These properties can be used to create e.g. transient and private queues which are exclusive and auto-deleted. Such queues will automatically get removed by the broker if the connection of the declaring client breaks up – they serve as short lived connections to the broker and are useful e.g. for implementing RPC or synchronous communication over the AMQ. An exemplary RPC in AMQP looks like this: the RPC client declares a reply queue with a unique name (e.g. an UUID19) and the properties auto-deleted and exclusive. Then it sends some request to some exchange and includes the name of the previously declared reply queue in the reply-to property of the message. The RPC server would answer to these requests by sending message to the default exchange, using the value in the reply-to field as routing key (relying on the above mentioned default bindings between the default exchange and all queues). Note that this is just a convention. Depending on the contract with the RPC server it could interpret any property (or even the body) of the message to determine where to reply. Queues could also be e.g. persistent and shared or durable, non-autodeleted and not exclusive. Multiple consumers on such a queue would not receive individual copies of the messages send to it. Instead they would share the messages on the queue, removing them atomically while consuming. 2.4 Message delivery guarantees Consumers implicitly or explicitly acknowledge the consumption of a message. When choosing to implicitly acknowledge, a message is considered consumed as soon as it is delivered to the consumer. Otherwise the client has explicitly to send an acknowledgement. Only if this is send, the message is considered received and will get removed from the queue. If not the broker will attempt to redeliver the message as soon as the channel20 on which the message was send before has been closed.-with-acks') 15 queue = MQ.queue('my-fanout-queue-with-acks') 16 17 queue.bind(exchange).subscribe(:ack => true) do |header, body| 18 yield header, body 19 header.ack unless body == 'Cruel' 20 end 21 22 end 23 24 def send_to_exchange(message) 25 26 exchange = MQ.fanout('my-fanout-exchange-with-acks') 27 exchange.publish message 28 29 end 30 31 subscribe_to_queue do |header, body| 32 p "I received a message: #{body}" 33 end 34 35 send_to_exchange 'Hello' 36 send_to_exchange 'Cruel' 37 send_to_exchange 'World' 38 39 event_loop.join 40 41 __END__ 42 43 First run: 44 45 "I received a message: Hello" 46 "I received a message: Cruel" 47 "I received a message: World" 48 49 Second run: 50 51 "I received a message: Cruel" 52 "I received a message: Hello" 53 "I received a message: Cruel" 54 "I received a message: World" 55 56 ... and so forth A message producer can choose to get notified if the message send to an exchange will not get routed to a queue (read: no bindings exist) and/or if there is no consumer on the queue to deal with the message right away. These delivery guarantees can be enforced by setting the message properties mandatory and/or immediate to true. Currently the Ruby AMQP API used for writing the examples in this article does not support these flags entirely. There are however at least two patches that demonstrate how such a support could look like on Github21, 22. Additionally a producer can set the persistent property of a message to true. The broker will perform a best effort to store these message in a non-volatile storage which should survive a broker crash. Naturally it does not make much sense to route persistent messages to non-durable queues. 2.5 Congestion control Consumption of messages was always a subscription in the shown examples. What about congestion control? The specification offers a QoS feature23 which limits the amount of message send to a consumer on a specific channel. Unfortunaly this feature is not yet available in a released version of RabbitMQ (it is planned of 1.6) but is in principal supported by the AMQP API. As an alternative a client could opt to pull messages from the queue instead of getting it via a subscription. When using this approach congestion control can be implemented manually. 1 require 'rubygems' 2 require 'mq' 3 4 event_loop = Thread.new do 5 EM.run do 6 EM.add_timer(5) do 7 EM.stop 8 end 9 end 10 end 11 12 def subscribe_to_queue 13 14 exchange = MQ.fanout('my-fanout-exchange') 15 queue = MQ.queue('my-fanout-queue') 16 17 queue.bind(exchange).pop do |header, body| 18 yield header, body 19 end 20 21 EM.add_periodic_timer(0.25) do 22 queue.pop 23 end 24 25 end 26 27 def send_to_exchange(message) 28 29 exchange = MQ.fanout('my-fanout-exchange') 30 exchange.publish message 31 32 end 33 34 received = 0 35 36 subscribe_to_queue do |header, body| 37 p "I received a message: #{body}" 38 end 39 40 send_to_exchange 'Hello' 41 send_to_exchange 'World' 42 43 event_loop.join An example model Imagine you want to create a trivial chat application. It should feature: -Chat – two users should be able to send each other messages. -A friendship system – users should be able to control who can send them messages. We assume two types of consumers on the broker: friendship servers and chat clients. 3.1 Becoming friends To become friends with a user Bob, user Alice sends a message to the fanout exchange iends. We assume that this exchange is somehow access restricted24: ordinary users cannot bind queues to it. In the message she expresses her wish to befriend Bob. A bunch of chat servers is present on the broker, consuming messages from a single, durable queue bound to the friends exchange. The queue has an unguessable name e.g. friends.298F2DBC6865-4225-8A73-8FF6175D396D which prevents chat client from consuming such messages – remember: without the knowledge of the name of a queue no subscriptions can be set up. When one of the chat servers receives the message of Alice (only one of the processes will actually get the message since they all consume from the same queue) and decides that the request is valid it forwards the message (perhaps changed or augmented) to the default exchange (being direct and durable). It uses another unguessable routing key known only to the client Bob to do that. When signing in for the first time Bob (or one of the servers for that matter) had declared that queue, having the same name as the unguessable routing key (remember that default bindings exist for every queue on a virtual host to the default exchange). The user Bob now gets asked by his chat client if he wants to be friends with Alice. Alice included a special property called reply-to in her request message – this property contained the unguessable name of a durable and exclusive friendship queue that Alice has declared for her future communication with Bob. If Bob wants to be friends with Alice he sends the default exchange a chat message using the name of the friendship queue as routing key. He also declares an exclusive and durable friendship queue and puts it’s name into the reply-to property. Example: The friendship between Alice and Bob is represented by the queue B5725C4A-6621463E-AAF1-8222AA3AD601. This is the value of the routing-key property of Bobs messages to Alice, the name of the queue Bobs messages for Alice are turning up in and it is the value of the reply-to property of Alices messages to Bob. Since these friendship queues are durable, messages sent while the chat users are offline are not getting lost. When logging in users would consume all the message waiting for them in their friends queues while subscribing to new messages on it. Should Bob ever decide that he does not like Alice anymore he can simply delete the friendship queue he declared for Alice. Alice will notice this when she sends messages using the mandatory flag. This will cause the exchange to return her messages as not routable. Things left unmentioned There are many areas left untouchted by this introduction. Missing are e.g. transaction semantics, details about the re-routing of messages, the matching specifications of the header exchanges and details about the differences between the AMQP specifications – especially the model changes that are lying ahead in the version 1.0. For the sake of brevity a presence model for the chat example was also omitted. The management perspective has been left out of the picture as it is not yet clear which direction AMQP in general and RabbitMQ in particular will take. Currently there is one topic exchange available in the reserved amq. namespace which gets all the log message of the broker. However the central tool to show the currently declared components and connected users is implemented in the administrative rabbitmqctl commandline interface instead of an AMQ entity. 1 require 'rubygems' 2 require 'mq' 3 4 PATH_TO_RABBITMQCTL = '/usr/local/sbin/rabbitmqctl' 5 6 event_loop = Thread.new { EM.run } 7 8 def subscribe_to_logger 9 10 random_name = (0...50).map{ ('a'..'z').to_a[rand(26)] }.join 11 12 exchange = MQ.topic('amq.rabbitmq.log') 13 queue = MQ.queue(random_name, :autodelete => true, :exclusive => true) 14 binding = queue.bind(exchange, :key => '#') 15 16 binding.subscribe do |header, body| 17 body.split("\n").each do |message| 18 yield header, message 19 end 20 end 21 22 end 23 24 def exchange_info(vhost = '/') 25 info :exchange, vhost, %w(name type durable auto_delete arguments) 26 end 27 28 def queue_info(vhost = '/') 29 info :queue, vhost, %w(name durable auto_delete arguments node messages_ready messages_unacknowledged messages_uncommitted messages acks_uncommitted consumers transactions memory) 30 end 31 32 def binding_info(vhost = '/') 33 info :binding, vhost 34 end 35 36 def connection_info 37 info :exchange, nil, %w(node address port peer_address peer_port state channels user vhost timeout frame_max recv_oct recv_cnt send_oct send_cnt send_pend) 38 end 39 40 def info(about, vhost = nil, items = []) 41 42 column_length = 20 43 44 puts "#{about} info\n" 45 46 cmd = "#{PATH_TO_RABBITMQCTL} list_#{about}s" 47 cmd << " -p #{vhost}" if vhost 48 cmd << " #{items.join(' ')} 2>&1" 49 50 pipe = IO.popen(cmd) 51 52 pipe.readlines.map { |line| line.chomp.split("\t").map { |item| item.ljust(column_length)[0, column_length] } }.slice(1..-2).each do |exchange| 53 print exchange.join(' ') + "\n" 54 end 55 56 end 57 58 subscribe_to_logger do |message| 59 p "RabbitMQ logger: #{message}" 60 end 61 62 %w(connection exchange queue binding).each do |method| 63 self.send "#{method}_info".to_sym 64 end 65 66 event_loop.join It should also be mentioned that there are already a few distribution frameworks available which use AMQP (or even RabbitMQ specifically). These frameworks (e.g. Nanite25 or Lizzy26) introduce more or less abstract layers on top of AMQP in order to facilitate operations such as the distribution of work over Ruby clients in a cluster. 4.1 Where to go next? Apart from toying around with a locally installed broker the friendly and responsive mailing list27, 28 should be the first stop for learning more about AMQP and RabbitMQ. Apart from that you could have a look at the presentations and articles linked on the RabbitMQ homepage29, chat with members of the community using the #rabbitmq channel on the freenode30 IRC network or read one31 of32 the33 various blogs with RabbitMQ and/or AMQP related content, for starters the blog of LShift34, one of the founders of RabbitMQ. There are also quite a few AMQP and/or RabbitMQ specific tweets available on Twitter35 via the hashtags #rabbitmq and #amqp. Have fun exploring and welcome to the world of asynchronous messaging! 1 2 ttp://java.sun.com/products/jms/ 3 Advanced Message Queuing Protocol/Implementations 4 5 6 7 8 9 10 11 Erlang 12 13 14 15 AccessControlDesign 16 ACLs 17 18 Minimum Air Induction 19 Universally Unique Identifier 20 Or the connection associated with the channel. 21 somic/amqp 22 yawn/amqp 23 BasicQosDesign 24 As an alternative Alice could have been given another special routing key for performing friend requests. All the chat servers would bind friends.298F2DBC-6865-4225-8A73-8FF6175D396D with the binding keys of all valid users of the chat system. Other variants are possible - in fact all of the modelling decisions in this example could have been made in lots of different ways. 25 ezmobius / nanite 26 bmizerany / lizzy 27 lists.rabbitmq.com Mailing Lists 28 RabbitMQ 29 RabbitM - Highlights: presentations, blogs and code 30 freenode 31 Minimum Air Induction 32 Kirk's Rants blogspot 33 34 35 Twitter code examples by alexis richards
http://www.infoq.com/articles/AMQP-RabbitMQ
CC-MAIN-2013-48
refinedweb
4,887
64.41
Hey there. It's Erinn and I just have a quick question about my assignment that I am working on. I have everything right except for one part...don't u hate that...lol. Anyway, here is the code and assignment below. Sorry there is no code, but it's been a long day and I'm tired. The assignment is: Write a program which asks the user for a series of pairs of values: loanAmount and numMonths. There might be as many as 10 of these. After getting all of the input, print a list of the loans, the number of months, and the payment per month (no interest charged). For example: Please enter a loan amount: 1000 Please enter the number of months: 10 Continue (yes/no)? yes Please enter a loan amount: 999 Please enter the number of months: 30 Continue (yes/no)? yes Please enter a loan amount: 1234 Please enter the number of months: 5 Continue (yes/no)? no ************************* <<- YES PRINT THESE ASTERISKS There are 3 loans. Loan 1 for $1000 for 10 months has a payment of $100 per month Loan 2 for $999 for 30 months has a payment of $33.3 per month Loan 1 for $1234 for 5 months has a payment of $246.8 per month TOTAL MONTHLY PAYMENT: $380.1 Here is the coding I have. The only question I have is on the part where it says, "There are 3 loans." The part of the code I need help with is in bold. Again, everything I have works and is fine except how to do I properly write that calculation and do I place it there or before the while? I get three when I do this program, but when I just for the heck of it try additional ones other than 3, i just get 3. For example, the assignment says only three, but I try four, and I only get three and not four. Could someone help me with this part? Thanks :) #include <iostream> #include <string> using namespace std; int main() { double loanAmounts[10]; int numMonths[10]; string keepGoing; int counter = 0; double payment = 0; double totalMonthlyPayment = 0; do { cout << "Please enter a loan amount: "; cin >> loanAmounts[counter]; cout << "Please enter the number of months: "; cin >> numMonths[counter]; payment = loanAmounts[counter] / numMonths[counter]; totalMonthlyPayment = totalMonthlyPayment + payment; counter++; cout << "Continue (yes/no) "; cin >> keepGoing; } while ((keepGoing == "yes") || (keepGoing == "YES")); cout << "**********************" << endl; for (int x = 0; x < counter; x++) { double payment = (double)loanAmounts[x] / (double)numMonths[x]; int loanNumber = x + 1; [B]int totalLoans = loanNumber + loanNumber + 1;[/B] cout << "There are " << totalLoans << " loans. " << endl; cout << "Loan " << (x+1) << " for $ " << loanAmounts[x]; cout << " for " << numMonths[x] << " months has a payment "; cout << " of " << payment << " per month " << endl; } cout << "TOTAL MONTHLY PAYMENT: " << totalMonthlyPayment << endl; }
https://www.daniweb.com/programming/software-development/threads/119738/nevermind-ignore-arrays-problem-quick-question
CC-MAIN-2021-43
refinedweb
463
78.48
. The high-order 10 bits of the function value are function modifiers. These are individual bits that alter the basic operation to be performed. For example, you can specify the function modifier IO$M_NOECHO with the function IO$_READLBLK to a terminal. When used together, the two values are written in VAX MACRO as IO$_READLBLK!IO$M_NOECHO. This causes data typed at the terminal keyboard to be entered into the user buffer but not echoed to the terminal. Figure 23-6 shows the format of function modifiers. Figure 23-6 Function Modifier Format There are two device- or function-independent modifier bits: IO$M_INHRETRY and IO$M_DATACHECK (a third bit is reserved). IO$M_INHRETRY is used to inhibit all error recovery. If any error occurs and this modifier bit is specified, the operation is terminated immediately and a failure status is returned in the I/O status block (see Section 23.10). Use IO$M_DATACHECK to compare the data in memory with that on a disk or magnetic tape. 23.5 Assigning Channels Before any input or output operation can be performed on a physical device, you must assign a channel to the device to provide a path between the process and the device. The Assign I/O Channel (SYS$ASSIGN) system service establishes this path. When you write a call to the SYS$ASSIGN service, you must supply the name of the device, which can be a physical device name or a logical name, and the address of a word to receive the channel number. The service returns a channel number, and you use this channel number when you write an input or output request. For example, the following lines assign an I/O channel to the device TTA2. The channel number is returned in the word at TTCHAN. #include <descrip.h> #include <lib$routines.h> #include <ssdef.h> #include <starlet.h> #include <stdio.h> #include <stsdef.h> main() { unsigned int status; unsigned short ttchan; $DESCRIPTOR(ttname,"TTA2:"); /* Assign a channel to a device */ status = SYS$ASSIGN( &ttname, /* devnam - device name */ &ttchan, /* chan - channel number */ 0, /* acmode - access mode */ 0, /* mbxnam - logical name for mailbox */ 0 ); /* flags */ if (!$VMS_STATUS_SUCCESS(status)) LIB$SIGNAL(status); return SS$_NORMAL; } To assign a channel to the current default input or output device, use the logical name SYS$INPUT or SYS$OUTPUT. For more details on how SYS$ASSIGN and other I/O services handle logical names, see Section 23.2.5. 23.5.1 Using the Share Privilege with the SYS$ASSIGN and SYS$DASSGN Services Use of SHARE privilege should be made only with caution, as applications, application protocols, and device drivers coded to expect only exclusive access can encounter unexpected and potentially errant behavior when access to the device is unexpectedly shared via use of SHARE privilege. If you use the SHARE privilege to override the exclusivity requested by another process's call to the system service SYS$ASSIGN, and the original process then attempts to deassign its channels via explicit calls to SYS$DASSGN or via the implicit calls to SYS$DASSGN made during image or process rundown, the OpenVMS last-channel-deassign code may not operate as expected due to the assignment of the additional I/O channels to the device. The presence of these extra channels will prevent the last-channel-deassign code from releasing the ownership of the device, potentially resulting in a device owned by the process identification (PID) of a nonexistent process. Unless its use is explicitly supported by the application, the application protocol, and the device driver, the use of SHARE privilege is generally discouraged. 23.6 Queuing I/O Requests All input and output operations in the operating system are initiated with the Queue I/O Request (SYS$QIO) system service. The SYS$QIO system service permits direct interaction with the system's terminal driver. SYS$QIOs permit some operations that cannot be performed with language I/O statements and RTL routines; calls to SYS$QIO reduce overhead and permit asynchronous I/O operations. However, calls to SYS$QIO are device dependent. The SYS$QIO service queues the request and returns immediately to the caller. While the operating system processes the request, the program that issued the request can continue execution. The format for SYS$QIO is as follows: Required arguments to the SYS$QIO service include the channel number assigned to the device on which the I/O is to be performed, and a function code (expressed symbolically) that indicates the specific operation to be performed. Depending on the function code, one to six additional parameters may be required. For example, the IO$_WRITEVBLK and IO$_READVBLK function codes are device-independent codes used to read and write single records or virtual blocks. These function codes are suitable for simple terminal I/O. They require parameters indicating the address of an input or output buffer and the buffer length. A call to SYS$QIO to write a line to a terminal may look like the following: #include <starlet.h> unsigned int status, func=IO$_WRITEVBLK; . . . status = SYS$QIO(0, /* efn - event flag */ ttchan, /* chan - channel number */ func, /* func - function modifier */ 0, /* iosb - I/O status block */ 0, /* astadr - AST routine */ 0, /* astprm - AST parameter */ buffadr, /* p1 - output buffer */ buflen); /* p2 - length of message */ Function codes are defined for all supported device types, and most of the codes are device dependent; that is, they perform functions specific to a particular device. The $IODEF macro defines symbolic names for these function codes. For information about how to obtain a listing of these symbolic names, see Appendix D. For details about all function codes and an explanation of the parameters required by each, see the HP OpenVMS I/O User's Reference Manual. To read from or write to a terminal with the SYS$QIO or SYS$QIOW system service, you must first associate the terminal name with an I/O channel by calling the SYS$ASSIGN system service, then use the assigned channel in the SYS$QIO or SYS$QIOW system service. To read from SYS$INPUT or write to SYS$OUTPUT, specify the appropriate logical name as the terminal name in the SYS$ASSIGN system service. In general, use SYS$QIO for asynchronous operations, and use SYS$QIOW for all other operations. 23.7 Synchronizing Service Completion The SYS$QIO system service returns control to the calling program as soon as a request is queued; the status code returned in R0 indicates whether the request was queued successfully. To ensure proper synchronization of the queuing operation with respect to the program, the program must do the following: Optional arguments to the SYS$QIO service provide techniques for synchronizing I/O completion. There are three methods you can use to test for the completion of an I/O request: The use of these three techniques is shown in the examples that follow. Example 23-1 shows specifying event flags. #include <lib$routines.h> #include <starlet.h> unsigned int status, efn=0, efn1=1, efn=2; . . . status = SYS$QIO(efn1,...); /* Issue 1st I/O request */ if (!$VMS_STATUS_SUCCESS(status)) LIB$SIGNAL( status ); /* Queued successfully? */ (1) . . . status = SYS$QIO(efn2,...); /* Issue second I/O request */ (2) if (!$VMS_STATUS_SUCCESS(status)) /* Queued successfully? */ LIB$SIGNAL( status ); . . .(3) status = SYS$WFLAND( efn, / *Wait until both are done */ &mask,...(4) . . . Example 23-2 shows specifying an AST routine. #include <lib$routines.h> #include <starlet.h> #include <stsdef.h> unsigned int status, astprm=1; . . . status = SYS$QIO(...&ttast, /* I/O request with AST */ (1) astprm...); if (!$VMS_STATUS_SUCCESS( status )) /* Queued successfully? */ LIB$SIGNAL( status ); . . . } void ttast ( int astprm ) { /* AST service routine */ (2) /* Handle I/O completion */ . . . return; } /* End of AST routine */ Example 23-3 shows specifying an I/O status block. #include <lib$routines.h> #include <stdio.h> #include <ssdef.h> #include <starlet.h> #include <stsdef.h> . . . /* I/O status block */ struct { unsigned short iostat, iolen; unsigned int dev_info; }ttiosb; (1) unsigned int status; . . . status = SYS$QIO(,..., &ttiosb, ...); (2) if( !$VMS_STATUS_SUCCESS( status )) /* Queued successfully? */ LIB$SIGNAL( status ); . . . while(ttiosb.iostat == 0) { /* Loop -- with delay -- until done */ (3) } if( !$VMS_STATUS_SUCCESS( ttiosb.iostat )) { /* Perform error handling */ . . . } HP recommends that you use the Synchronize (SYS$SYNCH) system service to wait for completion of an asynchronous event. The SYS$SYNCH service correctly waits for the actual completion of an asynchronous event, even if some other event sets the event flag. To use the SYS$SYNCH service to wait for the completion of an asynchronous event, you must specify both an event flag number and the address of an I/O status block (IOSB) in your call to the asynchronous system service. The asynchronous service queues the request and returns control to your program. When the asynchronous service completes, it sets the event flag and places the final status of the request in the IOSB. In your call to SYS$SYNCH, you must specify the same efn and I/O status block that you specified in your call to the asynchronous service. The SYS$SYNCH service waits for the event flag to be set by means of the SYS$WAITFR system service. When the specified event flag is set, SYS$SYNCH checks the specified I/O status block. If the I/O status block is nonzero, the system service has completed and SYS$SYNCH returns control to your program. If the I/O status block is zero, SYS$SYNCH clears the event flag by means of the SYS$CLREF service and calls the $WAITFR service to wait for the event flag to be set. The SYS$SYNCH service sets the event flag before returning control to your program. This ensures that the call to SYS$SYNCH does not interfere with testing for completion of another asynchronous event that completes at approximately the same time and uses the same event flag to signal completion. The following call to the Queue I/O Request (SYS$QIO) system service demonstrates how the SYS$SYNCH service is used: . . . #include <lib$routines.h> #include <starlet.h> unsigned int status, event_flag = 1; struct { short int iostat, iolen; unsigned int dev_info; }ttiosb; . . . /* Request I/O */ status = SYS$QIO (event_flag, ..., &ttiosb ...); if (!$VMS_STATUS_SUCCESS(status)) LIB$SIGNAL( status ); . . . /* Wait until I/O completes */ status = SYS$SYNCH (event_flag, &ttiosb ); if (!$VMS_STATUS_SUCCESS(status)) LIB$SIGNAL( status ); . . .
http://h71000.www7.hp.com/doc/82final/5841/5841pro_065.html
CC-MAIN-2015-40
refinedweb
1,708
54.93
Loads climate and hydrology data from ACIS (NOAA RCCs), CoCoRaHS, Hydromet (USBR), SNOTEL AWDB (NRCS) and NWIS (USGS). Project Description climata is a pythonic interface for loading and processing time series data from climate and flow monitoring stations and observers. climata leverages a number of webservices as listed below. climata is powered by wq.io, and shares its goal of maximizing the reusability of data parsing code, by smoothing over some of the differences between various data formats. Getting Started # Recommended: create virtual environment # python3 -m venv venv # . venv/bin/activate pip install climata See to report any issues. Available Services Usage Command-line interface: # Load metadata for sites in Upper Klamath Lake basin wq cat climata.acis.StationMetaIO "basin=18010203" > sites.csv # Load daily average temperature for these sites data.csv Python API: from climata.acis import StationDataIO # Load average temperature for sites in Upper Klamath Lake basin sites = StationDataIO( basin="18010203", start_date="2017-01-01", end_date="2017-01-31", parameter="avgt" ) # Display site information and time series data for site in sites: print site.name for evt in site.data: print evt.date, evt.avgt More Python code examples are available via the climata-viewer website. Download files Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
https://pypi.org/project/climata/
CC-MAIN-2018-17
refinedweb
219
51.34
take this prog and save it then compile and run #include <dos.h> #include <bios.h> #include <stdlib.h> #include <stdio.h> struct DAP { unsigned char size; unsigned char reserved1; unsigned char blocks; unsigned char reserved2; unsigned char far *buffer; unsigned long int lbalod; unsigned long int lbahid; } dap; char st[80]; unsigned char buf[512]; FILE *fptr ; void main (void) { puts ("enter the lba low double word: "); gets (st); dap.lbalod=atol(st); puts ("enter the lba high double word: "); gets (st); dap.lbahid=atol(st); dap.size=16;close (fptr); } you are about to compelet: just write like this and press enter: -d1234:5678 nd also make sure that u chng BOIS seeting into USB sumaira tell me one thing...once we set the flash as our 1st boot. then system boot from flash then how can you interact with window as you are not in the environment window...... sumaira shabbir does your lba.txt showing any content using flash ? May Allah Bless u B FOR FAZAL.........u r right .Jazak Allaho khaira wa Ahsanul jaza ...... Theek ho gya .....Age btao ab kia karon read the last pages of discussion best of luck! stay blessed last page kon sa hy wo bhi bta de kiu k jab tak discussion ho rahi hy .......last page ka pta nahi kon sa ho ga???????? enter value in lba low doubl word and high double word such as 1234 5678 © 2020 Created by +M.Tariq Malik. Promote Us | Report an Issue | Privacy Policy | Terms of Service
https://vustudents.ning.com/forum/topics/disscus-solution-of-assignment-no-03-of-system-programming-cs609?groupUrl=cs609systemprogramming&groupId=3783342%3AGroup%3A59533&id=3783342%3ATopic%3A3915923&page=21
CC-MAIN-2020-34
refinedweb
254
84.98
I saw this trick the other day and thought it was pretty handy, so thought I’d save it here for future reference. The following example shows how you can use the flash.filters classes in your MXML code by creating a new XML namespace. Full code after the jump. <?xml version="1.0" encoding="utf-8"?> <!-- --> <mx:Application xmlns: <mx:Array <flash.filters:DropShadowFilter <flash.filters:BlurFilter </mx:Array> <mx:Label </mx:Application> View source is enabled in the following example. 5 thoughts on “Using the flash.* classes in MXML” peterd, today, my boss told me that”Do not binding font in the swf”, so i have to load a external font from the server. Now, i spend a long time to solve it. Although, i didn’t know why? Why not binding a new font in the swf(while it will be larger)? BTW, my english is pool.Sorry;( dormouse, I don’t know of any reasons to do one or the other (not that there aren’t valid reasons, I just don’t know why one method is preferable to the other). I did have an entry on using fonts from a SWF in an MXML application, but it has been in my drafts for a month or so now. I’ll see if I can dig that up. In the meantime, check out the Adobe Flex 2 Developer’s Guide documentation on LiveDocs, “Using Fonts”. And more specifically, this section “Embedding fonts from SWF files”. Hope that helps, Peter PS: Any readers out there care to educate me on why fonts embedded in SWFs are preferable to TTF fonts embedded in MXML? peterd Thanks, i have saw the Adobe Flex 2 Developer’s Guide documentation. In it, using flash 8 to create swf with embedded fonts. But i use mxmlc order to create it. Code:FontSkin.as package { import flash.display.Sprite; public class FontSkin extends Sprite { [Embed(mimeType=’application/x-font’, source=’xujinglei.fon’, fontName=’handFont’)] public var MyFont:Class; } } then in the console input mxmlc FontSkin.as to create swf. It is my first to write, there is any things wrong?Can you give me some tips, Thanks for your applys oh that’s a really cool trick :) Thanks Peter! , Simple using Blur Filters with function.
http://blog.flexexamples.com/2007/09/26/using-the-flash-classes-in-mxml/
CC-MAIN-2017-22
refinedweb
382
76.01
- RG:The framework redistributable is 25 MB, which is many times larger than the Java redistributable. One of the lessons of the early versions of Visual Basic was that the shareware and freeware market created the popularity of the language. While there are some shareware apps written in .NET, I often hear people complain about the huge redistributable. - RG: Almost the first thing I posted on the technical preview newsgroups was a simple console application in Cool, and its equivalent in Java with the rhetoric question to spot the difference. - RG: There are classes that are mere wrappers around Win32, but there are other classes that appear to be ported from other frameworks. Before it released .NET, Microsoft had its own Java framework library called WFC, and it also had a managed library as part of the Visual Basic (classic) runtime. It would be nice to know how many classes from WFC and VB were ported to .NET. My Response:? - RG: Interfaces are elegant but .NET’s preference for class-based solutions has marked the death of interfaces. Look at .NET remoting: This has been provided to allow an object to run in the context where it was created, and be accessed from another context. This means that the object state is kept local, and it is the behavior that is remoted. Thus, remoting is an interface-based facility. You can use .NET remoting with interfaces, but reading through the documentation and all of the “how-tos” on the Web, you wouldn’t realize this. Point #1 – Interfaces are dead - My Response: Interfaces are used everywhere in the .NET Framework and are especially valuable given single inheritance in languages like VB and C#. Even the simple string class has IComparable, ICloneable, IConvertible, and IEnumerable interfaces. Going forward, one of the key new features for the .NET Framework 2.0, generics, uses interfaces for constraining data types. Point #2 – Lack of documentation on using interfaces with .NET Remoting - My Response: I am by no means saying that our documentation is flawless, but here’s a link to the .NET Framework SDK Samples on Remoting. Notice the fifth sample down is using Interfaces with remoting. I also outline our guidance on using interfaces for remoting below. - RG: .NET can use interfaces but the preferred way is to use classes. - RG: Instead, Microsoft prefers people to use a class-based approach, which often results in the bizarre situation of people deploying their server assembly to the client so that the client has the metadata of the service objects available, or a soapsuds assembly, which basically was a hack to get around the problems of having class. - RG: Microsoft’s current operating systems, XP and Windows 2003, do not depend on .NET; and with XP, .NET is an optional component. My Response: This is a half-truth at best. While Windows XP Professional does not use the .NET Framework, that’s because the .NET Framework was released after Windows XP Professional shipped. Let’s look at the operating systems that shipped after the .NET Framework was released: - Windows XP Media Center edition requires the .NET Framework for MCE-specific applications. - Windows XP Professional Tablet PC Edition requires the .NET Framework for handwriting recognition which is a managed application. - Windows Server 2003 requires the .NET Framework to use ASP.NET, UDDI Services, or Sharepoint Team Services. - Windows Small Business Server 2003 requires the .NET Framework for ASP.NET as do SBS specific applications like Remote Web Workplace, and the Backup Snap-in. On Longhorn and the death of browser applications - RG: My opinion is that Avalon, or more specifically, XAML, will mark the death of ASP. The reason is that Avalon is a client-side technology, but the browser is an important part of the distribution model. XAML is so rich that a browser-contained XAML application will look no different to a process-based Avalon application, and coupled with Web Services or Indigo (as the mechanism to access remote code), an XAML application will make an ASP.NET application look paltry and antiquated. Why would Microsoft want to kill ASP? Well, with installation of ASP.NET Microsoft sells a single copy of Windows 2003 and perhaps a handful of copies of Visual Studio.NET. The clients don’t have to be Windows, so there is no extra sale to Microsoft (whether as a product or licence). This is hardly a great revenue generator, and worse, ASP.NET actually makes it easy to write the application so that it can be used by browsers other than IE.: - Operating Systems - Transaction Engine - Middleware - Database - RG: I take the decision to make Avalon available to other versions of Windows as a lack of confidence in the sales of Longhorn. - RG: However, Microsoft’s announcement that Avalon will be available for other versions of Windows indicates to me that they are not so confident on the uptake of Longhorn, and developers will not write applications for Avalon if they are not convinced that there will be the clients that will run it. - RG: So, with the announcements they have made last year, Microsoft has indicated that Longhorn will not be the great .NET innovation that we were lead to believe it was from PDC 2003. This indicates to me that Microsoft is losing confidence in .NET.. - RG: The framework has become Visual Basic—it’s intended for users to develop applications, but not for Microsoft to create operating systems or the revenue generating products that they base their profits on.. - Client – Check - Information Worker – Check - Server & Tools – Check - Home and Entertainment – Check - MSN – Check - MBS – Check - Mobile and Embedded Devices – Check I hope this clears up and FUD, half-truths and any misconceptions on managed code. If something is incorrect here, please let me know! Richard Said "There have been a few .NET products written entirely in .NET" and goes on to mention the Microsoft CRM. I’d like to call out two others that (AFAIK) are almost entirely written in managed code. SQL Server Reporting Services and Biztalk Server 2004 (please correct me if I’m wrong here). Given the long development cycle and the fact that re-writing working code is a fairly crazy proposition no matter what it is written in it is not that surprising to me that we are only seeing a few "new" products from Microsoft starting to be released in .NET. Looks like Richard is moving his interest away from .Net says "Richard has used .NET for five years, he was on the technical preview for COM+2 which was the technology that eventually became .NET. Richard has decided to break his link with .NET, this site will continue to contain the free .NET resources that Richard has produced over the last 5 years, but Richard will no longer be available to do any more work on .NET. He will not write any more .NET articles, no more .NET books and will no longer speak at .NET conferences. Watch this page for more details about why Richard made his decision." The whole article by Grimes was a rant that I found comical quite frankly. Don’t get me wrong, I enjoyed the read, but it was clearly a rant. About the only point that made sense was the remoting documentation, but just barely. While early .NET MSDN documentation did sort of lack clarity with respect to remoting, guys in the community like Mike Woodring and Keith Brown have a ton of remoting examples available using interfaces. Don’t even get me started on Ingo Rammer who has written the best remoting book ever. Plus, even Don Box has made it clear what he thinks of soapsuds (). The whole point about Avalon/XAML being the attempt to replace web applications was a huge reach. Can anyone seriously argue that you can create rich WinForms right now compared to what XAML can and will do? No friggin way. Why else would anyone write a binary DHTML behavior? Markup is a wonderful thing. OK, I giggled at the VB jokes – but nobody is going to take that seriously because everyone has their own idea on what a great programming language is and/or should be. Great post Dan. I don’t disagree with you overall. But regarding: ?" It seems that the C# language and the CLR model looks similar to Java. But the framework (libraries) look more like pre-existing win32 or mfc APIs, maybe? The two statements may co-exist. Richard Grimes is a C++ veteran… as I recall he’s one of the few people who actually *liked* MFC, and preferred it over Windows Forms programming. He also seems to be one of the even fewer people who understand COM (that makes two of them, together with Don Box). I’m not surprised that he tries to find fault with .NET, I’m more surprised that it took him so long to jump ship. " While I agree with Joseph that it’s expensive and time consuming to re-write working code Richard has a point. Until you’ve built a product from the ground up using only .NET, you’ll have no clue how your end users who are doing the exact same thing are fairing. Using managed code within an unmanaged application is completely different than using unmanaged code in a managed application, which I’m sure you understand a lot better than me. It’s good to know MS is dogfooding it’s own framework. You’re also more inclined to move heaven and earth for a team that makes your company revenue than a customer (no matter how important that customer is). What this means is the Avalon, Indigo, and other teams will hit problems in the .NET framework and get them resolved quicker and better than any customer you have since you are your greatest customer. I do agree though that having a completely managed solution is not perfect for every case. Microsoft does need to build robust real world applications using the .NET framework, though. You’ll then have the ability to point to something and say "Wanna do that? .NET lets you, here’s how." That says more than singing the praises of .NET with some samples and a lot of documentation. A lot of people aren’t going to make the jump to .NET until they see Microsoft building fully managed applications as they would be doing. I suppose that when Frontpage is obsolete, MS will be offering "Xamlpage", most likely written entirely in managed code. No doubt we will be seeing some very exciting new home user oriented managed apps too. But currently it seems MS is mostly applying .NET on the business/enterprise front (not counting enabling stuff like Avalon). My Response: I’ll avoid responding to the VB bashing as someone is already working on that. Dan, who is that someone? // Ryan Ryan, Jay Roxe, the Visual Basic Product Manager is working on a response. It should be posted on his blog soon, Thanks, -Dan While I do agree the article was a bit more rant than it needed to be. The response is so painfully typical. Microsoft never does anything wrong, god forbid you actually address the technical points instead or talking around them. Please, just this once, concede that when someone does point out potential mis-steps in a Microsoft product, they might be RIGHT! OMG! Several of the classes were so poorly designed it’s laughable. AGREE TO THIS! It’s true. Don’t talk around it.. Bottom line is you will never look good in a argument like this as long as you own the platform and the products are built for ONLY that platform, especially when you talk about web depolyment. Just face it. This guy thinks .net is too easy and that’s it’s bad we don’t spend hours working on something that can be done in minutes. How obtuse is he? Check out his web site,, and click on About, then click full bio. At the bottom you’ll find that he listed his email, but rather then use a contact me form, or listing it directly, he ENCODED HIS EMAIL address in Rot 13 encryption!! Do you really want to take advice on "usability" from someone who thinks it’s a good idea to encrypt their email address? [df] I wanted to respond to "Bill’s" comments. [Bill] While I do agree the article was a bit more rant than it needed to be. The response is so painfully typical. Microsoft never does anything wrong, god forbid you actually address the technical points instead or talking around them. [df] To be clear here, I never said Microsoft was perfect or that Richard’s post was a rant. On the contrary, I think there are lots of things Microsoft can improve. You should read my blog post about how I’m fighting for representation of C# TechEd sessions or what features I want for a SQL tool. [Bill] Please, just this once, concede that when someone does point out potential mis-steps in a Microsoft product, they might be RIGHT! OMG! Several of the classes were so poorly designed it’s laughable. AGREE TO THIS! It’s true. Don’t talk around it. [df] You asked me to concede Microsoft missteps, here’s my opinion on three: Microsoft Bob, .NET My Services, or, as Richard somewhat alluded to, the marketing for the term ".NET". To your point about Richard pointing out flaws, Richard only pointed out one class in the entire article, the EventLog class. He didn’t even say what was wrong with the class or how we should fix it or even how to mitigate against the design flaw. He just said it was broken, but that it would be fixed in the next version. We are NOT closed to criticism at all. Our goal is to build the best framework and platform for developing applications. If you think there are classes in the .NET Framework that are, in your words, "poorly designed", tell us. You can use the MSDN Product Feedback center,, and give us suggestions, file bugs and even get the community to vote on your suggestions. We *want* to make the .NET Framework a great framework for developing applications. If you think there are some parts that aren’t well designed, take action, file a suggestion and tell us how you think we should redesign it. With Visual Studio 2005, we’ve made some big leaps to add customer requests like adding Edit and Continue in C#. Help us help you. [Bill]. [df] I agree with you, as far as teams developing software at Microsoft, Office *client* software is one of the slowest to adopt .NET. As Richard pointed out in the article, MS-CRM is largely written in managed code. Sharepoint Portal Server is fully written in managed code, and at least 90% of SQL Server Reporting Services is. On your point on including the .NET Framework with XP SP2, while we may have liked to include the .NET Framework in XP SP2, we got a lot of customer requests to *NOT* add any non-security features to service packs. From a purely selfish perspective of getting as many clients to have the .NET Framework installed, including this would have been great, but our customers would have complained. The headline on Slashdot would be about how bad Microsoft is because we used security fixes to distribute an application runtime. We’re damned if we do, and damned by you if we don’t. [Bill]. [df] LOL, there is no "ultimate plan" or at least not one that I’ve seen. If I had to some up the Developer Division’s goals it would be incredibly easy to increase developer adoption and ensure developer satisfaction. You now know the ultimate plan [Bill] Bottom line is you will never look good in a argument like this as long as you own the platform and the products are built for ONLY that platform, especially when you talk about web depolyment. Just face it. [df] I think this is true to some extent as I am a Microsoft employee. I also felt like I needed to respond to factually incorrect information from a respected author and magazine. If it’s wrong and I didn’t respond, then one might assume that everything Richard wrote would be true. Thanks, -Dan My email address is well known, I just wondered why you did not think it important to find out what I really thought (but could not publish) about .NET? Perhaps I should make some comments about your rebuttal. I take your point about the size of the Java redistributable, but my comments were not as a Java advocate. I was not suggesting that people switch to Java – far from it – I was merely pointing out that it was smaller than the .NET framework redistributable and therefore a smaller redistributable is possible. I made those comments because I have had conversations with many developers, particularly people targetting shareware, who have told me that the sheer size of the runtime has disuaded them from writing .NET apps (clearly you are not talking to the same developers as me!). They want to make sure that people will be able to run their apps immediately after downloading them. My point was that the framework could have been much smaller by supplying only a core framework and then providing additional optional assemblies. I addressed this issue in one of my DDJ newsletters, which you can find in the archive on the DDJ site. This issue will be irrelevant when all Windows machines come with the framework, XP, of course, doesn’t. I should also point out that in many parts of the world (including my country, the United Kingdom) people have to pay for dial up by the minute, so a 23Mb download is not a trival option. I did not want to make derogative statements about C#, and if you have read any of the articles, or the books I have written on this language, you would know that I have a high regard of C#. My point about the cool application being similar to the Java application was to point out the response of the COM+2 product manager’s response: the similarity between the two was all too obvious and I had struck a sore nerve. I still hold by my comments about a large number of classes in the framework being a thin wrapper over Win32 – this comes from the experience of decompiling large proportions of the framework with ildasm! Yes, I know that interfaces are used throughout the framework, again, I addressed this in another of my articles for DDJ. However, there are many other solutions in the framework (delegates and attributes are two examples). In fact, if you trawl through the frameweok and count the number of methods that take interface parameters and how many that take delegate parameters (discounting methods that are for asynchronous calls) the former is far higher. However, there are inconsistencies. For example, serialization. In v1.1 we have IDeserializationCallback, to solve the issue of initializing objects after deserialization, but v2.0 uses attributes to do the same thing – why? Microsoft definately does prefer classes to interfaces in .NET remoting, and activation is the most important case. If you want to use new and/or a configuration file, you have to use classes. If you use interfaces you have to use the Activator object. The most important part of any remoting infrastructure is location transparency, that is, if you type new MyObject() it does not matter where the MyObject object will run because the infrastructure will provide all the plumbing. If you use interfaces with .NET remoting you do not have location transparency with activation. Incidentally, COM interop has a solution for the issue of ‘interfaces in a class-based world’. I still stand by my point about Microsoft not using .NET to write new major revenue generating products. I think my comments will be vindicated later this year when it becomes clear how much of Longhorn is written in .NET. As to your comments on Avalon and Indigo. I concede your point about Indigo, but I refute your point about Avalon. In Dec 2004 a tech preview of Avalon was made publicly available on MSDN downloads, and by examining this with ildasm it is clear to me that Avalon is yet another wrapper over Win32. Avalon is based on Windows messages, and uses GetMessage, DispatchMessage et al, that Windows developers have been comfortable with since 16 bit Windows! My points about VB.NET seem to have generated the most ire, and I thought I was just making a minor point! I have always regarded VB.NET as uneccessary (again, see my DDJ articles for more comments on this subject). VB.NET is not VB! VB is single threaded, does not use exceptions and lacks many of the OO features of .NET. It is not trivial to move code from VB to VB.NET. However, it is easy to convert a VB.NET app into C# and vice versa, and there are tools available to do this. Why create a new language when one perfectly adequate language (C#) already exists? This is why I brought up the argument about marketing, it’s the only reason I could come up with why Microsoft had to produce VB.NET. However, VB.NET is not VB (given my background I am tempted to write VB.NET != VB, but in this context I guess I ought to write VB.NET <> VB). I was trying to point out that VB.NET is VB only in name. Some people have interpretted my comments as being from a disaffected VB6 programmer. But they are very wrong! I have written two books on .NET, one on Managed C++ and the other on C# and Managed C++. All of my COM books are C++ books. I wanted to point out that there was a huge chorus from VB developers that they didn’t want their language to be replaced with something totally different, and yet Microsoft did not listen to them. Let’s come to the issue of the EventLog. In the past I have written a lot of C++ code to use and manipulate the NT event log. The API was inherited from OS/2 and it is a little arcane and was in need of a replacement. I wrote several articles about programming the event log using the Win32 API and one of these was in the MSDN library. Essentially, the application provides a resource only DLL with format strings that have placeholders. These format strings are localised. The DLL is registered on the machine that reads the messages. The application merely has to provide the ID of the format string and the strings for the placeholders. The advantage of this mechanism is that the event log files are kept small and that *localisation is performed by the reader*. The usual configuration is that when an event log file fills up it overwrites old messages, so it is important to make sure that the relevant messages in the log are read before they are overwritten. If the messages in the event log are large then you have less chance of doing this. However, the localisation aspect is the most important. I worked on the error reporting in a distributed application used at 500 sites (something like 5000 machines) in several countries across Europe. Using the event log a machine in France, for example, could log a message and the user could read it in French, when the event log files were sent to the support centre in England the event messages could be read in English. How elegant is that? Now let’s look at how System.Diagnostics.EventLog does this. Well it provides a single resource DLL *for all applications*. This DLL has 65,000 format strings that look like this: %s, that is there is just one placeholder so that the application has to provide the entire string. This means that the messages are long (which brings up the issue of event log files filling up) and it means that localisation has to be performed *by the application*. Note that no crystal ball is provided. The application has to guess the culture of the reader, and by default the current locale of the application is used. So in my distributed application that would mean that the messages would be reported in French, and I would not be able to read them in English. The application could chose ‘culture neutral’ strings (ie US English) but that would mean that the French users would not see the message in their language. The .NET EventLog class does not use the event log the way that it is designed to work. FYI it works in *exactly* the same way as the equivalent class in VB6, which makes me suspicious as to whether the C++ code used in the VB6 runtime was converted to C# and recompiled. I filed a bug about this in the beta and got a dismissive response from the developer stating that people have large hard discs and so could use large event log files. This showed a lack of understanding about the event log. In Whidbey, the EventLog class has been extended to allow you to use a message format DLL, but the damage has already been done. To be frank, I was very experienced in writing code using the event log and I eagerly anticipated what .NET would do, but I was highly disappointed that it just did the same as VB. I have had similar disappointments throughout the framework library, but I have also had some pleasant surprises. For example, anyone who has written any performance counter code knows that that API needs replacing too, and the .NET classes have done this extremely well. I have studied these classes using ildasm and I have marvelled at the way these classes work – the developer clearly knew what s/he was doing! It’s sad that the same could not be said about the developer who wrote the EventLog class. Of course, if you had emailed me before writing your blog I could have explained all of this to you Blog link of the week 08 You know, at the very least, Richard has a point, several good ones. I think the concern Microsoft should take is that Richard was pro-.Net and seems to have gotten fed up with the shortcomings of .Net. I really like Dan’s responses to Richard but it seemed a little defensive. Sorry for the off-topic post, but I had a question and found this blog and am hoping I can get a quick answer. As a home PC user, can I delete the .Net framework program from my computer without impairing its operation? I need the 40 mb of space. Thank you for indulging me. Richard, I appreciate your candid feedback and thank you for responding in the comments. The reason I responded to this in my blog was because someone sent me the DDJ link and they interpreted your remarks as saying Microsoft isn’t using the .NET Framework. I tried to clearly indicate that the blog post was my opinion (I said it was “my response” 10x) and not Microsoft’s and more importantly I wanted to keep the content both factual and objective. If I offended you or if my response came off as rude or defensive, I apologize. Thanks, -Dan FYI: Seems like the eventlog will be fixed for Longhorn :). See [1] for some info about it. Btw. Microsoft Speech Server hasn’t been mentioned here, but that is a recent new product based on .NET. From [1] "For the last two years, I’ve been the dev manager of the Microsoft Speech Server, a brand new server product for voice applications, written nearly entirely in C#." [1] [2] Microsoft needs to stop pretending they are the best and brightest at EVERYTHING they do. Microsoft needs to be more humble and admit your product’s faults and work on them. Make products that are easy to use and build, and try not to hijack every application you find that is useful. Picky, I know, but for(int i = 0; i < 10; ++i) .. is C99, not ANSI C. ————- for (int i = 0; i < x; i++) {…} Guess what language it’s written in? If you said either C, C++, C#, and Java, then you are correct. ————- How is that C? C++, C#, and Java maybe but C? Please learn the difference between then and than. Nothing drives me crazier _than_ when I read an otherwise well written article that insists on misusing the word "then" throughout. Unlike then, than is not related to time. Than is used in comparative statements. Ah, blogs, at least they are good for a laugh. How about MS ports the clr to a platform other then Windoz? Then maybe all of this chatter would be worth it. As it stands now, how an MS only dev tool developed on an MS only platform…. get with the times. for (int i = 0; i < x; i++) {…} Guess what language it’s written in? If you said either C, C++, C#, and Java, then you are correct. — actually, this loop doesn’t work in C… Oh come, just let Mr. Grimes say farewell. Who cares? People are doing .NET and people are doing Java. People are doing whatever makes sense at the time or what the customer requires. Sometimes that’s .NET. Other times it’s Java. Sadly, the responses indicate how out of touch Microsoft is with the needs of their developers. First, you are being picky by claiming 23.7MB vs. 25MB. Although I don’t think 25MB is a huge download these days, the problem lies in MS not pushing the framework onto machines years after it’s release. The fact that Microsoft has NOT pushed .NET frameworks onto Windows machines lends to the lack of credibility in Microsoft’s claim that .NET is the future. You talk about the server-side installation and what not, but client side deployment of the .NET framework is crucial. Not every app is going to be server-based. Desktop applications are going to be the norm for a very long time and ignoring that fact will not make it go away. Putting the burden of redistributing the .NET framework on the application developers is unprofessional for an OS company. And fear of taking some flack for including the .NET framework in a SP has got to be the lamest excuse I have <b>ever</b> heard. You claim "damned if you do, damned if you don’t" — well, if you’re going to be damned and you believe that .NET is the future, you should have "done it" (include .NET framework in an SP). So smaller developers are left telling their customers — yes, our application is 1MB, but you have to download a 25MB framework first. That’s right, you have to download and install a component that is 25 times the size of our application in order to use our application. The result, we — the smaller developers — are the ones who look unprofessional. Thanks Microsoft. I believe it is the same criticism that MS got for not pushing the VB runtime and apparently the lesson was not learned. It is a major reason why many developers are avoiding .NET. Yes, there are .NET apps, but the fact is if MS would have pushed the .NET framework on users a year ago, you’d have an order of magnitude more applications using .NET. The truth is that it is mainly Microsoft’s own fault that .NET is not more widely used today. After having read both Richard Grimes’ and this Dan’s texts, I think the main problem is marketing vs. engineering. Of course you need a certain amount of marketing, no debate about that, however I think it’s plain wrong to let marketing do engineering decisions (like creating VB.NET for example). This all reminds me of the old days’ IBM, engineering brought the company to the top, but then the marketing took over and nearly ran it into the ground. If you are going to be too picky, you should also be correct. 23,698K != 23.7MB. A megabyte is 1024 kilobytes. Therefore 23,698K = 24,266,752 bytes. So, you could say 24.3 million bytes. Or, you could take 23,698K and divide by 1024 and get 23.1MB, which is the proper method and more to your point. But if I were going to round that off, I’d still say it’s about 25MB. Anders needs to go back to Borland so can write some good cross-platform stuff. He is wasting his talent at Microsoft. You say that Richard "implies that the .NET Framework is a replica of Java" but what you must really mean is that you infer that this is what he is saying. You are allowed to infer what you wish from his words, but attempting to redefine his statement by telling us what he implies is out-of-bounds! Regardless of whatever technical credentials you may have, you’ve committed so many rookie spelling and grammar mistakes that simply from a communication standpoint you’ve lost all credibility with me. Perhaps you relied on Word’s spelling/grammar checker alone. I suggest you start by learning the differences between then/than and your/you’re. I think Richard has 2 great points: firstly that the .NET framework isn’t perfect, secondly that the MS people jump up and defend it regardless of the argument. When .NET was first announced, I remember the discussion about deterministic finalisation and how the finalise mechanism in the GC was flawed (being heavily based on the finalisation hack that Java was forced to implement). At the time I recall lots of people simply arguing that reference counting was so poor, and that GC was so great that finalisation was a small price to pay. Now C++ (at least) has a proper system for DF, I suppose those people who were loud in the lack of DFs defence are now saying how great this is too. Other big design flaws I remember: reflection and how metadata was exposed to all. I consider reflection to be useless feature compared to others that could have been implemented instead, but still in it went, despite all the people complaining (rightly) about reverse-engineering issues. MS’s answer? Simply to implement another Java solution that still isn’t as good as not exposing the full metadata in the first place. And of course, the VB.NET not being VB; I used to think the development languages were well suited to different tasks – VB wrote GUIs that cnnected to C++ back-ends. Now in .NET its C# (otherwise known as Java to many) that matters and the other languages seem little more than a side issue. Oh yes, and Avalon v Windows Forms – I think we’re still unsure which one we should develop for, whether WF will be obsoleted by Avalon or not. All this drive for new technology isn’t helping us at the coal face who have to use it and support it 5 years into the future. So, I think Mr Grimes is right in his criticism, and I’d like to see the .NET ‘fanboys’ stand up and say what they think is wrong from the whole design and implementation of .NET. Only if we all do this, will MS take notice. > Sharepoint Portal Server is fully written in managed code Might be why it’s so dog slow… I have been a java developer since JDK 0.9 through an early adopter program. I am not a .NET guru, but follow the progression. I say this because, I could replace .NET and C# with JDK and Java in Mr. Grimes’ article. I cannot speak to the strengths and weaknesses of .NET. But Java or any platform has strengths and weaknesses. The ability to repair broken classes and the time involved is a problem in java as well. I’ve been blown off by JDK platform developers numerous times. The knock against Microsoft for making a product platform decision is outright ludicrous. My advice to Mr. Grimes would be to work on a product program for a few years where his career is dependent upon annual releases with new features. Personally, I don’t care if the Office Suite is built on .NET or not. I just care that it works. If it were all written in VB, or assembly I wouldn’t care, provided it works. Is he not familiar with JNI for legacy wrapping in Java? I applaud any effort that works towards making development easier. .NET may not be perfect, but neither is Java. Don Box said Indigo, part of Longhorn, is fully written in C#: QUOTE: In looking at the Indigo code base (which was 1123 C# files as of early last week), only 19 of them use the unsafe keyword. Every single use was to do buffer manipulation, either for low-level XML cracking, SSPI munging, or async I/O buffer management. Dear Mr. Grimes, Thank you for sharing your opinions on the overall state of .nET in your view. I am now left wondering what you plan on writing about in your future columns pertaining to Windows programming? COM/COM+ is not an option as well as any other antiquated technologies which were absorbed by .nET. Are you resigning as a writer for DDJ? Will all your future articles become focused on Java? You do realize that any attempt to write about future Microsoft technologies will only result in either directly or indirectly referencing .nET technology and implementation. I am truly interested in your thoughts on this… Thank you for your thoughts on all of this! Sincerely, A Concerned Developer who values your opinion… p.s. Will you be offering a refund for anyone who purchased your book "Developing Applications with Visual Studio .NET"? Do you sincerely believe you "earned" your money for the work you put in this publication? Based on what you feel about the overall Microsoft framework it seems you also were merely feeding on the hype of the development masses at the time this was released. This is my opinion, in the least, which is collectively shared by hundreds of thousands of readers who purchased something you put your name upon! Furthermore, I will think twice before buying anything which has been authored or co-authored by Richard Grimes, unless you can give me a reasonable doubt to explain your wishy-washy attitude on your development teachings. Please explain yourself Mr. Grimes… You .NET guys sure are fun to observe. While you waste time debating how lame your tools are, we Python developers get actual work done! [ds]A megabyte is 1024 kilobytes. No it is not. Mega is a SI prefix indicating a thousand. A megabyte is 1000 kilobytes, a kilobyte is 1000 bytes. You are confused with Kibibytes, which is the binary prefix for 2^10 bytes Richard: Nobody is forcing you to use .NET. I think the underlying issue here is that Microsoft believes that the best way to leverage its platform dominance is to make it _as easy as possible_ to create great apps for the platform, and that’s where managed code fits in. Most people cannot write rock solid c++, and most apps don’t need to be written in it. Thus, Microsoft may decide to use c++ and unmanaged code for OS creation for performance reasons, and will need to spend lots of money on additional QA, code review, etc., but that is a tradeoff that a huge company can handle, not hypocricy. The great thing about VB was that anyone could quickly and easily write an app that was easy to use and leveraged a lot of the win32 functionality. For 90% of apps, that’s all you need. .NET is a revolutionary step for Microsoft based on the success of VB as a way of helping developers write great and useful code, period. I think .NET thinly wraps the underlying Windows API so that .NET developers can do anything Windows can do. Whenever there is something missing from the .NET framework (anything from making a simple beep to more complex things), you see people either complaining about it, or posting DllImport wrappers to show how to access it. I think Grimes is right, C# is a copy of Java, except that the class library is more like a wrapper to the Windows API instead of a portable class library. But that seems consistent with a strategy of keeping existing Windows developers and recruiting more developers from Java land. This may give Sun plenty of reasons to be pissed off, but not .NET developers. In my opinion, the biggest limitation of .NET is the estranged relationship between Sun/Netscape and Microsoft. Microsoft should settle with Sun and work on a better way of running .NET apps with any browser, not just IE. Microsoft should donate to the Mono project too, because without Mono, I wouldn’t even be using .NET. Otherwise what would be the point of developing an application that could never work on any other platform? The question is – if not .NET, what is Mr. Grimes gonna do? <curmudgeon> With all due respect, this whole debate points up the reason I prefer Unix and Linux to Windows *or* Macintosh (pre-OSX) — frameworks (.Net, MFC, Java, or app/management frameworks like Tivoli) all start out elegant when they’re just off the drawing board, and then they grow and mutate like cancer cells in a petri dish full of benzene. It’s better to put your IT dollars into hiring really good people and keeping them happy than it is to shovel them into a product that promises ease of use and upkeep and then requires another truckload of money to hire roving drones to clean mouse balls or muck with registry settings. The clearest proof of this is only as far away as the nearest Borders or Barnes and Noble – how many books for Windows users are there on a shelf versus how many for Mac or Linux users? And of those, how many are "introductory" or "teach yourself in 14 days" or "for idiots"-level books, versus how many are really substantive books that aren’t overinflated with wizard screen shot sequences and instructions for those who can’t follow the pictures? </curmudgeon> I wanted to respond to some of the points brought up. .NET Fx size – Correct, my mistake. I goofed and didn’t calculate this correctly. The point was that .NET isn’t "many times" larger then the JRE. Grammer mistakes – My bad again, I wrote this quickly in-between meetings and didn’t use any spell checking tools. for loop in C – As someone pointed out, it’s C99, but not ANSI or ISO-compliant C, but I never actually specified in the text… -Dan This is a complete joke. .NET IS NOT JAVA. Nor is it even close to Java. If I had time I could easily refute any accusations or examples of someone trying to compare the two! I have been developing in .NET for 2 years now, and by far exceeds c++ or java in everyway. It keeps costs down, coding is faster, dll hell is gone, more extensible, no more memory leaks and type safety is preserved. Every coding framework will have its problems, but what doesn’t??? Stop looking so deep into you Microsoft Bashers and realize that this will revolutionize the way we code. A.) How long will people keep complaining that 25MB takes too long to download over dialup? Don’t use the latest software if your networking solution is a decade old. B.)Is whining really considered good engineering? Go work for Microsoft and redesign the framework if it’s that bad. C.)This all sounds like an attempt to get people to actually read DDJ. – just a hack writing commercial software in C#.NET As a former Java developer, I must tell you that I have fallen in love with .NET over the last year and no longer develop in anything else. It has some warts, that’s true. But given the alternatives I’ll take C# and .NET development over any of them. To date we have completed many small and large projects with .NET and are very pleased with the results. These projects could have been coded in Java, but because they are heavily graphical the end user experience would have been like a circus clown on Demerol… perhaps interesting to view but the performance would have been a non-starter. If you wish to develop for and sell to the largest installed base, you are talking MS Windows. If you wish to shake free of the 1960’s hell that is c/c++ syntax and nomenclature, you have two real choices: .NET and Java. If you wish to have native to near-native performance, you have .NET. I never thought I’d say this, but ‘thank you’ to Microsoft for delivering on this. It has opened up the Windows platform to me without making me step in MFC. titanlogic@yahoo.com Dan, Having delivered BOTH .NET and Java applications in the past, let’s start by RE-CLARIFYing some things. When Mr. Grimes says in one statement…XYZ, and then in the other he says ABC. What classes in logic did you take that led you to infer that his statements pointed at an either/or scenario ? His statements were PERFECTLY valid. Hell, I happen to agree with them. When I first encountered .NET in 2001, it looked like Java, it SMELLED like Java ( and this coming from a Windows person….I still have my Windows 1.03 SDK diskettes, where are yours ? ). I remember WFC, and I’ll be darned if some of System.Windows.Forms didn’t bare a striking resemblence to some of WFC. Looking at System.String is almost like looking at java.lang.string. Which oddly enough, implements "Serializable, Comparable, CharSequence". Hmm…..smells almost the same. Too bad you can’t copyright API’s ( Oh wait some of you did ! ), because otherwise "String(" ").trim()" might be in trouble. ( Don’t trounce on me for that code, it’s called an example. Silly one, yes, but still valid. ) [df] I agree with you, as far as teams developing software at Microsoft, Office *client* software is one of the slowest to adopt .NET. And why do you think that is, Dan ? JHC ! Could it possibly be because they aren’t totally sold on it’s "necessity"? Of course they aren’t ! Bill ( and Richard’s ) point are 110% on the money. Why does MS always have to respond to calls of questioning it’s decisions with either blatant denial ( or even plausible deniability ), and counter accusations ? Get real, Dan. I like C#, hell, I love it. Anders is finally letting me do some things he didn’t get quite right in Borland C++ Builder ( What ? You didn’t think all of us forgot where he came to MS from, did you ? ). Which brings me to another point. The fact that MS has made C++ languish far behind C# and VB.NET is another valid point of Richard’s. When I first picked up VisualStudio.NET, immediately I realized, "Managed what ?", "C++ is now what ?". Yes, I can see how some lamebrains might need the hand holding. And so I plodded along (single file implementation, disgusting. At least with partial class support coming in 2005, someone wised up). Still, other than perhaps some more low-level stuff Managed ( more often referred to as "Mangled" ) C++, is pretty useless. There was ZERO support in the IDE for creating Window Forms or ASP.NET pages with C++ based back code. I mean, c’mon, you went from MFC, to ATL ( VB <-> ATL ? Yeah, right. ), to WFC to " " ? And you expected the more hardcore developers to take this seriously ? Still you can’t ignore change, and bills still have to get paid. Nevertheless, it was a jilted like feeling that MS "copped out". Changing the subject to a matter of packaging and delivery ( a subject a certain person by the surname of Lucovsky <God I hope I spelled his name right> has had a fair bit to say about lately ). Stop requiring the developer to ship the framework. If you think it need to get out there that badly then ship it as part of the OS. If you think that it’s as inscrutably unremoveable as IE from a Windows product distribution, then SHIP the thing with it. Do you ship the new XP SP 2 Upgrade/Full Retail CD’s with .NET as a requirement of the install ? Let me answer that for you…NO. You CAN install it, but it doesn’t install it of it’s own accord, in those cases where it’s in a retail box, the same excuse that customers ASKED you not to ship it, don’t really apply. Most folks buying a retail package have the mentality, "Oh, it’ll install what I need." Most people don’t really go through the process of picking and choosing things. C’mon, this isn’t the late 80’s and early 90’s where people were actually concerned about how much disk space something took up. GMAB. As long as you leave enough space for their pictures,music and movies, with a good dollop left for email and possibly games, the average user wouldn’t bother THINKING about what gets installed. Haven’t you ever heard of Kim Komando ? Take a listen to THAT radio show. Those are the types of users that are en-masse the bulk of your client desktop installations. Sure, more and more of them are getting broadband, so they "could" download the framework if necessary. But why should I either have to ship dotnetfx on MY CD, host it on my dload site, or bother to make my install project suck it down and install it ? Have I had to do that, yes ? Did I LIKE having to do that ? No. Should I have to do that ? No. Are you being defensive ? Yes. But, most importantly, are you LISTENING to developers in these respects ? The jury is still out. I would like to ask again about a point: How many applications for the massive public are now written in .NET? I count a small size… some RSS readers… (but Pluck not) Regards, swain Amazing that you refer to a url like this: with 9, count’em, 9 lines of text as documentation for the use of interfaces. Even the link in the text point to a mere 20 lines of code. And your response regarding "On the Design of the .NET Framework" misses the point that grimes was making about vb.net being win32 wrappers and C# being Java. Your blog post simply rewords Grimes states to dumb them down, then you refute your rephrasing. Hardly a response to the original article. Where is all of this headed? Sure the .NET framework certainly has issues – just like any of the other programming approaches we have all tried. Couldn’t we level similar criticism at J2EE? C++? This article is a diatribe. I’m not sure why Mr. Grimes has an axe to grind – but clearly he does. He suggests more emotion than serious reflection. He covers a laundry list of topics, in random order, with few suggestions for alternatives or improvements. So – he can go back to writing ATL books. Or calm down from whatever set him on this path and write a better critique. Cheers either way. Dear Dan Fernandez, You work for Microsoft. Surely you cannot afford to get worked up every time someone points out that the way you earn your living is by producing/managing/promoting/releasing runny poo. Cheers, – Greg Richard Grimes, a Microsoft MVP since 1999, wrote in an article in Dr. Dobbs that he was quitting on .NET, the MS latest iteration of their programming Visual Studio. From his website, From the start of 2005 Richard has decided… > for (int i = 0; i < x; i++) {…} I don’t think Richard was referring to control structures or say, the presence of the semi-colon. Rather, I suspect he was, as I, floored by the consistent duplication of core APIs. When I wrote my first C# application (as a Java developer), about the only thing I had to look up were the new import statements to find classes that had very familiar method signatures. I think these two remarks of Richard’s can best be summed up as saying that the framework is a thin layer on top of the "same old" underlying API calls, modelled on the Java development platform and its APIs. I trust Richard’s opinion as to the "thin layering", and my own experience as to the "this is Java" aspect. Richard probably has an axe to grind because he seems to have been more devoted to the .NET platform than MSFT. As an ex-Tcl/Tk developer, Tandy computer owner, and ex-IRIX platform developer, I don’t take these fashion swings too personally anymore. Frankly I was happy to see the platform resemble Java, my thinking was "I won’t have to learn too much to be useful in C#" and that was true. Cheers, Jeff While we’ere being picky, doesn’t 23,698 * 1024 = 24,266,752? So like 24.3 MB, not 23.7 MB (or 25 MB for that matter). Maybe I’m being too picky, but j2re-1_4_2 is 14,872kb and jre-1_5_0 is 15,444kb… When you say "why would we re-write perfectly good code?"… I wonder how much of VS6 got reused in creating VS.Net. Can you tell us? One thing becomes clear when reading "Responding to Richard Grimes article on .NET." DF has to get really technical about his responses to refute many a thing in the Grimes article and if you read the Grimes article really seems to respond out of context in places. It’s too bad Grimes is out of the .NET arena, maybe we could have a re-response that spawns a re-re-response and argue about how awful .NET is or isn’t until the end of time. Frankly, I am pretty much apathetic to .NET this point and have decided that if I do learn anything MS, it will be unmanaged Visual C++, MFC and ATL. Why? Because doing some things in .NET and C++ seem to be equally agrravating to me — if I am going to learn something convoluted, it may as well be C++, which is not going anywhere and can work on more than just Windows. C++ is based on standards outside of MS’s control. Microsoft can’t up and change it without outcry. If Microsoft drops support for MFC and ATL, I can always use the standard library and turn my attention to other platforms. One language that has piqued my interest for client development is Python. I’ve only dabbled (I wish I had more time for it), but what I’ve seen I’ve liked and it is free. It may be interpreted, but you can include the interpreter as part of an executable package so it looks and runs like an executable. With Tkinter, you can target both Windows and UNIX with pretty much the same code. And really, so what if it’s interpreted — it’s not like your P4 these days doesn’t cost a tenth of what a home computer or workstation cost just ten years ago. — for loop in C – As someone pointed out, it’s C99, but not ANSI or ISO-compliant C, but I never actually specified in the text… Way to look like an ass. With all of the comments asking why an MS employee can’t just admit fault, instead of a simple "You’re right, I made a mistake" you claim righteousness on a technicality. If you can’t admit such a simple mistake without becoming evasive, how can you be trusted to objectively look at larger issues? Please use correct grammar. You used "then" in many places where you should have used "than." for(int i = 0; i < 10; ++i) is neither K&R C, C89 or C99. C99 allows the definition of variables inside a block, but not inside a for-loop expression. As for the future of windows development, I am not sure… but I do know it is not .NET. I am currently attending an engineering university. They put .NET on all of the lab machines by default. Most of the students that I have talked to actually use VS6 on their home machines. Many corporate projects that a few of the students (and myself) are working on are all done with VS6. Since the student body will eventually graduate and eventually dictate what their company uses for software development… I can almost assure you it is will not be .NET. If other popular comp. sci. universities are like ours, I’d say that the future lies in open source development, open standards, and cross platform compatibility. With the productivity gains that .NET is supposed to give, I don’t understand why MS is not using it more internally. It seems that part of the reason .NET isn’t better is because MS is not forcing itself to use the framework in many real-world applications (not just add-ons, but from scratch apps). In the 90’s Apple used to provide developers with a set of APIs and then all their internal applications used completely different mechanisms to provide great features. With OS X, Apple decided to eat its own dogfood and the result is an API that is much richer for the developer and tools that work extremely well. I think MS should take a page out of the Apple manual and require plans to tightly integrate .NET into every application. You can start off with add-ons, but you have to take it further than that. Using .NET to implement Outlook would definitely show you the weaknesses in .NET. You can then fix them and show Outlook as an example of implementing a full-blown application in .NET. But I don’t think MS will do that. I think that’s the reason they don’t install the .NET framework by default. They don’t seem to have any confidence in the .NET platform, at least for serious applications. C# has one major advantage for me: it looks like Java. This makes it easier to train C# developers on Java, which is great for getting apps to work on many more platforms: Linux, BSD, Solaris, Mac OS, pretty much any major Unix. Question 1: if customers have to download more than 20MB for .NET, what’s a smaller app supposed to do– require Windows Update? Or download it during install? Or…? Question 2: the C# and .NET developers claim that native speed is the reason to use these. But now Java is faster– on the server, and on the desktop. Have you tried Java 1.5 and the IBM Eclipse GUI SWT components? Very fast. Java Hotspot can optimize on the fly, faster than native code. So how does .NET respond? Question 3: Richard raised many points about Microsoft marketing, and you state many times that this blog is just your opinion, not official. Can you get us any kind of more official answer about this, in particular the download sizes, Avalon XAML plans, and the Win32 wrappers that Richard seems to know quite a bit about? Chers, Joel I too have bailed on Bloatware.NET. Nobody is waiting to have to learn new stuff, when clearly there’s Java, it’s been there, it is there, it will stay there and there are alot more jobs with better pay for them. I’m tired of M$ pushing half-finished technologies every year, so we’ll upgrade and companies spend millions on retraining their people, only to find out it sux. I tried both, I’m going with Java for managed cross platform code, and will stick to C++ for professional code. .NET is more cattlefeed for .VB people, who are capable of gluing things together and be a VB programmer for years without ever really understanding the very OS or platform they’re dealing with. Seems like for any decent functionality, you have to import half the win api from dlls, so that you might as well just code C++. I loooove C++. Been around a long time, best invention ever. .NET will soon be replaced with .NET+ and .NET+2 and before Intel has finally come to the end of moore’s law. Seems all these layers of abstraction are only necessary to hide the clunky code below it.. like security patches, making PC’s once incredibly fast and now extremely slow. The sloppy use of code may not matter on fast PC’s, but the only ethical profit in life, is energy efficiency. Not of fat people like us, but of equiment. Layers of abstraction is great, but only if each layer does what it is supposed to do the most efficiently and accurately. .NET is not open source. I’ve dug deep through MFC code, to figure out bugs and learn to work around them. Or simply do things better. Net is the best of all worlds.. you can choose good code supported by universal standards, not monopolies only, and write quick and dirty and not give a rip because customers are too stupid to demand better. I for one am not going to be bullied into adopting .NET. The day the framework ships with the OS, is the day I will permanently abandon windoze and redefine my identity as a mac user and developer, and focus on linux. Ignorant customers buy into anything from M$ and are easy to pluck financially, but at least I’ll have some control over my life. I’ll probably build a website with ASP.NET, hack some VB.NET and put C# on my resume, next to nose picking (and cursing). But if I ever have a choice, I will decline. You guys ever note how reporters have a way of asking questions of politicians that in their heart of hearts they hope will affect public policy. Like they are pontificating or something. Its poor, useless reporting in the end. Richard Grimes has a hidden agenda. As does Microsoft. They just think we consumers are too stupid to read between the lines. Thats more annoying than anything else. How is c99 not ansi or iso compliant c? for (int i = 0; i < x; i++) {…} Actually this would not be C code since declaring variables in arbitrary locations is a feature of C++. "Maybe I’m being too picky, but the size is 23,698K or 23.7MB" I just installed the .NET framework because some freeware required it. Then, Windows Update wanted to install a SP1 for it. Which was an extra 10 MB. Why didn’t Windows Update show that SP1 version right away? …Grimes makes important points; but to me they don’t remove the biggest benefit of .NET which is developer productivity. I also found myself thinking "but what about Mono?" … which clr are we event "Grammer mistakes – My bad again, I wrote this quickly in-between meetings and didn’t use any spell checking tools." Oh, the irony! "Grammer"? How about "grammar"? please educate yourselves before you make comments on a perfectly fine line of code. for (int i = 0; i < x; i++); is c99 and c99 is ansi c gcc -std=c99 this code to even test. (-ansi flag is not default to c99 yet, people need _some_ time to catch up!) heck for(int i=0, x=10; i < x; ++i); is also perfectly legal ansi c as of c99 instead if you didnt declare x to say 10 before the for. So please avoid making comments you know nothing about, because they cascade and then next thing everyone starts saying the same damn thing. Cross platform interfaces are what I love. And .Net is not cross-platform. Not like ANSI or POSIX or GTK or QT. Or the SDL even. The huge system classes would be hard to port and likely to not be 100% compatible. Aren’t there patents on .Net, also? You know, Dan, your statement about the "for" control structure was downright silly and misleading. You know very well Grimes wasn’t referring to basic loops structures like "for." It’s the duplicated API and functionality. .NET looks and functions very much like Java, from the object-oriented nature of the language to the idea of intermediate code. I can duplicate Java programs in C#/.NET by simply changing some of the namespaces and such. So much is similar in idea and function that for you to single out a "for" statement is ludicrous. Instead, you should be embracing the Java heritage of .NET and saying you build on it and improve on it. Denial is just off-putting. for(int i = 0; i < 10; ++i) That’s defn not C++ and Java, no idea about C# but defn not C. I don’t see how this logic contradicts Grimes. Anyone else notice how the blog entries before 3/7/2005 have some intelligence about them and the ones since that date are 90% pure garbage? (quibbling over the size of a kilobyte, C99 vs ANSI C, grammar police, mindless Microsoft-bashing, and other such nonsense) I wonder why that is. Could it be because this 3/7/2005 slashdot article? Naah, that couldn’t be it. Maybe Richard could write all the ‘for’ loops for us. As with many Microsoft initiatives there is a kernel of goodness, but many layers of badness. Take for instance the NT kernel, a pretty decent one, but the layers of Win32/COM badness that has been heaped on it really sours the milk. .NET has the same issue: The IL and basic run-time are pretty decent, nothing groundbreaking, but then there is WFC (yet again imposing the VB mindset on people) and ASP.NET bringing all the badness of VB to Web programming. Mr. Grimes’ main point is clear: *some* of .NET is well thought out, *much* isn’t, the rest is just Win32 in sheep’s clothing. Museums, reading, book orders, article, me, web.<br> Poll: book delivery? <br> Museums Went to see Africa Remix, (pics, lots of pics) the contemporary African art exhibition at the Hayward Gallery. Dunno what everyone’s got against the Hayward: OK its neo-brutalist exterior isn’t exactly to everyone’s taste, but it’s… Why don’t you all just stop arguing and go buy Borland Delphi 2005. It does it all! It still creates wonderful Win32 apps that we all actually use, instead of .NET (cr)apps that nobody uses! Delphi executables are self contained! No "virtual machine" "pseudo-compiled" "interpreted" code. Every VB program I’ve ever seen looks looks like a Win 3.1 app, yuck! Grow up people, get real, get Delphi! Dan writes: <i>In the first he implies that the .NET Framework is a replica of Java, but in the next statement he claims that the .NET Framework is simply ported Win32 classes, Windows Foundation Classes (WFC), and VB runtime classes. Which one is it?</i> These are not contradictory at all. If you take the intersection of the JDK 1.1 libraries, sans AWT, with the same kind of thin layers of code over Win32 that were in J++, with some new stuff for XML management thrown on top, you pretty much come up with .NET’s library package. There’s really no arguing that a whole lot of the core of .NET is derivative of Java. It’s not just that the CLR is darn near a clone, it’s that probably 70 or 80% of the JDK 1.1 classes are in there, identically named, with identical interfaces excepting capitalization. Once in awhile (like in the case of Object) there are some minor differences, but overall it’s very, very Javaesque. All I had to do as an experience Java hand to become reasonably effective as a C# programmer was learn where in the library the classes moved to and change my capitalization style. I don’t consider this a flaw by any stretch of the imagination; JDK 1.1 offered a lot that was well designed. Similarly Mr. Grimes is certainly correct that a lot of the .NET libraries are real thin layers over Win32 libraries, and often not very well thought out. That too seems to be a relic of the move from Java to .NET, as many of these interfaces were first written for J++. The delegate concept came from J++ and was there purely to make the job of exposing Win32 features easier. It is, unfortunately, a very poorly considered idea that weakens the type interface and provides no actual advantages over defining an interface for the signature. It’s rather a shame that it survived into .NET; we’ll never get rid of it now. There are a lot of new things in .NET too; I particularly like the improved higher-level protocol support and XML support offered by .NET versus Java (or, really, anything else I’ve used). But it’s not true that .NET didn’t borrow very heavily from things that came before, and not always to its benefit. But all of these things are just nit picking. It’s still a nice platform. Now, if you want to complain about the real limitations in .NET, it’d have to be that it is Windows-centric with what that implies in terms of manageability and scalability. That is, I realize, a benefit from Microsoft’s point of view but does mean that there are a lot of applications for which it’s impractical to use .NET. jim frost jimf@frostbytes.com Still working on the response after so many days ?? How many months more are required ? 2/24/2005 6:33 AM Dan Fernandez Ryan, Jay Roxe, the Visual Basic Product Manager is working on a response. It should be posted on his blog soon, Thanks, -Dan "A megabyte is 1024 kilobytes." Officially (in the U.S.)? No, it’s not. Officially, a mebibyte is 1024 kilobytes. A megabyte is 1,000,000 bytes. > Sharepoint Portal Server is fully written in managed code This is simply not true. While the SPS additions are (AFAIK) all managed, they are a very thin layer on top of the WSS platform and would not function without it. WSS contains many components written in unmanaged C++, some for performance reasons, some as ports from older STS versions. So while the APIs and programming model are all .NET, much of the actual runtime engine remains unmanaged, making this product a rather good example of exactly what Richard is describing. just forget it. ah! I have been working with various programming technologies for about 15 years, and I have to say that C#/.net is, by far, the easiest environment to work in. I wholly agree that there are faults within the .net framework, but what environment doesn’t? (I have the SRX tech support case numbers to back this up) Yes, I have designed software using C++, Java, and (shudder) J++. I also agree that C# looks suspiciously like Java. But, the point that Microsoft hasn’t wholeheartedly embraced .net is ridiculous. First, I would never expect Office to be completely re-written in C#. What software manager would be able to keep his/her job after suggesting a rewrite of a *HUGE* software base. I also would never expect managed code to replace the core of an operating system. As an end user, it would make sense that the faster running code would be preferred. Therefore, low-level C, or even assembler, will likely be the way to go for the foreseeable future. Second, I could be wrong, but wasn’t GreatPlains rewritten in C#? Third, reiterating a point already made, WinXP came out before .net. Microsoft does put the .net framework on its Windows Update site. It happens to be an optional component, but it is there. I am glad that they leave it optional, as to say it is a required update would be a lie. On a personal note, I am very that .net exists. It pays for my house, car and virtually everything else I have. Oh, and who said that ASPX only runs in IE, I replied on this BLOG using Firefox… mmeister wrote: > In the 90’s Apple used to provide developers with a set of APIs and > then all their internal applications used completely different > mechanisms to provide great features. Off-topic, but not true. Since the very first version of the Mac OS Apple has fully documented the Macintosh Toolbox/OS API, except for features that Apple knew would break or go away in the future. Perhaps you are referring to Apple’s abandoned experiments with a new OS (pink/Taligent) that went on after OS 7 and before Darwin/OS X, but that work was never released as an OS or product. > With OS X, Apple decided to eat its own dogfood and the result is > an API that is much richer for the developer and tools that work > extremely well. Apple has always developed its own applications — including the operating system itself — using its own APIs and tools, the same APIs and tools available to all Mac developers. The alternative frameworks for Mac development have been either wrappers around the native Mac OS (Metrowerks’ PowerPlant) or run through a virtual machine (Java). > I think MS should take a page out of the Apple manual and require > plans to tightly integrate .NET into every application. You can start > off with add-ons, but you have to take it further than that. The difference is that the Mac OS is written using the published APIs; there is no separate framework like .NET. I’m not sure it would be possible to write Windows or any operating system in managed code. I believe that before .NET was rolled out MS wrote Windows using the published APIs, though some people have accused MS of using undocumented functions. Former Apple MacDTS engineer The runtime size is normally 23MB, but there is this tool called InstallAware which reduces it to only 11MB. It first deCABs the setup files then recompresses them using better compression. Well worth a look if the runtime size is an issue for people. Java != .NET….. class slapindaface() { bool slap; } if(u think Java = .NET) { slapindaface slapx = new slapindaface() slapx = true; } (ps, yes its not good syntax, shutup! its a joke) You could add Exchange Server 2003 to the list of recent Microsoft products that require the .Net FW. The Mobile Browse solution OMA (Outlook Mobile Access, and yes… I know the abbreviation means ‘grandmother’ in German) in Ex2003 is an ASP.Net application. One of Delphi’s strengths was that the IDe was written in Delphi. The first version of JBuilder sucked bigtime because it was written in Delphi, when It was rewritten in Java, it improved by a huge amount. Until you start eating your own dogfood you won’t convince us that you are _really_ commited to it. > > Sharepoint Portal Server is fully written in managed code > Might be why it’s so dog slow… And why the each element and each screen has zero regard for the application as a whole. Well through out interaction was not an important consideration for the designers, so it would seem. E.g. Try quickly locating a case by case number when the list is large. Unforgivable. .Net this, Java that, blah blah blah. Well, I’ll make a couple of short comments: Bye bye Richard. Some of us will miss your .Net articles. Some us won’t.. To those who said MS should enforce .Net in every machine using MS Windows, I think that’s utterly stupid. If people want .Net, let them have it. If people don’t, so be it. If MS does force people to have .Net, you’re the same people who would be the first to open your big, overgrown mouths and spray acid. Please, let it rest. And to those who insist MS should stop defending .Net when it is being criticised, what are you, daft or what? You want Microsoft not to defend their own product? Dudes, what the… Talk about idiocy. Okay, so you’re telling me: You design a software and sell it to the market. Obviously, everyone can’t love it, but then, certain people come out bashing it, and you don’t defend it? Come on, be real. Quit this childish talk. If Richard is so fantastic, let him design a better .Net and sell it to the public. For the love of god stop with the darned for loop. So what, the guy made a mistake, and it willnot work for C. Big Deal. Last time I checked we are all humans and we all make silly mistakes. Furthermore, I really REALLY doubt he was trying to teach you proper C syntax. The point is a for loop is a for loop is a for loop. For those of you INSISTING on being pricks, how about this int i=0; for(i=0;i<10;i++) { … } You happy now? Just a fast note to let the MS guys knwo that while you will get some of the typical anti-MS drivel it is awesome how open and accessible you all are these days. As the "face" of MS becomes more human, possibly some of the /. branded idiocy based hatred will stop. I personally find the article by Richard Grimes very informative. It is comical to note some of the rants against him in the comments. Some of it are plain hilarious like: ." Some comments on this encrypting the email, and so he not a believable guy! I really pity these guys. Anyway instead of just responding viciously to anyone who has anything bad to say about .NET/VB (MS group of products), why not take the suggestions positively and try to improve? Some of the people in this forum are acting like a frog in the well I have tried both sides (starting from Basic, VB, C#, .NET, and now sticking with Java technologies) and I prefer Java technologies any day. At the core as a programmer I look for what makes my life easier, makes better products easily and maintainably. I am not saying it is not possible with MS technologies. It is definitely possible either way to develop. So examples of software in managed code is meaningless. The point is that it is comparatively much much harder. And you can only know it when you have been at both camps. what about biztalk server 2004? it is written in c# Question: If the reason not including .NET with SP2 was purely because some customers (probably the enterprise ones) wanted that, why couldn’t you a) provide 2 "bundles" of SP2, one with other without .NET b) include .NET with SP2 and have a /switch for sysadmins to say that they do not want .NET installed with SP2. The extra megs that /switch option would have added would have not been any pain point to anyone considering how small percentage that would have added to the total SP2 size. So in fact, I do not believe that was the reason for not including .NET. More likely the reason was that MS feared the possibility of hackers taking note of how quickly .NET is getting to computers around the globe and then utilizing this to create bad name for .NET by some small size but very dangerous worms. With few lines of C# and old social engineering tricks you don’t need to be any sort of guru in programming anymore to create a lot more serious threats than what we have seen to date. However they are not bothering until .NET is widely enough adopted.. Grimes:> In Dec 2004 a tech preview of Avalon was made publicly available on MSDN downloads, and by examining this with ildasm it is clear to me that Avalon is yet another wrapper over Win32. It’s understandable that this has to be so, but Avalon is still 90+% C# right? Correct me if I am wrong thanks! And some people say .NET programs are slow, well certainly the cold startup and some VB’ish ways of doing things by some developers (lets do X in 2 lines inefficiently) will affect things but lets suppose you somehow page the stuff needed to do Win32 calls, now I bet you’d find it take a while to load a program again if that’d mean loading a ton of dll’s in memory first. The fix here is to update to LH and get some memory! 1 GB can be considered very basic when LH ships, most will have more. I am a client-side application/UI developer for a growing company, and enthusiastically adopted .Net when it came along. I did so on the assumption that before long the framework would be ubiquitous among Microsoft Windows users. Sadly, this has not been the case, and I have reluctantly had to return to C++ for my application development, as it is simply too much to expect that users, often of limited computer literacy, are going to download and install this enormous package in order to run simple (ostensibly labor-saving) applications. We simply had too many complaints about having to do this, and I am now back to using third-party libraries for XML parsing, regular expressions, etc. What a nuisance. I have also had to port a number of sizable applications from C# to C++, which was no fun at all, and hardly a productivity booster. C#, and the .Net IDE and forms designer, were a pleasure to use. I dearly wish I could still use them, but, alas, I can’t. Silly me – when I attended the big .Net pep rally in Manhattan that convinced me to switch over, I formed the impression that Microsoft would get behind their new framework, at least as far as taking the responsibility for its redistribution off my hands. What happened, guys? Maybe this Grimes article doesn’t warrant a response, then again, maybe it does. I’ve been working in the Java world for over 8 years, having seen it first hand at the start, and on through the bloated years. I’ve also been working in .NET/C#/ASP.NET for about 3 years now. Never once has SUN tried to create a bonafide operating system solely on Java. Oh, yeah, there was JavaOS which ran on what? Oh, JAVA SILICON! Smart move on Sun’s part, but we all figured out their crafty ways. Where is that technology now? Was it 100% Java? Doubtful because it had to interoperate with hardware devices that did not understand Java (Displays?). Then this notion that Microsoft has no confidence in .NET because it’s not rewriting the entire world of Microsoft in .NET? Uh, well, is SUN rewriting all of its software in Java? I doubt it. By the very same logic, now, SUN has no confidence in its Java platform. Hmmm. These are juvenile arguments born from a childish tantrum with no business merit whatsoever. Does anybody remember how terrible the JDK was during its first three years of life? I do, and it stunk. The compiler had bugs, there were no tools for it (I had to create a dependency compiler to get Make to build my Java projects correctly). It was fun, though, because it was new, even if it caused me much embarassment in front of customers. Microsoft has created, in its first revision, a technology that has leveraged the incredible history of managed code (more than just little ol’Java, by the way) to give us a platform that is more robust and stable than anything SUN produced in the first 3 years of Java. Do you get any compiler fatal errors in csc or the like? I sure did using javac, and that’s why there were so many Java compiler variants (remember Jikes? gnu java compiler? others…). I *still* get fatal compiler errors using javac, *sigh*. You can not compare Java and .NET, they are not compatible technologies. .NET is a platform for many significant, and unmanaged, technologies. Java is simply a platform for managed Java code. You want to complain about COM and DLLs and all of that in .NET, well, try running a real enterprise Java application without having to tune your JVM’s perm space – and get lots of OutOfMemory errors because it’s loading thousands of classes just to start your little application. Microsoft is a very large and influential organization. They are clearly responsible in their approach to *introducing* technologies to the mainstream. SUN has always been reckless about their releases (remember SunOS 4.1.4? or the initial releases of Solaris?? Try to create a new user in Solaris 2.2. Even better, remember the VTC terminals that came with CDE? Tooltalk?) Write operating systems in C#? Sure, if you compile it to machine linkable code and not managed code. Oh, and the ".NET is just a wrapper around Win32" argument – uh, duh. What do you think Java is? Just a wrapper around Win32 as well. Managed code is *MANAGED*, it’s not a replacement for the underlying platform SDK of any hardware. Write a different C# compiler that links directly against the platform SDK if it’s such a concern. Don’t worry about articles like this. We get them in the Java space all the time, and then the guy goes off and joins a research firm. (Another "Richard", no less.) The only thing that matters for .NET at the end of the day is if it’s helping Microsoft Windows customers do their work better. Yeah, sure I think .NET is strategically all about locking people into Windows and Office for another 10 years, but Microsoft’s not the first company to try it, and if they’re going to lock you in to something, .NET is a lot better than the cruft that Microsoft made before it 😉 Peace. "The server market itself is *totally different* then the client/consumer market." Um, this should be "than" not "then" – as in "greater than" for all of you math people. …otherwise, very good responses. Microsoft is a copy-cat. For example it has copied:- 1)java’s platform independence (javac = vbc) 2)java’s try, catch (in vb.net) 3)struts forwarding techniques between the pages (in asp.net) Others 1) Windows NT (Equivalent to Novel Netware) Networking technology. And the catch is:- It has monopoly in making DLLs. Which is excellent. Anything wrong? >> <<<< I don’t agree at all. I used C# and Java and must say, that there is almost no difference. Yes, there isn’t. if you know your tools., you may create perfect "large scale product" very fast in both worlds. You *may* develop on Java with the same speed as on .NET. Know your environment, know your tools and ready solution s and development speed and application architecture decisions will be almost the same. I think we should forget about what Grimes says or what Microsoft says. It’s sad that Mr. Grimes chooses to abandon .NET. I ask him humbly to reconsider his decision. Microsoft has not rewritten major apps in .NET because there it is suicidal in business to do so! (remember netscape). I think the current office applications are fine and there is no need to do a complete rewrite and introduce more bugs! Then again he has a point because Microsoft has enough money in it’s pockets to pay for a complete rewrite of .NET and the write a separate optional support extension for backward compatibility. The reason Microsoft released .NET is that they have an operating system to protect! They could care less about cross – platform. I would have done the same if I were in Microsoft’s position. That is why you find that most of .NET is tied to win32. It is up to others implementing .NET to tie it to their native framework. I belive Mono is doing just that. In Java, Sun has basically done the same. The only difference here is that they have no desktop OS to protect so they release diferent versions of the JRE for different OSes. I feel that MS has done something very similar with my old friend C++. They claim that they still support C++ development, but look around – every MS publication has dropped C++ like a hot rock (giving it only paltry coverage). Guess what? The VAST majority of modern Windows applications are written in C++. It’s not unsafe when used correctly (just use modern libraries), and I find it elegant, expressive, and performant. Once MS decided that C# was the new flavor, it became everything to them. It honestly it feels like they don’t care one bit about the hard-working developers that got them where they are today. Without user applications, MS Windows would not be the dominant platform it is today. Get back to the basics, MS – and please start listening to your customers. And if you don’t, I sure hope someone else will. – MR I’m a consumer of the OS and I DON’T WANT .NET runtime in a service pack. I download SPs only for security fixes. I’m already pissed that I have to nurse my machine. I don’t need an additional headache. Perhaps Richard will switch to Delphi? Given that Anders was the father of Delphi before he became the father of C# and CLR, Anders took most of what he liked about Delphi and put it into C# and CLR. Unfortunately, Microsoft screwed up the implementation (not surprisingly) or wanted to take on Java at the same time or both. Which single language in the world can target Win32, CLR and Linux at the same time? Borland Delphi. No other language comes close. If Borland added Java bytecode generation to Delphi and completed the skunkworks project on adding Java capability to Delphi years ago (1998-1999?), we’ll have a language that can target Win32, CLR, Linux and Java all at the same time! VB.Net is not VB??? Wow. Next thing you’ll be telling me is that Visual Basic is not Basic, Windows XP is not Windows 95, and Mac OS X is not Mac OS. Say it ain’t so. BTW, who is Richard Grimes? Chris, Chris, Chris… You are missing trifles (like, the facts), but, of course, you have an opinion. Let me update you on this: Richard Grimes is an MS MVP, who put out a couple of .Net books during the last five years. The man knows his dot and he knows his net, for sure. Regarding VB.Net not being VB, search for Visual Fred (the name for VB.Net Bill Vaughn –another MS MVP– coined at VSLive2001!) on Google and you’ll be surprised at how many people think VB.Net <> VB. Check out Karl Peterson’s (yet another MS MVP) bio in Microsoft’s VisualBasic community site (under MVP awardees). Here ends the update. Regarding all this, I’m very troubled by the fact that developer acceptance around .Net is not materializing as Microsoft would have us believe it is. Soma’s numbers are at best wishful thinking! Five million downloads in a month, presumably two years ago: was some kind of DOS attack on Windows Update servers requesting the .Net runtime because of its size? And, are those two and half million developers all professionals who take home bread earned on .Net development? I guess not. My company is already diversifying its developer assets and hiring Java developers and buying Java training for the current developers (we were a Win32/C++/CORBA shop). All things aside, training and certification is much better on the Java side; I could easily attribute it to Java’s stability due to its head start of a couple of solar years (and almost a decade in Internet years). I would like to think that Microsoft would not abandon (or stall) .Net just for the sake of its huge investment in it, but, then again, Motorola had poured a lot of money into Iridium, didn’t they? The last 2 years I have been developing for C# and managed/unmanaged C++, and a lot of the discussions I see here are pure political en uttermost rubbish. It doesn’t matter if it is based on Java, or if it still uses Win32, or that there are no pure .NET programs yet. What counts are the results you get when you create a program and .NET especially C# is clearly a direction to take. One of the pitfalls developers have is that they compare it with technology they are used to. But .NET programs have a different design philosophy, so it is wrong to compare it with MFC based programming models. If you force a .NET program to behave as a MFC program, then it is very logical that it is slow, or hard to implement since you are raping the design structure. I made that mistake in the beginning, but now that I understand the .NET logic I can create programs fast and even get near-unmanaged execution speeds. I think that most developers that complain still have no clue how to program the Object Oriented way. Oh yes, they use object classes, but they have no clue how real object classes should be implemented. They write C++ code like C technology. MFC is a big example of this, it looks like objects because they use classes, but it is nothing more than a one dimensional class wrapper, resisting change. Violating object oriented design. The .NET is clearly the right direction in the object oriented design, even when some classes are sealed and cannot be inherited. But that does not mean that they cannot be extended. Also regarding speed, in time more and more code will be ported to .NET. Step by step, also the CLR will be improved step by step, and at some time, you will have more managed code running at the OS level that unmanaged code need more time to Interop and thus becoming slower than managed code. Something else not discussed here is that the same .NET programs created now will eventually outperform none-.Net programs in the future when the CLR gets more and more optimized. The reason for this is that unmanaged programs are compiled with the current know processor and lightning fast, now, at this date, but when that program is run on a Pentium 5 or 6, it will run slower than a .Net program since it gets compiled with the latest CLR at that time that might include Pentium 5 and 6 specific instructions. Without need to recompile!!!! And in theory, the CLR might analyze the running .NET application and optimize most used functions even more by moving the execution code in memory so that the execution code ends up into the processor memory cache. Something an unmanaged program cannot do! The size of the .NET framework is of no discussion, with current hardware and technology. Especially when programs created now, takes months sometimes years to develop. So instead of fixating now that the .NET framework is too big compared to your application, by the time you release it, and it will look ridiculously small compared to other programs. And another important feature of .NET programs is that it promotes to create more secure programs that are a lot harder to get misused by worms or viruses. So this is a wise choice to create managed programs as OS core components. Another misconception is that .Net programs are slower because they need more time to load compare to unmanaged programs. This is not because it loads the 25 MB framework!!! It is because the CLR is compiling and optimizing your code, and checks the code for security issues like worm infection. Only the part of the framework that is needed is loaded. You should be happy because it helps in creating a more secure OS. The only thing I complain about the .NET framework is the resistance of the users to install it because of stupid myths. But modern Windows XP CD’s, now seems to install it automatically. In my opinion a big step forward. I would hate to go back to the MFC garbage. But this is my opinion. [a] dotnet reeks of Java. They pinched all the good ideas. I should jolly hope so. [b] VB.NET is crap. Certainly it’s ugly and I wouldn’t write new code with it, but who cares? I can USE classes written in VB.NET. [c] Thin wrapper over blah. It had to be a wrapper over something. It wraps win32 because amazingly they didn’t have a spare decade to completely rewrite the OS before releasing dotnet. What it DOESN’T do it expose the quirks of the underpinning implementation. Or sometimes it does. Perhaps a thicker wrapper over Win32 might have been better. But then performance would have suffered. I vote for mostly abstracted. Wrapping really old code also means wrapping really stable, thoroughly debugged code. I can’t see how this is bad. [d] Grimes doesn’t love dotnet. Um, so? That’s his problem, not mine. He might also have had a woman on the side while he wrote the books, and this is equally irrelevant to the utility of the books. [e] Thin layer blah take 2. To me this is the single most important aspect of dotnet – finally MS will be in a position to repair the applecart without upsetting it. It is vitally important that the next generation codebase be abstracted away from the OS. This makes me feel guilty every time I use COM interop. Sometimes I bite the bullet and implement in pure C#. [f] As far as I’m concerned, dotnet is a free ticket to 64bit-land. The applications on which I’m working are squarely targeted at large companies who will prefer 64bit "native" applications and I will cry not at all about suddenly being the only vendor with platform native product. [g] Three cheers for the Mono guys. [h] I wonder on the truth of rumours of dotnet for Mac. It’s not vital to my world domination plans (who wants customers who think it’s cool to be clueless?) but it would certainly round out the portfolio. "It is vitally important that the next generation codebase be abstracted away from the OS." You are right about this. C made the step from Assembler to an abstract language, now the managed code is the next logical step. Somehow, I believe that people that complain about stupid little details are the people that are getting too old to keep up with the modern technology and want to go back to the old days where everything was much better. Sadly enough for those, DOS has almost disappeared. A lot of people are also missing the point that managed programs are designed with security in mind. Managed code can be made that only certain code with the correct encryption key can load it and execute it. Unlike unmanaged code dll that just can accept any program to execute its functions regardless if it is a worm or a virus. By default, .NET programs have no network rights!!! So if you create a stupid little calculator intended to be run only on a local machine, then it cannot be taken over to start sending SPAM mail through the Internet. By a Trojan. This creates a more secure OS if these components are used as kernel parts. Don’t get me wrong, an infection can still occur, but it simply has no access to the Internet or LAN, thus slowing down any infection. Another thing that people seems not to see is that programs gets more and more connected to the Internet. The distinction between a standalone application and one running in a browser is getting close to zero. Even a stupid screen saver might want Internet access to update its picture o the day. It is near impossible to do this with the current unmanaged technology within a reasonable time frame and with enough security. I don’t clame that .NET is perfect!!! It is not, but it is a big step towards the future and has speeded up my development cycle dramatically. Sometimes I wonder if Java would not have evolved to what the .NET is now if Microsoft were given a chance to extend it. . MS is a very great corp,but his opinion on open source makes me disappointed! Richard Grimes’s article says what the most .NET programmers’ worry about. I’m a trustily pursuer of .NET Framework,But I still want to support Richard Grimes’s points,The status in quo is that,We are really Confused,Confused,Confused…. Test. Time can test all things. You are right, time will tell. But there are a very important signs that the .NET is the direction to go. * Longhorn depends on it and pushes to use the .NET or else you will lose functionality. * All modern Microsoft Visual studios can create .NET programs, most of them forces you to use .NET (VB and C#). * Other programming languages start to follow (Delphi) * Far better virus and worm protection built into the applications by default. Imagine a OS kernel built on .NET applications. * Project Mono to port the .NET to Linux, Mac,… My best bet is on .NET, maybe in these days we still have to work with conventional executables, but you don’t learn .NET in a week, so better at least have some minimal experiance. I dont know the answer Ding! 我还是觉得c/c++好一些。 I like c and c++ more than c#,vb.net and Java. Any large framework will have it’s shortcomings, but did Richard really have to get so fed up as to give up on .NET entirely? How is that going to help improve things? When faced with a challenge like this, you stick with it until positive changes are made. Walking away does more harm than good. Quiting on .NET, as Richard has done, doesn’t speak well to his character. I have to agree with Olafs’ statements. The benefits far outway any nitpicking that’s been going on. Richard Grimes certainly has an axe to grind, just take a look at his website(richardgrimes.com) to see why. Microsoft shuned his assertions, and well, now he is taking his toys home and won’t play anymore. Good riddence I say, no one wants a cry baby who doesn’t get his way in the sandbox Richie. .net will have a nice future! Along with the vs.net2005, I think .NET will be much stronger.Trust .net, and it will change our life patterns. I belive .net I’ve been developing .NET for my CS research projects over the last 1.5 years, and as much as I love .NET and C#, the size of the redistributable does spurn adoption. The other problem I have is that COM/unmanaged C++/ATL are still needed for many tasks, such as namespace extensions, device drivers (right — I don’t expect C# to be used for device drivers but still …), explorer bands. Yes, COM interop works, but it’s a kludge. I’d like a .NET/C#-accessible explorer.exe, etc. Maybe longhorn will fix this? Well well well, i’d like .NET. It speeded up the software development, thought it’s not so fast currently. But in the future, the new artichiture and the new, fast hardware will solve this problem. To the size of the redist package, may be new compression tools can make it smaller… i don’t know why few of people don’t want to install .NET FX. They say, "i won’t install such thing". I really don’t know why they call such a good job "such thing". At last, I have to say, I believe .NET. Hi,guys,why don’t you spent more time on something worth it? Everybody go back office,and do anything we really should do. A future thing may be know in future,but I can’t catch so many english.haha. java is more outstanding actually. <br>the platform is not the most important element <br>in sothware ,by the way. Richard Grimes 卻一語道出許多他對於.Net Framework… Good that someone has time to respond to someelses non-sense. Java guys have heaps of reasons to stay with Java whereas .Net gurus have tons of reasons as well. Nothing is perfect… <br> <br>Anyway, looking forward to the .Net 2.0 Another reason to use the .NET: <br>If you create a managed application with the Visual studio 2005, then you are able to create a neutral application that will compile (CLR) to 32 bit when run on a 32 bit windows and 64 on a 64 bit windows. <br> <br>This means that you only need 1 and only 1 compiled application, that runs just optimized on the processor detected by the CLR. And the buyer does not have to purchase the program 2 times! <br> <br>For the newbies, .NET programs gets compiled by the CLR during the load process. This is why the loading is slower. Although the CLR cannot optimize perfect otherwise it would slow down the loading even more, it can optimize depending on the processor. <br> <br>Ok this is .NET 2.0, but if you create managed code now, it can be ported to Visual studio 2005 and be ready for the next wave. <br> <br>—– <br>Original Reference: <br> <br>Larry Sullivan (Expert): <br>Q: Will 32-bit managed applications run on .NET 64? <br>A: 32 bit applications built with v1.0 or v1.1 will always run as 32 bit applications. On 64bit these applications will run in the WOW. If you build an agnostic application in Whidbey, C# has this as AnyCPU, then it will run as a 32bit application on a 32bit platform and a 64bit application on a 64bit platform. You can make your application 32bitrequired if you are using a 32 bit COM object that doesn’t have a counter part for 64bit. <br> <br> i think .net is very good. <br>if u are worried about its future,u may be a pig! dtye Under: "On using the .NET Framework for shipping products"; In your Response you have misspelled ‘Constituency’. Just thought I’d help out! -Will, C# looks like Java. It smells like Java. It is Java! I consider copying Java as kindergarten behaviour from Microsoft. Why can’t they invent something more novel? C# and the .NET platform are great. So is Java. They are nevessary to develop easily and quickly business solutions. But C++ won’t go away. It wil l always be there because of the potential it offers. Especially for innovation. I’m a home user, not a developer. Microsoft wants me to be a business. I’m not. Only one person uses my computer, me. I hav WinXP Pro with a Windows Media Center 2005 version on an HP laptop. Do I need a .NET ASP Software, Framework, whatever? I have been trying to set up my computer as simply, and as uncluttered, as possible. Nowhere in my papers and how to’s does it say I need to be a network, or that I need the NET ASP or NET 1.5. Why they don’t set up a computer to run as effeciently as possible and leave these decisions to the person who only wants to edit photos, get info from the web, write letters–no developer. They are blooming idiots. So, my simple question to you developers–Can I not download NET 2 or uninstall net 1.5ish? We users still need a finished product and not all these different upgrades and changes. Hey JJ, We try not to be, in your words "blooming idiots" but you’re certainly open to your opinion. Like all Microsoft software from Windows to Office, if you want to update your system, all you need to do is go to. This will automatically update your machine for any system requirements you need. That’s it, you’re done The information I found here was rather helpful. Thank you for this. Адвокат оказывает, юридическая консультация по вопросам таможенного оформления, экспорт, импорт, таможенный адвокат, адвокат по контрабанде, адвокат по таможенным вопросам, юридическая консультация, таможенный адвокат, таможенная консультация, уголовный адвокат, адвокат по должностным преступлениям Если у вас находятся актуальные медицинские справки с печатями различных медучреждений в обеих столицах, мы можем приобрести оные у вас с существенной денежной компенсацией. spravkaspb(барбос)nm.ru
https://blogs.msdn.microsoft.com/danielfe/2005/02/22/responding-to-richard-grimes-article-on-net/
CC-MAIN-2016-30
refinedweb
18,349
74.49
- Author: - dodolboks - Posted: - March 23, 2011 - Language: - Python - Version: - 1.2 - google maps - Score: - 1 (after 1 ratings) example import get_lat loc="jl perjuangan by pass sunyaragi cirebon get_lat(loc) -6.734402 - 108.556878 More like this - Django google maps v3 snipplet by summerisgone 5 years, 2 months ago - ReST google-map directive. by mucius 2 years, 4 months ago - Get Latitude and Longitude from google maps by b23 7 years, 10 months ago - widget to capture a geographic Point by jerojasro 7 years, 7 months ago - GoogleAdmin: GMaps base layer in Geographic Admin (GeoDjango) by jbronn 6 years, 11 months ago Please login first before commenting.
https://djangosnippets.org/snippets/2399/
CC-MAIN-2015-40
refinedweb
107
54.26
Checked out some of the high level JSF 2.0 new features recently using NetBeans 6.8 and GlassFish v3. For what it's worth, I think they are very usable, feature rich and effcient pairing for conducting Java EE 6 development. As with all old habits, some won't die. And my habit for taking a quick look at any new programming language/framework is to build a very simple calculator with one screen and some simple calculation logic. With NetBeans, creating a new Web project is trivial. To add JSF support select it as a framework to use. After a bit of navel gazing, I realized a significant part of the unholy dislike I had for JSF 1.2 and its earlier versions predominantly stemmed from the need to live in the configuration red zone -- faces-config.xml. Every damned thing that you wanted to use or access pretty much needed to be defined in the configuration file: managed beans definitions with packages/classes and names and scopes, even the most simples of page navigation paths, etc. But as of JSF 2.0, that has mostly changed! Accomodating a convention over configuration model for page navigation and making use of annotations for declaring managed bean components (and associated runtime attributes and property values) in my simple example, I didn't have to even look at the faces-config.xml file. Happy Days. Here's my simple CalculatorManagedBean, which is responsible for performing the arduous task of calculating a result from a given two values and an operand. It also supplies the operand values for the screen to display. To declare this as a ManagedBean, all I had to do was to add the @ManagedBean annotation. I also decided to bind this ManagedBean into each clients HttpSession so it was created once, and was able to store property values set from eacg clients page. 1 package sab.demo.calc.beans; 2 3 import java.io.Serializable; 4 import javax.annotation.PostConstruct; 5 import javax.faces.bean.ManagedBean; 6 import javax.faces.bean.SessionScoped; 7 8 @ManagedBean(eager=true) 9 @SessionScoped 10 public class CalculatorManagedBean implements Serializable { 11 12 public static char[] operands = { '+', '-', '*', '/' }; 13 14 int value1; 15 int value2; 16 char operand; 17 String result; 18 19 public CalculatorManagedBean() { 20 } 21 22 public char[] getOperands() { 23 return operands; 24 } 25 26 public char getOperand() { 27 return operand; 28 } 29 30 public void setOperand(char operand) { 31 System.out.printf("setOperand: %s", operand); 32 this.operand = operand; 33 } 34 35 public String getResult() { 36 return result; 37 } 38 39 public void setResult(String result) { 40 this.result = result; 41 } 42 43 public int getValue1() { 44 return value1; 45 } 46 47 public void setValue1(int value1) { 48 System.out.printf("setValue1: %s\n", value1); 49 this.value1 = value1; 50 } 51 52 public int getValue2() { 53 return value2; 54 } 55 56 public void setValue2(int value2) { 57 System.out.printf("setValue2: %s\n", value2); 58 this.value2 = value2; 59 } 60 61 public void calculate() { 62 switch(getOperand()) { 63 case '+' : 64 result = String.valueOf(value1 + value2); 65 break; 66 case '-' : 67 result = String.valueOf(value1 - value2); 68 break; 69 case '*' : 70 result = String.valueOf(value1 * value2); 71 break; 72 case '/' : 73 double v1 = value1; 74 double v2 = value2; 75 result = String.valueOf(v1 / v2); 76 break; 77 } 78 System.out.printf("Calculate: %s %s %s = %s\n", 79 getValue1(), 80 getOperand(), 81 getValue2(), 82 getResult()); 83 84 } 85 86 @PostConstruct 87 public void postConstruct() { 88 System.out.println("postConstruct"); 89 operand = '+'; 90 value1 = 0; 91 value2 = 0; 92 result = "n/a"; 93 } 94 } 95 96 With the ManagedBean taken care of, the next step was to create the JSF page. With JSF 2.0, it now uses Facelets as the default view technology instead of JSP. This means there are lots of things that are able to be expressed more naturally in the view layer, which were previously difficult or cumbersome in the older JSP model. A really useful thing I found in facelets was the ability to render a ManagedBean property directly in the page, without needing to surround it with other tag library calls. So to create my calculator screen, I simply added a couple of fields, and wired them into the CalculatorManagedBean that I'd developed. Again, following convention over configuration, the default name for a ManagedBean is a lower case version of the classname, which makes them easy to remember/lookup from a project hierachy (as opposed to hunting through XML). Of course NetBeans makes this easy since it has code-insight which presents the names of known ManagedBeans and their available properties for insertion via a few keystrokes. The list of operands values shown in the select list are populated from a property on the ManagedBean which returns an array of char. The "=" button is wired into the calculate operation, which takes its current property values, performs the desired operation and sets the result property, which is then displayed in the result field on the page. 1 <?xml version='1.0' encoding='UTF-8' ?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> 3 <html xmlns="" 4 xmlns: 6 <h:head> 7 <title>Calculator Facelet</title> 8 </h:head> 9 <h:body> 10 <h:column><h3 style="font-family: arial; font-variant: small-caps; color: #336699">Calculator</h3></h:column> 11 <h:form> 12 <h:panelGrid 13 <h:column> 14 <h:inputText 16 </h:column> 17 <h:column> 18 <h:inputText 20 </h:column> 21 <h:panelGrid 22 <h:column > 23 <h:selectOneMenu 25 <f:selectItems 26 </h:selectOneMenu> 27 </h:column> 28 <h:column><h:commandButton</h:column> 29 </h:panelGrid> 30 <h:column> 31 <h:inputText 33 </h:column> 34 </h:panelGrid> 35 </h:form> 36 </h:body> 37 </html> 38 39 40 Put it all together and run using the local GlassFish instance, the page works and looks like this. So there it is, a JSF 2.0 version of my old habit up and running in a few minutes. I like what I've seen with JSF 2.0 so far. Of course, the use of @ManagedBean annotation in JSF 2.0 may be dead already with the arrival of CDI in Java EE 6 and its @Named annotation, but that's not an issue I'm going to explore here.
http://buttso.blogspot.com/2010/03/obligatory-calculator-in-jsf-20.html
CC-MAIN-2019-09
refinedweb
1,059
53.92
# Waking up of the sleeping institution: how we taking off training-wheels from Python in REAPER ![Image for taking attention](https://habrastorage.org/r/w1560/webt/_-/7t/mz/_-7tmzmd_pitkghheipgrrtkm4i.png) About a week I wonder around the idea of this article, mainly, because of missing the content here and tidiness of the coronavirus-themes. But, when robotic-harvester, hacking zip with bitcoins and other cool articles released — I decided not to publish crude material. However, unexpectedly today the maintainer of this review hero showed up from the lockdown and, several hours ago **reapy** v0.6.0 has been published on PyPi. Under the cut — the last change log, which contains (to my pleasure) no line where I have not been involved one way, or another. Finally: why reapy is needed and how Python works inside REAPER. **Changelog** [0.6.0](https://github.com/RomeoDespres/reapy/releases/tag/0.6.0) — 2020-04-18 ------------------------------------------------------------------------------ ### Added * New API in`Send`: + read-only property `Send.dest_track -> Track` + properties `Send.midi_source`, `Send.midi_dest` * `Track.received` read-only property * Support for `Project` external state: + `Project.set_ext_state(section: str, key: str, value: Union[Any, str], pickled: bool) -> int size` + `Project.get_ext_state(section: str, key: str, pickled: bool) -> Union[Any, str` * First argument `id` of `Project` can now be a project name (with or without extension) or an integer (the GUI index of the project). * `Project` extended with methods: + `get_info_string(param_name: str) -> str` + `get_info_value(param_name: str) -> float` + `set_info_string(param_name: str, param_string: str)` + `set_info_value(param_name: str, param_value: float)` * REAPER control over the network. `reapy` can be installed on a machine even if it does not have REAPER installed, and then control other instances by using `reapy.connect`. * Several ReaScript API bugs of `reaper_python.py` are fixed in `reapy.reascript_api`. Currently replaced: + `MIDI_GetHash` + `MIDI_GetTrackHash` + `MIDI_InsertEvt` + `MIDI_InsertTextSysexEvt` + `MIDI_SetEvt` * `MIDIEvent` and `MIDIEventList` classes now not only abstract, but can be used directly. `MIDIEvent` extended with: + `delete()` for deleting from the take. Works in every Event class. + `set(self, message=None, position=None, selected=None, muted=None, unit="seconds", sort=True)`, currently works only in generic event. * `Take` extended with: + `add_event(self, message: ty.Iterable[int], position, unit: str = "seconds") -> None`. + `add_sysex(self, message: ty.Iterable[int], position: float, unit: str = "seconds", evt_type: int = -1) -> None`. + `midi_events` property (`MIDIEventList`). + `midi_hash(self, notes_only: bool = False) -> str`. + `n_midi_events` property. * `Track` extended with `midi_hash(self, notes_only: bool = False) -> str:`. ### Deprecated * `index` argument in `reapy.Project` is deprecated in favor of `id`. `reapy.Project(index=3)` becomes `reapy.Project(3)`. ### Fixed * Typo in `reapy.has_ext_state` (issue [#46](https://github.com/RomeoDespres/reapy/issues/46)). * Deferred script error in REAPER when subclassing reapy classes (issue [#66](https://github.com/RomeoDespres/reapy/issues/66)). * `Project.selected_items` returning invalid items (issue [#72](https://github.com/RomeoDespres/reapy/issues/72)). * `sort` boolean argument in `Take.add_note` behaving oppositely to expected. Exposition ---------- ### REAPER This is outstanding DAW, that brings unique user-experience. Many of my colleagues pathologically hate it, many — pathologically love. The matter is, as I think, interaction with REAPER looks like: > You don't like how thing works — tune it, thing does not work — code it. Basically, major flexibility and wide API for the 4 PL allow growing of big open-source community around proprietary software. Extensions can be written in C++, [eel](https://www.cockos.com/EEL2/), lua and Python; moreover, every language integrated by its own way, so, depends on the situation is better to write with one or another. For example: in the most cases C++ — overkill as for writing and maintaining, as well as for installing by the end-user. In fact the wide-user love touched only three: SWS, ReaPack (it is something like npm) and JS\_ReaScript. Eel in writing as expensive as C: almost manual control over the memory, almost no abstractions including the heigh-level functions and in addition — almost everything has to be written from scratch: little amount of «library» code present in the web. However, eel has three big advantages over the rest: efficient (unlike lua and Python), interpreted (unlike C++) and has better communication with Reaper through additional API functions and shared memory. Also, it allows writing of DSP and MIDI plugins (like VST, but JSFX) quite cheap. Lua is de facto standard for writing common extension: it has a number of good libraries, its behavior is consistent on the all platforms, easy-installed from ReaPack without voodoo magic. However, considering me as not a big fan of the language, Reaper made it worse in several cases especially — in the area of dependency-management. Luarocks is not working, I still have not found a way to import something without \*.lua extension, `luasocket` for example. ### Python Here should appear Python in shiny armor on the white horse as language with endless list of libraries and packages, yet without require for runaround of CMake. Pity, but inside Reaper the problem follows another one. * Python has to be installed separately, more than — dynamic library has to be found manually from the preferences, which is rising the entry threshold (we are, khm, musicians, aren't we?). In Linux `python3.so` has to be installed separately as dev-package which is not obvious. * script is imported also ass-backwards, leads to crash in case of importing for example `numpy` from the couple of scripts during the session. * missing bindings for GUI. Lua and eel have `gfx*` functions which are bindings to LICE(part of the Cokos WDL library), C++ can use WDL directly, but Python sucks. At the same time `tkinter` or `pyqt` usage is corrupted, through script has to be non-blocking and there is no such thing as main loop, just deferred execution of the function. * Honestly it is about every script-extension, but in Python it hurts me more: you have to write script, save the file, launch from Reaper, look at the traceback or catch a crash, rewrite in the editor or IDE and «once again». Also, no linting etc: in a couple of words — the nightmare of Z-generation :) Time to time, coder to coder these problems attempted to be solved in different ways, which were close to the idea of separating the Reaper-instance of script and non-Reaper instance which communicates inside part through TCP. However, without a great success: maybe because of humans realizing that, maybe just the time has not come yet. > a history became a tale, tale — a myth > > ![Ring of the power](https://habrastorage.org/r/w780q1/webt/lf/je/q5/lfjeq5bc5id4rnbgicf-zfmciqs.jpeg) reapy ----- If believe GitHub, in Febrary of 2019 *(somewhere in that time I tried to make one more attempt to make TCP-helper)* **Romeo Despres** from Paris published the first revision of [reapy](https://github.com/RomeoDespres/reapy), which gently and with elegance wraps ReaScript API. More than, it runs the same as from inside as from outside of Reaper. The package attempts to wrap every call to API into the human-readable ORM *(can I call it ORM?)* but if the desired function hasn't been wrapped yet — it can be called «directly». It can be installed with pip and, at the moment needs to be initialized within a reascript which launches Reaper web-interface for handshake of outer and inner part of reapy. When we launch «from the outside» the wrapper works this way: everything not attempted to run inside Reaper executes in normal way. `reapy.core` classes going to be serialized and remade from the inside, executes there and return the response. This solves not only the problem of uncomfortable script execution, but also prevents Reaper from crashes by the multiple imports. So I would recommend launching everything from the outside: this way the whole Python-code ought to run inside Reaper will have a single entry-point. BTW, in the last release we've added possibility of subclassing the `reapy.core` classes which led to the importing of the user modules from the inside. ### Bug fixes and 3rd- party extensions We don't really want to lean on the 3rd-party extensions. Not because of the trust, but because of user comfort: the most frequent questions are about scripts that are not working without extensions like SWS. The Linux-users are in worse condition, as many things have to be build from the source. Also, huge part of the SWS API is just another «more comfortable» wrapping of the original API, so we try to write everything we need from scratch. Independent of that — if SWS is installed it will be available from the `reapy.reascript_api` module. We've discovered that vanilla C-bindings (`reaper_python.py`) also have bugs and it's open question will Justin fix 'em or not. So I've started to make our own bindings to replace the buggy one. Now I have a question about usage of JS\_ReaScript, as it is not a wrap of vanilla API, but wrap of the WDL, which can be used for making native cross-platform GUI. Yep, we can try to deploy our own copy of WDL with our bindings, but this is the area with need of research. ### When to use at the moment Thanks to the resent additions, especially the `connect(host)` function, reapy become the first candidate for making micro-services. Sounds quite strange for the DAW, but, seriously, with the ability of connecting to any Reaper on the web the use-cases grow widely. The most obvious is the distant complex GUI for iOS or Android, why not? Reaper tries to make distant control not only with OSC (which, let's be honest means `Liine Lemur` for some bucks). But if be honest, web-interface is not as flexible as full-powered distant API without need for runover connection issues. Also, interesting to consider cases with many of Reaper instances, which are doing «something». Maybe some audio-processing cloud service based on Reaper, I don't know. We also look at this side, but from another motive. When you need tests. I can't imagine how to test extension on eel or lua. Yep, in Python, considering Reaper it is also not as simple as walk in the park, but not more complicated than test some REST API. Roadmap ------- In the present time we are thinking of: * wrapping 100% of the API * cover project with tests. Yes, this is not a trivial task, especially no ops appeard on the project yet. On my side=project I run tests locally, but I dream of Reaper inside a cloud for usage in CI. Sounds as a good point to look at. * make a «one-click» installation. Actually, the steps are known, just need a time to implement. I hink that the `reapy` and other reapy-based extensions will not be installed from ReaPack, but from the PyPi and pip instead. * make native GUI contributing ------------ You can install the package, connect to the Reaper instance, start to code and find a place which is uncomfortable. Yes,the project is young and possibility of such case is heigh. Like so, in October I've realized that, despite human-readable wrap, every call to the `reapy` glows by all the colors of `mypy`. In sum: couple of evenings and I've had stubs, which went to the pull-request. Later I found the same glowing of «raw-API» calls on my side-project. So I've decided not to use «raw-API» in side project, but wrap it on the reapy side. So, in a process of making my side-project a half of code is written to the `reapy` which seemed to me as the idea of open-source: to use it, and push there fixes of everything was uncomfortable to You.
https://habr.com/ru/post/497942/
null
null
1,952
64
Auto-Scaling scikit-learn with Spark Databricks gives us an overview of the spark-sklearn library, which automatically and seamlessly distributes model tuning on a Spark cluster, without impacting workflow. By Tim Hunter and Joseph Bradley, Databricks. Data scientists often spend hours or days tuning models to get the highest accuracy. This tuning typically involves running a large number of independent Machine Learning (ML) tasks coded in Python or R. Following some work presented at Spark Summit Europe 2015, we are excited to release a library that dramatically simplifies the life of data scientists using Python. This library, published as spark-sklearn, automatically distributes the most repetitive tasks of model tuning on a Spark cluster, without impacting the workflow of data scientists: - When used on a single machine, Spark can be used as a substitute to the default multithreading framework used by scikit-learn (Joblib). - If a need comes to spread the work across multiple machines, no change is required in the code between the single-machine case and the cluster case. Scale data science effortlessly Python is one of the most popular programming languages for data exploration and data science, and this is in no small part due to high quality libraries such as Pandas for data exploration or scikit-learn for machine learning. Scikit-learn provides fast and robust implementations of standard ML algorithms such as clustering, classification, and regression. Scikit-learn’s strength has typically been in the realm of computing on a single node, though. For some common scenarios, such as parameter tuning, a large number of small tasks can be run in parallel. These scenarios are perfect use cases for Spark. We explored how to integrate Spark with scikit-learn, and the result is the spark-sklearn Python package. Spark-sklearn combines the strengths of Spark and scikit-learn with no changes to users’ code. It re-implements some components of scikit-learn that benefit the most from distributed computing. Users will find a Spark-based cross-validator class that is fully compatible with scikit-learn’s cross-validation tools. By swapping out a single class import, users can distribute cross-validation for their existing scikit-learn workflows. Distribute tuning of Random Forests Consider a classical example of identifying digits in images. Here are a few examples of images taken from the popular digits dataset, with their labels: We are going to train a random forest classifier to recognize the digits. This classifier has a number of parameters to adjust, and there is no easy way to know which parameters work best, other than trying out many different combinations. Scikit-learn provides GridSearchCV, a search algorithm that explores many parameter settings automatically. GridSearchCV uses selection by cross-validation, illustrated below. Each parameter setting produces one model, and the best-performing model is selected. The original code, using only scikit-learn, is as follows: from sklearn import grid_search, datasets from sklearn.ensemble import RandomForestClassifier from sklearn.grid_search) The dataset is small (in the hundreds of kilobytes), but exploring all the combinations takes about 5 minutes on a single core. Spark-sklearn provides an alternative implementation of the cross-validation algorithm that distributes the workload on a Spark cluster. Each node runs the training algorithm using a local copy of the scikit-learn library, and reports the best model back to the master: The code is the same as before, except for a one-line change: from sklearn import grid_search, datasets from sklearn.ensemble import RandomForestClassifier # Use spark_sklearn’s grid search instead: from spark_sklearn) This example runs under 30 seconds on a 4-node cluster (which has 16 CPUs). For larger datasets and more parameter settings, the difference is even more dramatic. If you would like to try out spark-sklearn yourself, it is available as a Spark package and as a Pypi library. To get started, check out this example notebook on Databricks. In addition to distributing ML tasks in Python across a cluster, spark-sklearn provides additional tools to export data from Spark to python and vice-versa. You can find methods to convert Spark DataFrames to Pandas dataframes and numpy arrays. More details can be found in this Spark Summit Europe presentation and in the API documentation. We welcome feedback and contributions to our open-source implementation on Github (Apache 2.0 license). About: Databricks was founded by the team at UC Berkeley AMPLab that created and continues to drive Apache Spark. Their vision is to make big data simple for data scientists, engineers, developers, and business users alike. Original. Reposted with permission. Related:
https://www.kdnuggets.com/2016/02/auto-scaling-scikit-learn-spark.html
CC-MAIN-2022-21
refinedweb
760
52.8
[Tim] > At the time, lexical nesting didn't yet exist in Python either. > The case for "magically local" bindings has gotten stronger since > lexical nesting was added, but now we've got a backwards compatibility > burden too. [Ville Vainio] > Backwards compatibility would be less of a burden if it was flagged as > "possibly unsupported in the future" in the documentation. That wouldn't help, and it's not undefined now anyway. Changing defined behavior in incompatible ways requires a future statement and (at least) a full dot-release transition period. > At least it would do a bit to alleviate the embarrassment felt when > explaining the feature to colleagues, 5 minutes after touting how well > designed python is ;-). I don't think the case is compelling even with lexical nesting, just stronger than it was. There are very few constructs in Python that introduce a code block, that set hasn't changed, and neither has that scopes are associated only with code blocks (see the "Code blocks, execution frames, and namespaces" section of the Ref Man). It would be a wart of a different kind if listcomps were considered to establish a new code block, and a wart of a third kind if listcomps weren't considered to introduce a new code block but were unique in introducing a new scope anyway. "Good design" has to balance lots of things, and protecting a programmer against sloppy reuse of variable names is only one of them. I've never found that the the binding done by listcomps is useful after the listcomp has finished, but then I've never been burned by it either. That it *can* burn the careless is a wart too, of course. OTOH, the ability to explain listcomps semantics exactly via appeal to an equivalent loop nest is worth something too. guido-doesn't-like-pepper-in-his-sugar-ly y'rs - tim
https://mail.python.org/pipermail/python-list/2003-January/187923.html
CC-MAIN-2014-15
refinedweb
315
58.52
ADAL .NET 3.14.1 released 11 July 2017 ADAL.NET is an authentication library which enables developers to acquire tokens from Azure AD and ADFS, to be used to access Microsoft APIs or… 11 July 2017 ADAL.NET is an authentication library which enables developers to acquire tokens from Azure AD and ADFS, to be used to access Microsoft APIs or… 10 May. 25 April. 12 April 2017 Taking a step further to help organizations comply with industry regulations and data protection laws, we are pleased to announce the general availability of Europe-based Azure AD B2C tenants. 03 April 2017 New ACS namespace creation will be restricted starting June 30th, 2017. If you need to create an ACS namespace beyond this date, you will need to call Azure customer support. 23 March 2017 Announcing public preview of access token for Azure AD B2C. Acquire an access token and use it to call a web api. 14 March 2017 On April 20th 2017, Google will start blocking OAuth requests from embedded browsers, called "web-views". If you are using Google as an identity provider in Azure Active Directory B2C, you might need to make changes to your applications to avoid downtime. 13 February 2017 Over the past few weeks, we have introduced new features in Azure AD B2C, a cloud identity service for app developers. Azure AD B2C handles all your app’s identity management needs, including sign-up,… 31 January 2017 No need to log into the portal every month! Opt in today to receive your invoice statement attached to your monthly billing email. 03 January 2017 We’re excited and proud to announce that Microsoft Azure is one of the first hyper-scale cloud computing platforms to become HITRUST CSF Certified.
https://azure.microsoft.com/en-gb/blog/topics/identity-access-management/?Page=2
CC-MAIN-2020-34
refinedweb
294
59.33
FAQs Search Recent Topics Flagged Topics Hot Topics Best Topics Register / Login Mattias Ahlin Greenhorn 11 4 Threads 0 Cows since May 31, 2006 Mattias Ahlin writing to Temp files Hi What he is actally asking for is a way to create a temporary directory, not a temporary file. I'm also trying to create a temporary directory for a test case but havn't found any info on that. I have found alot of info on how to create temp files though Does anyone here know how to create a temporary directory ? Best regards, Mattias show more 11 years ago Java in General Localize select box Problem solved I used: <%@ taglib prefix="fmt" uri="" %> instead of: <%@ taglib prefix="fmt" uri=" jsp /jstl/fmt" %> which is a older version where expressions weren't allowed. show more 11 years ago JSP Localize select box Hi I want a select box to display localized values (the values are: once, daily, weekly). I want these values to be displayed in different languages for different users. I'm already using the fmt tag to display localized messages on the site. In the resouce file containing the translations I have this (I do of cource have the corresponding files for the other languages): Global.Frequency.Once=Once Global.Frequency.Daily=Daily Global.Frequency.Weekly=Weekly I've tried something like this (frequencies contains the values: Once, Daily, Weekly). But it failes because the fmt tag doesn't seem to accept expressions in the key. What I'm trying to do is to make the key for the fmt tag "Global.Frequency.Once", "Global.Frequency.Daily", "Global.Frequency.Weekly". <!-- Create a select for the available frequencys --> <select name="frequencies"/>" <!-- Create a option for each of the available frequencys --> <c:forEach <!-- frequencyName will be one of: Once, Daily, Weekly --> <option value="${frequency.frequencyName}"> <fmt:message </option> </c:forEach> </select> Any suggestions on how to solve something like this would be greatly apprechiated? Best regards, Mattias [ August 26, 2007: Message edited by: Mattias Ahlin ] show more 11 years ago JSP Thread issue I have a class named FoodListDay which represents all the meals for a day. The Set foodListMeals is not supposed to contain any null elements. But since the attribute is set through setFoodListMeals I don't know what kind of Set is assigned to foodListMeals. If it is a HashSet for instance, null is a valid element type. To fix this I introduced one line of code in setFoodListMeals that removes any null elements. But I fear that there might be some threading issues with this approach: Thread A calls setFoodListMeals with a Set containing a null element. It executes the first line of code (assigns the Set to the attribute foodListMeals). It gets preempted by thread B. Thread B calls getFoodListMeals and gets back the set with the null element. I'm not sure if making the method setFoodListMeals synchronized would take care of that because I don't completely understand thread/synchronization issues. If thread B wants to call getFoodListMeals when thread A is executing setFoodListMeals, would making setFoodListMeals synchronized make thread B to wait until thread A is done (even though thread B doesn't try to access the synchronized method)? Do I perhaps have to synchronize both methods to avoid any thread from accessing getFoodListMeals while another thread is already executing setFoodListMeals? public class FoodListDay { private Set foodListMeals; public Set getFoodListMeals() { return foodListMeals; } public void setFoodListMeals(Set foodListMeals) { this.foodListMeals = foodListMeals; this.foodListMeals.remove(null); // suggested fix. } } show more 11 years ago Threads and Synchronization I can't seem to set the log level on my package Hi I have a class that uses alot of other classes. All these other classes are littered with logging on low levels. I would like to suppress all logging by setting the default level for the ConsoleHandler to WARNING. Then I want to set the logging level to FINE on my package and only my package. Is that possible? My logging.properties looks like this (I have verified throught testing that this is the file used by the code): # Specify the handlers to create in the root logger # (all loggers are children of the root logger) # The following creates two handlers handlers = java.util.logging.ConsoleHandler # Set the default logging level for the root logger .level = ALL # Set the default logging level for new ConsoleHandler instances java.util.logging.ConsoleHandler.level = WARNING # Set the default formatter for new ConsoleHandler instances java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter # Set the default logging level for the logger named com.mycompany com.polopoly.weightclub3.tools.exerciseactivitypublish.level = FINE As you can see, I only use a ConsoleHandler and I'm trying to set all logging to WARNING and then set the level to FINE on my package only. The problem is that the level WARNING seems to apply on my package to. If I lower "java.util.logging.ConsoleHandler.level" to FINE, my logs are logged to the console but if I raise it to WARNING they are not. Any suggestions? It seems to me that this should be simple but no matter what I've tried it hasn't worked I would be thankful for your help. Best regards, Mattias show more 11 years ago Beginning Java Charset and encoding to chinese This is how I solved the problem: public class DomsProblem { public static void main(String[] args) { char[] ch = {0x00C1}; // The character � String s = new String(ch); System.out.println(s); // Prints the character � to the console } } show more 12 years ago Java in General comparison of dates How do you want to compare the dates? Do you want to check if one is befor the other in time, if they are equal or what? show more 12 years ago Java in General Charset and encoding to chinese Hi I want to print out a chinese character. This is the code I'm using, but it doesn't work. Any ideas why? import java.nio.charset.Charset; public class DomsProblem { /** * @param args */ public static void main(String[] args) { // Chinese character set (I think) String CHAR_SET = "Big5"; // China character String character = "a578"; // Check if the character set is supported. System.out.println("supported: " + Charset.isSupported(CHAR_SET)); try { // Get the character as bytes. byte [] charArr1 = character.getBytes(); byte [] charArr2 = character.getBytes(CHAR_SET); // Get the character in chinese. String userData1 = new String(charArr1, CHAR_SET); String userData2 = new String(charArr2, CHAR_SET); // Expecting these to print out chinese characters. System.out.println("Character1: " + userData1); System.out.println("Character2: " + userData2); } catch(Exception e) { e.printStackTrace(); } } } show more 12 years ago Java in General Throws and throw But normally you don't declare your RuntimeExceptions in the method header. Instead you declare them in the method's javadoc. See java.util.Vector for instance: /** * Returns the element at the specified position in this Vector. * * @param index index of element to return. * @return object at the specified index * @exception ArrayIndexOutOfBoundsException index is out of range (index * < 0 || index >= size()). * @since 1.2 */ public synchronized Object get(int index) { if (index >= elementCount) throw new ArrayIndexOutOfBoundsException(index); return elementData[index]; } Otherwise your API will be polluted with RuntimeExceptions that the clients of the API normally shouldn't be catching anyway. [ November 28, 2006: Message edited by: Mattias Ahlin ] show more 12 years ago Beginning Java Exceptons Modify your code like this and it'll work: if (feet > 0 && inches > 0) { feetToInches = feet * 12; totalInches = inches + feetToInches; centimeters = 2.54 * totalInches; done = true; System.out.println("The total length converted to centimeters is: " + centimeters); } else { System.out.println("Exception: Length cannot be negative."); } [ November 28, 2006: Message edited by: Mattias Ahlin ] show more 12 years ago Beginning Java Doubt in long datatype The long data type is a 64-bit signed two's complement integer. It has a minimum value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807 (inclusive). You're right that is can store 9223372036854775807 different numbers. Since half of them are negative, only half of them can be positive. show more 12 years ago Beginning Java
https://coderanch.com/u/125857/Mattias-Ahlin
CC-MAIN-2019-13
refinedweb
1,356
54.63
How to use CSS styles in Reactjs Web app without CSS as to Tea without sugar. If you don’t know CSS , grab some CSS lesson from the WC3 school and come back. So how we use CSS in React apps ? We have two options - Include regular CSS stylesheet file using import - Implement a functional component as Stylesheet First option is look like simple go head and create a style.css file and add the following CSS style in int .container{ background-color: skyblue; } h2 { text-align: center; } Import the style sheet Import the stylesheet as we import JS modules in React . import './Styles.css' Using the styles Since it is a regular style sheet we can use it with className attribute as follow. A class file in style file start with period (.) and id is begins with hash (#). We can combine multiple class in a ClassName attribute using space. Here is the sample style usage in render portion of a React ClassComponent render() { return ( <div className="container"> <h1>This is a heading</h1> </div> ); }
https://developerm.dev/2020/12/04/how-to-use-css-styles-in-reactjs/
CC-MAIN-2021-17
refinedweb
175
72.97
. 12 comments: Hi Jim, I was trying this out as I thought it might be interesting to see how it works, what it does etc. But when my iscript invokes the ExecXQuery function I get an error - ErrorReturn-> 763 - Java Exception: java.lang.reflect.InvocationTargetException: during call of java.lang.reflect.Method.invoke. (2,763) WEBLIB_CSS_SAXN.ISCRIPT1.FieldFormula Name:ExecXQuery PCPC:3291 Statement:27 Called from:WEBLIB_CSS_SAXN.ISCRIPT1.FieldFormula Name:IScript_ExecXQuery Statement:31 I traced the PeopleCode and it errors on &jExpressionRunMethod.invoke(&jExp, CreateJavaObject("java.lang.Object[]", &jDynamicContext, &jStreamResult, &jOutputProperties)); Can I use this just directly from an iscript CREF? Or did I just not do everything. I appended -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl to the JVM options. I have 8.48.09 installed. Thanks, Andrew @andrew, InvocationTargetException is thrown by the java.lang.reflect.Method.invoke method when the "invoked" method throws an Exception. Basically, this is just a wrapper around a different Exception. It appears that the run method of the XQueryExpression object threw an Exception. It would be great if we could see the Java nested exception, the cause of the InvocationTargetException. Unfortunately, I don't know how to extract the nested Java exception. Did you copy and paste the code from this post directly into a Record Field FieldFormula event? If so, the first thing I would check is your app server's proxy settings. Does your app server need to use a proxy server to connect to the internet? If so, make sure you have Proxy Host and Proxy Port defined in your psappsrv.cfg file. If you look at the Saxon documentation, you will notice you can actually run an XQuery from the command line. Try running your XQuery from the command line. You will find the Saxon docs in the sourceforge download saxon-resources8-9.zip from. To run your XQuery from your app server's command line, run %PS_HOME%\jre\bin\java -cp %PS_HOME%\class\saxon8.jar;%PS_HOME%\class\saxon8-xqj.jar c:\temp\rss2_html_obj.xq Where c:\temp\rss2_html_obj.xq is a copy of the XQuery from my repository. Of course, if your app server is on Unix, then use $PS_HOME/, etc. If you run this and get an error, then you should be able to get a better understanding of the error that Saxon is throwing. Another way to debug this is to write a Java wrapper that takes an XQuery file as its only parameter. Then you could catch the Java Exception and log it to a file or place it in a field that you can check after calling the method. Actually, now that I think about it, rather than posting this ugly Java reflection code embedded in PeopleCode, I should have written a Java wrapper and posted that. Try out these options and let me know what you find. Hi Jim, How silly of me, I should have realised it was connecting to the internet! I added the proxy info in and it worked this time. Although the page that was displayed had html tags in it. Perhpas the page had a problem writing the html? Anyway it worked and I like how you can bring that in. Thanks a lot. Andrew @Andrew, yes the resulting page is supposed to have HTML tags. The XQuery file converts RSS to HTML. Thanks for the feedback! I am delighted that it worked for you. Jim, My question is a little off topic but I am hoping you can spare some time. Can you please shed some light on how to use type casting in Peoplecode. It appears that one cannot cast objects. For e.g. if a method call returns a type of object but contains an instance of a class say ClassA. In java, one can easily cast it like so ( ClassA ) &ObjHndle However, this does not work. Another option would be to create a wrapper method in the class which casts the object handle to ClassA and return the ClassA object. However, since we are talking about vendor delivered classes, we are looking for way simpler ways. How can this be achieved ? @HH, "how to use type casting in Peoplecode... It appears that one cannot cast objects." You are right. You can't. Notice that I used reflection with the &jExp object to execute the "run" method. That is because the prior call to "invoke" returns an Object. Once a Java object reference becomes an Object, the only way to call its methods is through reflection. Yes, this is a pain. As you already stated, you have 2 options: 1. Create wrappers/helpers 2. Use reflection I think creating wrappers is easiest and cleanest. You don't need to modify the delivered API. You just need a class with a static method like public static XXX objectToXXX(Object o){ if (o instanceof XXX) { return (XXX) o; } else { return o; } } This is basically, a static cast method. Chris Heller just wrote a post on Casting and PeopleCode: Casting Java objects in PeopleCode If you need to revert to Java Reflection in PeopleCode, both Chris and I have examples. Here is a list of my posts that use reflection: Java Reflection. I am sorry for the bad news. If you are a customer, I strongly encourage you to log into Customer Connection and put in a request for a PeopleCode Java cast method. Hi Jim, Need your help to solve this one. i was gng thru ur blogs for Reflection, but I cant figure out what needs to be done here... &jClass = GetJavaClass("java.lang.Class"); Local JavaObject &tokenPS_ = CreateJavaObject("com.peoplesoft.pt.tokengenerator.internal.PeopleSoftTokenGenerator"); Local JavaObject &jReadArgTypes = CreateJavaObject("java.lang.Class[]", GetJavaClass("com.peoplesoft.pt.tokengenerator.internal.PeopleSoftTokenGenerator")); Local JavaObject &jReadMethod = &tokenPS_.getClass().getDeclaredMethod("generateToken", &jReadArgTypes); Local JavaObject &jReadArgs = CreateJavaObject("java.lang.Object[]", CreateJavaObject("com.peoplesoft.pt.tokengenerator.internal.PeopleSoftTokenGenerator", &targetSTR)); Local JavaObject &jBufImage = &jReadMethod.invoke(&tokenPS_, &jReadArgs); Thanks for your help Prashant @Prashant, your code looks good to me. What errors are you getting? Take a look at Chris Heller's post Java and PeopleCode Tips and Tricks - Part 3. Chris's example is the best I've seen on PeopleCode Java Reflection. Hi Jim, Thanks for your reply. I did have a look at that post, but I'm unable to figure why it still fails with that error. The error Text - Java Exception: java.lang.NoSuchMethodException: com.peoplesoft.pt.tokengenerator.internal.PeopleSoftTokenGenerator.generateToken(com.peoplesoft.pt.tokengenerator.internal.PeopleSoftTokenGenerator); during call of java.lang.getDeclaredMethod. Thanks for helping me out with this. Thanks! Prashant Jim, you saved the day for me again :). From your comments here regarding how to cast a Java Object to a different type in PeopleCode, I was able to successfully write code to hit a URL to retrieve employee photos and load them into the PS database. If you're interested in what I did, I posted it on stackoverflow, where I'd ask a Java question. I didn't get an answer so I answered it myself for the sake of documentation: Nice! Thanks for sharing!! No problem. You share so much with all of us, I feel obligated to share something every couple of years at least :).
https://jjmpsj.blogspot.com/2008/07/using-xquery-with-peoplesoft.html
CC-MAIN-2018-13
refinedweb
1,204
58.99
VMLVML VML was designed to provide a textual way to describe vector graphics that can be easily cut and pasted for use in a wide variety of authoring tools. It's also written to be integrated into existing HTML 4.0 markup, (which, of course, must be well formed), and to simplify the process of editing text-based vector graphics. Like PGML, VML was written primarily to be integrated into editors and for use as an export format. Like PGML, VML's markup is frighteningly verbose, but remember that most likely the code will be generated by an application, not written by hand. VML has "built-in" provisions that can be used to describe objects that may be further edited. It also contains a few MS Office-centric features, such as the adjustable handles used to manipulate graphics in Microsoft Word. VML uses v: to define its own namespace for VML tags. This should not be confused with v-space in CSS. The v: is actually an extension from a CSS2-compliant rendering engine. The namespace prefix never appears within the CSS information. The <shape> element is a VML tag that defines a path for drawing the object. The stroke attribute determines whether the outline of the object is visible and the strokecolor attribute makes the outline red. The fill and fillcolor attributes determine whether an object is filled and with what color. A <shape> within a group can use left/top or center-x/center-y as appropriate. The rotation, z-index and flip properties may also be given when required. style='left: 100; top: 100; width: 1000; height: 1000' style='center-x: 550; center-y: 550; width: 1000; height: 1000; rotation: 55deg' VML uses XML templates to summarize the full set of attributes that may appear on each element. The shape elements -- <shape>, <group> and most of the predefined shapes -- have CSS2 positioning information that locates the shape within its container. This is not reflected in the templates as there are several different ways of specifying the same information. Here's an example of an XML template: <shape type=null adj=null path=null opacity="100%" chromakey="none" stroke="true" strokecolor="black" strokeweight="0.75pt" fill="true" fillcolor="white" print="true" id=null class=null style='visibility: visible' title=null href=null target=null alt=null coordsize="1000, 1000" coordorigin="0, 0" wrapcoords=null /> The <rect> element is used to draw a simple rectangle. The rectangle is defined by the content width specified in the CSS2 properties. <!element rect (%shape.elements;)*> <!attlist rect %coreattrs; %shapeattrs;> The following code would generate a five-point star that has a red border and is filled in green, shown in the box below. "/> </v:shape> Attributes associated with the <group> element are used to specify information about positioning and the containing block only; not about transparency. <Shape> and <shapetype> are defined as children of the <group> element. Both opacity and chromakey attributes can be specified within the <shape> and <shapetype> elements. Attributes which are specified at the <shape> level in the hierachy override those at the <shapetype> level. All standard HTML/XML/CSS parsing can handle VML down to the level of attribute values. Each attribute value falls into a limited set of possible "basic types," each of which is parsed consistently. Attribute values themselves can be parsed using standard parsing techniques (even the very concise path representation). Each v:shape element, together with its associated v:shapetype, can be validated without reference to other shapes. All CSS2 positioning information is expressed in terms of this local coordinate space. Consequently CSS2 position attributes (left, top, width, height and so on) have no unit specifier -- they are simple numbers, not CSS length quantities. The <shape> and <group> elements are containing blocks for their content -- they define a CSS2 "block level box". Inside the containing block a local coordinate system is defined for any sub-elements using the coordsize and coordorigin attributes. The coordsize attribute defines how many units there are along the width of the containing block. The coordorigin attribute defines the coordinate at the top left corner of the containing block. For example, if a group were defined as follows, the containing block would be 300 pixels wide by 250 pixels high (assuming that the parent element of this group was not another group): <v:group The coordinate system inside the containing block would range from 500.0 to 500.0 along the x-axis and 500.0 to 500.0 along the y-axis with 0.0, 0.0 right in the center of the rectangle. Any shapes inside the group will be positioned and sized according to this local coordinate system. No matter how the width and height of the group is changed, the local coordinate system inside will remain the same. The rationale behind this is that the vectors defining a shape can be specified in a local coordinate system. If the containing block for the shape is changed, the outline of the shape will be automatically scaled to the new box. Similarly, shapes within the local ordinate system of a group will be automatically scaled if the containing block of the group changes. It is important to note that the containing block does not establish a clipping region. Sub-elements and paths may be drawn outside the boundaries of the containing block. The containing block merely serves to map the local coordinate space to the page space. Although the VML specification does not provide a complete DTD, it does include DTD snippets throughout the document. It would be more efficient to design your custom "snippets" required for your project's XML templates, and then merge them together to create a complete DTD or schema, if validation is desired. Other VML features include: While the core engine is based on the Microsoft Office graphic model, the co-submitters suggested improvements that were incorporated into the VML spec, such as the refinement of the parameterized paths and the compactness of the path description. Yet, the biggest advantage VML has going for it is the backing of Microsoft and the likelihood that it will be supported in IE5. XML.com Copyright © 1998-2006 O'Reilly Media, Inc.
http://www.xml.com/lpt/a/21
crawl-001
refinedweb
1,036
54.12
Subject: Re: [boost] [move][unique_ptr] c++14 unique_ptr comes to town From: Ion Gaztañaga (igaztanaga_at_[hidden]) Date: 2014-09-02 17:54:57 El 02/09/2014 19:22, Peter Dimov escribió: >. Ok, I prototyped it and it worked, but found it too forced. You can always release(), cast and build a new unique_ptr if you are really sure what you are doing. > In general, if deleter<X> is convertible to deleter<Y> but does not > handle Y properly, it might cause problems. So I'm not sure that this > case is extraordinary in this sense. I agree. If you declare deleter<X> is convertible to deleter<Y>, you declare it can delete objects of type Y after conversion. >? Semantics might be a bit more clear for default_delete, as it calls delete. std::is_polymorphic might not be very accurate, maybe std::has_virtual_destructor. A user-defined deleter could be a no-op or an operation that can properly recycle (link it in a intrusive list, etc.) the object even if it has no virtual destructor, just because it doesn't call the destructor. I think the implementation is nearly finished (has_virtual_destructor check is missing, as the standard does not require it, but it could be added). I've split tests and put all the meta utilities used by unique_ptr in a different header. Let me know if you feel some additional work must be done to push it into the "::boost" namespace and/or move it into smart_ptr. One missing decision is whether Boost.Move should be used in tests and/or use std::move/forward in C++11 compilers. And in case both approaches are testes in C++11 compilers, how we avoid duplicating test code. Ion Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk
https://lists.boost.org/Archives/boost/2014/09/216677.php
CC-MAIN-2020-29
refinedweb
309
65.93
OpenID A long time ago I had some crazy idea I'd have time to work on a single sign on distributed identity system. Never happened. But I did register openid.net and openlogin.net around June 2001. They are near to expiration and have had a note offering them to anyone for a long time. As luck would have it, Brad Fitzpatrick, of LiveJournal fame, started up a similar interesting looking project. They were looking for a name and managed to email me about openid.net right before I was going to offer it to them. So I gave it to them for the new and improved OpenID project. There are lots of similar projects out there with lots of good ideas. None of them have taken hold on more than a few test sites if even that. Maybe the momentum behind LiveJournal will be enough that this system can grow and be actually used by various sites on the net. Hopefully their traditional OpenSource policies keep this stuff as open as possible. I'll just chalk up giving away the domain as my community service act for the day. Namespaces Speaking of distributed id services... it has become seriously difficult to pick user ids on popular sites. It's really just a namespace problem where the entire world has to pick a short, cute, memorable nick at one central spot. See AIM, gmail, Yahoo!, /., IRC, and of course weblogging sites like LiveJournal. Just about any short nick related to your name, initials, or id you use elsewhere is bound to be taken along with 20 variations thereof. Would be so much easier to use email ids everwhere. Then at least the namespace bottleneck is limited to the current domain name namespace issues. Sigh. I figured I'd register a LJ account just to try the OpenID ideas. Of course just about all the nicks I tried were taken. Oh well. So in the tradition of i18n and l10n names, I got d11n
http://www.advogato.org/person/dlehn/
CC-MAIN-2016-36
refinedweb
334
75.1
Any ideas on how to find the arduino com port at the very beginning of the program and have the OS tie the arduino to that port always so that it can never change? In the code below, "LaserWrite1" is a batch script that does the bitbanging of the AtTiny. Error Message: 'device reports readiness to read but returned no data ' SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?) : Code: Select all from time import sleep import time import subprocess import serial import os ser = serial.Serial('/dev/serial_friend',115200, timeout=.1) time.sleep(1.0) ser.write("ready") ..... ..... proc1 = subprocess.Popen('Laser_file1', shell = True) proc2 = subprocess.Popen('Laser_file2', shell = True) while True: sleep(0.5) data1 = ser.read() print("Waiting to Program...") if data1 == "1": program_func1()
https://www.raspberrypi.org/forums/viewtopic.php?t=241051
CC-MAIN-2019-43
refinedweb
136
58.18
<< Back.) As you have seen from the way this code is used, this class is used to read the system command's standard error (stderr) and standard output (stdout) streams in standard Java Thread objects. Let me share the code here, and then I'll discuss how it works. package com.devdaily.system; import java.io.*; /** * ThreadedStreamHandler.java * @version 0.1 * * This class is intended to be used with the SystemCommandExecutor * class to let users execute system commands from Java applications. * * This class is based on work that was shared in a JavaWorld article * named "When System.exec() won't". That article is available at this * url: * * * * Copyright 2010 alvin j. alexander, devdaily.com. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser this program. If not, see <>. * * Please ee the following page for the LGPL license: * * */ class ThreadedStreamHandler extends Thread { InputStream inputStream; String adminPassword; OutputStream outputStream; PrintWriter printWriter; StringBuilder outputBuffer = new StringBuilder(); private boolean sudoIsRequested = false; /** * A simple constructor for when the sudo command is not necessary. * This constructor will just run the command you provide, without * running sudo before the command, and without expecting a password. * * @param inputStream * @param streamType */ ThreadedStreamHandler(InputStream inputStream) { this.inputStream = inputStream; } /** * Use this constructor when you want to invoke the 'sudo' command. * The outputStream must not be null. If it is, you'll regret it. :) * * TODO this currently hangs if the admin password given for the sudo command is wrong. * * @param inputStream * @param streamType * @param outputStream * @param adminPassword */ ThreadedStreamHandler(InputStream inputStream, OutputStream outputStream, String adminPassword) { this.inputStream = inputStream; this.outputStream = outputStream; this.printWriter = new PrintWriter(outputStream); this.adminPassword = adminPassword; this.sudoIsRequested = true; } public void run() { // on mac os x 10.5.x, when i run a 'sudo' command, i need to write // the admin password out immediately; that's why this code is // here. if (sudoIsRequested) { //doSleep(500); printWriter.println(adminPassword); printWriter.flush(); } BufferedReader bufferedReader = null; try { bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); String line = null; while ((line = bufferedReader.readLine()) != null) { outputBuffer.append(line + "\n"); } } catch (IOException ioe) { // TODO handle this better; users won't want the code doing this ioe.printStackTrace(); } catch (Throwable t) { // TODO handle this better; users won't want the code doing this t.printStackTrace(); } finally { try { bufferedReader.close(); } catch (IOException e) { // ignore this one } } } private void doSleep(long millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { // ignore } } public StringBuilder getOutputBuffer() { return outputBuffer; } } As you can see, that's a lot of wrapper and error-handling code wrapped around some more basic code that looks like this: BufferedReader bufferedReader = null; bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); String line = null; while ((line = bufferedReader.readLine()) != null) { outputBuffer.append(line + "\n"); } Putting everything together, this code, running in a Java thread, lets your program read the stdout and stderr streams from the command you're running. As mentioned in that JavaWorld program, this is very important, because if you don't read these streams in Java Threads, your system call may block. This is eloquently stated in the Process class Javadoc this way: Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock. I've found this to be especially true when running a sudo command with this code on Mac OS X; if I don't immediately write my admin password to the process, the code will hang. This "java exec" article and class updates As I mentioned above, this code is a work in progress, and the API will continue to change for the foreseeable future. If you just want to run a simple Unix ls or ps command, or even a command pipeline, this code seems to work fine on my Mac OS X 10.5 systems. But if you want to run something like a sudo command, I still need to fix a few problems, and to that end, I've even removed a special constructor from the SystemCommandExecutor class that should be used when you want to run a sudo command. I hope to resolve the sudo "wrong password" problem shortly, but other than that, I'm not aware of any other bugs (just the TODO items shown). If you have any comments, opinions, or suggestions on how this API should evolve, feel free to make a comment below, or send me an email using our contact form. Download our Java exec classes You are welcome to download these classes and use them in your own programs. Here are direct links to the three classes discussed above: - ProcessBuilderExample - this is the "driver" class used to demonstrate the other classes - SystemCommandExecutor - ThreadedStreamHandler I hope this article and source code help you understand the process of executing system commands from a Java application. << Back to "Java exec with ProcessBuilder and Process, part 2" Re: Java exec - execute system processes with Java ProcessBuilde Excellent - really helpful on what I thought was a pretty obscure subject. Thanks. Thanks Thanks for all the hard work ... I did notice that the SystemCommandExecutor file for download was missing the getStandardOutputFromCommand and getStandardErrorFromCommand mrthods were missing . Thats easily fixed . However the inputStreamHandler.getOutputBuffer() and errorStreamHandler.getOutputBuffer() also appear to be missing . Where should we be getting these methods ... ? Error in source code Hi, Really good article, but I´ve tried to run the code provided, but I´ve got the following errors: The method executeCommand() is undefined for the type SystemCommandExecutor The method getStandardErrorFromCommand() is undefined for the type SystemCommandExecutor The method getStandardOutputFromCommand() is undefined for the type SystemCommandExecutor Can you help me Thanks in Advance Pedro Do you take a look at Apache Do you take a look at Apache commons exec project? Which exception to throw for a bad arg - This code looks really useful! I have a suggestion - in the SystemCommandExecutor() constructor, you have a question about which Exception to throw. I'd suggest IllegalArgumentException. Thanks for your work! Java exec The subject of the article is very interesting to me, but the example code I downloaded did not work: The class SystemCommandExecutor does not contain a methode named executeCommand, but in the class ProcessBuilderExample the method executeCommand is called. Could you supply a complete version of class SystemCommandExecutor? More methods are missing in class SystemCommandExecutor : getStandardOutputFromCommand() getStandardInputFromCommand() Kind regards, Ulrich. Downloaded file I downloaded 3 attached java files but the class SystemCommandExecutor doesn't have 2 methods getStandardOutputFromCommand and getStandardErrorFromCommand. How can I have them? Add two methods you posted in the part2? Apologies for wrong SystemCommandExecutor class My apologies to everyone for posting the wrong version of the SystemCommandExecutor class out here. I'm trying to fix this today. Apache exec project Yes, thank you, I did look at the Apache exec project. I noted that in the first page of this tutorial: Java exec with ProcessBuilder and Process, Part 1 As I mention there, if you just want a tool to solve this problem, by all means go ahead and use their code. (Sorry that I haven't linked these pages and comments together better. There is a way to do that with another Drupal module, but I haven't experimented with that module yet.) Corrected "Java exec" code Okay, again, sorry for the long delay here, but I believe I now have the corrected code out here. I'm currently working on another project, but I hope to get back to this project and make improvements to this code in May and June. In the meantime, if anyone has any suggestions, such as the IllegalArgumentException suggestion from Andy Cohen above, please let me know. Piping Hi Alvin, Thanks for the very useful article. There is one thing I haven't been able to figure out when playing with executing Unix commands: how do I get a command to use a stream that was produced by another command? I need two versions of this, I'll illustrate with an example. 1. grep 'e' file.txt | sort execute grep, direct the stream into sort (and no, I am not looking for a way to execute the intere pipe in one process. One command at a time.) and then print the outcome of sort. 2. grep 'e' file.txt | sed '1d' | sort execute grep, catch the stream, on the fly removing the first line, direct the stream to sort and then print the outcome of sort. Hope I make any sense at all... Have you any idea how to address this? Nik Java exec and Unix pipes If I understand your question right, this is a fun problem that I ran into in my original "Java system command" tutorial. The short answer is that you need to run your Unix pipe command in a Unix shell, so ... if you change a line of code that looks like this: to something like this: that second version will work, because it runs inside the Bourne shell.. I haven't adapted that example for this tutorial (I'm on the way out the door atm), but I hope that helps. Java exec and Unix pipes Hi Alvin, Sorry for the massive delay... :$ and thank you for your reply/time/solution. I have asked a lot of people, and they all come up with the solution you showed above. For now, this is how I use it. I do manipulations on files. The user inputs a full path with filename that will be manipulated. I first get the working directory, which is the folder the file lives in: Then I put together the command I'd like to execute, for example: I choose to capture the output directly from the shell command using redirection because I have no further manipulations to do, just return the location and name of the output file ("return /path/to/sorted.txt";). This command gets executed like this: This works like a charm. However. What I was looking for is somewhat different: execute 'grep -e file.txt', catch the stream. As soon as Java gets hold of the first line of output of the grep command, manipulate it and send it to the next shell command. This way, a stream of lines coming from 'grep' will pass through some Java manipulation and then it will be passed to for example 'sort'. So in my above example I had this command: grep 'e' file.txt | sed '1d' | sortI'd like to replace the 'sed' command with something Java. Since I am having a lot of trouble making people understand this concept, it wouldn't surprise me if it weren't possible. For now, I don't have the time to change my program, your solutions works fine for now. But perhaps it challenges you to find a solution, in that case, I'd love to hear it. Otherwise, don't bother ;-) Anyways, your blog really did help me to understand how to execute a command from Java so many thanks! Nik how about stopping a Process...?? Hi. If you are working in this proyect yet, how about stopping or killing the process if it hangs on ? suppose you try a process that takes more than 1 minute, could I kill it if event exceed a time limit (using a thread to control or something like)?? Java exec and Unix pipes Hi Alvin, Thank you for this very useful solution. I spent much time yesterday evening forcing Runtime.exec() to execute some piped commands until I found your article. I have a little concern. Every execution of command's pipe like this on Linux, JVM 1.6: ps -ef | grep 5645 | grep -v 'grep' throws: java.io.InterruptedIOException at java.io.PipedInputStream.read(PipedInputStream.java:324) at java.lang.ProcessPipedInputStream.read(UNIXProcess.java:403) at java.io.PipedInputStream.read(PipedInputStream.java:373) at java.lang.ProcessInputStream.read(UNIXProcess.java:484) at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:452) at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:494) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:222) at java.io.InputStreamReader.read(InputStreamReader.java:177) at java.io.BufferedReader.fill(BufferedReader.java:148) at java.io.BufferedReader.readLine(BufferedReader.java:311) at java.io.BufferedReader.readLine(BufferedReader.java:374) at com.kbl.unixsystems.nagiosmonitoring.agent.util.ThreadedStreamHandler.run(ThreadedStreamHandler.java:98) The numeric result of the command was: 0 Stdout is undeterministic, sometimes it gets content sometimes not. I have solved a problem to modify command to ps -e | grep 4554 | grep -v 'grep', where output is smaller. However now I have an exception sometimes but mostly the stdout arrives to Java. Do you have idea how to solve this problem? Thanks in advance. Regards Problems when executing a shell command/process in background... Hi, I'm trying to execute tcpdump with various parameters (options, filter) from a Java program. More precisely, the command I write in a shell terminal looks like: sudo tcpdump -i ath0 -p -n -w /path/to/file%S.out -G 10 -z /path/to/script.sh [filter_elements] & I need this command to run in background (&). In a shell , this command allows to periodically (10 seconds) generate a dump file named "file[seconds].out" that is given as the first argument to the script "script.sh", itself executed each time a rotation/period ends. And this works! But when I try to execute it from my Java code, I face the following issues: String cmd = "sudo tcpdump -i ath0 -p -n -w /path/to/file%S.out -G 10 -z /path/to/script.sh [filter_elements] &" 1) Process p = Runtime.getRuntime().exec(cmd); => returns "tcpdump: syntax error" on stdErr. I think this can be explained because '&' is considered as a tcpdump argument when shell in not invoked... Your opinion? 2) String[] shellCmd = {"/bin/sh", "-c", cmd}; Process p = Runtime.getRuntime().exec(shellCmd); => the process is running in background... Well, but the call to my script (given with the -z option) does not work. Does anyone have an idea of what happens? It works when ran it in a shell... 3) I also tried this: String cmd = "sudo tcpdump -i ath0 -p -n -w /path/to/file%S.out -G 10 -z /path/to/script.sh [filter_elements]" (without the '&' at the end) String[] shellCmd = {"/bin/sh", "-c", cmd, "&"}; Process p = Runtime.getRuntime().exec(shellCmd); => the process is not ran in background... so that it blocks the rest of my program as my "executeCommand(String command)" function ends with "return (p.waitFor() == 0)". Is there a case where "&" as an element of the String array is meaningfull? Thanks a lot for your answers. It would really help me to go further on interesting things! Ju waitfor() versus sleep with Process/ProcessBuilder Great article. I am curerntly working with the ProcessBuilder to run a batch process for file conversion (50K records per batch) on a Windows XP machine. Each batch process: copies a subset of files (image data files; ordered & renamed) converts copied files creating new output (using a PDF conversion utility) deletes the copied files (repeating until the end of the batch) When unit testing my code and noticed when I failed to used the waitfor() function, the batch process ending up trying to delete my copied files before the conversion process completed. This confirms the "external" conversion process must be waited on before the delete can be carried out. The JVM just "submits" the process to the OS "shell" and continues. If subsequent processing is dependent on the submitted process you are at the mercy of the OS. I coded a waitfor() since it is a simple command line conversion utility (and it creates logs and error files during the conversion process). Too much can happen in the OS enviroment that from the JVM you have no control. If the conversion process were to take a "long time", and I did not have any logs or error files to monitor the conversion process, I would opt to create another thread to manage/monitor the waitfor() (using sleep most likely or another timer). This way I could gracefully manage the submitted process. If it took "too long", I can end gracefully. Cheers - Ken Jave exec & sudo commands Hi Alvin, First up, thanks for the great article, it has helped me a lot so far. However, I am trying to build an application for my mac, and I would like to run some sudo commands from within my java code. I know you say that the code will hang if the password is wrong, but if it is possible I would like to know how to make the code execute a sudo command.. I tried adding a constructor that sets the adminPassword, but I didn't have any results.. I got no errors when running a sudo command, but the command was never executed. Any help is appreciated Thanks Chris Java exec with sudo code Okay, if everyone promises not to ask for support :) I've put the version of this code that lets you call sudo at this URL. Again, please look at the caveats in this article before trying to use that code. Also, there are differences between these classes and the classes shared in this article, so please be careful to keep them separate, or keep a copy of each, as they aren't subsequent versions, but more like parallel versions of the same source. The reason for my delay in answering many questions here is that this code needs a rewrite (the API essentially needs to be improved), but I don't have the time to focus on it right now. As mentioned, it will run sudo if you supply it the right password, but give it a bad password and it will hang, and I'm sure there are other bugs as well. Er ... other than those warnings, good luck! :) Add new comment
https://alvinalexander.com/java/java-exec-processbuilder-process-3
CC-MAIN-2018-47
refinedweb
2,988
64.1
_srealloc() Allocate, reallocate or free a block of memory Synopsis: #include <malloc.h> void *_srealloc( void* ptr, size_t old_size, size_t new_size ); Since: BlackBerry 10.0.0 Arguments: - ptr - NULL, or a pointer to the block of memory that you want to reallocate. - old_size - The current size of the block, in bytes. - new_size - The size of the block to allocate, in bytes. Library: libc Use the -l c option to qcc to link against this library. This library is usually included automatically. This function is in libc.a, but not in libc.so (in order to save space). Description:: - Shrinking the allocated size of the allocated memory block ptr when new_size is sufficiently smaller than old_size. Or: - Extending the allocated size of the allocated memory block ptr if there is a large enough block of unallocated memory immediately following ptr. Or: - Allocating a new block, and copying the contents of ptr to the new block. Because it's possible that a new block will be allocated, don't maintain any pointers into the old memory after a successful call to this function. These pointers will point to freed memory, with possible disastrous results when a new block is allocated.(). Returns: A pointer to the start of the reallocated memory, or NULL if there's insufficient memory available, or if the value of the new_size argument is zero. Classification: Last modified: 2014-06-24 Got questions about leaving a comment? Get answers from our Disqus FAQ.comments powered by Disqus
http://developer.blackberry.com/native/reference/core/com.qnx.doc.neutrino.lib_ref/topic/s/_srealloc.html
CC-MAIN-2015-32
refinedweb
248
50.33
32152/how-to-attach-a-internet-gateway-with-vpc-using-python-boto3 Here is the code to attach a internet gateway to your vpc. Here I am creating a new VPC and internet gateway and attaching it to the created VPC. import boto3 ec2 = boto3.resource('ec2') vpc = ec2.create_vpc(CidrBlock='10.0.0.0/16') vpc.create_tags(Tags=[{"Key":"TestVPC","Value":"default_vpc"}]) vpc.wait_until_available() print(vpc.id) ig = ec2.create_internet_gateway() vpc.attach_internet_gateway(InternetGatewayId = ig.id) print(ig.id) Hope this helps. To attach an Internet Gateway to a ...READ MORE You can use method of creating object ...READ MORE Here is the simple way of implementing ...READ MORE You can refer to this question here: You ...READ MORE The error clearly says the error you ...READ MORE Here is a simple implementation. You need ...READ MORE This is the code to delete the ...READ MORE You can view this answer here : Before ...READ MORE You can delete the folder by using ...READ MORE There is a particular format that works ...READ MORE OR Already have an account? Sign in.
https://www.edureka.co/community/32152/how-to-attach-a-internet-gateway-with-vpc-using-python-boto3
CC-MAIN-2020-05
refinedweb
180
62.85
TL;DR;In this blog post, we are going to learn how we can use Nancy framework with ASP.NET Core Application. NancyFx Introduction:NancyFx is a lightweight, low-ceremony framework for building HTTP based services on .NET and Mono. It is inspired by Sintara Framework for Ruby and hence Nancy was named after the daughter of Frank Sintara. Nancy Framework is a great alternative to ASP.NET APIs. It follows “Super duper happy path” phrase. It has following goals. - It just works – You should just use it without learning so much thing from it. Create a Nancy module and that’s it. - Easily Customizable – There are tons of customization available and then you can easily customize it. - Low-ceremony- With the minimal code you will able to run NancyFx. - No Configuration Required – There is no configuration required and very easy to setup. - Host-agnostic and Runs anywhere- It will run on any server, self-hosted etc. - Low Friction- When you build software with NancyFx APIs it will help you where you want to go rather than coming in your way. How we can use NancyFx in ASP.NET Core:So let’s see how we can use NancyFx in ASP.NET Core, Let’s create ASP.NET Core API Application via File –> New project in visual studio. Once you are done with creating an ASP.NET Core API application delete the controller folder and add following nuget packages. - Microsoft.AspNetCore.Owin: “1.0.0” - Nancy: “2.0.0-barneyrubble” Now once we are done with adding packages, We need to make sure our application uses NancyFx and handles requests instead of ASP.NET MVC. So remove “app.UseMVC” in the startup.cs file and add following code in configure method. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); app.UseOwin(n => n.UseNancy()); }Now we need to create a new Nancy module that will handle request. For this blog post, we are going to create a Home Nancy module like following. using Nancy; namespace NancyCoreAPI.Module { public class HomeModule : NancyModule { public HomeModule() { Get("/", args => "Hello world from nancy module."); } } }Here in the above code, You can see that it is a standard Nancy module where you just need to write methods in the constructor and it will return text or HTML based on requirement. In our case here it will return “Hello World from nancy module” text. Once you run application browser it will look like following. That’s it. You can see that Even with ASP.NET Core it is very easy to use and almost no configuration required at all. You can find complete source code of this blog post at following location on GitHub- Your feedback is very important to me. Please provide your feedback via putting comments.
https://www.dotnetjalps.com/2017/01/nacyfx-with-aspnet-core.html
CC-MAIN-2017-51
refinedweb
470
60.01
More Stupid Z3Py Tricks: Simple Proofs Z3 can be used for proofs. The input language isn’t anywhere near as powerful as interactive theorem provers like Coq, Isabelle, or Agda, but you can ask Z3 to prove pretty interesting things. Although the theorems that follow aren’t hard in interactive theorem provers, they would take beyond complete novice level skills to state or prove. I like to think of the z3 proving process as “failing to find a counterexample”. Z3py has supplies a function prove which is implemented like this. # def prove(claim, **keywords): """Try to prove the given claim. This is a simple function for creating demonstrations. It tries to prove `claim` by showing the negation is unsatisfiable. >>> p, q = Bools('p q') >>> prove(Not(And(p, q)) == Or(Not(p), Not(q))) proved """ if z3_debug(): _z3_assert(is_bool(claim), "Z3 Boolean expression expected") s = Solver() s.set(**keywords) s.add(Not(claim)) if keywords.get('show', False): print(s) r = s.check() if r == unsat: print("proved") elif r == unknown: print("failed to prove") print(s.model()) else: print("counterexample") print(s.model()) Basically, it negates the thing you want to prove. It then tries to find a way to instantiate the variables in the expression to make the statement false. If it comes back unsat, then there is no variable assignment that does it. Another way to think about this is rewriting the $ \forall y. p(y) $ as $ \neg \exists y \neg p (y)$. The first $ \neg$ lives at sort of a meta level, where we consider unsat as a success, but the inner $ \neg$ is the one appearing in s.add(Not(claim)). We can prove some simple facts. This is still quite cool, let’s not get too jaded. Manually proving these things in Coq does suck (although is easy if you use the ring, psatz, and lra tactics, which you DEFINITELY should. It is a great irony of learning coq that you cut your teeth on theorems that you shouldn’t do by hand). from z3 import * p = Bool("p") q = Bool("q") prove(Implies(And(p,q), p)) # simple destruction of the And prove( And(p,q) == Not(Or(Not(p),Not(q)))) #De Morgan's Law x = Real("x") y = Real("y") z = Real("z") prove(x + y == y + x) #Commutativity prove(((x + y) + z) == ((x + (y + z)))) #associativity prove(x + 0 == x) # 0 additive identity prove(1 * x == x) prove(Or(x > 0, x < 0, x == 0)) #trichotomy prove(x**2 >= 0) #positivity of a square prove(x * (y + z) == x * y + x * z) #distributive law Ok, here’s our first sort of interesting example. Some properties of even and odd numbers. Even and Odd are natural predicates. What are possible choices to represent predictaes in z3? We can either choose python functions IntSort -> BoolSort() as predicates or we can make internal z3 functions Function(IntSort(), BoolSort()) x = Int("x") y = Int("y") def Even(x): q = FreshInt() return Exists([q], x == 2*q) def Odd(x): return Not(Even(x)) prove(Implies( And(Even(x), Odd(y)) , Odd(x + y))) prove(Implies( And(Even(x), Even(y)) , Even(x + y))) All well and good, but try to prove facts about the multiplicative properties of even and odd. Doesn’t go through. :( Here’s a simple inductive proof. Z3 can do induction, but you sort of have to do it manually, or with a combinator. Given a predicate f, inductionNat returns def inductionNat(f): # proves a predicate f forall nats by building s simple inductive version of f. n = FreshInt() return And(f(IntVal(0)), ForAll([n], Implies(And(n > 0, f(n)), f(n+1)))) ''' # doesn't solve sumn = Function('sumn', IntSort(), IntSort()) n = FreshInt() s = Solver() s.add(ForAll([n], sumn(n) == If(n == 0, 0, n + sumn(n-1)))) claim = ForAll([n], Implies( n >= 0, sumn(n) == n * (n+1) / 2)) s.add(Not(claim)) s.check() ''' # solves immediately sumn = Function('sumn', IntSort(), IntSort()) n = FreshInt() s = Solver() s.add(ForAll([n], sumn(n) == If(n == 0, 0, n + sumn(n-1)))) claim = inductionNat(lambda n : sumn(n) == n * (n+1) / 2) s.add(Not(claim)) s.check() #comes back unsat = proven Here’s another cute and stupid trick. Z3 doesn’t have a built in sine or cosine. Perhaps you would want to look into dreal if you think you might be heavily looking into such things. However, sine and cosine are actually defined implicitly via a couple of their formula. So we can instantiate A slightly counterintuitive thing is that we can’t use this to directly compute sine and cosine values. That would require returning a model, which would include a model of sine and cosine, which z3 cannot express. However, we can try to assert false facts about sine and cosine and z3 can prove they are in fact unsatisfiable. In this way we can narrow down values by bisection guessing. This is very silly. sin = Function("sin", RealSort(), RealSort()) cos = Function("cos", RealSort(), RealSort()) x = Real('x') trig = [sin(0) == 0, cos(0) == 1, sin(180) == 0, cos(180) == -1, # Using degrees is easier than radians. We have no pi. ForAll([x], sin(2*x) == 2*sin(x)*cos(x)), ForAll([x], sin(x)*sin(x) + cos(x) * cos(x) == 1), ForAll([x], cos(2*x) == cos(x)*cos(x) - sin(x) * sin(x))] s = Solver() s.set(auto_config=False, mbqi=False) s.add(trig) s.add( RealVal(1 / np.sqrt(2) + 0.0000000000000001) <= cos(45)) s.check() A trick that I like to use sometimes is embedding objects in numpy arrays. Numpy slicing is the best thing since sliced bread. A lot, but not all, of numpy operations come for free, like matrix multiply, dot, sum, indexing, slicing, reshaping. Only some are implemented in terms of overloadable operations. here we can prove the Cauchy Schwartz inequality for a particular vector and some axioms of vector spaces. import numpy as np import operator as op def NPArray(n, prefix=None, dtype=RealSort()): return np.array( [FreshConst(dtype, prefix=prefix) for i in range(n)] ) v = NPArray(3) w = NPArray(3) l = Real("l") prove( np.dot(v,w * l) == l * np.dot(v,w) ) # linearity of dot product prove(np.dot(v, w)**2 <= np.dot(v,v) * np.dot(w,w)) # cauchy schwartz def vec_eq(x,y): # a vectorized z3 equality return And(np.vectorize(op.eq)(x,y).tolist()) prove( vec_eq((v + w) * l, v * l + w * l)) # distributivity of scalar multiplication z = NPArray(9).reshape(3,3) # some matrix prove( vec_eq( z @ (v + w) , z @ v + z @ w )) # linearity of matrix multiply prove( vec_eq( z @ (v * l) , (z @ v) * l)) # linearity of matrix multiply Defining and proving simple properties of Min and Max functions from functools import reduce def Max1(x,y): return If(x <= y, y, x) def Min1(x,y): return If(x <= y, x, y) def Abs(x): return If(x <= 0, -x, x) def Min(*args): return reduce(Min1, args) def Max(*args): return reduce(Max1, args) z = Real('z') prove(z <= Max(x,y,z)) prove(x <= Max(x,y)) prove(Min(x,y) <= x) prove(Min(x,y) <= y) Proving the Babylonian method for calculating square roots is getting close to the right answer. I like the to think of the Babylonian method very roughly this way: If your current guess is low for the square root x/guess is high. If your guess is high, x/guess is low. So if you take the average of the two, it seems plausible you’re closer to the real answer. We can also see that if you are precisely at the square root, (x/res + x)/2 stays the same. Part of the the trick here is that z3 can understand square roots directly as a specification. Also note because of python overloading, babylonian with work on regular numbers and symbolic z3 numbers. We can also prove that babylon_iter is a contractive, which is interesting in it’s own right. def babylonian(x): res = 1 for i in range(7): res = (x / res + res) / 2 return res x, y = Reals("x y") prove(Implies(And(y**2 == x, y >= 0, 0 <= x, x <= 10), babylonian(x) - y <= 0.01)) A funny thing we can do is define interval arithmetic using z3 variables. Interval arithmetic is very cool. Checkout Moore’s book, it’s good. This might be a nice way of proving facts related to real analysis. Not sure. This is funny because z3 internally uses interval arithmetic. So what we’re doing is either very idiotically circular or pleasantly self-similar. We could use a similar arrangement to get complex numbers, which z3 does not natively support class Interval(): def __init__(self,l,r): self.l = l self.r = r def __add__(self,rhs): if type(rhs) == Interval: return Interval(self.l + rhs.l, self.r + rhs.r) def __sub__(self, rhs): return Interval(self.l) def __mul__(self,rhs): combos = [self.l * rhs.l, self.l * rhs.r, self.r * rhs.l, self.r*rhs.r] return Interval( Min(*combos), Max(*combos)) def fresh(): l = FreshReal() r = FreshReal() return Interval(l,r) def valid(self): # It is problematic that I have to rememeber to use this. A way around it? return self.l <= self.r def __le__(self,rhs): # Or( self.r < self.l ) (ie is bottom) return And(rhs.l <= self.l, self.r <= rhs.r ) def __lt__(self,rhs): return And(rhs.l < self.l, self.r < rhs.r ) def forall( eq ): i = Interval.fresh() return ForAll([i.l,i.r] , Implies(i.valid(), eq(i) )) def elem(self,item): return And(self.l <= item, item <= self.r) def join(self,rhs): return Interval(Min(self.l, rhs.l), Max(self.r, rhs.r)) def meet(self,rhs): return Interval(Max(self.l, rhs.l), Min(self.r, rhs.r)) def width(self): return self.r - self.l def mid(self): return (self.r + self.l)/2 def bisect(self): return Interval(self.l, self.mid()), Interval(self.mid(), self.r) def point(x): return Interval(x,x) def recip(self): #assume 0 is not in return Interval(1/self.r, 1/self.l) def __truediv__(self,rhs): return self * rhs.recip() def __repr__(self): return f"[{self.l} , {self.r}]" def pos(self): return And(self.l > 0, self.r > 0) def neg(self): return And(self.l < 0, self.r < 0) def non_zero(self): return Or(self.pos(), self.neg()) x, y = Reals("x y") i1 = Interval.fresh() i2 = Interval.fresh() i3 = Interval.fresh() i4 = Interval.fresh() prove(Implies(And(i1.elem(x), i2.elem(y)), (i1 + i2).elem(x + y))) prove(Implies(And(i1.elem(x), i2.elem(y)), (i1 * i2).elem(x * y))) prove(Implies( And(i1 <= i2, i2 <= i3), i1 <= i3 )) # transitivity of inclusion prove( Implies( And(i1.valid(), i2.valid(), i3.valid()), i1 * (i2 + i3) <= i1 * i2 + i1 * i3)) #subdistributivty # isotonic prove(Implies( And( i1 <= i2, i3 <= i4 ), (i1 + i3) <= i2 + i4 )) prove(Implies( And(i1.valid(), i2.valid(), i3.valid(), i4.valid(), i1 <= i2, i3 <= i4 ), (i1 * i3) <= i2 * i4 ))
https://www.philipzucker.com/more-stupid-z3py-tricks-simple-proofs/
CC-MAIN-2021-39
refinedweb
1,865
67.15
So I'm a complete noob at programming. Help please!! // The "Ok" class. import java.awt.*; import hsa.Console; public class Ok { static Console c; // The output console public static void main (String[] args) { c = new Console (); String num; c.println ("Enter a three digit number whose first digit is greater than its last:"); num = c.readLine(); // Place your program here. 'c' is the output console } // main method } // Ok class We use the Ready To Program Java to program the shit. Its completely elementary programming and I'm a noob. We use the HSA template if anyone knows what that means >.<
http://www.javaprogrammingforums.com/java-ides/18069-ready-program-helpp.html
CC-MAIN-2014-52
refinedweb
101
76.32
On 20.2.2012 00:21, Arnaud Lacombe wrote:> On Sun, Feb 19, 2012 at 1:12 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:>> On 02/19/2012 09:01 AM, Geert Uytterhoeven wrote:>>>>>> On Fri, Feb 17, 2012 at 21:30, Andrew Morton<akpm@linux-foundation.org>>>> wrote:>>>> It would be better to teach IS_ENABLED() to handle this situation. I>>>> don't think there's a way of doing this with cpp :(>>>>>>>> This limitation makes IS_ENABLED pretty dangerous, doesn't it? It>>>> makes it very easy to introduce build breakage with unexpected Kconfig>>>> combinations.>>>>>>>>> Indeed. Recently I discovered IS_ENABLED() and started recommending it>>> to people for new code. But now I've seen the CONFIG_NUMA breakage,>>> I no longer think this is a good recommendation.>>>> adding Michal & linux-kbuild to cc: list.>>> I do not really see any way to fix this, beside having a unique> architecture-wide configuration namespace :/Having a single namespace, or less ambitiously, having lessarch-specific config symbol definitions, would be a plus. IS_ENABLEDrequiring the symbol to be defined is not bad per se, it prevents typos.Michal
https://lkml.org/lkml/2012/2/20/173
CC-MAIN-2015-22
refinedweb
183
55.13
protective gloves latex hand gloves US $0.155-0.165 / Pieces 20000 Pieces (Min. Order) Top Sponsored Listing Home Cleaning Kitchen Long Rubber Hand Gloves US $0.77-0.88 / Piece 500 Pieces (Min. Order) Wholesale white cotton working gloves Knitted Protective Hand Safety Gloves US $0.08-0.3 / Pair 600 Pairs (Min. Order) Black Copper Hands Compression half finger Gloves US $1-4.5 / Pair 500 Pairs (Min. Order) Wholesale Antistatic Cleanroom ESD Safety Hand Work Gloves US $0.2-1.5 / Piece 1000 Pieces (Min. Order) China Supplier Working Cotton Gloves Protective White Hand Gloves US $0.18-0.35 / Piece 1000 Pieces (Min. Order) GBLG003 Fingerless LED Gloves Fishing Magic Strap LED Flashlight Camping Hiking Light Left/ Right Hand Luminous Gloves US $0.5-3 / Piece 100 Pieces (Min. Order) Cheap price wear-resistant working cotton gloves white cotton hand knitted gloves US $0.05-0.3 / Pair 100 Pairs (Min. Order) Cheap High Quality Polycotton gloves, Cotton hand gloves US $0.98-9.98 / Piece 1000 Pieces (Min. Order) Custom Cheap Price Industrial Cotton Knitted Work Hand Gloves US $0.15-0.2 / Pairs 144 Pairs (Min. Order) SRSafety PVC dotted cotton gloves,bleached white PVC dotted hand gloves manufacturers in china US $0.14-0.2 / Pair 500 Pairs (Min. Order) 2018 SUNCLOSE industrial hand gloves, industrial cotton rubber gloves US $0.2-0.5 / Piece 1000 Pieces (Min. Order) High quality durable microfiber hand gloves, jewellery cleaning available US $0.01-0.5 / Piece 3000 Pairs (Min. Order) 10 Gauge Bleach Industrial Cotton Labor Glove/Knitted Hand Gloves US $0.06-0.12 / Pair 10000 Pairs (Min. Order) The high quality Compression Arthritis Gloves for Arthritis, Arthritis Gloves Copper Hands US $3-4.5 / Pair 1 Pair (Min. Order) 12KV electrical insulating latex rubber safety hand gloves US $3.8-7.5 / Pair 100 Pairs (Min. Order) Cheap Cotton Knitted Seamless hand Gloves US $0.11-0.2 / Pair 10 Pieces (Min. Order) In Stock Wholesale AT-1 Safety Breakaway Plastic Handi Holder Glove Clip For Construction Hand Gloves US $0.55-0.56 / Piece 500 Pieces (Min. Order) HZS-210338 low price nature best children white hand gloves US $0.6-2 / Pair 1000 Pairs (Min. Order) Hot Sale working glove manufaturer cotton hand gloves US $0.052-0.15 / Piece 3000 Pieces (Min. Order) Working safety knitted cotton hand gloves manufacturers US $0.6-0.81 / Piece 1000 Pieces (Min. Order) PVC Dots Coated cotton knitted hand gloves Safety work Gloves US $0.08-0.09 / Pair 24000 Pairs (Min. Order) Import china wholesale working cotton knitted hand gloves US $0.14-0.55 / Piece 500 Pieces (Min. Order) hand gloves company in china, cheap garden gloves, safety gloves for cutting US $0.07-0.3 / Pair 3000 Pairs (Min. Order) USB Warmer Mitten Glove & USB LAPTOP HEATING HAND GLOVES US $1.9-4.2 / Piece 1000 Pieces (Min. Order) electronic equipment grill for hot protection cooking hand gloves baking rubber hot designs US $1.16-1.27 / Pieces 50 Pieces (Min. Order) GuardRite Brand Well-Knitted Industrial Cotton Gloves, Cotton Hand Gloves Price C-3010 US $0.069-0.21 / Pair 500 Dozens (Min. Order) food grade vinyl gloves hand gloves for cooking manufacturer US $12.3-13.0 / Cartons 100 Cartons (Min. Order) Brand MHR 600g/doz white cotton hand gloves poly cotton knitted gloves work glovescamo knitted gloves US $0.07-0.12 / Pair 60000 Pairs (Min. Order) hospital clinical disposable food handling gloves with good quality/100% compostable biodegradable surgical plastic hands gloves US $0.002-0.007 / Piece 100000 Pieces (Min. Order) 2018 yiwu wholesale low price white cotton hand gloves working hands brand work gloves US $0.1-0.2 / Pair 10000 Pairs (Min. Order) pvc dotted working gloves labor protection gloves hand gloves manufacturer US $0.1-0.1 / Pieces 10000 Pieces (Min. Order) Manufacturer supply cotton knitted cotton work hand gloves US $0.07-0.2 / Piece 24000 Pieces (Min. Order) import china wholesale working cotton knitted hand gloves US $0.07-0.2 / Pair 20000 Pairs (Min. Order) Industrial White Cotton Inspection Gloves Cotton Work Hand Gloves Price US $0.1-0.3 / Pair 1000 Pairs (Min. Order) - About product and suppliers: Alibaba.com offers 97,408 hand gloves products. About 36% of these are safety gloves, 4% are leather gloves & mittens, and 1% are dressings and care for materials. A wide variety of hand gloves options are available to you, such as free samples, paid samples. There are 97,408 hand gloves suppliers, mainly located in Asia. The top supplying country is China (Mainland), which supply 100% of hand gloves respectively. Hand gloves products are most popular in North America, Western Europe, and South America. You can ensure product safety by selecting from certified suppliers, including 10,854 with ISO9001, 8,292 with Other, and 2,018 with ISO14001 certification. Buying Request Hub Haven't found the right supplier yet ? Let matching verified suppliers find you. Get Quotation NowFREE Do you want to show hand gloves or other products of your own company? Display your Products FREE now! Related Category Supplier Features Supplier Types Recommendation for you related suppliers related Guide
https://www.alibaba.com/countrysearch/CN/hand-gloves.html
CC-MAIN-2018-17
refinedweb
870
70.7
Let’s say you have a File[] array gotten using File.listFiles() (or any other means). Now you want to sort that array based on the last modified date of the files. You could whip up the following code: File directory = new File("/SomeDirectory"); File[] filesList = directory.listFiles(); Arrays.sort(filesList, new Comparator<File>() { public int compare(File file1, File file2) { return Long.valueOf(file1.lastModified()).compareTo(file2.lastModified()); } }); Note: this will sort them with the latest modified files first. So this is all well and good, but let’s say your directory has 5 million files in it. Turns out the code above will be extremely slow in sorting the array on such a large list of files (also depending on the speed of your disk drive). The reason for that is because File.lastModified() is called on each file, every time a comparison is made during the sort. Arrays.sort() is an O(n log(n)) operation, so you do the math to see how many times File.lastModified() will be called on each individual file repeatedly in the worst case. (The issue with the repeated File.lastModified() calls is that the method does not cache the last modified timestamp; the call ventures out to the OS and the disk in real time to get the information every time.) The way around this is simple. Cache the File.lastModified() timestamp. Here’s a code snippet on how to go about that: public class FileLastModifiedWrapper implements Comparable<FileLastModifiedWrapper> { public final File file; public final long lastModified; public FileLastModifiedWrapper(File file) { this.file = file; lastModified = file.lastModified(); } public int compareTo(FileLastModifiedWrapper other) { return Long.compare(this.lastModified, other.lastModified); } } //...somewhere else: File directory = new File("/SomeDirectory"); File[] filesList = directory.listFiles(); FileLastModifiedWrapper[] wrappedFilesList = new FileLastModifiedWrapper[filesList.length]; for(int i=0; i<filesList.length; i++) wrappedFilesList[i] = new FileLastModifiedWrapper(filesList[i]); Arrays.sort(wrappedFilesList); for(int i=0; i<filesList.length; i++) filesList[i] = wrappedFilesList[i].file; And voila! This will sort immensely faster. I noted that on around 100k files, it took just a few seconds, whereas the original code took up to two minutes. As you see, FileLastModifiedWrapper caches the lastModified timestamp locally. Then we instantiate an array of FileLastModifiedWrapper objects with each file in our filesList. We then sort this new array, and use it to rearrange the original array.
http://blog.adeel.io/2017/08/04/java-workaround-for-array-sort-slowness-when-sorting-on-file-lastmodified/
CC-MAIN-2019-30
refinedweb
392
51.85
in reply to Is Perl Truly an Object Oriented Language? After having ranted about this in the CB and edan prompting me to make my ranting eternal by means of a post, I call rubbish on the three questions you actually meant to pose: What is an Object Oriented Database? What is Truly Object Oriented? How do the two things relate? I think that these three questions have no good answers because they are all three very ill defined, at least without further context. For example, Smalltalk people call other languages "not Truly Object Oriented", if there are things in Other Languages that are not objects, i.e. you can't call methods ("send messages" in Smalltalk-lingo) to them. In that sense, Perl is not Truly Object Oriented, as you can't call a method on an integer. autobox is a hammer to solve this perceived problem. You also can't manipulate classes as if they were objects, which has a "solution" in the form of, for example, Class::Classless. I'm not convinced that these perceived problems are actual problems, but if you're talking to somebody in the Smalltalk camp, they will use that as a line of demarcation between Truly Object Oriented and Providing Syntactical Candy to Seem Object Oriented. There also is no standard to what databases need to provide to call themselves "Object Oriented". Any database can be called Object Oriented, as long as you restrict what you call your objects to databases, tables, rows and indices. It is an ill-defined and much abused term like "XML databases". Perl has Class::DBI which provides a thin persistence layer for objects into databases, and these two discussions pointed out to me by Super Search go much deeper into the problems and solutions of OODBMS. I don't see much use in these, because if you're going to store arbitrary objects in your database, you have a much larger problem as to what to do with these objects, and if you don't know about your objects, all you will be able to do with them is call a given set of methods on them, operating on them in an iterative fashion, instead of operating on them as a set, like traditional RDBMS do. Then, you are likely either well off using a tied hash to serialize your object data, or using Class::DBI, depending on whether you want to go the extra mile to define a database schema for your objects or just serialize them as blobs. As I didn't come up with a favourable answer to any of the first two questions, the third won't be answered by me either, at least not in a constructive way - you can always map an "object" to a "data structure" and code that operates on it, like, say, a hash, and a set of functions that all take the hash as the first parameter. So there is not much sense in saying that only a Truly Object Oriented Language can interoperate with an Object Oriented DB. Perl also has enough of introspection and the eval statement so that you can generate classes on the fly, so as long as the database lets you in on the object format, you can create a suitable class for it. Whether that is what was meant, I don't know though. Thank you for your wonderfully spirited response. I plan to print this out and keep it with me the next time I'm talking with someone and they tilt their head, furrow their brow and say, "But is it truly OO?", at which point I will smile broadly and leap into a fascinating but mostly pointless discussion of What OO Means Anyway. I won't end up working there (yes, I admit, I did picture an HR droid with their Arts degree on the wall), but I'll know I had the Right Answer To An Ugly Question. Alex / talexb / Toronto "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds Wait a minute ... are you saying someone asked you these very same questions in a *job interview*?? Nah .. just projecting. I find that the people who are so intent on OO are often the ones who have no idea what it means. They do know that it's a cool buzzword, hence favoured by HR drones, marketing droids, shiny project leaders and so forth. I'm perfectly happy to split hairs with someone in a logical argument, but when I hear a body in a $1000 suit asking about OO, it's probably because they read about it in a brochure somewhere and they're trying to make an impression -- much as well educated Europeans a hundred years ago would drop English, French, Italian, Latin and Greek into conversation to casually convey the impression that they'd been 'properly' schooled. My view of the world is more skewed towards a meritocracy, as misguided as that may seem. And, yes, Don Quixote is one of my heros. Well, in perl someone could write a Class::AsObject module which injects methods like delete_symbol, create_subclass($name), add_field, add_method, and so forth into the UNIVERSAL namespace. These methods simply work as class methods, with the instance data sort of being the symbol table hash that the class takes up. $r = Dog->create_subclass("Rottweiler"); # eq Dog::Rottweiler $r->add_method(bark => sub { print "roar" }); [download] *shudder*
http://www.perlmonks.org/index.pl/jacques?node_id=411748
CC-MAIN-2015-14
refinedweb
907
63.02
I ran into the following compile error while compiling httrack 3.40.1 on Mac OSX 10.4.5: In file included from htsweb.c:67: htsserver.h: In function 'linputsoc': htsserver.h:125: warning: implicit declaration of function 'recv' htsserver.h:125: warning: nested extern declaration of 'recv' In file included from /usr/include/netinet/in.h:78, from /usr/include/netdb.h:86, from htsnet.h:56, from htslib.h:48, from htscore.h:75, from htsweb.h:41, from htsweb.c:68: /usr/include/sys/socket.h: At top level: /usr/include/sys/socket.h:566: error: conflicting types for 'recv' htsserver.h:125: error: previous implicit declaration of 'recv' was here htsweb.c: In function 'main': htsweb.c:185: warning: pointer targets in passing argument 1 of 'domd5mem' differ in signedness htsweb.c:185: warning: pointer targets in passing argument 3 of 'domd5mem' differ in signedness make[2]: *** [htsweb.o] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 To fix this, I just added: #include <sys/socket.h> to file htsserver.h and the compile was successful. Ken Luke Created with FORUM 2.0.11
http://forum.httrack.com/readmsg/13758/index.html
CC-MAIN-2020-40
refinedweb
193
56.62
The most common and the most important association between entities is the "One-to-Many" association. In this part 3 of the article series we will discuss the One-to-Many association and reserve the OPTIONAL One-to-Many association for the next part. The first question would be, what is the difference between One-to-Many and Optional One-to-Many? Simply put, an optional one allows the value '0' (zero) in the multiplicity of the association. The next question would be, is the difference essential? Absolutely yes from an ORM point of view. It is very much essential because optional one-to-many associations result in nullable foreign key columns and hence needs to be handled differently to avoid nulls which are always preferred for DB's stored data quality. To stress the difference between one-to-many and optional one-to-many, in this article, two examples will be given. First an example will be shown in the ecommerce scenario for a one-to-many association with the collection end using <set>, a scenario which would have been much better if mapped as an optional one-to-many association. But here it will be mapped as a simply one-to-many. So it will have a whole lot of null values in the foreign key column. In the next article which is part 4 of this series, it will be improved to be mapped as an optional one-to-many wherein all the nulls disappear to improve the quality and reliability of data stored. Also another example will be shown in this article which does not result in nulls because it is a one-to-many association scenario and hence mapped correctly. The second example uses a <list> for the collection end. <set> <list> Firstly in Part 1 of this article series, it was been shown that in shows that in ORM, while mapping a one to many association between objects to their respective tables, the primarykey of the table in the "ONE" end of the one-to-many association is posted as a foreign key to the table in the "many" end of the one-to-many association (we will be saying the collection class end of one-to-many association as the "many" end throughout the article series to make it easier to describe). It is impossible to map this association other the table in "one" end as a foreign key to the table in the "many" end. Check this in action with the examples below using NHibernate. So to our ecommerce scenario for an example of a one-to-many association: "When an order is submitted for approval by customer, the system checks for item availability based on product descriptions given in the order. If the item is available, the item is added to the order. This is done for each product description. If an item is not available, it is added to the list of unavailable items for the order. Finally the list of available items and unavailable items and total money to be paid is sent to the customer. Once the Customer submits payment with order, the items are flagged in the inventory to denote that they are ordered. The items paid by a Customer are added to a PAYMENTAPPROVEDORDER." Only the last two sentences are of interest here as it contains a many-to-one association between ITEM and PAYMENTAPPROVEDORDER. Both Item and PaymentApprovedOrder are entity classes. Here Item represents an item in the inventory and not the order item in the billing order as is usually done because in e-business you do not select a particular item to pay and takeaway like it is done in real world. You just select an item for purchase based on product descriptions if stock is available. So we will try to capture this scenario of e-business. Hence we will not persist order items with Order until payment is submitted with the Order instance to first example in this article. Later when items delivery is made, all the items for that particular order will be removed from the inventory Items collection and added to DeliveredItems. A simple scenario for the article samples. ITEM PAYMENTAPPROVEDORDER Item PaymentApprovedOrder Order Inventory Items DeliveredItems Back to the discussion here, so it's clear Item will have an independent lifetime and hence it's an entity. The association between PaymentApprovedOrder and Item is an Optional One-to-Many. Why so? Why not just simply One-to-Many? While a PaymentApprovedOrder definitely needs to have at least one Item, what is the necessity that an Item has to be ordered? It could be an Item that is never ordered in which case it's never associated with an order at all and simply exists in the inventory without a sale. Hence the association between PaymentApprovedOrder and Item is an Optional One-to-Many. But we will map it as a simple One-to-Many, with a whole lot of nulls in the database for foreign key column values, and then improve it in the next article to avoid those nulls by mapping it as an Optional One-to-Many. The next example scenario in this article will be a typical One-to-Many scenario which will totally avoid these nulls. In the previous article, it was clearly shown that certain collections like <list> could preserve order information and certain collections like <set> may have no order information. In this article it will be shown that it is very essential how the mapping must be done for collections like <list> to preserve the ordering information when it is a the e-commerce scenario with <list> and see the difference in mapping to ensure that the order information captured in <list> is stored correctly. One-to-Many with <SET> collection mapping Look interpreting the figure, please read part 1 and part 2 of this article series. In figure 2, look at the three purple arrows. It shows that the column "PAYMENTAPPROVEDORDERID" is the primarykey of the "one" end table of the association i.e., PAYMENTAPPROVEDORDER table and is posted as a foreign key column to the "many" end table, i. <Set> One end of this association is the PaymentApprovedOrder class. In the PaymentApprocedOrder.cs C# file, the property, set of Items is declared as follows: public virtual ISet<Item> PaidOrderItems { get; set; } Note - ISet<> above is from the Iesi.collections.generic namespace. In the PaymentApprovedOrder.hbm mapping file, the above set is mapped as: ISet<> Iesi.collections.generic <set name="PaidOrderItems" inverse="true" cascade="save-update"> <key column="PAYMENTAPPROVEDORDERID" not- <one-to-many </set> If you compare this with the <set> mapping shown in part 2 for valuetype collections, you can see a lot of differences that aid in understanding NHibernte mapping better. First difference is the absence of <element> used in valuetype collections to denote the element of the collection. Next the table is not named. NHibernate knows that we are dealing with an entity association here when it sees that there is no <element> inside <set>. Further instead of the <element> tag in <set> we use an association tag like <one-to-many>. This is a signal to NHibernate that it is dealing with an entity association and to use the table specified in the class attribute in a <one-to-many> tag which in this case is class="Item". So, NHibernate will use the ITEM table specified in the mapping file for class Item and use the column PAYMENTAPPROVEDORDERID as foreignkey column. Also note that we explicitly specify the "cascade" attribute. Everyone is familiar with cascade attribute from DBs and ADO.NET and the functionality is same i.e., when PaymentApprovedOrder is saved or updated to its table then the collection denoted by <set> must also be saved or updated to its table automatically. Nothing special there, just maintaining the usual Parent - Child relationship. When the owning Parent is saved or updated, cascade the save-update function to the owned child automatically without explicitly having to do it separately for the child. But whats most interesting and most important is not-null= true (which need not have been there but i have put it to explain an important NHibernate mapping concept) in the foreignkey column "PAYMENTAPPROVEDORDERID", which we will look later while examining the test data and results stored in the db. Since this is a bidirectional association, let us look at the other side of the association. In the Item.cs C# file, the property to store the association with PaymentApprovedOrder is as follows: <element> <one-to-many> class="Item"3 below. It shows both the. <many-to-one> Since the association is bidirectional, the same foreignkey column PAYMENTAPPROVEDORDERID gets mapped twice as is shown in Figure 3. In c# code also, both ends of a bidirectional association will have to be linked. So in PaymentApprovedOrder.cs file that defines the class PaymentApprovedOrder (shown in the code snippet below - only relevant portions of class is shown), have a look at the AddPaidItem(Item item) method that sets both ends of the One-to-Many association. AddPaidItem(Item item) association between PaymentApprovedOrder and Item is established. But as was shown above with Figure 3, in the database table, both ends of the association maps to the same column i.e., PAYMENTAPPROVEDORDERID, which is the primary key of the "ONE" end table i.e the table PAYMENTAPPROVEDORDER and posted as a foreignkey column in the "MANY" end repetitions. Hence one of the end of a bidirectional link has to be deactivated in the mapping file so that insert and update statements are not generated for both ends but only for one end. There are two ways to do it. AddPaidItem. INVERSE=TRUE In the AddPaidItem(Item item) method of PaymentApprovedOrder C# class, shown above in the code snippet, which establishes both end of the link for this One-To-Many association. This means by simply adding an instance of Item to the set collection of Item in PaymentApprovedOrder denoted by PaidOrderItems property, the item will not get added mapping file. The instance. item.PaidOrder=this PaidOrderItems.Add(item) Inverse=true PaidOrderItems <set inverse="true"> PaidOrder Thus whenever there is a bidirectional association between entity classes, to avoid any conflicts, one end of the association has to be deactivated in NHibernate mapping file and one way of doing this is by specifying INVERSE=TRUE in the mapping file in collections like <set> that do not have any ordering information. Now why cant we use INVERSE=TRUE for collections that have ordering information like <list>? The answer to the question is described below and very interesting. Why cant we use INVERSE=TRUE attribute for mapping collections that have ordering information like <list> when they are used in a bidirectional association? When we map a collection with inverse=true attribute because the collection is used in a bidirectional association, NHibernate literally does not consider the collection defined with attribute inverse=true of use for any further automatic DML statement generation when changes are made in the corresponding collection object in C# code. Only the other end of the association will be used by Nhiberante. So it will not take <list inverse=true> mapping for further use but unfortunately the ordering information for a <list> is encapsulated inside <list> definition only. This means next section with an example for <list>. inverse=true <list inverse=true> Read ITEM table (shown by the orange arrow). So a ITEM cannot be added to the ITEM Table without PAYMENTAPPROVEDORDERID set to a non null value. Yet we see in the top half of the Figure 5, there are three rows for which the PAYMENTAPPROVEDORDERID is NULL (shown by the orange arrow). How is this NOTNULL=TRUE constraint violation possible? Don't make the mistake of thinking this to be a sideffect of inverse=true attribue being set. Its got nothing to do with inverse=true attribute set. The answer is not-null=true should have been defined at the ONE end of the association also for it to have effect instead of just a Order which is not what we want in ecommerce scenario. We want instances of Item to exist in inventory without a order and when order is made, the item will have the appropriate reference set for PaymentApprovedOrder and a flag set in the item that its ordered. This is why it should have been handled as optional one-to-many and not just simply one-to-many. This clearly helps in understanding the problem if one-to-many and optional one-to-many is used wrongly. <SET> NOTNULL=TRUE not-null=true <many-to-one class="PaymentApprovedOrder" name="PaidOrder" not-null=true> To conclude this section, its important to take a good look at the rows of the ITEM table shown in Figure 5 - Top half. See the Nulls in the Foreign Key "PAYMENTAPPROVEDORDERID". These nulls exist because the association between PaymentApprovedOrder and Item is optional one-to-many ( a item may exist in inventory without ever being bought and hence first two articles have the code for IRepository, DBRepository, Payment classes. Figure 4 shows the test code. Figure 6 Shows the code and mapping file for PaymentApprovedOrder. Figure 7 Shows the code and mapping file for Order. IRepository DBRepository Payment The be existing without a customer. <list inverse="true"> Customer <LIST> Figure 8 shows the Customer and PaymentApprovedOrder class and their mappings. Developers who have read part 1 and part 2 of the article series will know how to interpret the Figure and the colored arrows shown. If assistance is required on interpreting the Figure, please read part 1 and part 2 of this article series. Have a look at the purple arrows in Background has to be informed so that it will not generate insert and update SQL statements when both ends of a bidirectional link are changed because as far as database is concerned it is still the same foreignkey column which is mapped twice to both ends. A PaymentApprovedOrder will be created only if a customer buys and pays for an order with items in it. Hence, in the PaymentApprovedOrder.cs file, the Customer for a PaymentApprovedOrder is declared as: <set inverse=true...> association between PaymentApprovedOrder and Customer. The not-null=true attribute in the above mapping is the constraint to specify that a customer must exist for a paymentapprovedorder. The <many-to-one> tag does not have inverse attribute and hence the complete ordering information for the list is got. If <list> is mapped with inverse=true attribute, then the Ordering information or the Position of elements in List information will be set as null. The PaymentApprovedOrder, Customer and client code for testing is shown in Figure 9, Figure 10, Figure 11. All other classes are available in Part 1 and Part 2 of the article series. Downloadable code will be available in Part 7 of this article series. List Take a look at Figure 12. It shows the rows start of a new list for the next customer. Thus the ordering information for <LIST> is maintained. One other most important thing to observe in the rows of PAYMENTAPPROVEDORDER table shown in Figure 12 is, there are no null values for the Foreign Key CUSTOMERID. Thus it captures the domain scenario, A PAYMENTAPPROVEDORDER cannot be made without a CUSTOMER. Correct One-to-Many mapping. At the start of the article it was mentioned that One-to-Many association is very important. The reason is because, the common practice of dealing with Many-To-Many association in OOAD is to use an association class and break the Many-To-Many association into two One-to-Many associations. The next article will deal with Optional One-to-Many association after which we will discuss the Many-To-Many association. Enjoy NHibern.
http://www.codeproject.com/Articles/472019/Object-Relational-Mapping-ORM-u
CC-MAIN-2016-30
refinedweb
2,642
51.99
First Program for PSoC, LED Blinking | Cypress Semiconductor First Program for PSoC, LED Blinking HI, I switched form Arduino to PSoC today and followed PSoC101 tutorilas and executed the first LED Blink program. I am using: CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit I am not understanding why the following piece of code only making RED LED blink. Why Green and Blue is not working. #include "project.h" int main(void) { CyGlobalIntEnable; /* Enable global interrupts. */ /* Place your initialization/startup code here (e.g. MyInst_Start()) */ for(;;) { /* Place your application code here. */ Pin_Red_Write ( ~ Pin_Red_Read() ); CyDelay( 500 ); Pin_Blue_Write ( ~ Pin_Blue_Read() ) ; CyDelay( 500 ); Pin_Green_Write ( ~ Pin_Green_Read() ) ; CyDelay( 500 ); } } Welcome in the forum. Probably the pin assignment of your LEDs is not right. Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use Creator->File->Create Workspace Bundle (minimal) and attach the resulting file. Bob Hi Bob, Thanks for responding. Please check the atatchments. Thanks. On my Pioneer kit (without BLE) all three colours are shown. Something else must cause that error. Bob
http://www.cypress.com/forum/psoc-4-ble/first-program-psoc-led-blinking
CC-MAIN-2016-50
refinedweb
182
67.35
or Join Now! As I sit here this morning and try to focus on a direction to move today, I feel a bit overwhelmed. I am not sure why, but it feels as if I have been not accomplishing much even though if I review the past several months, I do see that I have made progress on many things. Why is it we sometimes feel like that? Part of the reason we took a break was to get away and have a change of scenery. It had been many months of working every day without time off and I know that Keith was feeling it. As for myself, the last several weeks I have felt that I haven’t accomplished much, yet I am up early each morning and don’t quit until I am ready to turn in most nights. The time away was good in many ways. I was able to add to the growing list of ideas of things that I want to make that I think that others will enjoy too. I also enjoyed focusing on the house here a bit, and sprucing up our little place here is definitely something that is positive and will have good results. I always have enjoyed making the best of my place, wherever I lived. Even when I was in university and lived in a small mobile home for $155 per month (heat included!) I was able to make it cozy and welcoming and comfortable. Since I have always been somewhat of a ‘homebody’, it has always been important to have a clean and inviting home, no matter how small it was. Among our acquisitions we picked up this past weekend, was a large wall clock. By large, it measures almost three feet in diameter. Our main room here has minimal clutter, and the furniture consists of a couch, an end table the large cabinet we built last year and a stand for the TV. We also have to consider the speakers part of the furniture because they are so large, and last fall we picked up three matching trunks which open up for storage which look like tooled leather. The trunks vary in size and are great for storage, as well as some extra seating on the rare occasions when we have company over. We have decided to go with a ‘steampunk’ theme, which is an odd mix of brass and gears and sometimes described as “Victorian meets technology.” Kind of a Jules Verne-ish look. Both Keith and I like the idea and look of the movement and it allows for lots of interesting combinations. The trunks were a good start, as they are a bit ornate and trimmed with leather and brass and are interesting pieces. While they weren’t expensive, they serve the purpose well and besides looking nice, they are great to store many of my painting supplies and other miscellaneous items. After all – for us it is all about storage. The clock is quite attractive and it is certainly a statement in the room. It’s large size commands attention and really makes the room look warm and inviting. Funny story about it though, it was the third clock we picked up in our travels this weekend, with the other two going back as we came upon better candidates. The first clock was purchased at a furniture store in New Minus (about half the way to Halifax from our place.) It was cool because it was made from what looked like an old wheel hub. It had large Roman numerals on it and it had that ‘aged’ look. While we liked it, we didn’t like that it had a whitish background, and I was even considering using paint and washing some gold paint on it to make it look more like parchment. It was only about 2 ft. in diameter. But at the time, it was the best one we saw and I bought it. As we traveled on, we saw a different clock at another store only about 5 minutes away from the original place. This one was slightly larger and suited our purpose a bit more. So we went back to the original place and I returned the clock I had bought. They were very nice about it, and I just told them the truth – that I changed my mind and all was well. We then purchased the second one and were very pleased with it. It had the background that we liked, but the only thing was that I wanted one that was bigger. We drove around for two days with the large clock filling our back seat, feeling good about the purchase, until we got to a store in Halifax and saw the clock we eventually wound up with. It was up high on the wall and was very impressive. The frame was much larger than the one we had and overall it looked much nicer and more of what I was thinking. Then we saw that it was regularly priced $289 and was on sale for $99. I had to have it. It just so happened that across the street, there was a “Winners” store, which was where we purchased the second clock from. We took it in to see if they would accept the return (it was still wrapped in the box, unopened, of course) and they were very pleasant about it and graciously did the transaction. We then went back and purchased the final clock. Am I crazy? Maybe. But I figure that we will have to look at that clock for a while and especially with something that will be so much of a focal point, I wanted something that I would be completely happy with. When Lee saw it as we unloaded, all he said was ‘that is massive!’. It IS big, and certainly weighs enough, but it is the look I was going for and we got it mounted yesterday and it looks just wonderful. While sittiing here this morning, I find it to be somewhat ironic having a clock to be a focal piece for the room here. After all, lately it seems that time is passing by more quickly than ever. Perhaps my need to have the large clock here was to demonstrate to me how precious time really is. As I write, I can (barely) hear the quiet “tick, tock, tick, tock” of it next to me. Is it a reminder to myself as to how quickly time will pass? This morning I noticed a post here on lumberjocks by HamS called Universal Equity. It seems that I am not the only one who feels that time slips away quickly. Being aware of this and how precious time is should make us realize that each day is a gift and we need to appreciate them and use our time wisely. We are all given the same number of hours, minutes and seconds each day. While some of us use them wisely, others let them slip by, almost unnoticed. Thinking about the time we have here and appreciating each minute is something that makes our lives special and worthwhile. Being aware of this gift is a present within itself, and it should not be squandered. For once it has passed, time can not be recaptured. Make good use of your time, and enjoy every second of each day. ”Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you.” ~Carl Sandburg -- Roger 19105 posts in 2071 days #1 posted 03-13-2012 12:44 PM Mr. Sandburg is a pretty wise guy… I get overwhelmed very easy, but, I am learning when I do get those feelings, it’s time to just stop, say to myself: just hold it, then, carry on. The old saying “one step at a time” really does work -- Roger from KY. Work/Play/Travel Safe. Keep your dust collector fed. Kentuk55@yahoo.com #2 posted 03-14-2012 01:34 AM Yes, Roger. I just don’t know sometimes. It seems that at times I am learning that too. I try not to look at everything at once because it seems like just too much to handle at times. I find I do better if I stop and take a breath and look at one aspect of the issues at a
http://lumberjocks.com/scrollgirl/blog/28836
CC-MAIN-2016-22
refinedweb
1,421
78.59
SwiftUI Property Wrappers Learn different ways to use SwiftUI property wrappers to manage changes to an app’s data values and objects. Version - Swift 5, iOS 14, Xcode 12 In a SwiftUI app, every data value or object that can change needs a single source of truth and a mechanism to enable views to change it or to observe it. SwiftUI property wrappers enable you to declare how each view interacts with mutable data. In this tutorial, you’ll build a simple app and learn different ways to use SwiftUI property wrappers to manage changes to its data values and objects with the @State, @Binding, @Environment, @StateObject, @ObservedObject and @EnvironmentObject property wrappers. Getting Started Download the project materials using the Download Materials button at the top or bottom of this tutorial. the VStack in a NavigationView. This gives you the navigation bar where you display the title and the + button. Build and run the app. If you get a LayoutConstraints message in the console, complaining about UIModernBarButton, add this modifier to the NavigationView in ContentView.swift: .navigationViewStyle(StackNavigationViewStyle()) This is a workaround for a navigationTitle bug. To find the right place to add the modifier, fold NavigationView: ThingStore has the property things, which is an array of String values. You’ll first manage state changes to the ThingStore structure using @State and @Binding, then convert it to an ObservableObject and manage state changes with @StateObject and @ObservedObject. Finally, you’ll extend the app to create a reason to access ThingStore as an @EnvironmentObject. You’ll instantiate ThingStore when you create ContentView in TILApp. As an @EnvironmentObject, your ThingStore object will be available to any view that needs to access it. Tools for Managing Data A @State property is a source of truth. A view that owns a @State property can pass either its value or its binding to its subviews. If it passes a binding to a subview, the subview now has a reference to the source of truth. This allows it to update that property’s value or redraw itself when that variable changes. When a @State value changes, any view with a reference to it invalidates its appearance and redraws itself to display its new state. Your app needs to manage changes to two kinds of data: - User interface values, like Boolean flags to show or hide views, text field text, slider or picker values. - Data model objects, often collections of objects that model the app’s data, like a collection of acronyms.AddThing, instead of showAddThing.wrappedValue. And, its binding is $showAddThing instead of showAddThing.projectedValue. SwiftUI provides property wrappers and other tools to create and modify the single source of truth for values and for objects: - User interface values: Use @Stateand @Bindingfor values like showAddThingthat affect the view’s appearance. The underlying type must be a value type like Bool, Int, Stringor Thing. Use @Stateto create a source of truth in one view, then pass a @Bindingto this property to subviews. A view can access built-in @Environmentvalues as @Environmentproperties or with the .environment(_:_:)view modifier. - Data model objects: For objects like ThingStorethat model your app’s data, use tutorial to consolidate your understanding of how to use these property wrappers. @AppStoragewraps UserDefaultsvalues and you can use @SceneStorageto save and restore the state of a scene.. Managing ThingStore With @State and @Binding TIL is a very simple app, making it easy to examine different ways to manage the app’s data. First, you’ll manage ThingStore the same way as any other mutable value you share between your app’s views. In ContentView.swift, run live preview and tap the + button: MyThings initializes with an empty things array so, the first time your user launches your app, you display a message instead of a blank page. The message gives your users a hint of what they can do with your app. The text is grayed out so they know it’s just a placeholder until they add their own data. TIL uses a Boolean flag showAddThing to show or hide AddThingView. It’s a @State property because its value changes when you tap the + button, and ContentView owns it. In ContentView.swift, replace the myThings property in ContentView: @State private var myThings = ThingStore() You’ll add items to myThings.things, so myThings must be a wrapped property. In this case, it’s @State because ContentView owns it and initializes it. AddThingView needs to modify myThings, so you need a @Binding in AddThingView. In AddThingView.swift, add this property to AddThingView: @Binding var someThings: ThingStore You’ll soon pass this binding from ContentView. You’ll also add a text field, but for now, just to have something happen when you tap Done, add this line to the button action, before you dismiss this sheet: someThings.things.append("FOMO") You append a specific string to the array. Fix this view’s previews: AddThingView(someThings: .constant(ThingStore())) You create a binding for the constant initial value of ThingStore. Now, go back to ContentView.swift and fix the call to AddThingView(): AddThingView(someThings: $myThings) You pass a binding to the ContentView @State property to the subview AddThingView.. Start live preview, tap + then tap Done: Great, you’ve got data flowing from AddThingView to ContentView via ThingStore! Now to get input from your user, you’ll add a TextField to AddThingView. First, pin the preview of ContentView so it’s there when you’re ready to test your TextField: Click the push-pin button in the canvas toolbar.. Then, edit what the button action appends: if !thing.isEmpty { someThings.things.append(thing) } Instead of "FOMO", you append the user’s text input to your things array after checking it’s not the empty string. text field auto-corrects your acronym: FTW to GET or FOMO to DINO. Add this modifier to TextField: .disableAutocorrection(true) Accessing Environment Values A view can access many environment values like accessibilityEnabled, colorScheme, lineSpacing, font and presentationMode. Apple’s SwiftUI documentation has a full list of environment values. A view’s environment is a kind of inheritance mechanism. A view inherits environment values from its ancestor views, and its subviews inherit its environment values. To see this, open ContentView.swift and click anywhere in this line: Text("Add acronyms you learn"). Modifying Environment Values AddThingView already uses the presentationMode environment value, declared as a view property. But, you can also set environment values by modifying a view. Acronyms should appear as all caps but it’s easy to forget to hold down the Shift key. You can actually set an environment value to automatically convert text to upper case. In TILApp.swift, add this modifier to ContentView(): .environment(\.textCase, .uppercase) You set uppercase as the default value of textCase for ContentView and all its subviews. .textCase(.uppercase)also works, but the .environmentsyntax highlights the fact that textCaseis an environment value. To see it in live preview, also add this modifier in ContentView.swift to ContentView() in previews. Refresh live-preview, add acronyms without bothering to keep all the letters uppercase. Just type yolo or fomo. Tap DONE. Notice this label and the placeholder text are now all uppercase: Your strings are automatically converted to upper case. The environment value applies to all text in your app, which looks a little strange. No problem — you can override it. In AddThingView, add this modifier to the VStack: .textCase(nil) You set the value to nil, so none of the text displayed by this VStack is converted to uppercase. tutorial. ThingStore. A structure is more suitable when you need multiple independent states like the Thing structures you’ll create later in this tutorial.. Managing ThingStore With @StateObject and @ObservedObject To use ThingStore as an @ObservedObject, you’ll convert it from a structure to a class that conforms to ObservableObject. Then, you’ll create it as a @StateObject and pass it to a subview that uses it as an @ObservedObject. Sounds a lot like “create a @State property and pass its @Binding“, doesn’t it? @Statevalue or a @StateObjectto a subview as a @Bindingor @ObservedObjectproperty, even if that subview needs only read access. This enables the subview to redraw itself whenever the @Statevalue or ObservableObjectchanges. In ContentView.swift, replace the ThingStore structure with the following: final class ThingStore: ObservableObject { @Published var things: [String] = [] } You make ThingStore a class instead of a structure, then make it conform to ObservableObject. You mark this class final to tell the compiler it doesn’t have to check for any subclasses overriding properties or methods. ThingStore publishes its array of data. A view subscribes to this publisher by declaring it as a @StateObject, @ObservedObject or @EnvironmentObject. Any change to things notifies subscriber views to redraw themselves. In TIL, AddThingView will use an @ObservedObject, so you must instantiate the model object as a @StateObject in an ancestor view, then pass it as a parameter to its subviews. The owning view creates the @StateObject exactly once. In ContentView, replace @State private var myThings = ThingStore() with this line: @StateObject private var myThings = ThingStore() ThingStore is now a class, not a structure, so you can’t use the @State property wrapper. Instead, you use @StateObject. @Stateproperty, but its “value” is its address in memory, so dependent views will redraw themselves only when its address changes — for example, when the app reinitializes it. The @StateObject property wrapper ensures myThings is instantiated only once. It persists when ContentView redraws itself. In the call to AddThingView(someThings:), remove the binding symbol $: AddThingView(someThings: myThings) You don’t need to create a reference to myThings. As a class object, it’s already a reference. In AddThingView.swift, replace @Binding in AddThingView with @ObservedObject: @ObservedObject var someThings: ThingStore ThingStorehad more properties and you wanted to restrict write access to its thingsarray, you could pass $myThings.thingsto AddThingView, which would have a @Binding someThings: [String]property. And fix its previews: AddThingView(someThings: ThingStore()) The argument isn’t a binding anymore. Refresh live-preview, tap +, type yolo then tap Done: No surprise: The app still works the same as before. Refactoring TIL You’ve managed the state of data in TIL with @State and @Binding for ThingStore as a structure (value type), then with ObservableObject, @StateObject and @ObservedObject for ThingStore as a class (reference type). TIL is a very simple app with a very simple view hierarchy. AddThingView is a subview of ContentView, so ContentView just passes the ThingStore value or object to AddThingView. Most apps have a more complex view hierarchy, where you might find yourself passing an object to a subview just so it can pass it on to one of its subviews. In this situation, you should consider using @EnvironmentObject. To try this out, you’ll need to make TIL a little less simple. Keeping a list of acronyms isn’t much use if you can’t remember what they mean. TIL really needs to store the long form of each acronym. So first, you’ll create a Thing structure and refactor TIL to use this instead of String. Then, you’ll create a detail view to display when the user taps an acronym in ContentView. To give you a reason to use @EnvironmentObject, ThingView will have the same “Add New Thing” button as ContentView. Using Thing Structure Move ThingStore to its own file and add struct Thing: // ThingStore.swift import SwiftUI final class ThingStore: ObservableObject { @Published var things: [Thing] = [] // 1 } struct Thing: Identifiable { let id = UUID() // 2 let short: String let long: String } ThingStorenow publishes an array of Thingvalues instead of an array of Stringvalues. - It’s possible to have the same acronym with different meanings, so Thingneeds a unique idvalue. In ContentView.swift, modify ContentView to use Thing: ForEach(myThings.things) { thing in // 1 Text(thing.short) // 2 } ForEachdoesn’t need the idparameter now that it’s iterating over an Identifiabletype. - You display the short form of the acronym. There’s a lot more work to do in AddThingView.swift. Replace @State private var thing = "" with two @State properties: @State private var short = "" @State private var long = "" Replace TextField("Thing I Learned", text: $thing) with these two text fields: TextField("TIL", text: $short) // 1 .disableAutocorrection(true) .autocapitalization(.allCharacters) // 2 TextField("Thing I Learned", text: $long) .autocapitalization(.words) - The placeholder text “TIL” indicates this text field is for the acronym. - Now that user input includes text with different capitalizations, you modify each text field to automatically capitalize either all letters or all words. Now you don’t need or want to set the textCase environment value for ContentView. .environment(\.textCase, .uppercase) in TILApp.swift and in struct ContentView_Previews in ContentView.swift. And, you don’t need to override .uppercase in AddThingView. Back in AddThingView.swift, delete .textCase(nil) from the VStack. Continue to refactor AddThingView to work with Thing instead of String: Move the textFieldStyle and padding to modify the VStack: // VStack { ... } .padding() .textFieldStyle(RoundedBorderTextFieldStyle()) Now that you have two text fields, you modify their container instead of attaching the same modifiers to both text fields. Next, modify the Done button action to create a Thing instance: if !short.isEmpty { someThings.things.append( Thing(short: short, long: long)) } Live-preview ContentView and add the short and long versions of an acronym like FTW: I actually typed “ftw” and “for the win”. I didn’t touch the Shift key at all. Now, you need a detail view to navigate to when the user taps an acronym in the list. Navigating to ThingView Create a new SwiftUI View file named ThingView.swift and replace its contents with the following: import SwiftUI struct ThingView: View { let thing: Thing var body: some View { VStack { Text(thing.short) .font(.largeTitle) Text(thing.long) .font(.title) Spacer() } .padding() } } struct ThingView_Previews: PreviewProvider { static var previews: some View { ThingView(thing: Thing(short: "TIL", long: "Thing I Learned")) } } You just display the acronym and its meaning. In ContentView.swift, in the ForEach closure, replace Text(thing.short) with the following: NavigationLink(destination: ThingView(thing: thing)) { Text(thing.short) } You pass a Thing value to ThingView. To do its main job — display a Thing value — ThingView doesn’t need access to the ThingStore object. Live-preview ContentView, add the short and long versions of an acronym, then check out its detail view: Well yes, you could easily display both short and long texts in the main list. Here’s a possible use case for the detail view: Use the main list to quiz yourself, then display the detail view to check your answer. Adding a New Thing From ThingView Now, suppose you want to let the user add a new Thing from ThingView. Copy the showAddThing property and the .sheet and .toolbar modifiers from ContentView to ThingView: @State private var showAddThing = false // ... // modify the VStack with these .sheet(isPresented: $showAddThing) { AddThingView(someThings: myThings) } .toolbar { ToolbarItem { Button(action: { showAddThing.toggle() }) { Image(systemName: "plus.circle") .font(.title) } } } And Xcode complains “Cannot find ‘myThings’ in scope”. So, it’s time to make a decision! Do you pass myThings from ContentView to ThingView just so it can pass it on to AddThingView? TIL is still a small app so this isn’t a life-changing decision. But your own apps will grow and grow and, at some point, you’ll have to face this kind of decision in earnest. Here’s the other option. Using @EnvironmentObject An @EnvironmentObject is available to every view in a subtree of the app’s view hierarchy. You don’t pass it as a parameter. You don’t need to do anything to ThingStore because you still instantiate an ObservableObject as a @StateObject before using it as an @EnvironmentObject. What does change is where you instantiate the @StateObject you’re going to use as an @EnvironmentObject. If a view uses an @EnvironmentObject, you must create the model object by calling the environmentObject(_:) modifier on an ancestor view. ContentView uses the ThingStore object, so you create it in TILApp.swift when it creates ContentView. Move the declaration of ThingStore() from ContentView.swift to TILApp.swift: struct TILApp: App { @StateObject private var store = ThingStore() Then, in WindowGroup, add this modifier to ContentView(): .environmentObject(store) Now, any view in TIL can access this ThingStore object directly. In ContentView.swift, replace the myThings property with this: @EnvironmentObject private var myThings: ThingStore ContentView() doesn’t have to use the same variable name as TILApp. The ThingStore type is like a dictionary key, and Xcode matches up its value to myThings. Now, modify AddThingView to use your environment object. Delete the argument from the call to AddThingView: AddThingView() Xcode complains, but you’re about to fix the error. Although ContentView can perfectly well pass myThings to AddThingView, you don’t want to make ThingView do the same. So AddThingView needs to access the ThingStore object as an @EnvironmentObject. Fix the preview by attaching a ThingStore object: ContentView() .environmentObject(ThingStore()) ThingStoreto persist between view refreshes. In AddThingView.swift, replace someThings with this: @EnvironmentObject var someThings: ThingStore You just change @ObservedObject, which must be passed in as a parameter, to EnvironmentObject, which is just there in the environment. Also fix the preview: Delete the argument and attach a ThingStore object: AddThingView() .environmentObject(ThingStore()) If you don’t create a ThingStore object for the preview, it crashes when you tap Done. And, in ThingView.swift, delete the argument from the call to AddThingView: AddThingView() That’s all you need to do! The two views that use the ThingStore object access it as an @EnvironmentObject, giving it any name they want. ThingView doesn’t need to know anything about ThingStore. Live-preview ContentView and run it through its paces. just a container like VStack, where you use an environment value to set a default like font size. then subscribe to the publisher object by declaring an @EnvironmentObject of that type. To make an environment object available to every view in your app, attach it to the root view when the App creates its WindowGroup. One More Thing There are two small issues with the text fields. Fixing them would improve your users’ experience, mainly because they pretty much expect this behavior: - When AddThingViewappears, the focus should be in the first text field and the keyboard should be active. - Tapping return after typing the long form of the acronym should perform the same action as tapping Done. For the first issue, there’s no native SwiftUI way to programmatically make a TextField first responder. Solutions involve third party packages or a custom UIViewRepresentable text field that conforms to UITextFieldDelegate. For the second issue, there’s a long-version TextField initializer. First, in AddThingView.swift, extract the Done button action into a method: private func saveAndExit() { if !short.isEmpty { someThings.things.append( Thing(short: short, long: long)) } presentationMode.wrappedValue.dismiss() } // ... Button("Done") { saveAndExit() } You’ll use this method a second time in this file in the TextField action. Replace TextField("Thing I Learned", text: $long) with the following: TextField( "Thing I Learned", text: $long, onEditingChanged: { _ in }, onCommit: { saveAndExit() } ) Tapping return triggers the onCommit action. Live-preview ContentView and run it through its paces. Where to Go From Here? You can download the final project by using the Download Materials button at the top or bottom of this page. You’ve learned a lot about managing mutable data values and objects in a SwiftUI app with the @State, @Binding, @Environment, @StateObject, @ObservedObject and @EnvironmentObject property wrappers. This includes: -. - For more flexible. If you have any questions or comments, join the forum below!
https://www.raywenderlich.com/21522453-swiftui-property-wrappers
CC-MAIN-2022-33
refinedweb
3,241
56.45
Example Ruby on Rails Arduino Project - Citation Author(s): - dr.nisha rehane mithal - Submitted by: - Nisha Mithal - Last updated: - Thu, 11/08/2018 - 10:34 - DOI: - 10.21227/xy50-ap43 - Data Format: - - License: - - Dataset Views: - 136 - Rating: - 0 ratings - Please login to submit your rating. - Share / Embed Cite CATEGORIES KEYWORDS. Example Ruby on Rails Arduino Project. Pic 1: the foreground positive rail is 3.3V, the background rail 5V.If you haven't used a HUZZAH before I suggest you go through the tutorial. If you can upload a sketch and enumerate the nearby WiFi access point names then you're all set.I made a few mistakes setting up this hardware. First, I assumed the FTDI board I had could power the HUZZAH. The Arduino serial monitor showed crash dumps of memory and the sketch restarting. So no, the FTDI wouldn't work on its own. Make sure you have a second power source, that it is connected correctly and can supply 500mA. By correctly I mean don't connect your second power source to the V+ pin on the HUZZAH, that one is shared with the FTDI pin header; something I didn't realise until I found weird voltages on all the supply rails. Use VBat for the second supply.Lastly, when I hooked up the RHT03 sensor according to the data sheet I just ran it off the 5V rail from the USB-B socket. When my room was quiet I could hear the HUZZAH board screaming a nearly silent high-pitched squeak. So yes, it turns out I was pumping a 5V signal into the HUZZAH which takes only 3.3V inputs. Yikes! I'm glad I didn't blow it. Circuit Description The 5V supply from the USB-B socket is wired to GND and VBat on the HUZZAH. The 5V ground is also wired to pin 4 on the RHT03. The 3V pin (3.3V) on the HUZZAH supplies pin 1 on the RHT03 and pin 2 on the RHT03 via a 1kΩ resistor. Pin 2 on the RHT03 is wired to #5 on the HUZZAH. That's it. Server Of course you need a machine running Ruby on Rails (see previous blog posts) to act as the server for this project. Being Ruby on Rails there's not a lot to do to make this server work for us. I'm going to call the app 'climate' and record each value as a 'measure'. Given I've run through what it looks like to run these commands in previous blog posts, I'll leave out the response from Rails and just show the list of commands to run: ~$ rails new climate ~$ cd climate ~/climate$ rake db:create ~/climate$ rails generate scaffold Measure temperature:float humidity:float ~/climate$ rake db:migrate ~/climate$ rails server So now, on your Rails server you should be able to hit and play with that to ensure you can CRUD Measures.As explained previously, when we try to do this through JSON we'll get blocked by a built-in Rails security policy. At this stage we can read data using JSON () but we won't be able to post new data to the server until we fix the application_controller.rb file. Using a file manager or terminal window, edit ~/climate/app/controllers/application_controller.rb and add one line to make it read thus: class ApplicationController < ActionController::Base protect_from_forgery with: :exception protect_from_forgery unless: -> { request.format.json? } end OK, so now we're able to post data to the server in JSON format without being blocked. We can test it at the command line using curl: ~/climate$ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"temperature":0, "humidity":0}' Arduino So at this stage the server is done. We can move on to the Arduino code. Here's a dump of my Arduino code, I'll follow up with a walk-through: #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> #include <DHT.h> #include <DHT_U.h> #define DHTPIN 5 // Pin that is connected to the DHT sensor. #define DHTTYPE DHT22 // DHT 22 (AM2302) AKA: RHT03 const char* ssid = "FifthBit"; const char* password = "ThisIsNotMyRealPassword"; const char* restURL = ""; int maxWiFiConnectionWait = 20; // Seconds bool connectWiFi(); bool sensorValues(float&, float&); String toJSON(float, float); int postValues(String json); DHT_Unified dht(DHTPIN, DHTTYPE); void setup() { Serial.begin(115200); dht.begin(); } void loop() { Serial.println("Wait 5."); delay(5000); if (!connectWiFi()) { Serial.println("No WiFi"); return; } Serial.println("WiFi OK"); float temperature; float humidity; if (!sensorValues(temperature, humidity)) { Serial.println("No sensor values"); return; } String json = toJSON(temperature, humidity); int httpCode = postValues(json); if (httpCode == 201) { Serial.print("POSTED: "); Serial.println(json); delay(55000); } else { Serial.print("Fail. HTTP "); Serial.println(httpCode); } } int postValues(String json) { HTTPClient http; //Declare object of class HTTPClient http.begin(restURL); //Specify request destination http.addHeader("Content-Type", "application/json"); //Specify content-type header http.addHeader("Accept", "application/json"); int httpCode = http.POST(json); //Send the request String payload = http.getString(); //Get the response payload return httpCode; // Serial.print("HTTP Response: "); //Print HTTP return code // Serial.print(httpCode); // Serial.println(payload); //Print request response payload } String toJSON(float temperature, float humidity) { String temp = String(temperature); String humi = String(humidity); return String("{\"temperature\": ") + temp + ", \"humidity\": " + humi + "}"; } bool sensorValues(float &temp, float &humid) { sensors_event_t event; dht.temperature().getEvent(&event); if (isnan(event.temperature)) { return false; } else { temp = event.temperature; } dht.humidity().getEvent(&event); if (isnan(event.relative_humidity)) { return false; } else { humid = event.relative_humidity; } return true; } void connectSensor() { Serial.println("Starting sensor"); } bool connectWiFi() { if (WiFi.status() == WL_CONNECTED) return true; int secondsWaited = 0; Serial.print("Connecting to "); Serial.println(ssid); delay(1000); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { if (secondsWaited > maxWiFiConnectionWait) { Serial.println("FAILED"); return false; } secondsWaited++; delay(1000); Serial.print("."); } Serial.println(); Serial.print("Connected: "); Serial.println(WiFi.localIP()); return true; } Code Walkthrough My aim with this code is to make the system resilient to losing the WiFi network as well as the web server. Top Level Code The four #include directives are required to access libraries to operate the HUZZAH and the RHT03 sensor. (Yes, I'd rather write my own version of these!) The #define lines are required to set up the sensor. The const char* lines provide strings for configuration of the WiFi network and the URL for the REST server. Here you will need to use the IP address of the system where you're running Ruby on Rails. If you're running a Linux VM as I recommended you can do an ifconfig at the command line to find the IP address. Windows folks will think I meant "ipconfig", but on Linux it really is ifconfig. Network interfaces are interfaces on Linux, so commands like ifup, ifdown and ifconfig are used. I've then got a few function signatures because the functions themselves are implemented below where they're called in loop(). setup() To my mind, void setup() {} must only contain code that will definitely never need to be called again. I'm not actually sure about DHT.begin(). How often might that sensor type lock up? I don't know. For now I'm assuming both Serial and dht are rock solid and will never fail. The reason I don't just throw these somewhere in void loop() {} is that they might cause a memory leak if they're called repeatedly. loop() We don't want this loop to get called at a high rate if both connectWiFi() and sensorValues() fall through, so the delay(5000) puts a limit on that. connectWiFi() will return true if either the WiFi is already connected or connecting to the WiFi network was successful. Likewise sensorValues(temperature, humidity) will return true if both values were successfully read from the sensor. When both are successful we have a go at posting the data to the server in a HTTP POST request carrying JSON text. If we get anything other than a HTTP 201 response, we've failed to post the data.If we've posted data successfully we wait 55,000ms so the entire loop() delay is 60 seconds. Of course there are delays in connecting to WiFi when required as well as flight-time for the network packets to/from the web server, so the time between samples is actually "no less than 60 seconds". Actually measuring these values so rapidly is next to useless when measuring ambient conditions so delaying 10 minutes would be better. connectWiFi() This code is almost a straight steal from the HUZZAH sample code except that I've limited the wait time so I don't just get an unlimited number of decimals printed across the serial monitor. connectSensor() This is not currently called. But if it turns out the RHT03 flakes out from time to time I'll implement it. sensorValues() This code is from the DHT11 example code. It's implemented as a function because that's a logical chunk of work that can be called to return three values. toJSON() Again a logical bit of work to make a String from two float values. postValues() All we care about here is taking the JSON text and returning the HTTP response code from the server. We need to correctly configure the http request with the Content-Type and Accept headers so this works. Results When I look at the Serial monitor in Arduino, I see this: Wait 5.So as you can see the conditions in my office right now are just dandy. Back on the Rails server, this is spitting out each time the Arduino has a conversation with the server. Awesome. Looks good. WiFi OK POSTED: {"temperature": 23.30, "humidity": 60.30} Wait 5. WiFi OK POSTED: {"temperature": 23.30, "humidity": 60.30} Started POST "/measures" for 192.168.1.24 at 2017-03-09 10:16:20 +0000 Processing by MeasuresController#create as JSON Parameters: {"temperature"=>23.3, "humidity"=>60.4, "measure"=>{"temperature"=>23.3, "humidity"=>60.4}} (17.0ms) begin transaction SQL (15.8ms) INSERT INTO "measures" ("created_at", "humidity", "temperature", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2017-03-09 10:16:21.074032"], ["humidity", 60.4], ["temperature", 23.3], ["updated_at", "2017-03-09 10:16:21.074032"]] (61.6ms) commit transaction Rendered measures/show.json.jbuilder (20.5ms) Completed 201 Created in 382ms (Views: 173.1ms | ActiveRecord: 94.5ms) So now we can look at the data being posted at on the Rails server. Tada! As you can imagine, this page gets bigger and bigger as the data set increases. But it's simple to give Rails a command to limit the data size. Although this doesn't work out of the box, you can imagine a GET request something like this could be coded at the server to get the latest 100 samples. But I'll save that kind of thing for the next post where I'll go into more Ruby code to get Rails to do more of what we want.That is all. Dataset FilesNo Data files have been uploaded. Documentation Thank you for rating this dataset! Please share additional details of your rating with the IEEE DataPort community by adding a comment. doi = {10.21227/xy50-ap43}, url = {}, author = {dr.nisha rehane mithal }, publisher = {IEEE Dataport}, title = {Example Ruby on Rails Arduino Project}, year = {2018} } T1 - Example Ruby on Rails Arduino Project AU - dr.nisha rehane mithal PY - 2018 PB - IEEE Dataport UR - 10.21227/xy50-ap43 ER -
https://ieee-dataport.org/documents/example-ruby-rails-arduino-project
CC-MAIN-2020-29
refinedweb
1,906
58.48
Details - Type: New Feature - Status: Open - Priority: Major - Resolution: Unresolved - Affects Version/s: None - Fix Version/s: None - Component/s: None - Labels:None Description Tracking JIRA for namespace partitioning in ZK From the mailing list (- courtesy: Mahadev / Flavio ) , discussion during Jan 2010 - "Hi, Mahadev said it all, we have been thinking about it for a while, but >> haven't had time to work on it. I also don't think we have a jira open for >> it; at least I couldn't find one. But, we did put together some comments: >> >> >> >> One of the main issues we have observed there is that partitioning will >> force us to change our consistency guarantees, which is far from ideal. >> However, some users seem to be ok with it, but I'm not sure we have >> agreement. >> >> In any case, please feel free to contribute or simply express your >> interests so that we can take them into account. >> >> Thanks, >> -Flavio >> >> >> On Jan 15, 2010, at 12:49 AM, Mahadev Konar wrote: >> > >>> Hi kay, > >>> the namespace partitioning in zookeeper has been on a back burner for a > >>> long time. There isnt any jira open on it. There had been some > >>> discussions > >>> on this but no real work. Flavio/Ben have had this on there minds for a > >>> while but no real work/proposal is out yet. > >>> > >>> May I know is this something you are looking for in production? > >>> > >>> Thanks > >>> mahadev " Activity - All - Work Log - History - Activity - Transitions Hi Kay, I am looking forward to do a prototype on this. I would be very much interested to know the practical uses cases for Partitioned Zookeeper which you have in mind. As per my understanding, the very high level problem it tries to solve is write throughput scalability. i.e. When we add more Zookeeper nodes, we should be able to get more "write throughput". From "" "By having distinct ensembles handling different portions of the state, we end up relaxing the ordering guarantees" How different it is from directly running separate ensembles ? One can as well run different Zookeeper cluster to achieve this right? Whether the solution also address running multiple name spaces in , say an existing 3 Node Zookeeper cluster. I can think of something like this - Currently Write operations from all clients are processed sequentially by the Leader Zookeeper. The suggestion is to provide a provision for parallel writes for unrelated data in the same ensemble. For eg: In a cluster setup, the same ZK ensebmle may be used by Hbase for its metadata and other components for cluster confuration management. We don’t need to queue these operations and perform them sequentially. They can go parallel. But still all HBase operations may still need to be sequential to keep order of operations. Here () I found another idea of Hash based partitioning for Zookeeper. "The solution we suggest is simply to run more than one ZooKeeper cluster for the purposes of locking and transactions, and simply to hash locks and transactions onto particular clusters". Here they want to address about the locks. I am thinking of performing a hash on the "root nodes" itself (or introduce partition name) and perform operations paralelly in ZK Server(In most of the scenarios, znodes "/conf" and "/leaders" may be unrelated). Its more of running multiple partitions in the same ensemble. Effectively make writes paralell in Leader ZK in an ensemble. Still need to think more on transaction logs and snapshotting aspects and how this will be affected. I would be glad to hear from you guys. - Hari Hi Hari, Here's another proposal on how to address this issue. The idea is to preserve current ZK semantics as much as possible, unlike in the proposal above where no ordering guarantees are made between partitions. We also suggest a more intuitive interface to this, where you can "mount" some part of a remote ZK namespace. Alex i think there are some rather fundamental problems with the MountRemoteZooKeeper proposal: to maintain semantics you have to dig into the core functionality, remote failures cause pipeline stalls, and we have found that in practice when you do such partitioning you don't need ordering guarantees across partitions. if you do give up on ordering across partitions, you avoid introducing further complications in the pipeline and you also get nice scalability of the writes. > to maintain semantics you have to dig into the core functionality Not really - every leader is in charge of local operations as usual, and an observer is in charge of remote operations. Obviously both proposals require some changes, but I actually think this one requires less changes, and can perhaps reuse development done for ZOOKEEPER-892. > remote failures causes pipeline stalls Only if you provide the prefix-failure property, and then a failure of a remote op would only stall operations of the client who requested this property (since remote ops don't go through normal local pipeline they don't stall it). But if you don't need ordering across partitions than you probably also don't need this property... > and we have found that in practice when you do such partitioning you don't need ordering guarantees across partitions. this probably depends on the application, but if you don't need ordering among partitions I would just run multiple ZK instances. Hi, Running multiple ZK instances works. But it comes with more complexity in process management. Some cons i can think of are 1. Different clients need to be configured with different Zookeeper ensemble 2. To achieve HA, each application would need at least 3 Zookeepers running. Even we run multiple Zookeepers in the same machine, number of ZK instances will be considerably higher resulting in managing more number of processes. This is inevitable even if we run multiple ensembles as part of the same ZK Cluster. - Hari @Alexander - is there a separate Jira for the MountRemoteZookeeper? This is exactly what we need for our scenario. We aren't worried about the update throughput at the moment. Our case is that we have quite a few ensembles that are created based on availability/throughput needs of different pieces of data. For example, data that needs to survive a region failure is stored in a global ensemble, but data that doesn't is stored in a regional ensemble. For a client, it shouldn't have to make connections to multiple ensembles to get the data that they are interested in. So a client connects to a nearby ensemble, which has mounted the data tree (ideally a subset) of other ensembles. This would definitely be a useful feature. However, we have a little bit different motivation for the namespace partitioning. We've been using Zookeeper for our research LBS and now doing some experiments with maintaining a consistent tree across multiple datacenters (in the US, Europe and Asia). Thus, we want to reduce the latency by eliminating unnecessary roundtrips between, for example, EU and US-based servers if possible. E.g., we can pre-assign particulars branches of the tree (I believe, called "containers" in the wiki page) to different ensembles with transparent rerouting when needed. So if the server in EU needs to access a namespace located in the US it should be forwarded to a different zk-ensemble, but hopefully most of the time these servers would coordinate with "local" ensemble(s) only. I was thinking about a simpler solution, e.g., just keeping distinct ensembles for different geographical zones and reroute those calls that have a different "namespace owner". But then I found a wiki page with the description of PartitionedZookeeper and figured it might be a right approach. Please let me know if it goes long the same motivation you have in mind for PartitionedZookeeper. Do you have something in code for namespace partitioning? I'd be happy to contribute.
https://issues.apache.org/jira/browse/ZOOKEEPER-646?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel
CC-MAIN-2015-22
refinedweb
1,305
60.95
Open in app Inside SumUp The voices and technology behind our mission to empower small businesses. Culture Design Engineering & Product SumUp Brazil SumUp Latam Jobs Latest Women in engineering at SumUp: What inspired you to become an engineer? Women in engineering at SumUp: What inspired you to become an engineer? According to McKinsey, women are still under-represented in their professions — only 34% of women hold entry-level engineering and product… Dani Brunetti Jun 23 Revisão de código empática — Para pessoas revisoras Revisão de código empática — Para pessoas revisoras Esse artigo é a continuação da parte para pessoas autoras, e é altamente baseado no Code Review Guidelines for Humans, do Philipp Hauer. Rodolpho Atoji Jun 20 Incident management at SumUp Incident management at SumUp This article provides a technical explanation of a recent production issue and the steps we took to remedy the situation. Our goal here is… Aleksandar Irikov Jun 14 Por que fazer pesquisa de usuário? Por que fazer pesquisa de usuário? Um artigo sobre a importância da pesquisa de usuário e o impacto de trazer a voz deles às decisões. Ludmilla Boga Jun 8 Engineering & Product Learn more about tech at SumUp Containers from Scratch — Part 2 Containers from Scratch — Part 2 It's time to take a step further and beyond namespaces. But, first, we need to finish our container's process isolation and then isolate… Vitor Falcao Jun 3 How does it “feel” to work in the Hardware Tribe? How does it “feel” to work in the Hardware Tribe? I must say, I am biased towards the Hardware Tribe and, as Head of People, one of my main goals is to attract and retain the best talent… Kamel Abu-Eisheh May 31 Containers from Scratch — Part 1 Containers from Scratch — Part 1 There is no better way to learn something than by building it. Let's understand and build a container from scratch. Vitor Falcao May 30 Revisão de código empática — Para pessoas autoras Revisão de código empática — Para pessoas autoras Revisão de código faz parte do dia-a-dia de qualquer time de desenvolvimento: os famigerados PRs/MRs (pull/merge requests). Rodolpho Atoji May 24 Be empowered to do more that matters. Explore our open positions Company Culture The better half! The better half! Today we celebrate Julia, Gergana, Caja, Patrycja, Kaisa, Shania, Fen, Nicole, Nivetha, Jelena, Sarah, Natalia and many other great women… Kamel Abu-Eisheh Mar 7 How we hire: Interviewing for a role at SumUp How we hire: Interviewing for a role at SumUp We often get asked by candidates about our hiring process. We understand that when someone asks questions about how we hire, they are… Aparna Ballakur Jan 19 Creating our own path to team well-being Creating our own path to team well-being Earlier in the year, we saw a strong trend where various companies offered an extra week off to their employees during summer in the… Aparna Ballakur Nov 24, 2021 Wrapping up 2020 with the gift of supporting small businesses Wrapping up 2020 with the gift of supporting small businesses SumUp partnered with its merchants to give all SumUppers a unique end-of-year gift. We sat with the project organisers and the merchants… Gina Beach Jan 12, 2021 About Inside SumUp Latest Stories Archive About Medium Terms Privacy
https://medium.com/inside-sumup?source=post_page-----60e92cf1b3e6--------------------------------
CC-MAIN-2022-27
refinedweb
554
52.53
The. Just in case it's not clear to readers, the "version 7.1" mentioned in the first sentence refers to the version of the FileSystems API included in NetBeans 6.1. There is not yet a version 7.1 of the NetBeans IDE or Platform. Ah! Good point Tom, thanks!. Demetrios, right-click your application, choose "Build JNLP Application" or "Run JNLP Application". Gj, I think it has huge scope! Login application is good to start with, however there could be many more things that can be achieved with this! For instance, Features-on-Demand, I think this could make good use of the above functionality, you stated. Correct me, if I'm wrong! Thanks! You're 100% right, Varun. This is exactly the functionality on which Feature on demand is based. Awesome, looking forward to it! Thanks for explanation! can I also do this not durring the startup of the module? if so, how can i refresh the table? Hi, I try it and I could make a new menu injecting a new layer. Now I want to hide a menu item or menu folder declared by other module wich was loaded before. I try to put into the layer the menu item name plus "_hidden" but I fail. layer.xml in one module declares <folder name="Menu"> <folder name="MyMenuFolder"/> </folder> custom layer injected after declares <folder name="Menu> <folder name="MyMenuFolder_hidden"/> </folder> wat's wrong in my logic? I hide system menu folders like File and Edit by this mechanism (concatenate "_hidden") but can't hide folders declared by other modules Hi Geertjan, I want to develop what you are explaining here, and the source code is clear but I have a compilation problem. I add the library required org.openide.filesystems and all classes are recognized by netbeans when writing my code source and I can click on Ctrl+mouse to go declaration methods of this API jar, but when I build my app, I get the message that the package does not exist for all import from filesystems API... I had never had something like that, is there any other jar that I sould include? C:\SW-TMTC\TMTC\MAIN\src\com\casaespacio\LoginFileSystem.java:8: package org.openide.filesystems does not exist import org.openide.filesystems.FileSystem; For giving more details, I am using netbeans 7.3.1 and including the jar library contained in netbeans. I have checked with netbeans 8.0 and the same. I have checked in Windows 7 and Windows XP and always the same Thanks in advance The problem is clear, isn't it? You need a dependency on the File System API, i.e., org.openide.filesystems. Also, if at all possible, stop using 7.3.1 and use the latest version of the NetBeans Platform, 8.0.1. ok, I'll use 8.0.1 I have added the dependency correctly File System API to my module, that's why it is very strange because netbeans detects and know that the dependcy is ok because if I remove the dependcy then the red underline appears and when I readd the jar it dissapears. But the problem only appears in compilation time and I have tried all things in my mind but without chance... please, help Not sure how I'm supposed to help? Are you sure the class you're referring is a public API? Anyway, if you remain stuck, do the following (1) remove the 'build' folder, (2) zip up the module, (3) and send it to me at geertjan dot wielenga at oracle dot com and I will look at it. But if your zip contains your 'build' folder, I will immediately delete your e-mail because that will mean the zip is very large and will break my inbox.
https://blogs.oracle.com/geertjan/injecting-a-layer-file-into-a-netbeans-platform-application
CC-MAIN-2021-10
refinedweb
636
73.98
Sometimes I post sourcecode accompanying my posts which are long and makes the length of the post unnecessarily long. The wordpress.com sourcecode shortcode has an option collapse which you can make “true” to collapse the sourcecode box when the page loads. If you post a long code, when the code box is expanded it will be inconvenient to scroll through the page and read. Also sometimes you might not want to collapse the codebox when the page loads. For this I have a solution. Add vertical bars to the codebox using the div tags. In this way the length of the code portion in the page remains fixed and to read the code one requires just to scroll in the code box. Checkout what I am talking about in some of the code posts, for example in the posts here and here. Here is how it is done. First open a div tag, and inside the div tag place your sourcecode block. Set the max-height css property of div tag to a pixel value to which you want to limit the height of the div block. Also set the css overflow property to auto or scroll to add the scrollbar. The overflow:auto; will add vertical scrollbar if the overflowed contented is clipped. The overflow:scroll; will add vertical scrollbar will be added. Using the max-height instead of the height attribute of div will let the length of the box grow to a maximum height of the specified pixel, and if the code length is shorter the box length will be as long as the code is. (Using height will make a fixed height box even if the code is shorter than the box length). <div style="overflow:auto;max-height:800px;"> [ sourcecode language="cpp"] Your source code goes here. [ /sourcecode] </div> (Note: the blankspace between “[” and “sourcecode” and “/” in the above block is given, so that wordpress does not parse it as a shortcode.) A mini example is shown below with a sample piece of code with 100px max height. #include <stdio.h> int main (int argc, char *argv[]) { printf ("Hello World!\n"); return 0; } Generally I use 600px, 800px and 1000px to as the height of the div blocks. Also, instead of the sourcecode shortcode, one can use to limit a length of the content inside the pre tag or even in a paragraph. I hope this will be useful for some of those who want to post long code but still keep the page length short. Some references: One thought on “Add vertical scrollbar in wordpress.com sourcecode blocks” Thanks a ton for the help Phoxis.
https://phoxis.org/2013/05/21/add-vertical-scrollbar-in-wordpress-sourcecode-blocks/
CC-MAIN-2019-18
refinedweb
442
79.5
Well, here we are again, already for part #9 of our series on using Silverlight in an Enterprise application. Last time we looked at some of the tricky bits on using Entity Framework in our application. This time we want to look at a particular databinding technique, that we tend to use a lot on forms in our application. We want to look at lookup data and using classes in lookup data. What I mean is using a combobox to select some object from a list that describes part of our own data. Below is an image of what I'm trying to do here: As you can see we have a datagrid with computers. Whenever I select a record from the grid, this record is displayed in the form. But the casing combobox will not show me what item is selected, although I did databind to the SelectedItem property and they are the same type. The problem is that they are not the same instance. Now if I would replace the Casing type with string and fill the combobox with a list of strings, all would work fine. This actually gives away a simple but important fact about how matching is done to select the item in the combobox. It uses some sort of comparison. So let's implement the most obvious form of comparison to make sure that equal casings actually say that they are equal, by overriding the Equals method. public class Casing { public string Name { get; set; } public override bool Equals(object obj) { Casing casing = obj as Casing; if (casing != null) { return casing.Name.Equals(Name, StringComparison.OrdinalIgnoreCase); } return false; } public override int GetHashCode() { return Name.GetHashCode(); } } As you can see I've also overridden GetHashCode. As Visual Studio will indicate, it's best practice to always override both of the methods at the same time, so sorting follows the same logic as the Equals method. As we use the Name property to evaluate if two casings are the same, it's only logical to also use the Name properties hashcode. Now if you look at the application, it looks like this: Mission successful. Conclusion: if you want to be able to use lookups, always override the Equals method on your business objects. I hope this article was helpful for you and I look forward to reading your comments and answering any questions. This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
https://www.codeproject.com/Articles/39089/Adventures-while-building-a-Silverlight-Enterprise
CC-MAIN-2017-26
refinedweb
416
70.53
I’ve spent most of the last 18 months working on large features at my day job. For my purposes, a “large feature” will have most of the following characteristics: Needs more than one developer, if the goal is to ship the feature in a reasonable timeframe (a month, a quarter, etc.). Immediately becomes a core aspect of the product offering, from a business perspective. Immediately becomes a core aspect of the application, from a developer perspective. An example of this would be doing a major version upgrade of Rails. Another is switching to a new background processing library. Involves changes to core aspects of the application's data model. Involves changes to core aspects of the application's business logic. A bug here would have negative business impact on customers. If extending an existing feature, then making significant UI changes. This involves bringing in a UI/UX-focused team member. Lots of new code, either reworking existing classes or introducing new ones. LOC is not a great measurement of the impact of a feature. Indeed, it's possible to leverage a small code change into a big win. But most large features that need more than one developer are also going to add a lot of new code. Here are some things I’ve learned that have helped the teams I’ve been on to stay organized and ship large projects. The worst thing to do when working on a large project is to start coding immediately. Resist the urge to spike. Instead, spend time planning what you will work on. This will always involve a bit of guesswork. Many times, you will be working with incomplete requirements. You won’t have all the resources you need. And, of course, things change once people start using the actual feature. What you’re trying to do is articulate what you do know, and how you’ll go about executing on it. I recommend using a tool like Trello to make cards for each distinct task. Even if you are not sure of all that the task entails, write it down. Doing this accomplishes two things. One, it frees you from having to keep the entire feature in your head. Since you are working with other developers, this is a good thing. Second, it teases out the things you don’t know about the feature. You can then bring those questions to the right people. I create a “Questions” list in Trello for these issues, and ping the people who can help resolve them. In the meantime, I can work on what I do know. As people a lot smarter than I have argued, long-running feature branches can be painful. But sometimes you can’t avoid them. What I look for in the up-front planning phase are opportunities to get code into master as soon as possible. This way, if we do need a long-running feature branch, it will be as small and easy to review as possible. With enough planning, database migrations are good candidates for early merging. Code refactoring that makes a path for new behavior is also a good candidate. For a recent feature, we shipped a refactoring of core business logic to production a month before the rest of the feature. In this way, we proved that the changes introduced in the new feature would be “backwards compatible”. It gave the rest of the team a comfort level with the new feature that they would have otherwise not have had. Other candidates are UI changes that are behind a feature flag, and new API endpoints that are not public yet. An added benefit of going to master as soon as possible with smaller code changes is that team members not working on the feature need less context to review pull requests. Huge pull requests are hard to review, and often become a matter of “if it works, ship it!”. Smaller PRs are easier to review. Teammates don’t need to know the entire scope of the feature to review the change. The faster you can get into master and deployed to production, the faster non-dev feature stakeholders can start using the feature. Again, I am standing on the shoulders of giants when I say this: the faster you can get to the point where you’re getting real user feedback, the better. My own experience has borne this out. What I have found is that the more I try to ship things earlier, the better I get at identifying what to ship earlier. There doesn’t seem to be a hard and fast rule here. You’re going to need to experiment. I imagine much of your success in this area will depend on team culture and operational setup. If you are going to use a feature branch, treat it like master: keep it green all the time. Pull requests into the feature branch should be green themselves. If the feature branch’s tests are failing after a merge, stop what you’re doing and fix them. It’s a nightmare to fix failing specs on a branch that has had a lot of churn. It feels like trying to hit a moving target. The sooner you fix failing tests, the better. In chapter 12 of the 1950 edition of The Armed Forces Officer, entitled “Group Nature”, S.L.A. Marshall offers the following: Progress comes of making the most of strengths rather than looking for ways to repair weaknesses. This is true in things both large and small. Marshall was speaking in a military context. The stakes there are much higher than shipping software. But the thought is an intriguing one. I’ve come to understand that quote to mean this: when it comes time for battle, double down on your strengths. The time for self improvement, as an individual or as a group, is not on the battleground. You will learn on the battleground, but that’s not your main purpose. Applying that idea to teams doing software development requires a delicate balance. Developers always want to work with new things and learn. But when working on large features that have business-impacting scope, the idea seems to be that developers should work on tasks that cater to their strengths. This is not to say that developers shouldn’t have opportunity to work with new tech. Say you have two developers on a project. They both know Rails well. One knows React well, and enjoys front-end work. One has less React knowledge, and enjoys back-end and API work. They should work on what they are best at and enjoy the most. It doesn’t mean the developer who is front-end focused on this feature can’t work on the back-end, and vice versa. There will be plenty of smaller tasks that are perfect to learn on. But I would argue the bulk of the work each developer does should be in the area they are strongest in. Not all, but most. In this way, morale will stay high, since both developers are doing what they enjoy. Additionally, output stays high, since both are doing what they are comfortable with. This isn’t a hard and fast rule. Sometimes both developers are good in the same area, and weak in the same area. The work will then be more evenly distributed. Team dynamics will always be at play here. In an environment with a lot of pairing, there will be more cross-pollination of learning. But even without pairing, learning can happen via pull request review as well. The general idea is to play to your team’s strengths. Process for process sake is a waste of time. Process that gets in the way of shipping code is useless too. But process also gives structure to your work. The constraints of process provide the freedom within which one can stay focused on the task at hand. We work hard to keep our Trello board up-to-date. If you are working on a card, assign it to yourself and move it to the “Doing” column. Move it to “Done” after merging the pull request. If there’s a discussion going on in Slack which results in a new task, put it in Trello. Keep checklists. Doing these things allow us to actually focus on writing code. I don’t need to worry about remembering that thing we were talking about on standup because I created a card for it. I don’t need to remember what I am working on next. There are cards already assigned to me, or I can grab the next one from the “To Do” list. If a manager asks me about the status of the project, a glance at Trello will give them all the information they need. The actual tool you use to organize is not as important as the fact of staying organized. I cannot stress enough how important it is to have an up-to-date task list that is accessible by any team member. I’ve never regretted taking the time to create and maintain such a list. I am still learning about this part of the craft of software development. There’s still more to learn. But in the meantime, these are some of the things that have helped the teams I’ve been on ship features.]]> Last spring, development started up again on a side business that I'm involved in. I'd hardly touched the two apps that run the business in over 3 years, and they needed some love. Back in May I discussed wrestling with the question of whether to Refactor or Rewrite these apps. I decided to refactor, and I don't regret the decision. What follows is one small refactoring that I did. TalentSoup is a marketplace. It connects professional and amateur actors, actresses, and models with producers and photographers. Talent sign up, upload photos, and fill out a basic profile. They are then matched with open projects in their area that they are a fit for. Each talent sees a Talent Dashboard when they first log in. The Dashboard has two main components. The first is a listing of all open projects across TalentSoup. The second, a listing of projects for which they are under consideration to be cast. The data driving these two components comes from a separate, internal project management app we've written. This app exposes a REST-ful API that TalentSoup calls to get the data it needs to display the Dashboard. If it's the user's first time seeing the Dashboard, we want to display a "welcome message" which has tips on how to get the most out of their TalentSoup account. There are two cases which are a "first-time view" of the Dashboard. The first is a new user signing up and being immediately redirected to the Dashboard. The second case is an existing user who is viewing the Dashboard for the first time after we had made significant UI changes to the old Dashboard. We want them to see the "welcome message" too, since the changes were so radical. On subsequent visits, they'll all see the real dashboard. To keep track of whether a user had viewed the "welcome message", I added a boolean column, wc_view, (default false) to the users table ( wc stands for "Webcomp", which is what we call Talent portfolios). When the welcome message has been viewed, wc_view becomes true. Looking back, this column is unhelpfully named. Something like welcome_message_viewed would have been clearer. Before the refactor, the controller action driving the Dashboard code looked liked this (URLs are not real, obviously): class TalentController < ApplicationController def dashboard if current_talent.wc_view begin @open_projects = HTTParty.get( "", body: "", output: 'json' ) @availability_requests = HTTParty.get( "{current_talent.id}", body: "", output: 'json' ) rescue @availability_requests = [] @open_projects = [] end else current_talent.wc_view = true current_talent.save render template: "talent/welcome" end end end I cringe looking at this, but it's how I wrote code 4-5 years ago. You have to start somewhere. If I were reviewing this code in a pull request today, I would make the following comments: The dashboard action is not a REST-ful route, according to Rails idioms. It should extracted to it's own controller . The controller is updating current_talent (an ActiveRecord object) directly. This means it has to know which columns mean what. The knowledge about how the application should determine whether or not a Talent has viewed the "welcome message" should be pushed down to the Talent class itself (or some other class?), but shouldn't live in the controller. The knowledge about how to mark a talent as having viewing the "welcome message" should also live in the Talent class itself (or another class), but not in the controller. The two HTTParty calls to the external Commissary service means the controller knows everything about where the endpoints are, and what to do in case of an error. This isn't the worst approach, but could be improved by moving these calls to a separate class. Doing so would also give us the benefit of being able to use those classes in other places. Generally speaking, this code violates a number of rules that I (now) try to abide by: Violates Rails idioms. Spreads too much knowledge about implementation details. Misses the opportunity to extract interesting functionality (calls to the external Commissary service) into small classes that can be reused. Is ugly to look at. The first thing I did was move all the "has Talent viewed their welcome message before?" logic out of the controller. I can get around how badly the wc_view column is named by wrapping it in an intention-revealing method. # app/models/talent.rb class Talent < ActiveRecord::Base def first_webcomp_view? !wc_view end def first_webcomp_viewed update_column(:wc_view, true) end end # test/models/talent_test.rb class TalentTest < ActiveSupport::TestCase def setup @talent = talents(:luke_skywalker) end test "#first_webcomp_view? is true when wc_view is true" do @talent.update_column(:wc_view, true) assert @talent.wc_view refute @talent.first_webcomp_view? end test "#first_webcomp_view? is true when wc_view is false" do @talent.update_column(:wc_view, false) refute @talent.wc_view assert @talent.first_webcomp_view? end test "#first_webcomp_viewed sets wc_view to true" do @talent.update_column(:wc_view, false) @talent.first_webcomp_viewed! assert @talent.wc_view refute @talent.first_webcomp_view? end end Now I am able to clean the controller up, and rework the logic with my new methods. The controller will be a bit easier to read, and the implementation details have been effectively hid: class TalentController < ApplicationController def dashboard if current_talent.first_webcomp_view? current_talent.first_webcomp_viewed render template: "talent/welcome" else begin @open_projects = HTTParty.get( "", body: "", output: 'json' ) @availability_requests = HTTParty.get( "{current_talent.id}", body: "", output: 'json' ) rescue @availability_requests = [] @open_projects = [] end end end end Now, the details about what columns Talent has, and what they mean, are pushed down into the Talent class itself. If those columns change, or if what it means to have made the initial view of your Dashboard changes, we can change the underlying implementation and are less likely to need to touch the controller. Next, I re-worked the two calls to the external Commissary service. I'm going to detail the "open projects" path, since it's shorter. # app/services/commissary.rb module Commissary ENDPOINT = "" def self.endpoint_for(action) "#{ENDPOINT}#{action}" end end # app/services/commissary/open_projects.rb module Commissary class OpenProjects attr_accessor :http_client def self.fetch self.new.fetch end def initialize @http_client = HTTParty end def fetch http_client.get( Commissary.endpoint_for("open-projects"), body: '', output: 'json' ).map { |project| OpenStruct.new(project) } rescue [] end end end This is a simple class, but there's more going on that might initially appear. The first is that there's an attr_accessor for an http_client. You can't initialize the class with a custom http_client (the "default" is HTTParty), but you can set one after initialization. I can't take credit for this pattern; I learned it (and many other things!) from Brandon Hilkert. The motiviation for using this pattern will become apparent in the test below. I also convert the response into an array of OpenStruct objects. This is purely for the convenience of using dot notation in my views. One of the advantages of this approach is that it makes the Commissary::OpenProjects class easier to test. There are of course many ways to stub/mock out an HTTP request, but using this method, we don't need any external libraries! We can do it all in plain Ruby: require 'test_helper' class Commissary::OpenProjectsTest < ActiveSupport::TestCase test "#fetch with a good response" do client = Commissary::OpenProjects.new client.http_client = FakeHTTParty open_projects = client.fetch assert_equal 1, open_projects.count project = open_projects.first assert_equal "987654321", project.id assert_equal "An amazing project", project.name # other assertions omitted for brevity end test "#fetch when an exception occurs" do client = Commissary::OpenProjects.new client.http_client = FakeHTTPartyWithException open_projects = client.fetch assert_equal [], open_projects end class FakeHTTParty def self.get(*args) [ { id: "987654321", name: "An amazing project", } ] end end class FakeHTTPartyWithException def self.get(*args) raise "Oops!" end end end We've "mocked" an HTTP request to an external service without using a gem like VCR or Webmock. The disadvantage to this approach is that, if the response from the Commissary service changes, I can't just blow away my cassettes, as I could if I were using VCR, regenerate them, and fix my tests. I'll have to fix my fake client(s) also. However, weighed against the overhead of adding another gem to my app, it's a tradeoff I am willing to make. Additionally, in writing a simple mock HTTP client like this, you become familiar with the shape of the response coming back from the external service in a way you don't when using VCR, for example. That's been my experience, having used VCR extensively. The other interesting thing in Commissary::OpenProjects is the fetch class method, which is just: def self.fetch self.new.fetch end This is a pattern I learned from Michael Klett. It can be more work than it's worth sometimes, but in this case, since the constructor for Commissary::OpenProjects takes no args, having this class method saves us from doing Commissary::OpenProjects.new.fetch, which I find aesthetically objectionable! Our refactored controller action now looks like: class TalentController < ApplicationController def dashboard if current_talent.first_webcomp_view? current_talent.first_webcomp_viewed render template: "talent/welcome" else @open_projects = Commissary::OpenProjects.fetch # refactoring not shown for this @availability_requests = Commissary::AvailabilityRequests.fetch( talent_id: current_talent.id ) end end end The final step was to move this action (part of a larger controller with many other non-RESTful routes) into it's own controller: # config/routes.rb resource :talent_dashboard, only: [:show] # app/controllers/talent_dashboards_controller.rb class TalentDashboardsController < ApplicationController def show if current_talent.first_webcomp_view? current_talent.first_webcomp_viewed render template: "talent/welcome" else @open_projects = Commissary::OpenProjects.fetch @availability_requests = Commissary::AvailabilityRequests.fetch(talent_id: current_talent.id) end end end The motivation here is to adhere to Rails idioms. Additionally, smaller controllers are easier to read, and therefore easier to get context about. I don't mind an app with a lot of small controllers that do one or two things well. This code could be improved even further by extracting the methods on the Talent class into a plain Ruby object (a "service" object, in the parlance of our times). I decided against this because the Talent class, although it represents the main user of the app, is not a god object. If, in the future, it feels like Talent is growing out of control, I could see the value in such an extraction. ImmutableJS is a neat library, especially when used in combination with Redux. I’m not ashamed to admit, though, that I found the docs confusing at first. For example, look at the method signature for Map#updateIn(): updateIn() is a useful function to use when you’re interacting with Redux. I had to understand it. In the end, what helped me become productive with updateIn() was understanding the keyPath parameter. The key (sorry) to understanding keyPath is to realize it’s just an array of values that Immutable will call get with as it works it’s way through whatever data structure you’re calling updateIn() on. It doesn’t matter if the value is a Map key or a List index. This works because both Map#get and List#get inherit from Iterable#get (). Consider the following data structure, which is a Map of endpoints, keyed on their id. The values are a List of Maps that represent that endpoint’s “subscriptions” to a given event ( enabled: true|false): const endpoints = fromJS({ "abc-123": [ { id: 111, endpoint_id: "abc-123", event_key: "signup_success", enabled: true, }, { id: 222, endpoint_id: "abc-123", event_key: "signup_failure", enabled: false, }, ], "def-456": [ { id: 333, endpoint_id: "def-456", event_key: "signup_success", enabled: false, }, { id: 444, endpoint_id: "def-456", event_key: "signup_failure", enabled: true, }, ], }); To get all the subscriptions for a given endpoint, we use Map#get as follows: subscriptions = endpoints.get("abc-123"); keyPath = ["abc-123"] Since subscriptions is now a List, we can get the first element using List#get, passing it the index of the element we want to access: subscription = subscriptions.get(0); keyPath = [0] We could do this in one shot: subscription = endpoints.get("abc-123").get(0); keyPath = ["abc-123", 0] What’s neat is that we can construct a keyPath down to an attribute of an element. Say we wanted to get the enabled attribute of the above endpoint: enabled = endpoints.get("abc-123").get(0).get('enabled'); keyPath = ["abc-123", 0, "enabled"] Now that we know how to construct a keyPath to any point in a deeply nested data structure, we can move to understanding the updater parameter of updateIn. The simplest way to understand updater is that it’s a function that will be passed as it’s parameter the result of calling get on the final element in the keyPath array. It should return the new value for that…value. It’s easier to show in code. Let’s say I wanted to flip the enabled flag for the subscription represented by element 0 for endpoint abc-123: endpoints.updateIn(["abc-123", 0, 'enabled'], isEnabled => !isEnabled); In the above example, I constructed the keyPath right down to the enabled flag (the first parameter), and the second parameter is a function that will be passed the current value of enabled as a parameter called isEnabled, and will simply return opposite boolean value of isEnabled. You could back the keyPath up one level, as ["abc-123", 0], which would give you the entire subscription Map at that index, and then return a new Map with the enabled flag flipped. But in my (limited) experience, I’ve not updated more than one attribute of a given object at a time in a reducer. Hope this helps! Listen...people be askin' me all the time,Mos Def, Fear Not of'?" The "Rails is dead" meme has been around for a few years, and it's been picking up steam again recently. Even among those who still profess their love for Rails, it seems like some aren't excited about Rails 5. One recent post even imagines what a Rails 6 that recaptures the imagination would be like. I make a living working with Rails, so this discussion interests me on a personal level. What does the future hold for Rails? With frameworks like Phoenix gaining in mindshare, is Rails finally dead? What these discussions leave out is the fact that we are Rails. Rails will die when we stop using it. To put it another way: Rails will stay alive as long as we continue to choose it for projects. There's isn't an official "Language and Framework Committee" that decides which technologies are dead. Our small choices, when aggregated, determine the fate of technologies. So is Rails dead? I don't know. It's not dead for me: I love Rails and will continue to use it. But the larger point is that no one gets to tell you that Rails is dead; you need to decide that for yourself. My Time With Rails Is Up Rails Has Won I Accept That Rails Is Yesterday's Software It Takes All Kinds Announcing Rails 6: An Imagined Roadmap]]> Dash This app is already indispensable to my workflow. Just check it out. Monotonic functions A function is called monotonic if and only if it is either entirely increasing or decreasing. Stateless Components in ReactJS Stateless components are pure functions of their props. They (obviously) don't have internal state, and do not call any component lifecycle methods. Ecto.Query.order_by/3 Learned various ways this function can be used. The Ecto version of Rails' order("created_at desc") would be order_by(desc: :created_at). Ecto.Changeset.foreign_key_constraint/3 Ecto provides the ability to capture foreign key constraint violations as errors on a changeset. The big difference to me between this function and assoc_constraint is that you can pass any key as the first argument, and Ecto will put the error on that key if the constraint fails. This is in contrast to assoc_constraint, which inflects on the key you pass in to determine what association constraint it's checking: # Assume a post belongs to an author, lets ensure the author exists. If this fails, # the error will be put on the "author" key in the changeset assoc_constraint(:author) # We can also capture some other foreign key violation, # and put it on another key within the changeset foreign_key_constraint(:some_custom_changeset_key, name: :some_database_fkey, message: "bad data!") Singlecut Beersmiths A brewery from my native Queens, NY. I had the Billy Half-Stack IPA, and I'd drink it again! I've started a podcast on briefs.fm, entitled Between Two Infinites. The subject matter will be a mix of software development, philosophy, theology, and soccer.]]> Here are some things I wish I knew when I was a junior (and solo) developer trying to "level up": The best way to level up is by pairing with someone more experienced. Books & screencasts are great and should be used, but pairing will help you make the leap more quickly. My "level up hierarchy" is pairing > code review > books/screencasts. Everything is a tradeoff. You need to see the advantages and disadvantages of different approaches to solving a problem, and then decide with your team which advantages are most important, and which disadvantages you can live with. There will rarely be a perfect solution to a problem, and the framework for deciding which tradeoffs to make varies from team to team. Design will become an important question. When you see two classes with similar functionality, should you extract a common base class? Should you move some methods to a shared module? Why or why not? Your answers to these questions will change over time, but it's important to develop reasoned opinions. Remember, everything is a tradeoff. One of the biggest challenges of working on a large Rails app is code organization. Questions like "where do non-ActiveRecord classes go?" arise and are trickier to answer than they first appear. There's nothing magical about the code you write for a large app. There's no secret subset of Ruby (or Rails) that you need to be initiated into before you can code "at scale". You will find yourself considering different things when working on a large vs small app (performance, background jobs, caching, etc.) but those are design issues. Ruby is still Ruby. Learn to love testing. In most cases, you should be nervous about shipping code that is not tested. Learn about testing philosophy. More tests are not necessarily better. It's important to know what to test and why. See Questions to ask when writing tests. Don't be afraid to ask questions of more senior developers if something doesn't make sense. You'll either learn something new, or your questioning will result in a new approach that the other developer hadn't considered. Everyone wins! If an idea doesn't make sense at the time, come back to it in 6 months. Sometimes we're not ready to absorb a new language or paradigm, but that doesn't mean we won't be ready at some future point after growing in another area. I had this experience with functional programming. Related to the last point, and somewhat contradictory, you need to aggressively find ways to use new things. The only way to truly learn a new language or technology is to build something with it. This will often require tinkering with things on your own time. Some things are hard to learn, and require persistence. I have observed a rather unsettling habit in myself: no sooner do I achieve a goal, or acquire something I have been working towards, than I begin to worry about losing what I have just acquired. This feeling is not entirely out of place. After all, if we value our own time and energy enough to spend it in pursuit of some end, it naturally follows that what was achieved is worth holding on to. But I've noticed a tendency to let this "good anxiety" get out of control. It slowly builds until I can't relax anymore. What I've realized is that much of my happiness, "our" happiness, is a function of making a conscious choice to responsibly ignore worrying about the future. Worrying about the future is useful inasmuch as it results in responsibly planning for the future. For example, heart disease runs in my family. My father was only a few years older than I am now when he needed emergency surgery for an artery blockage. I do worry about that happening to me, and because of that worry I've made exercising and eating (mostly) healthy a priority. Similarly, worrying about financing college for your kids, or your own retirement, is a good reason to save money now. But there comes a point where I accept the fact that I've done, or am doing, all that's in my power. There are things I cannot control, and I can't worry about those things. I will work as hard as I can, exercise, eat well, save money, etc., but I can't control the economy, or my own genetics. So why worry? When I stop worrying about losing what I have, and instead focus on enjoying what I have while it lasts, I find that I am able to conquer anxiety and truly live "in the moment."]]>. My wife and I have four children, and we homeschool, so the house is full all day, everyday. My response is therefore affected by the fact that my house is a hive of activity. The goal here is to have a space where you can work undistracted. To me that means you'll want a proper office with a door that locks. The understanding among your family has to be that the office is your space to work. When the door is closed, it means no interruptions. The lock is for the times when people forget what the closed door means. And they will forget. The other thing about a room dedicated to work is that it allows you to mentally segment home life and work life. I don't always work in my office when I'm home (more on that in a bit). But even so, I know when I am done for the day, I leave my office and shut the door, and that's that. Working from home gives you the unique opportunity to completely customize your workspace. An ideal desk and office setup is relative to what inspires you. What helps you focus and get "in the zone"? For example, I like to have a view of the outside world when I work. I also try to keep my desk free of non work-related things like bills and mail. I find those sorts of things distracting. I'll get to the mail later; for now, I'm working. A view of the yard, and a clean desk I recommend investing in a good pair of headphones or a headset. I use Sony MDRV6 Studio Monitor Headphones. I find that listening to music through headphones helps me focus more than listening through external speakers. YMMV. Here are two playlists I listen to when hacking: I like to switch up my work location. I work in my office 90% of the time, but sometimes I work in my living room, or at the local Starbucks, or even the pub! Sometimes you need to put your feet up Switching up work locations like this keeps me from getting into a rut. Working remotely, I don't have face-to-face communication with co-workers. I miss out on things like going with co-workers to a new place to get lunch, or grabbing a coffee mid-afternoon, things I was accustomed to when working in an office. Changing work locations approximates this experience, however poorly. The answer I'd give here would mostly be a summation of his thoughts anyway, so I will just point you directly to Wynn Netherland's answer when I asked him the same question. I will add to that: communicate early, and often; don't be afraid to ask questions. The channels and means you use to communicate (synchronous vs. asynchronous) will be different based on the company, but the general principle applies. The worst thing in a remote job is to be stuck on something and feel alone. It doesn't have to be that way. Just ask! Working remotely has changed my life, and my family's life. We've been able to travel for long periods of time, and as long as I have a web connection (tethering FTW!), I can work a full-day and then have the evenings and weekends to enjoy a new place. I'd encourage anyone working remotely to try such a "work-cation". Of course, it's easier for us to do because we homeschool as well, so we can do school and I can work "on the road". That said, it can still be done, you just need to be creative. When we travel we mostly stay with family and friends to keep our costs down, but with Airbnb it's possible to find long-term (1-2 month) rentals at an affordable cost. Remote work presents a great opportunity to do interesting things, but it's important to remember the work part of "remote work". In everything you do (working at a coffeeshop, doing a "work-cation"), keep in mind that you're part of a team, and the implicit understanding is that you're responsible enough to be productive and manage yourself. The goal is for everything you do to be transparent to your co-workers: no matter where you're working or what your office looks like, you're still contributing at a high level to your company. When my family travels out of town on extended trips, we always drive on weekends or late at night, so that I can still work a full day/week. If I want to take a day off to do something fun with my family, I take it, but otherwise, it's a normal work day, sitting poolside notwithstanding. My desk for one month last year, at my in-law's in Florida Additionally, I think it's important to have a routine when working remotely. Have a consistent general start time, and general end time. Take a real lunch break. It's easy to either a) work all the time, since you can work anywhere, or b) become undisciplined in work habits because no one is micromanaging you. You're conscientious, and responsible: don't let that happen to you. Use the fact that you don't have a commute to your advantage. Spend the hour that would have been spent in the car or on the train instead on reading a technical book, or exercising. I've recently started waking up around 6:30am, making coffee, and just taking the morning easy by reading or going for a run. The kids are still asleep during that time and I can get out in front of the day instead of the day's events controlling me. When working remotely it's easy to sleep until 10 minutes before you're expected to be online, then rolling out of bed and starting work. Again, you're not that kind of person; you're going to make the most out of the the time you have. Remote work is fun, but also challenging. Unfortunately I've seen people who can't handle the responsibility of working remotely. And that's very sad to me, because it's such a great opportunity for so many things. So communicate well, work hard, and enjoy yourself. 10 Commandments for Remote Working]]> I've begun tinkering with Elixir and the Phoenix framework. The guides on the Phoenix site seem to be slightly out of date, so I thought it'd be helpful to post a quick start guide. I am running OS X 10.10.3. $ brew install elixir The latest version as of today is `1.0.4`. Along with Elixir comes Mix. Mix is a build tool that provides tasks for creating, compiling, testing Elixir projects, as well as handle dependencies, and more. Hex is a package manager for the Erlang ecosystem. $ mix local.hex As of today, the latest Phoenix release is `v0.13.1`. Check the project's Releases page to be sure you're going to install the latest version. $ mix archive.install By default, your app will be created in the same directory you're in when you run this command: $ mix phoenix.new phoenix_test_app Specifying an absolute path also works: $ mix phoenix.new /path/to/my/phoenix_test_app Be sure to type "Y" when prompted to install all dependencies. $ cd phoenix_test_app $ mix phoenix.server Open your browser and visit. You should see the following: Here's a list of stuff I currently use everyday in the service of personal and professional productivity: macvim with the Solarized theme and personalized dotfiles for editing RSpec and Capybara for testing Foreman as process manager, Pow as DNS server and HTTP proxy for managing development processes Trello for personal task management Softech Natural Light Smart LED Desk Lamp for desk lighting Mr. Coffee BVMC-SJX33GT 12-Cup Programmable Coffeemaker for coffee (at only $37, it's a great value!) Robert Murray M'Cheyne's Calendar for Bible reading Gym Jones for training plans and knowledge I'm coming to the opinion that, in Ruby, inheritance is never the first tool you should reach for when designing classes. This has been a difficult mental shift for me to make, coming to Ruby as I did from the Java world. Reading Practical Object-Oriented Design in Ruby earlier this year first put the idea in my head. But recent experience doing post-mortems on production code which made use of inheritance has made the abstract idea concrete. The major reason for this shift in thinking is that, in my experience, code which makes use of inheritance is harder to reason about. This is especially the case when one is trying to track down a bug during an outage or some other "support incident". Your experience may be different. But there's something to be said for having all the methods that a class makes use of all in one place. It can be argued that composition also introduces the same type of problem, but it's mitigated for me by the fact that classes which make use of composition tend to have shallower hierarchies. Most of the time you're just jumping to one file to look for a method definition, whereas with inheritance you are potentially jumping into a complex class hierarchy. I'm beginning to think that dependency injection is the best way to make potentially complex model interactions very simple. When you focus on message-based design, you quickly discover news ways to leverage Ruby's duck-typing capabilities in the service of writing small classes that do one thing and are simple to reason about. These types of classes are easy to change, and in my experience, easier for the person who didn't write them to someone to come in and understand. And for teams working on large applications, that's a big win.]]> Notes on Practical Object Oriented Design in Ruby by Sandi Metz. The purpose of design is to allow you to do design later, and it’s primary goal is to reduce the cost of change. [SOLID Design](: Single Responsibility Principle: a class should have only a single responsibility. Open-Closed Principle: Software entities should be open for extension, but closed for modification (inherit instead of modifying existing classes). Liskov Substitution: Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program. Interface Segregation: Many client-specific interfaces are better than one general-purpose interface. Dependency Inversion: Depend upon Abstractions. Do not depend upon concretions. Other principles include: Do Not Repeat Yourself: Every piece of knowledge must have a single, unambiguous, authoritative representation within a system. Law of Demeter: A given object should assume as little as possible about the structure or properties of anything else. A class should do the smallest possible useful thing. Applications that are easy to change consist of classes that are easy to resue. How can you determine if the Gearclass contains behavior that belongs somewhere else? One way is to pretend that it’s sentient and to interrogate it. If you rephrase every one of it’s methods as a question, asking the question ought to make sense. For example, asking “Gear, what is your ratio?” seems perfectly reasonable…“Gear, what is your tire size?” is just downright ridiculous. Depend On Behavior, Not Data Hide instance variables. [Code example] Hide data structures. [Code example] An object depends on another object if, when one object changes, the other might be forced to change in turn. Recognizing Dependencies An object has a dependency when it knows: The name of another class The name of a message that it intends to send to someone other than `self` (methods on other objects). The arguments that a message requires. The order of those arguments. Your design challenge is to manage dependencies so that each class has the fewest possible; a class should know just enough to do it’s job and not one thing more. The more one class knows about another, the more tightly it is coupled. Test-to-code over-coupling has the same consequence as code-to-code over-coupling. Factory: an object whose purpose is to create other objects. Depend on things that change less often than you do. Some classes are more likely than others to have changes in requirements Concrete classes are more likely to change than abstract classes Changing a class that has many dependents will result in widespread consequences Abstraction in Ruby = duck typing; depending on an interface (objects will respond to methods) rather than a concrete class implementation. Domain objects are easy to find but they are not at the design center of your application. They are a trap for the unwary. If you fixate on domain objects you will tend to coerce behavior into them. Design experts notice domain objects without concentrating on them; they focus not on these objects but on the messages that pass between them. Using a kitchen analogy: your objects should “order off a menu” instead of “cooking in the kitchen”. This transition from class-based design to message-based design is a turning point in your design career. The message-based perspective yields more flexible applications than does the class-based perspective. Changing the fundamental design question from “I know I need this class, what should it do?” to “I need to send this message, who should respond to it?” is the first step in that direction. Ask for “what” instead of telling “how”. You don’t send messages because you have objects, you have objects because you send messages. Context: the things that an object knows about other objects. Objects that have a simple context are easy to test, objects with a complicated context are more difficult to test. The best possible situation is for an object to be completely independent of it’s context (dependency injection). I know what I want and I trust you to do your part. Law of Demeter Only talk to your immediate neighbors It’s a “law” in the sense of a guideline, not a hard and fast rule. Balance the likelihood and cost of change against the cost of removing the violation. …Demeter is more subtle than it appears. It’s fixed rules are not an end in themselves; like every design principle, it exists in service of your overall goals. Certain “violations” of Demeter reduce your application’s flexibility and maintainability, while others make perfect sense. The problem with Demeter violations (like customer.bicycle.wheel.rotate) is that they show that code ( customer) knows too much about how other code works. It’s a manifestation of tight coupling. The train wrecks of Demeter violations are clues that there are objects whose public interfaces are lacking. Duck types = public interfaces not tied to any specific class It’s not what an object is that matters, it’s what it does. Concrete code is easy to understand, but costly to extend. Abstract code may initially seem more obscure but, once understood, is far easier to change. Once you begin to treat your objects as if they are defined by their behavior rather than by their class, you enter a new realm of expressive design. Recognizing Hidden Ducks Case statements that switch on class, kind_of?, is_a?, and responds_to? are potential ducks. Inheritance is, at it’s core, a mechanism for automatic message delegation. It defines a forward path for not-understood messages. Subclasses are specializations of their superclasses Everything the parent class is, plus more. Template Method pattern Any class that implements the template method pattern must supply an implementation for every message it sends, even if the only reasonable implementation in the sending class looks like: class Bicycle #... def default_tire_size raise NotImplementedError end end See for an example of refactoring a base class and two subclasses with the template method pattern Combining the qualities of two existing subclasses is something Ruby cannot do (multiple inheritance) Because no design technique is free, creating the most cost-effective application requires making informed tradeoffs between the relative cost and likely benefits of alternatives Classical inheritance vs module inclusion can be thought of as is a? vs behaves like. Method Lookup Flow Including a module inserts it's method "above" it's superclass, in the object hierarchy. Therefore, if a method exists anywhere in the hierarchy between subclass and superclass, and also in an included module, the superclass method wins out. When a single class includes several different modules, the modules are placed in the method lookup path in the reverse order of module inclusion. Thus, the methods of the last included module are encountered first in the lookup path. Note: Sandi mentions that the above image could in some cases be more complicated, but for most programmers it’s ok to think of the object hierarchy in this way Writing Inheritable Code Recognize the antipatterns Insist on the abstraction Honor the contract (Liskov Substitution Principle) Use the template method pattern Preemptively decouple classes (avoid `super`) Create shallow hierarchies …when a sending object checks the class of a received object to determine what message to send, you have overlooked a duck type. This is another maintenance nightmare; the code must change everytime you introduce a new class of receiver. In this situation all of the possible receiving objects play a common role. They should be codified as a duck type and receivers should implement the duck type’s interface. Once they do, the original object can send one single message to every receiver, confident that because each receiver plays the role it will understand the common message. Insist On The Abstraction If you cannot correctly identify the abstraction there may not be one, and if no common abstraction exists then inheritance is not the solution to your design problem. Create Shallow Hierarchies Depth = number of superclasses between object and the top; breadth = number of it’s subclasses. Prefer shallow & narrow. Forwardable Composition describes a has a relationship. Composition: objects “inside” have no meaning outside that context Aggregation: like composition except objects “inside” have meaning outside that context Deciding Between Inheritance and Composition Inheritance gives you message delegation for free at the cost of maintaining a class hierarchy. Composition allows objects to have structural independence at the cost of explicit message delegation. Composition contains far few built-in dependencies than inheritance; it is very often the best choice. With inheritance, a correctly modeled hierarchy will give you the benefit of propogating changes in the base class to all subclasses. This can also be a disadvantage when the hierarchy is modeled incorrectly, as a dramatic change to the base class due to a change in requirements will break sub-classes. Inheritance = built-in dependencies. Enormous, broad-reaching changes of behavior can be achieved with very small changes in code. This is true, for better or for worse, whether you come to regret it or not. Avoid writing frameworks that require users of your code to subclass your objects in order to gain your behavior. Their application’s objects may already be arranged in a hierarchy; inheriting from your framework may not be possible. 3 Skills Needed to Write Changeable Code Understand OO design Skilled at [refactoring]() code Ability to write hig h-value tests Changeability is the only design metric that matters; code that’s easy to change is well-designed. Good design preserves maximum flexibility at minimum by putting off decisions at every opportunity, deferring commitments until more specific requirements arrive. When that day comes, refactoring is how you morph the current code structure into the one what will accommodate the new requirements. Tests free you to refactor with impunity. The true purpose of testing, just like the true purpose of design, is to reduce costs. Intentional Testing Benefits of testing Finding bugs Supplying documentation ("Tests provide the only reliable documentation of design.") Deferring design decisions ("When your tests depend on interfaces you can refactor the underlying code with reckless abandon.") Supporting abstractions Exposing design flaws Knowing What to Test Most programmers write too many tests…One simple way to get better value from tests is to write fewer of them. Dealing with objects as if they are only and exactly the messages to which they respond lets you design a changeable application, and it is your understanding of the importance of this perspective that allows you to create tests that provide maximum benefit at minimum cost. Here, then, are guidelines for what to test: Incoming messages should be tested for the state they return. Outgoing command messages should be tested to ensure they get sent. Outgoing query messages should not be tested. Knowing When to Test First, obviously. Tests are reuse. Your application is improved by ruthlessly eliminating code that is not actively being used. ]]>]]> Freeing your imagination from an attachment to the class of the incoming object opens design and testing possibilities that are otherwise unavailable. I've settled into what I think is an effectively simple git workflow that I thought would be helpful to share. Let's say I am working on a new feature. First thing I want to do is make sure my local copy of the codebase is up-to-date: $ git pull master I'll then create a new feature branch. In my experience, 99% of the time I am branching off of master: $ git checkout -b an-awesome-new-feature But it’s just as easy to branch off another branch: $ git checkout -b an-awesome-new-feature some-other-branch Within this new branch, I can spike on the new feature, and if things get hairy I can blow it away and start over. I'll commit often. Most of my commits during the spike or early phase of a feature will look like: $ git commit -am "WIP specs" If I am pairing, I will be more descriptive with the commit messages. But when I am coding alone, these pre-PR commits are for me, and are not meant to be used for any meaningful code review. When I am satisfied that I the work I've done will eventually become a PR, I'll push my branch to a remote: $ git pushr The pushr command is a nice little shortcut from the dotfiles I use. It creates a remote branch with the same name as my local branch, in this case, an-awesome-new-feature. After the initial git pushr, I can just do git push and it will push to the remote branch. The "do some work, test, commit, push" loop happens until I am satisfied that the feature is ready for a pull request. If a new feature was merged into master that will effect my feature, I'll pull the changes in, and then do: $ git rebase master Recently I've gotten into the habit of rebasing my feature branches whenever anything is merged into master, even if I don't think they will effect what I am doing. I've done this mainly because, if there is a conflict, I'd rather be in merge hell in the middle of working on a feature than at the end of a feature. It's dispiriting when you're about to open a shiny new PR and you realize it won't merge cleanly. At this point I will rebase and squash all of my commits on the an-awesome-new-feature branch into one commit. This commit message will be as informative (detailed) as possible, since it will become the basis for the pull request message. Once that's done, I'll force push to the branch with my new rebased history: $ git push --force I'll then open my pull request. I will push new commits to the branch after the PR is open, based on feedback. Once I get a :shipit:, I like to re-squash all post-PR commits back into the first PR commit. There's been some discussion on our team about the merits and demerits of this approach. I like to have one commit per PR when it's possible. It seems cleaner to me. But there's a good argument for not doing this, since those post-PR commits were changes made based on feedback, and that feedback history is important to have. Personally, I feel the comments in the PR on GitHub are sufficient as far as history goes. Usually if I want to dig deeper into what went into a new feature and why, I'll go back and re-read the PR message and subsequent comments, as opposed to reading commit messages in git log. But that's my own preference. The other way is fine too, in my opinion. In either case, once the PR is merged, the feature branch is deleted locally and remotely. The master is updated locally via git pull, and the cycle repeats. "If a thing is worth doing, it is worth doing badly." - G.K. Chesterton Newton's first law of motion states that objects in motion tend to stay in motion, and objects at rest tend to stay at rest, unless acted on by an external force. This law explains the reason behind an opinion I've adopted: starting something is difficult. Of course finishing, and finishing well, are also difficult. But I think that first leap, from doing nothing to something, is harder. Talk is cheap. It costs nothing to say you will do something. And people love to talk about the amazing plans they have. But there's a price to putting forth an effort. Doing something means not doing other things. It's a sacrifice of time, sometimes with family, oftentimes of activities that are themselves enriching. Doing something means there will an end product, which can be (and often is) criticized. So there's also the emotional price which must be paid. Additionally, you have those laws of motion working against you. It seems to be our nature, that when we're doing nothing, we tend to continue to do nothing. There's also some Lizard Brain stuff going on too. So to go from doing nothing to something, an outside force is needed. As you mature you realize that in many cases, you need to be your own outside force. You come to understand that you're fighting against yourself to get stuff done. A self-motivated person is one who understands that, and doesn't need (or wait for) someone to give them a push. If you're part of an organization, you can see this play out everytime you have some sort of housekeeping meeting. Ask for feedback on an issue, watch the hands go up. Everyone likes to talk about how things should change, what they would do if they were in charge. Ask for volunteers to work on implementing that change, or watch the follow-up effort by folks who just "do stuff", and it's usually disappointing. Therefore, I am one who praises effort, even effort that results in something of low quality, because I appreciate how hard it is to do something. Especially when that effort is the beginning of something. When I see someone attempt to organize an event and fail, ship a software product that I find ridiculous, start a workout program, or many other things like that, I will always admire the effort. At least they are trying. People who offer nothing other than words shouldn't criticize the people actually doing something. The only time effort itself should be criticized is if it's sub-par. One should always aim for excellence. But excellence is hard to achieve, especially at the beginning of a thing. So as long as someone is trying as best as they can, and working to improve, their effort should be praised. Poor outcomes are tolerated on the way to better outcomes. Poor effort is never tolerated. Honest effort is always to be praised.]]> I've spent the last 6 months all-in with vim. At Chargify, we use vim when doing remote pairing, so it's been necessary to get up to speed for that reason alone. To shorten the learning curve I uninstalled TextMate on my personal laptop and have been using vim for all TalentSoup development as well. My vim knowledge was basic when I joined Chargify, and while I am far from expert at this point, I am productive and learning more each day. Given the experience of needing to go from 0 to productive in a short period, I'd offer that the best way to learn vim is with someone else. Whether you use someone's dotfiles (I use a fork of my colleague Jeremy Rowe's dotfiles) or not is a secondary concern. Nothing will speed up your vim education like having someone watch you attempt to do something, and suggest another, more efficient way. A great set of dotfiles is super helpful, but more important is that you have someone offering guidance. More and more I am becoming convinced that the pairing model is the best way to get better at software development. If you can find someone to be a mentor to you, you're in a great spot. P.S. - If you can't find someone to pair with to learn vim, I recommend watching the Destroy All Software screencasts. You'll see Gary do a lot of crazy things, which will lead you to ask "how did he do [X]", which will start you on the right path.]]> Below is a list I am going to read everyday before I start working. Some points are repetitive, because I need to hear them over and over. This list is in no particular order. Communicate early, and often. Don't be afraid to ask questions. If something isn't clear or a proposed solution doesn't seem right, say something. At best you've discovered a blind spot in your team's approach, at worst, you will have learned something. So you win either way. Assume nothing. Take the extra time to confirm or refute your assumptions by asking a team member. Program defensively. Assume users will break things and enter bad data, or that the worst will happen. It's ok joke around and shoot the breeze every so often, but at the end of the day, this is your job. Be serious about it. Every moment is a teachable moment. Learn, soak in as much as you can from others. Again, ask questions: "Why are you doing it that way? What does that method do? What are some others ways to do the same thing?" Pair programming offers so many opportunities for this interaction, which is why I think it's the best way to level up. Test your code thoroughly. Ask others if there are blind spots in your tests. Understand that, even though every PR is reviewed by others, there's a level of trust in you as a developer. Own the code you write, and take pride in it. Make sure it works, don't assume others will catch a mistake. Never. Stop. Learning. Ask about blind spots: "What other parts of the app might break if I change this? What are some "gotchas" about the process I am working on that are perhaps not apparent? Can you just go over with me what's happening here?" Document useful things you discover. If something is broken, fix it. The biggest takeaway for me, especially as a remote worker, is to just speak up if you have a question or are unsure about something. In my experience, colleagues are very understanding about getting someone up to speed with how the app works, or to just go back and forth talking about the merits and demerits of a particular approach.]]> Since October 2009 I have been the only developer at TalentSoup. In the past, I've been part of large co-located teams, and smaller distributed teams (across continents). TalentSoup is my first experience building an application this large, by myself. I want to briefly talk about my experience as a solo developer, and offer some helpful tips to others in the same situation. In short, the best part of being a solo developer is that you can do whatever you want. Also, the worst part of being a solo developer is that you can do whatever you want. The best part of being a solo developer is that you can do whatever you want. It turns out that this is a double edged sword, as I'll get to below. But there are times when it's nice to use whatever technologies or frameworks that you are most productive with. No bureaucracy to deal with. The other great thing is that you learn a lot. When working on an application with other developers, the tendency is to divide up the work based on the expertise of the team, especially when time is of the essence. It takes a strong lead developer to say, "Jane doesn't have a lot of experience with billing systems, so we're going to let her spend the next few weeks working on some news features for ours, so she can learn." As a solo developer, you get those opportunities by default. For me, this also involved learning basic sysadmin stuff, like securing a new server, troubleshooing server issues, scaling up the application, things of that nature. All this, in addition to all the little things you learn as you refactor, gain a deeper understanding of your language and framework, etc. Not to say I wouldn't have learned as much if I were working with someone else, just that I had to learn. Having worked in the past at places where there were separate teams handing server and database administration, I enjoyed the chance to dig in to new things. The worst part of being a solo developer is that you can do whatever you want. The longer I am a solo developer, the more I think it's a net negative. Unless you have an exhaustive knowledge of the technologies available for a given solution, and the experience to know the benefits/limitations of each, the fact is that you will have blindspots in your thinking. I'm not saying that someone with limited experience can't find a good solution to a problem. What I am saying is that it's good to have someone who can suggest a couple of different courses of action, because there might be a solution that fits your problem better than the one you're about to implement. This principle also affects the learning process. There have been times when I have wanted to try out a new database for example, but knowing there'd be a learning curve, I avoided it and stuck with what I knew. There's a good business reason for doing this: when stuff breaks, it's better to be working with something you know how to fix. But it would have been nice to be working with someone who had experience with that new database and provided a safety net in terms of knowledge and experience. Even if no one on a team has experience with a new technology, stepping into the unknown with a group is better than stepping in alone. Another factor is that we all have comfort zones. I have test frameworks and gems I like to use, and a development process that feels comfortable to me. But if I want to keep my skills relevant, thinking about opportunities beyond my current position, it would be in my best interest to branch out and learn other things. As a solo dev, unless you are really disciplined, it's hard to step out of that comfort zone. Also, it can be emotionally difficult to bear the weight of knowing every feature, bug fix and upgrade depends on you. This can lead to burnout. Finally, when you are a solo developer, there's no one to review your actual code. No one to call you out on a bad implementation, or educate you on the idiomatic way to do a certain thing. No one to raise a flag when untested code goes into production. I've gotten into some bad habits that have taken much effort to reverse. When you are a solo developer you don't get the positive peer pressure that's needed to grow as a craftsman. The challenges of being a solo developer aren't insurmountable. If you feel that you're not able to get out of your comfort zone, you have to, in the words of my friend Matt, "Aggressively find ways to use things." It takes being disciplined and intentional to gain experience with new things when you are on your own. There's no other way. No secret sauce. I've had the privilege of getting to know some really good Ruby developers. I'll send an email every once in a while asking how they'd best solve some problem, or if they could recommend a book to help me level up. There are also resources like pairprogramwith.me if you're looking to pair with another developer. I got to spend a day pairing with a startup recently, and it was an eye-opening experience, one that I am eager to participate in again. Talking out loud with another developer, while looking at the same code in the same room, exposed so many areas of my craft that I need to improve. It was worth many books and screencasts. If you are feeling overwhelmed by your workload, might I suggest something counterintuitive: walk away. Take a day or two and don't open the editor, or look at a bug list. Just take some time for yourself. Or, if you are going to work, work on a pet project, something fun. At TalentSoup, a couple of small features that have turned out to be popular were the result of me blowing off a laundry list of things I had to do, to work on something fun, just for my sanity. These certainly aren't an exhaustive list of solutions, but if you're a solo dev and know you will be for the forseeable future, it's a starting point.]]> I read Bryan Helmkamp's blog post 7 Patterns to Refactor Fat ActiveRecord Models when it was originally posted, but it's taken me until recently to implement some of his suggestions in TalentSoup. Specifically, I've been writing service objects, using similar criteria to Bryan. One quick example of how I've used service objects is in the downgrading process. Previously, my code for downgrading an account looked like this: #controller action def downgrade @subscription = Chargify::Subscription.find_by_customer_reference(@current_user.chargify_reference) @current_user.downgrade_brand_to("new_brand", @subscription) AuditLog.create(user_id: @current_user.id, content: params[:downgrade_reason]) flash[:notice] = "Your account has been successfully downgraded." redirect_to :controller => :home end My user.rb class was responsible for post-downgrade cleanup in the downgrade_brand_to method, like canceling the subscription with Chargify, and resetting some of the features availabile to our Pro users. The code certainly worked, but there were a number of things wrong the approach (besides how obviously hideous it is!): Spread out the business logic behind canceling across a controller and a model. I always want to log the reason for a cancellation along with doing the actual canceling, but the previous implementation had those two occuring separately. Since there was no single point of entry that would encapsulate the entire downgrade process, it was hard to test. It was also not portable. We might want to downgrade in other parts of the app too (reconciliation process via Rake task, perhaps) and the current process would necessitate repeating ourselves, and possibly leaving out something important. My refactored code now looks like this: #controller action def downgrade @subscription = Chargify::Subscription.find_by_customer_reference(@current_user.chargify_reference) WebcompDowngrader.new(@current_user, @subscription, params[:downgrade_reason]).downgrade! redirect_to controller: :home, notice: "Your account has been successfully downgraded." end #service object class WebcompDowngrader def initialize(user, subscription, downgrade_reason) @user = user @subscription = subscription @downgrade_reason = downgrade_reason end def downgrade! reset_subscription_level delete_chargify_subscription log_downgrade_reason end private def reset_subscription_level #some downgrading actions on the user's account... @user.save end def log_downgrade_reason AuditLog.create(user_id: @user.id, content: @downgrade_reason) end def delete_chargify_subscription Chargify::Subscription.delete(@subscription.id) end end I think this is much cleaner, it's reusable, and it's easier to test. To be quite honest, as great as those things are, the biggest win for me so far has been that I feel better about the application. I feel more confident going in to change things, because I can focus on much smaller parts of the application, rather than digging into God models. As a solo developer, it becomes harder to keep the whole application in your head as the code base grows. Therefore, anything that will express business logic in a concise way and make it easier to come back and understand months later ("I just need to look at one small class to see what we do when we downgrade") is huge. 7 Patterns to Refactor Fat ActiveRecord Models Ruby Rogues - Decomposing Fat Models with Bryan Helmkamp]]> A number of related but scattered thoughts on the subject of creating opportunity for yourself. Look at goals you have in terms of actions to be taken. It's not enough to write down ideas and talk about them. You have to work to implement them. Recently someone at my church suggested regularly getting together during the summer at a local beach for volleyball. Everyone was enthusiastic about the idea. But to make it happen, someone needs to contact the town and see if we need a permit, and if we do, to work at getting that permit. Someone else needs to purchase equipment. There is action to be taken; who's going to take it? I think it's helpful to see yourself as a hustler, and I mean that in the sporting sense. In baseball, someone who's a hustler will run out every ground ball, dive for every line drive, chase every ball hit anywhere in the outfield. At the end of the game, he comes back to the locker room with a dirty uniform. To a hustler, there are no lost causes. The way this played out for me is that I spoke to everyone who wanted to work with me, everyone with an idea. I answered emails, met with people, even if I had an inclination that it would be a waste of time. Because you never know. Every potential opportunity is worth a look. This mindset (at the time I was looking for a project to be involved in long-term) is what caused me to answer a random tweet, which led me to Radford Harrell and TalentSoup. On the surface it looked like short-term work, but it turned into 3-1/2 years (and going!) of a great partnership. You never know. The nature of the hustle will change over time. Now that I am in a situation that I worked hard for many years to find, the types of opportunities I am looking for has changed. I want to meet people who will help me grow my business, and help me improve as a developer, whereas before I was looking for a project to be a part of. But the bias toward action will always exist. All of that said, being biased towards action does not necessarily mean always looking for new things. If you're in a situation where you are really unsure of what to do, consider the possibility of just carrying on. But hopefully "carrying on" for you means continuing with some action, as opposed to doing nothing. The Sabbath is a day of rest. Among it's practical benefits (naps for the whole family!), it also serves to remind us that the increase in our lives is not down to our own working. We are led to believe that working long hours and sacrificing time with family and loved ones is what it takes to be "successful". By allowing me to observe a day of rest from work, God is reminding me that ultimately, He is the One who provides for me. Yes I work hard, but every good thing in my life comes from God. The apostle Paul elaborates on this idea in the first letter-8 In that context he's talking about his work in the ministry of the Gospel, but the principle is clear: ultimately God is the one who prospers (or does not prosper) the labor of His people. Much more can be said about this point and how it relates to contentment. It's enough for now to remember that while you are working hard, God is the one who is directing your life, opening and closing doors, and adding (or not adding) increase through your labors.]]> A while back I found a great set of notes that were taken at a presentation by del.icio.us creator Joshua Schachter at the 2006 Future Of Web Apps summit. They were really helpful to me in my growth as a developer. Unfortunately the notes are no longer available at the original URL, so I've taken the liberty to reproduce them here. Again, these are not my own notes (credit goes to Simon Willison) but I want to preserve them for posterity's sake. If you know of an "official" location for these notes please let me know. Browser quirks. CSS/JavaScript/rendering. IE caching. Scaling: avoid early optimization. SQL doesn't map well to these problems - think about how to split up data over multiple machines. Understand indexing strategies, profile every SQL statement. Nagios or similar for monitoring. Tags don't map well to SQL. Sometimes you can prune based on usage - only index the first few pages for example. This keeps indexes small and fast. Some latency in the system is OK - work out where you have leeway, e.g. RSS feeds can fall a few minutes behind without anyone minding. People are always going to abuse your system (scraping, greasemonkey, etc.) "Idiots are a lot smarter than you" - wait to see what breaks before you fix it. Learn Apache - tuning can make things a lot faster. Understand headers, mod_rewrite (a dark art). Put a proxy in front of Apache e.g. Perlbal from LiveJournal - one guy on a modem can suck up lots of resources otherwise. Images off a different server, RSS from a different server. "Save site for offline use" feature in IE is particularly nasty. The easier the API to get in and out of, the more people will use it. There's a long tail of smart developers. Stuff like SOAP discourages adoption. No API key = people can play with it faster; drives attention. Don't expose your unique id's to the outside world (php?id=1 etc.) People can scrape through everything very easily. This is why del.icio.us uses MD5 hashes of links instead. Giving everything a unique ID in the database is a scaling problem in its own right. Features: the features you put in are as important as the ones you leave out. There's no "send a note" in del.icio.us feature because e-mail already exists. I don't add featues that are available elsewhere e.g. messaging When people ask for features, get to the bottom of why they are asking for that exact thing. Solve the problem, rather than doing exactly what your asked for. With tags, people ask for "A and B and NOT C or D" - but less than 1% of queries even use more than a single tag. RSS important in del.icio.us, because it's a native way for people to access lists (of links). Put RSS everywhere you can. del.icio.us does way more RSS traffic than HTML or API stuff - partly because of poorly written readers. Understand the headers - especially if-not-modified. Make sure the URLs follow the path of the site. DON'T include session data, drop ugly details that are to do with the system, not the user (.php, .aspx, ?, &, etc.) URLs are prime real estate - respect them When you chose what to build, solve a problem you have yourself so you can be sure to understand it. Passion counts. It's cheap and easy to build stuff, so other people will be building it too. A niche product with a limited audience is still good business (with how advertising and PayPal work) Every day that you don't have something properly out in the world (not on an invite only beta) you're losing a chance to gain users. Get it out there ASAP. Aggregation is often a focus of attention (latest, most active, etc.). Make users do the minimum amount of work. But make them do something. Understand the user's motivation: "You have to understand the selfish user" – user #1 has to find the system useful or you won't get user #2. Systems that only become useful when lots of people are using them usually fail, because there's no incentive for people to contribute themselves. The real trick is to make the user base you have want to invite more people in to the system. Manage your effort - be careful where you spend your efforts. Don't waste time building features nobody uses. Measurement: watch your system intensely: "Intuition is ideas backed by numbers" Measure behavior rather than claims. del.icio.us doesn't have stars because why would you bookmark something that was no good? This way people bookmark things that they really care about rather than trying to tell the system things. User Acceptance Testing (UAT) is important. Make the system suitable for the people actually using the system. Everybody on the team should see this in action. Labs are great but expensive. If you don't have a lab do ghetto testing in Starbucks. We did one day then two days user testing in a user testing lab. Goals skew the results. People don't read, they cram crap in to boxes. Let people wander don't give them tasks. You have to speak the user's language. "Bookmarks" are what you call them if you use Netscape of Firefox - most users these days know the term "favourite" instead. Half of his population (? users) didn't know what a bookmark was. Don't make users register before they can get in to your site. Maybe even give them an anonymous account to play with. A lot of users want to know what they'll get if they register - especially from fear of giving out email address, spyware etc. You can't tell them; they're not going to read it. You have to show them. Use Verbs - doing words - to prompt actions. If users do have to register, send them straight back to where they were when they're done. Don't dump them on the homepage. "Design Grammar" - if you're presenting a system that's different from how other things work (del.icio.us had novel tags, save your bookmarks to the web) you should still try to reflect the design patterns of the web. Morals: You have to develop a sense of morals when you build your system. It's the user's data; it's not yours. Make sure they can remove themselves and their account if they want to. Infection: Understand infection vectors for promoting your system. "Enable evangelism". RSS lets you get at users who don't use your system directly. Also think about iCal, M3U - anything that a desktop app can consume over HTTP. Do an inventory to get into every desktop app. possible. Since the beginning of 2013, I've focused a lot of my development efforts on so-called "growth hacking". Whatever the connotations that term has, I have found some really good ideas reading the many blog posts and post-mortems that are floating around. We've seen solid growth at TalentSoup that's been directly related to our focus on bringing our users to the "ah-ha" moment, and clearly presenting our value prop in blog posts and other marketing content. I've started to send out post-downgrade emails a day or two after a user downgrades from our Pro Webcomp Portfolio. For now I don't use a template, and they are not sent automatically. Some users downgrade after a month or two, others have had a Pro account for a year or more. I want each email to be different depending on how long the user has been a paying customer. The content of the emails are simple: we saw that you downgraded, we're sorry to see you go, but thanks for being a Pro member, and here's a coupon for a free month if you ever decide to re-up. The point of the email is really just to express thanks and to put some humanity behind our company. Part of the ethos we've created at TalentSoup is that we're honest people running a legitimate business where we want our users to succeed by helping them land real work, and emails like that help reinforce the perception (which is true!). In our industry that kind of validation from our users is solid gold and we want to nurture and promote it. I've only heard back from two users since I started sending these emails out. One was from a user on our site who let me know she downgraded because she's leaving the country for two years to work in the Peace Corps. The other was from a user I sent an email to earlier this morning. The recurring billing system we use sends out dunning emails when a user's credit card has expired, and if the user hasn't updated their billing information after 3 days, they're automatically downgraded. Apparently the user didn't realize his account has been downgraded (I am still investigating how he missed 3 dunning emails) and was eager to re-upgrade his account. If I hadn't sent out that email to him this morning, how long would it have taken for him to realize his account had been downgraded? In that time, we would have missed out on revenue from a user who wanted to be a paying customer. At $5 a month, you might not see that lost money as a big deal, but I do. Developing a mentality where every dollar counts and every customer is important is how you grow a business. If your goal is to make, say $50,000 month, you have to make $500/month first, then $1,000, then $10,000, etc. Every dollar counts.]]>.]]> There are many great tutorials about setting up statsd and graphite, specifically on Ubuntu 12.04. The best walk through I found was. I'd like to add some things that were left out of that tutorial that I had to figure out. The above Gist leaves out the initial database creation. Be sure to thoroughly read so you know at which step to create the db. I did this step after configuring Apache but before restarting the server. If you see an error message similar to the following: (2)No such file or directory: mod_wsgi (pid=19506): Unable to connect to WSGI daemon process 'graphite' on '/etc/apache2/run/wsgi.19365.1.1.sock' after multiple attempts. That's a clue to edit /etc/apache2/sites-available/defaultand make sure that the configuration for WSGISocketPrefixis set as follows: WSGISocketPrefix /var/run/apache2/wsgi Thanks to Marcelo Olivas for that tip.</a> If you see this error, make sure that apache owns the directory /opt/graphite/storage/logs/webapp This thread pointed me in the right direction. Good luck. statsd-ruby Measure anything, measure everything]]> I said in the post about my 2013 learning plans that I'd blog about whatever I learn, even if it's dead simple or something I should have known already. This is my first such post. Let's start with this array: a = [ 1, 3, 5, 7, 9 ] #=> [1, 3, 5 , 7, 9] We can replace two elements with one using the following notation: #=>a = [1, 3, 5 , 7, 9] a[ 2, 2 ] = 'foo' #=>a = [1, 3, "foo", 9] Think of a[ 2, 2 ] = "foo" as meaning, "starting at index 2, replace 2 elements with the following value". We can modify the same notation to insert a value but not replace anything in the array: #=>a = [1, 3, "foo", 9] a[ 2, 0 ] = 'bar' #=>a = [1, 3, "bar", "foo", 9] The above has the same effect as doing a.insert(2, "bar"). The range notation can also be used to replace a range of elements, like so: #=>a = [1, 9, 8, 7, "bar", "foo", 9] a[0..3] = [] #=>a = ["bar", "foo", 9] Think of this as "replace elements at indexes 0 to 3 with the following". The interesting thing about both of these methods of array manipulation is that the number of new elements you're assigning doesn't have to equal the number of elements you're replacing. Using our original array, I can do the following: #=>a = [1, 3, 5 , 7, 9] a[ 2, 2 ] = "fizz", "buzz", "fizz", "buzz" #=>a = [1, 3, "fizz", "buzz", "fizz", "buzz", 9] #the above is equivalent to: #=>a = [1, 3, 5 , 7, 9] a[ 2, 2 ] = ["fizz", "buzz", "fizz", "buzz"] #=>a = [1, 3, "fizz", "buzz", "fizz", "buzz", 9] # using range notation, we can do the same as above: #=>a = [1, 3, 5 , 7, 9] a[2..3] = "fizz", "buzz", "fizz", "buzz" #=>a = [1, 3, "fizz", "buzz", "fizz", "buzz", 9] In each example I replaced two elements with four elements. The array grows automatically (see documentation on []=) One last thing. If you specify a range outside of the size of the array, the intermin elements will be set to nil: #=>a = ["bar", "foo", 9] a[5..6] = "fizz", "buzz" #=>a = ["bar", "foo", 9, nil, nil, "fizz", "buzz"] As always in Ruby, there are multiple ways to accomplish the same thing. Class: Array (Ruby 1.9.3)]]>.]]> On the night of December 17, 2011, I brewed a clone of New Belgium's Abbey Ale, which is a dubbel. On the evening of July 21, 2012, I brewed a clone of New Belgium's Saison Belgian Style Farmhouse Ale. When the dubbel was meant to be "ready" (about 3-4 weeks in the bottle), I thought it was a failure. It had a soapy aftertaste, which I identified at the time as being caused by the beer being left in the fermenter too long. It was in the primary for one week, and secondary for 11 days. Eighteen total days. Not a long time by any stretch, but I was a new homebrewer, and what did I know? The problem with screwing up a beer is that now you have 50+ bottles of homebrew that you really don't want to drink, and you don't want to let your friends drink either. So I did what any embarrassed homebrewer might do: I just let it sit in my dark, cool basement for months. It turns out this was the best thing I could have done. A couple of nights ago, I had a meeting to attend, and someone had to bring the beers. Weeks earlier, I had thrown a couple of bottles of the dubbel in with some other beers to make a six pack for a night out. Perhaps some of my friends who didn't have much experience with craft beer wouldn't notice the off flavor, and they might enjoy it. Turns out the beer got positive reviews from those friends. Buttressed by that feedback, I dared to bring a six pack of my homebrew to that meeting. Maybe the soapy off-taste had dissipated a bit, and I could start to unload my failed homebrew. I cracked open the bottle, and poured it out. It wasn't as carbonated as it had been when I first tried it months ago. The head was legit, and it smalled fantastic. I let it warm up and breathe, and took my first sip. The flavor had totally changed. Gone was the soapy after-taste, and the beer actually had a bit of complexity about it that was absent originally. At 7.3% ABV it had some kick, but whereas in January the alcohol slammed you in the face, now it was more subtle, masked by the dark fruit, malty flavors of the beer. A similar, though less dramatic thing happened with a saison that I brewed in July. With the purchase of a new boil kettle, I was dialing my process in. Armed with what I thought I had learned from brewing the dubble, we had a nearly-flawless brew night on July 21. Four weeks later, the saison was ready to drink. I really liked this beer initially. My only criticism at the time was that the yeast flavors were a bit overwhelming for that style. This will come off as snobbish, but the prominence of the yeast was something most folks wouldn't have noticed unless they were regular drinkers of farmhouse ales. No worries, though, because it was a good tasting beer, with no discernible off-flavors. I was proud of it but I'd probably still make a run to the beer distributor if we were low on other beers, instead of reaching out for my own homebrew. But last night, my wife and I were watching a movie, and had a huge bowl of homemade popcorn. Naturally we had to have some beer, but we were out of everything. There were no cold dubbels in the fridge, only one saison. I hadn't tried the saison for a while, so I poured it into a glass, and the first sip made me think it was a different beer. The yeast had taken a back seat to these overwhelmingly tasty fruit flavors. The carbonation was there as well. My wife and I both remarked that this was a beer we'd go buy in a store, and choose over other craft brews. I was now in the position of having a couple of month's worth of delicious homebrew in my basement! Experiencing my beers on those two occasions, after having brewed and then tasted them throughout the intervening months, was surreal. You're holding a drink in your hand that you quickly realize is a living thing. It's evolving. There's yeast in that bottle that's doing something. Now, every beer has a "drink-by" date, past which you no longer realize the benefits of aging. But a huge lesson for me is that I need to give my beers time to come into their own, and let nature takes it's course. On a macro level, this is a huge lesson to learn for life in general. There are things which I have no control over, though I wish I did. "The recipe said the beer will be ready 4 weeks after bottling, and it's 4 weeks later, so this beer better be ready now!" But yeast doesn't really care what I want, or when I want it. It's going to do it's thing in it's own time. There is, to borrow an idea from Ken Myers, a "givenness" to beer making that resists attempts to impose a timeline on it. Sure you can tweak things in your process, but you're ultimately at the mercy of the yeast. One of the reasons I got into homebrewing was that I thought it'd be good for me to have a hobby that requires patience, and that does not give immediate feedback. As a programmer, my life is all about instant feedback. I can start with an empty app, and in a few minutes, with basic models, controller actions, and tests, have a working system. It won't be perfect, but you can push this button and stuff will happen. Making beer is not like that. The brewing process takes hours, the bottling process takes time and attention to detail, and then you're waiting weeks for the beer in the bottle to be ready, and even when it's "ready" it might not be truly ready (as my experience has now shown). There's a part of me that's afraid of the negative effects of technology on my soul. Just in the act of software development, I unconsciously create habits and expectations that spill over into other areas of my life. But unfortunately, there's not a 1:1 relationship between software development and being a good father, for example. In the former, I can sit down in front of my laptop and clear a bug list in a couple of hours, and those bugs will (hopefully) never appear again. In the latter, it might take days, months, years for my wife and I to work through issues and establish good habits with our children, or within our marriage. And even then, constant vigilance is required to fight against sinful relational tendencies, or to reinforce good habits through the discipline of repitition. Does my work in and use of technology prepare my soul for that fight? More and more I think it does not, hence my journey into homebrewing, and also a big reason why I've disciplined myself to work out strenuously on a regular basis. These two things (homebrewing and working out) are valuable to me for the counter-balancing practices and insights they yield relative to my day-to-day experience. The Bible is always my source of ultimate truth and illumination. But I have found it helpful to force myself to do things that are not comfortable precisely because they put "flesh" on the things I believe about what constitutes human flourishing. This lesson, about giving something time to evolve and mature on it's own terms, and providing the environment in which it can flourish while having the patience to let the process happen, is one I'm happy to have experienced. I'm even happier that I didn't throw out those bottles of homebrew.]]> We recently rolled out Creative Commissary, our project management tool for image producers. It's a completely separate app from TalentSoup in every way. They do not share databases, and communicate via a JSON-based RESTful API. Clients build and manage projects in Commissary, and the talent details (name, contact info, etc.) are stored in TalentSoup. In TalentSoup, talent have the option of selecting any of their photos as the main photo. This is the photo whose thumbnail will be shown in search results and project galleries. This main photo is the talent's first impression on the client, and therefore the talent's most important photo. Originally, when doing a search return (Commissary sending search parameters to TalentSoup, TalentSoup returning a search result to Commissary), I was including the static URL for the main photo at the time of the search as the main_photo value. This value would be stored in Commissary and would be referenced when rendering a gallery page for the client to look at. One thing I didn't take into account, however, was that talent might change their main_photo anytime after the gallery for that particular project was built. When that happened, the image being displayed in the gallery wouldn't change, because the URL was being stored statically on the Commissary side. This is a problem because sometimes talent change their main_photo based on what type of project they're being considered for (we let them know when they're added to a gallery, and what type of job it is). For example, right now we're managing a job for a client who is going to be photographing people running. As a result, some talent changed their main_photo to show them running or doing some sort of physical exercise. This should be reflected in the galleries, obviously! Basically what I needed was a service like Gravatar. One URL I could pass around between TalentSoup and Commissary that would always render the given talent's main_photo. I came up with a simple solution. I am not sure if this is the best way to accomplish this, but it works. Here's a controller action that lives on the TalentSoup side: #app/controllers/users_controller.rb class TalentController < ApplicationController def main_photo @user = User.find(params[:id], :include => :main_photo) redirect_to @user.main_photo.url(:medium) # medium thumbnail url end end It takes the talent's id as a parameter and will always display the main_photo. Now I can do this on the Commissary side: <img src="<%= @talent.id %>/main_photo" /> And I'll always get the main_photo for a given talent even when they change it. We can make this more efficient by caching on the TalentSoup side, and invalidating when the talent changes their main photo. If you want to use ActiveRecord with Sinatra, the sinatra-activerecord gem is the way to go. The examples in their documentation are for the sqlite3 adapter. I thought it'd be helpful to show how I used this gem with MySQL instead. I created a models folder in my app root, where I store my ActiveRecord models. You can include all of them in one file (like models.rb) or give each model it's own file, and include it explicitly. We'll use the former for this example. # config/database.yml database: dbFoo username: db_user password: db_pass host: localhost port: 9999 Now we tell the gem about our db settings: # app.rb require 'sinatra' require 'sinatra/activerecord' require 'yaml' require './models/models.rb' DB_CONFIG = YAML::load(File.open('config/database.yml')) set :database, "mysql://#{DB_CONFIG['username']}:#{DB_CONFIG['password']}@#{DB_CONFIG['host']}:#{DB_CONFIG['port']}/#{DB_CONFIG['database']}" get '/' do @items = Item.all erb :index end Simple, and you get all the power of ActiveRecord as well as the ability to run migrations. Sinatra sinatra-activerecord]]> The following was written by my pastor, Ben Miller, as counsel to a family raising a young child. I've been given permission to reproduce the letter here. The only modifications have been to remove references to specific names and life situations. Hi, [redacted], I wanted to follow up on our brief conversation last night. I know the parenting issues you're sorting through are really difficult, and I'd like to offer whatever encouragement and counsel I can. I doubt I'll say anything here that you haven't already thought of, but maybe something will at least provide an additional perspective. 1. As you know, the goal in parenting is not to bring forth a product that meets the specifications in some pre-printed blueprint somewhere. There isn't a preformed set of specifications "out there" that says, "This is exactly what it will look like for your child to be Christlike." That may be obvious, but what it means in practice is that it's okay as parents to feel (pretty much every day!) a bit unsure of the best way forward. We ourselves are still discovering what the particular "product" is supposed to be, and sometimes our methods have to be retooled significantly as we move along in that discovery process. You know from scripture that your child is to be conformed to their Lord and Savior Jesus Christ by the power of the Holy Spirit, but what you don't know is what precise form that will take (which, of course, means you're still learning every day what are the best methods to guide them toward their individualized conformity to Jesus). In short, if you feel uncertain, that doesn't mean you're blowing it! 2. On a related note, your child is not a problem to be solved, but a gift to be enjoyed and a mystery to be wondered at. This doesn't take anything away from the fact that they must be trained, but there's a world of difference between (a) training a child you have come to regard (not at all maliciously, of course, but simply because you're tired, perplexed, and frustrated) as a "problem child," and (b) training a child from whom you constantly step back and say, "What a wonderfully mysterious gift God has given us here." Part of the reason you get overwhelmed in training your child is that they're beyond figuring out - and God made them that way! We need to back away as parents sometimes and simply enjoy that. 3. In light of the medical issues, remember that your child is much more than a physical body; and remember also that they're much more than a will to be subdued. At the center of their being is something the Bible calls the heart, and your ultimate goal in parenting is to win their heart to you and to their Triune God. "My son, give me your heart" (Proverbs 23:26); that's parenting in a nutshell. It can be unclear, when children are very young and don't communicate well, just how to interact with their hearts; but as they get older and begin to talk, you get significant glimpses into their hearts every day, and you will have many, many opportunities every day to reach into their hearts with the love and truth of Jesus. This doesn't always mean talking to them; it means, for example, being glad (or at least acting glad!) to see them when they get out of bed in the morning, reaching out to touch them when they come near you, smiling at them, pointing out to them the good gifts of God, speaking scripture in their hearing, being careful of frustrated tones and gestures and even "vibes," being quick to restore affection after the sharpness of discipline, speaking well of them to others, noticing the little things they do that they yearn (yea, clamor) for you to notice, etc. Children need to feel drawn in by their parents, not pushed away (overtly or covertly). Again, the goal is to establish a bond of affection heart-to-heart that will then open their ears when it's time to rebuke, chasten, and instruct. 4. Again in light of the medical issues, you will continue to learn every day how to balance meeting your child's needs (which are real) with the dark reality that they (like all of us) will use their needs to manipulate you to get what they want. One of your child's needs is to know that when they push against a clear (and reasonable) boundary you have set, it's not going to move. Nothing breeds insecurity in a child so much as not knowing who's in charge. As you build the bond of affection I mentioned above, you will find that your setting and enforcing of boundaries will not frustrate your child (though they may still resist, just to make sure you truly mean it), but will give them great comfort and reassurance. 5. One of the hardest things to learn in parenting is when to skirt a particular battle in order to win the war. There are certain things your children are doing to do every day that are going to drive you insane, and now is simply not the time to address them. There is always a need to prioritize "battles" in the long "war" to win the hearts of our children. A parent who can't wisely prioritize, and then let go of certain things for the present, is going to be a parent who eventually gets completely overwhelmed - and heaven help the kids at that point! 6. Connected with this, I would suggest that you both sit down and hammer out a set of (by this I mean two or three) simple, clear, attainable goals for your child's development (say) over the next three months (or six months), and then teach and discipline diligently, consistently, and unswervingly to those. Other stuff will have to wait. You don't build a roof at the same time you're building a foundation. For example, this summer we're working with our kids on expressing gratitude and taking jurisdiction over particular "zones" in the house. 7. On the social side of things, listen to wise counsel from others, but don't be ruled in any way by the opinions of others. You are not bringing up your child for either set of in-laws, or Trinity Church, or the medical professionals who weigh in; you're bringing them up for the Triune God - and it is you who are called to bring them up, which means you need to be comfortable making wise decisions and seeing them through, regardless of what others think. This doesn't mean you're hard-headed and don't listen (I wouldn't be writing this email if I were trying to encourage that!), but it does mean you're comfortable with the fact that the God of all grace - and He alone - is your Judge in this business of parenting. Everything else is just human opinions. 8. [The husband], this is directed especially to you: be very careful (notice the "very" in that phrase!) about too many outside commitments at this stage in your family's life. You don't have time for a lot of outside commitments; your marriage and your children are your first priority, and whatever doesn't serve those relationships, at this stage in the game, is questionable. You need to unplug from stuff and connect with your children, especially this child. Whatever it takes. 9. Don't worry, I'm almost done! On a penultimate note, don't worry too much about visible results, especially day to day. God will bless faithful obedience. Believe that. You'll see the fruit in harvest season; right now it's planting and watering time, and it often looks like the plants aren't growing. They are, because God is at work. "Be it unto you according to your faith." 10. Above all, never let a day pass without praying fervently for the work of the Holy Spirit in all of your children. "You have not because you ask not." With deep affection in Christ, Ben]]> I've been told that it's good practice to blog about code you've written, and the thought process behind it. Doing so gives people an insight into how you approach problems, which at times is more important than what exactly you wrote. This is such a post. My full-time job is as a mechanical draftsman for an HVAC contractor. Our work is mostly in high-end residential apartment buildings and hotels in the 5 boroughs of New York City. We build steam and water-based HVAC systems (sometimes both in the same building). At work, we use QuickPen Pipe Designer 3D, on top of AutoCAD, to draw 3D models of our mechanical piping. A PRV station</center> To get pipe to the field, the draftsmen first take the contract drawings from the architect and engineer, and we draw our pipe on the floor layout. We then attend coordination meetings, where all trades (plumbers, electricians, sheetmetal, etc.) work on a set of drawings that has everyone's "stuff" on them. This lets us resolve conflicts and hits. Pipe moves around, duct gets raised or lowered, and so on. When all trades sign off on the drawing for a particular floor, the draftsmen are then free to go back to their offices, update their own shop drawings, and work on fabricating their pipe. The adoption of BIM and related software stacks promises to make/has made some of these steps unncessary, but many jobs are still coordinated like this. The next goal for the draftsman is to hand the fitters in the shop what are called "fabrication sheets", or "cut sheets", that detail what needs to be fabricated, and what tag that piece should be given. Fabrication pieces</center> In the above image, R-03 is the tag number given to a piece of pipe that is 1-1/2" in diameter, 9'-6-1/4" long, and has a 1-1/2"x3/4" tee on one end. We only want one of these pieces tagged R-03. A fitting on the end of a piece like this is called a "make-up fitting". Usually, threaded pipe like this only has one make-up fitting. The other end of the pipe is a threaded end, and the fitters put these pieces together to construct all the piping on a given floor. We send "shop drawings" to the field that detail how these pieces fit together: Shop drawing with pipes tagged</center> QuickPen makes it (almost) easy to do all this. I draw my pipe in 3D, at real elevations. I then use QuickPen's ISO manager to create my fabrication pieces by literally clicking on a piece of pipe, and it's make-up fitting. QuickPen auto-increments the counter as I create pieces. While QuickPen makes it easy to tag your pipe for fabrication, and make a shop drawing with ballons for each tag, it doesn't make it THAT easy to create the cut sheets. When you ask QuickPen to export your Bill Of Materials so that you can make a spreadsheet to print out and give to the fabricators in the shop, you're given the option to export to a CSV. Here is what QuickPen gives you, truncated for our purposes: "Iso Number","Size","Quantity","Length","Long Description" "R-02","1-1/2""","1","9'-6 1/4""","PIPE, S/STD A-53 GRADE B ERW T.B.E." "R-02","1-1/2""x3/4""","1","","TEE REDUCING, THRD, 150LB MALLEABLE IRON" "S-13","2""","1","9'-6 1/4""","PIPE, S/STD A-53 GRADE B ERW T.B.E." "S-13","2""x3/4""","1","","TEE REDUCING, THRD, 150LB MALLEABLE IRON" And so on, for each piece. The CSV is always un-ordered by ISO number (tag number). So basically what you get is a listing of each individual component of a fabrication piece, and not the whole piece itself. Sometimes this is OK, because there are pieces that may have more than two components. But 95% of the time a fabrication piece is a length of pipe and a fitting (tee, elbow, valve, coupling, etc.). I have to massage this CSV so that it's useful to the shop fabricators. For a while I did this by hand, which was tedious. I made mistakes as well, which were costly in real dollar terms. When union steamfitters call the office while they're standing on the 50th floor deck of a building, in the middle of winter, screaming that your pipe doesn't fit...well, that costs everyone money in wasted time and material. In this way, drafting is different from much of the programming I've done recently. Aside from the processing of subscriptions, bugs that occur on TalentSoup don't immediately result in lost money, but simply an annoyance. Drafting is different: a mistake could cost tens of thousands of dollars. So after spending so much time on these CSVs, and making some bad mistakes, I decided to let the computer handle the CSVs for me. This problem was always begging to be solved by a script. The result is cut-sheets. Now that I told you more than you wanted to know about mechanical piping, I want to quickly walk though the parsing script. First, I shamelessly steal Rails' blank? method, which is useful in this context. Then I set up some constants that map to the column indexes in the CSV. It's more readable this way. Then I read the CSV in as an array. require 'csv' class Object def blank? respond_to?(:empty?) ? empty? : !self end end ISO_NUMBER = 0 SIZE = 1 QUANTITY = 2 LENGTH = 3 DESCRIPTION = 4 fabrication_pieces_as_array = CSV.read("isos.csv") Sometimes, QuickPen's Bill of Materials generator brings in pieces of pipe or fittings that are not part of any fabrication piece. I remove them from my array so I can process the CSV knowing that I am only working with fabrication pieces. The motivation for want to assume this will be clear shortly. fabrication_pieces_as_array.delete_if { |x| x[ISO_NUMBER].blank? } Next, I change some of the descriptions of the pieces to conform to our shop standard. Also, if the current array element is a fitting (which doesn't have a length as it's not a piece of pipe), then I put the fitting size into the description. This is so when I make this element the make-up fitting of a piece of pipe, I get the fitting size in the description without any other manipulation. fabrication_pieces_as_array.each do |x| x[DESCRIPTION].gsub!(/, 150.*/, '') x[DESCRIPTION].gsub!(/ 150.*/, '') x[DESCRIPTION].gsub!(' PIPE', '') x[DESCRIPTION] = x[SIZE] + " " + x[DESCRIPTION] if x[LENGTH].blank? end Now that my fabrication_pieces_as_array object is cleaned up, I can start combining pipe pieces with their make-up fittings. First I create a hash using Ruby's awesome group_by method. What I get back is a Hash whose keys are the ISO_NUMBER, or tag number. {"R-02"=>[["R-02", "1-1/2\"", "1", "9'-6 1/4\"", "PIPE, S/STD A-53 GRADE B ERW T.B.E."], ["R-02", "1-1/2\"x3/4\"", "1", "", "1-1/2\"x3/4\" TEE REDUCING, THRD"]], "R-03"=>[["R-03", "1-1/2\"", "1", "9'-6 1/4\"", "PIPE, S/STD A-53 GRADE B ERW T.B.E."], ["R-03", "1-1/2\"x3/4\"", "1", "", "1-1/2\"x3/4\" TEE REDUCING, THRD"]], "R-04"=>[["R-04", "1-1/2\"", "1", "9'-6 1/4\"", "PIPE, S/STD A-53 GRADE B ERW T.B.E."], ["R-04", "1-1/2\"x3/4\"", "1", "", "1-1/2\"x3/4\" TEE REDUCING, THRD"]]} iso_pieces = fabrication_pieces_as_array.group_by{|row| row[ISO_NUMBER]} Now I can test to see how many pieces each tag number has. As I said before, 95% of the pieces I make will will have two components: a length of pipe and a fitting. For cases where the pieces are more complex, I handle those manually, usually by making a sketch of the piece in QuickPen. I'll make a note on the cut sheet to "See Sketch" for that pieces. Otherwise, I now go through my original array. For each element I test to see if it's ISO_NUMBER number has two components, and if the LENGTH column is not nil?, meaning this element is the pipe portion of the fabrication piece that also has one make-up fitting. I add the fitting row to the pipe row because the pipe row has the pipe LENGTH; it just "feels" more natural to do it that way. fabrication_pieces_as_array.each do |x| if iso_pieces[x[ISO_NUMBER]].size == 2 and !x[LENGTH].blank? x[DESCRIPTION] = iso_pieces[x[ISO_NUMBER]].select{ |y| y[LENGTH].blank? }.first[DESCRIPTION] end end Now that I've replaced the DESCRIPTION column of each piece of pipe with the corresponding make-up fitting, I can remove the rows of make-up fittings, which, again, don't have a LENGTH value. Then I sort the array by ISO_NUMBER. This is not necessary, as I can do this in Excel when add this information to our template, but it saves me a step. fabrication_pieces_as_array.delete_if {|x| x[LENGTH].blank? and iso_pieces[x[ISO_NUMBER]].size == 2}.sort!{ |x, y| x[ISO_NUMBER] <=> y[ISO_NUMBER] } Lastly, I generate a new CSV with all the pieces and their make-up fittings. Pieces that have more > 2 components are also listed, but they have not been "combined" together, so I'll resolve them manually. At the bottom of the CSV I also generate a bill of materials, which is a count of each fitting, so the shop knows how many of each to order from the supply house. Ruby's group_by gets all the distinct pieces into a hash, and then it's as simple as getting the size of each key. CSV.open("cut-sheets.csv", "wb") do |csv| csv << ["ISO", "SIZE", "QUANTITY", "LENGTH", "DESCRIPTION"] fabrication_pieces_as_array.each { |x| csv << [x[ISO_NUMBER], x[SIZE], x[QUANTITY], x[LENGTH], x[DESCRIPTION]] } fabrication_pieces_as_array.group_by { |x| x[DESCRIPTION] }.each { |key, values| csv << ["", "", values.size, "", key] } end The finished CSV looks like this: Iso Number,Size,Quantity,Length,Long Description R-01,"1-1/4""",1,"9'-6 1/4""","PIPE, S/STD A-53 GRADE B ERW T.B.E." R-02,"1-1/2""",1,"9'-6 1/4""","1-1/2""x3/4"" TEE REDUCING, THRD" R-03,"1-1/2""",1,"9'-6 1/4""","1-1/2""x3/4"" TEE REDUCING, THRD" R-04,"1-1/2""",1,"9'-6 1/4""","1-1/2""x3/4"" TEE REDUCING, THRD" R-05,"1-1/4""",1,"9'-6 1/4""","1-1/4""x3/4"" TEE REDUCING, THRD" R-08,"1-1/4""",1,"9'-6 1/4""","1-1/4""x3/4"" TEE REDUCING, THRD" R-09,"1-1/4""",1,"9'-6 1/4""","1-1/4""x3/4"" TEE REDUCING, THRD" R-10,"1-1/4""",1,"9'-6 1/4""","1-1/4""x3/4"" TEE REDUCING, THRD" R-11,"1-1/4""",1,"9'-6 1/4""","1-1/4""x3/4"" TEE REDUCING, THRD" ... ... "","",3,"","1-1/2""x3/4"" TEE REDUCING, THRD" "","",8,"","1-1/4""x3/4"" TEE REDUCING, THRD" "","",9,"","2""x3/4"" TEE REDUCING, THRD" "","",1,"","2-1/2""x3/4"" TEE REDUCING, THRD" "","",1,"","2-1/2""x2"" REDUCER, CONC " "","",1,"","4""x3/4"" THREAD-OLET" I can plug that into our template, and I am good to go. Manually, this would take up to an hour depending on how many pieces are on the drawing. This script takes less than a second. This is a simple script but it's made my life easier, and I got to write out my thought process, which was fun. If you have any suggestions for improvements, feel free to reach out. I've used authlogic for authentication and session management on a number of projects. For one application, I wanted to eager-load an association at the time of a successful sign-in. I thought it'd be helpful to demonstrate the code here, since it took some digging through the documentation and other examples to figure out how to accomplish this. Basically you want to create a new session within a with_scope block, and pass a find_options hash with whatever options you need. Here's the create action in the UserSessions controller: class UserSessionsController < ApplicationController def create UserSession.with_scope(:find_options => {:include => :photos}) do @user_session = UserSession.new(params[:user_session]) end if @user_session.save flash[:notice] = "Login successful!" redirect_back_or_default account_url else render :action => :new end end end authlogic documentation]]> Today's workout called for a 5000m row. I do not have access to a C2, so, after some consultation, I decided to run 3 miles instead. I was told to run it hard, and I set myself a goal of 3 miles in 21 minutes. I have never done 3 miles in that time. I have come close before, 21 minutes and change, in my running days. But that was 5 years and 20 pounds ago. I don't train that way anymore, I use the weights a lot and get my "cardio" from brutal circuits. My workouts for the last few months have featured no running whatsoever. Immediately you see the problem. The ego suggested a goal, and I listened, and adopted that goal as my own. I had not put in the work necessary to achieve that goal, and I thought I could just show up and, with pretty much nothing in the bank, set a new personal best. The smarter thing would have been to set a more achievable pace, maybe 22:30 or 23 minutes. Those times are not fantastic but at my current fitness levels, and in the context of my larger training plan, they would have represented good work. More importantly, I could have finished the workout. By now, you know how the story goes. I started off at about a 6:45/mile pace. Two laps in and I realized the hole I had dug for myself. Approaching the mile mark, I had "the moment". Faced with the consequences of my decisions, there were two paths: continue on and live with myself with integrity and suffer, or give up. I chose to bail. One mile done, and I was done too. In the initial moments after quitting, I tried to rationalize my decision. "My lungs hurt", "my legs hurt", "it's humid out", "one mile is good for not having run in a while". But the truth is, I made a choice. I chose to quit, I chose to stop putting one foot in front of the other. I did not have enough integrity to face the consequences of my actions. I lied to myself. The walk back to the car from the track was tough. I took stock of other areas in my life where I had dug myself a hole that I cheated my way out of. It's not easy to come face to face with yourself as you really are, not as you imagine yourself to be. It's interesting to me how I first thought that what I learned today was that I need to pace myself and fight against my ego. In fact, I learned that you cannot expect to achieve what you did not work for. And the answer is not always to work harder, to run yourself into the ground. Sometimes the answer is to just starting working, period. Second, when have dug yourself a hole and find yourself in an uncomfortable situation that is of your own making, stand your ground and live with yourself. Sometimes it means suffering. In fact, it almost always does. But you come out on the other side with integrity. I did not have that integrity today. I will have it on Monday, and every day after that. And not just on the track, or in the gym, but in all of life, with the help of God. the moment Will And Suffering]]> At TalentSoup, we recently launched a new application privately to a number of our trusted customers. For exception handling, I decided to give bugsnag a try. In the past I've used the exception_notification gem, and have even rolled my own solution for handling exceptions, but for this new app, I thought I'd do something new. I'm a big fan of leveraging existing "solutions" for common tasks, so I can focus on the core business of the application (see Buy-vs-build for an early stage startup). bugsnag has nice documentation to help you get started. What I wanted to do was just catch every exception that's generated by the app, regardless of specific type. As the app matures and we decide what we want to do in a particular case, we'll handle each exception type differently, but for now, a global catch-all will suffice: # config/initializers/bugsnag.rb Bugsnag.configure do |config| config.api_key = "API_KEY" config.ignore_classes = [] end # app/controllers/application.rb class ApplicationController < ActionController::Base rescue_from Exception, :with => :handle_public_excepton protected def handle_public_excepton(exception) render :template => "shared/exception" end end So we catch every exception, and display a generic error page that lives in app/views/shared/. This wound up being trivial but it was a good excuse to dig into Rails 3 internals and learn about how exceptions are handled within the framework. rescue_from dispatching rails/activesupport/lib/active_support/rescuable.rb]]> One of the things that makes being a developer interesting (or maddening, depending on your perspective) is the ever-present need to learn new "stuff". Even if time does not allow you to play with certain technologies or frameworks, you should still be aware of their existence, and have a general idea of what they do and where you might use them. The problem, as I see it, is that it's difficult to separate the signal from the noise. With so many frameworks, methodologies, data stores, servers, etc. one can feel overwhelmed quickly. A few prominent voices start touting this or that approach, and you're left with the question: do I jump on board? Or do I stick with what I know and what has worked, and potentially get left behind? These questions can affect careers. You have to learn to balance the desire to stay up-to-date with the temptation to drink the Kool-Aid and take your eye off the ball, which is the fact that, in the words of jwz, you're not here to write code, you're here to ship products. What approach or technology or framework will help you actually ship code? Over time, I have found DHH to be a sane voice of reason in what can sometimes be an insane Rails community. The framework he created has basically furnished me a career and lifestyle, so I have a high degree of respect for him. Not only did he create the Rails framework, but 37signals has created some of, if not the most, successful Rails applications to date. When he talks about development, I listen. In the last few weeks I've watched DHH's Twitter feed with great interest, as he's been offering his thoughts on some of the current Rails development trends that are relevant to my projects. His approach resonates with me, as he seems to advocate a sane, simple, common-sense approach to Rails development. I've taken the time to aggregate some of his recent Tweets into paragraph form. This is helpful to me, and maybe it will be helpful to you. Spurred by this debate on rails-core, I'd like to see some more real FactoryGirl code gisted. All the tests I've seen written with FactoryGirl, or other factory approaches, have been worse than the equivalent fixture approach. I like @tenderlove's theory that people got hooked on factories before foxy fixtures with named associations and never revisited. That's really the sad part about both rspec and FactoryGirl. Newcomers are lead astray to these tar pits instantly. It's like most Rails books can't wait to pimp the framework ride. Hey yo, that chariot needs some spinning rims, yo! Ugh. @rgreen: everone is pushing Rspec. Where do we go for better instructions? @dhh: See Agile Web Development with Rails and stick to test/unit as it comes out of the box. @paulvolpato: if you don't mock often, do you tend to write unit tests where the object under test talks to real collaborators? @dhh: Yes. I don't believe much in the "complete isolation" idea. My unit tests are more like model tests and do hit the db. Sources: It's easy to forget that there are still people who proudly call themselves software architects, use UML, and clamor for repeatable process! I was only reminded by reading. Ugh. Here's a process for you: Software architects who don't implement a substantial amount of what they design will fuck shit up. Badly. Following up on the discussion from @rubyrogues, this is a great example of SRR pattern wankery:. Premature extraction! The over-architecture of injecting the mailer is particularly offensive. Reminds me of that thread where someone got canned for such code. Test is simple: Look at the original code and compare to the concoction that follows. Forget the authoritative pattern name. Is it better? This coordination work is exactly what the controller is there to perform. It's completely fine for controllers to be more than 1 line. (Just to be clear, I think moving the mailing action into the model is an abomination. Leave it in the controller. That's what it's for!) Preemptive programming is what happens when you just can't wait to apply your patterns until they're actually needed. I didn't think it was possible, but Single Responsibility Principle appears to be producing even more bullshit code than Law of Demeter. Love how these patterns are not supposed to bear critique in any of their examples. It's always about MAINTAINABILITY. You have to believe! If you can't provide a convincing before/after code for your pattern, you're selling snake oil. Fuck your faith-based programming bullshit. Another example where SRR went hog wild:. Every line of activity becomes a class instead of just a method. Fuck me. (The roar of the "proper OO" crowd in that thread going rah-rah-rah is hilarious, btw.) I think having the mailer call inline in the controller is a better fit until you have more real problems tugging at it. I'm a little late to the party, but unless you're actually reusing this PostComment logic in multiple places, I agree with your senior developer. Here's how I'd swing it in the regular controller: class PostsController before_filter :set_entry before_filter :reject_spam def create @comment = @entry.comments.create!(params[:post].permit(:title, :body).merge(author: current_user)) Notifications.new_comment(@comment).deliver TwitterPoster.new(current_user, @comment.body).post if @comment.share_on_twitter? FacebookPoster.new(current_user, @comment.body).action(:comment) if @comment.share_on_facebook? end private def set_entry @entry = current_account.entries.find(params[:id]) end def reject_spam head :bad_request if SpamChecker.spammy?(params[:post][:body]) end end I'm assuming that the language detection is something that needs to happen in the comment, so I would keep it in that model -- but not sure what it does. (In response to this thread:) Sources: @seandevineinc: Any advice on when to use AR observers instead of AR callbacks? @dhh: I basically do not use Observers any more. I find them too indirect. I use callbacks all the time, though. But a general rule would be that callbacks should only be used for model concerns, observers can trigger external services. So if saving a model should send an email, I'd use an observer if I couldn't do it in the controller. Not a callback. @rdetert: what about observers for sending notifications? @dhh: I'm not a big fan in general. It makes the flow opaque. Just triggering from the controller is much simpler in most cases. Sources: P.S. - The new <a href=””>bitly</a> is awesome.]]> I received a lot of feedback, via Hacker News, Twitter, and email, from my post titled How To Do A Startup On The Side And Not Lose Your Family. Based on that feedback, I have a lot of ideas for future posts. There are a lot of people out there trying to do the "startup on the side" thing while leading a full family life, and perhaps there hasn't been a lot written specifically for that group. I do not claim to be an expert, but my experience, limited though it may be, might be helpful for those folks. This post is about co-founder dynamics, particularly in the case of one co-founder being full-time, the other being part-time. As with my last post, this is simply my n=1 experience. What follows is not meant to be prescriptive but rather descriptive. It might seem crazy and foolish but it works for me. In 2005, 3 of my friends and I created a social networking startup. My 3 co-founders were working on the project full-time. I had just gotten married, and was one year into a great job as a Java developer at a large bank in NYC, with a baby on the way. There was no way I was leaving that situation to chase the dream full-time. So our setup was 3 full-time guys, me part-time, with the expectation that through either revenue or investment, I'd one day be able to work full-time. I wound up leaving before I had that opportunity, after about 18 months. I was terrible at balancing work/life/startup, and the strain on my young marriage caused me to neglect working on the startup, which was not fair to my co-founders. A graceful exit was the best option for all parties. In 2009 I joined TalentSoup. My co-founder, Rad Harrell, had started the company in 2006, and brought me on board as a technical co-founder. The setup there was similar: Rad does TalentSoup full-time, it's how he feeds his family. I do my work part-time. So that's my experience. Two startups, both done part-time while my co-founders were full-time. The first was unsustainable for me, my involvement in the second is still going strong after 2 1/2 years. Before discussing the dynamics of how co-founders work together, let's take a step back and talk about beginning that relationship in the first place. Much has been written about the qualities to look for in a co-founder, technical or otherwise. To me, the most important thing is character. Do they value what I value? Are their priorities, even if they don't have a family like me, the same as mine? Do we have common ground on which to relate to one another, and understand each other? Is this person not only trustworthy, but open and honest? These are not trivial concerns. Doing a startup is very similar to a marriage in that, in many ways, you are sharing a part of your soul with another person. Anything that you find mildly annoying or grating about the other person will certainly show up, magnified 1,000 times, in a co-founder relationship, especially one that takes place in the context of having a family and other external pressures. Trusthworthiness, which is the part of character that's the most important to me, is a tricky thing to test for. I've lived and worked in New York my whole life, and as a result I've developed stereotypical New York cynicism. I default to "I'm not buying it". This cynicism, while sometimes harmful in other areas, is absolutely an asset for testing trustworthiness. When someone speaks to me, does my instinct incline me to believe them, or dismiss what they're saying? I think I have a good instinct for that kind of stuff, developed over time, having heard dozens of startup ideas and talked to countless people. This came in handy when I first spoke to Rad. We had a phone conversation for an hour, and he pitched me on the project. He was open about everything: the past, the current state of the company in all areas, what his vision for the future was, and what he was willing to give to get me on board. There was a recognition that I would be the technology lead, that his expertise was limited in that area, and I'd have freedom to do what I felt needed to be done. You might think that's too much information to give in a first discussion, but his openness, as well as my gut telling me that this guy was being absolutely real with me, endeared me to him. I remember telling my wife that I liked Rad so much after that call, I felt like I wanted to do the startup just to see him succeed, never mind what would be in it for me. This whole trust thing is the cornerstone to the whole co-founder relationship. As you'll see shortly. So now you've found a co-founder. If both of you are going to work full-time, it's pretty easy to decide you'll split the equity somewhere around 50/50. But what if one of you works full-time while the other works part-time? How do you split equity? This is where things get tricky. Keep this in mind: your number one goal in a startup is to ship something people want. Especially in the early stages, work has to happen at a fast and furious pace. You are in constant shipping mode. Whenever you're actually sitting down, working on your startup, a couple of hours wasted on anything other than shipping code is a disaster. Keeping this in mind will help in two ways when deciding equity splits: Even though figuring this split out is very important, it's not the most important thing. When you're spending energy on anything in an early startup (including equity splits), you're asking: "How will this help me ship code?" That second point often gets lost in the mix when these discussions take place. I've seen things like this: "I'm full-time and I get X%, my part-time co-founder gets Y%, and when he goes full-time, I'll have X-10% and he'll get Y+10%". I've been the guy on the other side of that equation, and I can tell you that it doesn't motivate me to know that I get more equity if I am full-time. In fact, I think knowing that there's more % waiting for me if I can just cross the full-time chasm actually stresses me out, which affects me emotionally, which affects me mentally, which negatively impacts my ability to...wait for it...ship code. Call me weak-minded but that's how I'm wired. You might be different; n=1. Maybe the aforementioned approach works for your personality type, in which case, do it! So whatever you are thinking the percentage splits are, might I suggest just making them that way from the start? Of course everyone should be vested, and the appropriate contractual steps should be taken to ensure everyone's backs are covered. But if, as the full-time guy, you really trust your co-founder, and really trust that he's working as hard as he can to make the company a success, then why not start with whatever your "when you're full-time" percentage is? If you can't trust your co-founder, then maybe you should find another one. Notice I am not suggesting hard and fast percentage amounts. There are alot of considerations: which one is the technical co-founder, and therefore actually building the product? Are both? Are neither? Has either partner invested money into the company for bootstrapping? Is the business existing and profitable already? In these discussions, be open and honest with your wants. It comes down to this: the equity split shouldn't be used a carrot on a stick, but rather as a tool to create good morale for the people involved in the startup. By all means, vest, and CYA with contracts, etc., but at the end of the day, you either trust your partner or you don't. You have a co-founder, and you have all the equity stuff worked out so you'll know how many millions you'll get when Google acquires you. You want your Ferrari in red, right? With black leather? Sure, we can do that. Now you get to work. You hustle and make the most of all the time you have, balancing as you go. You make use of things like Basecamp, Campfire, iChat, text messages, etc. to communicate asynchronously. And you don't IM your partner about a bug, you open a new issue in GitHub so he can look at it when it's convenient for him, and you both have a log to refer back to. If you're a non-technical co-founder, you learn basic HTML so you can do copy work on the site, and you learn how git works so you can be involved. Spencer Fry wrote a great post about this a while back. If you're the technical guy, you look at how you can make your co-founder's life easier through automating common admin tasks. Most of all, you...chill out. If your co-founder takes a night, or two, or three off, it's ok. Because you trust him. He's not "deceiving me by not working for his fair share", he's doing what he needs to do, and when he gets back you know he's going to kill it. TalentSoup was an existing business making money when I joined, but it was not a freestanding entity. That's changed. We've automated many of the administrative tasks around the site, things Rad was doing manually, or tasks he wanted to do but could not. This increased efficiencies, meaning we could do more work in less time, and therefore make more money because we could handle more jobs simultanenously. We could focus on serving clients and not on the tedious stuff. I also conceived and implemented our paid subscription service, Webcomp Pro, which created a new revenue stream. In other words, I am not just building features that Rad dreamt up. I am actively involved in product development, short-term and long-term, always on the lookout to create revenue through increasing our efficiency, or introducing a new product. I am a partner in the business, with an equity state that makes me happy and frees me to think about shipping code, not chasing a carrot. Flexibility in the when and where is also very important. Don't set a "minimum expected hours per week". If you're working with someone who has a full-time job and family, and you add the expectation of X amount of hours per week on top of that to justify an equity percentage, it's going to be more harmful than helpful. I speak from personal experience, being that family guy. Now of course, if over the long term your partner is not pulling their weight, then you say what needs to be said, or do what needs to be done. But I like the idea of judging based on results only. If I am consistently shipping code that customers are using, and we are making money, does it matter how many hours I worked last week, or that I worked those hours in my boxers in bed late at night while everyone is sleeping? No, it does not. Ship code. Everything else is details. You also celebrate success, however small. New feature launched? Let's have some beers together over iChat. First paying customer? Alright! Our 1,000th user just signed up? Let's take the night off and take our wives out. Working asynchronously, in different locations (Rad is in beautiful Savannah, GA and I am on Long Island), means you have to be intentional about building the camraderie that being in the same room would normally bring. It's not easy, but it can be done. Sometimes I laugh at myself for the ridiculous things I celebrate, like fixing an annoying bug or changing the layout of a page, but then I remember these small celebrations are necessary because they give me an emotional boost, which helps me ship code. I was on a job interview once, and the person interviewing me asked what I consider success to be, just generally, not necessarily with relation to work, though it could be that. Whatever came into my mind. My honest answer was that success to me meant having a strong marriage, and children who grow up to love me and love God as well. I was kind of surprised by my answer. Before any business achievement, that's how I define success. And given that, my relationship with my co-founder makes perfect sense. And he is the same way (step 1: same values). We want TalentSoup to succeed financially. I want to make a lot of money; I am not embarrassed about that. But more than that I want to have a strong family, I want to live a good life and enjoy it. So I work hard, yes, but I also remember to relax and slow down. I don't stress about what Rad is or isn't doing, because I trust him, and he trusts me. If something needs to be said, either of us would say it. And if things completely broke down, there are legal structures in place to protect both of us. But I don't operate out of that. I operate on the assumption that we're both trying to build something beautiful together, in good faith, and if over a short period of time life gets in the way, that's ok. If you're doing a startup on the side while you have a family, you're already choosing a difficult path. Don't make it worse by partnering up with someone you can't trust.]]>.]]>
http://feeds.feedburner.com/ericfarkas
CC-MAIN-2017-39
refinedweb
24,691
72.05
Visual Studio 2019 for Mac version 8.7 is now available Jon Visual Studio 2019 for Mac version 8.7 is available today and includes support for gRPC / OpenAPI client generation and improved unit testing integration. Additionally, it includes several improvements for Xamarin developers, including Xamarin.Forms 4.8 Support. This release also includes initial support for macOS Big Sur, with the exception of Xamarin support. macOS Big Sur support for Xamarin is expected in one of the first servicing releases for Visual Studio for Mac 8.7. Are you ready for the latest version of Visual Studio 2019 for Mac? If so, version 8.7 is available for you to download today! With this release, we’ve continued to polish the existing experience, paying close attention to many of the problem areas mentioned by our users. gRPC and OpenAPI Client Generation Visual Studio for Mac now includes support for generating an API client from an OpenAPI or gRPC service. This allows you to generate the client from a local file or URL, manage service references, and regenerate the client code if the service changes. To add a new reference to an OpenAPI or gRPC service, right-click on the Connected Services node in the Solution pad and select Open Service Gallery. Once you’ve opened the Connected Services Gallery, you have the option to add either an OpenAPI or gRPC reference. Clicking on either of the options will launch a prompt allowing you to enter the service reference, either by file path or URL. You can also select whether to generate the following client class types when generating a gRPC client: - Client - Server - Client and Server - Messages Only (used to generate strongly typed classes based on message properties, with no generated server or client code) When generating an OpenAPI client, you can specify the namespace and additional options which are passed through to the code generator. Code generation is based on the dotnet-grpc and dotnet-openapi command-line tools. After generating a service reference, you can view and modify it in the Connected Services Gallery as shown below. For more information on using a generated OpenAPI client, see the Getting Started with NSwag tutorial. For more information on using a generated gRPC client, see the Create a gRPC client and server in ASP.NET Core tutorial. Right-Click to Run Unit Tests When editing a C# class that contains unit tests, a developer can run tests using the “Run Test(s)” item in a context menu by right clicking in the file, the body of a test class, or the body of a test method. The context menu for the editor has been updated to include Run/Debug Test options: These new commands can be run using the following keyboard shortcuts (in the Visual Studio for Mac key bindings): - Run Test(s): ⌘T - Debug Test(s): ⌘⌥T The Run command will run tests based on the rules below, in the “Rules for determining which tests to run” section. Running a test is the same as selecting it in the Unit Test pad and running that test. The Debug command will run tests the same as described above but will also attach the debugger when running the tests. You can customize these key bindings in the Visual Studio for Mac preferences (Visual Studio > Preferences > Environment > Key Bindings) as explained in the documentation. Rules for determining which tests to run The Run/Debug Test(s) commands will run one or more tests, based on the following rules. - Run all tests in a file by right-clicking in the body of a file with test methods, and choose Run Tests. - Run a single test by right-clicking in a test method, or on the method signature, and choose Run Test. - Run all tests in a single class by right clicking in the body of a class definition, or the method signature, and choose Run Tests. As an example, using the code below… using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GardenTracker.Test { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { } [TestMethod] public void TestMethod2() { Assert.IsTrue(true); } } [TestClass] public class UnitTest2 { [TestMethod] public void TestMethod3() { Assert.IsTrue(true); } } } Here’s what happens when you right-click in different places: - When you right-click inside a test method (e.g. inside TestMethod1()), just that test is executed. - When you right-click inside a test class but not in a specific test method (e.g. directly on the UnitTest1class), all tests in that class are executed. - When you right-click outside of a class, all tests in that file are executed. Right-click in the solution pad to run tests From the solution pad, a .cs file can be right-clicked and Run/Debug Tests commands used to run or debug all the tests in the file. Configuring Keybindings When customizing the keyboard shortcuts for the new test commands, the description field reads as follows: Smarter integration with Unity This release includes more Unity-specific diagnostics to help you catch problematic code sooner. We’ve added these new diagnostics which also include suggested code fixes that you can apply automatically: - Detect incorrect method signature with InitializeOnLoadMethodor RuntimeInitializeOnLoadMethodattribute. - Using Invoke, InvokeRepeating, StartCoroutineor StopCoroutinewith a first argument being a string literal is not type safe. - SetPixels invocation is slow. If you have an idea for how Visual Studio for Mac can provide even better diagnostic best practices and suggestions for Unity projects, visit our open source project on GitHub and make a suggestion. Xamarin Forms 4.8 This release of Visual Studio for Mac includes additional support for Xamarin Forms 4.8. This update to Xamarin.Forms is primarily focused on stabilizing current features, moving experimental features to stable, and delivering Gradient Brush support. Here’s a quick walkthrough showing how you can try out the new Gradient Brush: - First, update the Xamarin.Forms NuGet packages in your solution to version 4.8. - Brushes are an experimental preview. First add the flag to your App.xaml.cs at the top of the constructor: Device.SetFlags(new string[]{ "Brush_Experimental" }); - You can now apply a GradientBrush using the new Background property of any Page, Layout, or View: <StackLayout Orientation="Vertical" Padding="30,24,30,24" Spacing="10"> <StackLayout.Background> <LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> <GradientStop Color="#59CEFF" Offset="0.0" /> <GradientStop Color="#FB6EEE" Offset="1.0" /> </LinearGradientBrush> </StackLayout.Background> </StackLayout> Quick Actions and Refactorings Visual Studio for Mac 8.7 introduces several useful new actions to Quick Actions and Refactorings: - Generate comparison operators for types that implement IComparable - Generate IEquatableoperators when generating .Equals for structs - Create and initialize properties or fields for all unused constructor parameters - IntelliSense completion in DateTimeand TimeSpanstring literals - Warning and code fix when a suppression operator is present but has no effect - Generate properties when generating a constructor in a type While these are all handy, I especially like the IntelliSense completions for DateTime and TimeSpan string literals:.7. Great work! Do you have anything to share with regard to your roadmap for the new ARM-based Macs? Thanks for great work! But I get an issue that when I perform “Find References”, it seems does not work. It displays “Searching…” forever. Pedantic level high: Shouldn’t that be Xamarin.Forms 4.8 and not Xamarin Forms 4.8? =)
https://devblogs.microsoft.com/visualstudio/visual-studio-2019-for-mac-version-8-7-is-now-available/?WT.mc_id=xamarinpodcast76-podcast-masoucou
CC-MAIN-2021-39
refinedweb
1,216
54.42
If you must specify file contents with an exact byte sequence, use literal octal or hexadecimal notations, and not the semantic names like \n or \r. The semantic names are subject to translations according to platform-specific encoding features. Binmode your filehandle to ensure no translations occur outside of your control. For example, binmode(OUTPUT); print OUTPUT "Hello\x0D\x0A" ensures a carriage-return and newline on all platforms. Conversely, dropping the \x0D part will ensure there's no carriage return (which appears as ^M in some editors). --[ e d @ h a l l e y . c c ] That is pretty misleading (or just incorrect). "\n" and "\x0A" are exactly the same thing unless you are on a non-ASCII system or an old Mac. Using "\x0A" is only an improvement when on an old Mac. On a non-ASCII system, using "\x0A" is likely to simply break things. On all other systems, using "\x0A" is identical to using "\n". So, there are no systems where "\x0A" is likely to be subject to fewer translations (since old Macs don't translate either character and non-ASCII systems will likely be translating the whole character set or none of it, depending on destination). Your second paragraph is correct if you add "on an ASCII system". Please read the writeup at binmode, as well as the bit about newlines in perlport. And yes, I believe Perl is implemented on many non-ASCII systems. While '\n' and '\x0A' are exactly the same thing on ASCII systems in the storage of perl scalars, that's a mouthful to say. By omission, that means that they may NOT be the same thing on disk, or via socket, or on non-ASCII systems. This is akin to the HTML argument between semantic <strong> and literal <b>. Semantics enforce user/platform preferences, and literals enforce author preferences. My advice was to use semantic names when you want semantic meanings, and use literal numerical values when being literal is important. Binmode tells Perl you care. The syntax you use tells the developer you care. Remember, source code is for the human to read, too, and using the \x0A clues the maintenance programmer that the byte values matter. I don't see how that's misleading or
http://www.perlmonks.org/index.pl?node_id=264423
CC-MAIN-2015-06
refinedweb
378
64.61
I’ve seen somewhere a statement that different windows (obtained with New Window) may have different color schemes? Is this true? So far I haven’t been able to make this work. When I change the color scheme in one window, it changes in the entire sequence of windows that I have open. Different color schemes in different windows? I’ve seen somewhere a statement that different windows (obtained with New Window) Color Schemes can set via project specific settings would apply to all views of a window. If you’re not using projects, you can also accomplish this with a simple plugin as well because all windows carry project data even if it’s not persisted to disk. For example if you create a new window, then run this in the console: window.set_project_data({"settings": {"color_scheme": "Monokai.sublime-color-scheme"}}) All files open in that window will use the Monokai color scheme, unless there is a file-type specific setting that overrides it (like if you want all your Python files to be purple or something). A plugin would need to be smart enough to pull the project data out first and add this in, since the above will clobber away any open folders, other settings that might be applied by a project, etc. I’m not sure if there’s a package for that already but such a plugin would be fairly easy to create. I’m aware of this. However, from time to time I would like to open a new window and make it a different color from the other windows that I have already opened. Without having a project for it. I am not quite happy with the solutions above. I think my problem would be solved if I could start two or more totally independent instances of the editor. How do I do it? Color scheme can’t be set as “window setting”. So there’s no other solution than using project data, atm. To run independend installations you’d need multiple portable installations, which don’t share any datal. It would involve to set them up independendly including plugins, settings, … . Doubt it’s a sane solution. As outlined in the Discord conversation from this morning (and also alluded to above) it’s possible to do this sort of thing with a little plugin magic. An example of such a thing is the below; this provides a select_window_color_scheme command which will adjust the color scheme in use for the current window. The plugin below includes an input handler that is based on the one in Default/ui.py that allows you to interactively select a color scheme from the list, but with the ability to preview removed and commented to provide more details on what it’s actually doing. To use this, you first want to create a Default.sublime-commands file in your User package with the following contents (or, if you already have such a file, just add the entry); adjust the caption as desired: [ { "caption": "UI: Select Window Color Scheme", "command": "select_window_color_scheme" }, ] Then, add the following plugin to your User package (see How to use Plugins on my YouTube channel if you’re not sure how to do that): import sublime import sublime_plugin import os # The KIND attached to whatever the default color scheme is when the browser # open. CURRENT_KIND = (sublime.KIND_ID_COLOR_GREENISH, "✓", "Current") class SelectWindowColorSchemeCommand(sublime_plugin.WindowCommand): """ Set the color scheme to be used by all views in the current window to the one that is provided. If one is not given, prompt the user in the command palette to pick one. This will work in any window, wether it has a sublime-project associated with it or not. For any window that is associated with a project, this will adjust the settings for the project itself on disk. """ def run(self, color_scheme): # Get the project data for this window, then get the settings key out # of it, creating an empty key if it is not present. data = self.window.project_data() or {} settings = data.get('settings', {}) # Set in the setting, the put the settings back into the data and the # data back into the window. settings["color_scheme"] = color_scheme data["settings"] = settings self.window.set_project_data(data) def input(self, args): if "color_scheme" not in args: return ColorSchemeInputHandler(self.window) class ColorSchemeInputHandler(sublime_plugin.ListInputHandler): """ Gather a list of all of the potential color schemes and use them to display a list in the command palette to allow the user to pick a color scheme. This respects the show_legacy_color_schemes setting, and will show you the what color scheme is currently active for this window. This is a modified and cut down version of the same input handler from Default/ui.py, which is used to prompt for the color scheme to choose when you use "UI: Select Color Scheme" in the command palette; this version lacks the preview part that lets you see what the color scheme is goign to look like. """ def __init__(self, window): self.window = window def placeholder(self): return "Color scheme for the current window" def get_files(self): """ Gather a list of all of the tmTheme and sublime-color-scheme files that are present, returning a list of tuple that provides the name of the file that contains the resource and the value to use as the value of the color_scheme setting. """ files = [] nameset = set() # For tmTheme files, the value to use for the setting and the name of # the file that they come from are the same, so for each one found # add it in. # # Along the way, track the name of the color scheme, which is based # on the name of the file, without path or extension. for f in sublime.find_resources('*.tmTheme'): files.append((f, f)) nameset.add(os.path.splitext(os.path.basename(f))[0]) # Do the same for sublime-color-scheme files too. Here the value to # use for the value of color_scheme is the name of the file without # the path (unlike for tmTheme) files). # # This also tracks and does not add this file as a known file if there # is a color scheme already known by this name that was contributed # from a tmTheme file. for f in sublime.find_resources('*.sublime-color-scheme'): basename = os.path.basename(f) name = os.path.splitext(basename)[0] if name not in nameset: nameset.add(name) files.append((f, basename)) return files def list_items(self): # Get the global preferences and wether or not we should be showing # the legacy color schemes. settings = sublime.load_settings('Preferences.sublime-settings') show_legacy = settings.get("show_legacy_color_schemes", False) # Grab the current color scheme out of the preferences as a potential # default. default = settings.get("color_scheme", 'Mariana.sublime-color-scheme') # If there is project data in the window, and that project data has # settings, and the settings contains a color_scheme setting, then # the value of that setting is what the current color scheme should # be. Otherwise, use the value from the preferences as a default. data = self.window.project_data() or {} current_scheme = data.get("settings", {}).get("color_scheme", default) # sublime-color-scheme files are unique based on their name, and so the # setting can just be the name of the file. For a tmTheme file, they're # unique based on the resource path they're loaded from. # # That is how we gather the list of color schemes below, so here we # need to make sure that the color scheme we grabbed out of the # settings is as expected. if current_scheme.endswith(".sublime-color-scheme"): current_scheme = os.path.basename(current_scheme) # Gather the list of list entries. files = self.get_files() items = [] selected = -1 # Iterate over the entire list of items that were found and generate # list items for display. for cs, unique_path in files: # Get the name of the package that this color scheme is from, and # the name of the scheme itself. pkg, basename = os.path.split(cs) name = os.path.splitext(basename)[0] # If this is a legacy color scheme and the user doesn't want to # see those, don't do anything with this one. if pkg == "Packages/Color Scheme - Legacy" and not show_legacy: continue # Apply specific kind information to the currently select color # scheme if this is the one; then flag it as the item to select # by default. kind_info = sublime.KIND_AMBIGUOUS if current_scheme and current_scheme == unique_path: kind_info = CURRENT_KIND selected = len(items) # Remove the common prefix on the files. if pkg.startswith("Packages/"): pkg = pkg[len("Packages/"):] # Add in a new item. items.append(sublime.ListInputItem(name, unique_path, details=pkg, kind=kind_info)) return (items, selected) With these in place, the command palette will have a new item in it with the caption you specified in the sublime-commands file, and picking it will allow you to select a color scheme and apply it to the current window. if your window has a sublime-project file attached to it, using this command will modify the project on disk to include the color scheme that you pick here. I indeed got this running by using different ST versions, but it’d be great if there was a setting for this within Preferences, including the option to set the scheme on a per area basis rather than having to use different windows, especially when using different languages that are better highlighted using different schemes, for example: C# for scripting and .md next to it, for a todo-list. Open up a C# file, choose Preferences > Settings - Syntax Specific and in the right hand pane include "color_scheme": "Breakers.sublime-color-scheme", as a setting. As soon as you save the file, all C# files will use that color scheme while other file types still use the global settings.
https://forum.sublimetext.com/t/different-color-schemes-in-different-windows/64791
CC-MAIN-2022-33
refinedweb
1,610
61.97
To start a programming project, we need to be able to build, format code, and run unit tests. Here’s what I have found makes a sensible starting point for a Haskell project. Full code: hunit-example. To build and run tests, just do: make setup make test I tend to use a Makefile for all the commands I need to remember. The most important part here is the “setup” target which installs the cabal-install package (Cabal is a package manager for Haskell), then uses Cabal to install hindent, and finally installs all the dependencies of our actual project (which we specify in a .cabal file, shown further down). The format target uses hindent-all, which is shown below. Update: added “happy” as a prerequisite – needed by hindent. Makefile: all: test test: format cabal test build: format cabal build format: ./hindent-all clean: cabal clean setup: sudo apt-get install cabal-install happy cabal update cabal install hindent cabal install --run-tests Our production code is very simple – just two functions. HUnitExample.hs: module HUnitExample where double x = x * 2 half x = x / 2 Our tests import our production code, and use tasty (which includes HUnit) to check it works. test/Tests.hs: import HUnitExample (double, half) import Test.Tasty (defaultMain, testGroup) import Test.Tasty.HUnit (assertEqual, testCase) main = defaultMain unitTests unitTests = testGroup "Unit tests" [doublingMakesNumbersBigger, halvingMakesNumbersSmaller] doublingMakesNumbersBigger = testCase "Double of 4 is 8" $ assertEqual [] 8 (double 4) halvingMakesNumbersSmaller = testCase "Half of 9 is 4" $ assertEqual [] 4 (half 9) Each test is a testCase that uses assertions like assertEqual to verify the code. HUnit also provides lots of cryptic operators for obfuscating your tests. Many projects will want to add property-based testing with QuickCheck or SmartCheck or similar. The magic that makes all this work is the Cabal file, which can have any name that ends in “.cabal”. hunit-example.cabal: Name: hunit-example Version: 1.0.0 cabal-version: >= 1.8 build-type: Simple Library Exposed-Modules: HUnitExample Build-Depends: base >= 3 && < 5 Test-Suite test-hunit-example type: exitcode-stdio-1.0 hs-source-dirs: tests Main-is: Tests.hs Build-Depends: base >= 3 && < 5 , tasty , tasty-hunit , hunit-example You will normally want lots more properties than this, but this is what I think is a minimal example. It defines the project properties, the production library module we are building, and a test suite that tasty uses to know what to run. Note that the test suite must depend on the production code module so you are allowed to import it. To do code formatting, I made this bash script: hindent-all: #!/bin/bash # Format all .hs files in the current directory tree with hindent HINDENT=${HOME}/.cabal/bin/hindent function all_hs_files() { find ./ -name dist -prune -o -name "*.hs" -print } for FILE in $(all_hs_files); do { NEWFILE=${FILE}.formatted cat ${FILE} | ${HINDENT} > ${NEWFILE} if diff -q ${FILE} ${NEWFILE} >/dev/null; then { rm ${NEWFILE} } else { echo "hindent updated ${FILE}" mv ${NEWFILE} ${FILE} }; fi }; done I would be grateful if someone pointed out I didn't need to do that because someone has done it for me. Note: I chose not to use hfmt because it hard-codes a long line length, whereas hindent behaves how I like with no configuration. Last but not least, ignore the directory created by Cabal. .gitignore: dist So, when we run we see this: $ make test ... Running 1 test suites... Test suite test-hunit-example: RUNNING... Unit tests Double of 4 is 8: OK Half of 9 is 4: FAIL expected: 4.0 but got: 4.5 1 out of 2 tests failed (0.00s) ... Looks like we've got a bug to fix...
https://www.artificialworlds.net/blog/category/haskell/
CC-MAIN-2020-05
refinedweb
612
57.37
Created on 2008-02-25 02:00 by nnorwitz, last changed 2010-07-20 13:43 by BreamoreBoy. This issue is now closed.. I forgot to mention that if another loop was added to PyCode_Optimize that kept track of the # of times each local variable was LOAD_FAST/STORE_FAST/DELETE_FAST and that the count was 2, we could perform a similar optimization without requiring the return. Bonus points for other cases like if it was the last use inside a list comprehension or the variable is otherwise unaccessible. Guido says to do it only with -O. I suppose you are aware that performing this optimization in general would break a lot of existing code that uses inspect.getstack() or sys._getframe() to peek at the caller's local variables. I know this because it's one thing that Psyco doesn't do correctly, and one of the most common causes I'm aware of for a random existing program to break under Psyco. > I suppose you are aware that performing this optimization in general > would break a lot of existing code that uses inspect.getstack() or > sys._getframe() to peek at the caller's local variables. I know this Yes, with this optimization the variable might never be set or when the function exits, the value would be set to the previous value. Note that the current optimization only works just before a return and only for local variables. It doesn't generally optimize out variables, although that would be a good next step. > because it's one thing that Psyco doesn't do correctly, and one of the > most common causes I'm aware of for a random existing program to break > under Psyco. How often does this cause problems? Do you view this as psyco's problem or broken user code? I don't view this any different that a C compiler optimizing out variables. It can make debugging harder since the symbols no longer exist. In this case the variable name is not removed from the co_varnames even if it is the only reference. That would also be nice, but left for another patch. Since this will only be used with -O and is currently limited, this seems reasonable to me. But I would like to know if others disagree. I view this as a problem with Psyco, not with the user code. An even deeper reason for which the general optimization would break code is because it changes the lifetime of objects. For example, Psyco contains specific, user-requested support to make sure the following kind of code works: def myfunc(): f = open('somewhere', 'r') fd = f.fileno() return os.fstat(fd) At the moment Python guarantees that the file object is not closed before the function exits. The above code cannot be rewritten like this: def bogus(): fd = open('somewhere', 'r').fileno() # the file is auto-closed here and fd becomes invalid return os.fstat(fd) I know it's bad style to write code relying on this property, but still I want to make sure you are aware that it *will* introduce obscure breakage in existing code. Given that it is unlikely to give any speedup in real-world code, I don't think we should add complexity to the compiler. Recommend closing. Closing as nobody has commented.
https://bugs.python.org/issue2181
CC-MAIN-2019-09
refinedweb
553
64.51
- 09 Jan 2020 05:20:53 UTC - Distribution: Inline - Source (raw) - Browse (raw) - Changes - How to Contribute - Repository - Issues (14) - Testers (77 / 0 / 0) - KwaliteeBus factor: 5 - 41.35% Coverage - License: perl_5 - Perl: v5.8.1 - Activity24 month - Tools - Download (85.28KB) - MetaCPAN Explorer - Permissions - Permalinks - This version - Latest version++ed by:14 non-PAUSE users - NAME - SYNOPSIS - DESCRIPTION - A SKELETON - THE INLINE API - THE INLINE OBJECT - THE INLINE NAMESPACE - SEE ALSO - AUTHOR NAME Inline-API - How to bind a programming language to Perl using Inline.pm SYNOPSIS #!/usr/bin/perl use Inline Foo; say_it('foo'); # Use Foo to print "Hello, Foo" __Foo__ foo-sub say_it { foo-my $foo = foo-shift; foo-print "Hello, $foo\n"; } DESCRIPTION So you think Inline C is pretty cool, but what you really need is for Perl to work with the brand new programming language "Foo". Well you're in luck. Inline.pmhas support for adding your own Inline Language Support Module (ILSM), like Inline::Foo. Inline has always been intended to work with lots of different programming languages. Many of the details can be shared between implementations, so that Inline::Javahas a similar interface to Inline::ASM. All of the common code is in Inline.pm. Language specific modules like Inline::Pythonare::Cand the parsing grammar is further broken out into Inline::C::grammar. All of these components come with the Inline distribution. This POD gives you all the details you need for implementing an ILSM. For further assistance, contact inline@perl.org See ["SEE ALSO"] below. We'll examine the joke language Inline::Foo which is distributed with Inline. It actually is a full functioning ILSM. I use it in Inline's test harness to test base Inline functionality. It is very short, and can help you get your head wrapped around the Inline API. A SKELETON For the remainder of this tutorial, let's assume we're writing an ILSM for the ficticious language Foo. We'll call it Inline::Foo. Here is the entire (working) implementation. ILSM. What they do is described below. A few things to note: Inline::Foomustwill detect such usage for you in its importmethod, which is automatically inherited since Inline::Foo API This section is a more formal specification of what functionality you'll need to provide to implement an ILSM. When Inline determines that some Foocode needs to be compiled it will automatically load your ILSM module. It will then call various subroutines which you need to supply. We'll call these subroutines "callbacks". You will need to provide the following 5 callback subroutines. The register() Callback This subroutine receives no arguments. It returns a reference to a hash of ILSM meta-data. Inline calls this routine only when it is trying to detect new ILSM-s that have been installed on a given system. Here is an example of the has ref you would return for Foo: { language => 'Foo', aliases => ['foo'], type => 'interpreted', suffix => 'foo', }; The meta-data items have the following meanings: - language This is the proper name of the language. It is usually implemented as Inline::Xfor This This ILSM. Since it will most likely be quite complicated, it is probably best that you study an existing ILSM like Inline::C. The load() Callback This method only needs to be provided for interpreted languages. It's responsibility is to start the interpreter. For compiled languages, the load routine from Inline.pmis called which uses DynaLoaderto load the shared object or DLL. The info() Callback This method is called when the user makes use of the INFOshortcut. You should return a string containing a small report about the Inlined code. THE INLINE OBJECT Inline.pmcreates ILSM should use at all are $o->{API} and $o->{ILSM}. The first one contains all of the information that Inline has gather for you in order for you to create/load a cached object of your design. The second one is a repository where your ILSM can freely store data that it might need later on. This section will describe all of the Inline object "API" attributes. -being'). derive_minus_I Method ILSMs may need to run Perl subprocesses with a similar environment to the current one - particularly @INC. This method can be called to return a list of absolute paths to pass to a Perl interpreter to recreate that environment. You will need to prepend -Ito each one. This method omits from that list any paths that occur in $ENV{PERL5LIB}or the Perl default libraries since those will be available already. THE INLINE NAMESPACE Inline.pmhas been set up so that anyone can write their own language support modules. It further allows anyone to write a different implementation of an existing Inline language, like C for instance. You can distribute that module on the CPAN. COBOL will be distributed as the official Inline::COBOLor should use an alternate namespace. In matters of dispute, I (Ingy döt Net) retain final authority. (and I hope not to need use of it :-) Actually modules@perl.org retains the final authority. But even if you want to work alone, you are free and welcome to write and distribute Inline language support modules on CPAN. You'll just need to distribute them under a different package name. SEE ALSO For generic information about Inline, see Inline. For information about using Inline with C see Inline::C. For information on supported languages and platforms see Inline-Support. Inline's mailing list is inline@perl.org To subscribe, send email to inline-subscribe@perl.org AUTHOR Ingy döt Net <ingy@cpan.org> This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See Module Install Instructions To install Inline, copy and paste the appropriate command in to your terminal. cpanm Inline perl -MCPAN -e shell install Inline For more information on module installation, please visit the detailed CPAN module installation guide.
https://metacpan.org/dist/Inline/view/lib/Inline/API.pod
CC-MAIN-2022-27
refinedweb
987
57.77
Java program to merge two integer arrays : In this Java programming tutorial, we will learn how to merge two integer arrays . The program will ask the user to enter values for the first and the second array and then it will calculate the final result by merging both the arrays. Let’s take a look at the program : Java program : import java.util.Scanner; public class Main { public static void main(String[] args) { //1 int array1_size, array2_size; //2 int arr1[], arr2[], result[]; //3 Scanner scanner = new Scanner(System.in); //4 System.out.print("Enter the size of the first array : "); //5 array1_size = scanner.nextInt(); //6 System.out.print("Enter the size of the second array : "); array2_size = scanner.nextInt(); //7 arr1 = new int[array1_size]; arr2 = new int[array2_size]; result = new int[array1_size + array2_size]; //8 System.out.println("Enter elements for the first array :"); for (int i = 0; i < array1_size; i++) { System.out.println("Enter element " + (i + 1) + " : "); arr1[i] = scanner.nextInt(); } //9 System.out.println("Enter elements for the second array :"); for (int i = 0; i < array2_size; i++) { System.out.println("Enter element " + (i + 1) + " : "); arr2[i] = scanner.nextInt(); } //10 for (int i = 0; i < array1_size + array2_size; i++) { //11 if (i < array1_size) { result[i] = arr1[i]; } else { result[i] = arr2[i - array1_size]; } } //12 System.out.println("Final array after merged : "); for (int i = 0; i < array1_size + array2_size; i++) { System.out.print(result[i] + " "); } } } Explanation : The commented numbers in the above program denote the step number below : - Create two integer variables to store the size of the first and the second array. - Define three integer arrays. Keep in mind that we don’t know the size of these arrays. We have not declared them yet. - Create one Scanner object to read the user inputs. - Ask the user to enter the size of the first array. - Read the value and store it in array1size_ variable. - Similarly, ask the user to enter the size of the second array, read it and store it in array2size_ variable. - Now , create the first array of size array1size, create the second array of size _array2size_ and create one final array of size array1size + array2size. - Ask the user to enter the elements of the first array, using one for loop read all the numbers and store it in the first array. - Similarly, ask the user to enter the elements of the second array, use one for loop and store it in the second array. - Finally, we need to merge both of these arrays . Run one for loop. This loop will run array1size + array2size times. - Inside the loop, first put all the numbers of arr1 in the result array. Then append all the numbers of arr2 to the result array. - Finally, print out the merged array to the user using one for loop. Sample Output : Enter the size of the first array : 5 Enter the size of the second array : 4 Enter elements for the first array : Enter element 1 : 1 Enter element 2 : 2 Enter element 3 : 3 Enter element 4 : 4 Enter element 5 : 5 Enter elements for the second array : Enter element 1 : 6 Enter element 2 : 7 Enter element 3 : 8 Enter element 4 : 9 Final array after merged : 1 2 3 4 5 6 7 8 9 Similar tutorials : - Java 8 example to convert a string to integer stream (IntStream) - Java program to print the ASCII value of an integer - Java program to move all zeros of an integer array to the start - Java program to move all zero of an integer array to the end of the array - Java program to find the maximum value between two BigInteger - Java program to sort an array of integers in ascending order
https://www.codevscolor.com/java-merge-arrays/
CC-MAIN-2020-29
refinedweb
615
54.42