|
JNIPort for Dolphin Smalltalk |
|
|
Back to Goodies |
An Example of Using CallbacksThis section is an example of using callbacks from Java into Smalltalk. The first half uses callbacks to create a Swing window showing the Smalltalk class hierarchy. The second half adds an event listener to the tree that allows Smalltalk code to observe the tree's “selection change” events
JNIPort should be configured to use ghost classes and support callbacks.
To configure ghost classes, ensure that the list of 'watcherClasses', under
'jniPortSettings', includes Since AWT/Swing uses Java threads, you should make sure that the JNI Helper is installed, or that you are not hooking the Java runtime's debugging output. If you followed the instructions in the installation walkthrough then JNI Helper will be configured. Once a suitably configured JVM is running, you can test whether callbacks are properly configured by displaying the Status Monitor's console page. If it does not show a warning message, then callbacks are probably configured. You can test that they are working by sending some text to the Java console:
We are getting ahead of ourselves; before we can experiment with callbacks we'll have to write some Java code that uses them. Using Callback RequestsJava Code
In this example, we create a Java
Java
These will be used by Swing to populate the tree; we will implement them by sending callback requests to Dolphin.
The source for the Java class is Callbacks always have a “tag” object to identify the request. This should be unique and should last for as long as callbacks are in use. A handy way to set this up is to use Java strings for the tags, held as static variables in the class:
That creates three tag objects that will be used to identify the three callback requests. It creates new strings for the tags, rather than just using string literals, in order to guarantee that the tags are unique. We also define some static “getter” methods for the tags, since our Smalltalk code will need to know what they are before it can link them to the proper callback handlers. We could just as well have made the tags themselves public (since they are static and final, they are really just constants), or even configured JNIPort to read the private variables directly. Yet another option would be to make the “getters” be instance methods (but still returning the value of the static tags), it all depends on how you are using the callbacks. Now to define the methods that call back into Smalltalk. Starting with:
This is called by Swing to see how many children a given node has.
The meat of the methods is inside the try/catch block. First it creates a
It then calls the request's
The try/catch block is needed because
The next of our callback methods is:
This is called by Swing to get the Nth child of a given parent. It is
allowed to return
This also creates a The last of our callback methods is:
This is called by Swing to find the index of a child within the list of its siblings. The implementation does not differ interestingly from the other two callback methods.
The rest of the Java class is just a boilerplate implementation of a
You should compile the class and ensure it is somewhere on the JNIPort classpath. The .JAR file, 'JNIPort-Tests.jar', which is supplied with JNIPort in the 'Extras\' folder already includes a compiled version of the code, so if that JAR file is on the classpath then you should be OK already. Smalltalk CodeIt would be possible to use our new Java class entirely by typing into a Smalltalk workspace, but it wouldn't make for a very clear example. Instead we'll generate a proper wrapper class.
In this case, the Java tree will be showing the state of the entire
Smalltalk image, rather than the state of some specific Smalltalk
object. That's a slightly unnatural case, but it does keep the
example simple. We can define all the code we need to handle
callbacks as methods attached to the class static for
We start by using the Wrapper Wizard to generate a class-side wrapper class for our example. First ensure that JNIPort has loaded our class, we can do that by choosing the 'Find/Load Java class' command from the class menu of the Status Monitor's classes page. Enter the full name of the class, 'org.metagnostic.jniport.eg.TreeModelExample' in the dialog box (this is case-sensitive). If you have compiled the class, and it is somewhere where JNIPort and the Java runtime can find it, then the classes page will load the class (if it wasn't before) and select it in the class tree.
Now to generate a static wrapper class. If you select
'Generate class-side wrappers...' from the 'Class' menu, then the Wrapper
Wizard will start. If you have the 'CU Java Examples' package installed
then the Wizard will have selected the pre-defined wrapper class for
Once you have created the target class the Wizard should let you go on to populate it, just accept all the defaults. It will create the new methods and add them to the target class. Now we hit an awkwardness. We are using ghost classes, but ghost classes don't really support having new wrapper classes added to the system while it is already running (it wouldn't be a problem if we weren't using ghosts, we could just let the Wizard “register” the new class and all would be well). It is possible to tell JNIPort to use the new class, but I haven't yet created a public API for doing so, let alone a GUI. So, I'm afraid, the easiest thing to do is just close down JNIPort and restart. Of course, that means that — thanks to Sun — you'll also have to close and restart Dolphin before you can start the new JVM. Sorry!
After all this messing around, we have managed to create a static wrapper
class for
Now we want to tell our new wrapper object how to handle the callbacks
from Java. We'll add the following method to
That method is normally called by JNIPort as the wrapper class is first registered. It won't have been called yet, though, so you can either restart JNIPort again <evil grin>, or you can find the class static and send it the message manually with code like:
whichever you do, you should find that the Status Monitor's status page now shows that the number of registered callbacks has gone up by three.
What the
Note the check that the callback registry isn't Each handler block just forwards the parameter to a corresponding handler method; we now have to write those. Start with the handler for 'getChildCount':
Recall that in this case the parameter to the callback was just the string
name of a class. The implementation is straightforward: convert the Java
string to a Smalltalk string, find the named Smalltalk class, find out
how many direct subclasses it has, and return a
This method doesn't bother with any error checking, which would not be a good idea for production code, but it keeps the example simple. If any errors did occur, then they would be trapped by JNIPort and rethrown as Java errors in the caller. (Which means, by the way, that you won't get walkbacks from errors in hander code. You can put breakpoints in handlers if you wish.) The next of our handler methods is the implementation of the 'getChild' request:
In this case, remember, the caller passed two arguments packed into a Java
array, so the first thing we do is unpack them. The first element is the
name of the parent class, the second is an Having unpacked the parameters, we get the list of subclasses of the named class (again treating '<<root>>' specially), find the indexed element of that list, and return its name converted to a Java string. The last of our handler methods is the implementation of the 'getIndexOfChild' request:
Which is similar to the previous two handlers. All this Smalltalk code is provided as part of the 'CU Java Examples' package. Running ItNow we are in a position to try out our new code. We'll create the Swing window from a workspace. We start, as always, by getting a reference to the JVM object:
First we make an instance of our tree model class:
You could test it out from the workspace if you wanted. For instance:
Now we make a Swing window to display the tree model. If this is the first time you have loaded any Swing class in this JNIPort session then there will be the usual irritating delay as JNIPort loads lots of Swing classes. We create a frame, add a scrolling pane within it, and a JTree within that. We tell the JTree to use our tree model as the source of its data. See the Java documentation for how it all fits together.
And then… Ta da…
You will probably notice that it is pretty slow, especially if you open up the 'Object' branch, and then scroll around. One reason is that Swing is sending lots of callbacks as it scrolls (on the order of 100 per second on my machine), and callbacks are slow. The other is that JNIPort is creating lots of wrappers for references to Java objects; if you look at the history page of the status monitor, then you should see that scrolling the tree is causing JNIPort to create and discard perhaps a thousand wrapper objects per second. There is an important lesson to be learned from this. As the section on callbacks warns, callbacks are slow and are not suited to creating tight integration between Java and Smalltalk code. In this case, a better implementation would probably have used a cache in the Java tree object and only called back into Smalltalk when it needed to fill, or refresh, the cache. Another possibility would be to avoid callbacks altogether, and to create and populate the tree object entirely by calling down from Smalltalk into Java. Using EventsNow that we have our tree showing Smalltalk classes, we can use it to experiment with Java events. JNIPort includes a way to arrange that Java events can be forwarded into Smalltalk, see events in the Callbacks section for the background. We'll use it now to observe selection change events in the tree.
Firstly we are going to have the selection change events triggered off
the Smalltalk proxy for the Java tree pane. However that means that we
must ensure that we are using a
canonical reference
to the pane. That is easily arranged by sending
Now we find the Java event we are interested in. In Java events are
represented as methods in listener interfaces, so start by finding
the selection changed method; the one we want is
Next we create an event forwarder. That is a Java object that implements the
Creating the forwarder also sets up a handler for the callback that will trigger
Now all we have to do is to add our new listener object to the tree pane's list of observers:
And now, any selection changes will be reported in Smalltalk space as
Use your favourite event tracing tool to verify that it is working. |
Copyright © Chris Uppal, 2003-2005
Java, JNI (probably), JVM (possibly), and God knows what else, are trademarks of Sun Microsystems, Inc.


{% include header.html %}
{% include navbar.html %}This is the narrative for the resource. See also the XML or JSON format. This example conforms to the DAF-Core {{page.tcode}} profile.
{% include {{page.tcode}}-{{page.example}}-html.xhtml %}Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.


Four friends are sitting on a rotating roundabout. The red friend can throw a ball towards the centre of the roundabout (use the "Throw ball" button) with an adjustable velocity. The left-hand image shows the view from above, from a camera that is fixed in space relative to the ground. The right-hand image shows the view from above, from a camera that is fixed to the roundabout.
The small red line on the red friend shows the initial velocity vector of the ball as it is released. In order to make the ball go directly through the centre of the roundabout, you will need to cancel out the tangential velocity: the red friend needs to throw the ball towards his right since he is moving towards his left.
The ball travels in a straight line through space (as you can see on the left-hand image), but to observers who are rotating with the roundabout (the right-hand image) it appears to travel through a curved path.
See if you can play with the parameters to make the ball pass directly through the centre, return to the thrower, hit one of his friends, stay completely still, or do several laps before exiting.


Overview of my research and computing experience
Academic
One thing I have learned in a long life: that all our science, measured against reality, is primitive and childlike – and yet it is the most precious thing we have. ― Albert Einstein
General Overview
My academic career started with a B.A. in Spanish from the University of Granada, where I graduated on Physics with an specialization on Theoretical Physics. Awarded with a scholarship, I obtain a M.Sc. on Condensed Matter with an dissertation about Theory of Liquids (Statistical Physics of Fluids) at the University Autónoma of Madrid. Also I was assistant professor of Physics (Laboratory Experiments) two years. In the field of Atmospheric Sciences, I have a PhD on Remote Sensing and Micro-physics of Precipitation at Spain with an stage at NASA Goddard Space Center. Currently, I am working as research assistant at Karlsruhe Institute of Technology (Germany). in Atmospheric Physics & Chemistry, specifically on Remote Sensing of Greenhouse Gases.
Scientific Interests
My objectives are improve my knowledge of remote sensing applied on earth sciences. This comprises develop simulations of the actual measurement conditions to assert the uncertainty and new applications of remote sensing, but also in-situ measurement to calibrate, test and validate satellite products and improve retrieval algorithms. In particular, I am interested on carbon cycle and water cycle application of remote sensing science. This is complemented by my interest on numerical models of atmospheric processes at several scales.
Due to my professional trajectory my interest is also related with mathematical methods, in particular those related with statistics and statistical physics. Together with scientific computing.
Membership
- European Geosciences Union
- American Meteorological Society
- American Geophysical Union
Conceptual Map of my research background and experience
Computing
Nothing in life is to be feared, it is only to be understood. Now is the time to understand more, so that we may fear less. ― Marie Curie
Overview
My daily research job is done with computers that I use for data analysis of experimental data and for modelling or simulation of physical processes. Therefore an important part of my background rely on an area usually named: scientific computing. Traditionaly, for a Physicist, this implied to know how to program with Fortran but not much more (maybe a basic understanding of Linux/Unix). Nowdays, the situation is different and scientific computing means a long list of tools and skills that a researcher have to know, but even more between all the utilities or methodologies she/he has to be able to choose the best possible tool for an specific problem. As a consequence several academic programs include a kind of formation that has been named software carpentry.
My scientific computing carpentry
Programming
- Fortran 90 (also 77 but I try to avoid)
- LAPACK / BLAS
- Python
- numpy
- scipy
- Pandas
Visualization
- Matplotlib
- GNUplot
File Formats
- netCDF
- HDF5
- GRIB
Automatization and Scription
- make
- bash
- Pure Python
Documenting code
- Doxygen
- Sphinx
Project Software Managment
- Trac
Version Control
- Subversion (svn)
- git
- Mercurial (Hg)


this is the sample data here for crm
| # | First Name | Last Name | Username | Diseases |
|---|---|---|---|---|
| 1 | Deshmukh | Prohaska | @Genelia | Fever |
| 2 | Deshmukh | Gaylord | @Ritesh | Cancer |
| 3 | Sanghani | Gusikowski | @Govinda | Lakva |
| 4 | Roshan | Rogahn | @Hritik | Dental |
| 5 | Joshi | Hickle | @Maruti | Cancer |
| 6 | Nigam | Eichmann | @Sonu | Dental |
this is the sample data here for crm
| # | Name | ECG | Result |
|---|---|---|---|
| 1 | Genelia Deshmukh | 0,-3,-2,-4,-5,-4,-3,-2,-5,-1 | 28.76% |
| 2 | Ajay Devgan | 0,-1,-1,-2,-3,-1,-2,-3,-1,-2 | 8.55% |
| 3 | Hrithik Roshan | 0,3,6,1,2,4,6,3,2,1 | 58.56% |
| 4 | Steve Gection | 0,3,6,4,5,4,7,3,4,2 | 35.76% |


Get a customized learning path.
Use the box above to say what you want to learn, and we'll work with you to build a relevant learning path. Try "Python" or "StackStorm"!
Already know what lesson you're looking for? That's awesome - all lessons are linked directly below.


{% extends theme("layout.html") %} {% block css %} {{ super() }} {% endblock %} {% block content %}
In essence, they are digital representations of your physcial certificates. Technically, we create a JSON that contains the certificate information, then sign and hash it, and place the hash on the Bitcoin blockchain. If you'd like to learn more about their architecture, please check out the Blockchain Certificates Project website .


class: center, middle ### W4995 Applied Machine Learning # Advanced Neural Networks 04/23/18 Andreas C. Müller ??? drive home point about permuting pixels in imaged doesn't affect dense networks (or RF, or SVM) FIXME update with state-of-the-art instead of VGG16 FIXME show how permuting pixels doesn't affect fully connected network, but does affect convolutional network --- class:center,middle # VGG and Imagenet Filters ??? --- # Inspecting VGG16 .left-column[.smaller[ ```python from keras import applications # load the VGG16 network model = applications.VGG16( include_top=False, weights='imagenet') model.summary() ```]] .right-column[ ![:scale 90%](images/vgg_model_summary.png) ] ??? This is not really state of the art any more. --- #VGG filters .smaller[ ```python vgg_weights, vgg_biases = model.layers[1].get_weights() vgg_weights.shape ``` ``` (3, 3, 3, 64) ```] .center[![:scale 45%](images/vgg_filters.png)] ??? --- .left-column[![:scale 90%](images/bkny_image.png)] .right-column[.smallest[ ```python get_3rd_layer_output = K.function([model.layers[0].input], [model.layers[3].output]) get_6rd_layer_output = K.function([model.layers[0].input], [model.layers[6].output]) layer3_output = get_3rd_layer_output([[image]])[0] layer6_output = get_6rd_layer_output([[image]])[0] print(layer3_output.shape) print(layer6_output.shape) ``` ``` (1, 300, 192, 64) (1, 150, 96, 128) ``` ]] ??? --- .center[![:scale 75%](images/after_first_pooling.png)] .center[![:scale 75%](images/after_second_pooling.png)] ??? --- class: middle ![:scale 100%](images/distill-feature-vis.png) .smaller[https://distill.pub/2017/feature-visualization/] --- class: middle # Transfer learning --- class: center # Transfer Learning .center[ ![:scale 80%](images/pretrained_network.png) ] .smaller[See http://cs231n.github.io/transfer-learning/] ??? - Train on “large enough” data. - Apply to new “small” dataset. - Take activations of last or second to last fully connected layer. Often we have a small but specific image dataset for a particular application. Training a neural net is not feasible unless we have tens of thousands or hundreds of thousands of images. However, if we have a convolutional neural net that was already trained on a large dataset that is similar enough, we can hope that the features it learned are also helpful for our task. The easiest way to adapt a trained network to a new task is to just apply it to our dataset and take the activations of the second to last or last layer. If the original task was rich enough – say 10000 different classes as in imagenet – these layers contain a lot of information about the image. We can then use these activations as features for another classifier like a linear model or smaller dense neural network. The main point is that we don’t need to retrain all the weights in the network. You can think of it as retraining only the last layer – the classification layer – of the network, while holding all the convolutional filters fixed. If they learned generic patterns like edges and patterns, these will still be useful for your task. You can download pre-trained neural networks for many architectures online. Using a pre-trained network is sometimes also known as transfer learning. This potentially doesn’t work with images from a very different domain, like medical images. --- class: spacious # Ball snake vs Carpet Python .center[ ![:scale 100%](images/ball_snake_vs_python.png) ] ??? --- .smaller[ ```python import flickrapi import json flickr = flickrapi.FlickrAPI(api_key, api_secret, format='json') json.loads(flickr.photos.licenses.getInfo().decode("utf-8")) def get_url(photo_id="33510015330"): response = flickr.photos.getsizes(photo_id=photo_id) sizes = json.loads(response.decode('utf-8'))['sizes']['size'] for size in sizes: if size['label'] == "Small": return size['source'] get_url() ids = search_ids("ball snake", per_page=100) urls_ball = [get_url(photo_id=i) for i in ids] from urllib.request import urlretrieve import os for url in urls_carpet: urlretrieve(url, os.path.join("snakes", "carpet", os.path.basename(url))) ```] ??? --- .center[ ![:scale 80%](images/carpet_python_snake.png) ] ??? --- # Extracting Features using VGG .smaller[ ```python from keras.preprocessing import image X = np.array([image.img_to_array(img) for img in images_carpet + images_ball]) # load VGG16 model = applications.VGG16(include_top=False, weights='imagenet') # preprocessing for VGG16 from keras.applications.vgg16 import preprocess_input X_pre = preprocess_input(X) features = model.predict(X_pre) print(X.shape) print(features.shape) features_ = features.reshape(200, -1) ``` ``` (200, 224, 224, 3) (200, 7, 7, 512) ```] ??? VGG16 like each convnet has particular input requirements, for example 224x224 images. --- # Classification with LogReg .smaller[ ```python from sklearn.linear_model import LogisticRegressionCV lr = LogisticRegressionCV().fit(X_train, y_train) print(lr.score(X_train, y_train)) print(lr.score(X_test, y_test)) from sklearn.metrics import confusion_matrix confusion_matrix(y_test, lr.predict(X_test)) ``` ``` 1.0 0.82 array([[24, 1], [ 8, 17]]) ```] ??? --- #Finetuning .center[ ![:scale 90%](images/finetuning.png) ] ??? - Start with pre-trained net - Back-propagate error through all layers - “tune” filters to new data. A more complicated variant of this is to load a network trained on some other dataset, and replace the last layer with your classification task. Instead of training only the last layer, we can also keep training all the previous layers, backpropagating the gradient through the network and adjusting the previously learned filters for our task. You can think of this as warm-starting a neural network from one that was trained on another dataset. If you do that, we often want to train the last layer a little bit before we backpropagate through the network. Otherwise the random initialization of the last layer might destroy the filters that we used for initialization. --- #Adverserial Samples .center[ ![:scale 80%](images/adverserial.png) ] .smallest[
[Szegedy et. al.: Intriguing properties of neural networks](https://arxiv.org/abs/1312.6199) ] ??? Since convolutional neural nets are so good at image recognition, some people think they are pretty infallible. But they are not. There is this interesting paper about intriguing properties of neural networks, that introduces adverserial samples. Adverserial samples are samples that were created by an adversary or attacker to fool your model. Here, they changed images to be classified as Ostrich by AlexNet trained on imagenet. The picture on the left is change just slightly, and went from correctly classified to classified as Ostrich. This technique uses gradient descent on the input and requires access to all the weights in the network to create the samples. Given how high-dimensional the input space is, this is not very surprising from a mathematical perspective, but it might be somewhat unexpected. requires the weights, done by gradient descent. --- class: middle # Convolutional Neural Networks # for Text Classification --- # Word Level CNNs for Text Classification .smallest[[Kim - Convolutional Neural Networks for Sentence Classification (2014)](https://arxiv.org/pdf/1408.5882.pdf)] ![:scale 100%](images/word-level-cnn.png) --- class: center # Datasets ![:scale 60%](images/word-level-datasets.png) --- class: center ![:scale 100%](images/word-level-cnn-results.png) ??? rand: random initialized static: used word2vec embedding (and random for out-of-vocabulary) non-static: fine-tuning multi-channel: one fixed and one fine-tuned word2vec channel rand doesn't seem so good. Rest pretty much the same. Pretty competative (at the time) against highly specialized networks. --- class: center # Learned Representations ![:scale 30%](images/word-level-embeddings.png) ??? removes sentiment ambiguity in word2vec --- class: middle # Character Level # Convolutional Neural Networks # for Text Classification --- class: center # Character Level CNNs for Text Classification .smallest[[Zhang et. al. - Character-level Convolutional Networks for Text Classification (2015)](http://papers.nips.cc/paper/5782-character-level-convolutional-networks-for-text-classification.pdf)] ![:scale 100%](images/character-level-cnn.png) -- ![:scale 50%](images/character-nn-characters.png) ??? Need to cut to fixed-length input. 70 characters temporal max-pooling. --- class: center # Datasets .padding-top[ ![:scale 100%](images/character-cnn-datasets.png) ] ??? Much bigger than for word-level! epoch size: dataset size / minibatch size. --- class: center, middle ![:scale 75%](images/character-cnn-results.png) .smallest[ Later improved in [Conneau et. al - Very Deep Convolutional Networks for Text Classification - 2016](http://www.aclweb.org/anthology/E17-1104)] ??? Might be good for very short texts, not necessarily the go-to solution (yet). --- class: center, middle # Advanced Architectures --- class: center, middle # Deep Residual Networks (ResNet) [He et. al. - Deep Residual Learning for Image Recognition (2015)](https://arxiv.org/pdf/1512.03385.pdf) --- # Problem ![:scale 90%](images/resnet-no-deep-nets.png) ??? We can't fit deep networks well - not even on training set! "vanishing gradient problem" - was motivation for relu, but not solved yet. --- class: center # Solution ![:scale 60%](images/residual-layer.png) `$$y = F(x, \{W_i\}) + x$$` -- `$$y = F(x, \{W_i\}) + W_sx$$` ??? instead of learning a function. learn the difference to identity. if sizes different, add linear projection. --- class: center, middle ![:scale 25%](images/resnet-architecture.png) ??? dotted lines are linear projection, others are identity. --- class: center, middle ![:scale 100%](images/resnet-success.png) --- class: center, middle ![:scale 80%](images/resnet-results.png) ??? uses batch normalization and dropout. --- class: middle, center # Densely Connected Convolutional Networks (DenseNet) [Huang et. al - Densely Connected Convolutional Networks (2016)](https://arxiv.org/pdf/1608.06993) --- class: center ![:scale 60%](images/densenet-architecture.png) -- ![:scale 80%](images/densenet-architecture2.png) --- class: center, middle ![:scale 70%](images/densenet-vs-resnet.png) ??? uses batch normalization and dropout. --- class: center, middle ![:scale 90%](images/pretrained-nets-in-keras.png) https://keras.io/applications/ --- class: center, middle # Recurrent Neural Networks --- class: center, middle ![:scale 100%](images/recurrent-neural-net.png) .smallest[ Images from http://colah.github.io/posts/2015-08-Understanding-LSTMs/ ] --- class: center, middle ![:scale 100%](images/LSTM.png) .smallest[[Hochreiter, Schmidhuber - Long Short-Term Memory (1997)](http://www.bioinf.jku.at/publications/older/2604.pdf)] --- class: center, middle ![:scale 100%](images/GRU.png) .smallest[[Cho et. al. - Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation(2014)](https://arxiv.org/pdf/1406.1078)] --- class: center, middle ![:scale 100%](images/lstm-unrolled.png) --- class: center, middle ![:scale 100%](images/seq2seq.png) .smallest[[Sutskever et. al. - Sequence to Sequence Learning with Neural Networks (2014)](https://arxiv.org/pdf/1409.3215.pdf)] --- class: center # Machine Translation ![:scale 45%](images/seq2seq-machine-translation.jpg) --- class: center # Question answering ![:scale 80%](images/general-qa.png) .smallest[[Chen et. al. - Reading Wikipedia to Answer Open-Domain Questions](https://arxiv.org/pdf/1704.00051v2.pdf) https://rajpurkar.github.io/SQuAD-explorer/] ??? These are actually training examples. --- class: middle # Questions ?


?New
York
Botanical
Garden
lb05234
Paspalum
cirundinaceum
Poir.
in
Lam.
Luis
Catasus
Guerra
2006
COLLECTED
BY
19
V
1605234
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


(.) editing RNA sites mitochondrial PREP-Mt alignment edited sequences known file plant Additional Click FASTA File LINK format false sequence rps unedited genes protein number gene predictive predicted {border-style amino performance nad positives px;} state #ffffff;} accuracy prediction sensitivity used ASD silent site DNA classified atp incorrectly mitochondria proteins conservation encoded predict protein-coding sites. codon correctly cytidines editing. experimental plants rpl specificity test approach information using value balanced increased results Accuracy Brennicke Thus, acid analyses cutoff data genome input negatives possible sdh second sites, transcripts However, Mol Table based genomes homologues identifying increase land numbers px; rps, score {font-family Acad Acids Natl Nucleic Oenothera Proc Res Sci USA analysis atp, available cox effect errors font-size identified identify lead methodology nucleotides set small true .%). Arabidopsis Brassica Complex Genbank Gene Marchantia Oryza PREP-Mt, PREP-Mt. Plant case change complete conserved determine double; equal expected full-length functional high likely phylogenetic plants, poorly positions rpl, sequences, sequences. species states tested use Aligned Chaetosphaeridium Chara, Genet Marchantia, Sequence acids actual actually aligned alignments approximately border-color border-width cases chloroplast correct determined editing, examples extensions genes. genus highly homologous however, important inclusion indicate lack lineages low major nuclear nucleotide observed particular patterns percentage perform plastid predicting regions result scores shown solid; speed {font-style {font-weight (Table .%, Bioinformatics Biol Chara Cummings Figure Furthermore, Knoop Myers Podophyllum Schuster Using ability additional annotations bold calculated cases, changes comparison content courier; database determining different em; evolution example, fact genes, genomic incorrect lineage-specific method methods motifs negatives. non-homologous non-silent online partitioned poor predictions problem program properly pt;} ranging related remained reported reverse sativa scheme scoring simply single species. specific spurious state. statistical transcript type uridines useful values variable


NOTE: This test assumes that you're running with 1x pixels (which our test runner always does.
PASS
FAIL


Transactions
Date range:
Date from
to
Transaction type
Currency
Booking date
Value date
Description
Status
Paid
Amount
Action
Back


◄
Leaflet Panel Layers
Groups Example: selector all layers in a group
Opengeo.tech
•
Stefano Cudini
Github


All submissions for this problem are available.Lucas Sequence is an integer sequence where each term is a sum of two previous terms. First and Second term of lucas sequence are 2 and 1 respectively.The first few terms of Lucas sequence are :
{2,1,3,4,7,11,18.........
You are given a string S consisting of lower case English alphabets. Your task is to determine whether any permutation of the frequencies of the characters form the Lucas Sequence. If the frequencies form the Lucas sequence, give output "FIT" else output "UNFIT".
Input:
First line will contain T, number of testcases. Then the testcases follow.
Each testcase contains of a single line of input, the string S
Output:
For each testcase, output in a single line "FIT" or "UNFIT"
Constraints
1≤T≤50
1≤|S|≤105
Sample Input:
2
acaccb
abba
Sample Output:
FIT
UNFIT
EXPLANATION:
The character frequencies of the first example are a=2,b=1,c=3 which can be permutated as [2,1,3]. Which forms the lucas sequence.
In the second example, no permutation of frequencies will form the lucas sequence.


Home
About us
Contact
HaKTuts
Welcome to HaKTuts
YouTube
Home
Ethical Hacking
Tips & Tricks
Android
iOS
Windows
Notepad tricks
Windows shortcut
Linux
News
Download
Contact Us
About us
© 2014
HaKTuts
. All rights reserved.


3/15 email
Management heard us and put public health first
Dear PSC Members and Colleagues:
4,240 letters were sent this afternoon to Chancellor Matos Rodríguez and Chairperson Thompson calling on them to allow all PSC-represented employees to work remotely, starting tomorrow. The chancellor just made this announcement:
“Only CUNY essential personnel should report to work tomorrow, Monday, March 16, to their campuses and CUNY Central. Essential staff have already been designated, however, if you have any questions, please contact your supervisor.”
The announcement is a victory for everyone who lives or works in this city. CUNY management heard our message and put public health first. Now professional staff as well as all faculty will be able to protect their own health and the health of the community by staying home tomorrow. Everyone should continue to be paid as normal.
There will be more to discuss and many questions to answer, especially about work arrangements for the future. I’m sure there will still be knotty questions to resolve. But for now, we know that all of our co-workers at CUNY, those represented by other unions as well as those represented by the PSC, will be able to stay at home tomorrow, unless they have been designated “essential personnel.” The PSC can now enter into negotiations with CUNY management about the issues that need to be settled.
Thank you, PSC members! Even as we appreciate this public health victory, there is a State budget to settle in Albany. We need the same power you showed this afternoon applied to the final stages of budget negotiations. Send this message tonight; Governor Cuomo and key legislators are starting to make decisions today. Tomorrow we will be back in touch with other messages you can send to demand that Albany makes critical investments in CUNY.
But for tonight, I hope you can feel a little safer. Thank you for standing up for each other, for our students, and for public health.
In solidarity, Barbara Bowen President, PSC/CUNY


--- layout: default title: The TAL Education Financial and Social Network ---
This project was last updated on 28 December 2018


$0
$0/s
Click
Tests
Reset
Show Miners
+$10M
+$1/s for $100
+$2/s for $500
+$4/s for $10k
One
0
$15
Two
0
$100
Three
0
$1100
Four
0
$12k
Five
0
$130k
Six
0
$1.4M


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 4
Seafood foam makes an elegant addition to a classic pasta and tomato sauce recipe. If you don’t have a pasta machine use shop bought spaghetti instead.
For the pasta, place the flour, egg and egg yolks into a food processor and pulse until well combined and the mixture comes together as a dough. Place the dough in a bowl, cover with cling film and place in the fridge to rest for 30 minutes.
Cut the pasta dough in half and pass it through a pasta machine at its widest setting. Repeat this process, decreasing the roller setting down grade by grade with each pass until the dough is thin enough to pass through the spaghetti cutter.
Add the spaghetti cutter to the pasta machine and pass the pasta through the machine to make thin strips. Dust the pasta with a little semolina.
Repeat the process with the remaining dough, then place the spaghetti onto a plate and use immediately or refrigerate overnight.
For the tomato sauce, heat a frying pan over a medium-high heat and add the olive oil, tomatoes, garlic and chilli. Simmer for 30 minutes, or until the tomatoes have just started to break down.
Stir in the basil and season, to taste, with salt and freshly ground black pepper. Keep warm.
For the langoustine shell foam, heat the olive oil in a pan. Fry the shallot, garlic, tomato purée and star anise for 2-3 minutes, or until the shallots and garlic are softened.
Add the shells from the prawns and langoustines and stir. Add the brandy and white wine to the pan, scraping up any browned bits from the bottom of the pan to de-glaze. Stir in the fish stock and bring to the boil. Reduce the heat and simmer until the volume of the liquid has reduced by a third.
Remove from the heat and discard the star anise. Transfer the mixture to a food processor and blend until smooth. Pass through a sieve back into the pan. Blend with a hand blender until a foam develops, then set aside.
Heat a frying pan, add a little olive oil and fry the langoustine and prawn meat for a few minutes. Add to the tomato sauce.
For the pasta, in a large pan of salted boiling water cook the spaghetti until al dente.
To serve, stir the prawn sauce through the spaghetti. Transfer to serving dishes, spoon some foam over the top and sprinkle with basil cress.


Police hunt underway for man wanted over sexual assault of Seaford Meadows woman
A brave woman sexually assaulted while she slept has chased her attacker after waking to a man in her bedroom during a sickening home invasion at Seaford Meadows overnight.
Special Crime Investigation detectives are hunting a man with a muscular build and short thick hair after he sexually assaulted the victim at her home – near Grand Blvd – just before 1.30am on Saturday.
Detective Chief Inspector Ian Humby said the intruder entered through an unlocked door.
“Once she woke up, the assault ended and she chased him outside the house,” he said.
“It’s very disturbing and of course, what makes it worse, the time of night.
“The victim doesn’t know who the offender is… (but) she’s still helping us as best she can.”
After the attack, the victim then realised her purse, mobile phone and other personal items had been stolen.
A police dog was used to scour the area but the suspect’s scent could not be traced.
He is about 170cms tall and was wearing a dark blue or black T-shirt.
Det Insp Humby said officers are still for searching clues, but pleaded with the man to “do the decent thing” and hand himself in.
“The trauma that is associated with this type of offending has often long-lasting effects psychologically and sometimes emotionally, and physically as well,” he said.
The woman is being consoled by family and friends.
Neighbours have spoken of their shock and said police told them to keep their doors locked.
“An officer told us if see anything suspicious, to call them straight away,” a mother said.
“We’ve lived her for a number of years and not had any issues.”
Officers walked surrounding streets and spoke to residents in the area on Saturday morning. The suburb, which has recently been developed, is home to mostly families and elderly residents.
Anyone with information on the incident, including persons or vehicles seen in the Seaford Meadows area about the time of the attack, is asked to contact Crime Stoppers on 1800 333 000.


Vagrant Setup Tips
for Windows Users
Unfortunately, Vagrant installation to Windows is quite different from Linux and Mac OS. Here, we describe installation tips for you to successfully install Vagrant.
Using id/password with an arbitrary SSH client
You can enter the following settings to your favorite SSH client whenever you need to ssh to a Vagrant instance:
- user id:
vagrant
- password:
vagrant
- port:
2222
id file based login with PuTTY
Alternatively, you can skip entering user id/password by specifying Vagrant's id file. We describe how to use the id file with PuTTY.
Importing Vagrant Private Key with PuTTYGen
Download PuTTYGen from this site and save your local disk.
Then run the downloaded puttygen.exe
executable file.
After opening PuTTYGen window, choose Conversions > Import Key from the top menu.
Then you need to choose Vagrant's provided private key at %HOMEDRIVE%\%HOMEPATH\.vagrant.d\insecure_private_key
. For many cases, by default, %HOMEDRIVE%
is C: and %HOMEPATH%
is \Documents and Settings\your-user-name.
Finally, select SSH2-RSA
as Parameters
, and 1024
as Number of bits...
.
Generating Keypair
Next, you need to generate a keypair with the imported private key. Select Key > Generate Key Pair from the menu bar.
Move mouse cursor to create random number and enter comment and passphrase as shown below.
Here you need to enter the following items:
- Key comment ... any text
- Key passphrase ... used for generating a private key, any text
Note that the passphrase is used for sealing the generated private key. Do not forget it, or you need to re-generate the private key.
Starting PuTTY
Now the time to run PuTTY, download PuTTY from the same site and save your local disk.
Then, run putty.exe
and you will see the following window:
Select Connection > SSH > Auth from the Category pane on the left and you can specify the generated PuTTY key file on the right pane.
Now select Session to set SSH host and port, <IP_ADDRESS> and 2222 like this:
When you click Open button, you can see the following terminal window:
OK! Have fun!
Click here to return to the Get Started Tutorial.


April 25, 2015
Arrays are ordered collections of objects, be it strings, numbers, or arrays themselves! Hashes are collections, too, but they're unordered and utilize key-value pairs.
In Ruby, you can initialize arrays with the new method or implicitly, by populating them
ingredients = Array.new
ingredients = ["shrimp", "cumin", "chicken", "avocado", "cilantro"]
players = ["Joakim Noah", "Nate Robinson", "Tim Duncan", "Paul Pierce"]
Arrays are indexed by integers, starting at 0. If you wanted to access "Nate Robinson" from the players array, you would do it like so:
players[1]
Ruby has really convenient class methods for Arrays. You can access the first or last element of an array easily by calling (whatever's after the # symbol is just a comment in Ruby. I just want to show you what will be returned from the method):
ingredients.first #=> "shrimp"
ingredients.last #=> "cilantro"
You can even return the first n elements of an array:
ingredients.take(2) #=> ["shrimp", "cumin"]
Arrays can also be counted easily or checked for emptiness by:
ingredients.length #=> 5
ingredients.count #=> 5
ingredients.empty? #=> false
Let's move on to hashes for now. While arrays are awesome at keeping your elements organized, hashes are great for a different type of organization. Instead of using integers to access your values, you can use any object type to do so. For example, let's initialize a hash called population. We'll initialize it implicitly, without the "new" keyword.
population = {"Tiny Farm Town" => 1,000, "Suburban" => 20,000,
"Gentrified Brooklyn" => 1,000,000}
You can also use what are called symbols as the keys. Symbols are preceded with a colon. You still use "#=>" to point to your value, like so:
population = { :tiny_farm => 1,000}
Or you can do this and forget about the "=>":
population = { tiny_farm: 1000, suburban: 20,000, gentrified_brooklyn:
1,000,000}
You can populate a Hash differently, one by one, like this:
cities = {}
cities[:san_diego] = "college"
cities[:los_angeles] = "home"
You can use hashes as named parameters in a method. This might be beyond the scope of this beginner post, but I thought it was pretty cool:
Employee.create(name: "Blake Griffin", age: 25)
I think that's all I have for now. Til next time! Thanks for reading.


drmpeg/gr-paint An OFDM Spectrum Painter for GNU Radio. Contribute to drmpeg/gr-paint development by creating an account on GitHub.
A Fascinating Thing about Fractions - Numberphile The Dynamical Uniform Boundedness Conjecture with Dr Holly Krieger. Extra from this interview: https://youtu.be/v4LWFzTyhpU Dr Krieger on the Numberphile Podcast: https://youtu.be/QmfQQzjpdpM More links & stuff in full description below ↓↓↓ More videos w...
Updating VS 2019 from 16.3.x to 16.14.0 uninstall existing .NET Core SDK 3.0.100 · Issue #4015 · dotnet/sdk I have 2 different machines that has VS 2019 16.3.10 and VS 2019 16.3.7 on Windows 10 1909. Both of them have .NET Core SDK v3.0.100 installed. After I update to VS 2019 16.4.0, the .NET Core SDK v...
What interesting optimizations can a JIT do that a compiler cannot do? - Quora ad by Full Sail University


Click image enlarge
Buy Now!
|
GLUTTONY
Dancing every night in a row for a month, hitting every major dance camp, collecting all the music, owning more than ten pairs of dance shoes...
GREED
Dancing with the same partner for the entire night
SLOTH
Not dancing at all.
ENVY
Wishing your had gotten to dance the last song with (fill in name here) instead of (fill in another name here).
WRATH
Ripping your partner's arm out of the socket and launching her out on five.
LUST
"Crotch lead."
PRIDE
Not just thinking, but knowing that there is nothing more you can learn
From the gospel of Miss Kitty, chapter 7, verse 10
|


{% include 'blocks/head.html' %}
{% include 'blocks/header.html' %} {% include 'blocks/nav.html' %} {% include 'blocks/body.html' %} {% include 'blocks/footer.html' %}


THE ICICLE THIEF A film review by Mark R. Leeper Copyright 1991 Mark R. Leeper
Capsule review: A satire on how films are treated on television becomes a weird fantasy, not totally original but surprisingly creative. Rating: high +1 (-4 to +4). (Note: heavy spoilers follow the first paragraph.)
Italian actor, screenwriter, and director Maurizio Nichetti is probably more recognizable by sight than by name to most American audiences. Nichetti plays a little artists with a big (false) moustache in the international hit ALLEGRO NON TROPPO. That film was directed by Bruno Bozetto, but now Nichetti is very much an auteur, writing and directing THE ICICLE THIEF in which he himself plays the two main roles. The subject of the film, at least for a while, is what commercial television does to a film. The title is a reference to Vittorio De Sica's BICYCLE THIEF with part missing, just as films are shown on television with part missing. The title, of course, works only once it has been translated into English, indicating the film is aimed for an international market, which indeed it has gotten. As the film opens, Nichetti, playing himself, arrives at a television station to host his own film, THE ICICLE THIEF. We see the chaos at the station, we see a typical family watching the film, and in black and white we see the film itself. What the television station does to the film is the springboard (but only a springboard) for the pandemonium that is to follow. This is an innovative and at times very funny film. I rate it a high +1 on the -4 to +4 scale.
***HEAVY SPOILERS TO FOLLOW***
While it is not entirely a new idea, Nichetti very cleverly mixes the three levels of the film with a fourth level, the commercials. At one time it was very common to have cross-over elements between the text of a radio or television play and the commercials. The FCC decided this was a deceptive practice and made it illegal, though radio disk jockeys commonly violate the rule. There have been many times when usually disjoint planes such as audience and actors interact in live plays and in fantasy films such as THE PURPLE ROSE OF CAIRO. In this case of the film characters, the director, the people in the commercials, and the audience, five of the six pairings of planes do take place. Characters from the film at some point find themselves in commercials, talking to the director, and even once looking out from the television to see what the audience is doing. The missing pairing is that at no point does there seem to be any sort of unexpected meeting between the audience and the characters in the commercials.
The use of color is singularly impressive, perhaps more so than the script itself. This is true not just in the amazing scene in which a scantily-clad commercial actress breaks into the film world and has her color wiped off by Antonio as her dries her off. There is also use of subtle color shifts throughout the black-and-white sequences to simulate the variable film stock available in post-war Italy when THE BICYCLE THIEF was made.
Where Nichetti falls down most is in his acting of Antonio, the poor laborer in the internal film. Had Nichetti captured some of the tragic desperation of Lamberto Maggiorani's performance in THE BICYCLE THIEF, it would have strengthened the humor by contrast. It would also have demonstrated some depth in Nichetti's acting ability. He may have felt such a somber note had no place in a light comedy, but if so, it was a serious lack of vision. His failure to put any meat in his performance of Antonio is the weakest point of an otherwise creative film.
Mark R. Leeper att!mtgzy!leeper<EMAIL_ADDRESS>.
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


In this study, you will be randomly and anonymously paired with another participant. Each of you simultaneously and privately chooses a strategy between whether to Contribute or Don't Contribute. Your payoffs will be determined by the choices of both as below:
In each cell, the amount (in points) to the left is the payoff for you and to the right is the payoff for the other participant.
| The Other Participant | |||
|---|---|---|---|
| A | B | ||
| You | A | '{{ payoff_matrix.0.0 }}', {{ payoff_matrix.1.0 }} | '{{ payoff_matrix.2.0 }}', {{ payoff_matrix.3.0 }} |
| B | {{ payoff_matrix.0.1 }}, {{ payoff_matrix.1.1 }} | {{ payoff_matrix.2.1 }}, {{ payoff_matrix.3.1 }} |


Reset Password
Email
New Password
This field cannot be left empty
Confirmation Code
This field cannot be left empty
Change Password


AWS Marketplace is a digital catalog with thousands of software listings from independent software vendors that make it easy to find, test, buy, and deploy software that runs on AWS.
Comprehensive security capabilities to satisfy the most demanding information security requirements.
Build hybrid IT architectures that extend your on-premises infrastructure to the Cloud.
The AWS Cloud spans 54 Availability Zones within 18 geographic Regions and 1 Local Region around the world, with announced plans for 12 more Availability Zones and four more Regions in Bahrain, Hong Kong SAR, Sweden, and a second AWS GovCloud Region in the US.
Region & Number of Availability Zones
US East
N. Virginia (6), Ohio (3)
US West
N. California (3), Oregon (3)
Asia Pacific
Mumbai (2), Seoul (2), Singapore (3), Sydney (3), Tokyo (4), Osaka-Local (1)
Canada
Central (2)
China
Beijing (2), Ningxia (2)
Europe
Frankfurt (3), Ireland (3), London (3), Paris (3)
South America
São Paulo (3)
AWS GovCloud (US-West)
(3)
New Region (coming soon)
Bahrain
Hong Kong SAR, China
Sweden
AWS GovCloud (US-East)
• France
• Hong Kong
• Sweden
• AWS GovCloud East


{% extends "wiki/article.html" %} {% load wiki_tags i18n humanize %} {% load url from future %} {% block wiki_pagetitle %}{% trans "Replace" %} "{{ attachment.current_revision.get_filename }}"{% endblock %} {% block wiki_contents_tab %}
{% blocktrans with attachment.original_filename as filename %} Replacing an attachment means adding a new file that will be used in its place. All references to the file will be replaced by the one you upload and the file will be downloaded as {{ filename }}. Please note that this attachment is in use on other articles, you may distort contents. However, do not hestitate to take advantage of this and make replacements for the listed articles where necessary. This way of working is more efficient.... {% endblocktrans %}
{% blocktrans with attachment.original_filename as filename %} Replacing an attachment means adding a new file that will be used in its place. All references to the file will be replaced by the one you upload and the file will be downloaded as {{ filename }}. {% endblocktrans %}
{% endif %} {% endblock %}


Performs a sentiment analysis of textual contents in R. This implementation utilizes various existing dictionaries, such as Harvard IV, or finance-specific dictionaries. Furthermore, it can also create customized dictionaries. The latter uses LASSO regularization as a statistical approach to select relevant terms based on an exogenous response variable.
| Version: | 1.3-2 |
| Depends: | R (≥ 2.10) |
| Imports: | tm (≥ 0.6), qdapDictionaries, ngramrr (≥ 0.1), moments, stringdist, SnowballC, XML, glmnet, spikeslab (≥ 1.1), ggplot2, mgcv |
| Suggests: | testthat, knitr, rmarkdown |
| Published: | 2018-04-09 |
| Author: | Stefan Feuerriegel [aut, cre], Nicolas Proellochs [aut] |
| Maintainer: | Stefan Feuerriegel <sentiment at sfeuerriegel.com> |
| BugReports: | https://github.com/sfeuerriegel/SentimentAnalysis/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/sfeuerriegel/SentimentAnalysis |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | SentimentAnalysis results |
| Reference manual: | SentimentAnalysis.pdf |
| Vignettes: |
Introduction to SentimentAnalysis |
| Package source: | SentimentAnalysis_1.3-2.tar.gz |
| Windows binaries: | r-devel: SentimentAnalysis_1.3-2.zip, r-release: SentimentAnalysis_1.3-2.zip, r-oldrel: SentimentAnalysis_1.3-2.zip |
| OS X binaries: | r-release: SentimentAnalysis_1.3-2.tgz, r-oldrel: SentimentAnalysis_1.3-2.tgz |
| Old sources: | SentimentAnalysis archive |
Please use the canonical form https://CRAN.R-project.org/package=SentimentAnalysis to link to this page.


Dashboard
Apply now
Repayment history
Logout
<EMAIL_ADDRESS>home
Dashboard
content_paste
Apply
library_books
Repayment history
<EMAIL_ADDRESS>Profile
Upload
Account
Address
Employment\Company Details
Bank Details
Address
Employment\Company Details
Bank
Account
*
*
*
*
Save
Address
*
*
Lagos
Abuja
PortHarcourt
Save
Employment/Company Details
*
*
*
*
*
*
*
*
Lagos
Abuja
PortHarcourt
Save
Bank Information
*
*
*
*
*
Save
Profile
Reset Password
Logout


GPText
What and Why
Statistical ML for clustering, sentiment analysis, …
Large scale text analytics processing
+
+
Semi-structured, unstructured data
Process large quantities of raw text (social media, email) into mission-critical information
Potential use cases:
+
+
Consider the phrase GPDB is an MPP database management system
Index creation
Real data schema
<fields>
<field name="id" type="string" indexed="true" stored="true"
required="true"/>
<field name="type" type="string indexed="true" stored="true"/>
<field name="artist" type="text" indexed="true" stored="true"/>
.
.
.
<field name="genre" type="string" indexed="true" stored="true"
multivalued="true"/>
<field name="tracknr" type="sint" indexed="true" stored="true"/>
<field name="year " type="sint" indexed="false" stored="true"/>
</fields>
Advanced FTS
Vector space representation of document
Text analytics via
Architecture
Solr index
Solr index
Solr index
Solr index
Solr index
Solr index
Solr index
Solr index
GPText consists of
| Category | Functions |
|---|---|
| Index functions | CREATE INDEX INDEX DROP INDEX COMMIT INDEX |
| Search functions | SEARCH FACETED SEARCH |
| Terms operations | ENABLE terms CREATE terms table for specific query Document vector creation |
| General functions | Index statistics Gptext status/version |
Searches text index for <search query> and returns ID's and relevance scores of matching document
SELECT * FROM gptext.search(TABLE( SELECT 1 SCATTER BY 1),
idx_name, /* Name of the index to search */
search_query, /* Enhanced Solr/Lucene query
parser syntax */
filter_queries, /* Array to filter out search terms by
other columns in the index */
options /* Solr options to limit data, order,
highlights, or return full results */
);
| Term match | "test" OR "hello" |
| Field specification | title:"The Right Way" AND text:"some text" |
| Wildcard searches | te?t OR test* |
| Fuzzy searches (Levenshtein Distance) | roam~ OR roam~0.8 |
| Proximity searches | "jakarta apache"~10 |
| Range searches | id:[5 TO 10] OR title:{Aida TO Carmen} |
| Term boosting | jakarta^4 apache |
| Boolean searching | AND, OR, NOT, +, -, etc |
| Grouping | (jakarta OR apache) AND website |
| Wild cards may be used in ranges | field:[* TO 100] |
| Pure negative queries | -inStock:false |
| Nested query parser support | _query_:"{!dismax}how now brown cow" |
| Ordered Proximity searches | 5n(dog cat) OR 5w(cat dog) |
| Nested Proximity searches | 5n(dog AND 3n(cat mouse)) |
| Wildcards in phrases | "now now * brown cow" |
Enhanced Solr query syntax
Greenplum Unified Query Parser
SELECT *
FROM gptext.search(TABLE (select 1 scatter by 1),
'demo.public.enron',
'content:"Phillips Petroleum"
AND ["2000-05-22T00:00:00Z" TO NOW]',
NULL
);
id | score
--------+-----------
709244 | 11.777072
12818 | 10.025828
301590 | 2.6093144
175041 | 1.8506925
266880 | 1.8506925
87189 | 1.7560055
Search for emails which contain "Phillips Petroleum" after May 22nd.
Returns the document id and relevancy score.
Higher score = more relevant
SELECT *
FROM gptext.search(TABLE (select 1 scatter by 1),
'demo.public.enron',
'content:"Phillips Petroleum"',
array['date:["2000-01-01T00:00:00Z" TO "2001-01-01T00:00:00Z"]'],
NULL
);
Search for emails which contain "Phillips Petroleum" in year 2000.
SELECT *
FROM gptext.search(TABLE (select 1 scatter by 1),
'demo.public.enron',
'content:"Phillips Petroleum"',
array['from:"Eric Bass"', 'to:"Bryan Hull"'],
NULL
);
Search for "Phillips Petroleum" related emails sent from 'Eric Bass' and to 'Bryan Hull'.
SELECT count(*)
FROM gptext.search(TABLE (select 1 scatter by 1),
'demo.public.enron',
'content:"Phillips Petroleum"',
NULL,
'rows=1'
);
count
-------
30
(1 row)
Other options you could set in a & separated string
Return 1 row for each shard (i.e., 30 GP segments returns 30 rows)
SELECT l.id,
l.score,
r."to"
FROM
gptext.search(table(select 1 scatter by 1),
'gpuser.public.enron',
'content:2w(Phillips Petroleum)',
array['to:"Christine Stokes"',
'date:["2000-01-01T00:00:00Z" TO "2001-01-01T00:00:00Z"]'],
'hl=true&hl.fl=content&rows=1') l,
enron r
WHERE
l.id = r.id::text;
Joining search results with the original table
Faceting breaks query results into multiple categories with a count of the number of documents in the index for each category.
SELECT * FROM gptext.faceted_field_search(
idx_name, /* Name of the index to search */
search_query, /* Enhanced Solr/Lucene query
parser syntax */
filter_queries, /* Array to filter out search terms by
other columns in the index */
facet_fields /* An array of field names to facet
- Use Greenplum array notation */
facet_limit /* Max number of results to be returned
for each aggregation (facet) */
min_results /* Minimum number of results required
before an aggregation (facet) will be
returned (0 to return all facets) */
options /* Solr options to limit data, order,
highlights, or return full results */
);
SELECT *
FROM
gptext.faceted_field_search(
'demo.twitter.message',
'*:*',
null,
'{authorid}',
5,
2
);
field_name | field_value | value_count
------------+-------------+-------------
author_id | 102185050 | 9
author_id | 202305785 | 2
author_id | 64111799 | 2
author_id | 45326213 | 2
author_id | 195035308 | 2
(5 rows)
Facet on author_id, no limit, with a minimum of five tweets, all tweets.
Selects five authors with at least two tweets.
Return type:
SETOF gptext.facet_field_result
| Column | Type |
|---|---|
| field_name | text |
| field_value | text |
| value_count | bigint |
SELECT * FROM gptext.faceted_query_search(
idx_name, /* Name of the index to search */
search_query, /* Enhanced Solr/Lucene query
parser syntax */
filter_queries, /* A text array of filter queries.
If none, set this parameter to null. */
facet_query /* Type: text[]. Required.
An array of facet queries. */
options /* Solr options to limit data, order,
highlights, or return full results */
);
SELECT *
FROM gptext.faceted_query_search(
'demo.twitter.message', '*:*', null,
'{author_followers_count:[0 TO 5],
author_followers_count:[6 TO 10],
author_followers_count:[11 TO *]}'
);
query_name | value_count
----------------------------------+-------------
author_followers_count:[0 TO 5] | 39
author_followers_count:[11 TO *] | 1632
author_followers_count:[6 TO 10] | 36
(3 rows)
Uses Solr queries to divide twitter authors into three classes based on number of followers.
Return type:
SETOF gptext.facet_query_result
| Column | Type |
|---|---|
| query_name | text |
| value_count | bigint |
SELECT * FROM gptext.faceted_range_search(
idx_name, /* Name of the index to search */
search_query, /* Enhanced Solr/Lucene query
parser syntax */
filter_queries, /* A text array of filter queries.
If none, set this parameter to null. */
field_name /* Name of the field on which to facet */
range_start /* Beginning of range */
range_end /* End of range */
range_gap /* Size of range increment (text) */
options /* Solr options to limit data, order,
highlights, or return full results */
);
SELECT * FROM gptext.faceted_range_search(
'demo.twitter.message',
'*:*', null,
'created_at',
'2011-08-01T00:00:00Z',
'2011-11-01T00:00:00Z',
'+7DAY'
);
field_name | range_value | value_count
------------+----------------------+-------------
created_at | 2011-08-01T00:00:00Z | 0
created_at | 2011-08-08T00:00:00Z | 0
created_at | 2011-08-15T00:00:00Z | 0
created_at | 2011-08-22T00:00:00Z | 52
created_at | 2011-08-29T00:00:00Z | 189
created_at | 2011-09-05T00:00:00Z | 545
created_at | 2011-09-12T00:00:00Z | 0
created_at | 2011-09-19T00:00:00Z | 109
created_at | 2011-09-26T00:00:00Z | 69
created_at | 2011-10-03T00:00:00Z | 59
created_at | 2011-10-10T00:00:00Z | 206
created_at | 2011-10-17T00:00:00Z | 147
created_at | 2011-10-24T00:00:00Z | 112
created_at | 2011-10-31T00:00:00Z | 94
(14 rows)
Facet on date range from midnight August 1, 2011 to midnight November 1, 2011, with a 7-day gap.
Return type:
SETOF gptext.facet_range_result
| Column | Type |
|---|---|
| field_name | text |
| range_value | text |
| value_count | bigint |
Examples
create schema test; -- assumes gptext schema in database
create table test.test_data (id bigint, data varchar);
insert into test.test_data (id, data) values
(1, 'example text #1, not much information'),
(2, 'example text #2, a bit more information, but still not enough'),
(3, 'A.Grishchenko is reading this course'),
(4, 'Verint team is participating'),
(5, 'This course is really intensive'),
(6, 'Design of the distributed systems is really important'),
(7, 'The information you get here should be valuable')
;
select gptext.create_index ('test', 'test_data', 'id', 'data');
select * from gptext.index (TABLE(select * FROM test.test_data),
'test.test.test_data');
select * from gptext.commit_index ('test.test.test_data');
select t.id, t.score, t2.data
from gptext.search(TABLE(SELECT 1 SCATTER BY 1),
'testdb.test.test_data',
'example',
null,
null) as t,
testdb.test_data as t2
where t.id = t2.id;
id | score | data
----+--------+--------------------------------------------------------------
1 | 0.7407 | example text #1, not much information
2 | 0.4392 | example text #2, a bit more information, but still not enough
select t.id, t.score, t2.data
from gptext.search(TABLE(SELECT 1 SCATTER BY 1),
'testdb.test.test_data',
'valuable information',
null,
null) as t,
testdb.test_data as t2
where t.id = t2.id;
id | score | data
----+--------+--------------------------------------------------------------
2 | 0.1221 | example text #2, a bit more information, but still not enough
1 | 0.1705 | example text #1, not much information
7 | 0.7976 | The information you get here should be valuable
GPText and SOLR differences
Tokenizers and Analyzers
| Normalize words (e.g. convert to lower case) |
LOVE -> love overDue -> overdue |
| Analyze numbers and punctuations for relevancy | 0-9, $#%@! ... |
| Remove stop words | you, me, we, in, on, the, and, but, here, ... |
| Stemming | consign consigned consigning consignment |
}
consign
An analyzer chain defines preprocessing sequences prior to indexing
Document or Query
Tokenizer
Stop Word Filter
. . .
Stemmer
GPText Index
Two main analyzer chains
Note: Search terms in queries are processed by the analyzer chain defined for an index
gptext-config -f <file> -i <index> [-r] [-e] [-b]
gptext-config -d <path/file> -i <index>
gptext-config -j <path/jar>
gptext-config -o <jvm-options>
gptext-config -f <file> -i <index> -a <file to append>
gptext-config -k <solr key> -s <solr value>
Edit the schema.xml file
gptext-config -f schema.xml -i <index> -e
<field name="<text_search_col>" indexed="true" stored="false" type="text_intl"/>
Edit type to either "text_intl" or "text_sm"
Thank you!


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/transport.20through.20trivial.20bundles.html ---
I find myself needing a few lemmas about parallel transport through trivial bundles. (In the first case, this is literally the case, the later ones are close analogues.)
universes u₁ u₂ @[simp] lemma {u₁ u₂} parallel_transport_for_trivial_bundles {α : Sort u₁} {a b : α} {β : Sort u₂} (p : a = b) (x : β) : @eq.rec α a (λ _, β) x b p = x := begin induction p, simp, end @[simp] lemma plift.rec.constant {α : Sort u₁} {β : Sort u₂} (b : β) : @plift.rec α (λ _, β) (λ _, b) = λ _, b := begin apply funext, intros, cases x, refl, end @[simp] lemma ulift.rec.constant {α : Type u₁} {β : Sort u₂} (b : β) : @ulift.rec α (λ _, β) (λ _, b) = λ _, b := begin apply funext, intros, cases x, refl, end
Are these welcome in mathlib
? If so, where do they go?
(These all arise after using cases
on hypotheses in fairly harmless ways.)
I made a PR for this at <https://github.com/leanprover/mathlib/pull/124>.
This is all going to follow from your transportable
stuff later on, I guess...
I mean, parallel transport in maths is an instance of transport of structure...
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


This example preloads an audio instance, and immediately plays it using SoundJS. A different audio source will be chosen by SoundJS depending on the browser capabilities. Note that this will not work without a web server in some browsers.
SoundJS is not currently supported in your browser.
We are currently working on support for iOS. Please log a bug if you see this in any other browsers.


Create Your Player
Full Name
Age at draft
Select your age
18
19
20
Birth Country
Country
Canada
United States
Sweeden
Russia
Finland
Czech Republic
Slovakia
Switzerland
Denmark
Slovenia
Germany
Austria
Norway
France
Latvia
Netherlands
Australia
First name:


Enjoy a secure, login free video chat experience.
Create a room
Join a room
Room Code
Join
Waiting For Your Friend
Loading...
Connecting...
Chat Disconnected
Your friend left the room. Disconnecting...
Loading...
Your Message


Comments
-
Greg Hurrell
Ok, I think I've fixed this. Running some tests now to confirm.
-
Greg Hurrell
Seems to work. If you check out my last.fm profile right now you'll see a few repetitions of "214 Sullivan Street" by Fito & Fitipaldis.
Going to continue testing a few edge cases.
-
Greg Hurrell
Looks like some further work is going to be needed on the edge cases. Check out what happens if we submit a track, then pause, then repeat:
17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Received notification from iTunes 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Received notification of non-playing status 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = "Por la boca vive el pez"; WOAudioscrobblerArtist = "Fito y Fitipaldis"; WOAudioscrobblerLength = 134; WOAudioscrobblerTrack = "214 sullivan street"; } 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: This track was not previously submitted for consideration; cancelling timer 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Cancelling previously existing submission timer, if any 17/8/2009 14:42:22 Synergy[11856] Audioscrobbler: Cancelling previously existing submission timer, if any 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Received notification from iTunes 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Received notification of playing status 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = "Por la boca vive el pez"; WOAudioscrobblerArtist = "Fito y Fitipaldis"; WOAudioscrobblerLength = 134; WOAudioscrobblerTrack = "214 sullivan street"; } 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: This track appears to be a new submission 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Cancelling previously existing submission timer, if any 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Setting up new submission timer (67 seconds) 17/8/2009 14:42:35 Synergy[11856] Audioscrobbler: Setting up new submission timer (67 seconds) 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: Received notification from iTunes 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: Received notification of playing status 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = "Por la boca vive el pez"; WOAudioscrobblerArtist = "Fito y Fitipaldis"; WOAudioscrobblerLength = 134; WOAudioscrobblerTrack = "214 sullivan street"; } 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: This track was previously submitted for consideration but no paused timer found; doing nothing 17/8/2009 14:43:00 Synergy[11856] Audioscrobbler: This track was previously submitted for consideration but no paused timer found; doing nothing 17/8/2009 14:43:42 Synergy[11856] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 17/8/2009 14:43:42 Synergy[11856] Audioscrobbler: Position does not match (user must have skipped); will not submit to Audioscrobbler
The problem is when we resume playback (see message at 14:42:35, "This track appears to be a new submission"). On submission we've already cleaned up the "current song info", so when we pause/resume it looks like a new track. But then when the repeat kicks in we get an update notification from iTunes and Synergy sees we already have a timer running and matching song info, so does nothing: and when the timer fires and it has to submit it checks the track position to detect if the user has skipped (which would rule out submission), and of course the position doesn't match.
So I wonder if instead of clearing the track info at submission time if we should be handling all of this when receiving the first notification from iTunes. Basically, overwrite the "current song info" regardless whenever "position" is 0 (zero).
-
Greg Hurrell
Ok, have made some more changes; let's test them out.
First time track is played:
2009-08-17 15:41:07.454 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:41:07.454 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:41:07.457 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:41:07.460 Synergy[13923:10b] Audioscrobbler: This track appears to be a new submission 2009-08-17 15:41:07.461 Synergy[13923:10b] Audioscrobbler: Cancelling previously existing submission timer, if any 2009-08-17 15:41:07.465 Synergy[13923:10b] Audioscrobbler: Setting up new submission timer (44 seconds) 2009-08-17 15:41:51.473 Synergy[13923:10b] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2009-08-17 15:41:51.484 Synergy[13923:10b] Audioscrobbler: Position matches, will submit to Audioscrobbler
Next time it is played (on repeat mode):
2009-08-17 15:42:36.751 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:42:36.751 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:42:36.753 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:42:36.755 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration but player position is 0, so treating like a new submission 2009-08-17 15:42:36.756 Synergy[13923:10b] Audioscrobbler: Cancelling previously existing submission timer, if any 2009-08-17 15:42:36.757 Synergy[13923:10b] Audioscrobbler: Setting up new submission timer (44 seconds) 2009-08-17 15:43:20.761 Synergy[13923:10b] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2009-08-17 15:43:20.784 Synergy[13923:10b] Audioscrobbler: Position matches, will submit to Audioscrobbler
Now pausing after submission, but before track starts repeating again:
2009-08-17 15:43:41.814 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:43:41.816 Synergy[13923:10b] Audioscrobbler: Received notification of non-playing status 2009-08-17 15:43:41.819 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:43:41.828 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration; pausing timer
Resuming:
2009-08-17 15:44:20.284 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:44:20.288 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:44:20.292 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:44:20.328 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration but no paused timer found; doing nothing
Track repeats (starts from beginning again):
2009-08-17 15:44:44.741 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:44:44.747 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:44:44.767 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:44:44.769 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration but player position is 0, so treating like a new submission 2009-08-17 15:44:44.769 Synergy[13923:10b] Audioscrobbler: Cancelling previously existing submission timer, if any 2009-08-17 15:44:44.770 Synergy[13923:10b] Audioscrobbler: Setting up new submission timer (44 seconds)
And submission takes place:
2009-08-17 15:45:28.772 Synergy[13923:10b] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2009-08-17 15:45:28.787 Synergy[13923:10b] Audioscrobbler: Position matches, will submit to Audioscrobbler
Last thing to test; pausing before submission timer kicks in:
2009-08-17 15:46:22.087 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:46:22.088 Synergy[13923:10b] Audioscrobbler: Received notification of non-playing status 2009-08-17 15:46:22.093 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:46:22.095 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration; pausing timer
And resuming:
2009-08-17 15:46:46.875 Synergy[13923:10b] Audioscrobbler: Received notification from iTunes 2009-08-17 15:46:46.884 Synergy[13923:10b] Audioscrobbler: Received notification of playing status 2009-08-17 15:46:46.887 Synergy[13923:10b] Audioscrobbler: Track information: { WOAudioscrobblerAlbum = Roots; WOAudioscrobblerArtist = "Gipsy Kings"; WOAudioscrobblerLength = 89; WOAudioscrobblerTrack = "Fandango (Patchai)"; } 2009-08-17 15:46:46.897 Synergy[13923:10b] Audioscrobbler: This track was previously submitted for consideration and we have a paused timer; resuming it
And submission takes place:
2009-08-17 15:47:22.502 Synergy[13923:10b] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2009-08-17 15:47:22.519 Synergy[13923:10b] Audioscrobbler: Position matches, will submit to Audioscrobbler
So looks like everything is working perfectly. Will commit this and include it in the next (post-3.5.4a) release.
Will mark this ticket as closed.
-
Greg Hurrell
Status changed:
- From: open
- To: closed
-
anonymous
Wow, you're wonderfully prompt. I'm the one who originally submitted the question. :) Thank you so much. I'll look forward to the next release!
-
Greg Hurrell
Currently testing, will probably cut a 3.5.5a release before the end of the week or early next week.
-
Greg Hurrell
3.5.5a is now out (released a couple of hours ago).
Add a comment
Comments are now closed for this issue.


--- title: article layout: default --- {% include breadcrumbs.html parent="Blogi" %}
Added by {{ page.author }} {{ page.submitted }}
Lisanud {{ page.author }} {{ page.submitted }}


Channel name
0
Non-negative counts only
Night mode
Occasionally remove subs (or add if rate is negative)
Only show last 500 graph values
Rate in subs/second
Rate in subs/minute
Rate in subs/hour
Rate in subs/day
This site is not affiliated with
livecounts.net
P to pause subs, R to reset, H to hide settings, C to clear graph
10
subscribers to 10


Hi,
I have read that is possible to measure apparent power but, is it possible to measure active power and power factor? if so, what kind of clamps need?
Cheers
Archived Forum |
|
Active PowerSubmitted by Momo on Wed, 05/11/2014 - 15:47Hi, I have read that is possible to measure apparent power but, is it possible to measure active power and power factor? if so, what kind of clamps need? Cheers » |
Re: Active Power
I think you need to read the "Building Blocks" section of this website. If by "clamps" you mean split-core current transformers (I always interpret 'clamps' to mean busbar clamps), then you must have a suitable one to measure the current. The one in the shop is suitable for 1 - 100 A in conjunction with the emonTx.
You also need to measure the voltage, of course.
Re: Active Power
Ok, thank you Robert. I have already read "Building Blocks" section but can't find any response to my doubt. To calculate Active Power is the product of V x I x Cos(Phi), my doubt is if the system is using cos(Phi) to calculate Active Power.
Re: Active Power
"To calculate Active Power is the product of V x I x Cos(Phi), my doubt is if the system is using cos(Phi) to calculate Active Power."
That isn't the question you first asked. No, the system does not use cos(φ), and in any case your formula is not correct - generally at least. It is only true in one very specific case, and that is where both current and voltage waveforms are perfect sine waves. In practice, even the voltage wave is not a perfect sine wave, and the current wave may be nothing like.
The way real power is calculated in the emonTx is, around 2500 times per second, to multiply the instantaneous voltage by the instantaneous current, and then average those readings. That gives you real power, requiring neither a sine wave nor knowledge of phase angle. Phase angle is meaningless once you depart from pure sine waves. We determine the power factor from its true definition: the ratio of real power to apparent power, which does have a meaning whether the waveforms are true sine waves or not (noting that using our algorithm, we cannot determine whether it is leading or lagging).
[Note: I'm not mentioning Fourier and what happens when you know the harmonic content of the two waves. Doing that would be beyond the processing power of the Atmega 328P anyway.]
Re: Active Power
Thank you Robert!
Re: Active Power
We determine the power factor from its true definition.... noting that using our algorithm, we cannot determine whether it is leading or lagging).
I don't think power factor can ever reveal leading Vs lagging can it? Power factor only goes negative when real power goes negative, i.e. you're now producing rather than consuming (or vice versa depending on your local conventions).
You need to calculate reactive power to determine if things are leading or lagging, and even then, as you say, once there are harmonics present it all gets very ugly.... it can even be leading at some frequencies and lagging at others.
Re: Active Power
By the definition, you're right, but by custom the overall power factor is called leading or lagging depending on whether the overall effect of the load on the system is capacitive or inductive. Generally it is assumed that there are minimal harmonics present (as they must be to conform with the rules), but we agree that once the harmonics become significant, then it needs detailed analysis to determine what's really happening.
If you were to delay the voltage wave by 90°, you'd then be able to do the V × I calculation and get vars, which would enable you to know if the overall power factor was leading or lagging.  I must try that one day with Martin's PLL sketch.
Re: Active Power
I'm trapped in the IEEE-endorsed Budeanu definition of reactive power, all done in the frequency domain. I'm not sure it's useful for anything, including calculating power factor. With my very stiff local grid my V is pretty much a perfect sine wave, and an FFT confirms no harmonics in V. In that case, all the terms bar the first in the Budeanu sum are zero and my Reactive Power becomes the fundamental reactive power. All the harmonic currents get booked to Distortion Power. You can see the three components (Real, Reactive and Distortion) of my apparent power in the dials below. This is how my whole-house feed appears to the grid in the wee hours (when the fridge compressor is not running). So slightly inductive at 50 Hz (13.8 vars), and lots of junk in the harmonics (110 vars).
Re: Active Power
It's OK for some. Look at the report on the Ideal adapter to see the flat-topping I have! It wouldn't be hard to run an FFT on that, but I think I'd have to go some way up the harmonics to get anywhere near a zero.
What does the Distortion Power look like with
allmost of the electronic devices (with SMPS) switched off?Re: Active Power
Yes, yours is almost as much square wave as it is sine wave. Any idea where in the network that happens? Is it just the final distribution transformer and local wiring, or do the high voltage trunks suffer from it too?
As expected, distortion drops right away once I turn a bunch of electronics off:
Re: Active Power
I don't know where it happens, I've never worked in generation or distribution. I'd guess it's at the later stages of the distribution network where the fault level is necessarily lower. The only time I've had any dealings with anything above the normal domestic/factory supply (240/415V) was the 11 kV grid in Nottinghamshire, and although we were interested in harmonic currents, I can't remember ever seeing the voltage waveform (in my defence, it was about 1982-3).


Discord Elixir v1.1.8 DiscordEx.RestClient.Resources.Channel
Convience helper for channel
Summary
Functions
Bulk Delete previously sent messages
Create channel invites
Delete a guild channel, or close a private message
Delete a previously sent message
Delete channel permissions
Edit channel permissions
Get channel
Get channel invites
Retrieve messages for a channel
Update a channels settings
Post a file and message to a guild text or DM channel
Post a message to a guild text or DM channel
Trigger typing indicator
Edit a previously sent message
Functions
Specs
bulk_delete_messages(pid, number, list) :: atom
Bulk Delete previously sent messages
This endpoint can only be used on guild channels and requires the ‘MANAGE_MESSAGES’ permission.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
- message_ids: list of msssage ids to delete
Examples
Channel.bulk_delete_messages(conn,<PHONE_NUMBER>04934, [32902930920932,3290239832023,237727828932])
Specs
create_invite(pid, number, map) :: map
Create channel invites
Requires the CREATE_INSTANT_INVITE permission.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
- options: Invite creation options which include (max_age [default 24 hours], max_uses, temporary, xkcdpass)
Examples
Channel.create_invite(conn,<PHONE_NUMBER>093, %{max_age: 86400, max_uses: 1, temporary: false, xkcdpass: false})
Specs
delete(pid, number) :: map
Delete a guild channel, or close a private message
Requires the ‘MANAGE_GUILD’ permission for the guild containing the channel.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
Examples
Channel.delete(conn,<PHONE_NUMBER>0239)
Specs
delete_message(pid, number, number) :: atom
Delete a previously sent message
This endpoint can only be used on guild channels and requires the ‘MANAGE_MESSAGES’ permission.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
- message_id: The message id that you want to edit
Examples
Channel.delete_message(conn,<PHONE_NUMBER>04934,<PHONE_NUMBER>8)
Specs
delete_permissions(pid, number, number) :: map
Delete channel permissions
Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the ‘MANAGE_ROLES’ permission.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
- overwrite_id: The role or user to override permissions in channel for
Examples
Channel.delete_permissions(conn,<PHONE_NUMBER>383,<PHONE_NUMBER>823)
Specs
edit_permissions(pid, number, number, map) :: map
Edit channel permissions
Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the ‘MANAGE_ROLES’ permission.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
- overwrite_id: The role or user to override permissions in channel for
- options: The permissions to allow or deny
Examples
Channel.edit_permissions(conn,<PHONE_NUMBER>383,<PHONE_NUMBER>, %{allow: 66321471})
Specs
get(pid, number) :: map
Get channel
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
Examples
Channel.get(conn,<PHONE_NUMBER>3832)
Specs
get_invites(pid, number) :: list
Get channel invites
Requires the ‘MANAGE_CHANNELS’ permission.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
Examples
Channel.get_invites(conn,<PHONE_NUMBER>383)
Specs
messages(pid, number) :: map
Retrieve messages for a channel
Requires the ‘READ_MESSAGES’ permission for the guild containing the channel.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
Examples
Channel.messages(conn,<PHONE_NUMBER>04934)
Specs
modify(pid, number, map) :: map
Update a channels settings
Requires the ‘MANAGE_GUILD’ permission for the guild containing the channel.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
- options: Updateable options which include (name, position, topic, bitrate)
Examples
Channel.modify(conn,<PHONE_NUMBER>093, %{name: "my-channel", topic" "we all are friends here"})
Specs
send_file(pid, number, map) :: map
Post a file and message to a guild text or DM channel
Requires the ‘SEND_MESSAGES’ permission to be present on the current user.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
- file_data: filed data which include (content, nonce, tts, file)
Examples
Channel.send_messages(conn,<PHONE_NUMBER>04934, %{content: "Check this out!", file: "/local/path/to/file.jpg"})
Specs
send_message(pid, number, String.t) :: map
Post a message to a guild text or DM channel
Requires the ‘SEND_MESSAGES’ permission to be present on the current user.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
- message_data: message data which include (content, nonce, tts)
Examples
Channel.send_message(conn,<PHONE_NUMBER>04934, %{content: "Hi! Friends!"})
Specs
trigger_typing(pid, number) :: atom
Trigger typing indicator
Post a typing indicator for the specified channel. Generally bots should not implement this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
Examples
Channel.trigger_typing(conn,<PHONE_NUMBER>093)
Specs
update_message(pid, number, number, String.t) :: map
Edit a previously sent message
You can only edit messages that have been sent by the current user.
Parameters
- conn: User connection for REST holding auth info
- channel_id: Channel id
- message_id: The message id that you want to edit
- message: Message you wish to update the sent message with
Examples
Channel.update_message(conn,<PHONE_NUMBER>04934,<PHONE_NUMBER>8, "Updating this message!")


|
YOUR NAME's CS132 programs
|
Go to the source code of this file.
Classes | |
| struct | testing::internal::LessByName< T > |
| class | testing::internal::UnitTestHelper |
| class | testing::internal::FinalSuccessChecker |
Namespaces | |
| testing | |
| testing::internal | |
Functions | |
| testing::internal::TEST (ApiTest, UnitTestImmutableAccessorsWork) | |
| AssertionResult | testing::internal::IsNull (const char *str) |
| testing::internal::TEST (ApiTest, TestCaseImmutableAccessorsWork) | |
| testing::internal::TEST (ApiTest, TestCaseDisabledAccessorsWork) | |
| testing::internal::TEST (ApiTest, DISABLED_Dummy1) | |
| testing::internal::TEST (DISABLED_Test, Dummy2) | |
| int | main (int argc, char **argv) |
Variables | |
| const int | testing::internal::kTypedTestCases = 0 |
| const int | testing::internal::kTypedTests = 0 |


| Interface | Description |
|---|---|
| DeliveryPolicy | |
| SorterFoodItem | |
| TargetProfitPolicy |
| Class | Description |
|---|---|
| BasicFidelityCard | |
| Board<ObsType> | |
| Courier | |
| Customer | |
| DeliveryPolicyFactory | |
| Dessert | |
| Dish | |
| FairOccupationDeliveryPolicy | |
| FastestDeliveryPolicy | |
| FidelityCard | |
| FidelityCardFactory | |
| FoodItem |
this abstract class enables us to deal with both Dish and Meal objects in the sorter
|
| FoodItemFactory | |
| FullMeal | |
| HalfMeal | |
| LotteryFidelityCard | |
| MainDish | |
| Manager | |
| Meal | |
| MealVisitor |
this visitor pattern enables us to deal with different implementation of
computePrice
addDish
|
| Menu | |
| MyFoodora | |
| MyFoodoraClient | |
| Order | |
| PointFidelityCard | |
| Position | |
| Restaurant | |
| SorterCounter |
sorts the list according to the area of figures (in descending order)
|
| SorterFoodItemFactory |
this factory class enables us to deals with different kinds of SorterFoodItem
|
| SorterPrice |
sorts the list according to the area of figures (in descending order)
|
| Starter | |
| TargetProfitPolicyDeliveryCost | |
| TargetProfitPolicyFactory | |
| TargetProfitPolicyMarkup | |
| TargetProfitPolicyServiceFee | |
| User | |
| UserFactory |
this factory class enables us to register different types of users
|
| Exception | Description |
|---|---|
| AccountDeactivatedException | |
| FoodItemNotFoundException | |
| IdentificationIncorrectException | |
| NonReachableTargetProfitException | |
| NoPlaceInMealException | |
| OrderNotFoundException | |
| UserNotFoundException |