| result: |
failed |
| totalTime: |
2 |
| numTestPasses: |
4 |
| numTestFailures: |
1 |
| numCommandPasses: |
2 |
| numCommandFailures: |
1 |
| numCommandErrors: |
0 |
|
|
|
| open |
/brewery/ |
|
| type |
username |
pduvall |
| type |
password |
password |
| clickAndWait |
//input[@value='Login'] |
|
| verifyTextPresent |
Logged in as pduvall |
false |
|
|
| open |
/brewery/ |
|
| type |
username |
pduvall |
| type |
password |
password |
| clickAndWait |
//input[@value='Login'] |
|
|
|
| AddBeer |
| open |
/brewery/ |
|
| assertTitle |
Login |
|
| clickAndWait |
//input[@value='Login'] |
|
| clickAndWait |
add |
|
| type |
beer_name |
Beer One |
| type |
brewer |
Brewery One |
| clickAndWait |
save |
|
| open |
/brewery/ |
|
| assertTitle |
Login |
|
| clickAndWait |
//input[@value='Login'] |
|
| clickAndWait |
add |
|
| type |
beer_name |
Beer Two |
| type |
brewer |
Brewery Two |
| click |
save |
|
|
|
| open |
/brewery/ |
|
| type |
username |
pduvall |
| type |
password |
password |
| clickAndWait |
//input[@value='Login'] |
|
|
|
| open |
/brewery/ |
|
| type |
username |
pduvall |
| type |
password |
password |
| clickAndWait |
//input[@value='Login'] |
|
|
|


Home
Login / Sign Up Here
FoodTruck TrackR
Man.. this app is gangsta!!!! Taco trucks on the go anytime I want?!?!??! #fakenews
I wanna speak to the manager.. there's two things I love in life. My scentsy business, and this app!! Love how easy this thing is!!
This is better than UberEats :D
The food Truck in my area is the best! They even have dog treats for my baby!! Thanks FoodTruck TrackR!!!
Saves me from having to walk anywhere!! I can get Tacos @ the beach!!!
White claws and coleslaw!!! I love this app.. I eat like 12 times a day!!!
My family flew in and wanted authentic Food truck food. Thanks to FoodTruck TrackR I was able to impress them!!!
If you want to read what other people
have to say about Food Truck TrackR
click here
keyboard_arrow_left
keyboard_arrow_right


--- layout: post title: A Cellphone Powered by Urine date: 2006-01-13 00:00:00 category: amusing ---
Pissing on your chips? A Cellphone Powered by Urine: "Physicists in Singapore have developed a battery that can be powered by human urine."


{% extends "global/Page.html" %} {% load otree %} {% block title %}
| Results Summary |
| Round | Player and outcome |
|---|---|
| {{ p.round_number }} | You chose to {{ p.decision }} and the other participant chose {{ o.decision }}. Your payoff was {{ p.payoff }}. |
| Player 2 | ||||
|---|---|---|---|---|
| {{player.other_player.strategy_1}} | {{player.other_player.strategy_2}} | {{player.other_player.strategy_3}} | ||
| Player 1 | {{ player.strategy_1 }} | {{ player.payoff_selfS1_otherS1 }}, {{ player.other_player.payoff_selfS1_otherS1 }} | {{ player.payoff_selfS1_otherS2 }}, {{ player.other_player.payoff_selfS2_otherS1 }} | {{ player.payoff_selfS1_otherS3 }}, {{ player.other_player.payoff_selfS3_otherS1 }} |
| {{ player.strategy_2 }} | {{ player.payoff_selfS2_otherS1 }}, {{ player.other_player.payoff_selfS1_otherS2 }} | {{ player.payoff_selfS2_otherS2 }}, {{ player.other_player.payoff_selfS2_otherS2 }} | {{ player.payoff_selfS2_otherS3 }}, {{ player.other_player.payoff_selfS3_otherS2 }} |
| Player 1 | |||
|---|---|---|---|
| {{player.other_player.strategy_1}} | {{player.other_player.strategy_2}} | ||
| Player 2 | {{ player.strategy_1 }} | {{ player.payoff_selfS1_otherS1 }}, {{ player.other_player.payoff_selfS1_otherS1 }} | {{ player.payoff_selfS1_otherS2 }}, {{ player.other_player.payoff_selfS2_otherS1 }} |
| {{ player.strategy_2 }} | {{ player.payoff_selfS2_otherS1 }}, {{ player.other_player.payoff_selfS1_otherS2 }} | {{ player.payoff_selfS2_otherS2 }}, {{ player.other_player.payoff_selfS2_otherS2 }} | |
| {{ player.strategy_3 }} | {{ player.payoff_selfS3_otherS1 }}, {{ player.other_player.payoff_selfS1_otherS3 }} | {{ player.payoff_selfS3_otherS2 }}, {{ player.other_player.payoff_selfS2_otherS3 }} |


Parameters for: emboss filter
Angle
Strength
Use natural grayscale
Smoothing
Clamp
Opacity
Post-process results
Tolerance
Keep changed areas
Test purpose
- Create a test Picture entity
- Create an emboss filter and apply it to the test entity
- Update filter attributes and observe the effect they have on the entity
Annotated code


{% include "includes/head.html" %} {% block head %}{% endblock %}
{% include "includes/navbar.html" %}
{% include "includes/notifications.html" %}
{% block content %} {% endblock %}


iblomania
Home
Books
Blog
Cart
About us
Meet the team
Nadeem Mazahreh
Fadia Al-dasouqi
Heba Abdallah
Saeed Awwad
Mohammad Saleh
Shaimaa Mousa
Lana Shamayleh


Registration
Registration
Information will follow soon
Information will follow soon
Bluenumber
Information will follow soon
NAJK & Stem
CGIAR & The Fork
Visit our Solution Market page for more information
Bluenumber
Participants pitch promising solutions, and track owners will select a top 3
NAJK & Stem
Defining innovation roadmaps with track owners and participants
CGIAR & The Fork
Defining innovation roadmaps with track owners and participants
Bluenumber
Participants pitch promising solutions, and track owners will select a top 3
NAJK & Stem
Defining innovation roadmaps with track owners and participants
CGIAR & The Fork
Defining innovation roadmaps with track owners and participants
Networking dinner with inspiring speakers.
Visit our Solution Market page for more information
Information coming soon


| PERLREF(1) | Perl Programmers Reference Guide | PERLREF(1) |
Hard references are smart--they keep track of reference counts for you, automatically freeing the thing referred to when its reference count goes to zero. (Reference counts for values in self-referential or cyclic data structures may not go to zero without a little help; see "Circular References" for a detailed explanation.) If that thing happens to be an object, the object is destructed. See perlobj for more about objects. (In a sense, everything in Perl is an object, but we usually reserve the word for references to objects that have been officially "blessed" into a class package.)
Symbolic references are names of variables or other objects, just as a symbolic link in a Unix filesystem contains merely the name of a file. The *glob notation is something of a symbolic reference. (Symbolic references are sometimes called "soft references", but please don't call them that; references are confusing enough without useless synonyms.)
In contrast, hard references are more like hard links in a Unix file system: They are used to access an underlying object without concern for what its (other) name is. When the word "reference" is used without an adjective, as in the following paragraph, it is usually talking about a hard reference.
References are easy to use in Perl. There is just one overriding principle: in general, Perl does no implicit referencing or dereferencing. When a scalar is holding a reference, it always behaves as a simple scalar. It doesn't magically start being an array or hash or subroutine; you have to tell it explicitly to do so, by dereferencing it.
$scalarref = \$foo; $arrayref = \@ARGV; $hashref = \%ENV; $coderef = \&handler; $globref = \*foo;
It isn't possible to create a true reference to an IO handle (filehandle or dirhandle) using the backslash operator. The most you can get is a reference to a typeglob, which is actually a complete symbol table entry. But see the explanation of the *foo{THING} syntax below. However, you can still use type globs and globrefs as though they were IO handles.
$arrayref = [1, 2, ['a', 'b', 'c']];
Here we've created a reference to an anonymous array of three elements whose final element is itself a reference to another anonymous array of three elements. (The multidimensional syntax described later can be used to access this. For example, after the above, "$arrayref->[2][1]" would have the value "b".)
Taking a reference to an enumerated list is not the same as using square brackets--instead it's the same as creating a list of references!
@list = (\$a, \@b, \%c); @list = \($a, @b, %c); # same thing!
As a special case, "\(@foo)" returns a list of references to the contents of @foo, not a reference to @foo itself. Likewise for %foo, except that the key references are to copies (since the keys are just strings rather than full-fledged scalars).
$hashref = { 'Adam' => 'Eve', 'Clyde' => 'Bonnie', };
Anonymous hash and array composers like these can be intermixed freely to produce as complicated a structure as you want. The multidimensional syntax described below works for these too. The values above are literals, but variables and expressions would work just as well, because assignment operators in Perl (even within local() or my()) are executable statements, not compile-time declarations.
Because curly brackets (braces) are used for several other things including BLOCKs, you may occasionally have to disambiguate braces at the beginning of a statement by putting a "+" or a "return" in front so that Perl realizes the opening brace isn't starting a BLOCK. The economy and mnemonic value of using curlies is deemed worth this occasional extra hassle.
For example, if you wanted a function to make a new hash and return a reference to it, you have these options:
sub hashem { { @_ } } # silently wrong sub hashem { +{ @_ } } # ok sub hashem { return { @_ } } # ok
On the other hand, if you want the other meaning, you can do this:
sub showem { { @_ } } # ambiguous (currently ok, # but may change) sub showem { {; @_ } } # ok sub showem { { return @_ } } # ok
The leading "+{" and "{;" always serve to disambiguate the expression to mean either the HASH reference, or the BLOCK.
$coderef = sub { print "Boink!\n" };
Note the semicolon. Except for the code inside not being immediately executed, a "sub {}" is not so much a declaration as it is an operator, like "do{}" or "eval{}". (However, no matter how many times you execute that particular line (unless you're in an "eval("...")"), $coderef will still have a reference to the same anonymous subroutine.)
Anonymous subroutines act as closures with respect to my() variables, that is, variables lexically visible within the current scope. Closure is a notion out of the Lisp world that says if you define an anonymous function in a particular lexical context, it pretends to run in that context even when it's called outside the context.
In human terms, it's a funny way of passing arguments to a subroutine when you define it as well as when you call it. It's useful for setting up little bits of code to run later, such as callbacks. You can even do object-oriented stuff with it, though Perl already provides a different mechanism to do that--see perlobj.
You might also think of closure as a way to write a subroutine template without using eval(). Here's a small example of how closures work:
sub newprint { my $x = shift; return sub { my $y = shift; print "$x, $y!\n"; }; } $h = newprint("Howdy"); $g = newprint("Greetings"); # Time passes... &$h("world"); &$g("earthlings");
This prints
Howdy, world! Greetings, earthlings!
Note particularly that $x continues to refer to the value passed into newprint() despite "my $x" having gone out of scope by the time the anonymous subroutine runs. That's what a closure is all about.
This applies only to lexical variables, by the way. Dynamic variables continue to work as they have always worked. Closure is not something that most Perl programmers need trouble themselves about to begin with.
$objref = new Doggie( Tail => 'short', Ears => 'long' );
But that can produce ambiguous syntax in certain cases, so it's often better to use the direct method invocation approach:
$objref = Doggie->new(Tail => 'short', Ears => 'long'); use Term::Cap; $terminal = Term::Cap->Tgetent( { OSPEED => 9600 }); use Tk; $main = MainWindow->new(); $menubar = $main->Frame(-relief => "raised", -borderwidth => 2)
$scalarref = *foo{SCALAR}; $arrayref = *ARGV{ARRAY}; $hashref = *ENV{HASH}; $coderef = *handler{CODE}; $ioref = *STDIN{IO}; $globref = *foo{GLOB}; $formatref = *foo{FORMAT}; $globname = *foo{NAME}; # "foo" $pkgname = *foo{PACKAGE}; # "main"
Most of these are self-explanatory, but *foo{IO} deserves special attention. It returns the IO handle, used for file handles ("open" in perlfunc), sockets ("socket" in perlfunc and "socketpair" in perlfunc), and directory handles ("opendir" in perlfunc). For compatibility with previous versions of Perl, *foo{FILEHANDLE} is a synonym for *foo{IO}, though it is discouraged, to encourage a consistent use of one name: IO. On perls between v5.8 and v5.22, it will issue a deprecation warning, but this deprecation has since been rescinded.
*foo{THING} returns undef if that particular THING hasn't been used yet, except in the case of scalars. *foo{SCALAR} returns a reference to an anonymous scalar if $foo hasn't been used yet. This might change in a future release.
*foo{NAME} and *foo{PACKAGE} are the exception, in that they return strings, rather than references. These return the package and name of the typeglob itself, rather than one that has been assigned to it. So, after "*foo=*Foo::bar", *foo will become "*Foo::bar" when used as a string, but *foo{PACKAGE} and *foo{NAME} will continue to produce "main" and "foo", respectively.
*foo{IO} is an alternative to the *HANDLE mechanism given in "Typeglobs and Filehandles" in perldata for passing filehandles into or out of subroutines, or storing into larger data structures. Its disadvantage is that it won't create a new filehandle for you. Its advantage is that you have less risk of clobbering more than you want to with a typeglob assignment. (It still conflates file and directory handles, though.) However, if you assign the incoming value to a scalar instead of a typeglob as we do in the examples below, there's no risk of that happening.
splutter(*STDOUT); # pass the whole glob splutter(*STDOUT{IO}); # pass both file and dir handles sub splutter { my $fh = shift; print $fh "her um well a hmmm\n"; } $rec = get_rec(*STDIN); # pass the whole glob $rec = get_rec(*STDIN{IO}); # pass both file and dir handles sub get_rec { my $fh = shift; return scalar <$fh>; }
$bar = $$scalarref; push(@$arrayref, $filename); $$arrayref[0] = "January"; $$hashref{"KEY"} = "VALUE"; &$coderef(1,2,3); print $globref "output\n";
It's important to understand that we are specifically not dereferencing $arrayref[0] or $hashref{"KEY"} there. The dereference of the scalar variable happens before it does any key lookups. Anything more complicated than a simple scalar variable must use methods 2 or 3 below. However, a "simple scalar" includes an identifier that itself uses method 1 recursively. Therefore, the following prints "howdy".
$refrefref = \\\"howdy"; print $$$$refrefref;
$bar = ${$scalarref}; push(@{$arrayref}, $filename); ${$arrayref}[0] = "January"; ${$hashref}{"KEY"} = "VALUE"; &{$coderef}(1,2,3); $globref->print("output\n"); # iff IO::Handle is loaded
Admittedly, it's a little silly to use the curlies in this case, but the BLOCK can contain any arbitrary expression, in particular, subscripted expressions:
&{ $dispatch{$index} }(1,2,3); # call correct routine
Because of being able to omit the curlies for the simple case of $$x, people often make the mistake of viewing the dereferencing symbols as proper operators, and wonder about their precedence. If they were, though, you could use parentheses instead of braces. That's not the case. Consider the difference below; case 0 is a short-hand version of case 1, not case 2:
$$hashref{"KEY"} = "VALUE"; # CASE 0 ${$hashref}{"KEY"} = "VALUE"; # CASE 1 ${$hashref{"KEY"}} = "VALUE"; # CASE 2 ${$hashref->{"KEY"}} = "VALUE"; # CASE 3
Case 2 is also deceptive in that you're accessing a variable called %hashref, not dereferencing through $hashref to the hash it's presumably referencing. That would be case 3.
$arrayref->[0] = "January"; # Array element $hashref->{"KEY"} = "VALUE"; # Hash element $coderef->(1,2,3); # Subroutine call
The left side of the arrow can be any expression returning a reference, including a previous dereference. Note that $array[$x] is not the same thing as "$array->[$x]" here:
$array[$x]->{"foo"}->[0] = "January";
This is one of the cases we mentioned earlier in which references could spring into existence when in an lvalue context. Before this statement, $array[$x] may have been undefined. If so, it's automatically defined with a hash reference so that we can look up "{"foo"}" in it. Likewise "$array[$x]->{"foo"}" will automatically get defined with an array reference so that we can look up "[0]" in it. This process is called autovivification.
One more thing here. The arrow is optional between brackets subscripts, so you can shrink the above down to
$array[$x]{"foo"}[0] = "January";
Which, in the degenerate case of using only ordinary arrays, gives you multidimensional arrays just like C's:
$score[$x][$y][$z] += 42;
Well, okay, not entirely like C's arrays, actually. C doesn't know how to grow its arrays on demand. Perl does.
Using a string or number as a reference produces a symbolic reference, as explained above. Using a reference as a number produces an integer representing its storage location in memory. The only useful thing to be done with this is to compare two references numerically to see whether they refer to the same location.
if ($ref1 == $ref2) { # cheap numeric compare of references print "refs 1 and 2 refer to the same thing\n"; }
Using a reference as a string produces both its referent's type, including any package blessing as described in perlobj, as well as the numeric address expressed in hex. The ref() operator returns just the type of thing the reference is pointing to, without the address. See "ref" in perlfunc for details and examples of its use.
The bless() operator may be used to associate the object a reference points to with a package functioning as an object class. See perlobj.
A typeglob may be dereferenced the same way a reference can, because the dereference syntax always indicates the type of reference desired. So "${*foo}" and "${\$foo}" both indicate the same scalar variable.
Here's a trick for interpolating a subroutine call into a string:
print "My sub returned @{[mysub(1,2,3)]} that time.\n";
The way it works is that when the<EMAIL_ADDRESS>is seen in the double-quoted string, it's evaluated as a block. The block creates a reference to an anonymous array containing the results of the call to "mysub(1,2,3)". So the whole block returns a reference to an array, which is then dereferenced by<EMAIL_ADDRESS>and stuck into the double-quoted string. This chicanery is also useful for arbitrary expressions:
print "That yields @{[$n + 5]} widgets\n";
Similarly, an expression that returns a reference to a scalar can be dereferenced via "${...}". Thus, the above expression may be written as:
print "That yields ${\($n + 5)} widgets\n";
my $foo = {}; my $bar = { foo => $foo }; $foo->{bar} = $bar;
You can also create a circular reference with a single variable:
my $foo; $foo = \$foo;
In this case, the reference count for the variables will never reach 0, and the references will never be garbage-collected. This can lead to memory leaks.
Because objects in Perl are implemented as references, it's possible to have circular references with objects as well. Imagine a TreeNode class where each node references its parent and child nodes. Any node with a parent will be part of a circular reference.
You can break circular references by creating a "weak reference". A weak reference does not increment the reference count for a variable, which means that the object can go out of scope and be destroyed. You can weaken a reference with the "weaken" function exported by the Scalar::Util module.
Here's how we can make the first example safer:
use Scalar::Util 'weaken'; my $foo = {}; my $bar = { foo => $foo }; $foo->{bar} = $bar; weaken $foo->{bar};
The reference from $foo to $bar has been weakened. When the $bar variable goes out of scope, it will be garbage-collected. The next time you look at the value of the "$foo->{bar}" key, it will be "undef".
This action at a distance can be confusing, so you should be careful with your use of weaken. You should weaken the reference in the variable that will go out of scope first. That way, the longer-lived variable will contain the expected reference until it goes out of scope.
People frequently expect it to work like this. So it does.
$name = "foo"; $$name = 1; # Sets $foo ${$name} = 2; # Sets $foo ${$name x 2} = 3; # Sets $foofoo $name->[0] = 4; # Sets $foo[0] @$name = (); # Clears @foo &$name(); # Calls &foo() $pack = "THAT"; ${"${pack}::$name"} = 5; # Sets $THAT::foo without eval
This is powerful, and slightly dangerous, in that it's possible to intend (with the utmost sincerity) to use a hard reference, and accidentally use a symbolic reference instead. To protect against that, you can say
use strict 'refs';
and then only hard references will be allowed for the rest of the enclosing block. An inner block may countermand that with
no strict 'refs';
Only package variables (globals, even if localized) are visible to symbolic references. Lexical variables (declared with my()) aren't in a symbol table, and thus are invisible to this mechanism. For example:
local $value = 10; $ref = "value"; { my $value = 20; print $$ref; }
This will still print 10, not 20. Remember that local() affects package variables, which are all "global" to the package.
$push = "pop on "; print "${push}over";
has always meant to print "pop on over", even though push is a reserved word. This is generalized to work the same without the enclosing double quotes, so that
print ${push} . "over";
and even
print ${ push } . "over";
will have the same effect. This construct is not considered to be a symbolic reference when you're using strict refs:
use strict 'refs'; ${ bareword }; # Okay, means $bareword. ${ "bareword" }; # Error, symbolic reference.
Similarly, because of all the subscripting that is done using single words, the same rule applies to any bareword that is used for subscripting a hash. So now, instead of writing
$hash{ "aaa" }{ "bbb" }{ "ccc" }
you can write just
$hash{ aaa }{ bbb }{ ccc }
and not worry about whether the subscripts are reserved words. In the rare event that you do wish to do something like
$hash{ shift }
you can force interpretation as a reserved word by adding anything that makes it more than a bareword:
$hash{ shift() } $hash{ +shift } $hash{ shift @_ }
The "use warnings" pragma or the -w switch will warn you if it interprets a reserved word as a string. But it will no longer warn you about using lowercase words, because the string is effectively quoted.
Using a closure as a function template allows us to generate many functions that act similarly. Suppose you wanted functions named after the colors that generated HTML font changes for the various colors:
print "Be ", red("careful"), "with that ", green("light");
The red() and green() functions would be similar. To create these, we'll assign a closure to a typeglob of the name of the function we're trying to build.
@colors = qw(red blue green yellow orange purple violet); for my $name (@colors) { no strict 'refs'; # allow symbol table manipulation *$name = *{uc $name} = sub { "@_" }; }
Now all those different functions appear to exist independently. You can call red(), RED(), blue(), BLUE(), green(), etc. This technique saves on both compile time and memory use, and is less error-prone as well, since syntax checks happen at compile time. It's critical that any variables in the anonymous subroutine be lexicals in order to create a proper closure. That's the reasons for the "my" on the loop iteration variable.
This is one of the only places where giving a prototype to a closure makes much sense. If you wanted to impose scalar context on the arguments of these functions (probably not a wise idea for this particular example), you could have written it this way instead:
*$name = sub ($) { "$_[0]" };
However, since prototype checking happens at compile time, the assignment above happens too late to be of much use. You could address this by putting the whole loop of assignments within a BEGIN block, forcing it to occur during compilation.
Access to lexicals that change over time--like those in the "for" loop above, basically aliases to elements from the surrounding lexical scopes-- only works with anonymous subs, not with named subroutines. Generally said, named subroutines do not nest properly and should only be declared in the main package scope.
This is because named subroutines are created at compile time so their lexical variables get assigned to the parent lexicals from the first execution of the parent block. If a parent scope is entered a second time, its lexicals are created again, while the nested subs still reference the old ones.
Anonymous subroutines get to capture each time you execute the "sub" operator, as they are created on the fly. If you are accustomed to using nested subroutines in other programming languages with their own private variables, you'll have to work at it a bit in Perl. The intuitive coding of this type of thing incurs mysterious warnings about "will not stay shared" due to the reasons explained above. For example, this won't work:
sub outer { my $x = $_[0] + 35; sub inner { return $x * 19 } # WRONG return $x + inner(); }
A work-around is the following:
sub outer { my $x = $_[0] + 35; local *inner = sub { return $x * 19 }; return $x + inner(); }
Now inner() can only be called from within outer(), because of the temporary assignments of the anonymous subroutine. But when it does, it has normal access to the lexical variable $x from the scope of outer() at the time outer is invoked.
This has the interesting effect of creating a function local to another function, something not normally supported in Perl.
$x{ \$a } = $a;
If you try to dereference the key, it won't do a hard dereference, and you won't accomplish what you're attempting. You might want to do something more like
$r = \@a; $x{ $r } = $r;
And then at least you can use the values(), which will be real refs, instead of the keys(), which won't.
The standard Tie::RefHash module provides a convenient workaround to this.
For example:
$r = \@a; @b = $r->@*; # equivalent to @$r or @{ $r } $r = [ 1, [ 2, 3 ], 4 ]; $r->[1]->@*; # equivalent to @{ $r->[1] }
In Perl 5.20 and 5.22, this syntax must be enabled with "use feature 'postderef'". As of Perl 5.24, no feature declarations are required to make it available.
Postfix dereference should work in all circumstances where block (circumfix) dereference worked, and should be entirely equivalent. This syntax allows dereferencing to be written and read entirely left-to-right. The following equivalencies are defined:
$sref->$*; # same as ${ $sref } $aref->@*; # same as @{ $aref } $aref->$#*; # same as $#{ $aref } $href->%*; # same as %{ $href } $cref->&*; # same as &{ $cref } $gref->**; # same as *{ $gref }
Note especially that "$cref->&*" is not equivalent to "$cref->()", and can serve different purposes.
Glob elements can be extracted through the postfix dereferencing feature:
$gref->*{SCALAR}; # same as *{ $gref }{SCALAR}
Postfix array and scalar dereferencing can be used in interpolating strings (double quotes or the "qq" operator), but only if the "postderef_qq" feature is enabled.
$aref->@[ ... ]; # same as @$aref[ ... ] $href->@{ ... }; # same as @$href{ ... }
Postfix key/value pair slicing, added in 5.20.0 and documented in the Key/Value Hash Slices section of perldata, also behaves as expected:
$aref->%[ ... ]; # same as %$aref[ ... ] $href->%{ ... }; # same as %$href{ ... }
As with postfix array, postfix value slice dereferencing can be used in interpolating strings (double quotes or the "qq" operator), but only if the "postderef_qq" feature is enabled.
\$a = \$b; # $a and $b now point to the same scalar \&foo = \&bar; # foo() now means bar()
This syntax must be enabled with "use feature 'refaliasing'". It is experimental, and will warn by default unless "no warnings 'experimental::refaliasing'" is in effect.
These forms may be assigned to, and cause the right-hand side to be evaluated in scalar context:
\$scalar \@array \%hash \&sub \my $scalar \my @array \my %hash \state $scalar # or @array, etc. \our $scalar # etc. \local $scalar # etc. \local our $scalar # etc. \$some_array[$index] \$some_hash{$key} \local $some_array[$index] \local $some_hash{$key} condition ? \$this : \$that[0] # etc.
Slicing operations and parentheses cause the right-hand side to be evaluated in list context:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>\@hash{'foo','bar'} (\@hash{'foo','bar'}) \(@hash{'foo','bar'}) (\$scalar) \($scalar) \(my $scalar) \my($scalar) (\@array) (\%hash) (\&sub) \(&sub) \($foo, @bar, %baz) (\$foo, \@bar, \%baz)
Each element on the right-hand side must be a reference to a datum of the right type. Parentheses immediately surrounding an array (and possibly also "my"/"state"/"our"/"local") will make each element of the array an alias to the corresponding scalar referenced on the right-hand side:
\(@a) = \(@b); # @a and @b now have the same elements \my(@a) = \(@b); # likewise \(my @a) = \(@b); # likewise push @a, 3; # but now @a has an extra element that @b lacks \(@a) = (\$a, \$b, \$c); # @a now contains $a, $b, and $c
Combining that form with "local" and putting parentheses immediately around a hash are forbidden (because it is not clear what they should do):
\local(@array) = foo(); # WRONG \(%hash) = bar(); # WRONG
Assignment to references and non-references may be combined in lists and conditional ternary expressions, as long as the values on the right-hand side are the right type for each element on the left, though this may make for obfuscated code:
(my $tom, \my $dick, \my @harry) = (\1, \2, [1..3]); # $tom is now \1 # $dick is now 2 (read-only) # @harry is (1,2,3) my $type = ref $thingy; ($type ? $type eq 'ARRAY' ? \@foo : \$bar : $baz) = $thingy;
The "foreach" loop can also take a reference constructor for its loop variable, though the syntax is limited to one of the following, with an optional "my", "state", or "our" after the backslash:
\$s \@a \%h \&c
No parentheses are permitted. This feature is particularly useful for arrays-of-arrays, or arrays-of-hashes:
foreach \my @a (@array_of_arrays) { frobnicate($a[0], $a[-1]); } foreach \my %h (@array_of_hashes) { $h{gelastic}++ if $h{type} eq 'funny'; }
CAVEAT: Aliasing does not work correctly with closures. If you try to alias lexical variables from an inner subroutine or "eval", the aliasing will only be visible within that inner sub, and will not affect the outer subroutine where the variables are declared. This bizarre behavior is subject to change.
This feature makes these:
my \$x; our \$y;
equivalent to:
\my $x; \our $x;
It is intended mainly for use in assignments to references (see "Assigning to References", above). It also allows the backslash to be used on just some items in a list of declared variables:
my ($foo, \@bar, \%baz); # equivalent to: my $foo, \my(@bar, %baz);
See also perldsc and perllol for how to use references to create complex data structures, and perlootut and perlobj for how to use them to create objects.
| 2019-10-21 | perl v5.30.3 |


Relation Names
Actually database systems does not have relations. They have foreign key constraints. Relation is a concept to describe relationships between tables based on foreign key constraints. pg-structure provides O2MRelation, M2MRelation and M2ORelation classes relations.
Since relations are not real objects defined in database systems, they do not have names. Relation names used in ORM systems should generated somehow. Naming is already very complex mental process and there are multiple methods and preferences to name relations. pg-structure provides more than one strategy to generate names for different preferences and to reduce chance of conflicting names. They aren't perfect, but at least does the job for most of the time.
Strategies
To name relations pg-structure provides strategies below. All strategies tries to guess inflection of table names such as snake_case or CamelCase with a simple test. If first letter is capital, then it is assumed CamelCase, snake_case otherwise. Generated names use guessed inflection.
When generateName()
method is called without any strategies, pg-structure chooses simple strategy. If there are more than one relation between same tables, additional relations are named using complex strategy to prevent conflicts.
Below is a database schema as an example:
size -------------------
id (PK) | ---------------------------< line_item >------------ cart
name | | product_id (PFK) id (PK)
| | cart_id (PFK) name
^ |
color -------------< product >------------- vendor
id (PK) id (PK) id (PK)
name name name
color_id (FK)
size_id (FK)
vendor_id (FK)
Below is the same schema as image:
O2M examples are given for:
product ---< line_item
(i.e. product.o2mRelations.values()[0].generateName('simple')
).
M2O examples are given for:
line_item >--- product
(i.e. lineItem.m2oRelations.values()[0].generateName('simple')
).
M2M examples are given for:
product ---< line_item >--- cart
(i.e. product.m2mRelations.values()[0].generateName('simple')
).
| Relation | Form | Strategy | Description | Example |
|---|---|---|---|---|
| O2M | simple | Plural | Target table name. | line_items |
| O2M | complex | Plural | Constraint name, but source table name stripped from beginning. | sold_items |
| M2O | simple | Singular | Target table name. | product |
| M2O | complex | Singular | First foreign key column name. If 'id' string is present, it is stripped, otherwise 'related' prefix added. | product |
| M2M | simple | Plural | Target table name. | carts |
| M2M | complex | Plural | Join Table Name + Foreign Key to Target Table. If 'id' string is present, it is stripped, otherwise 'related' prefix added. | line_item_carts |
Overriding
Even using complex strategy, it is sometimes impossible to generate unique names. In that case it is possible to override generated names by providing clues to pg-structure in database.
Using Constraint Description Data (!EXPERIMENTAL)
You can use constraint's description in PostgreSQL. Description data is fetched from constraint description. In short, you can put JSON data between [pg-structure]
and [/pg-structure]
tags in constraint description.
(See Description Data in Concepts). It is a non-strict JSON data. pg-structure uses given names in description data.
Example:
[pg-structure]
{
name: {
m2m: my_custom_name
}
}
[/pg-structure]
| Relation | JSON Key | Notes |
|---|---|---|
| O2M | name.hasMany or name.o2m |
Used as it is |
| M2O | name.belongsTo or name.m2o |
Used as it is |
| M2M | name.belongsToMany or name.m2m |
Used as: Given String + Target Table Name |
Using Constraint Name as CSV (!EXPERIMENTAL)
You can also name your constraints in database as a CSV. If constraint name includes comma, pg-structure assumes it is CSV value to provide clue for relation names.
| CSV | Description | Notes |
|---|---|---|
| 1 | One to many relation name | Used as it is |
| 2 | Many to one relation name | Used as it is |
| 3 | Prefix for many to many relations | Used as: Given String + Target Table Name |
Example:
sold_items, item, sku cart_goods, basket, bag
product ------------------------< line_item >------------------------- cart
| CSV | From | To | Type | Name |
|---|---|---|---|---|
| 1 | product | line_item | O2M | sold_items |
| 2 | line_item | product | M2O | item |
| 3 | product | cart | M2M | sku_carts |
| 1 | cart | line_item | O2M | cart_goods |
| 2 | line_item | cart | M2O | basket |
| 3 | cart | product | M2M | bag_products |
Priority
Relation naming function prioritizes different methods as follows:
| # | Method | Notes |
| --- | --- | --- |
| 1 | Strategy from function parameter | If parameter is given such as rel.generateName('simple')
, uses given strategy. |
| 2 | Constraint Name CSV | PRO: May easy to use in ERD tools. CON: Invasive, seen in DB error messages. |
| 3 | Constraint Description Data | PRO: Non invasive. CON: One more step in ERD tools. |
| 4 | Simple Stratgey | If there is no previous relation between same tables. |
| 5 | Complex Strategy | Last resort. |
Module's Author's Practices
Use generateName()
without parameters, and if you don't like generated names for a specific relation, use description data in that constraint's description.
The reason of preferring description data over constraint name is that when foreign key violation occurs, PostgreSQL error messages contains constraint names and long CSV names may be confusing.


{% extends 'core.html' %} {% load i18n %} {% block title %}Ahmia - Documentation{% endblock %} {% block body %} {% include 'partial/nav_tor.html' with nav_type='maxi' %}
Security measure: Obfuscate real-time stats. The clicks are rounded to the next multiple of 8. This simple way prevents leaking too accurate real-time statistics.
Visualizations of the statistics : https://ahmia.fi/stats/viewer
All banned hidden services: https://ahmia.fi/banned/
These are MD5 sums calculated from something.onion\c part (echo -e "BLAHBLAHBLAH.onion\c" | md5sum).
All known non-banned onion domains: https://ahmia.fi/onions/
See if a hidden service has been online (Down/Up) within a week: https://ahmia.fi/address/jntlesnev5o7zysa/status
Ask a hidden service's information:
curl -i --insecure -H "Content-Type: application/json" https://ahmia.fi/address/jntlesnev5o7zysa/
curl -i --insecure -H "Content-Type: application/rdf+xml" https://ahmia.fi/address/jntlesnev5o7zysa/
Ask all hidden services' information:
curl -i --insecure -H "Content-Type: application/json" https://ahmia.fi/address/
curl -i --insecure -H "Content-Type: application/rdf+xml" https://ahmia.fi/address/
You can check how our hidden service indexing works.
Please deliver your hidden service's official information: Proposal to hidden service operators.
{% trans "donate Bitcoin" as donate_bitcoin %} {% blocktrans %} We extend a thank you to Ahmia's supporters. If you believe in Ahmia, please {{ donate_bitcoin }}.
{% endblocktrans %}


ssh-keysign
—
OpenSSH helper for host-based authentication
ssh-keysign
is used by
ssh(1) to access the local host
keys and generate the digital signature required during host-based
authentication.
ssh-keysign
is disabled by default and can
only be enabled in the global client configuration file
/etc/ssh/ssh_config by setting
EnableSSHKeysign
to “yes”.
ssh-keysign
is not intended to be invoked
by the user, but from ssh(1).
See ssh(1) and
sshd(8) for more information
about host-based authentication.
- /etc/ssh/ssh_config
- Controls whether
ssh-keysign
is enabled.
- /etc/ssh/ssh_host_dsa_key
-
- /etc/ssh/ssh_host_ecdsa_key
-
- /etc/ssh/ssh_host_ed25519_key
-
- /etc/ssh/ssh_host_rsa_key
- These files contain the private parts of the host keys used to generate
the digital signature. They should be owned by root, readable only by
root, and not accessible to others. Since they are readable only by root,
ssh-keysign
must be set-uid root if host-based
authentication is used.
- /etc/ssh/ssh_host_dsa_key-cert.pub
-
- /etc/ssh/ssh_host_ecdsa_key-cert.pub
-
- /etc/ssh/ssh_host_ed25519_key-cert.pub
-
- /etc/ssh/ssh_host_rsa_key-cert.pub
- If these files exist they are assumed to contain public certificate
information corresponding with the private keys above.
ssh-keysign
first appeared in OpenBSD
3.2.


This is a template for a simple home screen website. Use it as a starting point to create something more unique.
app/modules/home/home.html
Learn more »


-
usually self limiting
-
Usually fit into 3 different but overlapping groups:
-
Lifestyle
-
Psychosocial
-
Physical
-
(Unkown)
-
Lifestyle
-
Tiredness common in people who have undergone signifiant life events
-
take seriously
- increase risk of serious illness in following 2 years
-
-
Occupation/study
- complex relationhsip between occupation and other lifestyle factors, psychosocial issues and physical health
-
Diet
-
extremes can cause tiredness
- particularly iron deficiency
-
but meals that too heavy, too often
-
‘fad diets’
-
excesses of particular dietry ingedients
- caffeine, guarana, sugar
-
-
EtOH and recreational drugs
-
Exercise
-
extremes of exercise can contribute
-
non-fasting hypoglycaemia
-
iron deficiency
-
susceptibility to recurrent infections
-
-
underexercise
- persistent lassitude
-
-
Sleep disorders
-
sleep requirements biologically determined
- varies between individuals
-
Primary insomnia
-
Secondary insomnia
-
associated with physical cause
-
night pain
-
breathlessness
-
psychological
-
depression
-
anxiety
-
-
-
-
OSA
-
snoring
-
daytime sleepiness
-
witnessed apnoea
-
nocturnal choking
-
-
central sleep apnoea
-
Psychosocial factors
-
often overlap with lifestyle
-
Screening questions for depression (reliably)
-
” During the last month, have you often been bothered by feeling down, depressed or hopeless?”
-
”During the last month, have you often been bothered by having little interest or pleasure in doing things?”
-
-
PHQ-9 may assist
Physical health
-
Co-morbidities
-
Diabetes
-
Rheumatoid arthritis
-
cancer
-
COPD
-
asthma
-
heart failure
-
check any chronic conditions under good control
-
-
medications
-
psychoactive drugs
-
antihypertensives
-
hormone preparations
-
-
New conditions
-
Type 2 DM
-
Addison’s disease
-
Framework:
Step 1: Define the problem from patient’s viewpoint
-
What does paient mean by tiredness?
-
Is tiredness only issue?
-
How is it affecting life?
-
What do they believe is causing it?
-
What are their concerns?
Step 2: Focused symptom review
-
red flags
-
women
- menstural symptoms
-
elderly
-
weight loss
-
appetite
-
bowel disturbance
-
-
smoker
- cough
Step 3: Focused examination
Step 4: Focused lab tests
\<50yo without other risk factors
-
CBC
-
Ferritin
-
searching for:
-
iron deficiency
-
macrocytosis
-
significant infections
-
leukaemia
-
>50yo lasting > 1mo
-
CBC
-
CRP
-
Ferritin (iron saturation)
-
LFT
-
Creatinine
-
Electrolytes
-
Calcium, phosphate
-
TSH
-
Fasting glucose (HbA1c)
-
urinalysis
-
ANA
Further considerations:
-
EBV
- unlikely to be helpful
-
Haemochromatosis
- no more likely to be tired compared to rest of gneeral population
-
Vit b12/folate
-
rare to find deficiency without anaemia
-
reserve until macrocytosis
-
folic acid eficiency can also be caused by malabsorption
-
most often caused by low dietary intake
-
destroyed during cooking
-
low intake associated with old age, poverty, alcoholim and diet fads
-
no need to test red cell folate
-
-
B12
-
most common = malabsorption
-
pernicious anaemia
-
achlorhydria
-
-
take 2 years to deplete
-
women taking oral contraceptive = flasely low vit b12 concentrations = low cobalamin - carrier protein
-
-


Based on Lee Stemkoski's
work
Globe by
google
Source code
Shader properties:
intensityBase (Lee's 'c')
1
intensityPower (Lee's 'p')
3


Consider the single source shortest path linear program:
Maximize dt
Subject to
for each edge
ds = 0.
Where dt is the maximum weight of each target vertex in the edge (u, v), du and dv are the weights of the shortest path from source vertex to the vertices u and v respectively vertices in the edge (u, v) ds is the source vertex. Converting this program into standard form of linear equations.
In single source shortest path problem we find the path from a single source vertex to every other vertex in the graph. For finding the shortest path for each vertex from the source vertex we use the linear programming approach in which linear equations are formed from the graph.
The standard form of linear equations for finding the value of n real variables, for given n real numbers and, m real numbers and real numbers for and is as:
Maximize
Subject to
for
forAccording to the standard form of linear equations the transformation of single source shortest path problem. Linear program to compute the shortest-path weight from source s to target t by maximizing dt.
Maximize dt
Subjected to
for
(on replacing by)
Whereis the weight of the shortest path from source vertex s to s’ and. The source vertex initially receives a value ds = 0, which never changes.
Consider the graph 24.2(a) given in the textbook to write the linear routine that corresponds to the graph for finding the single source shortest path from node s to node y.
Linear Program for finding the shortest path:
In order to find the shortest path, create a linear programming model and find the solution of the problem by using the following procedure.
1. Identify the variables of the problem.
2. Define the constraints of the problem. Constraint means defining inequalities and equation of the problem.
3. Define the objective function of the problem.
In single source shortest path problem, the aim is to get the shortest path from the source node of the graph to all the nodes in the concerned graph.
• To obtain the result, the maximization of the objective function, which is the weight function of smallest path from source vertex to target vertex, is done.
• To transform the shortest path problem, the maximization of the objective function, dy is required.
• The calculation of objective function can be calculated by adding the weights of each edge in between the source and target vertex of graph.
Consider the weighted graph for finding the shortest path:
In the above graph, source vertex is s and the destination vertex is y, The objective of the problem is to find the minimum distance from source vertex s to destination vertex y.
Identification of Variables:
Defining Constraint:
Initialize source vertex Ms with 0 and all other vertex (My, Mx, Mz, Mt ) ≥ 0.
Objective function of the problem is defined:
Calculate the value of weight for each and every vertex of the graph. If any vertex is calculated more than one time, then the value, which is the minimum, is considered.
Here for example: Vertex Mx has two values 9 and 18. However, the value 9 is considered, as it is the minimum.
There are two paths going from source vertex s to destination vertex y which are as follows:
1. Going directly from source vertex to destination vertex.
2. Going from source vertex to destination vertex through intermediate vertex Mt.
Diagram showing the shortest path from s to y is as shown:
Here, both the path of going from source vertex to destination vertex is generating the same value, that is 5.
Thus, the shortest path from s to y is 5.
Linear Program for finding the shortest path:
In order to find the shortest path, create a linear programming model and find the solution of the problem by using the following procedure.
1. Identify the variables of the problem.
2. Define the constraints of the problem. Constraint means defining inequalities and equation of the problem.
3. Define the objective function of the problem.
In single source shortest path problem, the aim is to get the shortest path from the source node of the graph to all the nodes in the concerned graph.
• To obtain the result, the maximization of the objective function, which is the weight function of the smallest path from source vertex to target vertex, is done.
• In graph G, to find the shortest paths weight from source vertex s to vertex , the linear program consists of a variable dv which represents the maximum value of weight of target for an edge (u, v).
• For the representation of maximum weight from single source s to any other vertex in the graph, the summation of all the path weights will be used as the objective function.
• According to the standard form of linear equations, the linear program computing the single source shortest paths weight from source s to any vertexby maximizing dv is as shown below:
Maximize
Subject to
for
ds=0
Consider the weighted graph for finding the shortest path:
In the above graph source vertex is s and the destination vertex is z.
The objective of the problem is to find the minimum distance from source vertex s to the destination vertex z.
Identification of Variables:
Defining Constraint:
Initialize source vertex Ms with 0 and all other vertex (My, Mx, Mz,Mt ) ≥ 0.
Calculate the value of weight for each and every vertex of the graph. If any vertex is calculated more than one times, then the value which is minimum is considered.
Here for example: Vertex Mx has two values 9 and 18. But the value 9 is considered as it is minimum.
In this, the shortest path for going from source vertex s to destination vertex z which is as follows:
Consider the diagram of shortest path:
In the above diagram, the shortest path from source vertex s to all the vertices is shown.
Here, ds is the weight of the shortest path from source vertex s to itself which never changes while summation function dv is the shortest path weight of each path to vertex v from source vertex s where.
Linear program for maximum flow problem
Linear programming is a way of achieving the maximum possible outcome from a set of resources that are represented as an integrated mathematical design.
In technical terms, linear programming is a way to achieve optimum results from the linear programming problems. This optimization is subject to a few constraints.
Standard form of linear program:
In a standard form there is a set of p real numbers that are, another set of q real numbers that are and a set ofreal numbers that arewhere and.
Now the objective is to find p real numberssuch that
Maximize
… … (1)
And that is subject to
… … (2)
… … (3)
The first expression is called the objective function. The second and the third expression show the constraints.
This way a linear program can be put into the standard form.
In practice, there are several examples of problem that can be manifested as the linear programs. Maximum flow problem is one such example.
Maximum Flow:
A flow network is nothing but a directed graph of vertices and edges, each of which has some capacity. The capacity defines the data value that can go through that edge. The capacity is always a positive integer. One more thing is that if there is an edge from a vertex to vertex, then there can be no edge from to .
In the above diagram, vertex s is the source and the vertex t is the sink or destination. The capacity of each edge is shown alongside the edge.
Now, the possible flows pathsfrom the origin to destination can be:
There might be a few more flow paths as well. The maximum flow possible through a path is equal to the minimum capacity of an edge.
For example in the first flow path, the maximum flow would be 12.
More formally, the flow can be defined as below:
A flow which is non-negative real valued function and fulfill the requirement of the capacity and the flow conservation restriction. Here is the quantity which is the flow from the vertex u to v and the value of flow f is defined as:
This is equal to the flow out from the source minus the flow into the source.
Consider the diagram as shown below:
A flow network G = (V, E) for a company, in which source s is a factory and sink t is a warehouse, ships pucks through intermediate cities. The capacity of the edges is written by them.
The non-negative quantity f (u, v) is the flow from u to v.
The valueof a flow f is defined as:
It is the total flow; incoming flow is deducted from the outgoing flow.
Now, to maximize this,
Maximize
Subject to condition
(Flow constraints)
(No flow)
(Capacity constraints)
The inequality constraints conform to the capacity constraint for the flow network. The constraints that are in the second set conform to the maximum flow constraint of the flow network.
This is the mathematical form of the desired linear program. If the same is applied on the figure shown above, the sets would be as follows:
The set of vertices
The set of edges
Capacity matrix:
In the matrix, the capacity of the edges can be found by locating the intersection of the starting and the ending vertex. It is as shown below:
And the flow would be:
This makes the following implication:
Objective function:
Maximize
Capacity constraint:
,
,
,
The conservation of flow constraint:
The source and target constraint
Non-negativity constraint
Linear Program
Linear programming is a way of achieving the maximum possible outcome from a set of resources that are represented as an integrated mathematical design.
In the technical terms the linear programming is a way to achieve optimum results from the linear programming problems. This optimization is subject to a few constraints.
Standard form of linear program:
In a standard form there is a set of p real numbers that are, another set of q real numbers that are and a set of real numbers that arewhere and.
Now the objective is to find p real numberssuch that
Maximize
… … (1)
And that is subject to
… … (2)
… … (3)
The first expression is called the objective function. The second and the third expression show the constraints.
This way, a linear program can be put into the standard form.
In practice, there are several examples of problem that can be manifested as the linear programs. Maximum flow problem is such a problem.
 Each of the graph edge has a capacity. The capacity defines the data value that can go through that edge. The capacity is always a positive integer. One more thing is that if there is an edge from a vertex to vertex than there can be no edge from to .
In the above diagram, vertex s is the source and the vertex t is the sink or destination. The capacity of each edge is shown alongside the edge.
Now, the possible flows paths from the source to destination can be:
There might be a few more flow paths as well. The maximum flow possible through a path is equal to the minimum capacity of an edge.
For example in the first flow path, the maximum flow would be 12.
More formally, the flow can be defined as below:
A flow which is non-negative real valued function and satisfy the capacity and the flow conservation constraints.
Now, the quantity which is the flow from the vertex u to v and the value of flow f is defined as,
This is equal to the flow out from the source minus the flow into the source.
Now, the linear program for the maximum flow has to be written so that it uses only constraints.
Linear program:
Consider the linear program (29.47-29.50) in the book.
Considering the flow equation, the number of variables in the equation would be and that is variables.
After considering the flow constraints between vertices, that are referred to in the equation 29.48-29.50, the total number of constraints would be:
• The first set of constraints that is referred to in the equation 29.48, is bound to the vertices. Each variable would be subject to the restriction and that would yield total number of constraints. In this scenario the total number of constraints to be followed would be.
• The second set of constraints that is referred to in the equation 29.49 restricts the flow excluding the source and the target variables.
So the number of constraints yield over here would be two less than the total number of variable that is.
The last set of constraints that is referred to in the equation 29.50 specifies the non-negativity of the flow that is again the subject to the number of total variables and that is.
Adding all of them the linear program has constraints. This linear program mainly focuses on vertices and capacity of edges which are formed by vertices.
In order to achieve the desired constraint limit, network coding can be used as a remedy. Network coding is a technique used for making the network more secure and maximize the throughput of the network.
Using coding reduces the problem to the polynomial time.
When the flow network is considered to be the coded network, each flow that is the part of the network satisfies the flow conservation constraint. Suppose that all of the flows are represented by a vector where.
The flows are, however, allowed to overlap. This generates the conceptual flow that satisfies the capacity constraint.
Moreover, the conceptual flow is not subject to the flow conservation constraint. In that case the flow can be represented using the below equations:
Maximize:
… … (4)
Subject to condition:
… … (5)
… … (6)
Where,
Now, the number of constraints that are to be followed can be calculated easily. Equation 5 shows the flow constraint that, being every u a member of set of vertices would yield the complexity of. The constraint in equation 6 is the capacity constraint that would be the, being every edge is a member of the set of edges.
By adding these complexities, the total number of constraints that need to be followed would be.
The maximum-bipartite-matching problem
Linear programming is a way of achieving the maximum possible out-come from a set of resources that are represented as an integrated mathematical design.
In technical terms, the linear programming is a way of achieving optimum results from the linear programming problems. This optimization is subject to a few constraints.
Standard form of linear program:
In a standard form there is a set of p real numbers that are, another set of q real numbers that are and a set ofreal numbers that arewhere,
Now, the objective is to find p real numberssuch that
Maximize
… … (1)
And that is subject to
… … (2)
… … (3)
The first expression is called the objective function. The second and the third expression show the constraints.
This way, a linear program can be put into the standard form.
Linear programming can be used to represent many practical applications. Bipartite graph is one such example.
Bipartite Graph:
A bipartite graph can also be referred to as the bi-graph. It is a graph such that their vertices are divided into the two disjoint sets A and B in such a way that every edge used to connects a vertex in A to that of the vertex in B. So it can be said that the set A and B are independent sets. Its characteristics:
1. A graph is a bipartite only if it has 2-colorable properties that are the colouring of a graph with two colors.
2. A concerned graph is bipartite if it does not have an odd cycle.
3. A bipartite graph has a symmetric spectrum.
Maximum-bipartite-matching problem:
In the informal language, the maximum-bipartite-problem can be illustrated as below:
This is the procedure of finding the largest possible matching in a bipartite graph.
A matching in a concerned bipartite graph is the process of finding a set of maximum edges such that none of them have a common vertex as end point.
So if the two disjoint sets of graph vertices are G1 and G2 and E’’ is the matching vertex then:
For any, where x and y are the end points of the edge.
If
Than
Consider an example as:
In the above graph, if the edges are selected as:
Then, all of the vertices of the concerned graph are covered. And, this is termed to be the maximal matching of the graph.
Now, a linear program can be written for this.
As it is already known that a linear program is written keeping two things in mind. The first thing is the objective function and the second is constraints that restrict the objective function.
In the case of bipartite matching, the formula being used for finding the matching is the objective function and the restrictions that no two edges must contain a common vertex should be the set of constraints for that objective function.
Forevery single of the edge <a, b> of the graph a new variable is introduced. And if the variable is set to 1 then the given is said to be matching and if it is set to 0, then it is not in the matching set.
Initially, the vertices have to be covered as many vertices as possible it means the inclusion of as many edges as possible. And it can be accomplished by maximizing the objective function as:
In this, it must be made sure that no two edges occur in matching. It can be seen that two edges leave the vertex P so the constraints is applied and that is
It ensures that only one of the two edges has a matching.
Along with that, for R and S
Linear program:
Now, the required linear program is:
Maximize:
… … (4)
Subject to constraints:
… … (5)
… … (6)
… … (7)
Here, all.
Linear program for Minimum-cost multi commodity-flow problem
Linear programming is a way of achieving the maximum possible outcome from a set of resources that are represented as an integrated mathematical design.
In the technical terms the linear programming is a way to achieve optimum results from the linear programming problems. This optimization is subject to a few constraints.
Standard form of linear program:
In a standard form there is a set of p real numbers that are, another set of q real numbers that are and a set ofreal numbers that arewhere,
Now the objective is to find p real numberssuch that
Maximize
… … (1)
And that is subject to
… … (2)
… … (3)
The first expression is called the objective function. The second and the third expression show the constraints.
This way a linear program can be put into the standard form.
Minimum-cost multi commodity-flow problem:
The minimum cost multi commodity problem is a type of optimization problems in which the least cost method is used for moving two or more types of quantities from the locations where the items are produced to the location where they must be consumed, and the transport mechanism used are treated as two separate process form a type of networks.
It is a very interesting topic for commodity transportation problem. It has its application in various sectors of transportation as: railways, airlines use it (the economy-class and the first class are treated as two separate “commodities”).
Commodity flow network is just like a flow network in which various distinct paths are given, so that to travel the destination from the source, different paths can be followed. In this there are a number of sources and respectively multiple destinations. Each edge that lies in the path has a capacity and the cost associated with it.
The flow through the edge is always less than or equal to the capacity of the edge. Different bunches of flow or commodities can follow different paths to reach the destination.
Below given is an example of the commodity flow network.
In the above diagram, for all of the edges the first number shows the cost of visit and the second number shows the capacity of the edge. It is easy to observe that different commodities, say v1 and v5 in this case, would take different paths to reach the respective destinations that might be v2 and v6 respectively.
Both of v1 and v5 may have their own flow demands. The objective is to find the maximum possible flow through the network with the least cost.
Now, given a directed graph G (V, E) with a set of vertices V and the set of edges E. In the graph each edge (u, v) has a capacity defined as c (u, v)>=0, that is the capacity is always greater than or equal to zero. Each edge has a costassociated with it. Here are given k different commodities as and the flow is defined for commodity i and the aggregate flow on the edge (u, v). The cost of the flow is. Now a feasible flow with the minimum cost can be found out in the form of linear program as below.Linear Program:
In the minimum-cost multi commodity flow problem, the cost of a flow is as already specified.
For minimum cost, commodities come in the picture in which every commodity has a triplet. There are k commodities and for a particular commodity i, the flow is fi and the aggregate flow is. Every triplet has source and sink, so there will be a capacity c for particular commodities.
Now, combining all assumptions and minimizing the feasible flow cost,
Minimize … … (4)
Subject to the condition,
… … (5)
For … … (6)
For … … (7)
The first constraint is along multiple commodities and the second and the third constraint are along the single commodity.
Equation (4) shows the objective function for the problem. It illustrates that the cost for the aggregate flow must be reduced as much as possible.
Equation (5) shows the capacity constraint that the total flow through any edge cannot be more than the capacity of the edge. Equation (6) and (7) show the balance constraint for multiple and the single commodity respectively.
Here u is the upper limit on the flow of the commodities.
b – The vector for the supply and the demand of the commodities
c – The cost of the flow
A – Incident matrix of the network


A 2D top-down space exploration game with with heavy emphasis on customizing your own spaceship and controlling your own crew. Began development for the REVEAL Cohort in Summer 2018. Development ongoing. In collaboration with Jordan Faas-Bush and Axel Stewart.
Check it outA 2D puzzle platformer without a jump button. Instead, use the wind currents to propel yourself upwards (or downwards). In collaboration with Nico Cobb.
Check it outAn 8-hour Game Jam winner in collaboration with Justin Buergi, Diana Nagu, William Pheloung, and Eric Walsh. You have 8 weeks to pander to the rest of the PTA board and be elected as the newest PTA president.
Check it outA prototype I hope to bring to VR sometime in the future. It showcases the intensity of social anxiety as you walk through a giant crowd of people, hiding out for a chance to calm down. In collaboration with Lillian Hong.
Check it outA short, philosophical journey of self-discovery. This reflective piece blends color theory with introspection, and the conflicts that may arise from the uncertainty of one's true self.
Check it out


Hello Kathy!
Liquid Price
Women's Shoes
Women's Apparel
Women's Dress
Near Best Buy
Sinch SMS
Hello Kathy!
Macy's
Product Name
66
reviews
Reg.: $
1.00
Liquid Price
: $
2.00
Sale
: $
3.00
Ends At:
12:30 PM
Hello Kathy!
Macy's
Place your Order
Order Summary
Items
SKU #
1491458
$
5
Shipping and Handling
$
Tax (8.6%)
$
Order Total:
$
Pay


i'm currently a associate software engineer at kuncham software solutions pvt ltd. I'm in love with angular, mongodb, and all things in web development.
find out morethese are all my some of the projects that i have developed.
here count is games, let's goo this is gaming time .
here count is responsive sites, mobile friendly web sites.
here count is online hosted websites, go watch out here.
here count is static sites, headers, landing pages etc,.
feel free to contact me!


Protectable intellectual property is a crucial piece of any corporate strategy for creating a long-term differentiated position in a market. Patents are a key part of IP strategy. Thanks to a series of high profile court cases, patents and patent strategy have become a highly visible part of technology strategy, representing billions of dollars in litigation every year. Patent valuation has arisen as a critical component of legal cases, startup valuations, and measuring R&D productivity.
There are many approaches to patent valuation, but a common and reliable method examines the number of patents citing a given patent (called “forward cites”). A patent with many forward cites (some patents have hundreds of forward cites) is likely more valuable since it was the genesis of continued innovation. Theoretically, a highly cited patent is more likely to represent a company’s core technology, is more likely to be licensed, and will be more valuable in generating future IP. Patents are organized by class and sub-class, thereby grouping similar patents together (some classes contain hundreds of thousands of patents). We can therefore measure a patent’s value relative to similar patents by comparing its number of forward cites with other patents in the same patent class.
I created software that uses the USPTO website to find the find the information needed to value a patent. For a class of patents, I scrape the key information for each patent as well as its forward cites (i.e. patent number, title, abstract, assignee, and file date). This involved leveraging the websites search format to find the desired patent classes, find all the patents in the class, and then download each patent’s individual page. I then used regex in python to create structured tables out of the downloaded HTML files.
Basically, we needed a solution that could turn patent class and forward cite searches into structured tables that could be analyzed to understand comparative patent values.
Given the large size of some patent classes and the large number of forward cites for mature patents, the code sometimes needed to run for days at a time in order to scrape the required patent data. With such a large data set and slow runtime, I had to take steps and devise a series of tricks to make sure that the code was robust and wouldn’t easily break. In addition, the range in the types of patents and the various bounds on searches (for example, certain classes during given date ranges) demanded a fairly flexible approach. In addition, the frequently shifting goals and needs of the project that this effort was a part of also required an easily extended piece of software that could handle new requirements with minimal additional coding.
The code for this project can be found on GitHub in my patents repo.
I relied on the USPTO’s advanced search website (which I refer to as PATFT) to scrape patent data, since existing patent databases are not flexible enough or too expensive to use for my purposes.
The great thing about PATFT is that it has a very predictable format in translating searches into URLs, so it’s easy to search for patents or patent classes using just URLs. This means that given a class number classNum
, I can get the search results by using the URL http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&r=0&p=1&f=S&l=50&Query=ccl%2F' + classNum + '&d=PTXT'
.
I used Python’s requests
package to grab the HTML pages for the class searches. After searching for a class, I needed to figure out how many patents were in the class, since search results are served on pages of 50. I could then loop through each search results page and grab all of the patent numbers in the class. After getting a list of patent numbers, I could then use a similarly standardized URL to search for the webpage for each patent, and I would again grab the HTML.
Finally, after getting information on all of the patents in a class, I completed a similar process for searching for, getting a list of, and downloading the webpages for each patent’s forward cites. The PATFT search tools and URL formats were similar to before.
I had to scrape the webpages for all of the patents and forward cites in HTML format. I was looking for specific pieces of information that help to understand the context of the patent:
I used Python’s awesome re
module for regex to extract this data out of the HTML files. I filtered the results into csv
files (some of which ended up being absolutely enormous) in order to easily view and manipulate the data, with rows representing patents and columns the desired information. These data files were used to analyze patent values.
I tied together each of the individual parts to create a full solution that is easy to use. I am able to enter the patent classes we would like to value, and the software generates the desired csv
files of lists of patent and forward cite data. Controller files tie together the different functions for downloading different types of search results and then extracting the relevant data and producing structured files.
I have to admit that all of this sounds relatively simple:
csv
All in day’s work, right?
Yeah, right.
The bulk of the code is built to deal with the problems and exceptions that arise out of irregularities in the PATFT system and database. A series of problems arose that I had to deal with, which wasn’t easy given the large scale of patents that had to be processed.
To deal with changing needs and the long load times, I ended up downloading all of the search results and patent webpages locally. That meant that if an extra piece of information was deemed important, it was a matter of a couple of seconds to rerun the regex scripts, rather than a couple of days to re-download all of the pages again. It also meant that if the system stalled for some strange reason (like a computer battery dying), I could pick up downloading again from where I left off, rather than having to start all over again.
I used a short bit of code leveraging a little-known function in the requests
package that retries downloading a webpage if it times out for too long. That ended up saving me a ton of headaches.
Dealing with the other issues was really a process of trial and error. Eventually, I ended up with a piece of software that I have used several times to do a series of different patent valuation projects, with minimal upgrades needed for new requirements due to the flexibility of the original code.
© 2016. All rights reserved. "Then you will know the data, and the data will set you free." winstonlarson@gmail.com


{{flowData | json}}
Please reformat phone number (xxx) xxx-xxxx
Please enter valid email address
Required


What we do
We aim to be the best provider of quality infrastructures in the Philippines. To achieve these, we commit continuous training, provide excellent needs, moral and just treatment of employees and implement regulatory requirement of government agencies, execute pro-active safety.
Our promise
Provide excellent needs, moral and just treatment amongst Company’s Personne l and execute pro-active safety to provide zero incident and accident within the company’s workplace.
Our Vision
The company shall be among the best provider of superb quality infrastructures that further improve the quality of the country’s development.
Engr. Joevie A. Sardua, Chairman & CEO PCDC Philippines
Civil Engineering
For more than a decade, Protech Construction and Development Corporation is committed in delivering robust and global standards compliant vertical and horizontal structures. Swiftly accomplishing projects without compromising quality.
₱300M++
Invested on heavy equipments and personnel protective equipments.
400++
Active personnel ready for deployment.
<24hrs
Rapid mobilization.


| 028:086 Khan | : |
And you were not expecting that the Book (this Qur'an) would be sent down to you, but it is a mercy from your Lord. So never be a supporter of the disbelievers. |
| 028:086 Maulana | : |
And thou didst not expect that the Book would be inspired to thee, but it is a mercy from thy Lord, so be not a backer up of the disbelievers. |
| 028:086 Pickthal | : |
Thou hadst no hope that the Scripture would be inspired in thee; but it is a mercy from thy Lord, so never be a helper to the disbelievers. |
| 028:086 Rashad | : |
You never expected this scripture to come your way; but this is a mercy from your Lord. Therefore, you shall not side with the disbelievers. |
| 028:086 Sarwar | : |
You had no hope of receiving the Book except by the mercy of your Lord. Do not be a supporter of the unbelievers. |
| 028:086 Shakir | : |
And you did not expect that the Book would be inspired to you, but it is a mercy from your Lord, therefore be not a backer-up of the unbelievers. |
| 028:086 Sherali | : |
And thou didst never expect that the Book would be revealed to thee; but it is a mercy from thy Lord; so never be a helper of disbelievers. |
| 028:086 Yusufali | : |
And thou hadst not expected that the Book would be sent to thee except as a Mercy from thy Lord: Therefore lend not thou support in any way to those who reject (Allah's Message). |
Concepts/Themes Covered: أركان الإسلام > التوحيد > الكافرون > التشدد معهم Pillars of Islam> Islamic> The Disbelievers> Strictness Against them أركان الإسلام > التوحيد > الكافرون > النهي عن نصرة الكفار Pillars of Islam> Islamic> The Disbelievers> The Prohibition to assist the Atheists أركان الإسلام > (محمد (صلى الله عليه وسلم > تأييد رسالته Pillars of Islam> The Blessed Muhammad(PBUH)> Supporting his Message أركان الإسلام > (محمد (صلى الله عليه وسلم > مخاطبة الله إياه Pillars of Islam> The Blessed Muhammad(PBUH)> Allah's Address to Him(PBUH) الدعوة إلى الله > حدودها > التشدد مع الكفار المقاتلين The Call for Allah> Its Limits> Strictness with the Fighting Unbelievers القرآن الكريم > حقيقته وتصديقه للكتب الأوائل The Holy Quran> The Quran's Reality and its confirmation of the Previous Books
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


|
qml-ar
|
Files | |
| file | blackenrest.cpp |
| Paints image parts not containing markers in black. | |
| file | blackenrest.h [code] |
| Paints image parts not containing markers in black. | |
| file | imumvpdecorator.cpp |
| This class decorates an MVP provider by adding IMU delta movement. | |
| file | imumvpdecorator.h [code] |
| This class decorates an MVP provider by adding IMU delta movement. | |
| file | linearposepredictor.cpp |
| This class implements linear Pose Predictor which assumes angular/linear velocities to be constant. | |
| file | linearposepredictor.h [code] |
| This class implements linear Pose Predictor which assumes angular/linear velocities to be constant. | |
| file | markermvpprovider.cpp |
| This class implements MVPProvider using pose from a detected markers,. | |
| file | markermvpprovider.h [code] |
| This class implements MVPProvider using pose from a detected markers,. | |
| file | mvpprovider.cpp |
| This class represents a QML interface to provide ModelViewProjection matrix. | |
| file | mvpprovider.h [code] |
| This class represents a QML interface to provide ModelViewProjection matrix. | |
| file | perspectivecamera.cpp |
| This class extends CalibratedCamera by allowing to get Perspective Projection matrix. | |
| file | perspectivecamera.h [code] |
| This class extends CalibratedCamera by allowing to get Perspective Projection matrix. | |
| file | pose.cpp |
| This class holds the pose (Translation+Rotation) of the camera. | |
| file | pose.h [code] |
| This class holds the pose (Translation+Rotation) of the camera. | |
| file | posecamerapnp.cpp |
| This class converts camera + 3D-2D correspondences to a camera pose. | |
| file | posecamerapnp.h [code] |
| This class converts camera + 3D-2D correspondences to a camera pose. | |
| file | posefilter.cpp |
| This class implements low-pass filter on Pose (Rotation + Translation) | |
| file | posefilter.h [code] |
| This class implements low-pass filter on Pose (Rotation + Translation) | |
| file | posepredictor.cpp |
| This abstract class represent a predictor for camera pose (rot., transl.) | |
| file | posepredictor.h [code] |
| This abstract class represent a predictor for camera pose (rot., transl.) | |
| file | worldimage.cpp |
| This class stores the correspondences between Real World 3D points and projected points on camera image. | |
| file | worldimage.h [code] |
| This class stores the correspondences between Real World 3D points and projected points on camera image. | |


Calculate Bankflow Width Ratios
Lattitude and Longitude must be accurate to the fifth decimal place.
Lattitude
Longitude
Start Year
End Year
Calculate


|
|
ILuint | XOffset |
| |
|
ILuint | YOffset |
| |
|
R32 | XCenter |
| |
|
R32 | YCenter |
| |
|
ILuint | XOrigSize |
| |
|
ILuint | YOrigSize |
| |
|
ILbyte | FileName [100] |
| |
|
ILbyte | CreationTime [24] |
| |
|
ILbyte | InputDev [32] |
| |
|
ILbyte | InputSerial [32] |
| |
|
ILushort | Border [4] |
| |
|
ILuint | PixelAspect [2] |
| |
|
ILubyte | Reserved [28] |
| |
Definition at line 86 of file il_dpx.h.
◆ Border
| ILushort DPX_IMAGE_ORIENT::Border[4] |
◆ CreationTime
| ILbyte DPX_IMAGE_ORIENT::CreationTime[24] |
◆ FileName
| ILbyte DPX_IMAGE_ORIENT::FileName[100] |
◆ InputDev
| ILbyte DPX_IMAGE_ORIENT::InputDev[32] |
◆ InputSerial
| ILbyte DPX_IMAGE_ORIENT::InputSerial[32] |
◆ PixelAspect
| ILuint DPX_IMAGE_ORIENT::PixelAspect[2] |
◆ Reserved
| ILubyte DPX_IMAGE_ORIENT::Reserved[28] |
◆ XCenter
| R32 DPX_IMAGE_ORIENT::XCenter |
◆ XOffset
| ILuint DPX_IMAGE_ORIENT::XOffset |
◆ XOrigSize
| ILuint DPX_IMAGE_ORIENT::XOrigSize |
◆ YCenter
| R32 DPX_IMAGE_ORIENT::YCenter |
◆ YOffset
| ILuint DPX_IMAGE_ORIENT::YOffset |
◆ YOrigSize
| ILuint DPX_IMAGE_ORIENT::YOrigSize |
The documentation for this struct was generated from the following file:


Interested in a full-time position?
Hey Colm,
Just stumbled Example link across you website Example link and was wondering if you do only freelancing or might you potentially be interested in a full-time role?
We are jaguyust in time not an IT company Dark link at all but a very traditional but innovative construction tool company in the mids of Digital transformation. I'm building up a central team to create a design system for the plethora of producs we have. To succeed I'm looking for the great talents and I have a feeling you are one of them :) Your impact here could be huge!
Let me know if you are Light link interested in light link more details!
Cheers,
Kristjan


In a recent post James Robertson claims that static typing doesn't help with refactoring. The original claim:
What's the real reason I get ClassCastExceptions? Because I refactor a lot. After a refactoring the wrapper class to use B instead of A you might be putting a type B into the collection and incorrectly casting it to the old A in a wrapper class methodJames Robertson replies:
You don't have this problem in Smalltalk because it's not the sort of problem you tend to get yourself into, period. Say I had a collection holding Foos. If I refactor, and I end up having a collection holding Bars (completely incompatible), then I have bigger problems. Even so, I would have had to refactor all the surrounding code that accesses the collection elements - and if I didn't have tests under those circumstances, I'm in trouble whether I have static typing or dynamic typing. To be brutal, if you trust the compiler to solve this for you, then you shouldn't be writing code.
Well, that's a little harsh. While Ryan Lowe's specific examples don't really apply to a dynamically typed language, the idea is valid. Refactoring tools are easier to write and more reliable with static typing. A tool can analyze statically typed code and say with some confidence exactly where a class or method is used -- in Smalltalk, Python, or other dynamically typed languages, refactoring is just a string match. Good naming practices can make that string search more reliable, but it's still just strings, not a fully type-annotated source.
This is one of those unfortunate places where you can't have it both ways. Dynamic typing and late binding is resistant to static analysis, and static analysis can be used for good things. (And Python is actually more resistant than most dynamic languages.)
It would be interesting in these dynamic languages if you could assert a type (or interface) not just at runtime, but in a way that can be statically determined. I don't know if programmers would bother to put in those assertions reliably enough to make it useful, or if the assertions would ultimately become fragile and unwieldy. Maybe a more appropriate goal would be to watch the code as it runs (particularly unit tests) and view types there; then while you wouldn't be absolutely guarenteed that you have correct type information, you'd usually have good information for analysis. We do this for JIT and other optimizations, but I haven't seen it used a great deal as a programming tool.
Still, while static typing isn't useless, it is rather limited. You can say "float", but you can't say "float between 0 and 1, inclusive". Contracts are a more general idea, with much more potential for error detection. Static analysis of contracts would be very interesting indeed.
"in Smalltalk, Python, or other dynamically typed languages, refactoring is just a string match"
No.
The Rewrite Tool in the Smalltalk Refactoring Browser is a parse-tree matcher - this is *not* textual search and replace.
http://www.whysmalltalk.com/Smalltalk_Solutions/ss2003/pdf/roberts.pdf
# Isaac Gouy
'You can say "float", but you can't say "float between 0 and 1, inclusive"'
We *can* define Float subranges in Ada
http://goanna.cs.rmit.edu.au/~dale/ada/aln/4_basic_types.html# Isaac Gouy
Yes, yes, I know no real refactoring tool works on the source as text. Even Real Programmers don't call sed a refactoring tool ;) But it is working on the source in a relatively isolated manner, where only the name is available, and that name is compared as a string. Whereas in Java the name can be fully identified as a particular method of a particular class.
Re: Ada; the problem with this is that the limited operators available don't work well for complicated systems. You can have number ranges. What about only odd numbers? What about invariants? What about objects that can have many valid states, but must be in a particular state when passed to a specific function? That's more restrictive than an interface, but a very common restriction. Realistic requirements are complex enough to require a full language, not a limited type definition language.# Ian Bicking
Yes, yes, I know...
We have to make do with what you write - what you may or may not know is a mystery.
But it is working on the source...
Again, no; the refactoring tool is working on ASTs.
Ada; the problem with this...
Before we move the goal-posts, are we agreed that for the last 25 years, in a mainstream language, we've been able to say "float between 0 and 1, inclusive"?
# Isaac Gouy
The AST (Abstract Syntax Tree) is just a data structure describing the source. It may lose a bit of information (e.g., whitespace), or it may not. It's not magic, it carries no extra information. It's very handy when you need to programmatically read the source, but it doesn't endow any special powers or information that original text didn't already have. But that's the same as what Java is doing, too, it's just that the Java source contains some pertinant information that Python or Smalltalk does not contain. So "text" vs. "whatever it is Java uses to represent source" is probably a bad way of describing the difference. It's really a question of what kind of reasoning you can do given the source.
As far as Ada, sure. But then, it was an example of a statically defined contract -- while Ada satisfies the example, that's not a case of contracts. I don't know much about Ada, so maybe it does provide all this contractural information, but whatever it is, it's more complex than can be expressed in terms of types.# Ian Bicking
One of the problems of static type checking in Python would be the plasticity of runtime introspection. Take, for example, one of my favorite ways to generically wrap methods, used in the example of a constructor:
def __init__(self, *args, **kargs):
superclass.__init__(self, *args, **kargs)
There are countless places where this is desirable, such as dynamic xmlrpc servers or object brokers, or meta programming. I would say that overall, the plasticity of Python will forever prevent any kind of meaningful type checking.
An alternative I would prefer to subclass based type checking would be interfaces. Checking to make sure an object passed implements an "iterable" interface instead of checking to see if it's a list or it has whatever methods you use.
Typechecking and Typechecking are different things. You have a full spectrum of different ideas when you look at type systems. You can have fully manifest typing (as Python or Smalltalk have) and still can have usefull type informations - by using type inference. So actually the ASTs a refactoring tool can be enriched by information that goes beyound the source. Type inference isn't thant new - several Lisp implementations use it to optimize their code. Of course you could it to make better refactoring tools, too.
Of course it is more problematic to have enriched information for refactoring in fully dynamic languages with strong focus on manifest typing. But it's still up for discussion wether that really is needed. By gut feeling I would go with James Robertsons assertion that static typing in the long run doesn't help. But then, I do Smalltalk since somewhere in the 80s and Lisp since the end of the 80s, so I am a bit biased.
IMO people are mixing apples and orange. the fact that Java's type ssytem sux does not imply that all static typing systems should be like that. Nice is a nice example of a type system where you add very little informations to those that can be inferred automagically.
Also, I won't bet that you can't define an Even or Odd class in haskell, it should be something like:
class Even n where check_even :: n
I think we must face the simple law that actual "dynalanguages" like python or ruby are just a mix of
1 simplicity
2 expressivity
3 large simple+expressive libraries
and that static typed languages that provide #1 and #2 massively lack #3.
oh, btw haskell's type system is turing complete, people say :)
So moving the goal posts: "What about only odd numbers?"
See todays LtU posting. Although you should probably dig into dependent types for a more satisfactory answer. It's all a mystery to me ;-)# Isaac Gouy
static typed languages that provide #1 and #2 massively lack #3
Does Java satisfy #3?
If so then presumably languages (Nice, Scala) that use standard Java libraries also satisfy #3?# Isaac Gouy
String matching would not distinguish a local variable or instance variable named "X" from a method named "X" from a class name "X".
My understanding of the Refactoring tools (Smalltalk and otherwise) is that they are operating on the same level of information the compiler operates on: it does distinguish between a class named X, a method named X, a local variable named X, etc.
There is a danger when strings (perhaps read from an external file) are used to look up classes, methods, or whatever... the exact same danger exists in Java. On the other hand, C++ doesn't have any way to go from a string to a class or method, so it's "safe", though the syntax of C++ is so hairy, and the lack of reflection such a big problem, that there are no refactoring tools for C++ yet. [I hear one is in development, but that's it.]
isaac: I don't think so. The java library is an overengineered beast and I won't say that it is simple and expressive. This is a side effect of it being a library for an "enterprise" language like java.
The scripting attitude is to ignore details and have something working even if it's not 'perfect', while the java lib pushes the "do it the exact way, then bother about pleasure of use" mood.
Anyway I have to specify that #1 and #2 are provided from many static languages but a static inference able to encompass the expressivity of python/ruby/whatever is yet to come. I bet it is possible, just not yet done.
i.e I'm not sure but IIRC in nice you still had to specify an ad hoc interface explicitly, or can this be inferred automagically?
I'm sorry I don't know Scala enough to comment on it. I was just confused from seing it has traits+mixins :)
Perhaps, you are looking for a interface checker like this one:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/204349# ch3m4


--- layout: page title: PrintableOptics subtitle: A speedy, cost-effective, and flexible way to engineer miniaturize micro-optics ---
Two-photon polymerization (TPP) is a technique to engineer high fidelity 3D structure with resolution down to 100 nm. Based on the interaction of highly localized femtosecond laser radiation with photosensitive material, TPP has become a cost-effective, high resolution, and good 3-D micro/nanoprinting strategy. Using the Nanoscribe Photonics GT system, we launched a project focusing on miniaturizing micro-optics printing at Stanford. The ultimate goal of this study is to produce a cost-effective endoscope engineering for neuroscience applications. As a benchmark of engineering endoscope, this project showcases the microlens fabrication and identify chanllenges and propose corresponding solutions. We demonstrate a the process flow from design, manufacturing, characterizations, post-processing, and functionalities. This project aims to establish a useful and robust workflow for micro-optics fabrication to benefit photonics and micro/nano-fabrication community.


at a glance
more_vert
about
legal
home
home
inbox
areas
inbox
on day
help_outline
Help
-
FSBO Export History
Week
Month
All Time
Date Range
FRBO Export History
Week
Month
All Time
Date Range
Current FSBO Funnel
Current FRBO Funnel
FSBO Stage
FRBO Stage


To generate your RSS Feed type in your query below.
Your query will only be searched against titles and abstracts.
Use double quotes around multiple words for exact phrases.
Stopwords will be removed if they aren't part of phrase.
Punctuation is also removed if it is not part of a phrase.
All terms will be combined using AND logic.
The feed will give you the 20 most recent items matching your search.
Non-ASCII characters are not allowed.


Get Videos
Video metadata for update:
Update the videos
API request:
API request body:
API Response
Responses will appear here...


99 little bugs in the code, 9 9 little bugs in the code. Take one down, patch it around, 117 little bugs in the code.


Colour Multiplier
Primaries:
Primary 1:
Primary 2:
Primary 3:
Secondaries:
Secondary 1:
Secondary 2:
Secondary 3:
Tertiary:
Tertiary:


Hey I'm new at coding and I have a project where I need to create two games and have the user pick which game they would like to play. I already have the codes for the two games i just need help on how to put them together and have the user be able to pick which game they would like to play.
OK. Is this a project that you were assigned by an instructor, a self-defined project for a class, or a fun project you are doing on your own to learn C++? Your answer to this question will help others understand what you are trying to accomplish. (Your initial description was a bit vague, so I'm trying to get some more details so that we can try to help you.)
// Pick a game menu
#include<iostream>
usingnamespace std;
int main ()
{//open of main
int select;
cout << " Please type in one number : \n\n\t\t1 for GAME A \t\t2 for GAME B"<< endl;
cin >> select;
switch (select)
{//open of switch
case 1: cout << "You have selected GAME A " ; break;
case 2: cout << " You have selected GAME B " ; break;
default:
cout << "You entered a wrong number" << endl;
} // end of switch
return 0;
} //end of main
You could make the "Games" objects and call them. Then give them both a "Play" function (what the main is now probably) and call that for game a or game b in the menu. You could alternatively combine them and put each main in a function called like gameA() and gameB() then call accordingly.
By "windows" do you mean do separate programs, two separate executable files? That probably isn't what your professor wants, that would require a bunch more stuff like platform-dependent code to call an executable from another executable.
Your question is vague. If the user chooses game 1, then you'd run the code that starts game one.
1 2 3 4 5 6 7 8
case 1:
cout << "You have selected GAME A " ;
startGame_A(); // or how ever you start your game
break;
case 2:
cout << " You have selected GAME B ";
startGame_B();
break;
switch (choice)
{
if game 1 chosen:
//code for game a
break;
else game 2 chose:
code for game b
break;
Just saw your post now, that would be a very large main function. Generally you want to break things down into sub functions. Anything that is used more than once you definitely want to put in sub functions.
Let's say your first program source file for Game 1 looks like this.
1 2 3 4 5 6
int main()
{
//a bunch of lines of code for your game:
//code
//more code
}
Instead of doing everything in main, copy the stuff into a playGame1() function.
1 2 3 4 5 6 7 8 9 10 11
void playGame1()
{
//a bunch of lines of code for your game:
//code
//more code
}
int main()
{
playGame1();
}
See where I'm going? Do the same for game2. Now, each game is a separate function that runs it. Now when you're combining source, you don't copy everything into main(), main() should just have a way to call your other game functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
void playGame1()
{
//put game 1's code here (not including the actual definition of main!)
}
void playgame2()
{
//put game 2's code here
}
int main()
{
//pick whether to:
playGame1();
//or
playGame2();
}


{% extends 'layouts/layout-cookie-banner.html' %} {% extends 'layouts/layout.html' %} {% from 'button/macro.njk' import button %} {% from 'back-link/macro.njk' import backLink %} {% block pageTitle %} Phone number changed {% endblock %} {% block content %}
Your phone number will stay the same as it is now.
If you think you need to secure your NHS login you can reset your password. To do this, go back to [CLIENT] and enter your email address. When asked to enter your password, select 'Forgotten your password?'.