Ok thanks. I will lead this to my developer. If there is something more to ask I will let you know.
1
jl777c28-Jan-19 01:24 PM
@blackjok3r each restart the tmpfile is cleared
so over time, tmp .blk stays relatively constant
blackjok3r28-Jan-19 01:25 PM
yes. See this... Only bug left is when it starts the first time
It doesnt create the file... the first block it receives crashes it
once you restart its fine
trying to find where the path diverges
Also wondering what happens when it fills tehj 128MB on sync... MGNX lo longer syncs with the changes to assets CC.
So have to try something else. Trying to solve crash first.
jl777c28-Jan-19 01:27 PM
it should just keep making more tmp .blk files
blackjok3r28-Jan-19 01:28 PM
Should be possible to use prune block code on those... so it only has 1
jl777c28-Jan-19 01:28 PM
it just starts from 100000...
we might need to put in an exemption for MGNX
blackjok3r28-Jan-19 01:30 PM
block 20909 it stops
jl777c28-Jan-19 01:31 PM
likely some early assets test tx?
1
blackjok3r28-Jan-19 01:31 PM
I think so yes
EVAL_CC for tokes fail
jl777c28-Jan-19 01:32 PM
hopefully not too many and we can add an MGNX height exemption for tokens CC
blackjok3r28-Jan-19 02:39 PM
fixed bug on start
ComputerGenie 👴👴👴28-Jan-19 02:44 PM
and we can add an MGNX height exemption
Or restart a 5th chain
1
wonders how much MGNX he actually has and if it's worth it to consolidate his 5 nodes to find out
blackjok3r28-Jan-19 05:04 PM
Got close to making a syncing chin cycle though 4 temp files...
If you dont do something like this... syncing a china ther first time takes up 2x teh amount of space
Possible also to make temp file max size smaller.
Any issues it might have should be the same as if the daemon is restarted and it sets the first file to null(edited)
Might actaully be safer as it calls PruneOneBlockFile for the temp file...
So the index at least knows the block is no longer there
If this works fine, I think I can make it remove blocks from the index that were never included in the chain, during PruneOneBlockFile, by checking if the block is still in tempfile but not in the main chain.
Doesnt quite take into account notarisations... But not sure it needs to, with enough TempFile space.
Alright28-Jan-19 06:04 PM
I don't think anyone would notice if MGNX just simply disappeared
1
I'm serious
let's stop deving a chain for these people
blackjok3r28-Jan-19 06:05 PM
You figured out how to do the PoS attack yet... I think I have a perfect fix I cant test it properly without invalid blocks.
Alright28-Jan-19 06:05 PM
they abandoned it, why should we continue to spend time on it
I cannot figure out how to hold back a block without flat out killing the network
trying to packet sniff now
blackjok3r28-Jan-19 06:07 PM
hmmm I dont think we need to... I disabled some validation that shoulda llow just blocks that have a no fee tx at the end in as a valid PoS block until ConnectBlock... seems to work just fine, until someone spams heaps of fake blocks at it...
ComputerGenie 👴👴👴28-Jan-19 06:08 PM
why should we continue to spend time on it
because I have too many to just throw away
blackjok3r28-Jan-19 06:08 PM
But that shouldnt matter because it just saves invalid blocks and then doesnt add them to the main chain if it doesn pass conenct block and eventually they are over written
@blackjok3r I think if you're saving them at all, it's a problem
blackjok3r28-Jan-19 06:10 PM
It doesnt keep them
It uses 4x16MB files (atm can cahnge size) and just saves all incoming block IN ONLY THESE 4 files
on connect block it adds it to the main chain
garbage is just over written
Alright28-Jan-19 06:11 PM
what about sustained attack?
CPU RAM loads
blackjok3r28-Jan-19 06:11 PM
should be fine
Cant say for sure coz this PC is reallyt fast but syncing aZEX is just as fast as without it
and the more fake blocks the more file operations
could slow it down on like HDDs maybe
Alright28-Jan-19 06:13 PM
I really need to get this working
kind of going in circles
tried like 15 dirty hacks to try to hold back a block and stay connected
blackjok3r28-Jan-19 06:14 PM
I dont think you need to... just make every utxo elegible .. it will make a block evey 30s... I dont think it can go faster ... maybe use more nodes?
we can make the diff liek 0 too
it will fly
Alright28-Jan-19 06:14 PM
I've explained this man
not the best place to talk about it, hold on
Alright28-Jan-19 09:35 PM
@LabsAssistant
good new and bad news
Bad news, we would like to delay launch..
Good news, we think we have a much better solution to the pay per notarization problem along with the buy pressure problem.
We wish we could have seen this earlier. We got the idea while looking at OUR. We realized how cool having a dynamic coinbase based on transactions within the block is.
The idea here is that:
The notary pay per notarization will happen in the coinbase of the block the notarization is included in. The POW/POS rewards will remain unaffected, but additional vouts(and coins) will be added to the coinbase.
the 10% or 22%, whatever is decided will solely to paid for LABS->KMD notarizations. Notarizations on fungible chains will be paid for by the creator of the chain.
We will have two new ac_params, -ac_notarypay and -ac_dead. ac_notarypay is the amount the notary will receive in the coinbase transaction for each notarization made on the chain. ac_dead is blockheight at which the chain will die. Consensus rules will dictate that any height above this is invalid. ac_dead is required because the chain creator must pre pay notarization fees for the duration of the chain. We may look into ways of being able to "refill" these funds. The proposed mechanism right now is that chain creator will burn block 1 amount and notarization fee amount for the duration of the chain. The amount burned for notarization fees will then slowly be recreated by each notarization on the chain. Once this amount has been fully recreated, the chain must die.(or fees refilled, but this could be complicated)
By requiring every fungible chain to have ac_notarypay, we can allow notaries to choose whether or not they will notarize a chain based on ac_notarypay amount. We hope this will lead to a free market for notarization fees for fungible chains.
If you guys are on board with this, we will solely prioritize this feature and launch as soon as we believe it's stable.
1
This means we would only need a chain like PAYME for bounty payout mechanism.  Especially don't feel like building this notary payout mechanism knowing we will immediately be deprecating it for something better.(edited)
6
1
CrisF28-Jan-19 09:40 PM
That sound very cool!
TonyL28-Jan-19 09:40 PM
Is -ac_notarypay presets in native chain coins?
Am I understand correct that it's kinda PPN (pay per notarisation) model where chain paying for each notarisation event separate?
ComputerGenie 👴👴👴28-Jan-19 09:43 PM
By requiring every fungible chain to have ac_notarypay, we can allow notaries to choose whether or not they will notarize a chain based on ac_notarypay amount. We hope this will lead to a free market for notarization fees for fungible chains.
One of your best long-term ideas yet (edited)
And1_8928-Jan-19 09:50 PM
how to run a Kmdlabs NN there is a manual to set up?
repo to launch and manage STAKED notary nodes. Contribute to KMDLabs/StakedNotary development by creating an account on GitHub.
And1_8928-Jan-19 09:52 PM
Thx
TonyL28-Jan-19 09:53 PM
If change -ac_notarypay on fly - such securing solution seems not secure for chains creators since they are slavery and notaries might stop notarisation when they want.
If -ac_notarypay sets only once when majority of notaries are agree and can't be reconsidered - it might be absurdly high or absurdly low depends of coins price fluctuations and not cover notaries hardware/maintaining.
But maybe I'm missing point totally because sleepy.
blackjok3r28-Jan-19 09:54 PM
All chains are LABS coin....
notaries get % of LABS, and each notarisation on other chain pays ~0.1-0.2 Maybe a bit less per notarisation in the coinbase to the notaries who made it.
They would need to consolidate funds before migrating...
Alright28-Jan-19 10:08 PM
@TonyL this assumes that most chains will be short term(couple months at most)
we can accommodate more permanent chains, but I feel we shouldn't have many
I don't quite understand what you mean by slavery
TonyL28-Jan-19 10:09 PM
Aha, now it's more clear. So it's kinda "notarisation contract" for some time
Alright28-Jan-19 10:09 PM
yes
TonyL28-Jan-19 10:13 PM
I've used this "slavery" term with long term / permanent chains in mind
With such scheme notaries may make the price very high on some point and chain will be supposed to pay to not be unprotected for some time
Alright28-Jan-19 10:14 PM
this solves buying pressure issue, solves multisig for payouts issues, solves determining the "best" notaries for reelection
it takes 6 notaries to notarize
notaries overcharging will hurt the chain overall, I think it's in their best interest to keep it reasonable
it only takes 6 reasonable notaries
TonyL28-Jan-19 10:18 PM
Notarisations by subscription with pre-set price - it's very cool and creates open market, thank you for explanation!
With many competing market players/ notarisation clusters price should form not random and clusters will try to be cost-effective and provide best service, agree with @ComputerGenie 👴👴👴 seems super huge if dPOW concept spread a lot
Alright28-Jan-19 10:24 PM
this mechanism only really works on the assumption that the chain will only last for a given amount of blocks


Happy 2nd anniversary to the hottest, cutest and sweet girlfriend ever. Am I dreaming, or has a year already passed by? Wow! With you around, time just flies. Let’s celebrate the day that you gave up on finding anyone better than me. I want to say you that you make me the happiest man in the world to have your love. Today we meet our 2nd anniversary and every day we’ve spent together, we’ve seen our love get more and more grow up and it has filled our heart happiness. Spending of 11 months, 4 weeks, and 2 days with you is pure bliss equal a thousand years of experiencing all the other pleasure of life. With a twelve-month period passed by I realized that love is not about romantic excitement but to deal with a problem that handles the emotion of each other. We have shared so many amazing memories this past year. And here we again for another year of wonderful adventure together. I can’t wait to see how gonna solve our new year puzzle to build our new awesome memories.  You have been a caring and loving girlfriend. As we complete another year of togetherness, I pray Almighty that he always keeps up bonded like this and make our love stronger. I thank God every single day that I have you in my life. But I am especially thankful today, on our anniversary, that I have found you. I pray that we will have many more anniversaries to celebrate together. Thank you for loving me. Happy anniversary.


R Help
Below are a number of guides and links to help you with R and RStudio.
Research Methods and Statistics
A guide for using R for research and statistics.
This site includes tutorials on R Statistics with particular help for visualizations.
This is a book by Hadley Wickham that teaches advanced programming skills.
Getting used to R, RStudio, and R Markdown
A brief introduction to R, RStudio and R Markdown
An introduction to statistical and data sciences via R
This book helps learners with R from the ground-up.
R for publication helps give students the skill to
Learn R in R!
This site goes into a lot of detail on statistics and then provides information on using R for data analysis.
A simple guide for using R for psychological research.
A guide from an ecologist on using R for statistical analyses
Data Visualization for Social Science
This is a practical guide for R and ggplot
An introduction to the tidyverse.
A Bayesian course with examples in R
This site from Dr. Finzi has gathered a number of resources to help with R.
Cheat sheets to learn packages.
Base R Cheat Sheet
A list of cheatsheets pulled together from RStudio.
A tutorial to look at data with R.
An introduction to R for python users
Links to 75 different R tutorials
Getting started with Data Analysis
Guides and Tutorials from Princeton libraries for conducting data analysis
Data Camp course on working with R to retrieve data from the web.
University of Cincinnati Business Analytics R Programming
An introduction to R, R Markdown, R notebook and two courses in using R
R for Data Science Online Learning Community
An introduction to using R and RStudio
Learn R for Psychology Research
A crash course for using R so that psychologists can import, wrangle and plot their data today.
An intro to R with cat memes.
Statistical Inference: A tidy approach
An introduction to the tidyverse and statistical tests
Solutions to common tasks and problems in analyzing data.
A book for using R in datascience.
A resource that demonstrates that anyone can learn R.
A course for gaining skills with R and datascience.
A course for gaining skills with R and datascience.
This course was indented to introduce students to topics, concepts, and workflows that are commonplace in “data science” more generally but are less formally discussed in Psychology.


Salmon Cookies
™
Home
Sales
About
Contact
What Our Customers Are Saying:
"Why?"
-Abigail
"Hmm..."
-Murdoch
"These salmon cookies smell ripe!"
-Dave & Friends


This is a website for all WUHSMS students to seek advice. Here you can find students who share their experiences and thoughts at WUHSMS.
From studying for the SAT, to acing your driving test you can get advice for pretty much everything!
Curious about which clubs to join? Need advice for writing your college essay or passing your drivers test?
CLASS OF 2020 BAKESALE - Friday, June 1 during ARE time in the middle school lobby
SPANISH CLUB MOVIE NIGHT - Friday, June 1 at 6pm in room 123
CLASS OF 2021 CAR WASH - Sunday, June 3 from 12pm - 2pm at Woodstock Pizza Chef
BRANCH OUT TEEN NIGHT - TIE DYE & BBQ Friday, June 1st at 6pm – 9:45 pm
FREE for all teens in grades 7-12!
GRADUATION - Friday, June 8 at 6pm at WUHSMS


A basic introduction about me
I'm a junior student majoring in computer science. I love playing video games and watching movies as well as travelling.
My family
I was born in Liaoyang, China on 13th Jan, 1999. My parents are both doctors in facial surgery at that time. Then they changed their job to be businessmen selling car bumpers. My grandfather on my mother side and my father side both passed away when I was quite young. Fortunately, my grandma accompanied my childhood and she took care of me very well so that I could robustly grow up. I have a little sister aged 15. She said she also wanted to study abroad in the future. Here is a photo when my family came to New York last winter break. I love them so much!


I've installed energy monitoring with a client and need to extend his ethernet connectivity to the switch room. I think the best solution is to use a powerline adapter. I don't have a 3G solution and the cellular coverage is really poor anyway.
I've seen TP-Link Powerline adapters, but these won't work if the adapters are on different electrical phases. Has anyone seen/worked with a commercial solution ?
Thanks,
Eamonn.
Re: Powerline Adapter to work across different phases
I believe I've seen something for this - basically it's a high pass filter that gives you a short between phases at the carrier frequency. But have you tried it without? There might be enough capacitance in any 3-phase cable to transfer the signal anyway. TP-link seems to think it will work: http://www.tp-link.com/en/article/?id=406
[Edit: I knew it! Use your Google-fu on "powerline phase coupler"]
Re: Powerline Adapter to work across different phases
Robert,
thanks. I've tried it as it stands, and did actually get a connection, but it died and haven't been able to reestablish it. The fact that it worked ( even for a little while ) is some good news
I've also seen those couplers and the faq, and agree with you that you'd expect them to be coupled anyway , capacitively speaking... The client is 80-100km away from me but just found out that one of their clients is using a Solwise powerline adapter so I suspect I need to give my adapter a unique 'name' - I'm checking with tp-link to see how to configure them to avoid interference. Thanks a lot for your input - much appreciated.
Re: Powerline Adapter to work across different phases
would a powerline adapter on each phase near the fuse box work if you use a xover patch cable between then?
just a thought
Re: Powerline Adapter to work across different phases
Yeah; fair point you need to be able to get cat5 cable to each adapter and then back to the router; not possible for me.
Re: Powerline Adapter to work across different phases
no no
if 2 of the phases are close just use a crossover cable between them... no need for a router or switch
it should work as a link
Re: Powerline Adapter to work across different phases
Surely the dedicated adapter will be better/cheaper even if only two phases are needed, and definitely cheaper than two pairs of adapters for 3 phases?
Re: Powerline Adapter to work across different phases
if it was me...
and lets say my fuse box is at one end of building and my internet is the other end i would take 2 of these adapters somewhere near the fusebox and place them at each phase and just just an ethernet crossover between them...
if 3 phases i would just get the cheapest 4port or less switch and connect each of the 3 adapters to it, at internet end another adapter and you should have internet no matter what outlet you pick...
Re: Powerline Adapter to work across different phases
@ Robert: by 'dedicated adapter' did you mean the phase coupler?
@ Bo : The electrical switch room doesn't have any distribution smaller than 240mm2 Aluminium 4core swa for 2 of the 3 phases so it's not possible to 'link' them. I've worked on that size cable in the past but in this case it's simply terminated off a busbar and going straight out of the room :-)
thanks,
Eamonn
Re: Powerline Adapter to work across different phases
Eamonn:
"@ Robert: by 'dedicated adapter' did you mean the phase coupler?" Sorry, yes. I've got a head full with cold at the moment, my brain is on a go-slow.
 If so, could the coupler be installed in the busbar chamber? Failing that, (1) a set of busbar fuses, or (2) is there anywhere else where the phases come within reach of one another. There's nothing to stop you running the coupler off 1.5 mm2 or less provided you have the appropriate protection in place.
Re: Powerline Adapter to work across different phases
Robert,
hope you get well soon.....
You are correct, and I must take another look at the busbar; small outage might well be worth it.
thanks for the ideas.
Eamonn
Re: Powerline Adapter to work across different phases
I was at the IBC broadcast technology exhibition in Amsterdam yesterday and Devolo, the HomePlug power line networking company, were there. With this thread in mind I asked if their products would work in a three phase environment. Without being able to provide particular detail the salesman said they would, due to induction between the phases.
When I got home I found these links that might be of interest:
http://www.devolo.com/uk/dLAN-Professional/dLAN-Powerline/dLAN-200-AVpro...
http://www.devolo.com/products/Professional-dLAN-Powerline/dLAN-200-AVpr...
Regards,
Steve
Re: Powerline Adapter to work across different phases
Steve,
I really appreciate that. Thanks a lot for asking that question of them. I'd been thinking about the Devolo products,having heard they're performance is a lot better. I'll certainly test them out and let ye know how it goes.
Thanks again,
Eamonn
Re: Powerline Adapter to work across different phases
I used the Devolo dlan 550+ but it didn't work. I was able to occasionally get internet access in the electrical switch room, but could not get data to emoncms.
One thing I am going to verify (hopefully tomorrow) is that the root cause is lack of ethernet connectivity rather than some error between the emontx and emonbase......that would be embarrassing !
Do you guys know if I can use the oemgateway image to log data to SD card, so that I log locally while also attempting to send the data online?
The bufferedwrite (https://github.com/emoncms/emoncms/blob/bufferedwrite/readme.md ) solution is based on emonhub and that would require me to update the emontxV2 sketch and change the payload. Need to verify if I can change the continuous watthours sketch to add current, VA for each phase and voltage rather than just power.
Eamonn.
Re: Powerline Adapter to work across different phases
Hi Eamonn
How is your payload structured ? emonHub is intended to be a direct replacement for OEMGateway.
There maybe a distinct advantage in using emonHub if you suspect possible Ethernet/network issues, oemgateway's single thread can get bogged down trying to deliver to an unavailable target and miss incoming data, where as emonHub runs an additional thread for each target so if it is waiting for a http request timeout the main thread continues to log data.
Also emonHub's logging is far more verbose and may help identify any issue with connectivity.
Paul
Re: Powerline Adapter to work across different phases
Thanks Paul, makes sense to move forward(emonhub) rather than hang on to the past(oemgateway) :-)
Payload is as follows ; (from emontx CT123 Voltage sketch)
It's a long payload, and the addition of PF is overkill (given I've real/apparent power anyway).
I thought I'd need to change the payload as Trystan had done here to include msgNumber etc in the correct format, though he's motivation was prob to use the continuous sampling sketch ... http://openenergymonitor.blogspot.ie/2014/08/monitoring-solarpv-heatpump-and-house.html
The best approach for me may be to use the continuous sampling sketch, with emonhub, and shorten the payload to get the real power demand working. I can then update the sketch for current and apparent power later.
Eamonn
Re: Powerline Adapter to work across different phases
If it wasn't for the fact emonHub is so heavily based on OEMGateway and my involvement with emonHub development I would be hesitant to change too, I was a big fan of OEMG.
emonHub will process a payload of 13 ints no problem using the default datacode settings and only if you choose to add any other datatypes would you then need to declare the nodes payload structure just as Trystan has in the example.
Paul
Re: Powerline Adapter to work across different phases
Paul,
thanks again for your input ( terrible unintentional pun....)
Could I just check 1 thing.....
(i) in the emonhub.conf : to set the frequency, one should add '433' for 433Mhz as per https://github.com/emoncms/emoncms/blob/bufferedwrite/docs/setup.md and not just the shorthand '4' as it was with the oemgateway instructions at http://emoncms.org/site/docs/raspberrypigateway
Thanks,
Eamonn
Re: Powerline Adapter to work across different phases
Yes, the full 433 rather than just 4 is used in emonHub, the lack of documentation is on the radar but not yet tackled I'm afraid,
Paul
Re: Powerline Adapter to work across different phases
great... just wanted to check.
I have deep (painful) memories of keeping system documentation up to date. It's practically impossible to innovate as fast as this and keep everything in sync......
thanks,
Eamonn
Re: Powerline Adapter to work across different phases
I'm trying to get logging working here locally (completely offline sports clubhouse( patchy gsm coverage ))
The date was way off on the pi ( 1970) and I needed to manually bring it closer using <date -s "3 Oct 2014 13:18:00">
Apparently if the date is too far off, raspi-config or dpkg configuretzdata won't fix it and this was what I was seeing.
I'm now seeing an error "PHPFina:post timestamp out of range" in the emoncms.log but not sure how to correct it.
also the feeds are updating but I can't visually see the data.
Re: Powerline Adapter to work across different phases
ok; she's logging now. This is really an amazing setup(emontx/emonhub/emoncms).
Think my error in the log file above was because I tried to export data and it didn't like the date timestamps....
In any case I'll give it some time and return next week to check accuracy with the Elster A1120
Also seeing negative kWh and kWhd feeds, though the power inputs are positive. Just logging the Wattage and then using the Power to kWh/d process to generate the feed. Anyone seen this before?
Eamonn
Re: Powerline Adapter to work across different phases
Hi Eamonn,
The time and date thing is a right royal PITA as both emoncms and emonhub rely on a time signal,the Pi's timekeeping (or lack of in some instances) is quite complex and is an issue for the read-only SD card image development.
From what i can make out the problems are predominantly apparent where there is no working internet connection at boot up, but cannot be absolutely sure as the exact symptoms or conditions are not always clear.
Jörg (JBecker) and I had a long PM conversation about this sometime ago and in his case the Pi was not reading the symlinked copy of /etc/fake-hwclock.data on the data partition at boot up and the Pi would default to unix time 0 (1970) until it had established a working internet connection, at which point the current time would be corrected and all would be good. but if a data frame was received by the rfm2pi before that time the incorrect timestamp is already logged by emonhub and passed to emoncms, which could cause some disruption to feeds. We got around that by deleting the symlink and recreating the original file, which I assume is still working for him but makes his install totally dependent on a internet connection as the fake-hwclock file is located in the RO file system so cannot be automatically updated,
I'm not 100% sure of the exact problem so I don't have a definite fix but the core of the issue is the read-only file system and lack of internet connectivity.
In your situation it may not be feasible to do the same fix as the internet connection maybe slower to achieve and therefore may benefit more from being able to update the fake-hwclock file in it's own time rather than being able to find the file at boot time, but I'm unsure if that's feasible or not.
I'm guessing the fact you can see the feeds update but not see the data maybe because emoncms is accepting the data and the feed is seen to update but then the PHPFina module is preventing the data being written because it has a acceptable window of -5yrs to +24hrs (from memory) so it's discarded.
Could the negative values also be a result of erratic timestamps?
If the sketchy internet connection is going to be for a prolonged period it may be worth considering a RTC or in the short term there are a couple of things you could try, like reverting the fake-hwclock to it's original location and add some form of method to update the time, adding the "rpi-rw" & "rpi-ro" commands to the cron entry for updating the fake-hwclock (relies on a good internet conn at the time the cron runs) or the shutdown procedure (no use if Pi's power is interupted) or a custom script to run a timer since last time update and then keep trying to update until successful (extra work) none of these are perfect (or even tested) but may help.
Paul
Re: Powerline Adapter to work across different phases
Paul,
thanks that's really interesting. I have 2 scenarios:
(i) My 'powerline adapter install' is completely offline(posting to localhost - 8Gig SD card). I was able to use by iphone hotspot for a while( GSM coverage is patchy) to post above on this thread and try to debug the date issue. I think I could use that to make sure the inital setup is correct.
(ii) Online (cat5 connection to router, posting to online server): With this pi, I changed the fake-hwclock.data file earlier, but when I rebooted the pi it reverted - can't 'make it stick' so your ideas above are worth trying. I also saw negative kWh feeds when all inputs were positive, but after I did an apt-get update & upgrade on my ubuntu 12.04 emoncms server earlier today it cleared up, though the date/time was always perfect on the server. So, not 100% sure if it was the root cause but clearly I had let it go 'stale'...need to manage the server better.
Is there a reason why I can't expand the filesystem with emonhub like I was able to with oem? I would like to do likewise(update&upgrade) with my offline installation in (i) above.
Also, feedwriter.log needs to be started manually - is that ok or could it point to a problem?
I'll do some testing and see if I can better document my exact use cases & workarounds .
thanks,
Eamonn
Re: Powerline Adapter to work across different phases
It's not emonHub but the the way that the SD card is set up for emonCMS that causes an issue, raspi-config doesn't know how to handle the 3rd partition and there is no room to expand the file system unless you move the 3rd partition to make a hole to expand into see RaspB+ and SD card Extend to manually expand the file system.
I think there might be an omission in the ready-made image, Jörg also had to carry-out these steps from this guide
The fake-hwclock seems to have a will of it's own most of the time, I've done extensive reading on npt and fake-hwclock, and it still baffles me :-)
Paul
Re: Powerline Adapter to work across different phases
thanks a lot for that.
Eamonn
Re: Powerline Adapter to work across different phases
Hi Eamonn,
I did some research on the time issues see Read-only image time issues for some more info.
Paul
Re: Powerline Adapter to work across different phases
Paul,
great; I'll validate this manually over the next few days since I've a recent use case.
Eamonn


Hello!
I am a noob user to the OEM project, having recently taken delivery of my (Kickstarter) emonPi.
I have successfully installed the hardware in my home (Grid and Solar CTs), and have now tried to start using the emonCMS environment. The road has become rather rocky before I expected it to, and I would appreciate some advice in return for my initial feedback please.
Feedback from the noob perspective:
- I installed the HW without any problem, but didn't find the installation notes very clear about the need to polarise the CT sensors to make sure that the values were represented correctly +ve / -ve. Some additional documentation would be ideal here please.
- The emonPi connected to my network without any trouble, but the IP address which is shown on line 2 of the display does not have enough digits to correctly display all forms of IP addresses. In my case the DHCP server assigned my emonPi the address of <IP_ADDRESS>, but the display did not have enough characters to display the final "7", thus leaving me confused as to which address to use in my browser. Naturally I dug around in the DCHP assignment tables of my router and found the solution, but the formatting of line 2 of the display would benefit from an update please. If you change the "IP:" prefix to "I:", then the display would have sufficient characters to display any IP address with three digits in each of the IP four address fields xxx.xxx.xxx.xxx.
Questions and problems:
- I seem to have managed to lock myself out of the emonCMS interface. When I initially registered my first username, I allowed my password manager to generate and store a secure password for my local user account, which was 20 digits in length comprised of upper and lower alpha, numeric, and symbols. Having logged out and tried to log back in again, I now can't get back in and the register button is no longer available. The username and password is definately correct, becuase it was automatically stored by the password manager.
- I suspect that there might be a limitation in the password length and/or accepted character set. Is this so, and how do I now get myself either logged in, or re-registered as a user on emonCMS please? Please don't tell me that I have to take the case apart to re-image the SD card; that would be very disappointing.
- When I was installing the CT sensors, I noticed a metallic buzzing coming from the sensor coils before the CT sensors had been plugged into the emonPi. Having knowledge of electronics I was careful not to touch the exposed contacts on the 3.5mm plugs. Are the supplied sensors fitted with suitable protection resistors to protect the user while handling the unplugged CTs? A current is obviously induced in the transformers even when they are unplugged, and the noise I heard worries me for the safety of those who might not be so wary of the potential dangers.
- As a new user it took me quite a few attempts to set up the nodes / feeds correctly, before I understood sufficiently to get things how I wanted them. After a few experiments where I could generate graphs etc, I decided to delete all of the feeds and nodes and start again with fresh data. I also had to reverse the polarity of some of the CTs to get the figures reported correctly.
- I re-created the feeds but the graphs didn't appear in the vis, even after I had waited a good long while for the data to accumulate. Concerned that the graph rendering might have simply got itself in a knot, I decided to log out of CMS and back in again to see if the graphs came back to life. That's when I got locked out.
- There's a good chance that I used identical names for the feeds on my second and third attempts. Is this OK to do, because I certainly wasn't having any luck. A testing issue perhaps?
I hope that someone with more experience can guide me, and I hope that the feedback from a new user is valuable in some way. I'm looking forward to some good experiences when I can get it up and running properly, but I suspect there are still some early gremlins which need to be ironed out.
Kind regards,
Rich
Title edited by Moderator - Paul
Re: emonPi - Locked out of emonCMS
Hello Rich,
Thankyou for the feedback
Perhaps the easiest way if you havent yet logged a lot of data and dont mind starting a fresh is to do a "factory reset". If you can login to the raspberrypi with SSH (using putty on windows or from terminal on linux):
ssh<EMAIL_ADDRESS>(default password: raspberry)
Then:
sudo emonpi/factoryreset
will restore the pi to a clean install, removes the user account and deletes all feed data. I can see that a password reset feature via SSH could be useful if even to give a temporary password for a one time login. Il have a think about how to do that.
Re: emonPi - Locked out of emonCMS
Hello Trystan,
Thank you for your quick reply. A factory reset has gotten me back up and running so thank you for that.
However, a few more notes for you:
I've set up a few basic feeds and I shall leave it running for a week or so to see what data I get. Should be interesting!
Thanks and kind regards,
Rich
Re: emonPi - Locked out of emonCMS
CT orientation and voltages:
You obviously missed this in the installation and calibration instructions. These do state that you should connect the CT before installing it on its cable, but there is a pair of zener diodes in the recommended CT that should protect you (but might not protect the input circuits). They also tell you our convention and which way round to install the CT:
"(a) Single phase supply: Plug the lead from the CT into the EmonTx and then clip the CT around one cable that runs from the meter to the consumer unit. If you use the line cable (normally the outside one of the four coming out of the meter, red or brown insulation might be visible where the cable enters the meter terminal block), the face of the CT marked “ SCT-013-000” should point towards the meter. It is possible to install the CT on the supply side of the meter, in that case the face of the CT marked “SCT-013-000” should point away from the meter. This will ensure that imported power is shown as positive. If you use the neutral cable (normally the inner), then the face of the CT marked “SCT-013-000” should point the opposite way: away from the meter on the load side or towards the meter on the supply side. Do not put both cables through the CT."
The paragraph but one after that tells you how to orientate the PV CT.
Re: emonPi - Locked out of emonCMS
Hello Robert,
Yes, I definitely missed that. After a good degree of searching I have now found the page that you're quoting from. When I installed the product I was using the get started --> emon pi setup guide (which seemed logical! <smile>), so perhaps a good modification to the setup guide would be to link to this excellent CT information so that new users know where to find it.
I appreciate your feedback though, thank you, and I'm sure that together we can make the out-of-the-box experience better for future users. I've found with my own product development and documentation, that as things become less modular and more of a single purchase product, then it is necessary to adjust the style of documentation and guidance.
Thanks again, kind regards,
Rich
Re: emonPi - Locked out of emonCMS
That just got fixed in the latest update; go to Admin -> Update emonPi in emonCMS.
I managed to get away with a lastpass-generated 30 character random password with special characters. I too, however, would like to know what the length limit is.
A loosely related issue I'm currently having is that the emonCMS.org website is not letting me log in, even when I request a new password and use the new one that was emailed to me.


Intercon is the premiere LARP convention, running games of as many different and varied genres as we can find. Intercon attracts LARPers and LARP writers from all around the world. We're the largest multi-genre LARP convention in the world.
We get a very diverse crowd of LARPers. For some, this is their first experience with LARPs. For others, they've been playing games for decades. Some have been writing games for that long.
We get some great LARPers. Generally, they're looking for games with strong characterization, with lots of plot and great storylines. These are people who aren't just looking to stand around and wait for the GM to direct the action. These are players that want to create memorable scenes, dramatic or comedic. They want to immerse themselves in their roles. Many of these players like to costume to the hilt. It's not an easy group to write for, because they have a lot of gaming experience, but the results can be very satisfying.
All kinds. Light, dark, serious, silly, short, or long, we need a mix of games for the convention. We're looking for murder mysteries, science fiction, high fantasy, historical set pieces, theater style, live combat, and just about any other genre you could name. We're looking for something that isn't already on our schedule, and we're willing to run experimental games, too.
Ask ten LARPers what LARP is about and you'll get thirteen different answers. We're trying to find interesting games that satisfy as many of those possibilities as we can.
No. If you have a game that's been run successfully before, we're interested. Some of our favorite games have run many times, at other Intercons, privately, or both.
No. Every year, the con comes up with a marketing theme or two. Intercon D had a theme of deja vu. Intercon C "celebrated a century of LARP", Intercon B had a theme of "B movies", and so on. We use this theme in our advertising. If your game fits into the theme naturally, that's great! We may try to use it specially in our advertising. If your game doesn't fit the theme, it will not factor into our decision processes. We look at all games on their own merits.
Intercon encourages new writers to bid games. While many of the names on the schedule may be familiar, there are always new authors as well. We look for new writers, because we know what's involved in the process. We know that those familiar writers had to start somewhere. Having a great group of players to play in the game also helps new games succeed.
We are looking for games of different sizes, all as part of the mix. We've had games as small as 4 players and as large as 50+ players. Most of the games at the con range from 20 to 40 players. Some games have fixed sizes. (e.g. a game needs 24 players) Some games are more flexible. (e.g. a game can take from 20 to 30 players.)
Sure. We've run games for four and six players before.
That depends on your definition of big. The Boston Intercons typically attract more than 200 people, all looking for an intense experience. That typically means they are looking for a more intimate game experience. Games of 20 to 40 people generally do very well. Because we always have a great selection of games, players have tough choices to make when signing up. There's a lot of competition in every time slot. We try to do our best to make all of the games successful, but it can be difficult for games needing more than 40 players to get enough players.
We're looking for games that run from five minutes to those that run all weekend long.
We have players as young as 8 who play games at Intercon. We ask that all games list their age restrictions in the game description, both to avoid signups by players who are too young for the content in your game and to help young players and their guardians in finding appropriate games to play.
There are seven primary time slots used to schedule games. We try to schedule games to give the most choices to the players.
| Day | Slot start time | Typical game length in this slot |
|---|---|---|
| Friday | 8 PM | 4 to 6 hours, although games can run longer if the players are willing to stay up that late. |
| Midnight | Up to 4 hours, although usually shorter. Some games have run even later into the night, but most players want to get up in the morning to play. | |
| Saturday | 9 AM | 4 hours. This slot is followed by an hour for lunch, so games can run longer. Games also have the option of starting earlier. |
| 2 PM | 4 hours. This slot is followed by a two hour dinner break. Games have run into the dinner slot in the past. | |
| 8 PM | 4 to 6 hours, although games can run longer if the players are willing to stay up that late. | |
| Midnight | Up to 3 hours, although usually shorter. Some games have run even later into the night, but most players want to party, to socialize, or just to get up in the morning to check out or to play. | |
| Sunday | 9 to 10 AM | 3 to 4 hours. Players typically have to check out of the hotel during this time, which can be disruptive. |
The bid form asks you to rank the slots you'd prefer for running your game. We try our best to give you your preferred slot, but it isn't always possible. Scheduling the con is always an interesting puzzle. The more flexible you are and the more choices you give us for scheduling makes it easier for us to put that puzzle together.
We also have to consider the time and effort that are needed to tear down a game and set up the next one. Some games require significant setup, and the time for that setup has to be factored into the schedule.
No. It's true that most of our game slots are four hours long. While it helps if your game fits nicely into one of our slots, it's not absolutely necessary. Most successful Intercon games fit into a single slot.
Two hour games are quite common. Clearly two of them fit nicely into a four hour slot. We try to pack slots, again to maximize player options.
Games up to about six hours can fit into the Friday and Saturday night slots. Friday games may be able to run even later, stretching to seven hours, if the players are willing to stay up.
Games that are even longer must span more than one slot. Intercon will schedule a strong game across more than one slot. However, if a game spans just two slots, it means that game must compete for players with as many as ten to fourteen other games. We always schedule a lot of great games opposite each other. That means players must choose between playing in a multislot game or in two (or more) single slot games. It takes a special game and special writers to meet that challenge. We want the games at the con to be a success, able to attract the number of players they need. It's why we encourage games that fit into a single slot.
The Crowne Plaza has great function space, and we take it all. We also fill it up. We can typically guarantee one function space room per game. If you need more than that, we may be able to make it work, depending on the size of your game. This does limit us, but we encourage GMs to think creatively, as we know you can.
We also need to know what special spatial needs you may have beyond enough room for your players. This includes things like a need for high ceilings, making sure that any delicate furniture is out of the way, the desire for a small secondary room for side activities, or specific traffic flow demands. We'll do what we can to give you a workable space. However, be aware that we do fill up all the function space in the hotel, and you have to share with six or seven other games. It may not be physically possible to give you the ideal space.
Players come to Intercon to LARP, often playing five or six games in the span of the weekend. This doesn't leave a lot of time for sitting with a GM to build a character before a game. Players at Intercon typically want characters with a rich background, interrelationships with other characters, and plots that connect them to others. That's much harder to do with BYOC or characters built at the door.
This doesn't mean that we won't accept these kinds of games - but they are less likely to get through the bid process. One solution is to have a deadline for character submission well before the con, so that you can take the characters and build them into the game.
If you're going to bring a lot of your usual players, then sure. It's harder asking a lot of new players to come into an existing campaign, unless you really have something special for the episode. It has to be something that's going to excite others, in a way that doesn't require the new players to know all sorts of background material. The new players also have to feel like equals to those who have been playing a long time. It's not a lot of fun to come into a game where there is a clique of players who outclass you in every way.
We're always looking for interesting games. If you can sell the Proposal Committee on the game, it's likely you'll get players, no matter how strange the game. In fact, many players have told us that they come to Intercon just to play games that aren't like the ones they usually play with their local group. We're looking for unique games, and we do our best to see that they'll be successful.
Yes. Intercon does not discriminate. Almost all Intercon attendees are adults, and we let them choose the games that are right for their sensibilities and capabilities. We look for games that push the envelope. We do understand that some game efforts are not for everyone. We try to make that clear up front by the game descriptions you provide. There are questions in the bid form specifically for these cases; the details are important, so please be explicit.
If you have questions or concerns, please raise those concerns with the Proposal Coordinator.
The Proposal Chair will contact you soon if there are any questions about your game. We will make every effort to get back to you with a decision about your within 4 weeks.
We accept most reasonable bids, but there are usually one or two bids that don't make it into a given con. All game bids are evaluated by the Proposal Committee, using a number of criteria. We try to work with bidders to make all the bids successful, but it doesn't always happen. When a bid fails, we try to make it clear why the bid was rejected. The most frequent reasons a bid is rejected is because we already have a similar game scheduled, or because a bid insists on specific time slots and the schedule is nearly full.
You can. It's best to check with the Proposal Coordinator or the Con Chair first in these cases.


×
Home
Post a Complaint
Check Status
Write to DSW
☰
Change Profile
Sign out
Prateek Gogia
Post a Complaint
☰
Category:
Mess
Food Trucks
Hostel
MI Room
Transport
Fees and Accounts
Library
Student Resource Center (SRC)
IT
Complaint will be forwarded to:
Please tell in brief about the complaint:
*
Max. of 200 Words are allowed
Submit


Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit.
Tell Me MoreLorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit.
Tell Me MoreFreelance Illustrator
I have been drawing for as long as I can remember. I'm mostly self-taught in the field and if that isn't proof of my interest in art and my personality being self-driven, I don't know what is. I'm always up for a challenge and an opportunity to try and learn something new. Being the highly self-critical person that I am, I always strive to execute projects on a professional level. I don't have much experience with comissions yet, but I believe I'm capable of producing original artwork. I'm 18, just about to graduate high school and going into university for Illustration later this year.


We’ve all heard them, those wonderful tales our relatives love to tell at family gatherings. Sure, sometimes we even hear them more often than we’d like. But when you stop to think about it, at some point those stories will eventually be lost forever. Although we can try to repeat that information in order to preserve the memory, it’s always more meaningful and accurate coming from those who have lived the experience. So, if you agree your family history is worth holding on to, it’s time to take action.
There are companies, like this one, that will perform these services professionally for you. Sometimes that’s not feasible and you have to take matters into your own hands. But before you run off and point the family camcorder at Grandma, here are some tips to help you be successful capturing your family history on video.
- Do It Sooner, Not Later People get older, memories fade or worse, so the first tip is do this ASAP. There should be a family gathering of some sort in the near future so take that opportunity to set aside some time to do an interview.
- Choose the Participants Many times, it’s ideal to include two or more people together to obtain the most amount of information. Getting siblings or couples to tell a story together is usually a good way to keep the conversation going and is more comfortable for the participants. It also can give the viewer a feel for what their relationships are like by watching them interact.
- Find a Good Place Choose a quiet spot where everyone can focus without distractions or interruptions. Usually this requires a place indoors where you have more control over the surroundings. You don’t want any onlookers standing about and consider what’s in the background of the shot as well. Make sure it is fairly neutral. One good approach is to move the subject’s chairs away from the walls to the middle of a room so the background isn’t competing visually with the subject. Always use a tripod, the interview will never work holding the camera in front of your face.
- It’s All About the Audio Too many times our focus is on the visual composition of the shot when in reality, it’s what’s being said that is most important thing to capture. Ideally, an external microphone, such as a lapel mic near the subject’s mouth, should be used. If that’s not available, make sure your camera’s microphone is close enough to the speaker. A sound check prior to the interview is recommended here along with headphones to monitor the sound while shooting. If possible, have a second person man the camera so you can focus on the conversation.
- More Conversation, Less Q&A The interview should take on more of a conversational style rather than just answering questions. After you set-up your camera, step to the side of it and conduct your interview from there. This will make the interaction feel more personal because your subject will be talking to you, not the camera.
Ask questions beginning with who, what, where, when, why and how. Avoid questions that can be answered with a simple ‘yes’ or ‘no’. If you’re having trouble thinking of good questions, specific interview questions can be found online. General categories of questions that work well are childhood memories, education, career, hobbies/Interests, marriage & children, faith, life lessons and perhaps some wisdom to share.
Sometimes, interviews can last much longer than anticipated. Take breaks as needed so that your subject is always fresh and alert on camera.
- Plan Ahead Prepare for the interview ahead of time. Have all the questions you want to ask written in advance. Conversations may flow differently than planned, which is fine, but you want to make sure you get your key topics covered and the written list will help you stay on track.
Bring photo albums to the interview to help spark memories. These can also be good topic starters as it’s easy to describe a photograph you’re viewing.
Also, it may be a good idea t advise your participants on what types of subjects you will be talking about a couple days in advance so they can be gathering and organizing their thoughts.
- Share Your Video Now that you have your interview “in the can” it’s time to share it with everyone. Not only will everyone love watching the video, but this also serves as back-up copies stored in different locations giving your video the best chance to be seen by future generations. You may only get one chance to document these precious memories, so the more back up copies, the better.


Your registeration was successful!
Please pay INR 300 at the counter or log on to www.pvrcinemas.com and get your exclusive PVR Privilege e-card
REGISTER HERE
*Mandatory fields


NAF Training Helicopter Crashes In Enugu
It said that although there were casualties, the cause of the incident was still sketchy and unknown.
by SaharaReporters, New York
A training helicopter belonging to the Nigerian Air Force has crashed in Enugu State after returning from a routine exercise.
According to NAF Twitter account on Friday, the crash occurred on Thursday.
It said that although there were casualties, the cause of the incident was still sketchy and unknown.
The tweet reads, “NAF helicopter suffers mishap upon landing in Enugu.
“Helicopter has crashed on landing in Enugu after a routine flight today. Fortunately, there were no fatalities or injuries to any crew member or persons on the ground.
“@CAS_AMSadique has directed that a board of inquiry be constituted to determine the cause of the accident.
“@NigAirForce continues to solicit the understanding and support of the general public as it daily strives to ensure the security of Nigeria and Nigerians.”


Hardware
The hardware details are stored in an Access database with a hardware table containing the following fields:
| Hardware | |||||
|---|---|---|---|---|---|
| Hardware_Number | Hardware_Type | Hardware_Name | Price | In_stock | Small_image |
| Dell_0000123 | Desktop | Office_use | $400.00 | 50 | |
| HP_0000124 | Laptop | Home_use | $1800.00 | 50 | |
| ASUS-0000125 | Laptop | Office_use | $1700.00 | 50 |


String-Matching Automata
问题描述 :
Σ is the input alphabet (a finite nonempty set of symbols).
S is a finite nonempty set of states.
s0 is an element in S designated as the initial state.
δ is a function δ: S × Σ → S known as the transition function.
F is a (possibly empty) subset of S whose elements are designated as the final states.
An FSA with the above description operates as follows:
At the beginning, the automaton starts in the initial state s0.
The automaton continuously reads symbols from its input, one symbol at a time, and transits between states according to the transition function δ. To be specific, let s be the current state and w the symbol just read, the automaton moves to the state given by δ(s, w).
When the automaton reaches the end of the input, if the current state belongs to F, the string consisting sequentially of the symbols read by the automaton is declared accepted, otherwise it is declared rejected.
Just as the name implies, a string-matching automaton is a FSA that is used for string matching and is very efficient: they examine each character exactly once, taking constant time per text character. The matching time used (after the automaton is built) is therefore Θ(n). However, the time to build the automaton can be large.
Precisely, there is a string-matching automaton for every pattern P that you search for in a given text string T. For a given pattern of length m, the corresponding automaton has (m + 1) states {q0, q1, …, qm}: q0 is the start state, qm is the only final state, and for each i in {0, 1, …, m}, if the automaton reaches state qi, it means the length of the longest prefix of P that is also a suffix of the input string is i. When we reaches state qm, it means P is a suffix of the currently input string, which suggest we find an occurrence of P.
The following graph shows a string-matching automaton for the pattern “ababaca”, and illustrates how the automaton works given an input string “abababacaba”.
Apparently, the matching process using string-matching automata is quite simple (also efficient). However, building the automaton efficiently seems to be tough, and that’s your task in this problem.
输入:
输出:
样例输入:
ababaca 0
样例输出:
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 1 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 1 4 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #include<cmath> #include<queue> #define inf 111111111 using namespace std; const int maxn=10005; struct node { int id,cnt; int next[26],fail; void init() { cnt=fail=0; memset(next,0,sizeof(next)); } }trie[maxn*3]; char str[maxn]; int n,m; int cnt; void insert(char *str) { int p=0,x; for(int i=0;str[i];i++) { x=str[i]-'a'; if(!trie[p].next[x]) { trie[++cnt].init(); trie[p].next[x]=cnt; } p=trie[p].next[x]; } trie[p].cnt++; } void build_ac() { queue<int> q; int p,tmp,child; q.push(0); while(!q.empty()) { p=q.front(); q.pop(); for(int i=0;i<26;i++) { child=trie[p].next[i]; if(child) { q.push(child); if(p) { tmp=trie[p].fail; trie[child].fail=trie[tmp].next[i]; } } else trie[p].next[i]=trie[trie[p].fail].next[i]; } } } void solve() { for(int i=0;i<=cnt;i++) { printf("%d",i); for(int j=0;j<26;j++) { printf(" %d",trie[i].next[j]); } printf("\n"); } } int main() { char tmp[maxn]; while(scanf("%s",tmp)&&tmp[0]!='0') { trie[0].init(); cnt=0; insert(tmp); build_ac(); solve(); } return 0; }
妃夕妍雪也有
妃夕妍雪也有
妃夕妍雪也有
妃夕妍雪也有
妃夕妍雪也有
妃夕妍雪也有
妃夕妍雪也有
妃夕妍雪也有
妃夕妍雪也有
程序只能输出一个子序列
代码是给出了，但是解析的也太不清晰了吧！如 13 abejkcfghid jkebfghicda
第一步拆分为 三部分 (bejk, cfghi, d) * C(13,3)，为什么要这样拆分，原则是什么？
程序输出是对的，呈三角型。原程序是按C++写的，已经改成了C的
刚开始学习，为啥会报错了，你试过了吗
华为这题目略显简单啊
代码是给出了，但是解析的也太不清晰了吧！如 13 abejkcfghid jkebfghicda
第一步拆分为 三部分 (bejk, cfghi, d) * C(13,3)，为什么要这样拆分，原则是什么？
L（X [0 .. M-1]，Y [0 .. N-1]）= 1 + L（X [0 .. M-2]，Y [0 .. N-1]）这个地方也也有笔误
应改为L（X [0 .. M-1]，Y [0 .. N-1]）= 1 + L（X [0 .. M-2]，Y [0 .. N-2]）
为什么不直接用STL排序呢？
多谢提醒。代码又编辑了一下
这个问题应该是有一般性的解决方法
很好的思路，可以借鉴
这种二分还是比较经典！mark
为避免精度问题，PI值请使用arccos(-1)。应该是acos


See: Description
| Interface | Description |
|---|---|
| ByteBufferPool | |
| Closeable | Deprecated
use java.io.Closeable
|
| MapFile.Reader.Option | |
| MapFile.Writer.Option | |
| RawComparator<T> |
A
Comparator that operates directly on byte representations of
objects. |
| ReadaheadPool.ReadaheadRequest |
An outstanding readahead request that has been submitted to
the pool.
|
| SequenceFile.Reader.Option |
A tag interface for all of the Reader options
|
| SequenceFile.Sorter.RawKeyValueIterator |
The interface to iterate over raw keys/values of SequenceFiles.
|
| SequenceFile.ValueBytes |
The interface to 'raw' values of SequenceFiles.
|
| SequenceFile.Writer.Option | |
| Stringifier<T> |
Stringifier interface offers two methods to convert an object
to a string representation and restore the object given its
string representation.
|
| Writable |
A serializable object which implements a simple, efficient, serialization
protocol, based on
DataInput and DataOutput . |
| WritableComparable<T> |
A
Writable which is also Comparable . |
| WritableFactory |
A factory for a class of Writable.
|
| Class | Description |
|---|---|
| AbstractMapWritable |
Abstract base class for MapWritable and SortedMapWritable
Unlike org.apache.nutch.crawl.MapWritable, this class allows creation of
MapWritable<Writable, MapWritable> so the CLASS_TO_ID and ID_TO_CLASS
maps travel with the class instead of being static.
|
| ArrayFile |
A dense file-based mapping from integers to values.
|
| ArrayFile.Reader |
Provide access to an existing array file.
|
| ArrayFile.Writer |
Write a new array file.
|
| ArrayPrimitiveWritable |
This is a wrapper class.
|
| ArrayWritable |
A Writable for arrays containing instances of a class.
|
| BinaryComparable |
Interface supported by
WritableComparable
types supporting ordering/permutation by a representative set of bytes. |
| BloomMapFile |
This class extends
MapFile and provides very much the same
functionality. |
| BloomMapFile.Reader | |
| BloomMapFile.Writer | |
| BooleanWritable |
A WritableComparable for booleans.
|
| BooleanWritable.Comparator |
A Comparator optimized for BooleanWritable.
|
| BytesWritable |
A byte sequence that is usable as a key or value.
|
| BytesWritable.Comparator |
A Comparator optimized for BytesWritable.
|
| ByteWritable |
A WritableComparable for a single byte.
|
| ByteWritable.Comparator |
A Comparator optimized for ByteWritable.
|
| CompressedWritable |
A base-class for Writables which store themselves compressed and lazily
inflate on field access.
|
| DataInputByteBuffer | |
| DataOutputByteBuffer | |
| DataOutputOutputStream |
OutputStream implementation that wraps a DataOutput.
|
| DefaultStringifier<T> |
DefaultStringifier is the default implementation of the
Stringifier
interface which stringifies the objects using base64 encoding of the
serialized version of the objects. |
| DoubleWritable |
Writable for Double values.
|
| DoubleWritable.Comparator |
A Comparator optimized for DoubleWritable.
|
| ElasticByteBufferPool |
This is a simple ByteBufferPool which just creates ByteBuffers as needed.
|
| EnumSetWritable<E extends Enum<E>> |
A Writable wrapper for EnumSet.
|
| FloatWritable |
A WritableComparable for floats.
|
| FloatWritable.Comparator |
A Comparator optimized for FloatWritable.
|
| GenericWritable |
A wrapper for Writable instances.
|
| IntWritable |
A WritableComparable for ints.
|
| IntWritable.Comparator |
A Comparator optimized for IntWritable.
|
| IOUtils |
An utility class for I/O related functionality.
|
| IOUtils.NullOutputStream |
The /dev/null of OutputStreams.
|
| LongWritable |
A WritableComparable for longs.
|
| LongWritable.Comparator |
A Comparator optimized for LongWritable.
|
| LongWritable.DecreasingComparator |
A decreasing Comparator optimized for LongWritable.
|
| MapFile |
A file-based map from keys to values.
|
| MapFile.Merger |
Class to merge multiple MapFiles of same Key and Value types to one MapFile
|
| MapFile.Reader |
Provide access to an existing map.
|
| MapFile.Writer |
Writes a new map.
|
| MapWritable |
A Writable Map.
|
| MD5Hash |
A Writable for MD5 hash values.
|
| MD5Hash.Comparator |
A WritableComparator optimized for MD5Hash keys.
|
| MultipleIOException.Builder |
Build an
IOException using MultipleIOException
if there are more than one. |
| NullWritable |
Singleton Writable with no data.
|
| NullWritable.Comparator |
A Comparator "optimized" for NullWritable.
|
| ObjectWritable |
A polymorphic Writable that writes an instance with it's class name.
|
| SecureIOUtils |
This class provides secure APIs for opening and creating files on the local
disk.
|
| SequenceFile |
SequenceFile s are flat files consisting of binary key/value
pairs. |
| SequenceFile.Metadata |
The class encapsulating with the metadata of a file.
|
| SequenceFile.Reader |
Reads key/value pairs from a sequence-format file.
|
| SequenceFile.Sorter |
Sorts key/value pairs in a sequence-format file.
|
| SequenceFile.Writer |
Write key/value pairs to a sequence-format file.
|
| SetFile |
A file-based set of keys.
|
| SetFile.Reader |
Provide access to an existing set file.
|
| SetFile.Writer |
Write a new set file.
|
| ShortWritable |
A WritableComparable for shorts.
|
| ShortWritable.Comparator |
A Comparator optimized for ShortWritable.
|
| SortedMapWritable |
A Writable SortedMap.
|
| Text |
This class stores text using standard UTF8 encoding.
|
| Text.Comparator |
A WritableComparator optimized for Text keys.
|
| TwoDArrayWritable |
A Writable for 2D arrays containing a matrix of instances of a class.
|
| UTF8.Comparator |
A WritableComparator optimized for UTF8 keys.
|
| VersionedWritable |
A base class for Writables that provides version checking.
|
| VIntWritable |
A WritableComparable for integer values stored in variable-length format.
|
| VLongWritable |
A WritableComparable for longs in a variable-length format.
|
| WritableComparator |
A Comparator for
WritableComparable s. |
| WritableFactories |
Factories for non-public writables.
|
| WritableUtils |
| Enum | Description |
|---|---|
| SequenceFile.CompressionType |
The compression type used to compress key/value pairs in the
SequenceFile . |
| Exception | Description |
|---|---|
| MultipleIOException |
Encapsulate a list of
IOException into an IOException |
| SecureIOUtils.AlreadyExistsException |
Signals that an attempt to create a file at a given pathname has failed
because another file already existed at that path.
|
| VersionMismatchException |
Thrown by
VersionedWritable.readFields(DataInput) when the
version of an object being read does not match the current implementation
version as returned by VersionedWritable.getVersion() . |
Copyright © 2018 Apache Software Foundation. All Rights Reserved.


The source zip will unpack into a directory named after its version, so multiple versions can easily be installed side by side in the same directory.
Note: The Core binary distribution from 3.0 onwards comes without the dependencies bundled. Users can either use the dependency management of Maven/Ivy/Gradle or use the Ant script provided in lib/ to download them from the POM. Read DEPENDENCIES.txt file for instructions.
| Stable | Preview | Legacy | |
|---|---|---|---|
| Core | bin | src | bin | src | bin | src |
| Web | bin | src | bin | src | bin | src |
The JBehave Eclipse plugin can be installed from any Eclipse distribution (Indigo or above): Help > Install New Software..., from the repository site http://jbehave.org/reference/eclipse/updates/.


This project is to create, modify and improve the bag of little bootstrap R packages. The R package is called the blblm and it is designed primarily for use by individuals who are interested in data analysis to help them perform a weighted bootstrap linear regression. Additionally, this package provides a list of other functions to estimates based on the linear regression. This package is useful for data which may not meet the assumption of parametric linear regression such as small sample sizes, asymmetric statistical distribution. Since some students may only want to have preliminary understanding of the data, this r package may help them to achieve their result.
**The restriction of the function does not omit na datas, to further usage of the package, please use na.omit(data) before using the function.
Bootstrap Linear Regression(blblm)
Based on the user’s interest in data, the function performs bootstrap linear regression by splitting data into subsamples and sample n from b with replacement which is different from ordinary bootstrap.
Coefficient of the desired explanatory/independent variable
#arr_delay time against Sepal
#m = 3 subsamples
#B = 100 bootstraps
model <- blblm(mpg ~ wt * hp, data = df, m = 3, B = 1000)
coef(model)
#> (Intercept) wt hp wt:hp
#> 53.31555111 -10.26989006 -0.13539179 0.03766053
-Formula of the regression model
Estimates of each bootstrap coefficient result
#first and second output of the estimates from bootstrap
model$estimates$`1`[[1]]
#> $coef
#> (Intercept) wt hp wt:hp
#> 46.70381840 -7.61398059 -0.12771960 0.03059246
#>
#> $sigma
#> [1] 1.406263
model$estimates$`1`[[2]]
#> $coef
#> (Intercept) wt hp wt:hp
#> 48.21478940 -8.42585866 -0.12879388 0.03269145
#>
#> $sigma
#> [1] 1.150173
Bootstrap Linear Regression with Parallelization
It performs the same result as the Bootstrap Linear Regression(blblm), and it adds a feature of parallelization to speed up for larger dataset.
cl <- makeCluster(2)
#cl = cluster user uses
model2 <- blblm_par(mpg ~ wt * hp, data = mtcars, m = 3, B = 100, cl)
stopCluster(cl)
Formula of the regression model
Coefficient of the desired explanatory/independent variable
Estimates of each bootstrap coefficient result
#first output of the estimates from bootstrap
model2$estimates$`1`[[1]]
#> $coef
#> (Intercept) wt hp wt:hp
#> 68.31006889 -13.51969161 -0.21433303 0.05559039
#>
#> $sigma
#> [1] 1.140657
model2$estimates$`1`[[2]]
#> $coef
#> (Intercept) wt hp wt:hp
#> 49.25239637 -7.62394874 -0.11048023 0.02412177
#>
#> $sigma
#> [1] 2.19165
Confidence Interval(confint)
Confidence Interval for explanatory variables in a user’s desired confidence level.
confint(model, level = 0.95)
#> 2.5% 97.5%
#> wt -14.09697192 -7.30560264
#> hp -0.26057122 -0.06813659
#> wt:hp 0.01961522 0.07344827
Predict New Data
It allows user to predict new data based on the linear regression model
pred <- predict(model, data.frame(wt = c(rnorm(100)), hp = c(rnorm(100))))
head(pred)
#> 1 2 3 4 5 6
#> 62.98724 67.31572 47.48078 59.60136 47.04635 50.30622
#user can choose to include condifence level
pred2 <- predict(model, data.frame(wt = c(rnorm(100)), hp = c(rnorm(100))), confidence = TRUE)
head(pred2)
#> fit lwr upr
#> 1 47.12206 39.90619 57.27615
#> 2 66.46358 53.93733 83.76681
#> 3 56.89697 47.04055 70.69180
#> 4 42.73171 36.65362 51.13838
#> 5 57.27512 47.31717 71.22360
#> 6 66.64879 54.09337 83.91908
Sigma with confidence level Compute the confidence interval for sigma
The use of C++ library RcppArmadillo allows us to compute various matrix multiplication and decomposition to improve the speed of the function. This package include a blblm or blblm_par function which is in the use of fastlm function. In the use of linear algebra the function was able to compute coef, weight residual and sigma by matrix transformation and multiplication. When we calculation the coefficient and sigma, we accounted for weight generate from a multinomial distribution.
Rcpp fastlm function computes of the following estimates:
coefficient, residuals, rank, degree of freedom, sigma
//Rcpp function for weight linear regression
#include <RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo)]]
using namespace Rcpp;
// [[Rcpp::export]]
List fastlm(const arma::mat& X, const arma::colvec& y, const arma::vec& wi) {
int n = X.n_rows, k = X.n_cols, r = rank(X);
arma::mat weight = diagmat(wi); //get the weight vector
arma::colvec coef = arma::solve(((trans(X))*weight*X) , ((trans(X)*weight)*y));
// fit model y ~ X
arma::colvec res = y - X*coef; // residuals
double weight_sum = accu(wi);
double num = arma::as_scalar(( accu( weight * (pow(res,2.0)) )));
double denom = weight_sum - r;
double s = sqrt(num / denom);
return List::create(Named("coefficients") = coef,
Named("weight sum") = weight_sum,
Named("sigma") = s,
Named("df.residual") = n - k,
Named("rank") = r,
Named("response") = y,
Named("Res") = res,
Named("weight") = wi);
}
Compare the time of fastlm with weighted linear regression(lm.wif) and it is two times faster than the speed of weighted lm.
#transform the response and explanatory variable to fit the function
x <- model.matrix(mpg ~ wt * hp , mtcars)
y <- model.response(model.frame(mpg ~ wt * hp, mtcars))
w <- rmultinom(1, 10, rep(1, nrow(mtcars)))
#comapre three lm functions
bench::mark(
fastlm = {fastlm(x,y,w)},
weighted_lm = {lm.wfit(x,y,w)},
check = FALSE, relative = TRUE
)
#> # A tibble: 2 x 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 fastlm 1 1 2.00 1 1
#> 2 weighted_lm 2.27 2.06 1 28.3 2.51
The use of library(parallel) allows us to create the blblm_par function to include parallelizatoin for user to choose to work with cluster to speed up the process.
The use of library(parallel) allow this function to use parLapply in replacement of map to perform parallization.
#parallel function
blblm_par <- function(formula, data, m, B, cl) {
data_list <- blblm:::split_data(data, m)
n <- nrow(data)
estimates <- parLapply(cl, data_list, function(data, formula,n, B){
blblm::lm_each_subsample(
formula = formula, data = data , n = n, B = B)
}, formula = formula, n = n , B = B)
res <- list(estimates = estimates, formula = formula)
class(res) <- "blblm"
res
}
The following demostrated the speed of using 2 CPU is almost two times faster than the orignial blblm. It may benefit users who want to process large datasets. It is typically practical for user who needs to process larger data set and use cluster to perform.
cl <- makeCluster(2)
bench::mark(
blblm_par(mpg ~ wt * hp, data = mtcars, m = 2, B = 1000, cl),
blblm(mpg ~ wt * hp, data = mtcars, m = 2, B = 1000),
check = FALSE, relative = TRUE
)
#> # A tibble: 2 x 6
#> expression min median `itr/sec` mem_alloc
#> <bch:expr> <dbl> <dbl> <dbl> <dbl>
#> 1 blblm_par(mpg ~ wt * hp, data = mtcars, m = 2, B = 1000, cl) 1 1 1.89 1
#> 2 blblm(mpg ~ wt * hp, data = mtcars, m = 2, B = 1000) 1.89 1.89 1 190.
#> # … with 1 more variable: `gc/sec` <dbl>
stopCluster(cl)
Cited: Armadillo Library http://arma.sourceforge.net/


| Interface | Description |
|---|---|
| CraftARContentDownloadProgressHandler |
Interface used to receive feedback of the downloading progress of a
CraftARTrackingContent3DModel . |
| CraftARGenericSDK.OnFinderTimeoutListener |
Interface to receive the tracking events
|
| CraftAROnDeviceCollectionManager.AddCollectionListener |
Listener for the calls to
addCollection() and addCollectionWithToken() |
| CraftAROnDeviceCollectionManager.DeleteCollectionListener |
Listener for the calls to
deleteCollection() |
| CraftAROnDeviceCollectionManager.SyncCollectionListener |
Listener for the calls to
syncCollection() |
| CraftARSDK.TakeARSceneCallback |
Interface for receiving AR scene capture images
|
| CraftARSearchResponseHandler |
Interface to receive the search responses from an
ImageRecognition class. |
| CraftARTouchEventInterface.OnContentClickListener |
Interface that lets you define the behavior for click events on the Augmented Reality contents.
|
| CraftARTouchEventInterface.OnTouchEventListener |
Interface that lets you define the behavior for touch events on the Augmented Reality contents.
|
| CraftARTracking.TrackingEventsHandler |
Interface to receive the tracking events
|
| ImageRecognition.SetCollectionListener |
Listener for the calls to
setCollection |
| ImageRecognition.SetOnDeviceCollectionListener | |
| SearchController |
Interface implemented by the ImageRecognition classes to manage
the Single shot and Finder Mode searches.
|
| Class | Description |
|---|---|
| CLog |
Class for internal managing of the logs produced by the CraftAR SDK
|
| CloudSearchController |
SearchController used for cloud-image recognition. |
| CraftARActivity |
Activities using the CraftAR SDK must extend this class instead of extending from Activity.
|
| CraftARBoundingBox |
Class that wraps the 4 coordinates of a bounding box
|
| CraftARCamera |
Class that allows basic control of the device's camera
|
| CraftARCameraView |
View where the camera frames are shown.
|
| CraftARCloudRecognition | |
| CraftARCollection |
Class that wraps a collection JSON object as returned by the CraftAR Recognition API v2
|
| CraftARContent |
Abstract class for a content that can be drawn on top of a reference image
for a
CraftARItemAR . |
| CraftARContent3dmodel |
A 3d model content for a
CraftARItemAR |
| CraftARContentBase | |
| CraftARContentFactory |
Factory to create CraftAR contents from the scene description of an AR item.
|
| CraftARContentFactoryBase |
Factory to create CraftAR contents from the scene description of an AR item.
|
| CraftARContentImage |
An Image content for a
CraftARItemAR |
| CraftARContentImageButton |
An ImageButton content for a
CraftARItemAR |
| CraftARContentVideo |
A Video content for a
CraftARItemAR |
| CraftARError |
The
CraftARError class encapsulates all kinds of errors that can be
produced by the SDK. |
| CraftARFullScreenVideoActivity |
Sample Activity showing a video in fullScreen.
|
| CraftARGenericSDK | |
| CraftARImage |
A
CraftARImage represents an item's image. |
| CraftARItem |
An Item represents an object in a collection in the CraftAR
database.
|
| CraftARItemAR |
CraftARItem that handles an Augmented Reality experience.
|
| CraftARItemARFactory |
The CraftARItemARFactory creates the items when a recognition request matched some image.
|
| CraftARItemFactory |
The CraftARItemFactory creates the items when a recognition request matched some image.
|
| CraftARNetworkError | |
| CraftAROnDeviceCollection |
A CraftAROnDeviceCollection represents the set of Items from a given
collection in the CraftAR database.
|
| CraftAROnDeviceCollectionManager |
The collection manager allows to add collections of images to the
device.
|
| CraftARQueryImage |
Image produced by the CraftARSDK that can be used for image recognition queries.
|
| CraftARResult |
A CraftARSearchResult holds the information about an item found in a
visual search query: the item, the image matched, the score and the
bounding box in the query image for the matched image.
|
| CraftARSDK |
The
CraftARSDK class for image recognition is the main controller for managing the camera capture
and the visual search operations (Single shot and Finder Mode search) |
| CraftARTouchEventInterface | |
| CraftARTracking |
Module that manages the AR experience allowing to add AR items and contents and
rendering the contents in the camera preview.
|
| CRSConnect |
CRSConnect allows you to send requests to the CraftAR Recognition Server.
|
| ImageRecognition |
Base class for Image Recognition implementations
|
| MySSLSocketFactory |
| Enum | Description |
|---|---|
| CraftARError.ERROR_CODES |
Error describing the problem
|
| Exception | Description |
|---|---|
| CraftARSDKException |
Manages internal exceptions occurred within the CraftAR SDK
|


 PETITIONER (BY SRI SABARISH GANDHI, ADV., FOR SRI DEVARAJ .N, ADV.,) AND 1. THE ENVIRONMENTAL OFFICER KARNATAKA STATE POLLUTION CONTROL BOARD (KSPCB) REGIONAL OFFICE- BANGALORE CITY SOUTH ZONE NISARGA BHAVAN 7TH 'D' MAIN ROAD OPP. PUSHPANJALI THEATRE SHIVANAHALLI THIMMAIAH MAIN ROAD BANGALORE-560010 2 2. THE ASSISTANT EXECUTIVE ENGINEER- ELECTRICALS BANGALORE ELECTRICITY SUPPLY COMPANY (BESCOM) S-5, SUB-DIVISION BESCOM LTD., ISRO LAYOUT BANGALORE-560078 3. THE CHAIRMAN BANGALORE WATER SUPPLY AND SEWERAGE BOARD (BWSSB) K G ROAD, CAUVERY BHAVAN BANGALORE-560009 4. JOINT COMMISSIONER BRUHAT BANGALORE MAHANAGARA PALIKE (BBMP) BOMANAHALLI ZONE BEGUR MAIN ROAD BANGALORE-560002 ... RESPONDENTS (BY SMT PUSHPAKANTHA, ADV., FOR R-1; SRI P PRASANNA KUMAR, ADV., FOR R-2; SRI PRASHANT T. PANDIT, ADV., FOR R-3) THIS WRIT PETITION IS FILED UNDER ARTICLES 226 AND 227 OF THE CONSTITUTION OF INDIA PRAYING TO SET ASIDE AND QUASH THE CLOSURE ORDER DATED 03.07.2013 VIDE ANNEXURE-D PASSED BY THE FIRST RESPONDENT. THIS WRIT PETITION COMING ON FOR ORDERS THIS DAY, CHIEF JUSTICE MADE THE FOLLOWING: 3 ORDER
D.H.WAGHELA, CJ (Oral)
1. The petitioner is M/s.Devi Enterprises, represented by its proprietrix Smt.Sukadi Devi ; and the prayer in the petition is to quash the closure order dated 03.07.2013, which is annexed to the petition as Annexure-D. That impugned order appears to have been culmination of a complaint received on 05.02.2013. M/s.Ambe Polymers is described in the impugned order by adding to it : (New Ownership operating in the name of M/s.Devi Enterprises) which was engaged in manufacture of injection moulded components, without obtaining the consent of the Karnataka State Pollution Control Board (KSPCB). According to the impugned order, after receipt of the complaint by the Board against the industry regarding noise pollution, a copy thereof was forwarded to the office of the Environmental Officer, KSPCB at Nisarga Bhavan, Bengaluru and inspection of the unit was carried out on 14.02.2013. At the time of inspection, the unit was not working since it had given a holiday to the workers. Thereafter, a show-cause notice was issued on 23.02.2013, which was neither replied nor complied. Then, another complaint dated 12.03.2013 was made and received by the KSPCB on 15.03.2013. The officer of KSPCB again inspected the industry on 25.03.2013 and reported the observations that the industry was 4 operating and engaged in injection moulded components, without valid consent of the Board and at the time of inspection, two extruders were working out of six extruder machines. When the industry was not in operation, the noise level inside the establishment was 49 dB and outside the factory, it was 50 dB. Whereas, while the industry was operating with only two extruders in operation, the noise level outside the factory was upto 60 dB and the inspecting officer has drawn a mahazar on the observations made. In view of non- compliance and the noise level crossing the standards fixed under the Noise Pollution (Regulation and Control) Rules, 2000, a notice proposing to issue directions was issued on 04.04.2013 and the industry was called for personal hearing on 16.04.2013, but no one for the industry attended the personal hearing. These facts lead the Environmental Officer of KSPCB to believe that the industry was not interested in complying with the directions of the Board, even though sufficient time was granted and the industry was allowed to continue to operate, whereby Sections 25/26 of the Water (Prevention and Control of Pollution) Act, 1974 ('Water Act' for short) were also violated. It was on such basis that the KSPCB issued directions for closure of the industry under Section 33A of the Water Act read with Rule 34 of the Procedure Rules of KSPCB. Thus, by the impugned order, the petitioner, operating under the new name of M/s.Devi 5 Enterprises at No.96/A, Basappa Reddy Compound, Y.V.Annaiah Road, Yelachenahalli, J.P.Nagar Post, Bengaluru, was directed to close the industrial operation or process forthwith and until further orders. Simultaneously, the Managing Director, Bengaluru Electricity Supply Company (BESCOM) was directed to issue necessary directions to the concerned Executive Engineer and Assistant Executive Engineer to stop/cut-off power supply to the said industry "forthwith" and until further orders. The Managing Director of Bengaluru Water Supply and Sewerage Board (BWSSB) was also directed to issue necessary directions to the concerned Engineer not to give water supply to the said unit forthwith and until further orders. The Commissioner, Bruhat Bengaluru Mahanagara Palike (BBMP) was directed to withdraw the licence issued to the said unit forthwith and until further orders.
2. Before the petition could be heard on merits, after issuance of notice on 05.11.2013, it was sought to be withdrawn, without inviting any order by learned counsel Mr.Sabarish Gandhi. None of the respondents have cared, in the meantime, to file any affidavit-in-reply or response to the petition. Upon a query being made to learned counsel appearing on either side about implementation of the impugned order, some shocking and surprising revelations are made 6 by learned counsel for the respondents on instruction of the officers, who have remained personally present in the Court. It is revealed by Ms.Rekha .R, Environmental Officer of KSPCB that the industry of the petitioner continued to operate for more than at least one month after the impugned order, on account of the fact that the electricity supply was not disconnected in terms of the order. It was revealed by learned counsel for BESCOM, on instruction of Mr.R.Kumar, Assistant Executive Engineer, BESCOM, that the impugned order dated 03.07.2013 was received by BESCOM on 05.07.2013 and the Managing Director had in fact instructed, on 17.07.2013, the Chief Engineer to implement the order. Thereafter, the Chief Engineer wrote a communication to the Superintendent Engineer on 24.07.2013. On 27.07.2013, the Superintendent Engineer wrote to the Executive Engineer and the Executive Engineer in turn wrote to the Assistant Executive Engineer on 02.08.2013 and such letter was sent by post. Therefore, that letter dated 02.08.2013 was received by the Assistant Electrical Engineer on 07.08.2013, which was not immediately implemented and no reason or explanation is given therefor. Ultimately, according to the Assistant Electrical Engineer, one Assistant Engineer implemented the order on 22.08.2013. 7
3. Learned counsel appearing for BWSSB was not informed whether and when the Managing Director had issued any directions not to give water supply to the petitioner and whether the water supply was ever disconnected. The Commissioner of BBMP appears to have issued a show-cause notice on 28.08.2013 and thereafter what happened is not coming on record, as far as BBMP is concerned.
4. It would be clear from the above record that the noise pollution about which complaint was made in February, 2013 and even the order to close down the industry was made on 03.07.2013, it has not been given effect to either by the petitioner or the other agencies despite usage of the word "forthwith" in the directions issued to such authorities. The KSPCB, which is the body established with the avowed objective of prevention and control of water and air pollution and empowered with the necessary powers and saddled with the duties to control water and air pollution, also failed in its duty of even enforcing its own orders. Under the provisions of Section 37 of the Air (Prevention and Control of Pollution) Act, 1981 ('Air Act' for short), whoever fails to comply with the provisions of Section 21 or Section 22 or directions issued under Section 31A, shall, in respect of each such failure, be punishable with imprisonment for a term which shall not be less than one year and six months, but which may extend 8 to six years, with fine. Cognizance of such offences could be taken under Section 43 of the Air Act, on a complaint made by the Board or any officer authorized by it in that behalf. Similar provisions are made in Sections 41, 44 and 49 of the Water Act. It was fairly conceded at the bar that the KSPCB could have filed appropriate complaint before the Court, but for reasons which are not disclosed, no steps were taken to curb the delay in implementation of its own orders. Such cases of non-enforcement of the mandatory orders are not rare and therefore, it appears that the purpose of the stringent provisions contained in Section 5 of the Environment (Protection) Act, 1986 and the Water and Air Acts are defeated by the very agencies, which are supposed to implement and enforce such orders. It is therefore necessary that the acts of the petitioner and the officers of the respondents, which prima facie disclose not only dereliction of duty, but serious criminal offences, are reported in the form of an appropriate complaint before the Court of competent jurisdiction for the purpose of prosecution and trial.
5. The right of clean environment, peaceful living, unpolluted air and humane conditions of living are often read as part of the fundamental right to life enshrined in the Constitution under Article
21. The air and noise pollution have not only attained sustained high 9 level, but the plight of residents in the residential areas, patients in the hospitals, children studying for their examinations and all the people compulsorily exposed to high levels of noise and air pollution is simply ignored even by the statutory agencies, by not preventing and controlling such pollution. On the other hand, the other agencies, through which the directions of the Board have to be implemented, have openly displayed callous attitude in discharge of their duties and even attempted to press into service their own rules of procedure and requirements of issuing show-cause notices, while the activity prohibited by the mandatory orders of the Board merrily continues in flagrant violation of law, as it is found to have actually happened in the facts of the present case.
6. Under the circumstances, the petition is dismissed with cost, quantified at Rs.10,000/-, which the petitioner shall pay in equal proportion to the respondents. Besides that, directions necessary in the interest of justice and for ensuring the rule of law are issued to KSPCB to file necessary complaint against all the officers concerned of respondent Nos.2, 3 and 4, as well as the petitioner for not implementing forthwith the impugned order dated 03.07.2013. The Court is assured by learned counsel for KSPCB that, after following the procedure required to be followed within the KSPCB for filing of 10 the necessary complaint/s, the complaint shall be filed as early as may be and preferably within a period of fifteen days, in respect of violation of the impugned order dated 03.07.2013. In view of the internal procedure brought in for filing of an appropriate complaint with proper authorization of the officer, who should be the complainant, and the decision being taken at the higher level within the KSPCB, it is further directed that the decision taken by the Board on the basis of this order and the copy of the complaint, if any, filed by the KSPCB, shall be placed before this Court on 07.04.2015 and the present matter shall be listed on that day for further orders, if any are required.
Sd/-
CHIEF JUSTICE Sd/-
JUDGE bkv


Search for Archival records using Names, Subjects, or other relevant Words, in any order.
Or search for the records of a specific named Person or Institution, or records on a specific Subject, using the lists below:
ALL COLLECTIONS
BOOKS AND PERIODICALS
PERIODICALS
AUCTION CATALOGUES


I'm Ravishankar Krishnaswamy, a graduate student at the
Computer Science Department,
Carnegie Mellon University. My advisor is
Anupam Gupta, and my interests are in Theoretical Computer Science.
Earlier, I obtained my B.Tech from the
Department of Computer Science and Engineering,
IIT Madras, where my advisor was
Prof. C. Pandu Rangan.


Internationalization
Nowadays, a common scenario in front-end applications is to have the ability to translate labels and locate numbers, dates, currency and so on when the user clicks over a language selector or similar. devon4ng and specifically Angular has a default mechanism in order to fill the gap of such features, and besides there are some wide used libraries that make even easier to translate applications.
More info at Angular i18n official documentation
devon4ng i18n approach
The official approach could be a bit complicated, therefore the recommended one is to use the recommended library NGX Translate from http://www.ngx-translate.com/.
Install NGX Translate
In order to include this library in your devon4ng Angular >= 4.3 project you will need to execute in a terminal:
$ npm install @ngx-translate/core @ngx-translate/http-loader --save
# or if you use yarn
$ yarn add @ngx-translate/core @ngx-translate/http-loader
-
@ngx-translate/core is the core library to provide i18n capabilities.
-
@ngx-translate/http-loader is a loader for ngx-translate that loads translations using http.
Configure NGX Translate
Depending on the volume of the devon4ng application we will include the NGX Translate library in the app.module.ts
or in the core.module.ts
transversal to the application.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
Next, an exported function for factories has to be created:
// AoT requires an exported function for factories
export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http);
}
@NgModule({
imports: [
BrowserModule,
HttpClientModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient]
}
})
],
bootstrap: [AppComponent]
})
export class AppModule { } // or CoreModule
The TranslateHttpLoader
also has two optional parameters:
-
prefix: string = "/assets/i18n/"
-
suffix: string = ".json"
By using those default parameters, it will load the translations files for the lang "en" from: /assets/i18n/en.json
. In general, any translation file will loaded from the /assets/i18n/
folder.
Those parameters can be changed in the HttpLoaderFactory
method just defined. For example if you want to load the "en" translations from /public/lang-files/en-lang.json
you would use:
export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http, "/public/lang-files/", "-lang.json");
}
For now this loader only support the json format.
If you’re still on Angular < 4.3, please use Http from @angular/http with<EMAIL_ADDRESS>.
|
Usage
In order to translate any label in any HTML template you will need to use the translate
pipe available:
{{ 'HELLO' | translate }}
An optional parameter from the component TypeScript class could be included as follows:
{{ 'HELLO' | translate:param }}
So, param
has to be defined in the class. The default language used is defined as follows:
// imports
@Component({
selector: 'app',
template: `

{{ 'HELLO' | translate }}
 // Without param

{{ 'HELLO' | translate:param }}
 // With param
`
})
export class AppComponent {
// This param will be used in the translation
param = { value: 'world' };
constructor(translate: TranslateService) {
// this language will be used as a fallback when a translation isn't found in the current language
translate.setDefaultLang('en');
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use('en');
}
}
In order to change the language used you will need to create a button or selector that calls the this.translate.use(language: string)
method from TranslateService
. For example:
toggleLanguage(option) {
this.translate.use(option);
}
The translations will be included in the en.json
, es.json
, de.json
, etc. files inside the /assets/i18n
folder. For example en.json
would be (using the previous param):
{
"HELLO": "hello"
}
Or with an optional param:
{
"HELLO": "hello {{value}}"
}
The TranslateParser
understands nested JSON objects. This means that you can have a translation that looks like this:
{
"HOME": {
"HELLO": "hello {{value}}"
}
}
In order to access access the value, use the dot notation, in this case HOME.HELLO
.
Using the service, pipe or directive
Service
If you need to access translations in any component or service you can do it injecting the Translateservice
into them:
translate.get('HELLO', {value: 'world'}).subscribe((res: string) => {
console.log(res);
//=> 'hello world'
});
Pipe
The use of pipes can be possible too:
template:

{{ 'HELLO' | translate:param }}

component:
param = {value: 'world'};
Directives
Finally, it can also be used with directives:

or, using the content of your element as a key

HELLO

| You can find a complete example at https://github.com/devonfw/devon4ng-application-template. |
Please, visit https://github.com/ngx-translate/core for more info.


--- layout: page title: Projects subtitle: Side projects are fun. desc: Side projects are fun. permalink: /projects/ ---
Listed below are some of the things I've worked on in my free time.
An NBA statistics chat bot, intended primarily as an action for Google Assistant, with a Node.js webhook.
Flask web app that scrapes Cornell building energy data and displays the data in intuitive ways.


| raw_string {xfun} | R Documentation |
The function raw_string()
assigns the class xfun_raw_string
to
the character vector, and the corresponding printing function
print.xfun_raw_string()
uses cat(x, sep = '\n')
to write the
character vector to the console, which will suppress the leading indices
(such as [1]
) and double quotes, and it may be easier to read the
characters in the raw form (especially when there are escape sequences).
raw_string(x) ## S3 method for class 'xfun_raw_string' print(x, ...)
x |
For |
... |
Other arguments (currently ignored). |
library(xfun) raw_string(head(LETTERS)) raw_string(c("a \"b\"", "hello\tworld!"))