The Netradar application can be configured to run in the background at fixed intervals. This mode of measurement is known as ‘Passive mode’.
Using the application in passive mode helps to run measurement without the user’s involvement thus saving the effort required by the app users.
During your commute, your mobile connects to different base stations on the way. This will give us a broader picture of the network infrastructure when compared to performing multiple measurements in a stationary location.
Using GPS while measuring will improve the accuracy to pin-point the base station locations that do not provide 4G/LTE services by visualizing the network and infrastructure coverage maps for mobile operators.
We are interested in analysing the mobile network infrastructure and it’s quality of service. Using the application with cellular data connects to the cellular network which will provide us with a relevant snapshot of the mobile network performance and thereby allowing us to deduce the information about the possible infrastructure behind it.
We have created a test user account specifically for this user study so as to help us isolate the data that is collected for our purpose from the rest of the data. Moreover it will not require you to use your personal accounts thereby protecting your privacy.
Note: Please do not attempt to change the password or any other details of this test account.
4G is the new buzz word used by operators to sell their data services at a premium rate. This is evident by the popular “4G at 3G prices” advertisements of some of the popular mobile network operators. We are interested in identifying whether their existing infrastructure is capable of supporting the services that the operators are promising its customers.
When you have a 4G connection (which means you have a mobile phone that supports 4G technology, you have a 4G SIM card with 4G data plan), we can collect and analyze about the infrastructure that is used by your mobile network operator to provide you 4G services. This also allows us to see the infrastructure quality pertaining to the downward compatible technologies such as 3G and 2G. However, the other way round (i.e using 2G or 3G connections) will not allow us to collect the information about 4G. That is why we are more interested in 4G connections.
But if you don’t have 4G and still want to participate in our user study, please go ahead. We can still collect and analyze the data about 2G/3G network coverage, performance and the mobile phones used by our people.


| DOSE: T+ 0:00 |
160 ug |
oral |
LSD |
(liquid) |
| T+ 8:00 |
|
smoked |
Cannabis |
(plant material) |
Having worked on and researched LSD and many other hallucinogens for over a year for college in a research setting, I was very, very cautious and hesitant to try it for myself. I have a very good background in exactly how it affects the neurotransmitters of the brain, knew exactly what effects to expect, and was a sitter for 4 friends that had taken it previously. I have experience with just about every opiate and opiod made, weed, amphetamines, salvia (but never experienced visual hallucinations from it), many different benzos, etc, but never an actual hallucinogen before this.
Starting Setting: A beautiful evening out in the midwest in a friend's apartment. Lets call him B.
Companions: Tripping: myself, B, and N. Sitters included J, who would be taking other various pharms but not actually tripping himself, and K, who was B's girlfriend. All of us are really good friends, and I would trust them with my life if it came down to it, and I think they would with me.
Mood: A bit of nervous apprehension. It's one thing to take a drug and just know what it's supposed to do, it's another thing to know exactly what it's doing to you and when. I was in an awesome mood as we had planned this evening for weeks and N had taken off work and traveled 2 hours to visit for the weekend.
8pm: I was given a liquid from J that I was told to swish around and hold in my mouth for 15 minutes that I was told contained about 160ugs LSD, a 'social dose,' I was told. B and N were given the same amount as well. B has never taken a hallucingen before, but N has done acid at 160ug, 500ug, and shrooms many times.
[Erowid Note: Claims of measured microgram dosages for LSD are usually unsupported. Quantitative measurements for LSD are very difficult to do and cannot be done casually. Without further detailed information about how the measurements were derived, it is reasonable to assume that most statements of microgram dosages of LSD on blotter or in microdots are either misinformed or overstated.]
8:30pm: After watching the Animatrix for a while and not feeling it at all, I suggested we took B and K's newly bought puppies for a walk to see campus. We have several beautifully lit foutains that run during the summeron campus that I wanted to see. N remarked his shoulder was hurting from lifting the day before and took a 60mg morphine, after which he said he 'couldn't possibly feel more euphoric than I am right now' and he is one to down 120mg without batting an eye as he is just naturally very tolerant to just about any substance.
8:45pm: On the walk to the fountains, I noticed I could almost 'feel' colors. At one intersection, all of the stoplights were red all down the street, and N remarked that he could also 'feel that there was too much red' and that he didn't particularly like it.
9:00pm: The lighting around the fountain was very indirect and from the ground, almost creating a mystical feeling to it. I was quite euphoric, as if nothing could possibly spoil my mood. We get to the fountain, which to me, along with the most beautiful night we have had in a long time, looked like nothing other than heaven. We all sat on the grass and spoke to each other and to other people that were there just enjoying the evening and watching the fountain. There were people there that had taken shrooms and we compared and spoke about the similarities and differences. B remarked while laying with his puppies around him and holding his girlfriend looking up at the brightly lit foutain 'wow, so this is what heaven feels like.' A guy and girl were playing guitar and singing. They may have sounded horrible but any kind of music sounded amazing to me at this point.
11:30pm: We reluctantly left our new friends and 'heaven.' I went to the bathroom and noticed my pupils were very large. We walked by the bars on the way home to see all the bright lights and music, which was way too much stimulation to take in at one time at least for me as it was my first trip. N wanted to go party, but I was much more set on at least for my first time, staying relatively safe and away from large crowds. Next time maybe. N remarked this dose was much more enjoyable than the 500ug he had done a couple months back. I noticed that I had some muscle cramping in my jaw that persisted throughout the night. It was unbareable, but noticable.
12pm: We get back to the apt and begin watching 'What Dreams May Come.' The movie by itself is pretty trippy and extremely colorful, and I really enjoyed the visual patterns I was seeing in the movie. They were very geometical and logical, and at times almost superimposed over what I was watching. After a moment, I realized I could manipulate them and greatly enjoyed this. Still in extremely high spirits.
3am: N announces he has come prepared with a trunkful of fireworks (last weekend was the 4th of july). We all take turns shooting rockets and HUGE roman candles which of course looked absolutely stunning in our present state.
5am: We are starting to feel like we are all just starting to come down. J, the most experienced, suggest we smoke a LOT of weed at this point to get the most of our last couple hours. Among fun conversation amongst us three trippers, we fire up the bong and literally smoke, or 'mash' as we called it, until we physically could not smoke anymore due to lack of coordination.
6am: After just putting the bong down, I realize I am so inebriated I cannot understand or accomplish very simple tasks, such as putting a DVD in the player. Patterns are going absolutely crazy now, and it literally took me 25 minutes to make a bowl of ramen noodles, and poorly at that (I am a very good cook normally).
8am: The three of us have just been sitting and staring at the walls and different colored lights around the apt. and talking occasionally. I am nowhere near tired, in retrospect I should have expected the energy boost I got as J did warn us it would be a full 12 hour trip-sleep would be nearly impossible without taking a benzo like xanax or a hypnotic like ambien or sonata, all of which we had on hand just in case. I decided to walk home, a block or so, and try to get to sleep and enjoy the last of the trip by myself. I go home, smoke a little more, and finally sleep just about 8 hours straight which is a long time for an insomniac like me.
The next day was spent recovering, as we were up all night and the trip took a good amount out of us. We were all in high spirits, perhaps it was an afterglow, but mentally drained as one can get after studying for a long time straight. Overall it was a mystical, wonderful, eye-opening experience that I will never forget. I was *very* happy I waited until I was truly ready to accept what 'Lucy' had to offer.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Glossary
This page is menu is fairly self explanatory. You just need to fill in the forms as follows:
Term:
new term which is exist on your site.
Definition:
the detail description about your new terms.


Hypergeometric distribution
A jar has $N$ marbles out of which $K$ are blue.
Randomly draw $n$ marbles from the jar, how likely $k$ of them are blue?
$$
p(k) = \frac{{K \choose k}{N-K \choose n-k}}{{N \choose n}}
\\[16pt]
\text{where $N$ is the population size,}\\
\text{$K$ is the number of success states in the population, }\\
\text{and $n$ is the number of draws.}
$$


See the{' '} PanelType documentation for details on how each option affects panel sizing at different screen widths.
All panels are anchored to the far side of the screen (right in LTR, left in RTL) unless otherwise specified.
Content goes here.


Riley Carlson
Home
Resume
Projects
Contact
Contact Me
Email:
<EMAIL_ADDRESS>Call:<PHONE_NUMBER>
LinkedIn
Business Information
Company*
First Name*
Last Name*
City
State
Zip
Enter minimum of 5 digits
Phone
Enter minimum of 10 digits
Email
Questions or Comments?
Submit


HashTool
A simple multi-algorithm hashing tool written in Dart.
Source
Text
File
Hash
Hashes
Algorithm
Hash


TEAM Mentor Eclipse Plugin for Fortify installs just like any other plugin on Eclipse. If you are familiar with the process, and can’t wait to give it a try, here is the install links to use
https://eclipse.TEAMMentor.net


Go Web Camp
So I heard there is a new language in town. Thought I should give it a try. Here the link from where I started my journey
Pre-requisite
- Go lang basics
- Google cloud account
- Google cloud sdk installed via link
Hello World
- Go lang installation
- GOPATH /Users/aniarya/trails/go/
- go get is installed in $GOPATH/bin folder
- go run hello.go is the command to invoke the compilation
HTTP client and server
- “net/http” is module that helps in routing and http server development
- “github.com/gorilla/mux” is a template library for performing GET, POST, PUT etc
IO hanlers
- “io/util” handles the input and output operations for golang
- form data handling or data passed as POST or GET request
App Engine
- “google.golang.org/appengine” is used to run web app on Gcloud
go get -u google.golang.org/appengine/...
this downloads the app engine in local machine- Along with go file an yaml config file is also added to same directory
- Then
dev_appserver.py .
is run in same directory - For now I am facing issue
OSError: [Errno 2] No such file or directory: '/Users/aniarya/google-cloud-sdk/platform/google_appengine/goroot-1.9/pkg/tool'
EOD : 01-07-2020
Yesterday’s issue wasn’t able to solve. I think this maybe because of the outdated version of tutorial I may be using. The tutorial was made in 2017 and I am trying it in 2020. Golang has released many updates till now. So I will have to refer to latest document to make changes and make it work. For now I am continue with tutorial for the sake of understanding basics.
Static HTML files
- Added html file in static folder.
app.yaml
has routes for pointing to static files.- hosted this on Gcloud, works okay
- Implemented backend in go file but
dev_appserver.py .
script has an errorINFO 2020-06-02 09:23:47,095 admin_server.py:150] Starting admin server at: http://localhost:8000\nERROR 2020-06-02 09:23:50,391 instance.py:284] Cannot connect to the instance on localhost:18087
- This is taking place whether backend go file is there or not. But before when go file wasn’t added then this issue wasn’t there
JSON Encoding and Decoding
- Struct defined for decoder and encoder function
- Genric function for router, seperate from main func, helps in unit testing also
- The Google App Engine issue still persists so I hosting the app directly via go files can be hosted
Storing Data in Datastore
- Go runtime on App Engine provides a suite of packages including Clound Datastore
google.golang.org/appengine/datastore
is the package used for the same- Retrival of datastore via key methods
Retriving remote resources with urlfetch
- Application communicate with external apps via POST requests
- App Engine limits
net/http
usage for scalling purposes appengine/urlfetch
module will be used along with App Engine, as it is compatible with GCP- Used weather to test
appengine/urlfetch
for application
EOD : 02-07-2020
Memcache with App Engine
appengine/memcache
which provides setter and getter function to operate on cache memory- Memcache keeps the data for a specified amount of time and then drops it once the time is passed
- Another section based on a module of App engine, this tutorial feel more on App engine
- And my earlier issue is also related to App engine
Ok so this was the end of workshop. In the end I realised it was more about App Engine and its compatibility with the software like mail,sendgrid or mailgun.
It not bad by my understanding, I will be super efficient for a person looking to develop an application and host it on App Engine. But I was not looking of this so it felt kinda boring for me to go through this workshop.
That all. It still feels good at the end of a workshop, it’s a mental trick to feel contented after finishing something. Next I will look for developing standalone application to be deployed anywhere I like.


FishBase/SealifeBase defined functional groups for you
Please feel free to:
(1) Indicate whether each functional group is a focal functional group or a biotic resource, using dedicated radio buttons.
(2) Remove species from some functional groups.
(3) Redistribute species between functional groups.
To redistribute species between two functional groups:
(i) Deselect a species from the column "Species" of its original functional group using the dedicated radio button.
(ii) Then: In the column "Species" of the functional group in which you wish to reallocate the species, press the Edit button () and type the name of the species (Latin name); suggestions will be provided to you as you start typing something.
OR
(i) FOR BIOTIC RESOURCES ONLY: Deselect a given class from the column "Class" of its original functional group using the dedicated radio button; this action will deselect all the species belonging to the class from the column "Species" of the original functional group.
(ii) Then: In the column "Class" of the functional group in which you wish to reallocate the species, press the Edit button () and type the name of the class; suggestions will be provided to you as you start typing something. Once the class name is entered, the species belonging to that class will automatically appear in the "Species" column of the new functional group.
(4) Remove functional groups from the table.
(5) Create functional groups.
To create a new functional group, press the Plus button at the bottom of the table ().
Then:
(i) Enter the name of the new functional group.
(ii) Indicate whether the new functional group is a focal functional group or a background functional group, using dedicated radio buttons;
(iii) In the column "Species", type the name of the different species making up the new functional group (Latin names); suggestions will be provided to you as you start typing something.
OR
(iii) FOR BIOTIC RESOURCES ONLY: In the column "Class", type the name of the different classes making up the new functional group; suggestions will be provided to you as you start typing something. Once a class name is entered, the species belonging to that class will automatically appear in the "Species" column of the new functional group.
*Note 1: To identify relevant Latin names or class names for the new functional group, you can access FishBase/SealifeBase by clicking on the FishBase icon or the SealifeBase icon, which are both located at the top-right hand corner of the table provided below. FishBase provides data for fish, while SealifeBase provides data for all the other types of marine organisms.
*Note 2: A workaround to fill in the “Species” column for a biotic resource you create consists of: (1) temporarily defining the biotic resource as a “Focal Functional Group”; (2) filling in the “Species” column”; and (3) redefining the functional group as a “Biotic Resource”.
(6) Rename functional groups.
*Caution: The name of the functional groups should not include spaces nor underscores. For example, "SmallPelagics" is a valid functional group name, but not "Small pelagics" nor "Small_pelagics".
When you are ready, press Proceed to go to the next step.
| Select/ deselect |
Functional Group |
Focal Functional Group |
Biotic Resource |
Class |
Species |
Maximum length (cm) |
Habitat |
Depth |


| PID | {{r.pid}} | Process Name | {{c.processName}} | State | {{c.state}} | Type | {{c.type | networkConnectionType}} | Family | {{c.family | networkConnectionFamily}} | Local IP | {{c.localAddress?.ip}} | Local Port | {{c.localAddress?.port}} | Remote IP | {{c.remoteAddress?.ip}} | Remote Port | {{c.remoteAddress?.port}} |
|---|---|---|---|
| No data matching the filter "{{searchStringControl.value}}" |


| HTML | Result |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Steve Reich |
This is link test |
This is link test |
|
|
tim's link |


Apache Flink's Application to Season of Docs
April 17, 2019 - Konstantin Knauf (@snntrable)The Apache Flink community is happy to announce its application to the first edition of Season of Docs by Google. The program is bringing together Open Source projects and technical writers to raise awareness for and improve documentation of Open Source projects. While the community is continuously looking for new contributors to collaborate on our documentation, we would like to take this chance to work with one or two technical writers to extend and restructure parts of our documentation (details below).
The community has discussed this opportunity on the dev mailinglist and agreed on three project ideas to submit to the program. We have a great team of mentors (Stephan, Fabian, David, Jark & Konstantin) lined up and are very much looking forward to the first proposals by potential technical writers (given we are admitted to the program ;)). In case of questions feel free to reach out to the community via<EMAIL_ADDRESS>Project Ideas List #
Project 1: Improve Documentation of Stream Processing Concepts #
Description: Stream processing is the processing of data in motion―in other words, computing on data directly as it is produced or received. Apache Flink has pioneered the field of distributed, stateful stream processing over the last several years. As the community has pushed the boundaries of stream processing, we have introduced new concepts that users need to become familiar with to develop and operate Apache Flink applications efficiently. The Apache Flink documentation [1] already contains a “concepts” section, but it is a ) incomplete and b) lacks an overall structure & reading flow. In addition, “concepts”-content is also spread over the development [2] & operations [3] documentation without references to the “concepts” section. An example of this can be found in [4] and [5].
In this project, we would like to restructure, consolidate and extend the concepts documentation for Apache Flink to better guide users who want to become productive as quickly as possible. This includes better conceptual introductions to topics such as event time, state, and fault tolerance with proper linking to and from relevant deployment and development guides.
Related material:
- //nightlies.apache.org/flink/flink-docs-release-1.8/
- //nightlies.apache.org/flink/flink-docs-release-1.8/dev
- //nightlies.apache.org/flink/flink-docs-release-1.8/ops
- //nightlies.apache.org/flink/flink-docs-release-1.8/concepts/programming-model.html#time
- //nightlies.apache.org/flink/flink-docs-release-1.8/dev/event_time.html
Project 2: Improve Documentation of Flink Deployments & Operations #
Description: Stream processing is the processing of data in motion―in other words, computing on data directly as it is produced or received. Apache Flink has pioneered the field of distributed, stateful stream processing for the last few years. As a stateful distributed system in general and a continuously running, low-latency system in particular, Apache Flink deployments are non-trivial to setup and manage. Unfortunately, the operations [1] and monitoring documentation [2] are arguably the weakest spots of the Apache Flink documentation. While it is comprehensive and often goes into a lot of detail, it lacks an overall structure and does not address common overarching concerns of operations teams in an efficient way.
In this project, we would like to restructure this part of the documentation and extend it if possible. Ideas for extension include: discussion of session and per-job clusters, better documentation for containerized deployments (incl. K8s), capacity planning & integration into CI/CD pipelines.
Related material:
- //nightlies.apache.org/flink/flink-docs-release-1.8/ops
- //nightlies.apache.org/flink/flink-docs-release-1.8/monitoring
Project 3: Improve Documentation for Relational APIs (Table API & SQL) #
Description: Apache Flink features APIs at different levels of abstraction which enables its users to trade conciseness for expressiveness. Flink’s relational APIs, SQL and the Table API, are “younger” than the DataStream and DataSet APIs, more high-level and focus on data analytics use cases. A core principle of Flink’s SQL and Table API is that they can be used to process static (batch) and continuous (streaming) data and that a program or query produces the same result in both cases. The documentation of Flink’s relational APIs has organically grown and can be improved in a few areas. There are several on-going development efforts (e.g. Hive Integration, Python Support or Support for Interactive Programming) that aim to extend the scope of the Table API and SQL.
The existing documentation could be reorganized to prepare for covering the new features. Moreover, it could be improved by adding a concepts section that describes the use cases and internals of the APIs in more detail. Moreover, the documentation of built-in functions could be improved by adding more concrete examples.
Related material:


Dear {{name}},
Welcome to InvoiceIT! Your user name and password are below:
User Name: {{name}}
Password: Set the first time you login from the below url
Admin Account is created at {{appName}}
Please visit this url to reset your password:
{{url}}
If you didn't make this request, you can ignore this email.The {{appName}} Support Team


Bordering on Madness
问题描述 :
Bob Roberts owns a design business which creates custom artwork for various corporations. One technique that his company likes to use is to take a simple rectilinear figure (a figure where all sides meet at 90 or 270 degrees and which contains no holes) and draw one or more rectilinear borders around them. Each of these borders is drawn so that it is a set distance d away from the previously drawn border (or the original figure if it is the first border) and then the new area outlined by each border is painted a unique color. Some examples are shown below (without the coloring of the borders).
The example on the left shows a simple rectilinear figure (grey) with two borders drawn around it. The one on the right is a more complicated figure; note that the border may become disconnected.
These pieces of art can get quite large, so Bob would like a program which can draw prototypes of the finished pieces in order to judge how aesthetically pleasing they are (and how much money they will cost to build). To simplify things, Bob never starts with a figure that results in a border where 2 horizontal (or vertical) sections intersect, even at a point. This disallows such cases as those shown below:
输入:
Input will consist of multiple test cases. The first line of the input file will contain a single integer indicating the number of test cases. Each test case will consist of two or more lines. The first will contain three positive integers n , m and d indicating the number of sides of the rectlinear figure, the number of borders to draw, and the distance between each border, where n<=100 and m<=20 . The remaining lines will contain the n vertices of the figure, each represented by two positive integers indicating the x and y coordinates. The vertices will be listed in clockwise order starting with the vertex with the largest y value and (among those vertices) the smallest x value.
输出:
Input will consist of multiple test cases. The first line of the input file will contain a single integer indicating the number of test cases. Each test case will consist of two or more lines. The first will contain three positive integers n , m and d indicating the number of sides of the rectlinear figure, the number of borders to draw, and the distance between each border, where n<=100 and m<=20 . The remaining lines will contain the n vertices of the figure, each represented by two positive integers indicating the x and y coordinates. The vertices will be listed in clockwise order starting with the vertex with the largest y value and (among those vertices) the smallest x value.
样例输入:
2 6 2 10 20 30 100 30 100 0 0 0 0 10 20 10 10 1 7 20 50 70 50 70 0 0 0 0 30 20 30 20 10 60 10 60 40 20 40
样例输出:
Case 1: Perimeters: 340 420 Areas: 3000 3800 Case 2: Perimeters: 380 Areas: 2660
(adsbygoogle = window.adsbygoogle || []).push({});
这张页面太松散拉，重新编辑一下，弄紧凑一点。
失误失误，转载错了。已经改正，抱歉。
因为是要把从字符串s的start位到当前位在hash中重置，修改提交后能accept，但是不修改居然也能accept
代码是给出了，但是解析的也太不清晰了吧！如 13 abejkcfghid jkebfghicda
第一步拆分为 三部分 (bejk, cfghi, d) * C(13,3)，为什么要这样拆分，原则是什么？
第二种想法，我想来好久，为啥需要一个newhead，发现是把最后一个节点一直返回到嘴上面这层函数。厉害，这道题之前没样子想过。
都是一些基础题啊
这一题的代码这样提交时错误的~少考虑了很多情况
for(int i=1; i<=m; i++){
for(int j=1; j<=n; j++){
dp = dp [j-1] + 1;
if(s1.charAt(i-1) == s3.charAt(i+j-1))
dp = dp[i-1] + 1;
if(s2.charAt(j-1) == s3.charAt(i+j-1))
dp = Math.max(dp [j - 1] + 1, dp );
}
}
这里的代码似乎有点问题？ dp(i)(j) = dp(i)(j-1) + 1;这个例子System.out.println(ils.isInterleave("aa","dbbca", "aadbbcb"));返回的应该是false
很有意思，可惜我很菜啊
gcc环境
值得分享！
这个方法是错的，不信你试试：
20 5
1 A:9
1 A:9
1 A:9
1 A:6
1 A:4
正确答案应该是19，这个答案是18
不错
不错的代码！


|
cds
2.3.1
|
VyukovMPMCCycleQueue default traits. More...
#include <cds/container/vyukov_mpmc_cycle_queue.h>
Public Types | |
| enum | { padding = opt::cache_line_padding } |
Padding for internal critical atomic data. Default is opt::cache_line_padding . | |
| typedef cds::opt::v::uninitialized_dynamic_buffer< void *> | buffer |
| Buffer type for internal array. | |
| typedef cds::opt::v::auto_cleaner | value_cleaner |
| A functor to clean item dequeued. More... | |
| typedef cds::atomicity::empty_item_counter | item_counter |
Item counting feature; by default, disabled. Use cds::atomicity::item_counter to enable item counting. | |
| typedef opt::v::relaxed_ordering | memory_model |
| C++ memory ordering model. More... | |
| typedef cds::backoff::Default | back_off |
| Back-off strategy. | |
Static Public Attributes | |
| static constexpr bool const | single_consumer = false |
| Single-consumer version. More... | |
VyukovMPMCCycleQueue default traits.
C++ memory ordering model.
Can be opt::v::relaxed_ordering
(relaxed memory model, the default) or opt::v::sequential_consistent
(sequentially consistent memory model).
A functor to clean item dequeued.
The functor calls the destructor for queue item. After an item is dequeued, value_cleaner
cleans the cell that the item has been occupied. If T
is a complex type, value_cleaner
may be useful feature.
Default value is opt::v::auto_cleaner
|
static |
Single-consumer version.
For single-consumer version of algorithm some additional functions (front()
, pop_front()
) is available.
Default is false


Design Patterns in Ruby - The Abstract Factory
An Example of the Abstract Factory Pattern Implemented in Ruby
The Pattern
There are 2 important parts of Abstract Factory pattern. The first is The Factory itself. This separates the client from possibly many sub-types of factories. The second is The Product, which also needs to be abstract so that no matter which sub-type of factory is being used, the end products need to all look the same as far as the client is concerned. So when a Map Factory can create a Treasure Map, a Star Map or a Trail Map, it still needs to look like just a Map to the client.
The Factory
The Abstract Factory pattern is used to isolate the client from the possibly large number and variety of products in an application. We’ll use the example of a video player. The abstract VideoPlayerFactory class is aware of each sub-type of video player factory and each factory method that those sub-types contain. These factory methods could include make_mute_button
, make_progress_bar
, and make_volume_slider
. Every sub-type of factory would implement each of these functions differently, and the abstract factory doesn’t care. The sub-types of video player factories could be AdVideoPlayerFactory, ChristmasThemeVideoPlayerFactory or StreamingVideoPlayerFactory.
Even though each factory sub-type inherits from the abstract factory, each sub-type should have different behaviors and appearances for things like the mute button and progress bar. For example, the streaming video player’s progress bar might show that it’s always at the end of the video, but allow users to seek to previous parts of the stream. So each sub-type would implement the factory methods differently. The client doesn’t need to know this though. All they need to be able to do is tell the VideoPlayerFactory that they would like a video player to be made, and tell it what kind it should be.
The Products (mute button/scroll bar/etc.)
With this pattern, not only should the client not need to worry about the different types of factories being used; he/she should also not care about what the results products look like. In order to achieve this, the products should also inherit from abstract products that the client knows about. For example, the StreamingVideoPlayerFactory will probably create a StreamingProgressBar. This should inherit from the ProgressBar class, just like each of the other types of progress bars. The client only knows about this abstract class. This way, the client should not need to make any changes to their program when they decide to use a ChristmasThemeVideoPlayer instead. All they need to do is tell the abstract factory to change which sub-type it creates. In the end, the mute button, scroll bar, and volume slider all function the same way as far as the client is concerned, regardles of video player type.


plot.ly has a built-in histogram and kernel density estimator for graphing. There are a few
things to keep in mind, though, when using the built-in. First, plotly.figure_factory
is used to create the objects. Second, the KDE array is made automatically and stored in
the object as a numpy.ndarray
, so this needs to be corrected before dumping the JSON
object.
import plotly as ply
from plotly import figure_factory as FF
import numpy as np
import json
x = np.random.randn(100)
y = np.random.gamma(2, 1, size=100)
z = np.random.laplace(scale = 2, loc = -1, (size=100)
labels = ["Normal", "Γ", "Laplace"]
colors = ["#c0ffee", "#222bad", "#defec8"]
data = [x.tolist(), y.tolist(), z.tolist()]
fig = FF.create_distplot(data, labels, colors = colors, bin_size = 0.2, show_rug = False)
for i in [3, 4, 5]:
fig.data[i]['y'] = fig.data[i]['y'].tolist()
fig['layout'].update(title = "3 Distributions")
with open("distro.json", "w") as f:
json.dump(fig, f)
No other changes are needed in the JavaScript except that the layout is now contained in the fig object and so does not need to be passed in the function.


My Chemical Romance Rock Internet with Reunion Show Announcement
The band’s first performance together since 2012 will take place in December – and the internet is burning with impatience.
The band first changed their profile image on socials to a candle and a new Instagram page popped up and began posting stories, making fans worldwide freeze in anticipation – and see the announcement of the group’s first gig in six years.
In 2013, My Chemical Romance frontman Gerard Way posted a long note detailing the band’s end. Way closed the note, “My Chemical Romance is done. But it can never die. It is alive in me, in the guys, and it is alive inside all of you. I always knew that, and I think you did too. Because it is not a band—it is an idea.”
Since then, speculation about a possible reunion has been off and on, picking up especially in June 2019 when Joe Jonas from the Jonas Brothers said he heard Gerard and Mikey Way, Frank Iero and Ray Toro rehearsing in the hall next to him. Lero initially denied the rumors, before intriguing the audience by suggesting “anything is possible.”
The band will perform at the Shrine Expo Hall in Los Angeles California on Friday, December 20. Tickets go on sale November 1.


{% extends "page.html" %} {% block login_widget %} {% endblock %} {% block main %}
{{ oauth_client.description }} (oauth URL: {{ oauth_client.redirect_uri }}) would like permission to identify you. {% if scopes == ["identify"] %} It will not be able to take actions on your behalf. {% endif %}


a programmer, designer, and engineer from Kazakhstan studying at NYU Abu Dhabi.
This website is a compilation of my creative projects. Explore!
You can find me on...


Cece Hedrick
Designing the Future While Respecting the Past
Home
Fun Facts
Maker Video
Ice Breakers
Animation
Drag me to my target
text
Drop here


Join our community
30-day, hassle-free money back gurantee
Gain access to our full library of tutorials along with expert code reviews. Perfect for any developers who are serious about honing their skills.
Why Us
- Tutorials by industry experts
- Peer & expert code review
- Coding exercises
- Access to our GitHub repos
- Community forum
- Flashcard decks
- New videos every week


intro to js
Change to Red
Want this to turn blue?
Click Me!
Or green cuz blue sucks?
Click Me!
Want to see a
cat
wearing a
bowtie!
?
Click for a Surprise!


Opening: September 28, 1966
Refurbishment: March 7, 1977
Architectural design: Dinis Gomes
Art work: Maria Keil
Platform length: 105 m
Code: IN
Wikipedia page


This demo shows how ShadowQuery makes new programming patterns possible by getting you back behind the wheel. This is an extract of a real life example.
The problem: I want to display a list of several items. Each item has some initially hidden DOM attached, in this case a dialog. Rendering all that DOM takes time, even if it's invisible. The dialog can handle its own stuff, but client code must render its template and this is usually the bulk of the DOM. I want as little arcane deferred rendering logic in the client code as possible.
This demo now demonstrates a relatively simple generic dialog, that works as expected, but also optionally supports deferred rendering. In that case you give the dialog your client template. You can then hook up the handlers on your template when you get the dialog's "rendered" event (not shown in the demo).
That is a generic solution to a somewhat frustrating problem I have faced several times now. Then I usually resorted to putting the dialog at the top and having just one instance. The ShadowQuery solution is much more elegant IMHO. Most importantly: it is relatively easy to come up with that solution using ShadowQuery: that's because it's all straightforward JavaScript. I'm sure you can do the same with several other templating engines ... after taking a deep dive into how to tag JavaScript template strings for example, or otherwise dive rather deeply into your chosen framework.
And I'm pretty sure, it's simple to come up with various other solutions. E.g. a floating container of which there is only one in a given context and that is simply moved around as required. The sky is your limit.


MobileFun
Home
(current)
Products
Login
Contact Us
Available in store and online
Headphones ON World OFF!
New Arrivals - Summer 2020
Previous
Next
Available Categories
Covers
Headphones
Chargers
Screen Protectors


ARIA Modal Dialog Demos
The following example, and each of the linked example tests showcase different features of the modal dialog script.
For more information about the functionality and options of these examples, see the modal dialog documentation on GitHub.
Test information
Each dialog (presented here and on linked pages) may have different initial focus placements, for testing purposes. There may be some initially focused items that result in verbose announcements, for demonstrative purposes. Such examples should likely be avoided in production.
When each dialog is open, focus (via tab key or virtual cursor) should not be able to reach the document beneath the dialog. Browser chrome controls (browser buttons and address bar, etc.) should remain accessible via other means (for example, hitting the F6 key to focus a browser's address bar).
Dialogs have been tested with:
- JAWS 18 & 2018 with Firefox (ESR 52), Chrome (latest) and Internet Explorer 11.
- NVDA 2018.1 & 2018.2.1 with Firefox (ESR 52) and Chrome (latest)
- VoiceOver + macOS High Sierra and iOS 11.4
- TalkBack + Chrome on Android Oreo
Basic Modal Dialog Example
Privacy Information
We heard you like to know about updates to privacy policies. So you should be pleased to know we've updated our privacy policy.
Please contain your excitement.
Basic Modal Dialog test details
The button to activate the modal dialog is assigned its own unique ID, when activated the ID of the specific button used will be stored in a var
. The ID will be referred to again when the dialog is closed and focus needs to return to the specific element that opened it.
A close button
is auto-generated from the script, as there are no manually coded close buttons within the dialog.
In this example the dialog container is focused by default. This will result in JAWS + Firefox and VoiceOver (on desktop) announcing the accessible name and role of the dialog when its opened.
With JAWS and Internet Explorer 11, the accessible name and role of the dialog will be announced, and then the first child element of the dialog, and its role, will be announced.
With NVDA and Firefox, NVDA will announce the accessible name of the dialog, but will not announce the dialog role.
NVDA + Firefox and JAWS + Firefox will treat the focused dialog as if it was a new document loaded, and begin reading the contents of the dialog in sequential order.


| Base-Learner |
Description |
Arguments |
BaselearnerPolynomial |
Fit polynomial base-learner. Note that this base-learner takes just the power of the selected feature. Hence, there is no linear part if one selects, for instance, degree = 2 .
|
degree Polynomial degree of feature (default: 1)
intercept Number of inner knots (default: TRUE)
|
BaselearnerPSpline |
Fit (penalized) spline regression base-learners. |
degree Polynomial degree of bases (default: 3)
n.knots Number of inner knots (default: 20)
penalty Penalty parameter for smoother curves (default: 2)
differences Number of penalized differences of the knots (default: 2)
|
BaselearnerCustom |
Define a custom base-learner by using R functions. |
instantiate.fun Feature transformation, e.g., create spline bases in the case of a spline learner
train.fun Function to train on the data gained by instantiate.fun
predict.fun Function to predict on the object returned by train.fun
param.fun Function to extract parameters as matrix from the object returned by train.fun
|
BaselearnerCustomCpp |
Define a custom base-learner by using C++ functions. |
instantiate.ptr External pointer containing the reference to the C++ feature transformation
train.ptr Function to train on the data obtained by instantiate.ptr which always returns the parameter as matrix
predict.ptr Function to predict by using the parameter obtained by trian.ptr
|
| Loss |
Description |
Arguments |
LossQuadratic |
Using quadratic differences between prediction and response. This loss corresponds to the gaussian distribution and yields ordinary residuals as pseudo residuals.
|
offset Custom offset for initializing the model
|
LossAbsolute |
Using absolute differences between prediction and response. This loss corresponds to the laplace distribution and yields the sign as pseudo residuals.
|
offset Custom offset for initializing the model
|
LossBinomial |
This loss can be used for binary classification and corresponds to the binomial distribution with logit link. Note that the labels are coded as -1 and 1 which yields slightly differences to other algorithms.
|
offset Custom offset for initializing the model
|
LossCustom |
Define a custom loss by using C++ functions. |
loss R function which calculates the loss between true values and a prediction
gradient R function to calculate the gradient of the loss function with ture values and prediction as input
constant.initializer R function to compute the constant loss optimal initialization (using a custom offset suppress this function and returns just the offset)
|
LossCustomCpp |
Define a custom loss by using C++ functions. |
loss.ptr C++ pointer to a function which calculates the loss between true values and a prediction
gradient.ptr C++ pointer to a function to calculate the gradient of the loss function with ture values and prediction as input
constant.initializer.ptr C++ pointer to a function to compute the constant loss optimal initialization (using a custom offset suppress this function and returns just the offset)
|
| Logger |
Description |
Arguments |
LoggerIteration |
The basic logger which loggs the actual iteration. This one is defined automatically by calling, e.g., train(1000) , as stopper with a maximal number of iteration as passed through train() .
|
use.as.stopper Boolean to indicate whether this logger should also be used as stopper.
max.iterations Integer value specifying the maximal numbers of iterations if the logger is used as stopper, otherwise this argument does not have any effect.
|
LoggerInbagRisk |
This logger takes a Loss object and calculates the risk using the train dataset.
|
use.as.stopper Boolean to indicate whether this logger should also be used as stopper.
used.loss Loss object which is used to calculate the risk. Note that this could also be a custom loss and therefore be used to track performance measures.
eps.for.break Numeric value indicating the relative improvement which is used to stop the algorithm if the true improvement falls under eps.for.break .
|
LoggerOobRisk |
This logger takes a Loss object and calculates the risk using a custom out of bag dataset.
|
use.as.stopper Boolean to indicate whether this logger should also be used as stopper.
used.loss Loss object which is used to calculate the risk. Note that this could also be a custom loss and therefore be used to track performance measures.
eps.for.break Numeric value indicating the relative improvement which is used to stop the algorithm if the true improvement falls under eps.for.break .
oob.data List of Data objects which corresponds to the same data objects used in addBaselearner() . Note that each Compboost object has a member function prepareData() which automatically converts a data.frame to a list required by the logger.
oob.response Vector of the response values corresonding to oob.data .
|
LoggerTime |
This logger can be used to measure the ellapsed time at each iteration.
|
use.as.stopper Boolean to indicate whether this logger should also be used as stopper.
max.time Integer value that indicates how much time the algorithm has for the training.
time.unit Character to specify the time unit. Possible choices are minutes, seconds or microseconds.
|


Warriors, Lovers, and Adventurers
October 16th
Story of the Western Wing
Yuan Zhen and the Story of Ying Ying
The Yuan Dynasty
Drama zaju 雜劇
Role Types
Wang Shifu
Story of the Western Chamber
Eight Satiric Songs
"The sun is near, Chang'an is far"
Arrival at the monestary
The Chou
The first encounter
Crimson's reaction
Student abandons his journey
Student and his plans
Renting a Room
A Second encounter
Manipulating the Mass
Act 3
Act 4
Volume 2
Act 5


Reports say United & PSG set to battle for Roma’s Zaniolo as Haaland nears RB Leipzig
by FSA EditorRoma midfielder Nicolo Zaniolo is reportedly attracting interest from England and France.
Nicolo Zaniolo’s stock continues to rise.
The 20-year-old Italy international has established himself as one of Europe’s most sought-after midfielders since joining Roma last season.
And Zaniolo could become the subject of a tug of war between Manchester United and Paris Saint-Germain.
TOP STORY – UNITED & PSG EYEING ROMA STAR
Manchester United and Paris Saint-Germain are willing to spend big for Zaniolo, reports Il Messaggero.
Zaniolo is hot property, having starred for Roma since arriving in the Italian capital from Inter.
Premier League giants United and Ligue 1 champions are ready to pay €60million (£52m) for his services.
ROUND-UP
– United, meanwhile, look set to miss out on Salzburg striker Erling Haaland. The Mirror says Bundesliga outfit RB Leipzig have first refusal on the 19-year-old and only need to pay a release clause of £25.7m.
– According to The Sun, Raheem Sterling – who has 18 months on his Manchester City contract – will not renew unless manager Pep Guardiola stays.
– Borussia Dortmund have joined the race to sign Tottenham teenager Troy Parrott, claims the Express. The 17-year-old is also wanted by Bundesliga champions Bayern Munich.
– L’Equipe reports PSG have made their January transfer plans. Juventus full-back Mattia De Sciglio is of interest, while Julian Draxler and Leandro Paredes could depart Paris.
– Belgium boss Roberto Martinez was open to managing Tottenham prior to Jose Mourinho’s appointment, according to the Daily Star. Spurs turned to former Manchester United manager Mourinho after Mauricio Pochettino’s sacking.


Recently Firefox started to throw an error on some sites that a page was not redirecting properly. On the internet, people gave recommendations to clear the browser cache and cookies, but it didn’t help me. It turned out that the issue was quite different, but simple.
Our company uses Microsoft services for emails, calendars, sharepoints, doing the work, fixing bugs and so on. At some point I lost the ability to check work emails from one laptop. This laptop was in no way special. Office 365 actually worked from Chromium, but not from Firefox. I tried to debug this issue a little. I found multiple reports that Microsoft Office 365 login got stuck in a loop. Almost all recommendations were limited to re-installing the browswer, clearing cookies and cached data. Didn’t work for me. Office 365 relocated to Chromium, no big deal. And Microsoft was to be blamed again.
Some time passed and I found another website which didn’t work on Firefox: https://digid.nl/inloggen. Firefox didn’t enter the infinite loop, but gave an error: “The page isn’t redirecting properly”. It reminded me of the issue with Office 365.
I tried to clear everything from Firefox, tried different versions. Nothing seem to help and the infinite redirect was consistent. With network debugging I found that digid.nl provided two cookies in the first response:
Set-Cookie: _session_id=xxx;Secure; domain=.digid.nl; path=/; expires=Wed, 23 Jan 2019 21:47:39 -0000; HttpOnly
Set-Cookie: _persist=yyy;domain=.digid.nl; HttpOnly;secure; path=/
But I saw a single coookie in following requests to the server:
Cookie: _persist=yyy
After that the server went to the previous step and sent 2 cookies to Firefox. Firefox consistently requested to proceed further with a single request cookie. That continued for a while and stopped with Firefox giving up: “The page isn’t redirecting properly”.
It was easy to find that the expiration time of session_id
cookie was past my current system time. Time difference explained why Firefox immediately removed
this cookie (but did not explain Chromium behavior). My time was 1 hour off and session_id
expiration time was set for 15 minutes.
I had mess with system time and timezones on my machine. Fixing the time fixed login to Office 365 and digid.nl websites.
Check your system time if clearing cookies in Firefox does not help you with infinite redirect loops.


plot functions in Y module: Y.plot...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plotDatasetRemove(dataset=-1,
figureNo=None,
refreshNow=True)
remove given dataset from plot adjust current color index if dataset
== -1 |
source code
|
|
|
|
plotGetXminmax(figureNo=None)
returns tuple (left, right) values on X-axis figureNo None means
"current" |
source code
|
|
|
|
plotGetYminmax(figureNo=None)
returns tuple (bottom,top) values on Y-axis figureNo None means
"current" |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
plotSetFrameTitle(title,
figureNo=None)
figureNo None means "current" |
source code
|
|
|
|
plotSetTitle(title='
' ,
figureNo=None)
title = '' means <no title> figureNo None means
"current" |
source code
|
|
|
|
plotSetXTitle(title='
' ,
figureNo=None)
title = '' means <no title> figureNo None means
"current" |
source code
|
|
|
|
plotSetYTitle(title='
' ,
figureNo=None)
title = '' means <no title> figureNo None means
"current" |
source code
|
|
|
|
plotSetAxis(setting=' equal ' ,
figureNo=None)
set axis settings for both X and Y axes
settings can be one of:
'normal':
'equal':
'freeze':
or 'tight' or'fit':
or a 4-tuple (xMin,xMax,yMin,yMax) |
source code
|
|
|
|
plotSetXAxisFormat(format=' %s ' ,
figureNo=None)
sets format to be used to label axis
`format` can either be
a callable - to be called for each tick value
or
a string, like "%s" or "%2d", ... |
source code
|
|
|
|
plotSetYAxisFormat(format=' %s ' ,
figureNo=None)
sets format to be used to label axis
`format` can either be
a callable - to be called for each tick value
or
a string, like "%s" or "%2d", ... |
source code
|
|
|
|
plotSetXAxis(bounds=( ' fit ' , ' fit ' , ' auto ' ) ,
figureNo=None)
bounds is a tuple: (leftBound,rightBound, interval)
[the third is optional]
leftBound, rightBound can be one of:
<a value>
'auto' (default) sets bound to near tickMark
'fit' sets bound to "tightly" fit the datapoints
None or '' do not change
interval can be one of:
'auto' (default) sets tick intervals "nicely" (linearly spaced)
<a value> |
source code
|
|
|
|
plotSetYAxis(bounds=( ' fit ' , ' fit ' , ' auto ' ) ,
figureNo=None)
bounds is a tuple: (leftBound,rightBound, interval)
[the third is optional]
leftBound, rightBound can be one of:
<a value>
'auto' (default) sets bound to near tickMark
'fit' sets bound to "tightly" fit the datapoints
None or '' do not change
interval can be one of:
'auto' (default) sets tick intervals "nicely" (linearly spaced)
<a value> |
source code
|
|
|
|
|
|
|
plotFigure(which_one=None,
parent=None)
if which_one = None : start a new plot window
if which_one is 'integer' : select that figure as active |
source code
|
|
|
|
plotFigureGetNo(createNewIfNeeded=False)
return figureNo of current figure |
source code
|
|
|
|
plotRaise(figureNo=None)
bring current plotframe to the top |
source code
|
|
|
|
plotClear(figureNo=None)
clear all graphs and images from current plot |
source code
|
|
|
|
plotClose(which_one=None)
close plot window |
source code
|
|
|
|
plotxy(arr1,
arr2=None,
c=' -+ ' ,
logY=False,
logX=False,
hold=None,
smartTranspose=True,
logZeroOffset=0.01,
figureNo=None)
arr1 is a "table" of x,y1,...,yn values
if arr2 is given than arr1 contains only the x values
and arr2 is "table" y1,...,y2
if hold is not None:
if hold is True
turn plothold on before drawing
else
turn plothold off before drawing
otherwise
do nothing about current hold setting |
source code
|
|
|
|
ploty(arrY,
c=' -+ ' ,
logY=False,
logX=False,
hold=None,
smartTranspose=True,
logZeroOffset=0.01,
figureNo=None)
arrY is a "table" of y1,...,yn values
x-values of 0,1,2,3,4 are used as needed |
source code
|
|
|
|
|
|
|
plotsave(fn=None,
format=' png ' ,
figureNo=None)
save image of plot into a file if `fn` is None calls FN() for you |
source code
|
|
|
|
plotsave_csv(fn=None,
sep=' \t ' ,
transpose=True,
figureNo=None)
save comma separated value table into a text file
use sep (instead of comma) to separate values
if transpose:
values are written in columns for each dataset
x1 y1 ...other datasets to the right... |
source code
|
|
|
|
|
|
|
plotMouse__graph2window(pts,
figureNo=None)
convert graph coordinates to wxWindow coordinates pts: one or list of
many x,y coordinate(s) |
source code
|
|
|
|
plotMouse__window2graph(p,
figureNo=None)
convert wxWindow coordinates to graph coordinates pts: one or list of
many x,y coordinate(s) |
source code
|
|
|
|
|
|
|
|


Hello, I'm Mike
Developer and consultant to financial technology companies. I'm originally from Michigan and went to Michigan State. I'm currently living in NYC.
I'm also a wilderness guide and run hiking, snowshoeing, and backpacking trips throughout the northeast. Just your typical New Yorker..


Jetlines sues WestJet founder
by The Canadian PressCanada Jetlines Ltd. says it is suing WestJet Airlines co-founder David Neeleman in the United States for allegedly interfering in the fledgling discount carrier's efforts to get off the ground.
Executive chairman Mark Morabito says it launched legal proceedings in the U.S. district court in Connecticut against Neeleman, DGN Corp. and Breeze Aviation Group, for "tortious interference with business expectancy and violation of the Connecticut Unfair Trade Practices Act."
In a statement of claim, it alleges Neelman and his affiliates embarked on "a predatory scheme" to destroy the relationship between Jetlines and an international investment bank that ultimately terminated its help in raising new capital to start the airlines.
It claims the defendants induced Jetlines CEO Lukas Johnson to participate in secret communications and meetings in order to lure him away to help Neeleman's own new airline venture called Moxy, which is to be owned and operated by Breeze Aviation. The allegations have been proven in court and Neeleman couldn't be immediately reached for comment.
Jetlines says Johnson misled it and the bank about his commitment to the airline, its financing effort and launch and then resigned on Aug. 27, 2018, just as it was poised to approach prospective investors.
That prompted the bank to immediately suspend efforts to get new financing for Jetlines saying Johnson's departure was a big blow to the company that may not be overcome. It terminated its support on Dec. 8, 2018.
Vancouver-based Canada Jetlines announced last month that it was postponing its planned December launch and laying off most employees after failing to secure $40 million in required financing and losing investment partners.


--- layout: post title: Research visit Waterloo tags: - News - Research ---
As part of the BMW ProMotion program, I'm currently visiting Prof. Chris Eliasmith's group, the Computational Neuroscience Research Group (CNRG) for six weeks. This gives me the great oportunity to discuss my research and interact with local experts like Dr. Terrence Stewart and to work in the inspiring environment at University of Waterloo .
Furthermore, I was also able to do some sight-seeing in Canada and visit Toronto and Niagara Falls.


Customer information
Full name:
Email:
State:
Mailing List Sing-up
Add me to your mailing list
No thanks


The polynomial source is a SPICE2 model, which is also known in other SPICE derivatives.
Nonlinear voltage controlled current source. The right port current at pin p2 (=p2.i) is controlled by the left port vector of voltages at the pin vector pc[:] via
p2.i = f(pc[1].v - pc[2].v, pc[3].v - pc[4].v,...)
The controlling port (left) current vector is zero.
f is a polynomial in N variables s1...sN of the following form with M+1 coefficients a0, a1, a2,...aM.
f = a0 + a1s1 + a2s2 + ... + aNsN + a(N+1)s1² + a(N+2)s1s2 + ... + a(.)s1sN + a(.)s2² + a(.)s2s3 + ... + a(.)s2sN + a(.)s3² + s3s4 + ... + a(.)s4sN + ... + a(.)sN² + a(.)s1³ + a(.)s1²s2 + a(.)s1²s3 + ... + a(.)s1²sN + a(.)s1s2² + a(.)s1s2s3 + ... + a(.)s1s2sN + ... + a(.)sN³ + ...
The Coefficients a(.) are counted in this order. Reaching M, the particular sum is canceled.
In connection with the VCC, s1...sN are the voltages of the controlling side: s1=pc[1].v - pc[2].v, s2=pc[3].v - pc[4].v, s3=...
The corresponding SPICE description of the VCC polynomial source is the following:
Gname A1 A2 POLY(N) E11 E21 ... E1N E2N P0 P1...
where Gname is the name of the instance, A1 and A2 are the nodes between them the current source is arranged, whose current is calculated,
N is the number of the controlling voltages, E11 E12 ... E1N E2N are pairs of nodes between them the controlling voltages
are gripped, and P0, P1... are the coefficients that are called a0, a1, ... aM in the description of the polynomial f above.
To describe the SPICE line in Modelica, the following explanation would be useful:
Gname -> G_VCC_POLY name A1, A2 -> pins name.p2, name.p1 N -> parameter N E11 -> name.pc[2] E12 -> name.pc[1] ... E1N -> name.pc[N] E2N -> name.pc[N-1] P0, P1 -> polynomial coefficients name.coeff(coeff={P0,P1,...})


We are interested in understanding the conditions under which one player (agent) may convince another that he possesses information without having to reveal what that information is. The topic arose in the study of cryptographic protocols where it was given the designation “zero-knowledge proof”. The motivation for establishing such a protocol was obvious enough from an operational standpoint: if one agent could convince another that he was in the possession of some sensitive information, he might like to do so and continue making use of the information, while still keeping it secret. The approach was motivated by the fact that certain well-known complexity classes, like the class NP of problems solvable by a non-deterministic Turing machine in polynomial time, could be regarded as classes of problems decidable by a pair of interacting algorithms possessing different computational resources.
Highlight
Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia
“IF WE CONTINUE TO DEVELOP OUR TECHNOLOGY, WITHOUT WISDOM OR PRUDENCE, OUR SERVANT MAY PROVE TO BE OUR EXECUTIONER. ” — Omar N. Bradley
In cryptography the focus is on the resources of computation and communication available to an agent, whereas in game theory one only makes assumptions about an agent’s psychology (that he/she is rational) and knowledge (which can be limited in many different ways). Without being able to make explicit assumptions about the availability of communication and computational resources, the barrier to realizing the phenomenon of zero-knowledge interactive proofs within game theory seems considerable.
The phenomenon of zero-knowledge signalling depends first upon the fact that games with unobservable moves allow for the possibility of a unique non revealing strategy on the part of an informed player 1. The class of games with payoffs structured in the way specified by the theorem is precisely this class. When the unique non-revealing strategy for an informed player 1 coincides with the player’s optimal strategy, the successful execution of an optimal strategy effectively separates player 1 as an informed player. This is because the only way to guarantee that player 2 will not learn the true stage game, and hence guarantee the optimal strategy’s expected payoff, is by using the information about which is the true stage game. The probability that an uninformed player could persist in the execution of a non-revealing strategy becomes vanishingly small as the number of rounds increases.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/notation.20fail.html ---
I am in a situation where this term compiles fine:
nonempty (𝒞.equiv (locally_ringed_valued_space.to_𝒞.restrict U) (𝒞.Spa A))
but if I put
notation A ` ≅ `:50 B := nonempty (𝒞.equiv A B)
and try
(locally_ringed_valued_space.to_𝒞.restrict U) ≅ (𝒞.Spa A)
I get the error
type mismatch at application (λ (x_1 : 𝒞 ↥U) (x_2 : 𝒞 ?m_1[x_1]), x_1 ≅ x_2) (𝒞.restrict U (𝒱.to_𝒞 locally_ringed_valued_space)) (𝒞.Spa A) term 𝒞.Spa A has type 𝒞 ↥(Spa A) : Type (?+1) but is expected to have type 𝒞 ?m_1[𝒞.restrict U (𝒱.to_𝒞 locally_ringed_valued_space)] : Type (max ? (?+1))
Similarly if I switch the two terms around I get
type mismatch at application (λ (x_1 : 𝒞 ↥(Spa A)) (x_2 : 𝒞 ?m_1[x_1]), x_1 ≅ x_2) (𝒞.Spa A) (𝒞.restrict U (𝒱.to_𝒞 locally_ringed_valued_space)) term 𝒞.restrict U (𝒱.to_𝒞 locally_ringed_valued_space) has type 𝒞 ↥U : Type (max u (?+1)) but is expected to have type 𝒞 ?m_1[𝒞.Spa A] : Type (max ? (?+1))
Is this a limitation of notation somehow? I'd be surprised -- I'd be more likely to believe that I'm not using it correctly or I've made some other error. If notation is just syntactic sugar then as far as I can see the thing that's failing just directly translates into the thing that's succeeding.
Oh! I've got to the bottom of it and it's part of the story which I didn't mention. The \iso
notation is overloaded, and for some reason Lean isn't trying as hard to unify because it is not sure which function I mean. If I change my notation to an un-overloaded one then it works.
I guess Lean is being more cautious in trying to unify because it doesn't want to end up spending a lot of time trying to typecheck something which doesn't typecheck, or something.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


The order of style is "Inline > Internal and External"
Between Internal and External, the order of execution will take precedence. The last executed style will be applied.


brick
`Prev `__
B
`Next `__
--------------
**brick**: n.
1. A piece of equipment that has been programmed or configured into a
`*hung* <../H/hung.html>`__, `*wedged* <../W/wedged.html>`__,unusable
state. Especially used to describe what happens to devices like routers
or PDAs that run from firmware when the firmware image is damaged or its
settings are somehow patched to impossible values. This term usually
implies irreversibility, but equipment can sometimes be unbricked by
performing a hard reset or some other drastic operation. Sometimes
verbed: “Yeah, I bricked the router because I forgot about adding in the
new access-list.”.
2. An outboard power transformer of the kind associated with laptops,
modems, routers and other small computing appliances, especially one of
the modern type with cords on both ends, as opposed to the older and
obnoxious type that plug directly into wall or barrier strip.
--------------
+------------------------------------+----------------------------+------------------------------+
| `Prev `__ | `Up <../B.html>`__ | `Next `__ |
+------------------------------------+----------------------------+------------------------------+
| Breidbart Index | `Home <../index.html>`__ | bricktext |
+------------------------------------+----------------------------+------------------------------+


English (native), French (reading proficient)
Bash, HTML, CSS, JavaScript, Elixir, VI
Full Stack Web Development Certification
2016 – 2017
Associate’s Degree, Web Programming
2015 – 2017
Graphic Design
Ember, Meteor, React + Redux, Phoenix
Erlang, Elixir, Elm, JavaScript, Ruby
CouchDB, Postgres
Bootstrap, SASS, Functional Programming, Vim
Business Communications, Critiquing, Foundational Learning, Human Relations, Lean Production Strategies, Professional Development, Professional Stamina, Project Management, Self-Directed Learning, Self-Motivation, Team Leadership, Teamwork


Use this pattern when you need to ask users for their names.
Types
1) General name field
You should follow this pattern when you need to ask for a user’s name.
You should only ask for names if you need it for a service.
{{general_name_field}}
{%- highlight html -%}{{general_name_field}}{%- endhighlight -%}
2) Multiline name field
You should follow this pattern when you know that your users will follow the
given-name and family-name convention.
{{multiple_name_field}}
{%- highlight html -%}{{multiple_name_field}}{%- endhighlight -%}
Guidelines
Make sure the name field works for your users
Name fields should be long enough to accommodate the names of your users
Make sure that you support all characters that users may need to enter,
including symbols and numbers
Set the spellcheck attribute to false so that
you do not spellcheck a user's name
Single name fields
This accommodates the widest range of name types and formats
Reduces the risk of users entering their name in the incorrect format
However, by using this, you may not be able to extract parts of a name
Multiple name fields
Use multiple name fields with discretion.
Not everyone's name fits the general first-name, last-name convention.
Using multiple name fields increases the risk of a person's name
not fitting the same convention. Hence, it may be entered incorrectly.
Labelling of name fields
1. For single name fields, use "Full Name".
2. For multiple name fields, use:
'Given Name'
'Family Name'
Make it clear whether you are asking for a user's common name, or
as written on an official document such as NRIC or passport.
If you are unsure of how your users will fill in their name or know that
you have a wide range of users with different formats for their names,
it is highly recommended to use a single name field to prevent errors and confusion.
This is to ensure that your users:
Do not get confused as to how they should be filling in their name
Reduce the risk that their name may be filled in wrongly
Autocomplete
Use the autocomplete attribute when asking for a user's name.
This makes it easier for the user to fill in their name if they have done so
previously on the browser.
Full name: use name
Given name: use given-name
Family name: use family-name
You will need to include the autocomplete attribute to meet
WCAG 2.1 AA
for production.


I would like to grow in the software developer world. I have also been really intrigued by product management and might want to venture in that in the future. It all depends on how this course goes
I would like to gain public speaking skills. I get a bit flustered around larger groups of people especially if I don't know them. This skill is important to me because regardless of wherever I end up this skill will remain with me forever. It will also help me in my role as a software developer when it comes to explaining my tech designs to my team and allow me to be heard.
My strengths are that I have the ability to understand complex problems once I take a step back. I also have a good work ethic and my previous role as a Travel Consultant has conditioned me well for multimasking. Being in the sales industry, I have good communication skills and have extensive experience in managing stakeholder/client expectations. I tend to get flustered and panicked when I am confronted with a problem which is hard to solve. I am aware that as a software developer, I will come across a zillion problems I won’t have an answer to. This course is actually helping me realise that if I take a step back, things fall into pieces. I also lack confidence - especially while I am doing this course. Self doubt creeps in from time to time which is a bummer.
I’m aware I can get flustered when I get stuck on a problem and I intend to mitigate it by taking more short breaks and coming back to the problem. I’ve tired this previously and it seems to be working for me
I’ll timebox my task and iIf i’m still having trouble figuring it out on my own with tools such as google I will either chat to one of my classmates or a facilitator for help.
I expect guidance from my facilitator, I don’t necessarily want the answer just a push in the right direction and also honest constructive feedback
Not really, I’ve dedicated this time purley for Dev Academy.


Create Userfriendly Interface for your Applications & Products with Maruti Admin
Free Maruti Admin
$0 Only
Maruti Admin is basic yet very useful bootstrap 2 dashbaord template for your projects.If you are looking for modern yet clean admin template for your backend project. Maruti Admin is the right choice for you. If your application requires more options. We like to suggest you the Premium Templates.
- 1 Basic Dashboard
- 14+ Pages Template
- 10+ UI Components
- Bootstrap 2 Version
- Icons
- Fully Responsive Pages
- No Support Provided
- Sass Base CSS
- Easy To Customize
- Basic Table Examples
- Form Page Included
- No Documentation
- Backlink Required


PALMETTO A film review by Steve Rhodes Copyright 1998 Steve Rhodes
RATING (0 TO ****): ***
As writer, newspaper man, and recently freed ex-con Harry Barber, Woody Harrelson is in a heap of trouble. All hell is breaking loose, and he's long sense lost control of the situation.
It all started when an incredibly sexy, married woman named Rhea Malroux, played by a perfectly cast Elisabeth Shue from LEAVING LAS VEGAS, started coming on to him in a bar. She wanted him to meet her to discuss a job with a certain element of risk involved. And she didn't just say it, she almost panted it. Wearing a tight, low-cut pastel sweater, she was not a woman you'd want to refuse. ("I'm just a girl with a little ambition," she tells him later. Watch out for people with such false modesty.)
When Rhea met him at his rented bungalow by the beach, she explained her foolproof plan. Her stepdaughter Odette, played by Chloe Sevigny from KIDS, was to be kidnapped. Well not exactly. They were just going to say she was being kidnapped. All they needed Harry to do was type a note, make a threatening phone call to her sick husband, and collect the $500,000 ransom.  Her husband would never involve the police so there was no element of risk. But, as the press notes aptly say, "nothing is 'that' easy."
Set in the bright Florida sun, PALMETTO may not look like a film noir, but it is firmly routed in that genre.
Frequent thunder without rain means the characters sweat profusely in the thick humidity. And as in BODY HEAT, the mixture of humidity and tensions causes sex to break out on the set. When Rhea meets Harry in his cabin, he doesn't trust her, so he frisks her to see if this is a setup and whether she is wearing a wire. They both get so involved in the examination that it turns into a very hot sex scene. Similarly when her stepdaughter drops by another day, she's like a cat in heat as well.
The story asks the traditional questions of "Who is conning whom?" and "Who is for real?" Although several of the plot elements are easy to predict, many aren't. One of the best small twists occurs when Harry is first brought in by the police after they find out about the kidnapping. This confrontation does not go at all as Harry or the audience suspects.
The excellent actor Woody Harrelson gives a surprisingly self-controlled and almost pensive performance. His vulnerable character increasing loses it, and every time he thinks he's ahead of the game, he isn't. ("I was in it right up to my ears, and no idea how I was going to get myself out.") Woody takes a more subtle approach to the role that he typically has to others. The result is a character who seems quite genuine. Further grounding the story in reality, Gina Gershon gives a rock solid performance as his blowtorch wielding, sculptor girlfriend with whom he lives.
"I tried writing but nothing comes out," Harry tells us in voice-over. "There's nothing worse than a writer who has nothing to say." Well screenwriter E. Max Frye's adaptation of James Hadley Chase's novel, "Just Another Sucker," has a lot to say. Although little of it breaks any new ground, the movie by German director Volker Schlondorff thoroughly entertains. You won't feel cheated like Harry. And you'll get your money's worth as the twists and surprises accelerate as the movie races to its conclusion.
PALMETTO runs 1:52. It is rated R for sex, violence and profanity and would be fine for mature teenagers.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Disables the session in
ActiveStorage::Blobs::ProxyController
andActiveStorage::Representations::ProxyController
in order to allow caching by default in some CDNs as CloudFlareFixes #44136
Bruno Prieto
Add
tags
to::ActiveStorage::Analyzer::AudioAnalyzer
outputKeaton Roux
Add an option to preprocess variants
ActiveStorage variants are processed on the fly when they are needed but sometimes we're sure that they are accessed and want to processed them upfront.
preprocessed
option is added when declaring variants.class User < ApplicationRecord has_one_attached :avatar do |attachable| attachable.variant :thumb, resize_to_limit: [100, 100], preprocessed: true end end
Shouichi Kamiya
Fix variants not included when eager loading multiple records containing a single attachment
When using the
with_attached_#{name}
scope for ahas_one_attached
relation, attachment variants were not eagerly loaded.Russell Porter
Allow an
ActiveStorage
attachment to be removed via a form postAttachments can already be removed by updating the attachment to be nil such as:
User.find(params[:id]).update!(avatar: nil)
However, a form cannot post a nil param, it can only post an empty string. But, posting an empty string would result in an
ActiveSupport::MessageVerifier::InvalidSignature: mismatched digest
error being raised, because it's being treated as a signed blob id.Now, nil and an empty string are treated as a delete, which allows attachments to be removed via:
User.find(params[:id]).update!(params.require(:user).permit(:avatar))
Nate Matykiewicz
Remove mini_mime usage in favour of marcel.
We have two libraries that are have similar usage. This change removes dependency on mini_mime and makes use of similar methods from marcel.
Vipul A M
Allow destroying active storage variants
User.first.avatar.variant(resize_to_limit: [100, 100]).destroy
Shouichi Kamiya, Yuichiro NAKAGAWA, Ryohei UEDA
Add
sample_rate
to::ActiveStorage::Analyzer::AudioAnalyzer
outputMatija Čupić
Remove deprecated
purge
andpurge_later
methods from the attachments association.Rafael Mendonça França
Remove deprecated behavior when assigning to a collection of attachments.
Instead of appending to the collection, the collection is now replaced.
Rafael Mendonça França
Remove deprecated
ActiveStorage::Current#host
andActiveStorage::Current#host=
methods.Rafael Mendonça França
Remove deprecated invalid default content types in Active Storage configurations.
Rafael Mendonça França
Add missing preview event to
::ActiveStorage::LogSubscriber
A
preview
event is being instrumented in::ActiveStorage::Previewer
. However it was not added inside ActiveStorage's LogSubscriber class.This will allow to have logs for when a preview happens in the same fashion as all other ActiveStorage events such as
upload
anddownload
inside Rails.logger.Chedli Bourguiba
Fix retrieving rotation value from FFmpeg on version 5.0+.
In FFmpeg version 5.0+ the rotation value has been removed from tags. Instead the value can be found in side_data_list. Along with this update it's possible to have values of -90, -270 to denote the video has been rotated.
Haroon Ahmed
Touch all corresponding model records after ActiveStorage::Blob is analyzed
This fixes a race condition where a record can be requested and have a cache entry built, before the initial
analyze_later
completes, which will not be invalidated until something else updates the record. This also invalidates cache entries when a blob is re-analyzed, which is helpful if a bug is fixed in an analyzer or a new analyzer is added.Nate Matykiewicz
Add ability to use pre-defined variants when calling
preview
orrepresentation
on an attachment.class User < ActiveRecord::Base has_one_attached :file do |attachable| attachable.variant :thumb, resize_to_limit: [100, 100] end end <%= image_tag user.file.representation(:thumb) %>
Richard Böhme
Method
attach
always returns the attachments except when the record is persisted, unchanged, and saving it fails, in which case it returnsnil
.Santiago Bartesaghi
Fixes multiple
attach
calls within transaction not uploading files correctly.In the following example, the code failed to upload all but the last file to the configured service.
ActiveRecord::Base.transaction do user. .attach({ content_type: "text/plain", filename: "dummy.txt", io: ::StringIO.new("dummy"), }) user. .attach({ content_type: "text/plain", filename: "dummy2.txt", io: ::StringIO.new("dummy2"), }) end assert_equal 2, user. .count assert user. .first.service.exist?(user. .first.key) # Fails
This was addressed by keeping track of the subchanges pending upload, and uploading them once the transaction is committed.
Fixes #41661
Santiago Bartesaghi, Bruno Vezoli, Juan Roig, Abhay Nikam
Raise an exception if
config.active_storage.service
is not set.If Active Storage is configured and
config.active_storage.service
is not set in the respective environment's configuration file, then an exception is raised with a meaningful message when attempting to use Active Storage.Ghouse Mohamed
Fixes proxy downloads of files over 5mb
Previously, trying to view and/or download files larger than 5mb stored in services like S3 via proxy mode could return corrupted files at around 5.2mb or cause random halts in the download. Now,
ActiveStorage::Blobs::ProxyController
correctly handles streaming these larger files from the service to the client without any issues.Fixes #44679
Felipe Raul
Saving attachment(s) to a record returns the blob/blobs object
Previously, saving attachments did not return the blob/blobs that were attached. Now, saving attachments to a record with
#attach
method returns the blob or array of blobs that were attached to the record. If it fails to save the attachment(s), then it returnsfalse
.Ghouse Mohamed
Don't stream responses in redirect mode
Previously, both redirect mode and proxy mode streamed their responses which caused a new thread to be created, and could end up leaking connections in the connection pool. But since redirect mode doesn't actually send any data, it doesn't need to be streamed.
Luke Lau
Safe for direct upload on Libraries or Frameworks
Enable the use of custom headers during direct uploads, which allows for the inclusion of Authorization bearer tokens or other forms of authorization tokens through headers.
Radamés Roriz
Please check [7-0-stable]) for previous changes.


{{event.author.full_name}} updated the priority of the task "{{ event.event_info.task_title }}" from to on


|
| | __construct (dacapo $ds=null, $options=array()) |
| |
| | getUser () |
| |
| | getDemographics () |
| |
| | getMatches () |
| |
| | getLastError () |
| |
| | getSqlError () |
| |
| | setOption ($opt, $val) |
| |
| | check_user_email ($email) |
| |
| | check_username ($username) |
| |
| | check_password ($password, $password_repeat) |
| |
| | check_valid_user ($user, $password, $user_active, $email_verification=null) |
| |
| | check_valid_email ($email, $user_active, $email_verification=null) |
| |
| | password_strength ($password, $special_chars) |
| |
| | suggest_password ($chars, $len) |
| |
| | is_valid_email ($email) |
| |
| | is_valid_email_domain ($email) |
| |
| | getDomainFromEmail ($email) |
| |
Class ithaca
User authorization (create account, login etc)
Required classes:
| __construct |
( |
dacapo |
$ds = null , |
|
|
|
$options = array() |
|
) |
| |
| check_password |
( |
|
$password, |
|
|
|
$password_repeat |
|
) |
| |
- Parameters
-
| $password | |
| $password_repeat | |
- Returns
- bool
| check_user_email |
( |
|
$email | ) |
|
| check_username |
( |
|
$username | ) |
|
- Parameters
-
- Returns
- bool
MySQLi a UNIQUE index is case insensitive, so duplicated records like 'User', 'user' will not permitted
PostgreSQL a UNIQUE index is NOT case insensitive So, to avoid duplicated records like 'User', 'user' CREATE UNIQUE INDEX users_idx1 on users (lower(username)); CREATE UNIQUE INDEX users_idx2 on users (lower(email));
| check_valid_email |
( |
|
$email, |
|
|
|
$user_active, |
|
|
|
$email_verification = null |
|
) |
| |
- Parameters
-
| $email | |
| $user_active | |
| null | $email_verification | |
- Returns
- bool
| check_valid_user |
( |
|
$user, |
|
|
|
$password, |
|
|
|
$user_active, |
|
|
|
$email_verification = null |
|
) |
| |
Check if a password belongs to user (identified by username or email)
- Parameters
-
| string | $user | username or email |
| string | $password | |
| $user_active | |
| bool | $email_verification | |
- Returns
- bool
| getDomainFromEmail |
( |
|
$email | ) |
|
Check if expression is valid email address
- Parameters
-
- Returns
- mixed
| is_valid_email_domain |
( |
|
$email | ) |
|
| password_strength |
( |
|
$password, |
|
|
|
$special_chars |
|
) |
| |
Get password strength
- Parameters
-
| string | $password | |
| $special_chars | |
- Returns
- int
| suggest_password |
( |
|
$chars, |
|
|
|
$len |
|
) |
| |
Create random string from given string
- Parameters
-
| string | $chars | the string to use its characters |
| int | $len | rando string length |
- Returns
- string
| $c_users_email_verification_date |
|
private |
| $c_users_registration_date |
|
private |
The documentation for this class was generated from the following file:


|
| Last modified on Sat Jul 22 11:14:10 2023 UTC. | Improve this page |
In previous versions, µOS++ used the CamelCase naming convention, but, after a long consideration, the naming was brought back to what the ISO standard libraries use, and to what existing coding styles (like MISRA, JSF) recommend, which is underscore separated lower case names (or snake case).
Do not use contractions. Whenever possible, it is recommended to use the full words; shortening words in member or member function names does not make the program shorter or faster; full names, when used properly, highly increase the readability of the program.
int initialise(); // instead of init();
int configure(); // instead of config();
...
int delay_seconds; // instead of delay_sec;
Names should be self explanatory, such that they do not need comments to further explain what they do.
search_user_by_phone_number(phone); // instead of search_user()
A name should not duplicate the context in which it is defined. Always remove the context from a name if that doesn’t decrease its readability.
class menu_item {
// Bad.
void handle_menu_item_click();
// Good.
void handle_click();
}
Names can be made singular or plural depending on whether they hold a single value or multiple values, thus arrays and collections should be plural.
int id;
int ids[];
When the same data is represented by multiple types, for example arrays and collections, the names should be suffixed with the type:
thread_t* properties_list;
thread_t* properties_array[];
It is still debatable whether the extra type should be suffixed to all names. Modern editors, with accurate indexers, are capable of showing the variable definition when hovering over the name, thus providing help in case it is not clear when the variable is an array or not. Plus that the presence of parenthesis is a clear sign of an array.
When defining pairs of opposed actions, use the proper antonyms:
int start_acquisition();
int stop_acquisition();
int enable_interrupts();
int disable_interrupts();
Sometimes, even if the words are not listed in dictionaries as antonyms, the pairs of opposed names are defined by practice:
// For hardware signals, like chip select
int assert();
int deassert();
// For synchronisation objects, like mutex
int acquire();
int release();
When defining actions, prefer start/stop to begin/end, since they have a stronger verb-like meaning (end is more an adjective than a verb).
int start_acquisition(); // instead of begin_acquisition()
int stop_acquisition(); // instead of end_acquisition()
However, when the meaning is adjectival, for example adding determinants to a noun, the pair begin/end is preferred.
int list_begin; // instead of list_start
int list_end; // instead of list_stop
Class names are singular nouns or nominative constructs; they do not need to start with upper case letters.
class logger;
class circular_buffer;
Derived class names should extend the base class name, by adding a differentiator at the end.
class device_character_buffered : public device_character
{
// ...
};
When an abstract class is used as a base class for concrete implementations, the suffix _base
can be added to the name, and this name can be skipped in the derived class name:
class device_character_buffered_usart0 : public device_character_buffered_base
{
// ...
};
Templates are a great C++ feature, that can be used for many purposes, with the common one being to implement compile time polymorphism.
As far as C++ is concerned, there is no such thing as a template class, there is only a class template.
Class template names follow the same convention as the class names. No need to prefix them with anything.
There are several template parameter types, parameters naming user-defined types (like classes), parameters naming primitive types and constant parameters (usually integer).
Although not required by the language, it is recommended to define parameters naming types with typename T
.
In class templates, it is recommended to alias the template parameters to new names, and use these new names in code, reserving the template parameters only to define the template syntax.
template <typename T, typename U = void, int N>
class pin
{
public:
using gpio = T;
using result_t = U ;
static constexpr int bit = N;
// ...
}
// Explicit instantiation
template class pin<GPIOC1>;
// Define a type alias.
using my_pin = class pin<GPIOC1>;
Function names are formed from lower case letters.
Since functions define actions to be performed upon the object, the function name should have the function of a predicate, and usually start with an imperative verb.
int read();
If there are multiple functions that perform similar actions, they should differentiate by the following noun, with the function of a direct complement.
int read_byte();
long read_long();
void read_block();
The rule of starting with a verb is not absolute, when multiple functions are logically grouped by a common criteria, then predicative groups can be used as function names, and the verb is placed at the end. However, when such names occur, it might be a sign that the design can be further refined by defining additional objects, for example instead of:
void critical_enter();
void critical_exit();
a separate object to manage critical sections might be useful, like:
class critical
{
void enter(void);
void exit(void);
};
In this case the naming convention is again simplified, according to the initial recommendation to use a verb.
Accesses data immediately (i.e., shorthand getter of internal data). Generally to be avoided; instead, use accessors (see below).
Declaratively sets a variable or a member to a value. Generally to be avoided; instead, use mutators (see below).
Sets a variable or a member back to its initial value or state.
Requests data, which takes time.
Removes something from somewhere, for example an object from a collection. The objects themselves may continue to live, but outside of the collection.
Completely erases something from the realm of existence.
Creates new data from existing data.
Handles an action. Often used when naming a callback method.
Implement a private action, usually paired with a public similar name.
As in most object oriented designs, member variables are usually private to the class and external direct access to them is discouraged. Instead, special accessors and mutators should be defined.
The name should generally contain the variable name, without parameters for the accessors and with at least one parameter for the mutators.
private:
int prio_;
public:
int prio(void);
void prio(int);
When dealing with hardware, even if the memory mapped registers are seen as class members, it is recommended to prefix member functions with read/write, not get/set, which are usually the sign of accessors/mutators in other languages.
hal::cortexm::reg32_t
read_mode(void);
void
write_mode(const hal::cortexm::reg32_t value);
Functions that return boolean values should start with boolean verbs, like is, has, should, does.
Describes the existence of a characteristic or state.
Depending on the context, past or future tense versions, like was or will may be more appropriate.
bool is_available();
bool was_interrupted();
bool will_block();
Describes whether the current context possesses a certain attribute (value or state).
bool has_members();
// Bad
bool are_members_present();
Describes whether the current context is capable of a certain positive action.
bool does_return();
// Bad
bool returns();
Reflects a positive conditional statement (usually a boolean) coupled with a certain action.
bool should_update();
Generally avoid inserting _not_
between the words to define negative logic; instead use the positive logic names prefixed with the language !
operator.
In classes implementing device drivers, there are member functions that can be called only before the device is enabled and functions that can be called at any moment.
To mark this distinction, the recommended names should start with initialise for functions that are used before the device is enabled and with configure for functions that can be used at any moment.
bool initialise_something(void);
bool configure_baud_rate(baud_rate_t baud_rate);
bool configure_high_speed(void);
It is recommended to use the full words, shortening initialise()
to init()
or configure()
to config()
does not make the program shorter or faster.
When dealing with device drivers, changing the state of the device is in fact a configuration change, so it is more appropriate to name functions like configure_something()
.
Similar to member functions, all member variables names use lower case letters.
Since member variables define characteristics of the object, the member variables name should have the function of an attribute, and usually start with a noun. Boolean status variables naming convention should follow the boolean function naming convention, i.e. start with a verb like is, has, does, at present/past/future tense.
As the most common type of member variable names, the private member variables should be suffixed with _
.
private:
int count_;
char* buffer_address_;
int buffer_size_;
bool is_running_;
bool was_cancelled_;
Static member variables need not be prefixed or suffixed.
static constexpr uint32_t frequency_hz = 1;
As an exception to the above rules, some globally available member variables, can be named without the _
suffix.
For a better code readability, it is recommended to name the array members, at plural:
thread** waiting_threads_array;
unsigned short waiting_threads_array_size;
The rules for using these keywords are sometimes tricky, and the easiest to remember is const makes a constant whatever is on its left:
int* const p1; // constant pointer to int
const int* p2; // pointer to an int constant
const int* const p3; // constant pointer to an int constant
Systematic use of the above rule would put the type of scalars at the left of const, which is not that usual:
int const n; // constant integer
So, for scalars and for constants, it is also acceptable to use the more common order:
const int n;
static const int my_const = 7;
Constant names are regular names, all lower case.
Although in C/C++ it is possible to define constants using the preprocessor, it is recommended to use them only for project configuration variables, otherwise use only typed definitions, and the compiler might catch some errors.
For individual definitions, the recommended way is to use constexpr
.
constexpr thread_id_t id_none = 0xFF;
For definitions inside a class, use static constexpr
members.
static constexpr return_t os_ok = 0;
Depending on the specific scope, if the constants are to be used only inside the given class, they can be made private.
Constants can be grouped in separated classes, that groups together various return values, although enums would be probably more appropriate.
For group of constants, the recommended method is to use enumerations.
The recommended order is static constexpr
.
For a better code maintainability, where needed, it is recommended to use type definitions instead of direct C/C++ scalar types.
Scalar type definitions should use lower case letters and end with _t
; class aliases should follow the usual naming convention of class names.
These are mainly the definitions from <stdint.h>
uint8_t
, int8_t
uint16_t
, int16_t
uint32_t
, int32_t
Once we introduce the above definitions, the usual question is when to use int
versus int8_t
/int16_t
/int32_t
or unsigned int
versus uint8_t
/uint16_t
/uint32_t
?
Probably there is no single rule, but several usage cases. For applications that depend on a specific size, regardless of the platform, it is recommended to use the explicit size type definitions. Otherwise, using the platform native size may be more efficient in some cases. For example loop counts are usually better compiled when the the platform register size is used, so even if you know that the counter is small, using uint8_t
instead of unsigned int may not produce a shorter/faster code (on the contrary).
As a general rule, when defining types that should match a memory mapped structure, or a packet header, or some other fixed size structure, you obviously need to use the explicit size definitions. For the rest, platform size definitions might be preferred.
Another usual question is when to use int
(signed) versus unsigned int
. The answer is obvious, if the variable you want to represent can take negative values, then use signed variables. Otherwise, use unsigned variables.
One single note: sometimes, although the variable itself can take only positive values, it might be needed to also multiplex error codes on the same variable, and, in order to differentiate them, error cases are defined as impossible/illegal negative values.
Although an universal solution is not enforced, it is preferable NOT to return error codes multiplexed with valid content; instead, return the error code and use a separate pointer parameter to return values, and leave the value unaffected by error processing.
These are custom definitions, made to increase code readability and maintainability. Preferably they should rely on the previous type definitions.
typedef uint8_t thread_priority_t;
If the new type can be an alias, that does not introduce a new type definition, the C++11 syntax is:
using thread_priority_t = uint8_t;
C++11 solved the old C enumeration problem and introduced strongly typed and scoped enumerations (enum class
), so usually there is no need to use embedded classes with constants.
typedef uint32_t mode_t;
enum class mode : mode_t
{
input = 0,
output = 1,
alternate = 2,
analog = 3
};
static const mode_t mode_mask = 0x3;
some_function(mode::input);
Usually, structure definitions should be avoided, and be replaced by class definitions.
However, if for any reasons, struct definitions are needed, it is recommended to define both the struct name and the type, using the following syntax:
typedef struct region_s
{
region_address_t address;
region_size_t size;
} region_t;
For a more uniform look, type names used as aliases to class names need not end with _t
.
class my_class
{
public:
region_address_t address;
region_size_t size;
};
using my_class_alias = my_class;
Whenever not absolutely obvious, append the measuring units to the member variable or function name.
int bus_frequency_hz;
int delay_seconds;
int delay_milliseconds;
int delay_microseconds;
int length_metres;
int length_centimetres;
int length_millimetres;
If possible, use the full unit names.
Applications using µOS++ can be configured during build time using several
preprocessor definitions, grouped in a header file named
<micro-os-plus/config.h>, included when MICRO_OS_PLUS_INCLUDE_CONFIG_H
is
defined on the compiler line.
There are several kinds of definitions:
NDEBUG
, MICRO_OS_PLUS_INCLUDE_CONFIG_H
)MICRO_OS_PLUS_DEBUG
, MICRO_OS_PLUS_TRACE
)MICRO_OS_PLUS_INCLUDE_<name>
,
MICRO_OS_PLUS_EXCLUDE_<name>
, MICRO_OS_PLUS_TRACE_*
,
MICRO_OS_PLUS_<name>_*
, ); for these definitions only the
presence should be tested; INCLUDE
/EXCLUDE
should surround large blocks
of code definitions/declarations implementing various features;MICRO_OS_PLUS_BOOL_USE_<name>
, MICRO_OS_PLUS_BOOL_HAS_*
MICRO_OS_PLUS_BOOL_<name>_<action>
, MICRO_OS_PLUS_BOOL_<name>_<property>
);
HAS
should be used for physical characteristics,
like hardware peripherals;
USE
should surround optional code that calls a feature (assuming a
corresponding INCLUDE
is also defined)MICRO_OS_PLUS_INTEGER_<name>_<property>
)MICRO_OS_PLUS_STRING_<name>_<property>
);MICRO_OS_PLUS_TYPE_*
); the values are special
and represent expressions that can be used as types to define variables or
other types.


Pat's Salmon Cookies
Home
Sales
Pictures
Cookie Store Creator
City Location
Min Hourly Customers
;
Max Hourly Customers
Average Cookie Sales