POPIAH - an agile journey in 8 iterations
In a recent chat a store manager shared how tedious the annual physical stock taking is, since the company doesn't provide handheld barcode scanners. Why not use your phone I replied. So after a short discussion it was agreed to build a MVP.
The geek corner of my brain went into overdrive: databases, authentication, protocols, libraries - the whole shebang. If you don't reign into that, you end up with the famous "swing design"
(shamelessly borrowed from here)
Luckily there's the agile way: add value incrementally. Our increment frequency was one improvement per 15min, tiny step by step ;-).
The result is POPIAH: Poor Operator's Personal Inventory Assessment Helper (not that one). The final (for now - pending making it pretty) result looks like this:
Step by step
Our epics (defined looking back) were:
- make scanning work
- make the screen useful
- allow using the data elsewhere
Make scanning work
First we had to pick a scanner. Initially html5-qrcode looked most promising, but performance of the sample app was a little sluggish, so we settled on Mocha Barcode. It is a native app with an embedded browser. Luckily Apple is quite specific about browsers, so we could make the asumption: if it works in Safari it will work here too.
Iteration 1
- Function: Show a simple web page with an input box for manual input and the scan button
- Value: Operator can scan in store room and take list back to office to check with inventory system
- Limitation: No saving of page, on reload entries are gone. Double scan will result in 2 lines with the same number
Iteration 2
- Function: Save entries to local storage in browser, have a clear button to reset the storage
- Value: Operator can resume and reset a scanning session
- Limitation: No further processing of entries
Iteration 3
- Function: Add a count column to display, increment the count on encounter a number again. Preserve that the last encountered number displays on top
- Value: Closer to inventory taking: show the number of items per article
- Limitation: No adjustment of scanned quantities
Iteration 4
- Function: Add a plus and minus button for the last scanned item
- Value: Operator can adjust value when seeing multiple boxes of the same item. Faster than multiple scans. Can correct uninteded double scans
- Experiments (we discarded):
- Have a number input field - keyboard gets into the way, just tapping
+
was faster. Store typically has single digits of one item, might not fit for other businesses - Have
+
and-
on each row. Very cluttered screen and risk hitting the wrong button. Easier just to scan an item again and adjust
Make the screen useful
Iteration 5
- Function: Introduce alternate row colors (Operator had a clear color preference)
- Value: Make list easier to read
Iteration 6
- Function: Add the total number of unique articles (here named: codes in accordance with shop lingo in used) and number of boxes (total quantity, "boxes" again following the shop lingo)
- Value: Operator knows the expected number from inventory system, comparison gives idea of completion
Allow using the data elsewhere
Initially we contemplated to have a database backend or a HTTP POST creating a file, but that felt like overkill. It turned out, our simple solution fitted the usecase like hand-in-glove
Iteration 7
- Function: Add a "clipboard" button on the form to copy the caputured data, without the need to select it, into the device clipboard in CSV (actually TSV) format, so it can be pasted into a spreadsheet. Tested with Apple Numbers, Google Sheets and MS-Excel
- Value: Use the captured data elsewhere, keep copies
Iteration 8
- Function: A little spreadsheet magic with the exported inventory list from the ERP and the pasted scan data:
=VLOOKUP(A2,Scans!$A$2:$B$1500,2,FALSE)
- Value: Comparison with inventory system, concluding the counting phase of the physical inventory
In conclusion
To be VERY clear: We didn't plan the sequence iterations upfront, but implemented one, tried it and then asked: how can we improve the state with the next action? Test with users and repeat.
The little exercise saves the operator hours, even days, running around and manually comparing numbers, with the error rate inherently in manual comparison. Three capuchinos took care of it. Deployed as 3 files (you keep your html, css and js separate do you?) on a static URL, no data stored server side.
Leaning back to see when the IT department implements the "thorough solution"
As always: YMMV
Posted by Stephan H Wissel on 04 March 2023 | Comments (0) | categories: Agile Development


Copyright © 2010-2014 Alexei Krasnopolski
Version: 1.2.8
Introduced in: 2010-12-21
Authors: Alexei Krasnopolski<EMAIL_ADDRESS>[web site: http://krasnopolski.org/].
| send_cmd_packet/2 | Sends binary Command to server throw Connection's Socket. |
| send_cmd_packet/3 | Sends binary Command to server throw Connection's Socket. |
| send_cmd_packet/4 | |
| send_cmd_packet_no_resp/2 | Sends binary Command to server throw Connection's Socket and is not waiting any response. |
send_cmd_packet(Connection::#connection{}, Command::binary()) -> {Metadata::#metadata{}, Result} | #mysql_error{}
Sends binary Command to server throw Connection's Socket.
See also: send_cmd_packet/4.
send_cmd_packet(Connection::#connection{}, Command::binary(), N::Control) -> {Metadata::#metadata{}, Result} | #mysql_error{}
Sends binary Command to server throw Connection's Socket.
See also: send_cmd_packet/4.
send_cmd_packet(Connection, Command, Initial_metadata, X4) -> any()
send_cmd_packet_no_resp(Connection::#connection{}, Command::binary()) -> ok | #mysql_error{}
Sends binary Command to server throw Connection's Socket and is not waiting any response.
See also: send_cmd_packet_no_resp/3.
Generated by EDoc


Happy Place
Profile
Your Score
0
Recent Activity
None so far! Go generate some good vibes.
Map
Feed
Profile
Search


You must follow the same rules as you would in a courtroom.
This means you:
- can only drink water
- must not eat
- must only use your phone for contact with the video hearings team
- must follow the judge’s instructions
- are not allowed to smoke (including e-cigarettes)
- must be alone unless you have the judge’s permission to have someone with you
- must ask the judge's permission if you need to move away from your screen


Before Change
for batch_dict in vs:
feed_dict = self.model.make_input(batch_dict)
vals = self.sess.run([self.test_loss], feed_dict=feed_dict)
lossv = vals[0]
total_loss += lossv
self.log.debug({"phase": phase, "time": time.time() - start})
avg_loss = total_loss/steps
After Change
total_toks += toks
metrics = self.calc_metrics(total_loss, total_toks)
self.report(
epochs, metrics, start,
phase, "EPOCH", reporting_fns
)
@register_training_func("seq2seq")
def fit(model, ts, vs, es=None, **kwargs):


--- layout: post title: Finding standard search paths for gcc includes date: type: post published: false status: draft categories: [] tags: [] meta: {} author: login: ajaysusarla email<EMAIL_ADDRESS>display_name: partha first_name: '' last_name: '' ---
cpp -v /dev/null -o /dev/null 2>&1 | awk '/> search starts here:/{flag=1;next}/End of search list./{flag=0}flag'


Join us any evening for refreshing elixirs, conversation and maybe a game or two of Tap Tap Revolution. Wireless access is always provided; BYOWS (Bring Your Own Web Server).


Add input to previous value of output, if rising edge of trigger port
This block has one Integer input "u", one Boolean input "trigger", an optional Boolean input "reset", an optional Integer input "set", and an Integer output "y". The optional inputs can be activated with the "use_reset" and "use_set" flags, respectively.
The input "u" is added to the previous value of the output "y" if the "trigger" port has a rising edge. At the start of the simulation "y = y_start".
If the "reset" port is enabled, then the output "y" is reset to "set" or to "y_start" (if the "set" port is not enabled), whenever the "reset" port has a rising edge.
The usage is demonstrated, e.g., in example Modelica.Blocks.Examples.IntegerNetwork1.


These are the latest cases and convictions from Blackpool Magistrates' Court - Thursday, November 21, 2019
Here is latest from Blackpool Magistrates' Court.
by Colin AinscoughMicha McDonnell, 25, drink-driving
Halloween turned into a nightmare for a woman driving home from a party in her costume.
Micha McDonnell became distracted by a group of revellers coming out of a pub and crashed into a parked people carrier while she was more than twice over the alcohol limit.
McDonnell, 25, of Newton Place, Normoss, pleaded guilty to driving with excess alcohol.
She was disqualified from driving for 20 months, fined £220 with £85 costs and ordered to pay £32 victims’ surcharge.
Prosecutor, Pam Smith, said police were called to an accident on Lytham Road, South Shore, on November 3, at about midnight, where McDonnell had collided with a parked Vauxhall Zafira in her Fiat Punto.
The Zafira was shunted into the middle of the road. McDonnell remained in her car and repeatedly apologised and asked if anyone was hurt.
A breath test showed 77 microgrammes of alcohol in her body – 35 is the limit.
Hugh Pond, defending, said his client, who had no previous convictions, had been to a Halloween party and was in a costume.
She had intended staying the night at the address where the party was held but there was a disagreement and she decided to leave.
McDonnell had committed the offence totally by mistake believing it was safe to drive.
Nicholas Caruana, 57, theft, breach of community sentence
A man targeted a supermarket for his shoplifting, Magistrates were told.
Nicholas Caruana, 57, of All Saints Road, St Annes, took high value alcohol during four visits to the Booths supermarket in Lytham.
Caruana admitted th thefts and being in breach of a community sentence.
He was ordered to pay £200 compensation to Booths by magistrates who heard that he had stolen spirits with a total value of £922.
He was also given a 16 week jail term suspended for a year. Patrick Nelligan, defending, said: “He has been out of prison for nine years and is anxious to sort himself out.”
Presiding magistrate Simon Bridge told Caruana: “You have targeted this store for high value theft.”

Liam Maxwell, aged 25, of Colmore Road, Liverpool, failed to appear for the first hearing of his case at court.
Maxwell faces four charges of supplying heroin and four charges of supplying crack cocaine between February 1 and March 7 last year at Blackpool.
Magistrates issued a warrant without bail for his arrest.
Wayne McDermott, 34, assault, drunk and disorderly
A man suddenly turned nasty during an early morning conversation about his dog “Stella” with another pedestrian.

McDermott admitted assault and being drunk and disorderly. He was ordered to pay £252 in fines and court costs.
Pam Smith,prosecuting, said: “The two men had been talking about the dog.McDermott had been drinking and he suddenly hit out at the other man.”
David Levi, 43, proceeds of crime hearing
A man has been given his American police car back by a court. Magistrates decided the liveried Dodge Charger black and white car was a “ tool of his trade”.
They ordered the imported car be given back to David Levi, 43, of Arundel Road, St Annes, by Lancashire Police who had seized it under Proceeds of Crime legislation.
The court accepted he earned a living out of hiring the car out to TV and film companies and to individuals.
However, Blackpool Magistrates refused Levi’s application to have a coat and pair of shoes returned to him.
Levi told Blackpool Magistrates:” I sell the Big Issue magazine on the streets.
“It is very cold and I need my Canada Goose coat back and my Hugo Boss shoes. The coat is warm but isn’t worth much because of the cigarette burns on it. I cannot understand why the police want it.”
The court said the police could retain the coat and shoes for a further 16 days until another Proceeds of Crime hearing is due.
However, the ruled in favour of Levi’s application that the car should not have been detained as it was his way of making a living.


BioBike FAQAll contents Copyright 2002-2012 by the BioBike Team
|
HELP! Visit the BioBike Google Group
Other questions:
What is BioBike?
What's the point of BioBike?
Why is it called BioBike?
Who invented BioBike?
Are there published papers on BioBike?
How does BioBike differ from typical online databases?
Is it hard to use?
Why Lisp?
What about those specialized Bio* languages (BioPerl, etc)?
Who paid for it?
It is Open Source? If so, under what license?
What lisps does BioBike run on?
What's the best way to get started learning BioBike?
Is there a BioBike course?
What if I want to get my own BioBike server at my own lab?
How do I get a Lisp that can run BioBike?
The BioBike system is a biology-specific programming language embedded in an integrated biological knowledge-base, all accessible through the web. In the best case, biologists themselves would be able to log into the system and write their own programs to ask novel biological questions without the help of (or with very little help from) software engineers.
More: The BioBike Vision
Q: What's the point of BioBike?
BioBike is an approach to reducing the distance between biologists and biocomputation by providing an integrated, on-line, programmable biological knowledge base. In many other scientific areas students use programmable tools to address complex questions. For example, most undergraduate engineers are trained to use matlab, a matrix-based programming language. But biologists don't have a tool of that sort, and certainly nothing like that is integrated into their training. BioBike is a sort of matlab for biological knowledge, where instead of matrices you have a knowledge base which integrates biological knowledge about particular organisms, their genomes and proteomes, and which provides tools to conveniently operate on that knowledge.More: The BioBike Vision
It used to be called "BioLingua" but someone who was using that name forced us to change it. Bikes are the most efficient means of transportation known, and there are various possible acronyms. ("Big Integrated Knowledge Environment" is a favorite.)Here's a copy of the letter that forced us to change the name.
BioBike was envisioned by Jeff Shrager and the core code was written by JP Massar. Many people subsequently contributed to it, most significantly: Mike Travers (who built the frame system and many of the knowledge access components), and Jeff Elhai.
Q: Are there published papers on BioBike?
Yes, here's a list:
Q: How does BioBike go beyond typical biological knowledegbases?
Online bioloigical data or knowledge bases (of which there are zillions!) are very useful for simple lookup sorts of work, but they typically operate in a "vending machine" model: You put in a query, and you get out an answer. If you're lucky, you can do some pre-packaged computations in the database, and maybe even do them on multiple results from a query. If that's all you need to do, great!More: The BioBike VisionBioBike is a full fledged efficent programming language embedded in an integrated knowledge base -- all totally web-accessible. This is a completely different animal than the vending-machine sort of knowledge bases you're probably used to. Instead of using web commands you use programming language constructs, and you can pass the results of one computation on to the next (like in any sort of programming languages), which allows you to combine operations. Moreover, BioBike has built-in all of the typical bioinformatic tools (Blast, Clustal, etc.) so that not only can you do your own computations in the database, but you can call upon these other tools -- all directly through the BioBike interface!
It's not trivial, like a vending machine database would be, but it's much more powerful, and we think that the power/effort ratio is worth it. You have to learn a little programming -- usually very little -- to get simple things done. The main BioBike language is called BioLisp -- it's just common lisp with a bunch of biological functionality added in. But you don't have learn Lisp (although we think you should! :-)There are several different specialized languages developed for BioBike that are there to help biologists get the most out of the system. The main one, called BBL, was developed by Jeff Elhai at Virginia Commonwealth University. BBL also has a visual programming language, called vBBL. You can see a walk-through tour of vBBL here.
Because it's the right language for the job!More: Why Lisp?
Q: What about those specialized Bio* languages (BioPerl, etc)?
BioPerl, BioJava, BioPython, etc. certainly have their place, but all they offer is a programming language with some biological functionality added in. In order to use them you have to install them, and then install databases, and then figure out how to put them all together. In BioBike we've done all that work for you, and you don't even have to have your own computer (except to run a web browser)!
Many people in various ways. NASA gave us seed funding, Franz Inc and Lispworks, Inc. loaned us Lisp licenses, most of the initial engineering was done on a volunteer basis, and much continues that way. NSF now supports some of the BioBike development, but much is still done on a volunteer basis.
Q: It is Open Source? If so, under what license?
Yes, under the "MIT" (aka. the BSD) license, which reads:;;; +=========================================================================+ ;;; | Copyright (c) 2002-2008 The BioBike Team | ;;; | | ;;; | Permission is hereby granted, free of charge, to any person obtaining | ;;; | a copy of this software and associated documentation files (the | ;;; | "Software"), to deal in the Software without restriction, including | ;;; | without limitation the rights to use, copy, modify, merge, publish, | ;;; | distribute, sublicense, and/or sell copies of the Software, and to | ;;; | permit persons to whom the Software is furnished to do so, subject to | ;;; | the following conditions: | ;;; | | ;;; | The above copyright notice and this permission notice shall be included | ;;; | in all copies or substantial portions of the Software. | ;;; | | ;;; | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ;;; | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ;;; | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ;;; | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ;;; | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ;;; | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ;;; | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ;;; +=========================================================================+
Q: What lisps does BioBike run on?
Theoretically any "compliant" implementation of Common Lisp, but we do most of our testing under Franz ACL 8.0 and LispWorks. The BioBike servers are running Franz ACL on Linux.
Q: What's the best way to get started learning BioBike?
Note: The demo server is no longer supported. Click here to connect to the new BioBike server page.First play with the BioBike demo server. There are numerous "live tutorials" that you can get to by logging into the demo server, and then using the pulldown at the bottom to go to: Help ... > Live Tutorials. This will give you a list of Live Tutorials. We suggest starting the the first one, called "A Tour of BioBike".
The online tutorials (esp. the Live ones) are a good start, but they aren't really a lesson plan. Jeff Elhai (of Virgnia Commonwealth University) and Jeff Shrager (of The Carnegie Inst. and Stanford) both teach BioBike courses and have a lot of course materials, but most of it eventually goes online, either in the BioBike static docs, or in the Live Tutorials.
Q: What if I want to get my own BioBike server at my own lab?
First, think twice about whether you really need this? Can you use our demo server or the Cyano sever for your work? If we don't have your favorite genome on a server, ask us (via the BioBike Google Group) and we may be able to put it up for you on either the demo server, or one a private server. If you really really want to try to bring up your own BioBike server, you have to get a Lisp platform (see below), and then download the sources and install it. There is documentation in the core system documentation to help you do this.It takes some effort to setup and support a BioBike server -- esp. with complex systems of biological data, knowledge, and tools. You need to be knowledgeable about Lisp, Linux, and biocomputing tools. This is a big part of the reason that we developed BioBike as a client-server system in the first place; we had in mind that a whole community of interest in a particular organism or class of organisms would buy one server and one Lisp license and pay for one person's time to support it for the whole community. In our case it was the cyanobacterial community, which is why the main BioBike server contains cyanobacterial models.
The community might even put in a small grant proposal to build themselves a BioBike server, or add it on as a small cost to their already probably pretty big genome database grants. Those costs and effort are then amortized over the whole user community. And more importantly, someone else gets to do the dirty work of integrating the data and supporting the server. When every lab has to do their own software setup it can be painful and expensive, but BioBike lets you amortize the cost and effort over a whole community of users.
If you're interested in putting together a proposal to develop a BioBike server for your community, Jeff Shrager would be more than happy to help you project your costs.
Q: How do I get a Lisp that can run BioBike?
The best way is to buy it from Franz, Inc. If you're an academic or non-profit, we can usually get you a good deal on a BioBike specific license. Contact Jeff Shrager for more information on this. The cost is currently something like $1250 for the first year, and ~1/2 of that for each continuing year of the license.subQ: Isn't a thousand bucks a little steep for a programming language platform? Why didn't you use a free Lisp?
First off, it's only a thousand dollars the first year, and it's not unreasonable compared to how much you pay for computers, HPLC machines, lab materials, and books. We chose to use a commercial Lisp engine because it is well supported and does what we need it to do. No freeware Lisp platforms are as well supported as the for-profit Lisps, and none do what we need them to do in all situations. (And when ACL doesn't do what we need it to do, we complain and they fix it!)However, theoretically any compliant implementation of Common Lisp will run the BioBike basics, but possibly not some of the detailed multi-tasking code, which is ACL-dependent. (There's no CL standard for these sorts of things.) If you want to try to port BioBike to a free Lisp, we'll work with you to do that. Someone actully ported most of BioBike to SBCL once, and there's still some conditional compilation code left in the system. We're happy for you to try to do this, and we'll help you as much as we can. Also, we'll be happy to patch back your work into the code as conditional compiles.


[vdriver] multi-image data structures, PIX packager (command line conversion tool), loader.
If issue persists, submit code the Codeplay earliest possible date.
[vdriver] 16/32-bit Recolorize Blt (single color to any RGB). For use by font system in future.
Set up new CVS project for game
Week 2 - Sept 4-10, 2000
Game timing
[Sprite] Sprite objects - position, pointer to images, animation index, etc. Collision checking between two sprites.
[KeyStick] Finish up - Keyboard/Joystick with button mappings
[Gameplay] Playing field and falling piece data structures [remember, 2 players: arrays]


Chapter 14 – DAUGHTER, SHELLIE ANN BROWNING
Shellie Ann was born on June 21, 1967. She was a beautiful, delightful, contented baby. She never cried unless she was hungry or couldn't see me or Ken. As long as we stayed in the same room with her, where she could see one or the other of us, she was happy. If we left the room, she would cry.  Sandi had been an only child for over five years so we were concerned she might be jealous of the baby so we bought her a cute little doll. She loved the doll, but wasn't jealous. She loved Shellie and was a cute, helpful big sister.


The goal of the fire department performance score is to assess how well a fire department performs compared to the "standardized" version of itself. One component of this metric is the structure fire spread category from the National Fire Incident Reporting System (NFIRS). This category provides information which quantifies the fire spread in a structure from confined to object of origin through spread beyond structure of origin. There are five categories defined in NFIRS, but for this analysis the data are collapsed into three categories: room of origin (lumping object and room together), floor of origin (lumping floor and structure together), and beyond structure of origin. The resulting distribution (count of fires in each of the three bins) of fire spread is the basis for comparison for developing the performance score.
The second component of this score is the model that defines how the fire department would perform if it were acting as a standard, idealized version of itself. The concept is that there exists a theoretical version of every fire department where all responses meet or exceed the national standards governing department performance.  For purposes of this model these tasks are broken up as follows:
When water is put onto a fire, the idealized fire is assumed to have reached the peak size. The growth time for the fire is equivalent to the sum of the tasks the fire department must perform to suppress the fire. This time to suppression is coupled to a simple exponential area damage growth model which is consistent with fire statistics literature. A distribution of fire spread is generated using the same three NFIRS bins discussed above, based on the modeled area of fire damage at the suppression time. Distributions of the room and building sizes are estimated from the American Housing Survey's (AHS) national survey of residential homes. Where available, it is possible to use the AHS metropolitan statistical areas to refine room and building distributions for larger metropolitan areas.
FireCARES developed the metric, the fire department performance score, to aid in quantifying fire department performance. The concept is that there exists an average time correction for all fire department structure fire responses routed through the idealized fire department model that ``corrects'' the fire damage outcomes expected from national standards to the particular outcomes observed by a given fire department. This average correction time is known as the fire department performance score.


Preparation time
30 mins to 1 hour
Cooking time
10 to 30 mins
Serves
Serves 4
For the chips, peel the spuds, then slice on a mandoline at its thinnest setting, or hand cut very finely.
Place the potato slices into cold water and leave for 30 minutes (this will break down the starch and help them to crisp up during cooking).
Heat the oil in a deep, heavy-bottomed frying pan until a breadcrumb sizzles and turns brown when dropped into it. (CAUTION: hot oil can be dangerous. Do not leave unattended.)
Pat the potato slices dry with kitchen paper and add to the hot oil in batches to deep-fry for 2-3 minutes, or until crisp and golden.
Carefully remove the cooked chips from the oil with a slotted spoon, drain on kitchen paper and sprinkle with a little salt.
For the fish, make a batter by whisking the egg whites in a bowl until stiff peaks form when the whisk is removed.
Beat the egg yolks and the flour together to combine, then add the water, coconut and chopped herbs.
Add the beaten egg whites and gently fold into the batter.
Season the whiting fillets with salt and freshly ground black pepper and add a squeeze of lemon juice to each.
Dredge the whiting in flour, shaking off any excess, then dip the floured fillets into in batter to coat completely.
Carefully place the battered whiting fillets into the hot oil and deep-fry for eight minutes, or until crisp, golden and cooked through.
For the tartare sauce, mix the mayonnaise, capers, gherkins, horseradish sauce and parsley together in a clean bowl, then season, to taste, with salt and freshly ground black pepper.
To serve, place a piece of battered fish onto each of four plates. Place a large spoonful of chips alongside and a dollop of tartare sauce beside.


A new reduced-rank LDA method which works for high dimensional multi-class data.
| Version: | 1.0 |
| Depends: | R (≥ 3.1.1), MASS |
| Published: | 2015-11-07 |
| Author: | Yue S. Niu, Ning Hao, and Bin Dong |
| Maintainer: | Ning Hao <nhao at math.arizona.edu> |
| License: | GPL-2 |
| NeedsCompilation: | no |
| CRAN checks: | SPCALDA results |
| Reference manual: | SPCALDA.pdf |
| Package source: | SPCALDA_1.0.tar.gz |
| Windows binaries: | r-devel: SPCALDA_1.0.zip, r-release: SPCALDA_1.0.zip, r-oldrel: SPCALDA_1.0.zip |
| OS X binaries: | r-release: SPCALDA_1.0.tgz, r-oldrel: SPCALDA_1.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=SPCALDA to link to this page.


Calorie Calculator & Meal Plan Generator
A calorie calculator and meal plan generator, developed with JavaScript, HTML & Foundation CSS.
Utilizing various API's, by Matthew Kerr, Tyler Morgan & Melvin Emmanuelli.


Change. changes the by-layer attributes of the layer
Select target, and
Edit the Pen, and Line attributes on screen, and
Choose Change command button.
Layers is redrawn in new Pen and Line.


decisiorama.pda package¶
Submodules¶
decisiorama.pda.aggregate module¶
Aggregate Module
This module contains a collection of functions for utility aggregation.
-
decisiorama.pda.aggregate.
OFFSET
= 1e-06¶
-
decisiorama.pda.aggregate.
additive
(utils, w, w_norm=True, *args, **kwargs)¶ Additive utility aggregation function
Aggregate preferences using a weighted average
- Parameters
utils (ndarray [n, u]) – Two-dimensional array with the provided utilities to aggregate. The dimensions corresponds to the number of random samples (n) and the number of utilities (u)
w (ndarray [u], [n, u]) –
Array with the provided weights to each of the utilities. If passed as a 1D-array, the same weights are used for of all the random samples.
In case it is a 2D-array, w requires the same dimensions as utils
w_norm (Bool, optional) – If True, the sum of the weights will be equal to 1
- Returns
out – Vector with the aggregated values
- Return type
ndarray [n]
Example
utils = np.array([0.0, 1.0]) w = np.array([0.8, 0.2]) print(additive(s,w)) >>> [0.2] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([0.8, 0.2]) print(additive(s,w)) >>> [0.2 0.8 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) print(additive(s,w)) >>> [0.2 0.8 0.5]
-
decisiorama.pda.aggregate.
bonferroni
(utils, w=None, w_norm=False)¶
-
decisiorama.pda.aggregate.
choquet
(utils, w=None, w_norm=False)¶
-
decisiorama.pda.aggregate.
cobb_douglas
(utils, w, w_norm=True, *args, **kwargs)¶ Cobb-Douglas utility aggregation function
Aggregate preferences using the cobb-douglas aggregation function. This method is also known as the weighted geometric average
- Parameters
utils (ndarray [n, u]) – Two-dimensional array with the provided utilities to aggregate. The dimensions corresponds to the number of random samples (n) and the number of utilities (u)
w (ndarray [u], [n, u]) –
Array with the provided weights to each of the utilities. If passed as a 1D-array, the same weights are used for of all the random samples.
In case it is a 2D-array, w requires the same dimensions as utils
w_norm (Bool, optional) – If True, the sum of the weights will be equal to 1
- Returns
out – Vector with the aggregated values
- Return type
ndarray [n]
Example
utils = np.array([0.0, 1.0]) w = np.array([0.8, 0.2]) print(cobb_douglas(utils, w)) >>> [0.] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([0.8, 0.2]) print(cobb_douglas(utils, w)) >>> [0. 0. 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) print(cobb_douglas(utils, w)) >>> [0. 0. 0.5]
-
decisiorama.pda.aggregate.
harmonic
(utils, w, w_norm=True, rerange=False, *args, **kwargs)¶ Harmonic utility aggregation function
Aggregate preferences using the reverse power aggregation function.
- Parameters
utils (ndarray [n, u]) – Two-dimensional array with the provided utilities to aggregate. The dimensions corresponds to the number of random samples (n) and the number of utilities (u)
w (ndarray [u], [n, u]) – Array with the provided weights to each of the utilities. If passed as a 1D-array, the same weights are used for of all the random samples. In case it is a 2D-array, w requires the same dimensions as utils
w_norm (Bool, optional) – If True, the sum of the weights will be equal to 1
rerange (Bool, optional) – Changes the range of utils to be in the open interval (0,1), defined by the offset value (defined at a library level as OFFSET, 1e-6). By default is set to False.
- Returns
out – Vector with the aggregated values
- Return type
ndarray [n]
Example
utils = np.array([0.0, 1.0]) w = np.array([0.8, 0.2]) print(harmonic(utils, w, rerange=True)) >>> [1.24999969e-06] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([0.8, 0.2]) print(harmonic(utils, w, rerange=True)) >>>[1.24999969e-06 4.99998000e-06 5.00000000e-01] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) print(harmonic(utils, w, rerange=True)) >>>[1.24999969e-06 4.99998000e-06 5.00000000e-01] utils = np.array([0.0, 1.0]) w = np.array([0.8, 0.2]) print(harmonic(utils, w, rerange=False)) >>> [0.] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([0.8, 0.2]) print(harmonic(utils, w, rerange=False)) >>> [0. 0. 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) print(harmonic(utils, w, rerange=False)) >>> [0. 0. 0.5]
-
decisiorama.pda.aggregate.
maximum
(utils, *args, **kwargs)¶ Maximum utility aggregation function
Aggregate preferences using the maximum aggregation function.
- Parameters
utils (ndarray [n, u]) – Two-dimensional array with the provided utilities to aggregate. The dimensions corresponds to the number of random samples (n) and the number of utilities (u)
- Returns
out – Vector with the aggregated values
- Return type
ndarray [n]
Example
utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) print(maximum(utils)) >>> [1. 1. 0.5]
-
decisiorama.pda.aggregate.
minimum
(utils, *args, **kwargs)¶ Minimum utility aggregation function
Aggregate preferences using the minimum aggregation function.
- Parameters
utils (ndarray [n, u]) – Two-dimensional array with the provided utilities to aggregate. The dimensions corresponds to the number of random samples (n) and the number of utilities (u)
- Returns
out – Vector with the aggregated values
- Return type
ndarray [n]
Example
utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) print(minimum(utils)) >>> [0. 0. 0.5]
-
decisiorama.pda.aggregate.
mix
(utils, w, methods, w_methods, mix_fun, w_norm=True, methods_args=None, mix_args=None, *args, **kwargs)¶ mixed utility aggregation function
Aggregate preferences using a mix of aggregation functions.
- Parameters
utils (ndarray [n, u]) – Two-dimensional array with the provided utilities to aggregate. The dimensions corresponds to the number of random samples (n) and the number of utilities (u)
w (ndarray [u], [n, u]) – Array with the provided weights to each of the utilities. If passed as a 1D-array, the same weights are used for of all the random samples. In case it is a 2D-array, w requires the same dimensions as utils
methods (list [m]) – a list of functions that will create each individual member of the model mixture
w_methods (ndarray [m], [n, m]) – An array for the weights that will be used to mix each of the methods
mix_fun (function) – Function that will be used to aggregate each of the members of the methods
w_norm (Bool, optional) – If True, the sum of the weights will be equal to 1
- Returns
out – Vector with the aggregated values
- Return type
ndarray [n]
Example
utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) methods = [cobb_douglas, additive,] w_methods = np.array([0.5, 0.5]) mix_fun = additive print(mix(utils, w, methods, w_methods, mix_fun)) >>> [0.1 0.4 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) methods = [cobb_douglas, split_power,] methods_args = [{}, dict(alpha = 1.0, s = 1.0)] w_methods = np.array([0.5, 0.5]) mix_fun = additive print(mix(utils, w, methods, w_methods, mix_fun, methods_args=methods_args)) >>> [0.1 0.4 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) methods = [cobb_douglas, additive,] mix_args = dict(alpha = 1.0, s = 1.0) w_methods = np.array([0.5, 0.5]) mix_fun = split_power print(mix(utils, w, methods, w_methods, mix_fun, mix_args=mix_args)) #>>> [0.1 0.4 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) methods = [cobb_douglas, additive,] mix_args = dict(alpha = 1.0, s = 1.0) w_methods = np.array([[0.5, 0.5], [0.5, 0.5], [0.5, 0.5]]) mix_fun = split_power print(mix(utils, w, methods, w_methods, mix_fun, mix_args=mix_args)) >>> [0.1 0.4 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) methods = [cobb_douglas, additive,] mix_args = dict(alpha = np.array([1.0, 1.0, 1.0]), s = 1.0) w_methods = np.array([[0.5, 0.5], [0.5, 0.5], [0.5, 0.5]]) mix_fun = split_power print(mix(utils, w, methods, w_methods, mix_fun, mix_args=mix_args)) >>> [0.1 0.4 0.5]
-
decisiorama.pda.aggregate.
mix_linear_cobb
(utils, w, pars=[0.5], w_norm=True, *args, **kwargs)¶ to be deprecated
-
decisiorama.pda.aggregate.
multiplicative
(utils, w, w_norm=True, *args, **kwargs)¶
-
decisiorama.pda.aggregate.
power
(utils, w=None, w_norm=False)¶
-
decisiorama.pda.aggregate.
reverse_harmonic
(utils, w, w_norm=True, *args, **kwargs)¶ Reverse harmonic utility aggregation function
Aggregate preferences using the cobb-douglas aggregation function. This method is also known as the weighted geometric average
- Parameters
utils (ndarray [n, u]) – Two-dimensional array with the provided utilities to aggregate. The dimensions corresponds to the number of random samples (n) and the number of utilities (u)
w (ndarray [u], [n, u]) –
Array with the provided weights to each of the utilities. If passed as a 1D-array, the same weights are used for of all the random samples.
In case it is a 2D-array, w requires the same dimensions as utils
w_norm (Bool, optional) – If True, the sum of the weights will be equal to 1
- Returns
out – Vector with the aggregated values
- Return type
ndarray [n]
Example
utils = np.array([0.0, 1.0]) w = np.array([0.8, 0.2]) print(reverse_harmonic(utils, w)) >>> [1.] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([0.8, 0.2]) print(reverse_harmonic(utils, w)) >>> [1. 1. 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) print(reverse_harmonic(utils, w)) >>> [1. 1. 0.5]
-
decisiorama.pda.aggregate.
reverse_power
(utils, w, alpha, w_norm=True, *args, **kwargs)¶ Reverse power utility aggregation function
Aggregate preferences using the reverse power aggregation function.
- Parameters
utils (ndarray [n, u]) – Two-dimensional array with the provided utilities to aggregate. The dimensions corresponds to the number of random samples (n) and the number of utilities (u)
w (ndarray [u], [n, u]) – Array with the provided weights to each of the utilities. If passed as a 1D-array, the same weights are used for of all the random samples. In case it is a 2D-array, w requires the same dimensions as utils
w_norm (Bool, optional, default True) – If True, the sum of the weights will be equal to 1
alpha (float, ndarray [n], default 1.0) – power coefficient. If passed as a float, the values will remain the same over the whole computation. Otherwise, it is possible to pass a vector with a value for each random sample
- Returns
out – Vector with the aggregated values
- Return type
ndarray [n]
Example
utils = np.array([0.0, 1.0]) w = np.array([0.8, 0.2]) alpha = 1.0 print(reverse_power(utils, w, alpha)) >>> [0.2] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([0.8, 0.2]) alpha = np.array([1.0, 1.0, 1.0]) print(reverse_power(utils, w, alpha)) >>> [0.2 0.8 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) alpha = np.array([1.0, 1.0,1.0]) print(reverse_power(utils, w, alpha)) >>> [0.2 0.8 0.5]
-
decisiorama.pda.aggregate.
split_power
(utils, w, alpha, s, w_norm=True, *args, **kwargs)¶ Split power utility aggregation function
Aggregate preferences using the split power aggregation function.
- Parameters
utils (ndarray [n, u]) – Two-dimensional array with the provided utilities to aggregate. The dimensions corresponds to the number of random samples (n) and the number of utilities (u)
w (ndarray [u], [n, u]) – Array with the provided weights to each of the utilities. If passed as a 1D-array, the same weights are used for of all the random samples. In case it is a 2D-array, w requires the same dimensions as utils
alpha (float, ndarray[n]) – Alpha parameter of the power function. In case a float value is used, it will be constant for all of the random samples
s (float, ndarray[n]) – s parameter of the power function. In case a float value is used, it will be constant for all of the random samples
w_norm (Bool, optional) – If True, the sum of the weights will be equal to 1
- Returns
out – Vector with the aggregated values
- Return type
ndarray [n]
Example
utils = np.array([0.0, 1.0]) w = np.array([0.8, 0.2]) alpha = 1.0 s = 1.0 print(split_power(utils, w, alpha, s)) >>> [0.2] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([0.8, 0.2]) alpha = np.array([1.0, 1.0, 1.0]) s = 1.0 print(split_power(utils, w, alpha, s)) >>> [0.2 0.8 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) alpha = np.array([1.0, 1.0, 1.0]) s = np.array([1.0, 1.0, 1.0]) print(split_power(utils, w, alpha, s)) >>> [0.2 0.8 0.5] utils = np.array([[0.0, 1.0], [1.0, 0.0], [0.5, 0.5]]) w = np.array([[0.8, 0.2], [0.8, 0.2], [0.8, 0.2]]) alpha = 1.0 s = np.array([1.0, 1.0, 1.0]) print(split_power(utils, w, alpha, s)) >>> [0.2 0.8 0.5]
-
decisiorama.pda.aggregate.
sugeno
(utils, w=None, w_norm=False)¶
decisiorama.pda.preference module¶
Preference Module
This module contains classes for building up hierarchical aggregation problems. Two main classes are present Objective and Evaluator. The Objective class is used to construct all of the nodes in the hierarchy problem, while the tree is constructed by defining the childs of each node. The Evaluator class creates an object that is used for the post-processing of the results coming from solving the hierarchical aggregation problem.
-
class
decisiorama.pda.preference.
Evaluator
(portfolio, utils, labels=None)¶ Bases:
object
Function to post process the results of the problem
The results of the aggregation (or individual utilities) will be post processed here. This object may contain methods to rank the solutions, assess the performance and do sensitivity analysis
-
add_function
(function, minimize=True)¶ add an objective function for evaluating the solutions
- Parameters
function (func) – function to process the a 2D vector containing the stochastic utilities for each portfolio
minimize (Bool) – Determines if the function is to be minimised. If False, it means the function will be maximised. Default is True.
-
get_core_index
(i=0)¶ Get core index for weakly ranked solutions up to level i
- Parameters
i (int) – Pareto front index up to which the core index will be retrieved. A value of 0 indicates the core index for the formal pareto front.
- Returns
out – Array with the core index for each weak pareto front
- Return type
ndarray
-
get_pareto_solutions
()¶ Get the pareto solutions
-
get_weak_pareto_solutions
(i=0)¶ Get weakly ranked solutions up to level i
- Parameters
i (int) – Pareto front index up to which the pareto solutions will be retrieved. A value of 0 indicates the formal pareto front.
- Returns
out – Array with the pareto solutions for each pareto front
- Return type
ndarray
-
remove_function
(i)¶ Method to remove an objective function
This method is used to remove an objective function from the objective function pool
- Parameters
i (int) – Index of the objective functions
-
-
class
decisiorama.pda.preference.
Objective
(name, w, alternatives, obj_min, obj_max, n=100, utility_func=<function exponential>, utility_pars=0.0, aggregation_func=<function additive>, aggregation_pars=[0.5], maximise=True)¶ Bases:
object
Class to create a node in the hierarchy tree
This is the base class for structuring each of the nodes for the hierarchical aggregation. In the hierarchy, all of the nodes are instances of the Objective class.
-
add_children
(children)¶ This is the method to add children nodes
This method is used to create a child node in the hierarchy tree
- Parameters
children (objective) – An instance of the Objective node is passed.
-
get_value
(x)¶ get the attribute utlity based on the portfolio of actions
This function is used to calculate the value of the attribute (objective), for a given portfolio. If it is a leaf node, the values must be provided to the object, otherwise it is calculated from the hierarchical aggregation.
- Parameters
x (1D array) – A binary vector that represent the portfolio of actions. 1 for done, and 0 for no action
- Returns
out – Utility value of the attributes
- Return type
ndarray
-
-
decisiorama.pda.preference.
hierarchy_smith
(h_map, prob)¶ Function to creeate a hierarchy in the problem object
This function heps in building the hierarchies, by helping in the definition of child nodes. This can also be done manually for each objective
- Parameters
h_map (dict) – Dictionary containing the child nodes. The key of the dictionary has to be the parent node. The keys in the maps have to be consistent with the keys used in the problem (prob) definition.
prob (dict) – Dictionary containing all of the nodes. This will be mutated as a result of this operation
decisiorama.pda.ranker module¶
Ranker Module
This module contains functions to rank the results of utilities. This can be used as a part of the multi-criterai decision analysis, or over the results of the hierarchical aggregation.
-
decisiorama.pda.ranker.
cov
(sols)¶ Calculate the coefficient of variation of the utilities
This functions calculate the coefficient of variation of the distributions.
- Parameters
sols (ndarray [p, n]) – 2D array containing the utility values for all of the portfolios [p], and all of the random samples [n]
- Returns
cov – 1D array containing all of the coefficient of variation utility value for each portfolio
- Return type
ndarray [p]
-
decisiorama.pda.ranker.
iqr
(sols, lq=0.25, uq=0.75)¶ Calculate the interquantile range
The interquantile range (iqr) is the distance between a lower and upper quantile. Larger iqr denote larger spread of the PDF of the vector
- Parameters
sols (ndarray [p, n]) – 2D array containing the utility values for all of the portfolios [p], and all of the random samples [n]
lq (float) – Value containing the lower end of the iqr. Cannot be smaller than 0
uq (float) – Value containing the upper end of the iqr. Cannot be larger than 1
- Returns
iqr – 1D array containing all of the utility iqr value for each portfolio
- Return type
ndarray [p]
-
decisiorama.pda.ranker.
mean
(sols)¶ Calculate the mean of the utilities
This functions calculate the mean of the distributions. It is simply a np.average over the first axis.
- Parameters
sols (ndarray [p, n]) – 2D array containing the utility values for all of the portfolios [p], and all of the random samples [n]
- Returns
mean – 1D array containing all of the mean utility value for each portfolio
- Return type
ndarray [p]
-
decisiorama.pda.ranker.
std
(sols)¶ Calculate the standard deviation of the utilities
This functions calculate the standard deviation of the distributions. It is simply a np.std over the first axis
- Parameters
sols (ndarray [p, n]) – 2D array containing the utility values for all of the portfolios [p], and all of the random samples [n]
- Returns
std – 1D array containing all of the mean utility value for each portfolio
- Return type
ndarray [p]
decisiorama.pda.utility module¶
Utility Module
This module contains utility functions. Current implementation only has the exponential utility function.
-
decisiorama.pda.utility.
exponential
(v, r, *args, **kwargs)¶ Calculates the exponential utility function
- Parameters
v (float, ndarray) – Array containing the normalised values
r (float, ndarray) – Exponent parameter
returns –
out (ndarray) – Utility values
Note
This is executed as a vectorized function


--- layout: default # TODO(jez) Change title and description title: A Tech Blog by Jake Zimmerman description: "A tech blog by Jake Zimmerman. Updates occasionally with tips, tricks, and hacks that have helped me out." # TODO(jez) What are these categories? categories: [Jekyll, theme, themes, responsive, blog, modern, tech, hacks] # TODO(jez) Better keywords...? keywords: Jekyll theme themes responsive blog modern tech hacks --- {% assign index = true %} {% unless paginator.previous_page %} {% for post in site.pinned %}


[gecode-users] Possible Bug - Increase IntVars Range and Gecode Stalls
Navid Mohaghegh
navid at navid.ca
Thu Mar 20 13:42:32 CET 2014
Hi All,
Thank you Christian for trying and all your effort.
Everyone else, I disagree with Christian and thin1k this is directly Gecode related. Gecode will keep searching when the answer to the solution is just given and provided in its COST variable. There is something wrong with Gecode there. Could you have a look?
Thank you,
Navid
On Mar 20, 2014, at 5:31 AM, Christian Schulte <cschulte at kth.se> wrote:
> Hi,
>
> I can’t really help you here. This is nothing that has to do with Gecode but how your problem is modeled.
>
> This mailing list is really specific to Gecode and not general modeling with constraint programming.
>
> I am sorry
> Christian
>
> --
> Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/
>
>
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Navid Mohaghegh
> Sent: Wednesday, March 19, 2014 8:45 PM
> To: cschulte at kth.se
> Cc: users at gecode.org
> Subject: Re: [gecode-users] Possible Bug - Increase IntVars Range and Gecode Stalls
>
> Hi Christian,
>
> I am still struggling. I am not doing anything much different from perfect square example and Gist shows still searching.
>
> I post bunch fully solvable constraints. I even try to hint gecode about the answer via COST variable (e.g. imagine that x0 should be solved to 100 and I post cost == (x0 - 100) * (x0-100) ...). However on large values, gist shows still searching while the answers are just given in the cost function!!
>
> Could you kindly shed some light that why gecode is still searching while the answers are just given to it via cost (only for large values this happens).
>
> Thank you,
> Navid
>
>
> On Feb 17, 2014, at 10:05 AM, Christian Schulte <cschulte at kth.se> wrote:
>
>
> Note that they are doing two different things: nooverlap guarantees that the rectangles do not overlap. What you have copied beloew enforces as a redundant constraint that the square is perfect, that is all the rectangles cover the outer rectangle.
>
> Best
> Christian
>
> --
> Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/
>
> From: Navid Mohaghegh [mailto:navid at navid.ca]
> Sent: Monday, February 17, 2014 4:03 PM
> To: cschulte at kth.se
> Cc: users at gecode.org
> Subject: Re: [gecode-users] Possible Bug - Increase IntVars Range and Gecode Stalls
>
> Hi Christian,
>
> Thank you for your reply.
>
> Yes, I did look at the Gecode example. Here is where I am referring in gecode perfect squares example:
> switch (opt.propagation()) {
> case PROP_REIFIED:
> {
> for (int cx=0; cx<w; cx++) {
> BoolVarArgs bx(*this,n,0,1);
> for (int i=0; i<n; i++)
> dom(*this, x[i], cx-s[i]+1, cx, bx[i]);
> linear(*this, sa, bx, IRT_EQ, w);
> }
> for (int cy=0; cy<w; cy++) {
> BoolVarArgs by(*this,n,0,1);
> for (int i=0; i<n; i++)
> dom(*this, y[i], cy-s[i]+1, cy, by[i]);
> linear(*this, sa, by, IRT_EQ, w);
> }
> }
> break;
>
>
> Please note that I am using nooverlap as well. And the only thing I don't have is "switch (opt.propagation())" ...
>
> Thank you,
> Navid
>
>
> On Feb 17, 2014, at 9:57 AM, Christian Schulte <cschulte at kth.se> wrote:
>
>
>
> Hi,
>
> The Gecode example does not use a special propagator, have you been looking at the example that is _included_ in Gecode?
>
> Best
> Christian
>
> --
> Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/
>
> From: Navid Mohaghegh [mailto:navid at navid.ca]
> Sent: Friday, February 14, 2014 3:25 PM
> To: cschulte at kth.se
> Cc: users at gecode.org
> Subject: Re: [gecode-users] Possible Bug - Increase IntVars Range and Gecode Stalls
>
> Hi Christian,
>
> Thank you for your reply.
>
> I didn't use the word Stall properly. Sorry ... What I mean is that Gecode will get keep searching forever! I am wondering if there is anything can be improved in search strategy. Please note that for values less than 1200 we get instant solution and as soon as we increase the range by 1, then suddenly Gecode will keep searching forever (I left the computer on for 5 days!).
>
> I studied the example for perfect square. The only difference between my code and perfect square code is that I am not using custom made propagator. Should I start doing that? And could you kindly point me for more reading on propagator topic (I am still reading MPG chapter 22)?
>
> Thank you,
> Navid
>
>
> On Jan 20, 2014, at 3:29 PM, Christian Schulte <cschulte at kth.se> wrote:
>
>
>
>
> What does stall mean, again? Is it still searching (you can observe that in Gist), that is making progress? Or is it dead.
>
> To improve your model, check the perfect square example that comes with Gecode and/or search for square packing on Helmut Simonis’ webpage: http://4c.ucc.ie/~hsimonis/
>
> Christian
>
>
> --
> Christian Schulte, www.ict.kth.se/~cschulte
>
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Navid Mohaghegh
> Sent: Thursday, January 16, 2014 09:23 PM
> To: cschulte at kth.se; users at gecode.org
> Subject: Re: [gecode-users] Possible Bug - Increase IntVars Range and Gecode Stalls
>
> Hi Christian,
>
> Thank you for your reply.
>
> I originally didn't use that as I didn't want to add another set of variables for finishing corner of rectangles (Gecode nooverlap API has a simple version that use fixed int width and int height).
>
> Per your suggestion, I added two array variables for finishing corner that I can employ the nooverlap API:
> -defined integer array variables for starting point of rectangles (e.g. top left corner): I called it vxs and vys (e.g. X0 and Y0 in Gecode MPG manual)
> -defined integer array variables for width and height of rectangles: I called it vw and vh (e.g. W and H in Gecode MPG manual)
> -defined integer array variables for finishing point of rectangles (e.g. lower right corner): I called it vxf and vyf (e.g. X1 and Y1 in Gecode MPG manual)
> -I removed all manual non-overllaping contraint that I manually added myself and add the following:
>
> //starting point width and hight will give us the finishing point
> for (i =0 ; i < this->n_vars; i++)
> {
> rel(*this, ( (vxs[i] + vw[i] == vxf[i]) && (vys[i] + vh[i] == vyf[i]) ) );
> }
> //add nooverlap for all rectangles
> nooverlap(*this, vxs,vw,vxf, vys,vh,vyf);
>
>
> My code gets solved for lower ranges of X vars (e.g. vxs < 1000 and vxf<1200) and the moment I change the x range to values greater than 1500 gecode stalls.
>
> I appreciate your feedback.
>
> Thank you,
> Navid
>
>
> On Jan 16, 2014, at 10:33 AM, Christian Schulte <cschulte at kth.se> wrote:
>
>
>
>
>
> Hi,
>
> Just very quick: did you look at the nooverlap constraint in Gecode?
>
> Cheers
> Christian
>
> --
> Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/
>
> From: Navid Mohaghegh [mailto:navid at navid.ca]
> Sent: Thursday, January 16, 2014 3:32 PM
> To: users at gecode.org
> Cc: cschulte at kth.se
> Subject: Re: [gecode-users] Possible Bug - Increase IntVars Range and Gecode Stalls
>
> Hi everyone,
>
> I tried Gist as Christian mentioned. Gist will not terminate for higher ranges (attached screenshot shows that I had to stop Gist manually for range 1535).
>
> Could you please point me in the right direction about what I have to more efficient for this problem:
> -Like bin-packing problem, we have bunch of rectangles that shouldn't overlap with each other.
> -Unlike bin-packing, the width and hight of the rectangles can be variable (e.g. if we have more space in our sheet, we don't mind a rectangle gets bigger).
> -We have bunch of constraint for the size and location of rectangles.
> -In below, 15 rectangles, 4 array of variables (2 arrays for X,Y location and 2 variables for Width,Height which is for size)
>
>
> Could you please let me know?
>
> Thank you,
> Navid
> <image001.png>
>
> On Jan 14, 2014, at 11:42 AM, Christian Schulte <cschulte at kth.se> wrote:
>
>
>
>
>
>
> The bug you refer to has been fixed. But try Gist, there you can see what happens.
>
> Cheers
> Christian
>
> --
> Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/
>
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Navid Mohaghegh
> Sent: Tuesday, January 14, 2014 5:39 PM
> To: cschulte at kth.se
> Cc: users at gecode.org
> Subject: Re: [gecode-users] Possible Bug - Increase IntVars Range and Gecode Stalls
>
> Hi Christian,
>
> Thank your for your reply. I didn't try Gist yet, I will go and look at sample code to learn Gist and I will give it a shot.
>
> Could you kindly have a look at this comment in mailing list: "There seems to be a trivial bug in INT_VALUES_MAX: SEL_VALUES_MIN is used instead of SEL_VALUES_MAX. The attached patch fixes it."
> I am asking this as mu space get solved by Gecode almost instantly (less than 1ms on a 128 GB ram, quad CPU, 64 cores workstation) for values like 1199. And the moment it goes to 1200 it will stalls. After all it should get slow (I agree with you), but not stall/freeze for 5 days. That is the main reason I suspect a tiny bug somewhere.
>
> I will also look at Gist as well as you instructed.
>
> Thank you,
> Navid
>
>
> On Jan 14, 2014, at 11:18 AM, Christian Schulte <cschulte at kth.se> wrote:
>
>
>
>
>
>
>
> Did you try it in Gist to see how large the search trees get or whether Gecode just hangs?
>
> After all, you exponentially increase the search space!
>
> Christian
>
> --
> Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/
>
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Navid Mohaghegh
> Sent: Tuesday, January 14, 2014 5:04 PM
> To: users at gecode.org
> Subject: [gecode-users] Possible Bug - Increase IntVars Range and Gecode Stalls
> Importance: High
>
> Hi Everyone,
>
> My question:
> I am wondering what is happening in below and why Gecode stalls stall whenI increase the range of my IntegerVars (while its CPU utilization goes very high) despite the fact that our constraints are not changed?
>
> Background (http://navid.ca/gecode/test.cpp):
> We are trying to solve a space. We can easily solve the space when our variable ranges are small (e.g. 0 to 800). As soon as the range goes higher (e.g. 0-1535) Gecode will stall and can not produce a solution for the space with exactly the same constraints as before.
>
> We have 4 groups of integer_array variables. They are called vars_a, vars_b, vars_c and vars_d. And inside each of them, we have 15 integer variables.
> NavidTest(int n, int vars_a_max_, int vars_b_max_, int vars_c_max_, int vars_d_max_, int vcost_max_);
> NavidTest* m = new NavidTest(15, 800, 500, 410, 60,<PHONE_NUMBER>); means:
> n = 15
> vars_a[0] ... vars_a[15] can have values from zero to vars_a_max_ = 800
> vars_b[0] ... vars_b[15] can have values from zero to vars_b_max_ = 500
> vars_c[0] ... vars_c[15] can have values from zero to vars_c_max_ = 410
> vars_d[0] ... vars_d[15] can have values from zero to vars_d_max_ = 60
> our cost variable can be have values from zero to vcost_max_ = 2,000,000,000
> As we have quadratic cost functions and values can easily grow.
> lift() method is where we add our constraints.
> For demonstration purpose, we have a method that once used, Gecode can produce solution: it is called "void the_one_works()"
> And we have another one (called: void the_one_doesnot_work) that can not be solved using Gecode (it is perfectly solvable and we test our solution in verify_answer() method)
> The only difference between the_one_works() and the_one_doesnot_work() is an increase in vars_a max range from 800 to 1535.
>
>
>
> I have found a mailing list entry stating a possible bug:
> ==========
> From: victor.zverovich at ... <victor.zverovich at ...>
> Subject: bug in INT_VALUES_MAX
> Newsgroups: gmane.comp.lib.gecode.user
> Date: 2013-06-21 22:20:18 GMT (29 weeks, 3 days, 17 hours and 17 minutes ago)
> There seems to be a trivial bug in INT_VALUES_MAX: SEL_VALUES_MIN is used instead of SEL_VALUES_MAX. The attached patch fixes it.
> Victor
> ==========
>
> Can someone have a look and let me know?
> We are using Gecode 4.2.1 on Linux
> GCC 4.7.2 and also latest 4.9
> Debian 64bit and CentOS 64bit
> My code and how I compile and run is here: http://navid.ca/gecode/test.cpp
>
> Thank you,
> Navid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140320/6c69f218/attachment-0001.html>
More information about the users
mailing list


Liverpool FC’s forgotten man tells friends he wants to quit Anfield – report
Xherdan Shaqiri is keen on a move away from Liverpool FC next summer, according to reports
by Transfer AgentXherdan Shaqiri has told friends that he wants to quit Liverpool FC next summer due to his lack of playing time, according to reports.
Football Insider, as quoted by the Daily Express, is reporting that the Switzerland international is keen on a move away from Anfield next year because of his lack of first-team opportunities.
The midfielder has suffered from a calf injury in recent weeks but he is said to be unhappy at Anfield because of his lack of opportunities – and he will seek a move away in the summer.
Shaqiri has found his opportunities to be few and far between this season, with the 28-year-old only having featured twice in the Premier League, and both times as a substitute.
Indeed, the midfielder has only made three appearances this season in all competitions and has played a mere 14 minutes of first-team football for the Reds.
According to the same story, Shaqiri is now closing in on a return to full fitness for the Merseyside outfit as he looks to try and force himself back into the first team at Anfield.
Meanwhile, Liverpool FC are currently preparing for their trip to Crystal Palace in the Premier League on Saturday afternoon.


General support queries. User Guides: https://support.komodoplatform.com/ Support staff: Angelina#6231 gcharang#6833. If you want to ask JL777 a question, use the #ask-jl777 channel.
100 messages
Before 05-Dec-19 12:00 AM
CHMEX08-Mar-19 12:29 PM
Basicly funds are already "in agama"
pbca2608-Mar-19 01:35 PM
@Nitego there's no kmd trezor integration yet in any existing wallets (inc. the official one from trezor) to my knowledge
1
PTYX08-Mar-19 01:46 PM
Not yet but coming
newvulcan08-Mar-19 02:23 PM
Thanks, Shossain, CHMEX that worked great
1
1
vulcan10-Mar-19 02:06 PM
Not sure if this is the right place to ask but does anyone know the config settings to use in knomp to make your own pool compatible with Nicehash ? The docs on the nicehash site are a bit vague. I know i have to set up min difficulty and ports but not sure of the syntax to use in the pool config file. Thanks
SHossain10-Mar-19 02:10 PM
@vulcan set the max diff very high or ask in #talk-mining
Hello is it poosible to add erc20 coin with the contract add on agama wallet?
smk762 - dracocanis ominator13-Mar-19 09:18 AM
not sure what you're asking @Matlemac but Agama does have ERC20 coins supported in the wallet already. Adding a new one is possible, but needs some collaboration with developers.
Matlemac13-Mar-19 09:18 AM
Can t find the way
smk762 - dracocanis ominator13-Mar-19 09:20 AM
do you want to add a new coin to agama or view the ones already supported?
@B. Gültekin Çetiner not yet, once I get my arm v8 port updated for current the Komodo version I am going to see if I can get a port working on arm v7, the processor in the raspberry pi machines
2
B. Gültekin Çetiner13-Mar-19 08:56 PM
Thanks @Cryptoon@radix42
gilardh13-Mar-19 11:06 PM
@radix42 The latest Raspberry pi 3 (model B, B + and, A +) uses an ARMv8. Why would you try to port the Komodo version on ARMv7? I will try to install soon a full node and a block explorer on a raspberry pi 3 but I do not have as much knowledge as you.
radix4213-Mar-19 11:20 PM
They do not have all of the arm v8 crypto extensions, which cost extra to license for the processor, and are effectively arm v7 for things that use cryptographic instructions
Your install Will fail
Trust me it won't buuld
Build
That's what I am working on rn
gilardh14-Mar-19 12:21 AM
Thank you for these clarifications.
Nitego14-Mar-19 07:09 AM
@pbca26 thanks. I guess Trezor made the announcement ahead of time then.
PTYX14-Mar-19 12:58 PM
@Nitego trezor coming soon to a wallet near you
1
Draeth15-Mar-19 01:27 AM
anyone around that can help me out?
i'm trying to switch to the woocommerce kmd payment gateway
yeah you can order something through there.
i'm also creating an installation profile for the cakeshoip blockchain appliance
freely distributed, run your own cakeshop
@Draeth instructions are there ^
Mylo15-Mar-19 06:35 AM
i don't monitor this channel as frequently so any questions plz mention me and i can login cakeshop and take screenshots or something that is missing and add it to the guide(s)
Experimental Multicoin Wallet and Blockchain Dashboard - KomodoPlatform/Agama
Draeth15-Mar-19 12:10 PM
@Mylo thank you so much, it seems like I was using a version that was either messed up or old, because it didn't have the options that the one you linked to did
1
bambam15-Mar-19 09:17 PM
Hey what's the current status of shielded transactions on komodo?
locktime needs to be green check, so you should send all to your self same address
Max2117-Mar-19 09:12 PM
The tool is supposed to do that for me right ?
I don't understand why locktime is red
LeshAft917-Mar-19 11:01 PM
whatever sent the original transaction that created that utxo did not include locktime, so it has not been accruing the reward. you have to make a utxo with a wallet that sets the locktime correctly. (also the utxo has to be >= 10 KMD). if you send it to yourself and you see green check there then it should be good to start accruing, then you can come back in a month
btw withdrawals from bittrex seem to set the locktime correctly
Alright17-Mar-19 11:38 PM
@Max21 previously if you sent coins from the ledger, the change output that would be sent back to you would not have nlocktime set. This meant as soon as you spent a UTXO from the ledger, the change back to it would not accrue rewards. This issue is fixed in Ledger Live 1.5. If it's still not set, update then send your full balance back to yourself. It will begin to accrue rewards.
@lukechilds fixed it
Memz0118-Mar-19 02:15 AM
Is there a reason why exchanges have a 120 + confirmations for deposits or withdrawals to be completed for KMD?
It's extremely high compared to others
LeshAft918-Mar-19 02:40 AM
lack of confidence in dpow? i have no idea actually though
CryptoNinjaa18-Mar-19 09:33 AM
Binance is 120 confirms bittrrex is 20 , Binance went extreme after equihash 51% attacks and never changed it back even though kmd is the most secure coin available on binance
Max2118-Mar-19 11:44 AM
@Alright I was not running Ledger Live 1.5 Indeed. Just sent my full balance back to myself, hope it is resolved now. Thanks
gcharang18-Mar-19 11:46 AM
you can check the newer utxo in the claiming tool to see if the locktime is set properly(edited)
You generally want to check this after withdrawing from an exchange. If the exchange doesn't set it, just send the full balance back to the ledger with LedgerLive 1.5
Max2118-Mar-19 11:50 AM
Yes I can already see from Lukechild's tool that it worked. Locktime is green now
Very releaved we can finally claim rewards easily from the Ledger now.
LeshAft918-Mar-19 01:02 PM
Has anybody experienced this? I was going to use the Ledger KMD Reward Claim website on github, and all the addresses and amounts look correct, but when the ledger nano device showed the fee it was some absurd amount like billion+ KMD
phideas18-Mar-19 03:08 PM
Ledger Reward Claim is broken? @lukechilds Could you take a look? If you need more info, just ping me I can assist to help.
https://imgur.com/a/P9nwhml
phideas18-Mar-19 03:22 PM
I managed to claim, but there something weird going on for sure. I have 5 KMD accounts on Legder so i tested 5x the claim process.
This bug popped up when I waited couple of seconds while reading the adress on Ledger display before first confirm. After 1st confirmation,
the second confirm (output #1) never showed up on Ledger and the claim timed out with the bug screenshoted above. Tested on multiple accounts.
Bug didn't showed up and I was able to succesfully claim rewards when I was confirming the address immediately (couldn't even read).
After quick 1st confirm (address) the Output #1 and Output #2 showed ok and the claim was successful.(edited)
PTYX18-Mar-19 03:39 PM
I haven't tested claiming on the atomiclabs app but i'll try it out later
2
LeshAft918-Mar-19 05:49 PM
Ah, I think the reason the ledger nano s display shows a bajillion KMD fee for the claim is because the fee in the transaction is negative. Maybe this is the mechanism it uses to pull the reward "out of thin air", a negative fee.
Alright18-Mar-19 11:34 PM
@LeshAft9 you need to update the firmware of the device
As far as I know, that bug was cosmetic only, but it's fixed now if you update the firmware
LeshAft919-Mar-19 12:57 PM
Ah, right. I'd been avoiding that because of the loss of space on the device issue. Thanks. ButI did notice on the block explorer that it shows a negative fee rate and fee which I was wondering about
DmanXX20-Mar-19 07:00 PM
Hey guys I think Agama is calculating rewards wrong
It comes to be 4% not 5.1
Agama 0.3.4 Mac OS
Alright20-Mar-19 07:09 PM
5.1% is if you claimed it once per month for a year


Recently, I’ve been contemplating what teaching Git would look like, if you used Lego Bricks. Seeing how so many people are familiar with Legos, I figure it gives a good base on which to build. (/rimshot) Here’s my first prototype, version 0.01 alpha.
Here, in Image 1, we see our Git repo. On the left hand side, you can see all the different commits made so far. On the right hand side, you see out “Working Directory”. Right now, our Working Directory is “Clean”. That means that we haven’t made any changes to any files there yet. Let’s go ahead and change a file…
See how one brick in Image 2 has changed color and moved out of line of the others? That’s because we’ve changed the file. I’m guessing that we probably added some new lines of code for some awesome feature. We say that these modified files are “Unstaged”. If you don’t understand what I mean by “Unstaged”, that’s ok. Just remember that word and we will see what it means soon. Right now, it’s just important that you know that we call these files “Unstaged”.
Now, let’s go ahead and add some more cool code to our files.
As you can see in Image 3, we’ve added more code for our new feature to two other files. That means we’ve changed three files, which you can see in the picture. I think we’ve made enough changes now. Let’s go ahead and use some other features of Git to save our changes. First, we will need to “Stage” the changes. Remember how I said to remember that the red bricks were “Unstaged” and that it was important. Well, now we get to see why. :)
In Image 4, you will notice that our red bricks have moved and are now in their own little group. We did that by telling Git to “add” them. To do that, we tell Git, “git add filename” in our terminal. Of course, “filename” would be whatever the file is named! Then, they’ve “added” to what we call the “Staging Area”. It’s were the files go to change from “Unstaged” files to “Staged” files. You see how the bricks have all grouped together? Now we consider them “Staged” and they are ready to be committed. What does it mean when those Staged Files are Committed? Here’s what it means.
When we commit files, Git take some notes about the files. The most important thing it remembers is what has changed in the files. Git is very good at remembering things, but in order to keep things organized, Git gives each commit something we call a “Hash”. What’s a “Hash”? Well, I like to think of it like Hash Browns. What does Git and Hash Browns have to do with each other? Take a look!
Here’s a picture of some Hash Browns, just in case you forgot what they look like. :) Have you ever noticed how no two serving of Hash Browns are the same? All the little strings of tasty potato goodness get all tangled up into a very unique pattern. Well, Git Hashes are kinda like Hash Browns. They are unique and no two are the same. For Git, this is important. You see, Git uses these Hashes in order to remember each of the commits. If they weren’t unique, Git would become confused! Now, let’s see what happens when you make a commit. Back to the bricks! (I hope I didn’t make you too hungry!)
Ok, so, in Image 7 we see that our commit is complete and has been added in line with all the other commits. We did this by telling Git, “git commit -m ‘adding our new code’”. What that does is tell Git to commit the code and save the changes. (I like to think of it as telling Git to “Commit this to memory!”) We also have Git take down a message to keep with the code when it commits it. That’s what the “-m ‘adding our new code’” part is. The “-m” tell Git that we are getting ready to give it a message, and then we tell Git our message by putting it in quotes. You can use ‘single quotes’ or “double quotes”. (That’s all up to you.) Now, Git will remember our code changes and our little message, for later.
So, what happened with that whole Hashes business? What was that all about?
Well, you see, when Git commits our changes it attaches the Hash to the committed code. Git does a very good job at keeping things organized and tidy. It’s very efficient at storing the code changes.  Now, while we see these commits as different color bricks, that’s not how Git sees them. When it looks at them, it sees the Hashes. This is good, because now we could tell Git to show us what changed in any of those committed code “bricks” and it would know which one to look up. The Hashes actually look like big long sets of random characters. While you or I wouldn’t want to remember all those characters (it looks like “1bb3d21” and that’s the short version!) Git does a great job of remembering the Hashes and getting the ones we want when we ask for it. Of course, to make it easier on us humans, Git will also tell us the message we attached to the commit, when we ask for it.
One of the coolest things we can do with all these Commits is that we can go back in time! We can inspect each “brick” to see what changed! This is a really cool feature and we will learn more about it in the future. For now, just know it’s a really cool ability that Git has up it’s sleave.
Well, congratulations! I hope you understand the basics of a commit now. Let’s recap what we went over:
1) What a “Working Directory” is. Remember, it’s where you do your work on your files!
 We “stage” the files using the “git add filename” command.
3) What a Commit and Hash is, in Git. We also learned that we can attach a message to our commit, to make it easier to understand our commits when we look back on them. (You know, to help our future selves!) We do all this with “git commit -m ‘our little message here’”
Cheers! Be back with more Git Lessons with Bricks soon!
- ShepBook


EVP_PKEY_is_a, EVP_PKEY_can_sign, EVP_PKEY_type_names_do_all, EVP_PKEY_get0_type_name, EVP_PKEY_get0_description, EVP_PKEY_get0_provider - key type and capabilities functions
#include <openssl/evp.h>
int EVP_PKEY_is_a(const EVP_PKEY *pkey, const char *name);
int EVP_PKEY_can_sign(const EVP_PKEY *pkey);
int EVP_PKEY_type_names_do_all(const EVP_PKEY *pkey,
void (*fn)(const char *name, void *data),
void *data);
const char *EVP_PKEY_get0_type_name(const EVP_PKEY *key);
const char *EVP_PKEY_get0_description(const EVP_PKEY *key);
const OSSL_PROVIDER *EVP_PKEY_get0_provider(const EVP_PKEY *key);
EVP_PKEY_is_a() checks if the key type of pkey is name.
EVP_PKEY_can_sign() checks if the functionality for the key type of pkey supports signing. No other check is done, such as whether pkey contains a private key.
EVP_PKEY_type_names_do_all() traverses all names for pkey's key type, and calls fn with each name and data. For example, an RSA EVP_PKEY may be named both RSA
and rsaEncryption
. The order of the names depends on the provider implementation that holds the key.
EVP_PKEY_get0_type_name() returns the first key type name that is found for the given pkey. Note that the pkey may have multiple synonyms associated with it. In this case it depends on the provider implementation that holds the key which one will be returned. Ownership of the returned string is retained by the pkey object and should not be freed by the caller.
EVP_PKEY_get0_description() returns a description of the type of EVP_PKEY, meant for display and human consumption. The description is at the discretion of the key type implementation.
EVP_PKEY_get0_provider() returns the provider of the EVP_PKEY's EVP_KEYMGMT(3).
EVP_PKEY_is_a() returns 1 if pkey has the key type name, otherwise 0.
EVP_PKEY_can_sign() returns 1 if the pkey key type functionality supports signing, otherwise 0.
EVP_PKEY_get0_type_name() returns the name that is found or NULL on error.
EVP_PKEY_get0_description() returns the description if found or NULL if not.
EVP_PKEY_get0_provider() returns the provider if found or NULL if not.
EVP_PKEY_type_names_do_all() returns 1 if the callback was called for all names. A return value of 0 means that the callback was not called for any names.
The loaded providers and what key types they support will ultimately determine what name is possible to use with EVP_PKEY_is_a(). We do know that the default provider supports RSA, DH, DSA and EC keys, so we can use this as an crude example:
#include <openssl/evp.h>
...
/* |pkey| is an EVP_PKEY* */
if (EVP_PKEY_is_a(pkey, "RSA")) {
BIGNUM *modulus = NULL;
if (EVP_PKEY_get_bn_param(pkey, "n", &modulus))
/* do whatever with the modulus */
BN_free(modulus);
}
#include <openssl/evp.h>
...
/* |pkey| is an EVP_PKEY* */
if (!EVP_PKEY_can_sign(pkey)) {
fprintf(stderr, "Not a signing key!");
exit(1);
}
/* Sign something... */
The functions described here were added in OpenSSL 3.0.
Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.


.js
file and include
it, but often (especially in an example ;) it's best to be fully
transparent and list all the routines out in the open...
$ apiLocation = 'http://ws.geonames.org/'; $ function query(endpoint, q) { > var url = apiLocation + endpoint; > jQuery.ajax({ > url: url, > data: q, > dataType: "json", > success: Spy('success', {wait: true, ignoreThis: true}), > error: Spy('error') > }); > }Some things to notice about this example:
apiLocation
is hard coded, but you could read it
from the query string, allowing something like
test.html?apiLocation=http://localhost:8080
.
.called
.
If you used {writes: true}
you might not need the
.applies
functions.
wait
can be called from anywhere. That means
when you call this function doctest will wait until something is
called, and will test all the output since that time (either the
success or failure writeln()
). Timeout is the other
possibility.
$ query('postalCodeSearchJSON', {postalcode: 9011, maxRows: 5}); success({ postalCodes: [ {...} ] }, ...)
$ $.ajax({ > url: './.resources/example.xml', > dataType: 'xml', > success: function (doc) { > gdoc = doc; > writeln(repr(doc)); > }, > error: Spy('error') > }); $ wait(0.5); <feed xmlns="http://www.w3.org/2005/Atom"> <title>Example Feed</title> ... </feed>
You can download this project in either zip or tar formats.
You can also clone the project with Git by running:
$ git clone git://github.com/ianb/doctestjs


Database Analyst is a person doing what they do, analyzing data.
She would draw a model or have a picture of what the data looks like. Most of the time it is a conceptional model but sometimes it can turn into a physical model. She checks if tools and supplies bought by the company are industry compatible.
She works together with other companies such as financial trail to figure out the best possible outcome from the data. She spends most of their time mapping out the data, taking other data and putting it in their database, and merging external source data into the database. She would notify or alert if there is a problem in the data. Tool mostly used would be Excel Spreadsheets.
Colleen is one of the members from Lilly who I was introduce to. She is a data analyst for Lilly and works on making sure the data is placed inside the right database.


Called when popup is minimized.
onMax = function(event)
You can add event listener during the object creation:
or after popup is opened:
The event handler is called before the default action of the event is triggered. You can cancel the default action by calling
event.preventDefault(). To perform an action
after the event is fully processed, define event.onComplete function.
See events page in utilities for more details.


Gang attack in Scots town leaves man with serious facial injury
A 56-year-old man was rushed to hospital in Moray after the early morning attack on Sunday.
by Daniel Morrow, https://www.dailyrecord.co.uk/authors/daniel-morrow/A man was seriously injured after he was attacked by group of men in their 20s in Elgin .
Emergency services were called to the High Street at around 2am during the early hours of Sunday morning.
A 56-year-old man was rushed to to Dr Gray’s Hospital in Moray after he suffered serious facial injuries in the assault.
Police Scotland are appealing for eyewitness accounts of the incident as their enquiries continue.
Sergeant Phil Wu of the Divisional Alcohol and Violence Reduction Unit, Elgin said: “From our enquiries so far, we believe that there may have been a group of men in their 20s involved in the assault.
“A number of people would have been in the area at the time and we are particularly keen on speaking to a woman wearing a red dress or jumpsuit who may have witnessed this assault.
“If you have any information relating to this incident please contact police on 101 quoting incident number 0504 of November 17, or alternatively, call Crimestoppers on 0800 555 111 where information can be passed on anonymously.”


codeable_models.CClassifier¶
-
class
codeable_models.
CClassifier
(name=None, **kwargs)¶ CClassifier
is superclass of classifiers such asCClass
andCMetaclass
defining common features for classifiers. The class is usually not used directly but its features are used from the subclasses.Superclasses:
CBundlable
- Parameters
name (str) – An optional name.
**kwargs –
Pass in any kwargs acceptable to superclasses. In addition,
CClassifier
accepts:attributes
,superclasses
.The
attributes
kwarg accepts a dict of attributes in the form acceptable to theattributes
property.The
superclasses
kwarg accepts a list of superclasses in the form acceptable to thesuperclasses
property.
Examples:
The following code uses the
superclasses
andattributes
features ofCClassifier
during a class definition and then uses theassociation
feature to define an association for a class:customer = CClass(domain_metaclass, "Customer", superclasses=person, attributes={ "id": str, "shipping addresses": [], }) customer.association(cart, "shops with: [customer] 1 <*>- [cart] 1")
Main Relations:
The main relations of
CClassifier
are shown in the figure below.As can be seen,
CClass
,CMetaclass
, andCStereotype
are classifiers, as could be expected. In addition,CAssociation
is a classifier, which might be a less obvious design choice. It is a classifier, so that aCLink
can be an object. That is, the association is the classifier of the link. This way links can be referenced and treated as objects.The associations, attributes, and inheritance hierarchy of a classifier are managed by the methods of
CClassifier
.-
property
all_associations
¶ Getter listing all associations of this classifier including those of superclasses.
- Type
list[CAssociation]
-
property
all_subclasses
¶ Getter that returns all subclasses of this classifier on the inheritance hierarchy.
- Type
list[CClassifier]
-
property
all_superclasses
¶ Getter that returns all superclasses of this classifier on the inheritance hierarchy.
- Type
list[CClassifier]
-
association
(target, descriptor=None, **kwargs)¶ Method used to create associations on this classifier. Returns the
CAssociation
that is created.- Parameters
target – The association target classifier.
descriptor – An optional descriptor making it easier to define associations with a simple string.
**kwargs – Accepts all keyword arguments acceptable to
CAssociation
to define associations.
- Returns
The created association.
- Return type
For explanation of descriptor syntax and supported keyword arguments see documentation of the constructor of
CAssociation
.
-
property
associations
¶ Getter listing associations of this classifier.
- Type
list[CAssociation]
-
property
attribute_names
¶ Returns a list of all attribute names defined for this classifier.
Examples are provided in the document Class attributes.
- Type
list[str]
-
property
attributes
¶ Property that gets the list of attributes of a classifier or sets them using a dictionary.
All attributes are internally stored as
CAttribute
objects. The getter returns the list of all attributes asCAttribute
objects.For the setter,
None
or{}
can be used to remove all attributes from the classifier.Each attribute in the dict is specified using the form:
attributeName: <type|default-value|CAttribute>
Possible types of attributes are:
bool
: a booleanint
: an integerfloat
: a floating point numberstr
: a stringlist
: a Python listenumeration values: An object of type
CEnum
is the type and enumeration values are used as attribute values.objects: A class of type
CClassifier
is the type andCObject
’s are used as attribute values. Please note this might beCClass
as a type withCObject
objects, orCMetaclass
as a type withCClass
objects.CAttribute
objects: AnCAttribute
object describes an attribute, i.e., its type and default value.
Example: The following code initialized one
int
and onebool
attribute, each with a default value, and it defines another string attribute using thestr
type:game = CClass(metaclass, "Game", attributes={ "number_of_players": 1, "game_started": False, "player_id": str })
game.attributes
returns the list of attributes asCAttribute
objects.More examples are provided in the document Class attributes.
- Type
dict[str, CAttribute | Attribute Type | Default Value]
-
property
class_path
¶ Superclasses are processed using a linerarized class path. This path unambiguously orders the superclasses for each classifier, from lower-level to higher-level classes. At the same level, classes will be ordered in the same order as specified in the
superclasses
definitions. If a classifier appears multiple times on the class path, i.e. it is reachable via different paths, the first appearance is chosen.This getter returns all superclasses in the order of the class path.
- Type
list[CClassifier]
-
delete
()¶ Deletes the classifier, removes superclasses, removes it from subclasses, removes all associations and attributes, and removes the classifier from bundles. Calls
delete()
on superclass.
-
get_attribute
(attribute_name)¶ Returns the
CAttribute
object that conforms to the provided attribute name. If none is found,None
is returned.Examples are provided in the document Class attributes.
- Returns
The attribute conforming to the attribute name.
- Return type
-
has_subclass
(classifier)¶ Returns
True
ifclassifier
is subclass of this classifier, elseFalse
.- Parameters
classifier – The classifier to test.
- Returns
Boolean result of the check
- Return type
bool
-
has_superclass
(classifier)¶ Returns
True
ifclassifier
is superclass of this classifier, elseFalse
.- Parameters
classifier – The classifier to test.
- Returns
Boolean result of the check
- Return type
bool
-
is_classifier_of_type
(classifier)¶ Checks if the classifier conforms to the provided classifier’s type.
- Parameters
classifier – A
CClassifier
to check against.- Returns
Boolean result of the check.
- Return type
bool
-
property
subclasses
¶ Getter that returns the subclasses of this classifier.
- Type
list[CClassifier]
-
property
superclasses
¶ Setter to set and getter to return the superclasses of this classifier.
- Type
list[CClassifier]