Sponsored Content
Top Forums Web Development Turning jQuery Code into Vue.js Post 303025677 by Scott on Friday 9th of November 2018 04:14:49 AM
Old 11-09-2018
Added vbuserId to the component:
Code:
  data() {
    return {
      ...
      vbuserId: vbuserId
    };
  },
  computed:{
    ...
    id: function() {
      return  this.vbuserId;
    }

I guess there's no need for a computed value there, as it's not actually computing anything.
Turning jQuery Code into Vue.js-vbuserid_changepng
 

6 More Discussions You Might Find Interesting

1. What is on Your Mind?

JQuery and CSS Flex Code for Responsive WOL Page

I have just wrote this jQuery to the WOL page, so the table of users on line will not need scrollbars and will instead transform into a responsive table: <script> jQuery(document).ready(function (){ jQuery("#neo-who-flex-tcat"). css({"display":"flex","flex-flow":"row wrap", ... (0 Replies)
Discussion started by: Neo
0 Replies

2. What is on Your Mind?

JQuery and CSS Flex Code for Responsive Forum Home Page

So far, I have completed making the home page more responsive (except for the forum stats at the top and the WOL box at the bottom, they still use scroll bars). xevV3_iZ8-s For full screen use the link below and set your YT resolution to 1080p60 HD https://youtu.be/xevV3_iZ8-s Here is... (1 Reply)
Discussion started by: Neo
1 Replies

3. What is on Your Mind?

JQuery to Add Code Tags to Selected Text

Hey. Someone find or write some jQuery code where we can select text with our mouse and then click or double click the highlighted / selected text and then it will wrap code tags around the highlighted text (in our editors). :) (0 Replies)
Discussion started by: Neo
0 Replies

4. Web Development

Simple Vue.js Component to Redirect to External Web Page Using Vue Router

Vue Router has some quirks and on of the quirks is that it is not reliable when adding external links using the vue-router library. After struggling with many solutions, I have found that creating a simple Vue.js component like this one seems to work the best (so far): Component Example: ... (0 Replies)
Discussion started by: Neo
0 Replies

5. Web Development

Vue JS 2 Tutorial by The Net Ninja: A Recommended Vue.js Video Tutorial Series

A number of people have asked me how to get started with Vue.js and my reply before today was to Google "Vue.js". That has changed and my recommendation to anyone who wants to learn the fastest growing, easiest to learn and use Vue.js web dev framework is to watch this video tutorial series: ... (0 Replies)
Discussion started by: Neo
0 Replies

6. Web Development

Vue.js component: Beautiful code highlighter

Sooner than later I will render forum discussions in Vue.js to complement the standard way of showing forum threads. Today, I ran across this component, vue-code-highlight Beautiful code syntax highlighting as Vue.js component. https://www.unix.com/members/1-albums225-picture1199.jpg ... (1 Reply)
Discussion started by: Neo
1 Replies
Statistics::Basic::ComputedVector(3pm)			User Contributed Perl Documentation		    Statistics::Basic::ComputedVector(3pm)

NAME
Statistics::Basic::ComputedVector - a class for computing filtered vectors SYNOPSIS
Invoke it this way: my $vector = vector(1,2,3); my $computed = computed($vector)->set_filter(sub{ # NOTE: only interested in even numbers: grep { !($_ % 2) } @_ }); # nearly the same, opposite order: my $computed = computed(1,2,3)->set_filter(sub {map{$_+1}@_}); my $vector = $computed->query_vector; METHODS
new() The constructor takes a single array ref or a single Statistics::Basic::ComputedVector as its argument. It returns a Statistics::Basic::ComputedVector object. If passed arguments other than Statistics::Basic::Vector objects, the constructor will built an appropriate vector object -- which can be queried with "query_vector()" Note: normally you'd use the computed() constructor, rather than building these by hand using "new()". copy() Creates a new computed vector object referring to the same source vector and using the same filter as this one. my $v1 = vector(1,2,3); my $c1 = computed($v1); $c1->set_filter(my $s = sub {}); my $copy1 = computed($v1); $copy1->set_filter($s); my $copy2 = $c1->copy; # just like $c2, but in one step To instead create a filtered version of a filtered vector, choose this form: my $v1 = vector(1,2,3); my $c1 = computed($v1); $c1->set_filter(sub {}); my $c2 = computed($c1); $c2->set_filter(sub {}); insert() Insert new values into the input vector. If the vector was already full (see "set_size()"), this will also shift oldest elements from the input vector to compensate. $computed->insert( 4, 3 ); # insert a 3 and a 4 Note that continuing from the "SYNOPSIS" example, this would certainly insert a 4 and a 3 into the input vector, but the 3 wouldn't be returned from a "query()" because it is odd. This function returns the object itself, for chaining purposes. append() ginsert() Insert new values into the input vector. If the vector was already full (see "set_size()"), these functions will grow the size of the input vector to accommodate the new values, rather than shifting things. $computed->append( 4, 3 ); # append a 3 and a 4 Note that continuing from the "SYNOPSIS" example, this would certainly insert a 4 and a 3 into the input vector, but the 3 wouldn't be returned from a "query()" because it is odd. This function returns the object itself, for chaining purposes. query() "query()" returns the contents of the computed vector (after filtering) either as a list or as an arrayref. my @copy_of_contents = $computed->query; my $reference_to_contents = $computed->query; Note that changing the $reference_to_contents will not usefully affect the contents of the vector itself, but it will adversely affect any computations based on the vector. If you need to change the contents of a vector in a special way, use another Statistics::Basic::ComputedVector object instead. Keeping $reference_to_contents available long term should work acceptably (since it refers to the vector contents itself). query_vector() Return the input Statistics::Basic::Vector object. query_filled() This returns true when the input vector is full (see "query_filled()" in Statistics::Basic::Vector). This is of questionable usefulness on computed vectors, but is provided for completeness (and internal package consistency). query_size() Return the current size of the computed vector. set_filter() Set the filtering for the computed vector. This function takes a single coderef argument -- all other arguments will be ignored. The elements of the input vector are passed to your filter coderef in @_ and your ref should return the calculated elements of the computed vector as a list. my $vec = vector(1,2,3); my $pow = computed($vec); $pow->set_filter(sub { return map { $_ ** 2 } @_ }) If you need to call more than one filter function, concatenate them together using map or an anonymous sub. $pow->set_filter(sub { return f1(f2(f3(f4(@_)))) }); This function returns the object itself, for chaining purposes. set_size() Set the size of the input vector (not the computed vector, that would make little sense). This function returns the object itself, for chaining purposes. set_vector() Set the contents of the input vector (not the computed one). This function returns the object itself, for chaining purposes. OVERLOADS
This object is overloaded. It tries to return an appropriate string for the vector and raises errors in numeric context. In boolean context, this object is always true (even when empty). AUTHOR
Paul Miller "<jettero@cpan.org>" COPYRIGHT
Copyright 2012 Paul Miller -- Licensed under the LGPL SEE ALSO
perl(1), Statistics::Basic, Statistics::Basic::Vector perl v5.14.2 2012-01-23 Statistics::Basic::ComputedVector(3pm)
All times are GMT -4. The time now is 10:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy