Hi,
I'm very new to this (day 2). I have my emonTxV3 sending data to my Raspberry Pi and then uploading to emonCms. But I have found some calibration issues.
My voltage is showing as an average of 256v, but when measured by an accurate meter it shows 241v. Obviously I need to calibrate, but all the instructions on the site seem to be for the previous emonTxV2, and how to update the standard sketch for that module.
The new sketch for the V3 is different and I can't see where I would plug in any calibration values. I'm sure people have done this before, so could someone point me in the right direction.
I have to say what I've seen so far of this project is amazing and I can't wait to get everything working smoothly.
Thanks for any help,
Allen
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
? ? ? If I'm looking at the same emonTxV3_RFM12B_DiscreteSampling.ino as you are, all the settings are in the sketch starting at line 47.
From your numbers, I make Vcal = 268.27 (line 52).
All that's happened there is that instead of the constant being hard-coded into the call to emonLib, it's hard-coded as a constant higher up the sketch so that all the settings constants are grouped together.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I assume you calculated that from the formula on the calibration page:
New calibration = (correct reading / emonTx reading) * existing calibration
On that page it says you can either modify the Vcal value OR the Vrms value. Which is the better, or should I really adjust both?
I presume I should also calibrate the Ical and phase shift? How is the Ical calculated, as the calibration page seems to imply the default should be 111.1, but it is 85.75996 in the sketch.
Thanks,
Allen
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I don't understand what you mean by "you can either modify the Vcal value OR the Vrms value. Which is the better, or should I really adjust both?". The Vrms value is used when you are not using the voltage sensor but relying on the declared value or the value you measure once. This is what the comment on line 48 means. So, you adjust the one you are using.
Yes, you do need to calibrate the whole thing, because power is the product of voltage and (the real component of) current. The best way to calibrate the voltage and current constants is against a known accurate meter. The best way to calibrate phase shift is obtain the highest possible power factor when the load is purely resistive (e.g. a fan-less electric heater or water heater). After that, many users have fine-trimmed the calibration over time so that the accumulated energy value tallies with their electricity company's meter, claiming better than 1% agreement.
The calibration page predates the emonTx V3. Knowing the component values, it's possible to work through the maths to calculate the coefficients, and this should be reasonably close to the value you determine on test. A big discrepancy indicates an error or a faulty component somewhere. There's a Building Blocks page that describes the theoretical derivation of the calibration values.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I have updated the Vcal value and now the voltage reading is agreeing with my meter.
What is confusing me at the moment (not too difficult!), is that the Ical value in the sketch is 85.75996 but the online pages about calibration give a default value of 111.1. Of course I might not be comparing the correct values, but when I read the online documentation I sure it implied that 111.1 was the default current calibration.
Do you know why this is different?
I don't have a meter that I can use to measure the current, so I'm not sure I can calibrate anything else. Is there anything else I can do to improve accuracy?
By the way, thank you for your responses to what must seem like nonsense coming from a complete novice in this area (I'm learning fast!)
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Please could you provide some more info. Where online are you getting the 111.1 cal from? What value have you come up with which works well? Are you using an ac adapter from the shop? Is it UK / euro plug? We will do some testing this week and check the calibration
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Glyn: Ical, not Vcal is the problem!
Allen: Which current transformer are you using? Is it the blue YHDC SCT-013-000 from the shop? For that one, the theoretical value for Ical is 90.9 (111.1 relates to a 18 Ω burden resistor in the emonTx V2, yours in the V3 is 22 Ω.) So 85 isn't that far out. You can expect a variation of up to at least 5% due to component tolerances (1% on the burden resistor, 3% on the CT and I think 1% on the voltage regulator).
You'll need to use your electricity meter to calibrate! Take a look at your meter. If it's a rotating disc, it will say on the front what one revolution of the disc means (or what n revolutions mean). If it's a digital one, it will have a LED that flashes and it will tell you what 1 flash means (or you may need to look up the meter type on the web and read the manual).  Then correct Ical and try again!
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Glyn: I am using the ac adapter from the shop, but my voltage is now calibrated.
Robert: I am using the blue YHDC SCT-013-000 from the shop as the CT. I guess the value in the emonTxV3_RFM12B_DiscreteSampling sketch in git is just whatever value the developer left in there. But it might be nicer if it was the theoretical value of 90.9, unless there is some explanation as to why it is set to such a precise value that is different.
I have a digital electricity meter with an LED on it, so I will do some timings when I can get a steady load on the system (might need to wait until everyone is in bed!)
I had been wondering if using a pulse counter would have been better for getting the power, surely this would not have suffered from calibration issues?
I am also connecting up a solar system in the Type 2 configuration. Will I need to calibrate that separately using the pulses from the generation meter? If that is the case, how can I set different Ical values for each of the CTs? In the previous emonTxV2 sketch you are able to set voltage and current for each CT, but in this newer sketch there seems to be only one setting for all of them (apart from Ical4).
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Hi Allen, I've just been going through the same thing on my new v3. My Vcal (changed in the emoxTX V3 Settings section around line 52 in the sketch) is now at 269.66 (original 284.9667) which matches up better with my MM reading, but I've still got more calibration to do later today. I'll post my final values when I've done some more testing.
Darren
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I think you two need to share a thread! (For anyone who's missed it: http://openenergymonitor.org/emon/node/3300)
I've just written to Glyn suggesting that there should be 4 Ical's, since when you take the c.t. tolerance into account, to my mind at least the error is unacceptably large if there is a common calibration for the three main c.t's. If you want to do that, you repeat line 50 to give yourself an Ical1, Ical2 and Ical3, you (probably) get rid of line 170 (or repeat that as well, changing it appropriately (and bear in mind once you've inserted some lines above, it won't be 170 any longer!), and then the important bit: you change what was lines 213, 214 & 215 to use Ical1, Ical2 & Ical3 respectively.
I justify that because as I wrote above, the tolerance on the burden resistor is 1%, and the c.t. is 3%. Therefore together you can expect up to 4% from the nominal due to those alone, or possibly 8% difference between channels. You can also expect another 1% I think from the voltage reference but that's common to all 5 channels (including the voltage now). It is clearly necessary, once you have established the calibration for a channel, to keep the same c.t. paired with that channel forever.
However, you don't need to marry the c.t and channel with a particular cable or feed. You can calibrate all 4 inputs simultaneously on the same cable (if there's room so that you can space them an inch or two apart!).
Pulse counter or c.t. is a matter of preference, as much as anything. True, the pulse count is by definition accurate (even if it isn't!) but the data is much more granular and requires you not to miss a pulse. You cannot normally measure exported energy (if you have generation) with a pulse input as the meter won't give pulses when exporting.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
My own v3 definitely needs adjusting, the v2 voltage was v229 it is 241 with the v3.
Thanks for the thread, I shall watch !
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
So this is my current output , why is ct4 so different ?
emonTx V3 Discrete Sampling
OpenEnergyMonitor.org
CT 1-3 Calibration: 90.90
CT 4 Calibration: 16.66
RMS Voltage on AC-AC Adapter input is: ~124V
AC-AC adapter detected - Real Power measurements enabled
assuming powering from AC-AC adapter (jumper closed)
Vcal: 268.00
Phase Shift: 1.70
CT 1 detected
CT 2 detected
CT 3 detected
CT 4 detected
Detected 1 DS18B20..using this for temperature reading
RFM12B Initiated:
Node: 9 Freq: 868Mhz Network: 212
16379 14143 14719 2596 311.35
temperature: 8.30
1507 163 165 31 230.37
temperature: 8.30
1334 15 25 4 228.65
temperature: 8.30
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I've just updated the calibration constants for the continuous sampling example to values determined theoretically via component values:
voltage calibration: 276.9
(230V x 13) / (9V x 1.2) = 276.9. Where 13 is the voltage divider reduction factor and 1.2 accounts for 20% increase in voltage adapter output voltage as its not being loaded (open circuit)
and
23kW inputs (1-3) current calibration: 90.9 ( 2000 turn CT / 22 Ohm burden)
4.5kW input (4) current calibration: 16.6 ( 2000 turn CT / 120 Ohm burden)
The result agree's well with my reference meter here.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
dod: do you have anything plugged in to CT4? If you put the CT4 clip around the same cable as CT1 does it read the same?
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I've updated the emonTxV3_RFM12B_DiscreteSampling sketch on github to use theoretically calculated calibration values and added the ability to tune each CT as suggested by Robert Wall
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Hi, Yes I have all four CT's in use grid,pv1,pv2,EV, I will try the new code.
Thanks
Dave
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Update, after several calculations and fine tuning I've settled for 271.96 as my Vcal, which isn't far off Trystan's theoretical, taking into account component variation. It tracks the measured values to within .1 V. I'll get to current calibration next week.
Dod, I see you have a temperature sensor working, could you confirm your pin connections for that, I can't get it to recognise the sensor on my board?
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Mine didn't work first time, so I had to reverse pins 5/6
So I have black on pin 3 white on pin 5 and red on pin 6
dod
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Hi, I managed to get some current calibration figures using a 1Kw and 2Kw bar heater. Numbered my 3 CTs (4th is in the post) as swapping them around also gives a small fluctuation, < 1%. So from the theoretical 90.9 for CTs1-3 I now have CT1 89.42, CT2 88.96 and CT4 from 16.6 to 16.5. Not far off the theoretical but they give a much better tracking over higher power readings.
I've also been playing with the continuous sampling sketch. Very good code, thanks to Robin Emley. I assume the discrete sketch is just instantaneous sampling every 10 seconds and the continuous one is taking multiple samples per cycle and summing the power, right? I'll test saving all the samples over a cycle and print them out, which should show a nice sine curve.
I've plugged in the Vcal and Ical recalibration figures to those calculations and that is working well. I'm getting about 39 samples per cycle and 38uS of available delay from the workload check. Is that what others have seen as well? Is the 38uS the time it takes to do the calculation or the time available for other things after the calculation? I assume it's the latter. It looks like it's testing the delay in every sample of the cycle and prints out what it settled at at the end of the cycle.
I'm gonna have to squint at the code some more as I'd like to get Vrms and Irms out of the calculations, just for interest and comparison...
Cheers, Darren
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
The discreet sampling example samples over 10 full AC cycles, so 200ms per measurement on each CT. Within this measurement it samples rapidly at about 2500 samples per second. There is then an assumption that the power does not fluctuate significantly in the time it is asleep which is usually good enough for typical household monitoring.
The continuous power monitoring example by Robin is better as it samples continuously and so will not miss anything. The only disadvantage is that you cant put the emontx to sleep between samples and that it doesnt work well if you want to dedicate processor time to other operations like temperature monitoring as well. But if your only interested in power measurement and the emontx is always powered then the continuous sampling approach is the better way to go.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
So discreet does 10 cycles, which is 1/5th of a second, 200ms @ 2500 samples per second, so it does 500 samples every 1/5th of a second? And it does that every 10 seconds? So it actually only measures the power for 1/50th of the period?
Just confirming, I'm sure that is fine for rough figures. I know you can never get 100% accurate unless your actually in-line of the power usage or have infinite samples, which isn't practical ;-)
Have you compared both styles running at the same time on test loads to see how the results differ? I'd need 2 emonTX's for that.
Cheers
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I've also been playing with the continuous sampling sketch. Very good code, thanks to Robin Emley.
Thanks, I'm glad it's being of use to you. Can someone provide a link to this code, it seems to have disappeared from the Github repository. Or maybe I don't know where to look.
So it actually only measures the power for 1/50th of the period?
That's right, most of the early sketches work in this way. It allows three channels to be measured, albeit sparsely, using battery power only. This approach was not suitable for a PV Router application hence my Mk2 code which operates continuously.
The "continuous monitoring" code that I've supplied for emonTx_V3 is a simple extension of my Mk2i PV Router code. By using low-level commands for the ADC, and integer-based maths, a decent sampling rate can be obtained for several analogue channels. This sketch uses five such channels (one voltage and four current). As per its Mk2 ancestry, an energy accumulator for each of the channels is updated every mains cycle. This arrangement is not ideal for a straightforward measurement application.
The alternative arrangement that I posted soon after in a 6-channel version may be better (the code is in a zip-file at the end of the thread). For maximum speed, the 6-channel version has the ADC in free-running mode; the 5-channel one has the ADC in a timer-based mode which may provide better control of the sampling intervals.
The continuous power monitoring example by Robin is better as it samples continuously and so will not miss anything. The only disadvantage is that you cant put the emontx to sleep between samples and that it doesnt work well if you want to dedicate processor time to other operations like temperature monitoring as well.
Because this code is timer-based, the sampling rate can be reduced in order to create as much spare time as is needed. Although the ADC is running pretty much flat out, the main processor is only about 50% occupied. There should be plenty of time for other activities. Because all the data
isare processed in one go, the idle periods (ignoring ISRs) between consecutive blocks of calculations are quite lengthy, maybe 250uS every 520uS.Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I found it in:
OpenEnergyMonitor/emonTxFirmware/emonTxV3/RFM12B/Examples/emonTxV3_continuous
I shall read the other thread later with interest. I already had a quick skim and like the ASCII waveform diagram ;-)
Cheers
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Thanks for that link, I'd not thought to look in the RFM12B folder. The RF part was a last-minute addition to that code.
Yes, I was pleased when that 6-channel trace appeared. As it's the Festive Season, maybe it deserves a second viewing :)
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I finally got my solar PV system working today and got some readings coming from the emonTxV3. However, the inverter was should 242w, but my monitoring was showing 112w. That would give me
112/242 * 90.9 = 42.069
This seems very low. Has anyone else experienced something like this?
The CT clip is round a very narrow cable that comes from the inverter, could that affect the reading?
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
That does not sound right at all. Are you using an AC-AC adapter to power the emonTx V3? Also are you using the latest firmware on github? https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/emonTxV3_RFM12B_DiscreteSampling
When you start up the emonTx V3 if you have a USB to UART cable connected it will serial print on 9600 baud the calibration values currently in the code.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Ah, just seen your other post: http://openenergymonitor.org/emon/node/3330. I've just replyed
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
calibración de tensión: 276.9
(230V x 13) / (9V x 1,2) = 276,9. Donde 13 es el factor de reducción de divisor de tensión y 1.2 representa 20% de aumento en la tensión de salida del adaptador de tensión, ya que no está cargado (circuito abierto)
Saludos Amigos estoy intentando realizar un prototipo básico con un TC y un adaptador de AC-AC,, estoy tratando de calibrar de acuerdo a las condiciones en la que estoy trabajando (Vref=5V, tensión de la red 120V +-10%, y).
Si tengo una variación del 20% sin carga y la salida nominal es de 9V , el porcentaje sería 1.8 y no 1.2, o estoy interpretando mal... Otra duda que tengo es, que hacer con la constante de calibración, que operación debo realizar para obtener los valores, similares o en el mejor de los casos iguales a los de mi multímetro.
La verdad soy nuevo en esto, me parece que es una pregunta muy básica, pero si me pueden ayudar les quedo infinitamente agradecido, y si tienen un código para estudiarlo y entenderlo mucho mejor...
Gracias...!!
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Your AC-AC adapter gives you ~ 11 V out for 120 V in, therefore if you use the calibration constant that is correct for a 240 V supply, it will say your supply is twice the voltage that you have in reality. Therefore you must use a voltage calibration constant that is approximately 140 ( 276.9 -> 140). You measure the voltage and change the "140" so that your prototype reads the same as your meter.
"Si tengo una variación del 20% sin carga y la salida nominal es de 9V , el porcentaje sería 1.8 y no 1.2, o estoy interpretando mal..."
I am sorry, but you are misinterpreting it. The voltage for small transformers is given at the rated load - 9 V - and the voltage rises by ~20% on no-load ( 11 / 9 = 1.22). For a distribution transformer owned by the power company, it is the no-load voltage that is 'normal' and the transformer regulation is the drop in voltage at full load.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Gracias por contestar, estoy trabajando en esto y cada vez me surgen mas dudas, disculpas pero la verdad no me quedan claras algunas cosas, si me pueden ayudar con lo siguiente.
Tengo un Transformador de tensión en el cual el fabricante indica (110V AC / 12V AC) pero la tensión en mi país es de 120V AC ±10% , es decir en el peor de los casos sería 132V AC he realizado la medición y obtengo a la salida del adaptador 15Vrms a esto le debo añadir el 20% debido a que no existe carga, quedandome 18Vrms = 25.46Vpico esto lo e utilizado para calcular el valor de la resistencia del divisor de tensión, tomando en cuenta que estoy trabajando con un aruino Mega 2560R3 y utilizo la referencia de 5V, finalmente los valores de resistencia son 100K y 10K, teniendo como máximo 2.3 Vpico. A partir de esto tengo las siguientes preguntas concretas.
1) Revisé el siguiente link http://openenergymonitor.org/emon/buildingblocks/ct-and-ac-power-adaptor-installation-and-calibration-theory . Y la pregunta es ¿Por qué se utiliza un solo valor de tensión (230V) sin tomar en cuenta la variación que esta puede tener?.
Si aplico la fórmula "voltage constant = 230 × 11 / (9 × 1.20) = 234.26" en las condiciones que estoy trabajando tendría lo siguiente.
2) Voltage Constant = 110 x 11 / (12 x 1.2) = 84.03 Donde 110 es el voltage que indica el fabricante. ¿Esto es correcto con mis condiciones? o debo poner el valor de voltage real que tengo en la red (120V).
3) No comprendo la lógica de esta constante de calibración . ¿Por qué se utiliza esta fórmula?.
4) ¿Qué función tiene la siguiente línea de código de la librería "EmonLib" ?
double V_RATIO = VCAL *((SUPPLYVOLTAGE/1000.0) / 1023.0); Donde VCAL = Voltage constant
Vrms = V_RATIO * sqrt(sumV / numberOfSamples);
GRACIAS..!!
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Mil disculpas, yo pensé por un momento realizar otros cálculos muy diferentes a los que están aquí Lo que pensaba realizar es lo siguiente:
1) Realice unas medidas con mi multímetro el cual indica que tiene un error de 1%, y los resultados fueron:
VInt =108Vrms Vout= 12.3 Vrms
VInt=121.7Vrms Vout=13.87
VInt=130Vrms Vout=14.7 Vrms
VInt=132Vrms Vout=15 Vrms
2) Como la señal de entrada al ADC del arduino tiene una relación de VintArduino= (1 / 11) (VOutAdaptador). Tomando como ejemplo la medida VInt=130Vrms Vout=14.7 Vrms. Tendríamos
3) VintArduino= (1 / 11) (14.7)=1.34V que corresponde a la muestra 274 del ACD del microprocesador, Entonces lo que se busca es una constante de calibración que nos de el valor real (130Vrms), Se tendría la siguiente ecuación:
4) VoltageConstant = 274 / 130 = 2.1 es decir que mediante software se debe dividir cada muestra entre 2.1 para obtener el valor real (130V).
Esto tomando en cuenta que la relación del voltaje de salida del adaptador es lineal con respecto a la entrada.
Revisé el link anterior y la constante de calibración es muy diferente, y no logro Interpretar su procedimiento
"voltage constant = 230 × 11 / (9 × 1.20) = 234.26"
¿Que procedimiento realizan una vez calculada la constante de voltaje (234.26)?.
Se que no debe haber mucha dificultad para maestros como ustedes, pero yo estoy empezando a trabajar en esto y se me hace complicado.
Gracias nuevamente por su ayuda..!!
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
I also found it complicated when I started! It is difficult, but it is possible to work through the mathematics to obtain the voltage constant.
1) Revisé el siguiente link http://openenergymonitor.org/emon/buildingblocks/ct-and-ac-power-adaptor... . Y la pregunta es ¿Por qué se utiliza un solo valor de tensión (230V) sin tomar en cuenta la variación que esta puede tener?.
In the formula
"voltage constant = 230 × 11 / (9 × 1.20) = 234.26"
"230" is the stated supply voltage for the adapter, and "(9 × 1.20)" is the output voltage at that supply voltage. You can use any supply voltage provided you know the output voltage that goes with it.
"11" is the inverse of the ratio of the voltage divider in the input circuit.
Now the real question is: Is 100 kΩ and 10 kΩ the correct voltage divider?
Your maximum supply voltage is 132 V and at that voltage, you have 15 V from the adapter. Your ADC in the Arduino can accept 5 V peak-to-peak = 1.767 V rms, so that is safe, because you get only 1.36 V from the divider. You could use 82 kΩ and 10 kΩ in the voltage divider; then your calibration constant would be:
132 V × ( (82 k + 10 k) / 10 k ) / ( 15 V ) = 80.96
and you still have ~ 7% available to allow for component tolerances.
4) ¿Qué función tiene la siguiente línea de código de la librería "EmonLib" ?
double V_RATIO = VCAL *((SUPPLYVOLTAGE/1000.0) / 1023.0); Donde VCAL = Voltage constant
Vrms = V_RATIO * sqrt(sumV / numberOfSamples);
Two things are happening here. (1) The first line is taking the voltage calibration constant (VCAL) and "correcting" it by measuring the actual analogue reference voltage ( = VCC ) at the top of the emonLib method calcVI( ), which it calls SUPPLYVOLTAGE. This is the reason that the Arduino VCC does not appear in the formula.
2) the second line is completing the rms calculation and applying the calibration. It is taking the average of the sum of V2 and then taking the square root, multiplying by the number we just calculated that is the adjusted calibration constant and giving the answer in Volts rms.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
"Your maximum supply voltage is 132 V and at that voltage, you have 15 V from the adapter. Your ADC in the Arduino can accept 5 V peak-to-peak = 1.767 V rms, so that is safe, because you get only 1.36 V from the divider. You could use 82 kΩ and 10 kΩ in the voltage divider; then your calibration constant would be.....
Pero adicional a los 15 V tengo que sumarle la variación del 20% debido a que no existe carga lo que me daría 18 V = 25.46 V pico-pico, y tomé en cuenta el caso en que la señal de referencia del arduino fuera 4.8V ya que planeo ponerle una batería que sirve cuando no haya servicio eléctrico y esta hace que varíe la referencia. Haciendo los cálculos y si selecciono una resistencia fija R2=100k obtengo R1=10.4k aproximadamente a 10k ... Es correcto esto? o ¿Cuando se toma en cuenta la variación del 20% a la salida del adaptador?
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
No, you measured the adapter with no load (only your multimeter) so there is no need to add another 20%.
You only need to allow for transformer regulation when you use the full-load voltage that the manufacturer of the adapter gives: i.e. if the manufacturer states that it is for 120 V supply and gives 9 V and it is rated at 6 VA, then you get 9 V out when the load is 666 mA, and the voltage rises as the load reduces.
If you measure the same adapter at 132 V supply and you get 15 V out on no load, then those are the numbers you should use, because your circuit does not put a significant load on the adapter.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Thank you very much!!
With this explanation I guess I'll calibrated voltage, then start with the current sensor and I need help.
In the library "EmonLib" algorithm is not performed to detect that wavelength is Missoni is "zero" (512) as it does in the voltage.
Why not do the same with variable current?
Thanks was very helpful comments...!!!xfa
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
The standard sketch for measuring voltage and current waits until the ADC value for voltage is near the zero-crossing point. This technique is possible because mains voltage should always be present.
For the current only sketch, it would be difficult to detect the start of a mains cycle if no current was flowing through the CT. I presume that's why this "synchronous start" stage is omitted. Instead, the measurement process starts straight away. By choosing a suitable number of samples, it should be possible to measure the current for a whole number of mains cycles, which achieves much the same effect.
(Hope this is right - from memory)
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
That is right - but there is no need to start sampling at or near zero in particular, it is only necessary to have as nearly as possible an integer number of whole cycles. So the exact point on the wave at which we start does not matter, as long as we finish at about the same place.
And there is no need to do the same with current, because emonLib measures samples of voltage and current alternately - approximately 50 pairs per cycle at 50 Hz.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Sorry, but the more I study, the more ignorant I become, I'm tried to interpret the entire library "EmonLib", here applies a high pass filter to remove the DC component (offset), can be you skip this algorithm by hardware if a full wave rectifier is used as to calculate effective values has the same effect, since the formula is squared .....
What implications would need to make this change?
Another option would be to use a half-wave rectifier, would have the same effect is compensated by multiplying 1 / sqr (2). and would avoid double drop diode voltage (occurring in the full-wave).
This is it correct?.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
You cannot use a rectifier. If you do, you no longer have any information about the phase of the current in relation to the voltage, therefore you cannot determine the direction of power flow. In addition, if you include a rectifier, you will introduce non-linearity as the diodes begin to conduct.
I do not understand why you want to do that. All the rectification that is necessary is done in the software. As you say, provided you are measuring only power, you need only one high-pass filter. But if you need an output of both voltage and current, then you must have a high pass filter in each.
One more point: EmonLib is proven and it works.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
works well, I'm know.
My idea is to fully understand how it works, now you can not run a full wave rectifier.
I'm starting and so I came all these doubts.
Thanks for the help.!
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Help, I have problems playing back the program, you say that it takes about 50 samples per cycle pairs. Where does he get this value?.
According to my analysis, the samples are subject to sampling period of the ADC of Arduino (100uS), if I set the variable
"timeout = 2000"
Sampling would be for two seconds, which corresponds to 120 cycles (60 Hz). What if the other side to the "crossings" Variable I assign a value of 20?. Not fit something in there ...The variable value should be 240 crossings. and must always have a logical relationship with the timeout variable.
Now there is another issue, as this sampling voltage and current time between samples is another 400uS, you'll take 41.67 samples per cycle, now in 2 seconds would have approximately 5000 samples.
Is this correct?.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Timeout is totally different. It should never end the sampling loop. It is there to prevent the program waiting forever in an infinite loop if there is no input. CrossCount should always terminate the measurement loop.
The default "crossings" (or wavelengths - which is not true, it is half-wavelengths) is 20, which at 50 Hz is 10 cycles in 0.2 s. If you leave crossings at 20, at 60 Hz you will sample for 0.166 s. Sampling for 0.2 s every 5 s was chosen to give a good battery life when using battery power. If you want to sample for 0.2 s, "crossings" should be 24.
As you say, the number of samples is defined by the rate at which the ADC converts inputs and the time taken by the program to do the mathematics. It works out be a little more than 2500 sample pairs per second. So you are almost correct, in 2 s you will have a little more than 5000 sample pairs. On a 60 Hz supply, I think you should see maybe one or two more, about 42 or 43 sample pairs per cycle.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
What effect has increased or decreased if the " crossings = 40 " or " crossings = 5" cycles ?. Have any negative effect?.
What would be the optimal value for crossings?
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
For how long do you want to measure? And how frequently? 0.2 s every 5 s is good if your electricity demand is not changing rapidly.
If you want, Diverting surplus PV Power: PLL will measure power continuously - you do not need to use the energy diverting function if you do not need it.
There is a 60 Hz version available (3 c.t's - by Dan Woodie: http://openenergymonitor.org/emon/node/2624
and http://openenergymonitor.org/emon/node/2679)
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
What I seek is actually measuring energy consumption continuously (Real Time), ie the load increases at some point turn to observe the increase of energy ..... I think these changes (increased load ) do not occur very often, but if I must occur sensing that change.
I'm think it would be fine in 5s 0.2s for my application.
I'm will review the code of Dan, I will definitely take time entendenderlo.
Thanks for the help.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Two sketches of mine which measure Real Power continuously and support the RFM12B are available:
This code measures real power on four channels, it is intended for single-phase use with the emonTx V3. The ADC sampling regime uses a hardware timer.
The code on this thread (in NZ_project.zip) has the ADC in free-running mode for greatest speed. It was written to monitor 2 phases of a 3-phase supply, but could easily be modified to measure power on all three phases.
As far as I can see, both of these sketches should be able to measure real power in a 60Hz environment without requiring any changes. The first sketch also accumulates energy, so "50" should be changed to "60" in each of the following lines:
tx_data.msgNumber = msgNumber++; // increment
tx_data.power_CT1 = energyInBucket_long_CT1 * (powerCal_CT1/50);
tx_data.power_CT2 = energyInBucket_long_CT2 * (powerCal_CT2/50);
tx_data.power_CT3 = energyInBucket_long_CT3 * (powerCal_CT3/50);
tx_data.power_CT4 = energyInBucket_long_CT4 * (powerCal_CT4/50);
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Thanks Robin. I was looking for those last night and couldn't find them, and hoped you'd chip in. They're now in my private FAQ list.
Re: Calibration of emonTxV3 and emonTxV3_RFM12B DiscreteSampling sketch
Thanks calypso_rae, no doubt this will help me a lot going to interpret the code and make the corresponding changes, I think I will take some time, since the code and EmonLib different from the library, which was the one with reference.


1 Kings 14:4
And Jeroboam's wife did so, and arose, and went to Shiloh, and came to the house of Ahijah. But Ahijah could not see; for his eyes were set by reason of his age.


DomainOverflow.com's DIY Challenge, Build your own Domain Marketplace PART IV: Admin dashboard
Please paste domain(s) below:
Marketplace name:
Publishing Gateway
- Please choose publishing method
Cpanel based hosting account
Cloud based or non-cloud, without cpanel, with Apache webserver
Cloud based, with cpanel (why would you do this ?)
Local windows or linux, using wamp or alike
API Based, via POST
REST API Based, via Dotboss.Digital
Server:
Auth user:
Auth password:
REST API URL
Custom POST receiver:
API or POST token/credential:
Custom field:
Please choose template
Please choose template -
Template from PART II, of this series
Click here to publish marketplace


Skipole WSGI generator.
The instructions here describe how Pound and Waitress can be used to serve your application whenever your debian-based server is powered up.
They assume you have no other web server running (so port 80 and port 8000 is free), and you are familiar with shell commands, changing directories, creating text files and setting permissions. You should also have used skipole to create an application.
In this example Pound proxies calls to the Waitress web server which is running your wsgi python application. The settings here use default values provided by the operating system to keep the setup simple.
Install the packages 'pound' and 'python3-waitress'
apt-get install pound
apt-get install python3-waitress
Assuming your project is called 'myproj'.
Copy the projectfiles directory into /opt, creating directory:
/opt/projectfiles/
Ensure skilift, skiadmin and the development server are removed and myproj.py is edited with the following:
from waitress import serve serve(application, host='<IP_ADDRESS>', port=8000)
Give the directory and contents www-data:www-data ownership
sudo chown -R www-data:www-data /opt/projectfiles
Then create a file :
/lib/systemd/system/myproj.service
containing the following:
[Unit] Description=My project description After=multi-user.target [Service] Type=idle ExecStart=/usr/bin/python3 /opt/projectfiles/myproj.py User=www-data Restart=on-failure # Connects standard output to /dev/null StandardOutput=null # Connects standard error to journal StandardError=journal [Install] WantedBy=multi-user.target
Then set permissions of the file
sudo chown root:root /lib/systemd/system/myproj.service
sudo chmod 644 /lib/systemd/system/myproj.service
Enable the service
sudo systemctl daemon-reload
sudo systemctl enable myproj.service
This starts /opt/projectfiles/myproj.py on boot up.
edit the pound cfg file at /etc/pound/pound.cfg to read:
## Minimal sample pound.cfg ## ## see pound(8) for details ###################################################################### ## global options: User "www-data" Group "www-data" #RootJail "/chroot/pound" ## Logging: (goes to syslog by default) ## 0 no logging ## 1 normal ## 2 extended ## 3 Apache-style (common log format) LogLevel 1 ## check backend every X secs: Alive 30 ## use hardware-accelleration card supported by openssl(1): #SSLEngine "" # poundctl control socket Control "/var/run/pound/poundctl.socket" ###################################################################### ## listen, redirect and ... to: ## redirect all requests on port 8080 ("ListenHTTP") to the local webserver (see "Service" below): ListenHTTP Address <IP_ADDRESS> Port 80 ## allow PUT and DELETE also (by default only GET, POST and HEAD)?: xHTTP 1 Service BackEnd Address <IP_ADDRESS> Port 8000 End End End
The changes from default are - listen is port 80, backend is port 8000 and ip address is whatever is required (in my test case it was <IP_ADDRESS>)
Enable pound to start by editing /etc/default/pound
and setting
startup=1
Finally reboot - note: as pound may start before the project, give the server a minute before testing.
The configuration is given here as a basis which could be expanded - to multiple backend services in a load balancing application perhaps.


Building documentation
Documentation overview
GDAL's documentation includes C and C++ API documentation built automatically from source comments using doxygen and reStructuredText (rst) files containing manually-edited content.
Sphinx is used to combine the above components into a complete set of documentation in HTML, PDF, and other formats.
Sphinx and extensions used by GDAL can be installed by running python3 -m pip install -r requirements.txt
from
the doc
subdirectory.
Building documentation
HTML documentation can be built by running make html
in the doc
subdirectory of the GDAL source repository.
The generated files will be output to doc/build
where they can be viewed using a web browser.
Doxygen content that is incorporated into the output is not automatically rebuilt but can be regenerated using make doxygen
.
To visualize documentation changes while editing, it may be useful to install the sphinx-autobuild python package.
Once installed, running sphinx-autobuild -b html source build
from the doc
subdirectory will build documentation
and serve it on a local web server at http://<IP_ADDRESS>:8000
. The pages served will be automatically refreshed as changes
are made to underlying rst
documentation files.
Sphinx RST Style guide
This section contains syntax rules, tips, and tricks for using Sphinx and reStructuredText. For more information, please see this comprehensive guide to reStructuredText, as well as the Sphinx reStructuredText Primer.
Basic markup
A reStructuredText document is written in plain text. Without the need for complex formatting, one can be composed simply, just like one would any plain text document. For basic formatting, see this table:
Format |
Syntax |
Output |
Italics |
|
italics |
Bold |
|
bold |
Monospace |
`` |
|
Warning
Use of basic markup is not recommend! Where possible use sphinx inline directives (described below) to logically mark commands, parameters, options, input, and files. By using directives consistently these items can be styled appropriately.
Lists
There are two types of lists, bulleted lists and numbered lists. A bulleted list looks like this:
An item
Another item
Yet another item
This is accomplished with the following code:
* An item
* Another item
* Yet another item
A numbered list looks like this:
First item
Second item
Third item
This is accomplished with the following code:
#. First item
#. Second item
#. Third item
Note that numbers are automatically generated, making it easy to add/remove items.
List-tables
Bulleted lists can sometimes be cumbersome and hard to follow. When dealing with a long list of items, use list-tables. For example, to talk about a list of options, create a table that looks like this:
Shapes |
Description |
|---|---|
Square |
Four sides of equal length, 90 degree angles |
Rectangle |
Four sides, 90 degree angles |
This is done with the following code:
.. list-table::
:widths: 20 80
:header-rows: 1
* - Shapes
- Description
* - Square
- Four sides of equal length, 90 degree angles
* - Rectangle
- Four sides, 90 degree angles
Page labels
Ensure every page has a label that matches the name of the file. For example if the page is named foo_bar.rst
then the page should have the label:
.. _foo_bar:
Other pages can then link to that page by using the following code:
:ref:`foo_bar`
Linking
Links to other pages should never be titled as "here". Sphinx makes this easy by automatically inserting the title of the linked document.
- Bad
More information about linking can be found here.
- Good
For more information, please see the section on Linking.
To insert a link to an external website:
`Text of the link <http://example.com>`__
The resulting link would look like this: Text of the link
Warning
It is very easy to have two links with the same text resulting in the following error:
**(WARNING/2) Duplicate explicit target name:foo**
To avoid these warnings use of a double __ generates an anonymous link.
Sections
Use sections to break up long pages and to help Sphinx generate tables of contents.
================================================================================
Document title
================================================================================
First level
-----------
Second level
++++++++++++
Third level
***********
Fourth level
~~~~~~~~~~~~
Notes and warnings
When it is beneficial to have a section of text stand out from the main text, Sphinx has two such boxes, the note and the warning. They function identically, and only differ in their coloring. You should use notes and warnings sparingly, however, as adding emphasis to everything makes the emphasis less effective.
Here is an example of a note:
Note
This is a note.
This note is generated with the following code:
.. note:: This is a note.
Similarly, here is an example of a warning:
Warning
Beware of dragons.
This warning is generated by the following code:
.. warning:: Beware of dragons.
Images
Add images to your documentation when possible. Images, such as screenshots, are a very helpful way of making documentation understandable. When making screenshots, try to crop out unnecessary content (browser window, desktop, etc). Avoid scaling the images, as the Sphinx theme automatically resizes large images. It is also helpful to include a caption underneath the image.:
.. figure:: image.png
:align: center
*Caption*
In this example, the image file exists in the same directory as the source page. If this is not the case, you can insert path information in the above command. The root /
is the directory of the conf.py
file.:
.. figure:: /../images/gdalicon.png
External files
Text snippets, large blocks of downloadable code, and even zip files or other binary sources can all be included as part of the documentation.
To include link to sample file, use the download
directive:
:download:`An external file <example.txt>`
The result of this code will generate a standard link to an external file
To include the contents of a file, use literalinclude
directive:
Example of :command:`gdalinfo` use:
.. literalinclude:: example.txt
Example of gdalinfo use:
Driver: GTiff/GeoTIFF
Size is 512, 512
Coordinate System is:
PROJCS["NAD27 / UTM zone 11N",
GEOGCS["NAD27",
DATUM["North_American_Datum_1927",
SPHEROID["Clarke 1866",6378206.4,294.978698213901]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-117],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1]]
Origin =<PHONE_NUMBER>00,3751320.000000)
Pixel Size = (60.000000,-60.000000)
Corner Coordinates:
Upper Left ( 440720.000, 3751320.000) (117d38'28.21"W, 33d54'8.47"N)
Lower Left ( 440720.000, 3720600.000) (117d38'20.79"W, 33d37'31.04"N)
Upper Right ( 471440.000, 3751320.000) (117d18'32.07"W, 33d54'13.08"N)
Lower Right ( 471440.000, 3720600.000) (117d18'28.50"W, 33d37'35.61"N)
Center ( 456080.000, 3735960.000) (117d28'27.39"W, 33d45'52.46"N)
Band 1 Block=512x16 Type=Byte, ColorInterp=Gray
The literalinclude
directive has options for syntax highlighting, line numbers and extracting just a snippet:
Example of :command:`gdalinfo` use:
.. literalinclude:: example.txt
:language: txt
:linenos:
:emphasize-lines: 2-6
:start-after: Coordinate System is:
:end-before: Origin =
Reference files and paths
Use the following syntax to reference files and paths:
:file:`myfile.txt`
This will output: myfile.txt
.
You can reference paths in the same way:
:file:`path/to/myfile.txt`
This will output: path/to/myfile.txt
.
For Windows paths, use double backslashes:
:file:`C:\\myfile.txt`
This will output: C:\myfile.txt
.
If you want to reference a non-specific path or file name:
:file:`{your/own/path/to}/myfile.txt`
This will output: your/own/path/to/myfile.txt
To reference a file in the GDAL source tree, use:
:source_file:`gcore/gdaldriver.cpp`
This will output a link to the file on GitHub: gdaldriver.cpp
Reference code
To reference a class:
:cpp:class:`MyClass`
To reference a method or function:
:cpp:func:`MyClass::MyMethod`
:cpp:func:`MyFunction`
Define and reference configuration options
To define a configuration option, use:
.. config:: OPTION_NAME
:choices: COMMA, SEPARATED, LIST
:default: DEFAULT_VALUE
:since: GDAL.MIN.VERSION
Narrative about the option.
Similar syntax can be used to define opening options (.. oo::
),
creation options (.. co::
), dataset creation options (.. dsco::
), or layer creation options
(.. lco::
).
To reference a configuration option, such as GDAL_CACHEMAX, use the syntax in the table below.
Option type |
Syntax |
|---|---|
Configuration option |
:config:`option_name`
|
Creation option |
:co:`option_name`
|
Open option |
:oo:`option_name`
|
Dataset creation option |
:dsco:`option_name`
|
Layer creation option |
:lco:`option_name`
|
Reference commands
Reference commands (such as gdalinfo) with the following syntax:
:program:`gdalinfo`
Use option
directive for command line options:
.. option:: -json
Display the output in json format.
Use describe
to document create parameters:
.. describe:: WORLDFILE=YES
Force the generation of an associated ESRI world file (with the extension .wld).


April Dottin-Carter
ASPIRING WEB DEVELOPER
I love to design and build
WEBSITES.
Hello,my name is April. I'm from Cambridge, Massachusetts, and I'm currently a student at Amherst College
pursuing a B.A. in Computer Science. At school, I run Women in Computer Science Club and work as
a specialist in our IT Department. I like to procrastinate homework by creating fun websites,
watching reality shows, and reading my daily horoscope (I'm a Taurus).
|


Games You've Played
Game
Score
{{game.lastPlayedFormatted}}
{{game.score}}
Resume
{{game.timeRemaining}}'' left
None!
Play a
New game
, so you can have somethin' to see here.
Home


03 August 1998
Disease Outbreak Reported
The national health authorities of Liberia have reported an outbreak of cholera/diarrhoea which started at the end of May. The areas affected by the outbreak are Nimba County and Margibi County. Up to 26 June a total of 560 cases with 12 deaths had occurred. The county health teams carried out various control measures in the areas affected (chlorination of wells, health education, opening of ORT treatment centres). Additional support and supplies were requested from the Ministry of Health. Follow-up missions were undertaken by WHO in collaboration with the two county health teams involved. Another outbreak of severe diarrhoea was reported in Sinoe County at the beginning of July although the number of cases is not yet known. Heavy rains in the area have hampered aid to the area as bridges have been washed away.
As well as the activities carried out by the county health teams, WHO, UNICEF, the Belgian Red Cross and other NGO's are collaborating with the national health authorities and the local communities to provide aid.


Thaana Keyboard
Replaces latin text to thaana unicode characters
Star
Issue
Download
Follow @aharen
Inspirations:
jQuery ThaanaKeyboard
by
Ajaaibu
and
Javascript Thaana Keyboard
by
Jawish


Artificial Intelligence?
问题描述 :
Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and understand the problem first!
So they don’t state a problem like “U=10V, I=5A, P=?” but rather like “You have an electrical circuit that contains a battery with a voltage of U=10V and a light-bulb. There’s an electrical current of I=5A through the bulb. Which power is generated in the bulb?”.
However, half of the pupils just don’t pay attention to the text anyway. They just extract from the text what is given: U=10V, I=5A. Then they think: “Which formulae do I know? Ah yes, P=U*I. Therefore P=10V*5A=500W. Finished.”
OK, this doesn’t always work, so these pupils are usually not the top scorers in physics tests. But at least this simple algorithm is usually good enough to pass the class. (Sad but true.)
Today we will check if a computer can pass a high school physics test. We will concentrate on the P-U-I type problems first. That means, problems in which two of power, voltage and current are given and the third is wanted.
So they don’t state a problem like “U=10V, I=5A, P=?” but rather like “You have an electrical circuit that contains a battery with a voltage of U=10V and a light-bulb. There’s an electrical current of I=5A through the bulb. Which power is generated in the bulb?”.
However, half of the pupils just don’t pay attention to the text anyway. They just extract from the text what is given: U=10V, I=5A. Then they think: “Which formulae do I know? Ah yes, P=U*I. Therefore P=10V*5A=500W. Finished.”
OK, this doesn’t always work, so these pupils are usually not the top scorers in physics tests. But at least this simple algorithm is usually good enough to pass the class. (Sad but true.)
Today we will check if a computer can pass a high school physics test. We will concentrate on the P-U-I type problems first. That means, problems in which two of power, voltage and current are given and the third is wanted.
Your job is to write a program that reads such a text problem and solves it according to the simple algorithm given above.
输入:
The first line of the input will contain the number of test cases.
Each test case will consist of one line containing exactly two data fields and some additional arbitrary words. A data field will be of the form I=xA, U=xV or P=xW, where x is a real number. Directly before the unit (A,V or W) one of the prefixes m (milli), k (kilo) and M (Mega) may also occur. To summarize it: Data fields adhere to the following grammar:
DataField ::= Concept ‘=’ RealNumber [Prefix] Unit
Each test case will consist of one line containing exactly two data fields and some additional arbitrary words. A data field will be of the form I=xA, U=xV or P=xW, where x is a real number. Directly before the unit (A,V or W) one of the prefixes m (milli), k (kilo) and M (Mega) may also occur. To summarize it: Data fields adhere to the following grammar:
DataField ::= Concept ‘=’ RealNumber [Prefix] Unit
Concept ::= 'P' | 'U' | 'I'
Prefix ::= 'm' | 'k' | 'M'
Unit ::= 'W' | 'V' | 'A'
Additional assertions:
- The equal sign (‘=’) will never occur in an other context than within a data field.
- There is no whitespace (tabs,blanks) inside a data field.

输出:
For each test case, print three lines:
- a line saying “Problem #k” where k is the number of the test case
- a line giving the solution (voltage, power or current, dependent on what was given), written without a prefix and with two decimal places as shown in the sample output
- a blank line
样例输入:
3 If the voltage is U=200V and the current is I=4.5A, which power is generated? A light-bulb yields P=100W and the voltage is U=220V. Compute the current, please. bla bla bla lightning strike I=2A bla bla bla P=2.5MW bla bla voltage?
样例输出:
Problem #1 P=900.00W Problem #2 I=0.45A Problem #3 U=1250000.00V
解题代码:
import java.io.BufferedReader; import java.io.InputStreamReader; import java.math.BigDecimal; import java.math.RoundingMode; public class Main { /** * Parse the value. * @param s the given string such as 4.5A, 2.5MW * @return */ private static double parseValue(String s) { int i = 0; while(i < s.length() && s.charAt(i) >= '0' && s.charAt(i) <= '9' || s.charAt(i) == '.') { i++; } if (i == s.length()) { return Double.parseDouble(s); } // in case that the end of string is not reached. double value = Double.parseDouble(s.substring(0, i)); if (s.charAt(i) == 'm') { value = value / 1000.0; } else if (s.charAt(i) == 'M') { value = value * 1000000.0; } else if (s.charAt(i) == 'k') { value = value * 1000.0; } return value; } /** * @param args */ public static void main(String[] args) throws Exception { BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); String line = stdin.readLine(); int n = Integer.parseInt(line); for (int i = 1; i<= n; i++){ line = stdin.readLine(); String[] t = line.split("[ ,]+"); boolean u_value = false; boolean i_value = false; boolean p_value = false; double u = 0; double I = 0; double p = 0; for (int j = 0; j < t.length; j++) { if (t[j].indexOf("=") > 0) { // split the kind of string like:U=200V String[] temp = t[j].split("[=]"); if (temp[0].charAt(0) == 'U') { u_value = true; u = parseValue(temp[1]); } else if (temp[0].charAt(0) == 'P') { p_value = true; p = parseValue(temp[1]); } else if (temp[0].charAt(0) == 'I') { i_value = true; I = parseValue(temp[1]); } } } System.out.println("Problem #" + i); if (u_value && i_value) { System.out.print("P="); System.out.print(new BigDecimal(I * u).setScale(2, RoundingMode.HALF_UP)); System.out.println("W"); } else if (p_value && u_value) { System.out.print("I="); System.out.print(new BigDecimal(p /u).setScale(2, RoundingMode.HALF_UP)); System.out.println("A"); } else if (p_value && i_value) { System.out.print("U="); System.out.print(new BigDecimal(p /I).setScale(2, RoundingMode.HALF_UP)); System.out.println("V"); } System.out.println(); } } }
(adsbygoogle = window.adsbygoogle || []).push({});
DFS方法的原理还是不太清楚啊
可以用公式。主要为了说明动态规划，如果要打表的话，这种方法也是较简单和高效的
有限自动机在ACM中是必须掌握的算法，实际上在面试当中几乎不可能让你单独的去实现这个算法，如果有题目要用到有限自动机来降低时间复杂度，那么这种面试题应该属于很难的级别了。
这排版…你都打开来看看改改
/*
* =====================================================================================
*
* Filename: 1366.cc
*
* Description:
*
* Version: 1.0
* Created: 2014年01月06日 14时52分14秒
* Revision: none
* Compiler: gcc
*
* Author: Wenxian Ni (Hello World~<EMAIL_ADDRESS>* Organization: AMS/ICT
*
* =====================================================================================
*/
#include
#include
using namespace std;
int main()
{
stack st;
int n,i,j;
int test;
int a[100001];
int b[100001];
while(cin>>n)
{
for(i=1;i>a[i];
for(i=1;i>b[i];
//st.clear();
while(!st.empty())
st.pop();
i = 1;
j = 1;
while(in)
break;
}
while(!st.empty()&&st.top()==b[j])
{
st.pop();
j++;
}
}
if(st.empty())
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
return 0;
}
为什么暴力求解方法循环到sqrt(n) 就可以了呢
博主的C++功底真是好
这个问题别太纠结了，不同的编译器结果不一
有两个重复的话结果是正确的，但解法不够严谨，后面重复的覆盖掉前面的，由于题目数据限制也比较严，所以能提交通过。已更新算法
不同的编译器，printf(),执行的顺序不同，所以结果也就不同，建议不要那么写
刚开始学习，为啥会报错了
等待后面的实现，多谢


control education community reduction containers mosquito treatment container source sites habitats home site Aedes Mercer number Monmouth active residents educational mosquitoes public County behavior compared larvae area homes study team using AmeriCorps New events health included pupae receiving site, volunteers Figure Mosquito analysis participation programs areas county education, infested (SE) .±. Breteau Community albopictus conducted important showed Asian County, days, habitats, indices reduce significant tire American Control However, did members parcels peer pick program results trash water (.) Healy Medical Tropical actively contained data free habitat help increase individuals passive regarding teams tiger total unmanaged vector (.%), Association Health Medicine Table Therefore, aegypti disease educated efforts following homeowners index measures peridomestic primary reducing similar survey surveys tires types used Ae. Container Fonseca Unlu allowed and/or asked community. containers, drilling geometric habitats. homes. house immediately indicated information management means observed populations potential provided studies trained urban willing = ., Active August Corps Crepeau Farajollahi ImageJ Jersey Public United abandoned change community-based control. days. different education. estimate evaluated examine given goal home, involved larval nuisance prior provide represented residence sampled season shown sites. spatial study, transmission use walk work yard (): (parcels Chi International Jersey, July Management P = .) Reserve Results States Volunteers additional albopictus, analysis, approximately campaigns communities consisted continually counties door educators. effective exhibiting final follow form high home. impact increased inspection, integrated interpolations involve large larvae, left local media mosquitoes, mosquitoes. occupied parcel performed program, promote refusing resident resulting risk round selected service single species, square suburban th), time trends vector-borne versus water-filled week


-
What is TeaCo?
TeaCo is a lightweight Tool, which helps little and even bigger groups with making appointments for any reason. Extending ImiCaToo, developed at the IMIS, TeaCo is a system, which stands out due to improved usability and lightweightness.\n
With TeaCo you need neither a username nor a password for:
- creating new meetings and inviting participants
- creating new suggestion and voting for it
- writing comments to any meeting
\n
-
I have been invited. What am I supposed to do?
You should tell the other participants if you are available by voting
on the suggested dates.
The
tutorial video shows you how.
-
I have lost my access data!
No problem. Enter your e-mail address on the
TeaCo homepage
and click on "Create account" – you will receive an e-mail with your access link
on that address; however, your existing account stays the same - no new one will be created.
-
I did register on the homepage, but I didn't receive my access link!
Please make sure the message was not accidently classified as spam by
your mail program or provider. In addition, mail delivery could take
some moments - so the message might reach you one or two minutes
after your registration.
-
What is a "meeting"?
A meeting in TeaCo describes the planning process of a single event.
A meeting has an initiator and several participants, who suggest
dates for the event and vote on these dates.
-
What is a "restricted meeting"?
The initiator can state at a meeting's creation if all of the
other participants may only be granted restricted permissions within
the meeting. In a restricted meeting each participant my only edit
or delete his or her own suggestions. In addition, only the initiator
may uninvite participants, pick suggestions as final or change the
meeting title.
-
I'd like to plan my own meeting with some people. What do I have to do?
Click on "New Meeting" in the header bar at the top of the page, provide
a meeting title and click "OK". When you initiate a meeting for the first
time, a
tutorial video will guide
you through the process.
-
Everyone voted. What now?
If you want to finish the planning process, choose one or more final dates and
mark them as final by clicking the
button. Then click on "Send appointment dates" in the detail panel on the right
in order to e-mail the selected dates to all participants. You can specify a
message alongside with the dates.
-
I cannot uninvite myself! How do I leave a meeting?
Click on "MyTeaCo" in the header bar at the top of the page to get
to your administration area. You will find a list of all your meetings
there. Next to the the meeting is a link to leave it. Caution: If you
are the iniatator of the meeting, you will delete the whole meeting
that way, so none of the participants will have access to it anymore!
-
What does "clone" mean?
If you clone a meeting a new one will be created, where there are no
suggestions but all participants of the original meeting already invited.
This comes in handy if you plan meetings with the same people quite often.
-
I have other e-mail addresses. Do I have to create an account for each of them?
No, you can use all these addresses within one account. To do that, click
on "MyTeaCo" in the header bar at the top of the page to get to your
administration area. You can enter a new address in the section
"E-mail addresses". Click on "Activate address" to receive an e-mail with
an activation link in it. Use that link to activate your address. You now
have all your meetings, no matter which address was invited, in your
TeaCo account.
-
I want to change the e-mail address which I receive my TeaCo messages on.
First, activate the new e-mail address in your account.
(see „I have other e-mail addresses. Do I have to create an account for each of them?“).
Now click the blue star
next to the activated address to make it your main address (you can tell it by the yellow star
).
All your messages will be sent to that address from now on.
-
Creating suggestions is so slow and costly!
It doesn't have to be that way. TeaCo makes the work easier:
- Doubleclick a day in the calendar in the detail panel on the right
to quickly add a suggestion.
- Move suggestions to the right place by clicking on them,
holding the mouse button and move them.
- Adjust the duration of a suggestion by dragging at its top or
bottom edge.
That way making the dates for a meeting is quite easy: Create some suggestions
by doubleclicking on the relevant day and move them in place afterwards.
-
What is a free/busy list?
A free/busy list is a file in iCalendar-format which can be generated by
various calendar applications (e.g. Apple iCal or Microsoft Outlook).
This file contains information about the times you are not available.
If you put this file online and provide the URL in TeaCo, these times will
be displayed as red blocks in your meetings. This tells other participants
when you don't have time.
-
Why don't I have to login to TeaCo?
Each user in TeaCo has a unique, 40 characters long key - you can see it
in the address bar. This key identifies you within TeaCo. So never give
this key or your TeaCo access link to anyone! Others would have access to
all your meetings and data.
-
I like the music of the tutorial videos. Who is that?
The artist's name is Sean Fournier, the song is called "Broken Stereo".
The artist's website is
here,
you can download his music
here
(under Creative Commons licence).
-
How does TeaCo handle different time zones?
A time specification within TeaCo always equates to the current CET
(i.e. UTC+1 in winter and UTC+2 in summer), no matter, in which time
zone the time specification was made, and no matter, if occasionally
the current time was switched from standard time to summer time or the
other way round.


You can also use arrow keys and -/= to zoom, or use the mouse drag and scroll wheel. Double click to begin routing & double click again to end and show route.
( click this bubble to close )
Options
Constrain map dimensions (this may solve problems with zooming out)
Theme:
Default
Cal
Solarized Light
Eighties
clear route
Double-click again
for route endpoint ...
Rastering
Loading...
Got server-side error!
See Java Console
Route Navigation Directions
No routing directions to display.


You have been idle for {{data.idleTime$|async|msToString:true}}.
Track to: Create and track to: {{selectedTask?.title || newTaskTitle || 'No task selected'}}


Breaking up is easy to do (with OPAM)
When we first started developing Mirage in 2009, we were rewriting huge chunks of operating system and runtime code in OCaml. This ranged from low-level device drivers to higher-level networking protocols such as TCP/IP or HTTP. The changes weren’t just straight rewrites of C code either, but also involved experimenting with interfaces such as iteratees and lightweight threading to take advantage of OCaml’s static type system. To make all of this easy to work with, we decided to lump everything into a single Git repository that would bootstrap the entire system with a single make
invocation.
Nowadays though, Mirage is self-hosting, the interfaces are settling down, the number of libraries are growing every day, and portions of it are being used in the Xen Cloud Platform. So for the first developer release, we wanted to split up the monolithic repository into more manageable chunks, but still make it as easy as possible for the average OCaml developer to try out Mirage.
Thanks to much hard work from Thomas and his colleagues at OCamlPro, we now have OPAM: a fully-fledged package manager for Mirage! OPAM is a source-based package manager that supports a growing number of community OCaml libraries. More importantly for Mirage, it can also switch between multiple compiler installations, and so support cross-compiled runtimes and modified standard libraries.
OPAM includes compiler variants for Mirage-friendly environments for Xen and the UNIX tuntap
backends. The installation instructions now give you instructions on how to use OPAM, and the old monolithic repository is considered deprecated. We’re still working on full documentation for the first beta release, but all the repositories are on the Mirage organisation on Github, with some of the important ones being:
- mirage-platform has the core runtime for Xen and UNIX, implemented as the
OS
module. - mirage-net has the TCP/IP networking stack.
- ocaml-cstruct has the camlp4 extension to manipulate memory like C
struct
s, but with type-safe accessors in OCaml. - ocaml-xenstore has a portable implementation of the Xenstore protocol to communicate with the Xen management stack from a VM (or even act as a server in a stub domain).
- ocaml-dns is a pure OCaml implementation of the DNS protocol, including a server and stub resolver.
- ocaml-re is a pure OCaml version of several regular expression engines, including Perl compatibility.
- ocaml-uri handles parsing the surprisingly complex URI strings.
- ocaml-cohttp is a portable HTTP parser, with backends for Mirage, Lwt and Core/Async. This is a good example of how to factor out OS-specific concerns using the OCaml type system (and I plan to blog more about this soon).
- ocaml-cow is a set of syntax extensions for JSON, CSS, XML and XHTML, which are explained here, and used by this site.
- ocaml-dyntype uses camlp4 to generate dynamic types and values from OCaml type declarations.
- ocaml-orm auto-generates SQL scheme from OCaml types via Dyntype, and currently supports SQLite.
- ocaml-openflow implements an OCaml switch and controller for the Openflow protocol.
There are quite a few more that are still being hacked for release by the team, but we’re getting there very fast now. We also have the Mirage ports of SSH to integrate before the first release this year, and Haris has got some interesting DNSSEC code! If you want to get involved, join the mailing list or IRC channel!
- Irmin 0.12 with portable filesystem watching released
- MirageOS Summer 2016 Hackathon roundup
- MirageOS Summer 2016 Hackathon announcement, and talk roundup
- MirageOS Spring 2016 Hackathon!
- MirageOS security advisory 00: mirage-net-xen
- Introducing Functoria
- Run Mirage Unikernels on KVM/QEMU with Solo5
- MirageOS hackathon
- Introducing Charrua — a DHCP implementation
- Unikernel.org


Welcome to my message board test!
Check out all of these cool messages! Enter some of your own why don't you?
Messages
Submit a message!
Submit


I am an informatics engineering student who has just graduated from Institut Teknologi Sumatera in Lampung.  I love to learn new things to overcome my curiosity. I am a hard worker who is able to work both as a team and individually. I'm currently looking for job opportunities as a back-end developer or another position that is still related to it.
If you want to know more about me, please contact at
yogaseptana(at)gmail(dot)com.


Skip to Filter results
Restaurant Reviews
Map view to see restaurant locations
Filter Results
Select Neighborhoods:
All Neighborhoods
Select Cuisines:
All Cuisines


Hi! This email is to inform you that you have an activity due in about an hour!
If this email is in error, please ignore this message.
The activity is {{ name }}!
Get it done!
Have a good one!
Your Accountabillibuddy


simnets.ops package¶
Submodules¶
simnets.ops.mex module¶
-
simnets.ops.mex.
_expand_dim_specification
(image_shape, dim_spec)[source]¶ Expand mex dimension specification.
The dimension specification can be 2 or 3 long, it is processed in two steps: 1. If it is of length 2, a -1 is prepended to it 2. Each dimension with -1 is replaced with the whole corresponding image dimension
Parameters: - image_shape – list(int) the shape of the input image, of length 3 (without batch) or 4 (with bach)
- dim_spec – list(int) the specification to be expanded
Returns: The expanded dimension specification
-
simnets.ops.mex.
mex
(input, offsets, num_instances, softmax_mode=None, padding=None, strides=None, blocks=None, epsilon=None, blocks_out_of_bounds_value=None, blocks_round_down=None, use_unshared_regions=None, shared_offset_region=None, unshared_offset_region=None, name=None)[source]¶ Computes the MEX layer given 4-D input and 5-D offsets tensors.
As defined in https://arxiv.org/abs/1506.03059
Given an input tensor of shape [batch, in_channels, in_height, in_width] and a offsets tensor of shape [num_regions, num_instances, filter_channels, filter_height, filter_width], where num_regions is calculated from the output dimensions and the shared/unshared offsets parmaeter
This op performs the following: Extract virtual patches of size blocks from the input tensor, according to the padding, strides and blocks parameters. this results in a 3D grid of patches indexed by c,i,j. For each output element we select the corresponding patch and offsets region then calculate:
\[\frac{1}{\epsilon} \log\left(\frac{1}{n} \sum\exp(\epsilon (patch + region))\right)\]The different parameters change the behaviour as described below.
Parameters: - input – A Tensor. Must be one of the following types: float32, float64. A 4-D tensor. with dimensions [batch, in_channels, in_height, in_width].
- offsets – A Tensor. Must have the same type as input. A 5-D tensor of shape [num_regions, num_instances, filter_channels, filter_height, filter_width] must be non negative!
- num_instances – An int. the number of instances of the layer.
- softmax_mode – An optional bool. Defaults to False. in softmax mode we do not divide by the patch size inside of the log
- padding – An optional list of ints. Defaults to [0, 0, 0]. list of length 3. The padding to use for the dimensions of input.
- strides – An optional list of ints. Defaults to [1, 1, 1]. list of length 3. The stride of the sliding window for the dimensions of input.
- blocks – An optional list of ints. Defaults to [1, 1, 1]. list of length 3. The 3D dimensions of the blocks.
- epsilon – An optional float. Defaults to 1. the epsilon parameter. can be +inf, -inf
- blocks_out_of_bounds_value – An optional float. Defaults to 0. value to use for out of bounds elements
- blocks_round_down –
An optional bool. Defaults to True. controls the calculation of the output size. with round_down it is:
image_size + 2 * pad_size - patch_size) / stride + 1
without it is:
static_cast<int>( std::ceil(static_cast<float>( image_size + 2 * pad_size - patch_size) / stride)) + 1
- use_unshared_regions – An optional bool. Defaults to True. alternative to defining a shared region, unshared region.
- shared_offset_region – An optional list of ints. Defaults to [-1]. the region in which offsets are shared. a value of -1 is replaced by the entire respective dimension. can be a list of length 3, or 1. if it is of length 1 [d], it is expanded to [-1, d, d]
- unshared_offset_region – An optional list of ints. Defaults to [-1]. the region in which offsets are unshared. a value of -1 is replaced by the entire respective dimension. can be a list of length 3, or 1. if it is of length 1 [d], it is expanded to [-1, d, d]
- name – A name for the operation (optional).
Returns: A Tensor. Has the same type as input. A 4-D tensor of shape [batch, out_channels, out_height, out_width]
simnets.ops.similarity module¶
-
simnets.ops.similarity.
similarity
(input, templates, weights, similarity_function=None, blocks=None, strides=None, padding=None, normalization_term=None, normalization_term_fudge=None, ignore_nan_input=None, out_of_bounds_value=None, name=None)[source]¶ Computes a similarity measure given 4-D input templates and weights tensors.
As defined in https://arxiv.org/abs/1506.03059
Given an input tensor of shape [batch, in_channels, in_height, in_width] and a templates, weights tensor of shape [out_channels, in_channels, filter_height, filter_width], this op performs the following:
- Extract virtual patches of size blocks from the input tensor, according to the padding, strides and blocks parameters. block size in the channels dimension is always the number of input channels. this results in a 2D grid of patches indexed by i,j
- For the simplest version, for output element e = [b, c, i, j], compute output[b, c, i ,j] = sum(weights[c] * \(phi`(templates[c], patches[i, j])) where :math:`phi\) is either -|a - b|_1 (l1) or -|a - b|_2 (l2)
Let \(I\) be the input image, \(T\) the temapltes, \(W\) the weights and \(O\) the output, \(p\) the padding and \(s\) the strides then the output element at [b, c, i, j] is:
\[\sum_{dc, di, dj} T[c, dc, di, dj] \cdot \phi(I[b, dc, s[0] \cdot i + di - p[0], s[1] \cdot j + dj - p[1]], T[c, dc, di, dj])\]the different parameters change the behaviour as described below.
Parameters: - input – A Tensor. Must be one of the following types: float32, float64. A 4-D tensor. with dimensions [batch, in_channels, in_height, in_width].
- templates – A Tensor. Must have the same type as input. A 4-D tensor of shape [out_channels, in_channels, filter_height, filter_width]
- weights – A Tensor. Must have the same type as input. A 4-D tensor of shape [out_channels, in_channels, filter_height, filter_width] must be non negative!
- similarity_function – An optional string from: “L1”, “L2”. Defaults to “L2”.
- blocks – An optional list of ints. Defaults to [3, 3]. list of length 2. The height and width of the blocks.
- strides – An optional list of ints. Defaults to [2, 2]. list of length 2. The stride of the sliding window for the height and width dimension of input.
- padding – An optional list of ints. Defaults to [0, 0]. list of length 2. The padding to use for the height and width dimension of input.
- normalization_term – An optional bool. Defaults to False. if true, add a normalization term to the output, used to make the L2 version of this operator into a proper (log) probability measure. the normalization term is -0.5 * K * log(2*pi) where K is the total block size, or the number of non-nan elements in the block if ignore_nan is on.
- normalization_term_fudge – An optional float. Defaults to 0.001. TODO
- ignore_nan_input – An optional bool. Defaults to False. if true, and when using L2 with normalization term compute the probability while marginalizing over elements which are nan
- out_of_bounds_value – An optional float. Defaults to 0. value to use for elements outside the bounds
- name – A name for the operation (optional).
Returns: A Tensor. Has the same type as input. A 4-D tensor of shape [batch, out_channels, out_height, out_width]


The basic unlabeled argument that parses a value. More...
#include <UnlabeledValueArg.h>
Public Member Functions | |
| UnlabeledValueArg (const std::string &name, const std::string &desc, bool req, T value, const std::string &typeDesc, bool ignoreable=false, Visitor *v=NULL) | |
| UnlabeledValueArg constructor. | |
| UnlabeledValueArg (const std::string &name, const std::string &desc, bool req, T value, const std::string &typeDesc, CmdLineInterface &parser, bool ignoreable=false, Visitor *v=NULL) | |
| UnlabeledValueArg constructor. | |
| UnlabeledValueArg (const std::string &name, const std::string &desc, bool req, T value, Constraint< T > *constraint, bool ignoreable=false, Visitor *v=NULL) | |
| UnlabeledValueArg constructor. | |
| UnlabeledValueArg (const std::string &name, const std::string &desc, bool req, T value, Constraint< T > *constraint, CmdLineInterface &parser, bool ignoreable=false, Visitor *v=NULL) | |
| UnlabeledValueArg constructor. | |
| virtual bool | processArg (int *i, std::vector< std::string > &args) |
| Handles the processing of the argument. | |
| virtual std::string | shortID (const std::string &val="val") const |
| Overrides shortID for specific behavior. | |
| virtual std::string | longID (const std::string &val="val") const |
| Overrides longID for specific behavior. | |
| virtual bool | operator== (const Arg &a) const |
| Overrides operator== for specific behavior. | |
| virtual void | addToList (std::list< Arg * > &argList) const |
| Instead of pushing to the front of list, push to the back. |
The basic unlabeled argument that parses a value.
This is a template class, which means the type T defines the type that a given object will attempt to parse when an UnlabeledValueArg is reached in the list of args that the CmdLine iterates over.
Definition at line 43 of file UnlabeledValueArg.h.
| TCLAP::UnlabeledValueArg< T >::UnlabeledValueArg | ( | const std::string & | name, | |
| const std::string & | desc, | |||
| bool | req, | |||
| T | value, | |||
| const std::string & | typeDesc, | |||
| bool | ignoreable = false , |
|||
| Visitor * | v = NULL | |||
| ) | [inline] |
UnlabeledValueArg constructor.
Constructor implemenation.
| name | - A one word name for the argument. Note that this is used for identification, not as a long flag. | |
| desc | - A description of what the argument is for or does. | |
| req | - Whether the argument is required on the command line. | |
| value | - The default value assigned to this argument if it is not present on the command line. | |
| typeDesc | - A short, human readable description of the type that this object expects. This is used in the generation of the USAGE statement. The goal is to be helpful to the end user of the program. | |
| ignoreable | - Allows you to specify that this argument can be ignored if the '--' flag is set. This defaults to false (cannot be ignored) and should generally stay that way unless you have some special need for certain arguments to be ignored. | |
| v | - Optional Vistor. You should leave this blank unless you have a very good reason. |
Definition at line 213 of file UnlabeledValueArg.h.
References TCLAP::Arg::_ignoreable, TCLAP::OptionalUnlabeledTracker::check(), and TCLAP::Arg::toString().
| TCLAP::UnlabeledValueArg< T >::UnlabeledValueArg | ( | const std::string & | name, | |
| const std::string & | desc, | |||
| bool | req, | |||
| T | value, | |||
| const std::string & | typeDesc, | |||
| CmdLineInterface & | parser, | |||
| bool | ignoreable = false , |
|||
| Visitor * | v = NULL | |||
| ) | [inline] |
UnlabeledValueArg constructor.
| name | - A one word name for the argument. Note that this is used for identification, not as a long flag. | |
| desc | - A description of what the argument is for or does. | |
| req | - Whether the argument is required on the command line. | |
| value | - The default value assigned to this argument if it is not present on the command line. | |
| typeDesc | - A short, human readable description of the type that this object expects. This is used in the generation of the USAGE statement. The goal is to be helpful to the end user of the program. | |
| parser | - A CmdLine parser object to add this Arg to | |
| ignoreable | - Allows you to specify that this argument can be ignored if the '--' flag is set. This defaults to false (cannot be ignored) and should generally stay that way unless you have some special need for certain arguments to be ignored. | |
| v | - Optional Vistor. You should leave this blank unless you have a very good reason. |
Definition at line 229 of file UnlabeledValueArg.h.
References TCLAP::Arg::_ignoreable, TCLAP::CmdLineInterface::add(), TCLAP::OptionalUnlabeledTracker::check(), and TCLAP::Arg::toString().
| TCLAP::UnlabeledValueArg< T >::UnlabeledValueArg | ( | const std::string & | name, | |
| const std::string & | desc, | |||
| bool | req, | |||
| T | value, | |||
| Constraint< T > * | constraint, | |||
| bool | ignoreable = false , |
|||
| Visitor * | v = NULL | |||
| ) | [inline] |
UnlabeledValueArg constructor.
Constructor implemenation.
| name | - A one word name for the argument. Note that this is used for identification, not as a long flag. | |
| desc | - A description of what the argument is for or does. | |
| req | - Whether the argument is required on the command line. | |
| value | - The default value assigned to this argument if it is not present on the command line. | |
| constraint | - A pointer to a Constraint object used to constrain this Arg. | |
| ignoreable | - Allows you to specify that this argument can be ignored if the '--' flag is set. This defaults to false (cannot be ignored) and should generally stay that way unless you have some special need for certain arguments to be ignored. | |
| v | - Optional Vistor. You should leave this blank unless you have a very good reason. |
Definition at line 248 of file UnlabeledValueArg.h.
References TCLAP::Arg::_ignoreable, TCLAP::OptionalUnlabeledTracker::check(), and TCLAP::Arg::toString().
| TCLAP::UnlabeledValueArg< T >::UnlabeledValueArg | ( | const std::string & | name, | |
| const std::string & | desc, | |||
| bool | req, | |||
| T | value, | |||
| Constraint< T > * | constraint, | |||
| CmdLineInterface & | parser, | |||
| bool | ignoreable = false , |
|||
| Visitor * | v = NULL | |||
| ) | [inline] |
UnlabeledValueArg constructor.
| name | - A one word name for the argument. Note that this is used for identification, not as a long flag. | |
| desc | - A description of what the argument is for or does. | |
| req | - Whether the argument is required on the command line. | |
| value | - The default value assigned to this argument if it is not present on the command line. | |
| constraint | - A pointer to a Constraint object used to constrain this Arg. | |
| parser | - A CmdLine parser object to add this Arg to | |
| ignoreable | - Allows you to specify that this argument can be ignored if the '--' flag is set. This defaults to false (cannot be ignored) and should generally stay that way unless you have some special need for certain arguments to be ignored. | |
| v | - Optional Vistor. You should leave this blank unless you have a very good reason. |
Definition at line 262 of file UnlabeledValueArg.h.
References TCLAP::Arg::_ignoreable, TCLAP::CmdLineInterface::add(), TCLAP::OptionalUnlabeledTracker::check(), and TCLAP::Arg::toString().
| void TCLAP::UnlabeledValueArg< T >::addToList | ( | std::list< Arg * > & | argList | ) | const [inline, virtual] |
Instead of pushing to the front of list, push to the back.
| argList | - The list to add this to. |
Definition at line 334 of file UnlabeledValueArg.h.
| std::string TCLAP::UnlabeledValueArg< T >::longID | ( | const std::string & | val = "val" |
) | const [inline, virtual] |
Overrides longID for specific behavior.
Overriding longID for specific output.
Reimplemented from TCLAP::ValueArg< T >.
Definition at line 311 of file UnlabeledValueArg.h.
References TCLAP::ValueArg< T >::_typeDesc.
| bool TCLAP::UnlabeledValueArg< T >::operator== | ( | const Arg & | a | ) | const [inline, virtual] |
Overrides operator== for specific behavior.
Overriding operator== for specific behavior.
Definition at line 325 of file UnlabeledValueArg.h.
References TCLAP::Arg::_description, TCLAP::Arg::_name, TCLAP::Arg::getDescription(), and TCLAP::Arg::getName().
| bool TCLAP::UnlabeledValueArg< T >::processArg | ( | int * | i, | |
| std::vector< std::string > & | args | |||
| ) | [inline, virtual] |
Handles the processing of the argument.
Implementation of processArg().
This re-implements the Arg version of this method to set the _value of the argument appropriately. Handling specific to unlabled arguments.
| i | - Pointer the the current argument in the list. | |
| args | - Mutable list of strings. |
Reimplemented from TCLAP::ValueArg< T >.
Definition at line 281 of file UnlabeledValueArg.h.
References TCLAP::Arg::_alreadySet, TCLAP::ValueArg< T >::_extractValue(), and TCLAP::Arg::_hasBlanks().
| std::string TCLAP::UnlabeledValueArg< T >::shortID | ( | const std::string & | val = "val" |
) | const [inline, virtual] |
Overrides shortID for specific behavior.
Overriding shortID for specific output.
Reimplemented from TCLAP::ValueArg< T >.
Definition at line 301 of file UnlabeledValueArg.h.
References TCLAP::ValueArg< T >::_typeDesc.


This is a 9”x12” Watercolor on Arches 140lb Cold Press 100% cotton rag circa 2014.
The Process
This piece was not so difficult to finish: finding it proceeded effortlessly and I didn’t labor too long determining the coloring. This was the first time I decided to see if I could color the lines and keep a luminous look partially because I like to experiment and see what new things I can do (which can also lead to conceptually hard to complete pieces). This is probably one of my favorite color combinations especially with the yellow: the only color you can paint and still have a lot of remaining brightness.
The Meaning
This looks like a spiritual teacher along the lines of Buddha or Jesus or Lao Tzu. Here’s the thing with this teacher: firstly they are waiting open arms to show affection for their students (such as hugs) secondly they don’t have much of an attachment to the title teacher. So they are more than happy to share their boundless knowledge with the student but they don’t care about formalities or even student/teacher roles. They are just as interested in learning everything they can from you as you might be interested in learning from them. Nothing would make them happier than if you were every bit the teacher to them as they are to you.