text:
(OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page :
"THE" alternative forum :
This forum can also be accessed as
It is now read-only and serves only as archives.
Please register over the NEW forum
and continue your work there. Thank you.
Log in to check your private messages
Log in
The time now is Sun 27 Sep 2020, 23:47
All times are UTC - 4
Forum index
House Training
Users ( For the regulars )
Multi machine access with USB version
View previous topic
View next topic
Page 1 of 1
[6 Posts]
Posted: Wed 18 May 2005, 14:28
Post subject:
Multi machine access with USB version
I have multiple machines I use Puppy on and they have a variety of configurations (different monitor, mouse, network types etc). What I want to do is identify the machine and then use the appropriate settings.
I'm pretty sure I can do it with the following process:
1) Get the MAC address of the ethernet card to uniquely identify the PC - not perfect but good enough
2) I use the MAC address as a directory to copy config files ie,
cp /root/localconfig/**MACADDRESS**/dhcpinfo/* /etc/dhcpc/*
cp /root/localconfig/**MACADDRESS**/videomode /etc/videomode
If the MAC hsan't been seen before these files will be deleted so the normal boot process will allow you to configure (for videmode for example)
then at the end of the session I use a similar script to copy them back again.
I can write all the scripts necessary, however I'm not sure how to get them into the startup/shutdown process. Clearly the copying needs to happen very early on so the various devices pick up the right files.
Can anyone help me by identifying where in the rc scripts I can call my stuff?
With this in place it should mean I can take my USB drive and use any machine I like and not worry about the resolutions etc.
I'm happy to feed these back to the main development stream if this is thought to be a useful feature.
Back to top
Official Crustacean
Joined: 04 May 2005
Posts: 15588
Location: Paradox Realm
Posted: Wed 18 May 2005, 20:33
Post subject: Pup in boots
Place your script on the end of this list of files you wish to call
Look forward to seeing what you come up with
Good Luck - I like it already - Good plan
Puppy Raspup 8.2
Puppy Links Page
Back to top
Ultra Super-stud
Joined: 05 May 2005
Posts: 168
Posted: Wed 18 May 2005, 20:41
Post subject:
Hi Malcolm!
I think you and I are working toward the same goal. See my thread,
. But I think your method is far more elegant than my idea. I know that it's late in the boot process, but usually when you want to make certain hardware settings permanent, you add lines to /etc/rc.d/rc.local. Do you think it's too late in the boot process? At least it is called before X starts.
Back to top
Posted: Thu 19 May 2005, 05:06
Post subject: Long post about multi-machine start with some scripts
I've started some scripting that's partly useful, but it has some irritations. Firstly what it does:
1) on startup it checks for the existence of the directory /etc/rc.d/localconfig - if it isn't there it does nothing. This way it the user doesn't want it the script has no effect.
2) second it asks for the machine you are using (I was initially going to use a MAC address to identify the machine but I wasn't sure how far in the boot process we would be so I didn't know if it would work.)
3) it copies /etc/videomode, /etc/mousedevice and /etc/eth0mode for this machine. Any help on other files it would be useful to preserve would be good!
Startup script is currently written in rc.local as far as I can tell this is before xwin starts so we're ok for windows stuff. For the ethernet I down and up the device to make the new settings work.
for the shutdown script it should do the reverse but it will have remembered the machine name.
Now for the irritations
I can't find a suitable place to put the shutdown script, rc.reboot seems to get overwritten - any ideas? At the moment I'm simply running it manually before shutdown, but I would like to automate it.
Anyway for what it's worth i've attached the VERY ALPHA scripts so you can take a look.
To have a go
copy the rc.local script to /etc/rc.d
create a directory /etc/rc.d/localconfig.
For first time 'sanity' I'd also create /etc/currentlocalsetting as a text file with a single word which is the name of your computer (no whitespace) and run rc.localconfigreboot. This will preserve your current settings
At this stage I'd probably recommend just taking a look to see what I'm doing
Back to top
Posted: Thu 19 May 2005, 07:08
Post subject: Further issues
One other irritation,
at the moment if it's a new computer then the script deletes the mousedevice etc. I was hoping that this would then revert to default behaviour, however I now realise that rc.local is too late in the boot up process so I am simply deleting files and there will be no defaults left
So the start script will have to be earlier in rc.sysinit
How can I change these files so they stay changed while I'm in the development process?
Back to top
Ultra Super-stud
Joined: 05 May 2005
Posts: 168
Posted: Thu 19 May 2005, 23:50
Post subject:
HI Malcolm,
The readme.txt file found in /etc/rc.d/ says that rc.sysinit, rc.modules, and rc.update are all loaded from image.gz upon boot, though there are copies in /etc/rc.d/ So, you'd have to edit them inside image.gz, or somehow get puppy to load them from somewhere other than image.gz. The readme file goes on to say:
"Those marked as "pristine" [the three listed above] are run from the image.gz file, although you will find copies of them in /etc/rc.d/. The rest are editable, and are actually located at
/root/.etc/, as /etc is just a symlink to there.
What happens at bootup is firstly image.gz is loaded into
the ramdisk, and rc.sysinit will execute.
A partition is mounted on /root, and /etc is then relinked
to point to /root/.etc -- hence by the time rc.local0
executes, it is from the mounted partition."
So, from the sounds of that, it's going to be tricky to edit rc.sysinit and make your changes stick...
Any of the really smart people have any ideas?
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Sort by:
Post Time
Post Subject
Page 1 of 1
[6 Posts]
View previous topic
View next topic
Forum index
House Training
Users ( For the regulars )
Jump to:
Select a forum
Forum index
|___ House Training
| |___ Beginners Help ( Start Here)
| |___ Users ( For the regulars )
| | |___ Usuarios de habla Hispana
| | |___ Für deutschsprachige Anhänger
| | |___ Pour les francophones
| |
| |___ HOWTO ( Solutions )
| |___ Bugs ( Submit bugs )
|___ Advanced Topics
| |___ Additional Software (PETs, n' stuff)
| | |___ Package Collections / Repositories
| | |___ Browsers and Internet
| | |___ Business
| | |___ Compiling
| | |___ Desktop
| | |___ Documents
| | |___ Drivers
| | |___ Educational
| | |___ Engineering/Science/Simulation
| | |___ Eye Candy
| | |___ Filesystem
| | |___ Games
| | |___ Graphics
| | |___ Multimedia
| | |___ Network
| | |___ Security/Privacy
| | |___ System
| | |___ Utilities
| | |___ Virtualization
| | |___ Unsorted
| |
| |___ Cutting edge
| | |___ Multi-session live-CD/DVD
| |
| |___ Hardware
| | |___ Audio
| | |___ Networking
| | | |___ Dialup
| | | |___ Ethernet
| | | |___ Wireless
| | |
| | |___ Printers
| | |___ Video
| |
| |___ Puppy Derivatives
| |___ Puppy Projects
| |___ Next Puppy Development
| | |___ 4.x
| | | |___ Bugs (4.x dev)
| | | |___ Usability Issues (4.x dev)
| | |
| | |___ 5.x
| | |___ Bugs (5.x dev)
| | |___ Usability Issues (5.x dev)
| |
| |___ Localization Project
| |___ Documentation Project
|___ Taking the Puppy out for a walk
| |___ Announcements
| |___ Puppy Power
| |___ Suggestions
| |___ Misc
|___ Off-Topic Area
|___ Programming
|___ Security
|___ Truly off-topic conversations
post new topics in this forum
reply to topics in this forum
edit your posts in this forum
delete your posts in this forum
vote in polls in this forum
attach files in this forum
download files in this forum
Powered by
© 2001, 2005 phpBB Group
[ Time: 0.0978s ][ Queries: 11 (0.0436s) ][ GZIP on ]


text:
"The Voice" might not be the only hit show on Adam Levine's résumé soon.
Entertainment Weekly reported Tuesday that the Maroon 5 frontman is in final talks to star in the second season of "American Horror Story."
According to the magazine, the singer-cum-actor will play half of a couple called "the Lovers" in the hit FX horror-drama and will shoot his scenes in between touring this summer.
U.S. & World
The role will be Levine's TV acting debut.
FX has been tight-lipped about what the next season about the show, whose first season centered on a family living in a haunted house, will entail.
But according to EW.com, Jessica Lange, Zachary Quinto, Sarah Paulson, Evan Peters, and Lily Rabe will return from season one to play completely different characters.
If he stars in the show, wIll Adam go all Method actor on us? Watching "The Voice" is nail-biting enough already.
Selected Reading: Entertainment Weekly, Us Magazine

subset: commoncrawl


text:
It's here folks! Never before available on DVD.
Here is "a formula for instant success on the electric guitar." Learn hundreds of great licks for blues and rock playing and use them to create solos and lead lines to rival the best of them! Jorma clearly explains rhythm grooves, picking techniques, lead bass lines, licks, solos and techniques for electric blues and rock tunes.


text:
On Thursday, the Federal Transit Administration (FTA) announced it will release $3 million to support programs around the country that train, hire, develop and retain transit workers.
"President Obama promised to help create good jobs for Americans," said U.S. Transportation Secretary Ray LaHood. "This money will help train young people just out of high school or college and help those already in transit jobs move ahead."
Funding will be provided to programs in New Orleans and Denver that train new entrants to the workforce for jobs in the transit industry; vocational programs in Massachusetts and New Jersey that prepare high school and college students for careers in transit; leadership training programs in California, New York, Pennsylvania and Ohio transit agencies; and a distance learning center in South Dakota targeted at rural transit agencies.
Twelve programs from across the nation successfully competed for the "Innovative Workforce Development" dollars. FTA received 35 applications requesting a total of $7.3 million in requests for the $3 million available. A complete list of successful proposals can be found here.
At a Tuesday groundbreaking on New Orleans' Union Passenger Terminal/Loyola Avenue Streetcar project, Secretary LaHood announced that the New Orleans Regional Transit Authority was among the recipients and will receive a $400,000 Innovative Workforce Development grant to establish a streetcar maintenance training program to assist in hiring and training skilled streetcar maintenance workers.
"With our transit systems growing in ridership and complexity, we must begin recruiting and training the skilled workforce to match the challenges of expansion and innovation," said FTA Administrator Peter Rogoff. "We must prepare for retirements and build a knowledgeable workforce that will ensure that our systems are safe, reliable, and desirable long into the future."
Successful proposals represented a broad portfolio of innovative efforts from training the underemployed in streetcar maintenance and repair to offering college students a certificate in transit management and operations.
On Thursday, the Federal Transit Administration (FTA) announced it will release $3 million to support programs around the country that train, hire, develop and retain transit workers.


text:
Vice President Joe Biden and U.S. Rep. Paul Ryan, the two men who hope to be vice president for the next four years, faced off in a testy, quarrelsome debate on Thursday, repeatedly interrupting each other as they argued on an array of issues, from the deadly attack on the U.S. consulate in Libya and preventing nuclear war with Iran to cutting taxes and creating jobs.
In their first and only campaign debate, Biden and Ryan battled for the last word on each topic, as they accused each other of misleading voters on their plans to steer the economy from the doldrums and boost America's standing abroad.
Biden, 69, a former U.S. senator who once chaired the Senate Foreign Relations Committee, was the clear aggressor. He broke out into toothy smiles and often laughed while Ryan spoke. Biden frequently referred to the 42-year-old Wisconsin congressman, who chairs the House Budget Committee, as "my friend."
Visit NBCNews.com for complete election 2012 coverage.
U.S. & World
Biden seemed to be trying to make up for the passive performance by his running mate, President Barack Obama, in a debate against Mitt Romney last week.
Ryan called him on that at one point, saying, after one of Biden's interruptions: "Mr. Vice President, I know you're under a lot of duress to make up for lost ground, but I think people would be better served if we don't keep interrupting each other."
Ryan, meanwhile, gave as well as he got, countering Biden's dismissive attacks by accusing the Obama administration of failing to follow through on its promises at the outset of its term.
Ryan charged that the Obama administration was planning "devastating defense cuts" that would "project weakness" and invite America's enemies "to test us."
Biden cut him off and interjected: "With all due respect, that's a bunch of malarkey."
The verbal skirmishes were made more dramatic by the candidates' proximity to each other: they sat a couple of feet apart, at a desk with moderator Martha Raddatz, ABC News' senior foreign affairs correspondent, and facing the audience at Centre College in Danville, Ky.
Biden went into Thursday's debate needing to stanch the fallout from Obama's poor performance in the Oct. 3 debate with Romney, who has since gained in the polls and is now within striking distance of the president. Biden's goal was to not only flatten the Romney ticket's momentum but also to reignite enthusiasm among disappointed Democrats.
Ryan, on the other hand, entered the debate with the upper hand, politically, and needed to maintain pressure on Biden.
The frenetic parrying began with the opening question, when Raddatz asked Biden if a "massive intelligence failure" was to blame for the consulate attacks, in which Ambassador Chris Stevens and three other Americans were killed.
Biden called it "a tragedy" and promised that the Obama administration would get to the bottom of it. "Whatever mistakes were made will not be made again," Biden said.
Ryan pounced, noting that it took two weeks for the Obama administration to acknowledge that Islamic militants, and not protesters angered by an American-made anti-Muslim video, were to blame for the attacks.
"This Benghazi issue would be a tragedy in and of itself, but unfortunately it's indicative of a broader problem," Ryan said. "And that is what we are watching on our TV screens is the unraveling of the Obama foreign policy."
When the discussion turned to keeping Iran from obtaining a nuclear weapon, Ryan accused the Obama administration of being unable to instill enough fear in Iran's leaders.
"This is a bunch of stuff," Biden said.
"What does that mean, a bunch of stuff?" Raddatz asked.
"Well, it means it's simply inaccurate," Biden replied.
"It's Irish," Ryan offered, prompting laughter.
"It is," Biden said.
"We Irish call it malarkey," Ryan said.
Turning serious again, Biden suggested that the Republicans saw war as the best option and downplayed Iran's ability to produce a warhead. He credited the American-led sanctions that have reportedly crippled the Iranian economy.
"Let's all calm down a little bit here," Biden said. "Iran is more isolated today than when we took office. It was on the ascendancy when we took office. It is totally isolated."
Ryan said those sanctions were passed by Congress over the Obama administration's desire to negotiate more.
"I don't know what world this guy's living in," Biden interjected.
"Thank heavens we had these sanctions in place," Ryan continued. "It's in spite of their opposition."
"Oh, God," Biden sighed.
"They've given 20 waivers to this sanction," Ryan said. "And all I have to point to are the results. They're four years closer toward a nuclear weapon. I think that case speaks for itself."
Later, Raddatz asked Biden about Obama's projections that his 2009 economic stimulus package would push the unemployment rate below 6 percent. That hasn't happened; the jobless rate has hovered around 8 percent.
"I don't know how long it will take," Biden said. "We can and we will get it under 6 percent."
Ryan argued that the Obama administration's economic policies have taken the country "in the wrong direction."
Ryan began to explain Romney's proposal for an across-the-board tax rate cut of 20 percent, funded in part by closing many loopholes and deductions for wealthier Americans. Biden called that "not mathematically possible" without also cutting tax advantages for the middle class.
"It is mathematically possible," Ryan replied. "It's been done before."
"It has never been done before," Biden said.
"Jack Kennedy lowered tax rates, increased growth," Ryan said.
"Oh, now you're Jack Kennedy?" Biden quipped. It was a reference to a now-famous exchange at the 1988 vice-presidential debate, when Dan Quayle compared himself Kennedy and his opponent, Lloyd Bentsen, admonished, "You're no Jack Kennedy."
Everyone, including Ryan, chuckled.
During that argument on taxes and the economy, Biden also brought up something that Obama failed to last week: That Romney had been caught on tape at a fundraiser talking about the "47 percent" of Americans who he said didn't pay income taxes and were dependent on government entitlements.
"I've had it up to here with this notion (of) that 47 percent," Biden said.
He accused the Republicans of always trying to avoid raising taxes instead of doing whatever was necessary to help the middle class.
"It's about time they take some responsibility here," Biden said.
Ryan, unable to resist a dig at Biden, reminded his gaffe-prone opponent: "I think the vice president very well knows that sometimes the words don't come out of your mouth the right way."
Biden managed to laugh at himself that time. He followed up, "But I always say what I mean. And so does Romney."
The next presidential debate, between Obama and Romney, will be held Tuesday at Hofstra University in Hempstead, N.Y.
Visit NBCNews.com for breaking news, world news, and news about the economy


text:
Terms and Conditions
Welcome to our website. If you continue to browse and use this website, you are agreeing to comply with and be bound by the following terms and conditions of use, which together with our privacy policy govern Scottish Linens relationship with you in relation to this website. If you disagree with any part of these terms and conditions, please do not use our website.
The content of the pages of this website is for your general information and use only. It is subject to change without notice.
This website uses cookies to monitor browsing preferences.
All trademarks reproduced in this website, which are not the property of, or licensed to the operator, are acknowledged on the website.
Unauthorised use of this website may give rise to a claim for damages and/or be a criminal offence.
Your use of this website and any dispute arising out of such use of the website is subject to the laws of Scotland.
You have the right to cancel your order at any time before you receive the products you ordered. If these products have already been dispatched when you contact us, you will be advised to return them upon delivery at your own expense.
We will be happy to refund any product that is returned to us in its original packaging, in the condition in which you received it, together with proof of purchase within 28 working days of notification of the intention to return the item.
You can return any unused product ordered up to 7 working days commencing from the day after receipt of the products, by contacting us in writing within the 7 working day period and we will refund any payment that you have already made upon receipt of the returned item within 28 days in its original packaging and condition minus a 20% re-stocking charge and carriage. We request that any such cancelled products are returned to us within 28 working days of the date of cancellation.
If you return products by post, please ensure you package and label them properly so that they are not lost or damaged in transit. We recommend you insure the item and retain some proof of postage in the event that the products go missing, as products remain your responsibility and property until we receive them.
Product variations and use
Scottish Linen will make every effort to ensure that the products we supply through our website correspond as closely as possible to those shown on the website but cannot guarantee that they will be exactly the same. We cannot accept any responsibility for any variations in fabrics or products. Colours may vary from those depicted depending on the settings of your monitor, software or printer. All measurements are approximate. The technical specification of products may change due to availability of raw materials and we reserve the right to make such changes as and when necessary. Our fabrics are made from natural products and may thus have natural characteristics such as slubs and other irregularities in the yarns which are not weaving faults.
All prices are in pounds Sterling and are inclusive of VAT at the current rates but excluding delivery and any other charges where appropriate. Scottish Linen will use all reasonable care to ensure that all information provided on this website is correct at all times. In the event that the actual price of the product ordered is not stated correctly on the website, Scottish Linen retains the right to inform you of this error and you may then cancel your order or continue with the order at the correct price. If we are unable to contact you within seven days of your order being placed, we will deem the order as cancelled and will refund your order.
In cases of items returned to us due to failed delivery it will be the customers responsibility to arrange and pay for re-delivery.
Delivery times are estimated and are not guaranteed however we will do our utmost to ensure goods are delivered within the stated time. We shall not be liable for delays or failures in delivery caused by a failure to gain access to the delivery address on the agreed delivery date or failure to obtain a signature or because of other circumstances beyond our reasonable control. Specific delivery times and days cannot be agreed at any time in the order process.
Risk & Property
We carry the risk of loss or damage to the Products until you receive them. If you return the Products to us for any reason, they will become our property and be at our risk from the time at which we receive them.
Payment can be made by Visa, Visa debit, Visa electron, JCB, MasterCard, American Express, Solo, Maestro or PayPal. The card must be yours and you must be over 18 to order on this site with a valid address that is not a PO box number, hotel or temporary accommodation address. All cardholders are subject to validations checks and authorisation by the card issuer. If your payment is refused we will not be liable for any delay or non-delivery of your order.


text:
You have no items in your Shopping Basket.
Contact Us
⌚ 24 hours a day 7 days a week
FREE Email Offers
• Attractive rustic design
• Diamond pattern
• Pressure treated to protect against rot
• Natural timber finish
• Manufactured from quality FSC® softwood
EXTERNAL dimensions (including roof overhang) 267 x 149cm.
(PLEASE NOTE: A postage surcharge per item ordered is applicable.)
Aftercare - Easy:False
Aftercare - Moderate:False
Aftercare - High:False
Edible Flower:False
Likes Acidic Soil:False
F1 Variety:False
All Suttons products should reach you in perfect condition, just as they left us. If you are dissatisfied in any way with their condition on arrival, please let us know within 14 days. We are only liable for the cost of the goods as quoted on the website plus the cost of delivery if the goods are faulty.
Zzz NOSTORECOMMENDPRODS-CMR
Order Online or call 0344 326 2200 Product or other query Email Customer Services Customer Services call 0333 043 0700
Suttons, Woodview Road, Paignton, Devon TQ4 7NG. Registered in England and Wales No. 284448. VAT No 158 9318 27.


text:
By Clara Chooi
The Malaysian Insider
Dec 01, 2012
KUALA LUMPUR, Dec 1 — Umno is confident of wresting back all four Pakatan Rakyat-led (PR) states and even recapturing its two-thirds parliamentary majority in the coming polls, buoyed by a strong belief that the Najib government's reformist measures have successfully impressed the Malaysian electorate.
Several leaders told The Malaysian Insider that Umno is now fully prepared to march to the battle lines, having struggled through four years of heavy transformation from the party's administration to the mindsets of its over three million members.
Emerging fully charged after the second day of the party's assembly here yesterday, the leaders wasted no breath in declaring that achieving two-thirds is no longer an aspiration for Umno but a comfortable reality.
"Of course," Umno secretary-general Datuk Seri Tengku Adnan Tengku Mansor said, when asked if the party was confident it would once again occupy two-thirds of Parliament's 222 seats after the polls.
"I believe that we will win back two-thirds and we will get back at least all the four Pakatan states… including Kelantan and Penang," he added. Kelantan has been in PAS's hands since 1990.
Generous estimates of Barisan Nasional's (BN) chances at the ballot boxes have included Kelantan as a possible casualty for PR but most observers believe that the federal opposition pact will withstand any onslaught in Penang.
Despite this, Tengku Adnan was not alone in his prediction.
Former Perlis Mentri Besar Datuk Seri Shahidan Kassim appeared to agree that Penang should not be regarded as impossible to recapture.
"We are confident of getting back Kedah, even Kelantan and Selangor… and Perlis, of course. Maybe we have to work harder in Penang," he said of the state led by DAP secretary-general Lim Guan Eng.
Umno deputy minister Dr Mohd Puad Zarkashi was equally as confident as his party colleagues of BN's chances next polls.
"Oh definitely, two-thirds majority. I'm very confident," he told The Malaysian Insider.
Tengku Adnan is confident Umno will win back all the four Pakatan states.
The leaders owed their optimism to what they said was a flagging support for PKR and renewed confidence in the much-changed BN government under the leadership of Prime Minister Datuk Seri Najib Razak, who will close the Umno congress later this evening.
The bespectacled son of Malaysia's second prime minister has already earned himself the title of "Father of Transformation" for his countless transformative initiatives and reform measures that include historic legislative changes.
Key among these was Najib's decision to pull the Internal Security Act (ISA) from Malaysia's statute books, a long-time demand of opposition leaders and civil society groups.
The prime minister also enacted a fresh law to regulate mass public gatherings, which was in the past deemed a crime under section 27 of the Police Act.
He even mooted amendments to allow greater media freedom and permit student participation in politics, keeping to his promise to widen civil liberties in Malaysia.
"This is a big example of walking the talk. Najib is clearly serious about making changes and although he ruled without a two-thirds majority, it did not pose as a hurdle to his intention to fulfil his promises," Puad said.
The deputy education minister added that Najib and BN also have their fingers on the pulse of today's voters and have acknowledged that it would be the fence sitters, new voters, youths and women who will determine their future at the ballot boxes.
He explained that this was why Najib has been pulling out all the stops in ensuring he remains close to these voter groups by keeping in touch with them constantly and doling out initiatives tailored specifically for them.
As examples, Puad pointed to the BN Youth job fair, the My First Home scheme for young homeowners and even the extension of Bantuan Rakyat 1 Malaysia to the youth group.
But apart from BN's tireless campaign to shore up support, the Umno leaders pointed out that voters have also begun returning to the ruling pact because they have had time to weigh in on the promises dished out by those in PR.
They repeated old lines of the purported failure by PR member parties to strike a cohesive agreement to iron out key ideological differences which, they said, could prove detrimental if the pact comes to power without resolving these issues.
Over the past few days of the assembly, delegates have been warning of instability in the nation under a PR federal government, largely due to the protracted dispute between PAS and the DAP over the former party's struggle for an Islamic state and hudud laws.
Shahidan said it was due to BN's power-sharing formula that Malaysians have managed to enjoy decades of peace among the races, warning that this could be ruptured under PR.
"In Malaysia, if you want a strong government and you do not want a crisis, they you need this formula," he said.
He said that even though Umno is a race-based party like some of its partners in BN, it was not "racist".
"But somehow, because we still see some disparity between the races, we have to fight for our respective races… this is important in a sense because one race would know about their community better than others," he said.
The Malaysian Insider reported in October that BN expects to win more than the 140 federal seats it took in Election 2008 despite the onslaught and talk by PR that it can capture Putrajaya in the next general election.
Puad said BN has its fingers on the pulse of today's voters.
But BN politicians also conceded that as many as seven parliamentary seats in Sarawak and six in Sabah are vulnerable to PR but maintain that their hold on rural areas remains strong. There are 222 parliamentary constituencies and 505 state seats up for grabs in the coming 13th general election.
It is understood that BN is expecting to lose some of the seats held by four Sabah MPs who left the coalition while the urban Chinese sentiment in Sarawak could see those seats going to PR. In Election 2008, the DAP was the sole PR component party to win a federal seat each in Sabah and Sarawak.
However, the opposition has questioned BN's confidence as the ruling coalition expects to lose more seats in Sabah and Sarawak in the coming elections than before. "How is BN going to make up for losses in the fixed deposit states?" asked an opposition lawmaker when contacted by The Malaysian Insider.
"BN knows it can lose up to six in Sabah and seven in Sarawak but it hopes to make it up elsewhere, especially in the peninsula where sentiment is swinging back to the government," one Umno leader told The Malaysian Insider, saying programmes like BR1M have had a positive effect on voters.
The BR1M began earlier this year and some RM2 billion was spent for over four million households. The BR1M 2.0 also includes a one-off RM250 for unmarried people between 21 and 30 who earn up to RM2,000.
Analysts say the expanded coverage would include most of the 2.2 million first-time voters expected to cast their ballots in the next elections. There are now just over 13 million voters in the country of 28 million people.
BN politicians also point out that they are expected to get back support from the Indian community, who number 1.7 million, as the coalition has been fulfilling their requests and also extended more aid to them.
Many Indians had blamed former MIC president Datuk Seri S. Samy Vellu for their poor financial circumstances and turned their backs on him and BN in Election 2008. Samy Vellu also lost in his Sungai Siput stronghold in that election.
The BN mandate expires in April 2013, leaving Najib just five months to call elections.


text: Story Posted 12-20-2011 Gamo to Unveil New Bull Whisper Extreme™ The Ultimate Varmint Hunting Air Rifle to be on display at SHOT Show 2012 FOR IMMEDIATE RELEASEDecember 5, 2011 CONTACT:Julie Kaminski / firstname.lastname@example.com Fort Lauderdale, Fla., December 5, 2011 – Gamo Outdoor USA (www.gamooutdoorusa.com), will unveil its new Bull Whisper EXTREME™ air rifle at the upcoming 2012 SHOT Show. Billed as the 'ultimate varmint hunting air rifle," the EXTREME™ features new technology enabling it to have more power and terminal penetration than standard air rifles. It will be offered in both .177 and .22 versions. Bull Whisper EXTREME™ shoots up to 1400 fps in .177 and 1000 fps in .22 with PBA® Bullet ammunition. This new air rifle includes the latest noise dampening technology from Gamo®: The Bull Whisper™, a noise dampener integrated in the bull barrel. It also features SAT™ (Smooth Action Trigger), the new crisp and creep free trigger from Gamo®. The Bull Whisper Extreme™ has a new Gamo® 3-9x40AO (adjustable objective) scope and the new recoil pad (SWA™: Shock Wave Absorber™) able to absorb the recoil until up to 74%. It also has an all-weather black stock with rubberized grips. The .177 version comes with the PBA® Bullet and the TS-10 pellets, and the .22 version comes with the PBA® Bullet and the TS-22 pellets. Both pellets deliver excellent performance for hunting at short and long distances as well as for target shooting. Bull Whisper EXTREME™ Specs:: 1400 FPS with PBA® Bullet .177 / 1000 FPS with PBA® Bullet .22Bull Whisper™ noise dampening technologyFluted polymer jacketed rifled steel barrelAll-weather stock with rubberized gripsSAT (Smooth Action Trigger)Shock Wave Absorber (SWA™) recoil pad: Up to 74% more recoil absorption3-9x40 AO (Adjustable objective, fully coated optics)40 rds. .177 PBA Bullet and 40 rds. .177 TS-1020 rds. .22 PBA Bullet and 20 rds. .22 TS-22MSRP: $319.95 Gamo Outdoor USA is a leading consumer products company that designs, manufactures and markets a diverse portfolio of outdoor sporting goods products under such world class brands as GAMO®, BSA Optics®, Laser Genetics®, Aftermath®, Stunt Studios® and is the exclusive distributor of BSA Guns™. Gamo Outdoor USA products are sold at Cabela's, Bass Pro Shops, MidwayUSA, Academy Sports + Outdoor, Dick's Sporting Goods, Big 5 Sporting Goods, Gander Mountain, Dunham Sports, Mills Fleet, Sports Authority, Scheels, on Amazon.com and other fine retail outdoor and sporting goods stores. For more information, visit www.gamooutdoorusa.com; Facebook.com/GamoOutdoorUSA; Twitter.com/GamoOutdoor; and YouTube.com/GamoOutdoor. Share This Story Related Comments Participating Sponsors


text:
This evenings entertainment is
"Once a job is done, the result should be stored in the file layer, together with the logs."
A new test needs to be devised to prove the result is stored in the file layer once a job is done. Of course the test is put in wn_job_layer_tests.erl . The test can be seen below – and as always – the test is written first.
stored_in_file_layer() -> %% (1) wn_resource_layer:register(#wn_resource{name = "Laptop", type = [{laptop,1}], resides = node() }), %% (2) Path = create_file_at(?NODE_ROOT), %% (3) File1 = #wn_file{id = "File1",file = Path,resides = node()}, Job1 = #wn_job{id = "JobId", files = [File1], resources = [laptop], commands = ["cat EunitFile","touch MadeFile"], timeout = 100 }, %% (4) ok = wn_job_layer:register(Job1), %% (5) timer:sleep(500), %% (6) {ok,T} = wn_job_layer:finished_at("JobId"), %% (7) TimeSuffix = wn_util:time_marker_to_string(T), ExpectedFileName = "JobId_result_"++TimeSuffix++".tgz", ExpectedFileId = "JobId_result", ExpectedFiles = [F1,F2,F3] = ["EUnitFile","MadeFile","Log.txt"], %% (8) {ok,ResultId} = wn_job_layer:stored_result("JobId"), ?assertEqual(ExpectedFileId,ResultId), %% (9) [_,Res] = wn_file_layer:list_files(), ?assertEqual(ExpectedFileName,filename:basename(Res#wn_file.file)), ?assertEqual(ExpectedFileId,Res#wn_file.id), %% (10) {ok,Tar} = wn_file_layer:retrieve_file(node(),ResultId), ?assertMatch({ok,ExpectedFiles},erl_tar:table(Tar,[compressed])), %% (11) erl_tar:extract(Tar,[{files,[F3]},compressed]), {ok,IoDev} = file:open("local_stream.txt",[write]), ok = wn_job_layer:stream(IoDev,"JobId"), timer:sleep(100), file:close(IoDev), {ok,LocalStreamBin} = file:read_file("local_stream.txt"), {ok,JobLogBin} = file:read_file(F3), ?assertEqual(LocalStreamBin,JobLogBin), %% (12) erl_tar:extract(Tar,[{files,[F1]},compressed]), {ok,LocalEunitBin} = file:read_file(Path), {ok,JobEunitBin} = file:read_file(F1), ?assertEqual(LocalEunitBin,JobEunitBin), %% (13) erl_tar:extract(Tar,[{files,[F2]},compressed]), ?assertEqual({ok,<<>>},file:read_file(F2)), %% (14) ok = file:delete("local_stream.txt"), ok = file:delete(F1), ok = file:delete(F2), ok = file:delete(F3), ok = file:delete(Tar).
This test is one of the bigger ones, and deserves some guidance. From the top to bottom: (1) resource registration, (2) creation of the file I wish to send as part of the job, (3) file and job declaration, (4) job registration, (5) waiting for the job to finish (one of the structural weaknesses of this test) and (6) job finish checking by getting the timestamp at the moment of finish. (7) Setting up the expected result values for comparison, (8) getting the result-id and comparing it with the expected result. (9) Listing all files in the file layer and comparing with expected result (note that there SHOULD be two files in the layer – [1] First EunitFile, [2] the result package). (10) Retrieving the expected tgz file and checking that it should contain only two specific files (the log and the sent file). (11) Extraction of the payload logfile and checking with a streamed version that it's the same. (12) Extraction of the job file to see that it's there, and comparison to see it's the same content. (13) Testing that the created file is the one which we sent back, (14) Cleanup of the extracted files and the tgz result.
So, of to write the code – first the wn_util:time_marker_to_string/1 function. One important aspect is that this utility function should not be allowed to exists for the sole purpose of the testing – however as we shall see, this function does have other applications and thus survives.
In wn_util.erl, (skipping to show the export, that part should be bread and butter by now)
-spec(time_marker_to_string(time_marker()) -> string()). time_marker_to_string({Date,Time,Now}) -> F = fun(X) -> string:join([integer_to_list(Y)||Y<-tuple_to_list(X)],"_") end, F(Date)++"_"++F(Time)++"_"++F(Now).
following the test-code, the expected filename is already given in (7), and it's time to write up the wn_job_layer:stored_result/1 function, taking the JobId as parameter and giving the file-name.
Next the missing part in (8), in wn_job_layer.erl , the API function
-spec(stored_result(string()) -> {ok,string()} | {error,term()}). stored_result(Id) -> gen_server:call(?MODULE,{stored_result,Id}).
and internal logic for handling it
handle_call({stored_result,Id},_,State) -> Result = try_get_stored(Id,State), {reply,Result,State};
and the seen helper function for stored result retrieval.
try_get_stored(Id,State) -> case ets:lookup(State#state.jobs,Id) of [{Id,JobKeeperPid,_}] -> wn_job_keeper:get_stored_result(JobKeeperPid); [] -> {error,no_such_job} end.
This directly leads to the need in fleshing out the wn_job_keeper code. Thus, time to write the wn_job_keeper:get_stored_result/1 function. However, as you are not inside my head (thanks for that!) I might need to give a quick explanation. The idea is that the job keeper holds the name of the stored result, not the result itself. So it's not the actual tgz we get here. Remember that all files should be handled through the wn_file_layer.
In wn_job_keeper.erl: In order to maintain the stored result in the state, a new field has to be added (and while doing so I took the liberty of making the state type-declarations nicer)
-record(state, {job :: #wn_job{}, info :: [{time(),term()}], result :: [{time(),term()}], stored_result :: string(), stream :: [pid()], done_at :: undefined | time_marker() }).
onward and downwards (in the source file), the API function
-spec(get_stored_result(pid()) -> {ok,string()} | {error,term()}). get_stored_result(Pid) -> gen_fsm:sync_send_all_state_event(Pid,get_stored_result).
alongside the internal function for handling the call
handle_sync_event(get_stored_result,_,X,State) -> {reply, case State#state.stored_result of undefined -> {error,no_result}; R -> {ok,R} end,X,State};
while working my way through this I noticed a bug in the get_done clause of handle_sync_event with done as StateName, and fixed it (should now be what is seen below)
handle_sync_event(get_done,_From,done,State) -> {reply,{ok,State#state.done_at},done,State};
The natural question is now – who called some API function to put the value we are retrieving? The wn_job_worker would seem to be a good place to do this from since the job_worker knows when it's finished and hence can generate the resulting file, put it into the file layer and signal the wn_job_keeper.
So, going to wn_job_worker.erl, to the part when all commands have been executed, (the handle_info clause of the gen_server) – this is what I put there (not working – needs to be implemented)
handle_info({Port,eof},#state{port = Port} = State) -> case State#state.commands of [] -> wn_job_keeper:info(State#state.pid,no_more_commands), wn_job_keeper:info(State#state.pid,building_result_tgz), ok = file:set_cwd(State#state.olddir), Keeper = State#state.pid, TimeMarker = wn_util:time_marker(), wn_job_keeper:done(Keeper,TimeMarker), Job = wn_job_keeper:get_job(Keeper), Logs = wn_job_keeper:logs(Keeper), {Id,Name} = make_tgz_result(TimeMarker, State#state.workdir, Job,Logs), ok = wn_file_layer:add_file(#wn_file{id = Id, file = Name, resides = node()}), file:delete(Name), wn_job_keeper:set_stored_result(Keeper,Id), {stop,normal,State}; [C|Commands] -> wn_job_keeper:info(State#state.pid,{executing,C}), NewPort = erlang:open_port({spawn,C},[eof,{line,2048}]), {noreply,State#state{commands = Commands,port = NewPort}} end;
This block of code jumps out of the current worker-dir, creates a resulting tgz, adds all files in the worker-dir to it, signals done to the wn_job_keeper and puts the tgz file into the file layer. Of course this is designing as we go and hence there are some functions missing. Finishing off the stuff here first, the local make_tgz_result/4 function
make_tgz_result(TimeMarker,Dir,WnJob,Logs) -> Id = WnJob#wn_job.id++"_result", Name = Id++"_"++wn_util:time_marker_to_string(TimeMarker)++".tgz", {ok,TarFile} = erl_tar:open(Name,[write,compressed]), Files = filelib:wildcard(Dir++"*"), lists:foreach( fun(File) -> ok = erl_tar:add(TarFile,File,filename:basename(File),[]) end,Files), LogStr = lists:foldl( fun({TimeMark,Entry},Str) -> Str++io_lib:format("~p : ~p~n",[TimeMark,Entry]) end,"",lists:sort(lists:append([Lines || {_,Lines} <- Logs]))), ok = erl_tar:add(TarFile,erlang:list_to_binary(LogStr),"Log.txt",[]), erl_tar:close(TarFile), {Id,Name}.
luckily this one does not rely on any more internal / external functions. So that closes this branch of the dev. Backtracking to the handle_info clause, there are some new external functions which has to be developed, one of them is the wn_util:time_marker/0
In wn_util.erl i add the following
-spec(time_marker() -> time_marker()). time_marker() -> {date(),time(),now()}.
the way of signalling that a job is done has now changed, and the second argument is the time_marker of when this happened – this as the wn_job_worker must create the resulting tgz file with the correct time-stamp in the filename.
So, to change the done-signaling, the new lines in wn_job_keeper.erl are
-spec(done(pid(),time_marker()) -> ok). done(Pid,TimeMarker) -> gen_fsm:send_all_state_event(Pid,{done,TimeMarker}).
the internal clause for the handle_event to process this change is
handle_event({done,TimeMarker}, working, #state{info = Info} = State) -> Now = now(), stream_msg(State#state.stream,{Now,done}), {next_state, done, State#state{info = [{Now,done}|Info], done_at = TimeMarker }};
Next – still handle_info of wn_job_worker.erl there is a new function to be implemented, wn_job_keeper:logs/1 which will retrieve the stdout result of the processing to be put into the Log.txt file that was seen in make_tgz_result/4.
Going into wn_job_keeper.erl , i add the following type-spec and function
-spec(logs(pid()) -> [{info|result,[{time(),term()}]}]). logs(Pid) -> gen_fsm:sync_send_all_state_event(Pid,get_logs).
and the function clause to handle the log retrieval request
handle_sync_event(get_logs,_From,X,State) -> {reply,[{info,State#state.info}, {result,State#state.result}],X,State};
Going back to the handle_info clause in wn_job_worker.erl, the next new thing to implement is the function for setting the result inside the wn_job_keeper. The implementation is thus naturally put in wn_job_keeper.erl.
-spec(set_stored_result(pid(),string()) -> ok). set_stored_result(Pid,Id) -> gen_fsm:sync_send_all_state_event(Pid,{stored_result,Id}).
Of course we also need the clause to handle this synchronous request
handle_sync_event({stored_result,Id},_,X,State) -> {reply,ok,X,State#state{stored_result = Id}};
very straight forward and nothing fishy on that sandwich. Ending the wn_job_worker's handle_info clause, some changes where made in the wn_resource_process.erl. The wn_resource_process should now no longer signal done to the wn_job_keeper as the wn_job_worker does it herself.
As the right of done-signalling has been revoked from the wn_resource_process, some code modification had to be done to the handle_info clause in wn_resource_process.erl
handle_info({'EXIT',WorkerPid,_}, State) -> {noreply, begin [{WorkerPid,_,QueueType}] = ets:lookup(State#state.working,WorkerPid), true = ets:delete(State#state.working,WorkerPid), case lists:keytake(QueueType,1,State#state.queues) of {value,{_,[]},_} -> case ets:lookup(State#state.slots,QueueType) of [{QueueType,infinity}] -> ignore; [{QueueType,X}] -> ets:insert(State#state.slots,{QueueType,X+1}) end, State; {value,{Type,[QueuedPid|R]},Queues} -> case try_dispatch_job(QueuedPid,State,QueueType) of ok -> State#state{queues = [{Type,R}|Queues]}; {error,taken} -> State end end end}.
As the wn_job_worker:make_tgz_result/4 dictated, the input in the Log.txt file changed what the streamer should get – in unison with (11) in the test. Thus this format change has to be accommodated in the wn_job_layer:stream/2 function
-spec(stream(term(),string()) -> ok | {error,term()}). stream(IoDev,Id) -> Stream = fun(F) -> receive {T,E} -> io:format(IoDev,"~p : ~p~n",[T,E]) end, F(F) end, StreamPid = spawn_link(fun() -> Stream(Stream) end), case gen_server:call(?MODULE,{stream,StreamPid,Id}) of ok -> ok; Err -> exit(StreamPid,Err), Err end.
Also, the wn_job_layer:replay/2 function had to be changed
replay(Pid,#state{info = Info,result=Result}) -> lists:foreach(fun(Entry) -> Pid ! Entry end, lists:sort(Info++Result)).
Finally! This satisfies the test! However, there is one point of concern. One of the previous tests can cause this one to fail! The culprit is
{"Queueus on resource type amount", fun queues_on_resource_types_amount/0},
That culprit-test queued several jobs but never removed them properly – causing some interesting effects on the current working directory of the processes. The effect of having this intermediate test interfering is a good example of bad test behaviour. In the best case – we would be expecting each test to be set up in it's own clean universe, and to die in that same universe as well, without overspilling into other parallel realities!
As can be seen – the make test shows the failure
1> ======================== EUnit ======================== module 'wn_job_layer' module 'wn_job_layer_tests' wn_job_layer_tests: local_test_ (Can register locally)...[0.004 s] ok wn_job_layer_tests: local_test_ (Executed locally)...{1298,929708,203063} : file_fetching_done {1298,929708,203067} : executing_commands {1298,929708,203217} : {executing,"more EUnitFile"} {1298,929708,210033} : "1,2,3" {1298,929708,210134} : no_more_commands {1298,929708,210137} : building_result_tgz {1298,929708,210187} : done [1.004 s] ok wn_job_layer_tests: local_test_ (Executed queue)...{1298,929709,215132} : file_fetching_done {1298,929709,215134} : executing_commands {1298,929709,215221} : {executing,"file EunitFile"} {1298,929709,222661} : "EunitFile: ASCII text" {1298,929709,222721} : no_more_commands {1298,929709,222725} : building_result_tgz {1298,929709,222801} : done {1298,929709,225999} : file_fetching_done {1298,929709,226001} : executing_commands {1298,929709,226189} : {executing,"cat EUnitFile"} {1298,929709,231033} : "1,2,3" {1298,929709,231087} : no_more_commands {1298,929709,231090} : building_result_tgz {1298,929709,231149} : done [1.104 s] ok wn_job_layer_tests: local_test_ (Queueus on resource type amount)...[0.001 s] ok shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory wn_job_layer_tests: local_test_ (Canceled in queue)...ok wn_job_layer_tests: local_test_ (Done Job Stored in file layer)... =ERROR REPORT==== 28-Feb-2011::21:48:30 === ** Generic server <0.174.0> terminating ** Last message in was {'$gen_cast',{signal,<0.178.0>,a}} ** When Server state == {state,"/Users/zenon/ErlangBlog/worker_net-0.1/node_root/", [{a,[]}], 127001,122904} ** Reason for termination == ** {{badmatch, {error, {function_clause, [{wn_job_worker,'-init/1-fun-0-',[{error,enoent}]}, {wn_job_worker,init,1}, {gen_server,init_it,6}, {proc_lib,init_p_do_apply,3}]}}}, [{wn_resource_process,try_dispatch_job,3}, {wn_resource_process,handle_cast,2}, {gen_server,handle_msg,5}, {proc_lib,init_p_do_apply,3}]} *failed* ::error:{badmatch,{error,not_done}} in function wn_job_layer_tests:stored_in_file_layer/0 [done in 2.687 s] [done in 2.687 s] ======================================================= Failed: 1. Skipped: 0. Passed: 5. zen:worker_net-0.1 zenon$
While the version in where we comment out the test in question succeeds quite nice
1> ======================== EUnit ======================== module 'wn_job_layer' module 'wn_job_layer_tests' wn_job_layer_tests: local_test_ (Can register locally)...[0.005 s] ok wn_job_layer_tests: local_test_ (Executed locally)...{1298,929858,474814} : file_fetching_done {1298,929858,474817} : executing_commands {1298,929858,474949} : {executing,"more EUnitFile"} {1298,929858,481366} : "1,2,3" {1298,929858,481451} : no_more_commands {1298,929858,481454} : building_result_tgz {1298,929858,481489} : done [1.005 s] ok wn_job_layer_tests: local_test_ (Executed queue)...{1298,929859,486690} : file_fetching_done {1298,929859,486693} : executing_commands {1298,929859,486733} : {executing,"file EunitFile"} {1298,929859,493820} : "EunitFile: ASCII text" {1298,929859,493937} : no_more_commands {1298,929859,493939} : building_result_tgz {1298,929859,494065} : done {1298,929859,497623} : file_fetching_done {1298,929859,497627} : executing_commands {1298,929859,497716} : {executing,"cat EUnitFile"} {1298,929859,503066} : "1,2,3" {1298,929859,503118} : no_more_commands {1298,929859,503120} : building_result_tgz {1298,929859,503188} : done [1.105 s] ok wn_job_layer_tests: local_test_ (Canceled in queue)...ok wn_job_layer_tests: local_test_ (Done Job Stored in file layer)...[0.607 s] ok [done in 2.766 s] [done in 2.766 s] ======================================================= All 5 tests passed.
This was fixed by constraining the previous test (and making it more actual to what it should test)
queues_on_resource_types_amount() -> wn_resource_layer:register(#wn_resource{name = "Laptop", type = [{a,0},{b,0}], resides = node() }), Queued = fun() -> wn_resource_layer:queued(node(),"Laptop") end, Job1 = #wn_job{id = "JobId",files = [],resources = [a]}, Job2 = Job1#wn_job{id = "JobId2", resources = [a]}, Job3 = Job1#wn_job{id = "JobId3", resources = [a,b]}, wn_job_layer:register(Job1), ?assertMatch({ok,[{a,[Job1]},{b,[]}]},Queued()), wn_job_layer:register(Job2), ?assertMatch({ok,[{a,[Job1, Job2]},{b,[]}]},Queued()), wn_job_layer:register(Job3), ?assertMatch({ok,[{b,[Job3]}, {a,[Job1,Job2,Job3]} ]},Queued()).
This story has now ended – with the following output of 'make full'
zen:worker_net-0.1 zenon$ make full erlc -pa . -o ebin/ src/*.erl test/*.erl erl -pa ebin/ -eval 'eunit:test(wn_resource_layer,[verbose]), init:stop().' Erlang R14B (erts-5.8.1) [source] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.8.1 (abort with ^G) 1> ======================== EUnit ======================== module 'wn_resource_layer' module 'wn_resource_layer_tests' wn_resource_layer_tests: local_resource_test_ (Can register resources locally)...[0.001 s] ok wn_resource_layer_tests: register_distributed (Can Register Distributed)...[0.004 s] ok wn_resource_layer_tests: register_restart_register (Can Register, Restart and Register)...[0.010 s] ok wn_resource_layer_tests: register_deregister (Can Register, Deregister and Register)...[0.008 s] ok [done in 0.894 s] [done in 0.894 s] ======================================================= All 4 tests passed. erl -pa ebin/ -eval 'eunit:test(wn_file_layer,[verbose]), init:stop().' Erlang R14B (erts-5.8.1) [source] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.8.1 (abort with ^G) 1> ======================== EUnit ======================== module 'wn_file_layer' module 'wn_file_layer_tests' wn_file_layer_tests: file_layer_local_test_ (Can store file locally)...[0.001 s] ok wn_file_layer_tests: file_layer_local_test_ (Can retrieve files locally)...[0.002 s] ok wn_file_layer_tests: file_layer_local_test_ (Can delete files locally)...[0.001 s] ok wn_file_layer_tests: can_store_distributed (Can store file distributed)...[0.016 s] ok wn_file_layer_tests: can_retrieve_distributed (Can retrieve file distributed)...[0.017 s] ok wn_file_layer_tests: can_delete_distributed (Can delete file distributed)...[0.018 s] ok wn_file_layer_tests: must_retain (Must retain information between node kill and node restart)...[0.321 s] ok [done in 1.667 s] [done in 1.667 s] ======================================================= All 7 tests passed. erl -pa ebin/ -eval 'eunit:test(wn_job_layer,[verbose]), init:stop().' Erlang R14B (erts-5.8.1) [source] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.8.1 (abort with ^G) 1> ======================== EUnit ======================== module 'wn_job_layer' module 'wn_job_layer_tests' wn_job_layer_tests: local_test_ (Can register locally)...[0.004 s] ok wn_job_layer_tests: local_test_ (Executed locally)...{1299,10791,575180} : file_fetching_done {1299,10791,575182} : executing_commands {1299,10791,575370} : {executing,"more EUnitFile"} {1299,10791,582067} : "1,2,3" {1299,10791,582181} : no_more_commands {1299,10791,582183} : building_result_tgz {1299,10791,582278} : done [1.005 s] ok wn_job_layer_tests: local_test_ (Executed queue)...{1299,10792,587205} : file_fetching_done {1299,10792,587208} : executing_commands {1299,10792,587299} : {executing,"file EunitFile"} {1299,10792,594990} : "EunitFile: ASCII text" {1299,10792,595034} : no_more_commands {1299,10792,595037} : building_result_tgz {1299,10792,595117} : done {1299,10792,598436} : file_fetching_done {1299,10792,598446} : executing_commands {1299,10792,598525} : {executing,"cat EUnitFile"} {1299,10792,603488} : "1,2,3" {1299,10792,603533} : no_more_commands {1299,10792,603536} : building_result_tgz {1299,10792,603593} : done [1.104 s] ok wn_job_layer_tests: local_test_ (Queueus on resource type amount)...ok wn_job_layer_tests: local_test_ (Canceled in queue)...ok wn_job_layer_tests: local_test_ (Done Job Stored in file layer)...[0.609 s] ok [done in 2.773 s] [done in 2.773 s] ======================================================= All 6 tests passed. dialyzer src/*.erl test/*.erl Checking whether the PLT /Users/zenon/.dialyzer_plt is up-to-date... yes Proceeding with analysis... Unknown functions: eunit:test/1 done in 0m5.21s done (passed successfully)
The status of the stories is now
Done stories
"I want to be able to describe a job as
- A set of Files [#wn_file{}]
- The possible resource types needed (disjunction)
- A list of commands for running the job
- A timeout the job is given while running (in seconds)
- A job id – primary key for the job"
"I want to be able to register a job in the job layer, through any node."
"Several jobs should be queued on the same resource type(s), being processed one and one in order as they where queued"
"I want to be able to list all jobs in the system, through any node."
"The output generated by a job should be possible to see in realtime, through any node and stored to logfiles."
"A job must be possible to cancel before it starts running, through any node."
"Once a job is done, the result should be stored in the file layer, together with the logs."
Not done stories
"I want to be able to delete a job once it's done, through any node."
In the next post, I shall write the test and implementation of the current final story on the job layer – to delete a job from any node – once it's done.


text:
- Home
- Admissions
As soon as you set foot on our campus you will know you've found the place you can call home.
- Academics
Our students are engaged in a wide range of academic pursuits that include degree programs in 160 undergraduate and graduate fields delivered by 6 different colleges.
Visit the Office of Academic Affairs & Research >>
- Campus Life
A-State offers unlimited possibilities for students to customize their experience while on campus.
Visit the Dean of Students >>
- Research
Research engages intellectual curiosity, satisfies the thirst for discovery, and provides an outlet for creativity.
- About A-State
Marking its first hundred years, Arkansas State University continues to expand in exciting ways.
Dr. Gauri Guha
Professor of Economics
- Ph.D., Pennsylvania State University, State College, PA (Energy and Environmental Economics)
- MBA, Indian Institute of Foreign Trade, New Delhi, India (International Trade)
- M.S., Birla Institute of Technology and Science, India (Economics)
Teaching Specialties
- Environmental and Energy Economics
- Global Business Policies
- Statistics, Econometrics, and Optimization
- EBCA, EIA, I-O Analysis, CGE Modeling
Research Interests
- Climate Change
- Economic Impact Assessment
- Environmental Valuation
- Renewable Energy
- Associate Editor, International Journal of Environmental Economics and Statistics
- Assistant Editor, Journal of Economics
- Reviewer, Southwestern Economic Review
Dr. Guha joined the faculty of Arkansas State University in 2002, with primary teaching responsibilities in the areas of environmental economics(Ph.D), managerial economics (MBA), and undergraduate business statistics.
He has been the Associate Director of the International Business Research Center since July 2004, helping businesses in Arkansas prepare export plans and identify foreign markets. In that regard, he has developed two new classes to strengthen the International Business curriculum.
Dr. Guha is also a visiting professor at the Rovaniemi Polytechnic in Finland, the University of Caen in France, the University of Duisburg in Germany, and the University of Applied Science in Salzburg. In August 2007, he was invited to present the Business Impacts of Climate Change at the Oxford Union to the Oxford Round table on global warming. Earlier, Dr. Guha worked as an export executive for India's largest paint manufacturer; then as a director in the Indian Planning Commission; and as a consultant to the World Bank.
Dr. Guha has published four books and many articles in international journals. He has presented his research at international venues like Rio De Janeiro, Vancouver, Kathmandu, Ottawa, Quebec City, and Brussels.
Contact Information
Building: Business
Room: 412
Alternative Contact
Royce Abshier


text:
Rob Demovsky of the Green Bay Press Gazette thinks so. He writes:
Those who are reveling in the fact today's NFC championship game could be one of the coldest in NFL playoff history are missing the point.
This, obviously, is the biggest game in the NFC this season. To have the outcome possibly affected by unusual weather is unjust.
To be sure, football shouldn't be played in a climate-controlled environment such a domed stadium. Those environments are too sterile. The game should be played outside. But when the conditions are so extreme that it could have a significant impact on the outcome of the game, that's a shame.
The hope is that the better team wins, whichever club that may be, and the conditions don't dictate the winner.
Anyone reading this site for more than a couple of days knows that we're among those reveling in the fact that this will be a cold game. In fact, we've argued for years now that the Super Bowl should be played in a cold weather town because, well, that's the way football should be played.
Demovsky disagrees but doesn't seem to have any reason why. He doesn't want the game played indoors — too sterile — so we know that he prefers to have it outdoors. And what if the weather doesn't cooperate? Again, we're left wondering. But we're told that Mother Nature is somehow "unjust."
Come on. That doesn't even make sense.
I think it's true that the weather could affect the outcome of the game. And I disagree with the legions of experts who think this works to the Packers' advantage. If this game were being played in, say, Arizona under clear skies and 72-degree temperature, Brett Favre would spread out the Giants' backup defensive backs and exploit the hell out of those mismatches. Donald Driver against the once-benched Corey Webster? Greg Jennings against journeyman special teamer R.W. McQuarters? James Jones against a banged-up Aaron Ross? Koren Robinson against…who knows? Donald Lee and Bubba Franks against the Giants second-rate safeties? I think a game under those circumstances could be a blow-out in the Packers' favor. (The main thing the the Packers have going for them today could be the size of Favre's hands, which should make it easier for him to grip a frozen ball than it will be for the relatively dainty Eli Manning.)
I think the weather today will play the role of equalizer, something that doesn't benefit the Packers. But it will not be "unjust." Just as the Bears deserved to win the second match-up of the year because they better adjusted to the conditions, the Giants will deserve to win today if the Packers look like they can't handle the cold. The "better team," will be the one that wins the game.