Enabling/Disabling and Configuring an Event Image
How to show or hide an image for an event in the Events module. The image is typically displayed in both the event calendar/list and in the detailed event view.
Tip: See Manage Settings section for more on managing images.
- Commence adding a new event (See "Adding an Event") but don't click the Update button until completing the below steps - OR - Edit an existing event (See "Editing an Event").
- Go to the Display Image section below the Editor.
- At Display Image, select from these options:
- Mark the check box to display an image for this event.
- At Image URL select or enter the link to the image. See "About the Link Control"
- Optional. In the Width text box, enter the pixel width for this image - OR - Leave this field blank for the original image size.
- Optional. In the Height text box, enter the pixel height for this image - OR - Leave this field blank for the original image size.
- Unmark the check box for no image. Note: This removes the image from the event listing; however any saved image settings are retained for future use.
- Click the Update / Update Series button. If the event requires moderation you will be notified when moderation has occurred whether the event was accepted. Accepted events are displayed following moderation.
An event displaying an image


Vlhova leads Shiffrin in 1st run of World Cup slalom opener
by The Associated PressLEVI, Finland (AP) — Slovakian skier Petra Vlhova took a slim lead over Mikaela Shiffrin in the opening run of the first women’s World Cup slalom of the season on Saturday.
Vlhova edged the three-time overall champion by 0.13 seconds as the duo looked set to continue dominating the discipline.
All 20 World Cup slaloms since January 2017 have been won by either Shiffrin (16) or Vlhova (4).
“It was OK, I felt pretty solid with my skiing,” Shiffrin said. “I think there are some spots where I can be a little bit more relaxed.”
Another win Saturday would be Shiffrin’s record 41st in the discipline. The American currently shares the all-time best mark in slalom with Sweden’s standout Ingemar Stenmark.
Vlhova, who won this race two years ago, was 0.32 behind Shiffrin at the second check point but found a smoother line going over a roll into the steep part of the Levi Black course.
Advertising
“I didn’t do a great job on this one. It’s pretty sharp. I think Petra did quite a good job there,” Shiffrin said. “I like to be in a position where I am kind of coming from behind and chasing.”
Katharina Truppe of Austria was 0.99 behind in third, while the rest of the field had to make up more than 1.3 seconds in the second run. Switzerland’s Wendy Holdener, who had been nursing an elbow injury in recent weeks, finished 1.55 behind Vlhova.
New Zealand teenager Alice Robinson, who beat Shiffrin in the season-opening giant slalom in Austria last month, was sitting out the race with a knee injury.
___
More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports
The Associated Press


What Days and Hours are PH Online Shoppers Most Likely to Buy?
iPrice Group report offers insights on daily e-commerce activity in the Philippines and Southeast. Statistically, you stand a better chance for success if you have some sort of strategic ask in almost everything that you do -- in-person, on the phone, over email, or on social media.
Think about it: If you make one additional ask per day and convert at around 10 percent. Then you have three people each month providing you with benefits that you'd have missed otherwise It's essential to make sure that your ask relates to some direct path to what you want, whether it is revenue, a business relationship or anything else of prime importance to you.
“Dreams and dedication are powerful combination.”
Music can help you get into a “flow state” -- losing yourself in the task at hand. Even repetitive tasks or mundane assignments seem more bearable, or even fun, when your favorite tunes are in your ears.
 Check out these and more reasons to bring your music to work in this Zing Instruments infographic below. A great piece of music is an instant mood lifter. Plenty of scientific evidence backs this up - we`re happier bunnies when listening to music.
Nulla rhoncus orci varius purus lobortis euismod. Fusce tincidunt dictum est et rhoncus. Vivamus hendrerit congue nisi, et nisl tincida vestibulum elit tincidunt eu. Vivamus ac pharetra orci, in feugiat massa. Proin congue mauris pretium, ultricies tortor in, aliquam urna. Vivamus mi tortor, finibus a interdum ac, ultricies in elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere hendrerit ex eu scelerisque.
Attraction needs attention
In order to attract what you want, you actually have to consciously and strategically think about what you want and focus in on it. Then, you need to take some sort of action using the same four strategies you use to ask for help in order to make it happen. You can't get what you want sitting around on your couch. You need to put yourself out there and stimulate interest in person, via email, by phone and through social media.
Stylish article pages
Stimulating interest in person can be powerful, especially if you surround yourself with the right people and the right ideas. A study by Nielsen found that 83 percent of people trust referrals from others they know. If you have a product, service, content or any other value that you provide to others, let them know when you talk in person or over the phone. As an example, if you're working with a charity organization, tell a story about how much money you helped raise for another charity you're affiliated with.
If you win an important award in an industry, put it in your email signature or as a tagline in a piece of social content. Showcasing your wins organically and authentically will attract more of the same.
List of features
- Reusable components
- Multiple niches
- Lightning fast
- BEM methodology
- Organized JS/Sass files
Summary
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos. Lorem ipsum dolor sit amet, consectetur adipiscing elit. And finally the subconscious is the mechanism through which thought impulses which are repeated regularly with feeling and emotion are quickened, charged. And finally the subconscious is the mechanism through which thought impulses which are repeated regularly with feeling and emotion.
Great
Lovingly rendered real-world space tech,playing through actual missions is a special thrill,scoring system gives much needed additional incentive to perfect your designs
Joeby Ragpa
This template is so awesome. I didn’t expect so many features inside. E-commerce pages are very useful, you can launch your online store in few seconds. I will rate 5 stars.
ReplyAlexander Samokhin
This template is so awesome. I didn’t expect so many features inside. E-commerce pages are very useful, you can launch your online store in few seconds. I will rate 5 stars.
ReplyChris Root
This template is so awesome. I didn’t expect so many features inside. E-commerce pages are very useful, you can launch your online store in few seconds. I will rate 5 stars.
Reply


Amniocentesis Advisor
Welcome and introductory information here. If you have stumbled across this application on the internet, please note that this is a non-functioning prototype. It does not provide actual advice.
Note: Your information is completely private. We do not store or save any of your information on our servers. Nor do we use any cookies.
Get started by telling us some basic medical information.


vignettes/crul_vignette.Rmd
crul_vignette.Rmd
crul
is an HTTP client for R.
HttpClient
is where to start
(x <- HttpClient$new(
url = "https://httpbin.org",
opts = list(
timeout = 1
),
headers = list(
a = "hello world"
)
))
#> <crul connection>
#> url: https://httpbin.org
#> curl options:
#> timeout: 1
#> proxies:
#> auth:
#> headers:
#> a: hello world
#> progress: FALSE
Makes a R6 class, that has all the bits and bobs you’d expect for doing HTTP requests. When it prints, it gives any defaults you’ve set. As you update the object you can see what’s been set
The client object created above has http methods that you can call, and pass paths to, as well as query parameters, body values, and any other curl options.
Here, we’ll do a GET request on the route /get
on our base url https://httpbin.org
(the full url is then https://httpbin.org/get
)
The response from a http request is another R6 class HttpResponse
, which has slots for the outputs of the request, and some functions to deal with the response:
Status code
The content
res$content
#> [1] 7b 22 73 74 61 74 75 73 22 3a 22 35 30 33 22 2c 22 64 65 73 63 72 69
#> [24] 70 74 69 6f 6e 22 3a 22 54 68 65 20 64 65 70 6c 6f 79 6d 65 6e 74 20
#> [47] 69 73 20 63 75 72 72 65 6e 74 6c 79 20 75 6e 61 76 61 69 6c 61 62 6c
#> [70] 65 22 7d 0a
HTTP method
Request headers
res$request_headers
#> $`User-Agent`
#> [1] "libcurl/7.54.0 r-curl/3.2 crul/<IP_ADDRESS>21"
#>
#> $`Accept-Encoding`
#> [1] "gzip, deflate"
#>
#> $Accept
#> [1] "application/json, text/xml, application/xml, */*"
#>
#> $a
#> [1] "hello world"
Response headers
res$response_headers
#> $status
#> [1] "HTTP/1.1 503 Service Temporarily Unavailable"
#>
#> $date
#> [1] "Fri, 06 Jul 2018 23:18:54 GMT"
#>
#> $`content-type`
#> [1] "application/json"
#>
#> $`content-length`
#> [1] "73"
#>
#> $connection
#> [1] "keep-alive"
#>
#> $etag
#> [1] "\"5b22ab07-49\""
#>
#> $vary
#> [1] "Accept"
#>
#> $`x-now-trace`
#> [1] "sfo1"
#>
#> $server
#> [1] "now"
#>
#> $`cache-control`
#> [1] "max-age=0"
And you can parse the content with a provided function:
res$parse()
#> [1] "{\"status\":\"503\",\"description\":\"The deployment is currently unavailable\"}\n"
jsonlite::fromJSON(res$parse())
#> $status
#> [1] "503"
#>
#> $description
#> [1] "The deployment is currently unavailable"
With the HttpClient
object, which holds any configuration stuff we set, we can make other HTTP verb requests.


Educational version of the \(d\)-Groebner basis algorithm over PIDs#
No attempt was made to optimize this algorithm as the emphasis of this implementation is a clean and easy presentation.
Note
The notion of ‘term’ and ‘monomial’ in [BW1993] is swapped from the notion of those words in Sage (or the other way around, however you prefer it).  Also, what is called LM (the leading monomial) in Sage is called HT (the head term) in [BW1993].
EXAMPLES:
sage: from sage.rings.polynomial.toy_d_basis import d_basis
First, consider an example from arithmetic geometry:
sage: A.<x,y> = PolynomialRing(ZZ, 2)
sage: B.<X,Y> = PolynomialRing(Rationals(), 2)
sage: f = -y^2 - y + x^3 + 7*x + 1
sage: fx = f.derivative(x)
sage: fy = f.derivative(y)
sage: I = B.ideal([B(f), B(fx), B(fy)])
sage: I.groebner_basis() # needs sage.libs.singular
[1]
Since the output is 1, we know that there are no generic singularities.
To look at the singularities of the arithmetic surface, we need to do the corresponding computation over \(\ZZ\):
sage: I = A.ideal([f, fx, fy])
sage: gb = d_basis(I); gb
[x - 2020, y - 11313, 22627]
sage: gb[-1].factor()
11^3 * 17
This Groebner Basis gives a lot of information. First, the only fibers (over \(\ZZ\)) that are not smooth are at 11 = 0, and 17 = 0. Examining the Groebner Basis, we see that we have a simple node in both the fiber at 11 and at 17. From the factorization, we see that the node at 17 is regular on the surface (an \(I_1\) node), but the node at 11 is not. After blowing up this non-regular point, we find that it is an \(I_3\) node.
Another example. This one is from the Magma Handbook:
sage: P.<x, y, z> = PolynomialRing(IntegerRing(), 3, order='lex')
sage: I = ideal(x^2 - 1, y^2 - 1, 2*x*y - z)
sage: I = Ideal(d_basis(I))
sage: x.reduce(I)
x
sage: (2*x).reduce(I)
y*z
To compute modulo 4, we can add the generator 4 to our basis.:
sage: I = ideal(x^2 - 1, y^2 - 1, 2*x*y - z, 4)
sage: gb = d_basis(I)
sage: R = P.change_ring(IntegerModRing(4))
sage: gb = [R(f) for f in gb if R(f)]; gb
[x^2 - 1, x*z + 2*y, 2*x - y*z, y^2 - 1, z^2, 2*z]
A third example is also from the Magma Handbook.
This example shows how one can use Groebner bases over the integers to find the primes modulo which a system of equations has a solution, when the system has no solutions over the rationals.
We first form a certain ideal \(I\) in \(\ZZ[x, y, z]\), and note that the Groebner basis of \(I\) over \(\QQ\) contains 1, so there are no solutions over \(\QQ\) or an algebraic closure of it (this is not surprising as there are 4 equations in 3 unknowns).
sage: P.<x, y, z> = PolynomialRing(IntegerRing(), 3, order='degneglex')
sage: I = ideal(x^2 - 3*y, y^3 - x*y, z^3 - x, x^4 - y*z + 1)
sage: I.change_ring(P.change_ring(RationalField())).groebner_basis()
[1]
However, when we compute the Groebner basis of I (defined over \(\ZZ\)), we note that there is a certain integer in the ideal which is not 1:
sage: gb = d_basis(I); gb
[z ..., y ..., x ...,<PHONE_NUMBER>43]
Now for each prime \(p\) dividing this integer<PHONE_NUMBER>43, the Groebner basis of I modulo \(p\) will be non-trivial and will thus give a solution of the original system modulo \(p\).:
sage: factor(282687803443)
101 * 103 * 27173681
sage: I.change_ring(P.change_ring(GF(101))).groebner_basis()
[z - 33, y + 48, x + 19]
sage: I.change_ring(P.change_ring(GF(103))).groebner_basis()
[z - 18, y + 8, x + 39]
sage: I.change_ring( P.change_ring(GF(27173681))).groebner_basis() # needs sage.libs.pari
[z + 10380032, y + 3186055, x - 536027]
Of course, modulo any other prime the Groebner basis is trivial so there are no other solutions. For example:
sage: I.change_ring(P.change_ring(GF(3))).groebner_basis()
[1]
AUTHOR:
Martin Albrecht (2008-08): initial version
- sage.rings.polynomial.toy_d_basis.LC(f)#
- sage.rings.polynomial.toy_d_basis.LM(f)#
- sage.rings.polynomial.toy_d_basis.d_basis(F, strat=True)#
Return the \(d\)-basis for the Ideal
F
as defined in [BW1993].INPUT:
F
– an idealstrat
– use update strategy (default:True
)
EXAMPLES:
sage: from sage.rings.polynomial.toy_d_basis import d_basis sage: A.<x,y> = PolynomialRing(ZZ, 2) sage: f = -y^2 - y + x^3 + 7*x + 1 sage: fx = f.derivative(x) sage: fy = f.derivative(y) sage: I = A.ideal([f,fx,fy]) sage: gb = d_basis(I); gb [x - 2020, y - 11313, 22627]
- sage.rings.polynomial.toy_d_basis.gpol(g1, g2)#
Return the G-Polynomial of
g_1
andg_2
.Let \(a_i t_i\) be \(LT(g_i)\), \(a = a_i*c_i + a_j*c_j\) with \(a = GCD(a_i,a_j)\), and \(s_i = t/t_i\) with \(t = LCM(t_i,t_j)\). Then the G-Polynomial is defined as: \(c_1s_1g_1 - c_2s_2g_2\).
INPUT:
g1
– polynomialg2
– polynomial
EXAMPLES:
sage: from sage.rings.polynomial.toy_d_basis import gpol sage: P.<x, y, z> = PolynomialRing(IntegerRing(), 3, order='lex') sage: f = x^2 - 1 sage: g = 2*x*y - z sage: gpol(f,g) x^2*y - y
- sage.rings.polynomial.toy_d_basis.select(P)#
The normal selection strategy.
INPUT:
P
– a list of critical pairs
OUTPUT:
an element of P
EXAMPLES:
sage: from sage.rings.polynomial.toy_d_basis import select sage: A.<x,y> = PolynomialRing(ZZ, 2) sage: f = -y^2 - y + x^3 + 7*x + 1 sage: fx = f.derivative(x) sage: fy = f.derivative(y) sage: G = [f, fx, fy] sage: B = set((f1, f2) for f1 in G for f2 in G if f1 != f2) sage: select(B) (-2*y - 1, 3*x^2 + 7)
- sage.rings.polynomial.toy_d_basis.spol(g1, g2)#
Return the S-Polynomial of
g_1
andg_2
.Let \(a_i t_i\) be \(LT(g_i)\), \(b_i = a/a_i\) with \(a = LCM(a_i,a_j)\), and \(s_i = t/t_i\) with \(t = LCM(t_i,t_j)\). Then the S-Polynomial is defined as: \(b_1s_1g_1 - b_2s_2g_2\).
INPUT:
g1
– polynomialg2
– polynomial
EXAMPLES:
sage: from sage.rings.polynomial.toy_d_basis import spol sage: P.<x, y, z> = PolynomialRing(IntegerRing(), 3, order='lex') sage: f = x^2 - 1 sage: g = 2*x*y - z sage: spol(f,g) x*z - 2*y
- sage.rings.polynomial.toy_d_basis.update(G, B, h)#
Update
G
using the list of critical pairsB
and the polynomialh
as presented in [BW1993], page 230. For this, Buchberger’s first and second criterion are tested.This function uses the Gebauer-Moeller Installation.
INPUT:
G
– an intermediate Groebner basisB
– a list of critical pairsh
– a polynomial
OUTPUT:
G,B
whereG
andB
are updatedEXAMPLES:
sage: from sage.rings.polynomial.toy_d_basis import update sage: A.<x,y> = PolynomialRing(ZZ, 2) sage: G = set([3*x^2 + 7, 2*y + 1, x^3 - y^2 + 7*x - y + 1]) sage: B = set() sage: h = x^2*y - x^2 + y - 3 sage: update(G,B,h) ({2*y + 1, 3*x^2 + 7, x^2*y - x^2 + y - 3, x^3 - y^2 + 7*x - y + 1}, {(x^2*y - x^2 + y - 3, 2*y + 1), (x^2*y - x^2 + y - 3, 3*x^2 + 7), (x^2*y - x^2 + y - 3, x^3 - y^2 + 7*x - y + 1)})


Construct and manipulate hierarchical Archimedean copulas with multivariate compound distributions. The model used is the one of Cossette et al. (2017) <doi:10.1016/j.insmatheco.2017.06.001>.
| Version: |
0.1.1 |
| Depends: |
R (≥ 3.4.0), copula |
| Imports: |
Deriv, stringr, stringi, compiler, methods |
| Suggests: |
knitr, rmarkdown |
| Published: |
2018-11-30 |
| Author: |
Simon-Pierre Gadoury [cre, aut],
David Beauchemin [ctb] |
| Maintainer: |
Simon-Pierre Gadoury <spgadou at me.com> |
| License: |
GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: |
no |
| CRAN checks: |
nCopula results |


MANUAL
Step 1:
ｎｏ ｂｕｌｌｙ
please be nice to one another
Step 2:
ｄｏｎ’ｔ ｐａｎｉｃ
please take it easy, and enjoy
Step 3:
？？？
and then a miracle occurs
Step 4:
ｍａｈｏｕ☆
please help keep our community clean
any sufficiently advanced technology
is indistinguishable from friendship


{% extends 'main.html' %} {% load i18n %} {% block content_body %}
{% trans 'We have mailed you a verification link. You should receive the email shortly. Please also check your spam folder!' %}
{% trans 'The registration process will continue as soon as you verified your mail address by clicking on the link in the mail.' %}
{% if global_preferences.fair__applications_open_date|date:"U" < current_time %} {% trans 'Signing up for an account is not a registration for the fair. The process of applying for the fair begins after account creation with the application form.' %} {% else %} {% trans 'Signing up for an account is not a registration for the fair. You will be notified about the opening of the application process and will be able to apply for the fair in a separate application step as soon as the application process is open.' %} {% endif %}
{% trans 'If you have any trouble setting up your account, contact us at' %}<EMAIL_ADDRESS>{% endblock %}


Press ESC to end
auto ending in {{m.secondsLeft}} seconds
Gesture Recorder
(Note: You may need to turn on touch emulation in dev tools)
Press ? for keyboard shortcuts
{{m.btnMsg}}
Play
Del
No recordings yet
Record Viewport Relative Percentages?
JS Module System:
None
AMD
UMD


--- layout: post title: I Look Like An Engineer date: type: post published: false status: trash categories: [] tags: [] meta: _edit_last: '2' _oembed_7e29e47f2183b94bd85bc349b5b86db4: "{{unknown}}" _css_code: '' _wp_trash_meta_status: publish _wp_trash_meta_time: '1449327587' author: login<EMAIL_ADDRESS>email<EMAIL_ADDRESS>display_name: Aimee Knight first_name: Aimee last_name: Knight ---
https://www.sparkpost.com/blog/i-look-like-an-engineer-figure-skater-turns-software-engineer/


What we do
In the busy landscape of Bangladesh, getting some time to yourself is very difficult. Weekends are too few and filled with household errands. We understand these challenges and try to make your life just a little bit easier
We provide repairing services at your doorstep so that you do not need to waste your precious time getting to the repair shops. Sounds like a good deal? What are you waiting for?
Request a repair or Read on for more . . .
How our service works
Just login to our system and send a repair order. We will take care of the rest for you. We take in your request and pass it along to our verified service providers who assesses the situation and schedules a time to come over and repair your equipment. You have the freedom to discuss your service needs and set the price.
The entire service process takes in these few steps:
- Login or Register to FixKori and place an online order for a supported repair service.
- We locate a suitable service provider and set up a tentative schedule for his visit.
- You will be provided with the service provider's contact information and our representative will call you to confirm that the order has been placed.
- You are now free to communicate with the service provider and arrange the visit schedule according to your convenience.
After you have received your service we would request you to send us a review of the service provider so that we can maintain the quality standard of the service. Your contribution helps greatly to maintaining and upholding the community standards that we hold very dearly.
Services
Vehicle maintenance
Cleaning, Checkup, Oil Change, Tire Repairs and more. All your vehicle needs right at your doorstep!
Vehicle repair
Got a problem with your vehicle? Need engine repairs? Need color change? Any kind of vehicle repair work, we will take it off your hands!
Television repair
No need to carry the large heavy televisions yourself. We come and repair at your home!
Laptop repair
Need your laptop fixed quickly? Finding it difficult to go to the repair store? We got you covered.
Desktop repair
Desktop device not working? Office equipment needs immediate repair? Give us a call and get it fixed!
How we work
Make a request to get your device fixed and provide your service location.
we provide you a list of all the providers and you get to select the most preferred.
The provider comes over and gets the job done. We do not define the pricing or the modality. You are free to choose your own way.
Convinced Yet?
If we have convinced you, Please consider requesting a service.
Features
These are all the features we offer for your convenience!
24x7 availability
All requests are received at any time of the day or night. Our service is open all year round at all times! Service times may vary depending on the availability of the providers, but once ordered, all your requests stay with us and we get back to you as soon as a provider is found!
Price bartering
We love to bargain. It is an integral part of our culture. We allow our users and providers full bargaining capacity in respect to this culture of ours. We can proudly say we are the only service provider who lets you make a bargain :)
Flexible time scheduling
Unable to meet with the provider right now? Feel free to change your schedule to any time you and the provider are comfortable. We do not try to force you in following our rules. Your service, your rules!
Direct communication with service provider
Once a provider has been connected with you, feel free to communicate with him at your own convenience. Feel free to require his services even outside of FixKori. We do not try to control your actions, we try to adjust ourselves to meet your needs!
Pricing
We do not boss you around and tell you what you should pay! We let you take control and dictate your own pricing. We simply bring the service provider to your doorstop!.
Frequently Asked Questions
In case you were wondering, we took the liberty of addressing some of the key confusions.
-
What is the cost of this service?
We do not define any pricing. We allow you a chance to barter with the service provider for getting the full local flavor of going to the service provider. However, we request you to pay a token amount for the transportation cost of the repairman as a sign of politeness even if you decide not to avail the service. This amount is not mandatory and is communicated between you and the service provider.
-
How long will it take to get connected?
We usually respond within half an hour of receiving request and connect you with the service provider within that time. After this, you and the provider may choose to set up the schedule according to your convene. However, for late night requests, in case no active service provider is found, we will connect you with the nearest available service provider as soon as he becomes available.
-
Is all repairing done at home?
This depends on the nature of the issue and between both you and the service provider. If the problem cannot be solved at home, you may choose to allow the service provider to take the equipment to his store to get it repaired and later delivered back to your home, or you may ask to have him bring his equipment and fix it at home. Keep in mind, that some issues cannot be fixed at your doorstop. In those cases, please make sure that you request the service via FixKori so that we are informed of the transaction between you and the provider. This will allow us to intervene and ensure proper care of your equipment. You are free to choose to request service directly from the service provider, but in this case, do understand that any kind of mishap will not be covered by FixKori.
FixKori
Easier life, better service!
Karwan Bajar
Dhaka, Bangladesh
<EMAIL_ADDRESS>+88 01 5454 65 5421


30 St Mary Axe
the Swiss Re Building (colloquially referred to as the Gherkin), is a skyscraper
in London's main financial district, the City of London, completed in December 2003
and opened at the end of May 2004. With 40 floors, the tower is 180 metres (591
ft) tall, and stands on the former site of the Baltic Exchange building, which was
severely damaged on 10 April 1992 by the explosion of a bomb placed by the Provisional
IRA.
The building is on the former site of the Baltic Exchange building, the headquarters
of a global marketplace for ship sales and shipping information. On 10 April 1992
the Provisional IRA detonated a bomb close to the Exchange, severely damaging the
historic Exchange building and neighbouring structures. The UK government's statutory
adviser on the historic environment, English Heritage, and the City of London governing
body, the City of London Corporation, were keen that any redevelopment must restore
the building's old faade onto St Mary Axe. The Exchange Hall was a celebrated fixture
of the ship trading company.


Bohemian Festival
2021 Edition
Bohemian Festival brings together artists with diverse backgrounds and fields,
they all have one thing in common: the love and passion for music.
In this space they are able to share
with the public
some aspects of their careers, ups and downs, and what it is to be a musician nowadays.
For this occasion
we are
setting a Q&A session with the artists, more details coming soon!
Please feel free to contact us per Email for any further questions about Bohemian Festival 2021!
<EMAIL_ADDRESS>Featured Artists
Damien Rice
"Colour Me In"
Alice Phoebe Lou
"Something Holy"
Tori Amos
"Reindeer King"
Cantus Domus
"Clean Eyes" Feat. SYML
Lisa Hannigan
"Undertow" Feat. Loah
Alanis Morissette
"Losing The Plot"


ONLAE PROMOTION BV, Paseo de Habana 28-35, Postcode 31245, Marbella, Spain. REF No: OL642857301/09ES BATCH: OLAES78095 Attn: Webmaster, In view of the yearly sweepstake of the Onlae Group organization held on the 14th of June,2006.It is my pleasure to inform you that your e-mail address attached to the above Ref ans Batch Numbers came up in the first dip. This invariably means that you have emerged as the prize recipient in the first category with an allocated sum of Seven Hundred and Sixty Thousand Five Hundred and Ten Euros Twenty Four Cent (_760.510.24). Be informed that all participants were selected from a randon computing ballot system. This charitable sweepstake is sponsored by a group of corporate organizations and governmental parastatals drawn from major cities in Europe. As a matter of principle,you are to donate at the minimum one tenth of the fund to an outstanding charity project in your locality,after the reception of your fund. To file for your claim and other enquiries,contact the designated fiducial consultant. Mr. Raul Menedez<EMAIL_ADDRESS><EMAIL_ADDRESS>) Completely fill out the Claim Form - E provided herein and submit a completed filled form via email to the Prize Remittance Division.Your winning information has been provided above. =========================================================================== APPLICATION FOR PRIZE CLAIM FORM - E (Receipt Official Notification Letter) [REFERENCE NUMBER.. OL642857301/09ES] -------------------------------------------------------------------------- [FULL NAME OF WINNER]...................................................... [RESIDENT ADDRESS]......................................................... [COUNTRY/ REGION].................. ............................. [OCCUPATION]........................ [CURRENT EMAIL]..................... [TEL/FAX]........................... =========================================================================== WINNING INFORMATION --------------------------------------------------------------------------- 19/06/2006.................................. =========================================================================== CLAIMANT SIGNATORY DECLARATION I ..................................... Declare as the Award prize winner that all information I have provided for my winning claims are true and correct information of myself. I agree with the ONLAE GROUP LOTTO WINNINGS policy and regulation in line with my award claims. =========================================================================== Please indicate \"X\" for the option you want your prize remitted to you. Listed below is our payment modalities and option of payment. (1) TRAVELLING TO SPAIN FOR YOUR PRIZE COLLECTION:[.....] (2) BY COURIER DELIVERY OF YOUR PRIZE CHEQUE:[.....] (3) BY BANK TELEGRAPHIC TRANSFER[.....] ============================================================================ THIS EMAIL WAS SENT FROM THE DESK OF THE ORGANIZATION PRESIDENT ONLAE GROUP, ON BEHALF OF ONLAE LOTTO GAMES 2006.  Faithfully yours' Mrs. Laura flores


|
Computer Graphics Task 1
|
#include <game_object.h>
Public Member Functions | |
| GameObject (const std::string &name, bool mutability) | |
| GameObject (const GameObject &rhs)=default | |
| std::string | get_name () const |
| bool | is_mutable () const |
Protected Attributes | |
| Tile * | current_tile_ |
| GameObject::GameObject | ( | const std::string & | name, |
| bool | mutability | ||
| ) |
|
default |
| std::string GameObject::get_name | ( | ) | const |
| bool GameObject::is_mutable | ( | ) | const |
|
protected |


Reference
Quick reference guides:
Heroku Cheat Sheet
(PDF) |
Visual Git Cheat Sheet
(SVG | PNG)
Setup and Config
config
help
Getting and Creating Projects
init
clone
Basic Snapshotting
add
status
diff
commit
reset
rm
mv
Branching and Merging
branch
checkout
merge
mergetool
log
stash
tag
Sharing and Updating Projects
fetch
pull
push
remote
submodule
Inspection and Comparison
show
log
diff
shortlog
describe
Patching
diff
apply
cherry-pick
rebase
Debugging
bisect
blame
grep
Email
am
apply
format-patch
send-email
request-pull
External Systems
svn
fast-import
Administration
clean
gc
fsck
reflog
filter-branch
instaweb
archive
Server Admin
daemon
update-server-info
Plumbing Commands
cat-file
commit-tree
count-objects
diff-index
hash-object
merge-base
read-tree
rev-list
rev-parse
show-ref
symbolic-ref
update-index
update-ref
verify-pack
write-tree


Download the Windows installer here:
fe9a4eee2fe8839eb3b240f15a2af229a110e37f
After downloading:
Prior releases


I've been working whenever I can but it's slow going--the end of the semester they really pile on the work. I have barely had time to check my email let alone sit down and do real programming in the last two weeks even though I'm up every day from 8 am until midnight...so, to answer your question, there has been progress but until I dig myself out from under this pile of projects/problem sets/studying for finals/research presentation that I need to do, I probably won't be able to release anything new.
I can say, however, that my next update will allow you guys to start adding a LOT more content to the game. I've re-written almost all of the internal engine such that it takes all of its media information from external files--this means you can add see what your own models and textures look like directly in the game without submitting them to me, you can design your own walls, pits and fluids using any texture you want (want an acid bath? it takes two seconds to make one!) and you can create up to 18 completely custom palettes in the map editor that display those ground types and models.
The next update will be big, and I'm still very much working on this project. Stick around, PV is far from dead


Builtin Plugins
Builtin Plugins
A list of kustomize’s builtin plugins - both generators and transformers.
For each plugin, an example is given for
-
implicitly triggering the plugin via a dedicated kustomization file field (e.g. the
AnnotationsTransformer
is triggered by thecommonAnnotations
field). -
explicitly triggering the plugin via the
generators
ortransformers
field (by providing a config file specifying the plugin).
The former method is convenient but limited in power as most of the plugins arguments must be defaulted. The latter method allows for complete plugin argument specification.
AnnotationTransformer
Usage via kustomization.yaml
field name: commonAnnotations
Adds annotions (non-identifying metadata) to add all resources. Like labels, these are key value pairs.
commonAnnotations:
oncallPager:<PHONE_NUMBER>
Usage via plugin
Arguments
Annotations map[string]string
FieldSpecs []config.FieldSpec
Example
apiVersion: builtin kind: AnnotationsTransformer metadata: name: not-important-to-example annotations: app: myApp greeting/morning: a string with blanks fieldSpecs: - path: metadata/annotations create: true
ConfigMapGenerator
Usage via kustomization.yaml
field name: configMapGenerator
Each entry in this list results in the creation of one ConfigMap resource (it’s a generator of n maps).
The example below creates three ConfigMaps. One with the names and contents of
the given files, one with key/value as data, and a third which sets an
annotation and label via options
for that single ConfigMap.
Each configMapGenerator item accepts a parameter of
behavior: [create|replace|merge]
.
This allows an overlay to modify or
replace an existing configMap from the parent.
Also, each entry has an options
field, that has the
same subfields as the kustomization file’s generatorOptions
field.
This options
field allows one to add labels and/or
annotations to the generated instance, or to individually
disable the name suffix hash for that instance.
Labels and annotations added here will not be overwritten
by the global options associated with the kustomization
file generatorOptions
field. However, due to how
booleans behave, if the global generatorOptions
field
specifies disableNameSuffixHash: true
, this will
trump any attempt to locally override it.
# These labels are added to all configmaps and secrets.
generatorOptions:
labels:
fruit: apple
configMapGenerator:
- name: my-java-server-props
behavior: merge
files:
- application.properties
- more.properties
- name: my-java-server-env-vars
literals:
- JAVA_HOME=/opt/java/jdk
- JAVA_TOOL_OPTIONS=-agentlib:hprof
options:
disableNameSuffixHash: true
labels:
pet: dog
- name: dashboards
files:
- mydashboard.json
options:
annotations:
dashboard: "1"
labels:
app.kubernetes.io/name: "app1"
It is also possible to define a key to set a name different than the filename.
The example below creates a ConfigMap
with the name of file as myFileName.ini
while the actual filename from which the
configmap is created is whatever.ini
.
configMapGenerator:
- name: app-whatever
files:
- myFileName.ini=whatever.ini
Usage via plugin
Arguments
Example
apiVersion: builtin kind: ConfigMapGenerator metadata: name: mymap envs: - devops.env - uxteam.env literals: - FRUIT=apple - VEGETABLE=carrot
ImageTagTransformer
Usage via kustomization.yaml
field name: images
Images modify the name, tags and/or digest for images without creating patches. E.g. Given this kubernetes Deployment fragment:
containers:
- name: mypostgresdb
image: postgres:8
- name: nginxapp
image: nginx:1.7.9
- name: myapp
image: my-demo-app:latest
- name: alpine-app
image: alpine:3.7
one can change the image
in the following ways:
postgres:8
tomy-registry/my-postgres:v1
,- nginx tag
1.7.9
to1.8.0
, - image name
my-demo-app
tomy-app
, - alpine’s tag
3.7
to a digest value
all with the following kustomization:
images:
- name: postgres
newName: my-registry/my-postgres
newTag: v1
- name: nginx
newTag: 1.8.0
- name: my-demo-app
newName: my-app
- name: alpine
digest: sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d3
Usage via plugin
Arguments
ImageTag image.Image
FieldSpecs []config.FieldSpec
Example
apiVersion: builtin kind: ImageTagTransformer metadata: name: not-important-to-example imageTag: name: nginx newTag: v2
LabelTransformer
Usage via kustomization.yaml
field name: commonLabels
Adds labels to all resources and selectors
commonLabels:
someName: someValue
owner: alice
app: bingo
Usage via plugin
Arguments
Labels map[string]string
FieldSpecs []config.FieldSpec
Example
apiVersion: builtin kind: LabelTransformer metadata: name: not-important-to-example labels: app: myApp env: production fieldSpecs: - path: metadata/labels create: true
NamespaceTransformer
Usage via kustomization.yaml
field name: namespace
Adds namespace to all resources
namespace: my-namespace
Usage via plugin
Arguments
FieldSpecs []config.FieldSpec
Example
apiVersion: builtin kind: NamespaceTransformer metadata: name: not-important-to-example namespace: test fieldSpecs: - path: metadata/namespace create: true - path: subjects kind: RoleBinding group: rbac.authorization.k8s.io - path: subjects kind: ClusterRoleBinding group: rbac.authorization.k8s.io
PatchesJson6902
Usage via kustomization.yaml
field name: patchesJson6902
Each entry in this list should resolve to a kubernetes object and a JSON patch that will be applied to the object. The JSON patch is documented at https://tools.ietf.org/html/rfc6902
target field points to a kubernetes object within the same kustomization by the object’s group, version, kind, name and namespace. path field is a relative file path of a JSON patch file. The content in this patch file can be either in JSON format as
[
{"op": "add", "path": "/some/new/path", "value": "value"},
{"op": "replace", "path": "/some/existing/path", "value": "new value"}
]
or in YAML format as
- op: add
path: /some/new/path
value: value
- op: replace
path: /some/existing/path
value: new value
patchesJson6902:
- target:
version: v1
kind: Deployment
name: my-deployment
path: add_init_container.yaml
- target:
version: v1
kind: Service
name: my-service
path: add_service_annotation.yaml
The patch content can be an inline string as well:
patchesJson6902:
- target:
version: v1
kind: Deployment
name: my-deployment
patch: |-
- op: add
path: /some/new/path
value: value
- op: replace
path: /some/existing/path
value: "new value"
Usage via plugin
Arguments
Target types.PatchTarget
Path string
JsonOp string
Example
apiVersion: builtin kind: PatchJson6902Transformer metadata: name: not-important-to-example target: group: apps version: v1 kind: Deployment name: my-deploy path: jsonpatch.json
PatchesStrategicMerge
Usage via kustomization.yaml
field name: patchesStrategicMerge
Each entry in this list should be either a relative file path or an inline content resolving to a partial or complete resource definition.
The names in these (possibly partial) resource
files must match names already loaded via the
resources
field. These entries are used to
patch (modify) the known resources.
Small patches that do one thing are best, e.g. modify a memory request/limit, change an env var in a ConfigMap, etc. Small patches are easy to review and easy to mix together in overlays.
patchesStrategicMerge:
- service_port_8888.yaml
- deployment_increase_replicas.yaml
- deployment_increase_memory.yaml
The patch content can be a inline string as well.
patchesStrategicMerge:
- |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
template:
spec:
containers:
- name: nginx
image: nignx:latest
Note that kustomize does not support more than one patch for the same object that contain a delete directive. To remove several fields / slice elements from an object create a single patch that performs all the needed deletions.
Usage via plugin
Arguments
Paths []types.PatchStrategicMerge
Patches string
Example
apiVersion: builtin kind: PatchStrategicMergeTransformer metadata: name: not-important-to-example paths: - patch.yaml
PatchTransformer
Usage via kustomization.yaml
field name: patches
Each entry in this list should resolve to an Patch object, which includes a patch and a target selector. The patch can be either a strategic merge patch or a JSON patch. it can be either a patch file or an inline string. The target selects resources by group, version, kind, name, namespace, labelSelector and annotationSelector. A resource which matches all the specified fields is selected to apply the patch.
patches:
- path: patch.yaml
target:
group: apps
version: v1
kind: Deployment
name: deploy.*
labelSelector: "env=dev"
annotationSelector: "zone=west"
- patch: |-
- op: replace
path: /some/existing/path
value: new value
target:
kind: MyKind
labelSelector: "env=dev"
The name
and namespace
fields of the patch target selector are
automatically anchored regular expressions. This means that the value myapp
is equivalent to ^myapp$
.
Usage via plugin
Arguments
Path string
Patch string
Target *types.Selector
Example
apiVersion: builtin kind: PatchTransformer metadata: name: not-important-to-example patch: '[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value": "nginx:latest"}]' target: name: .*Deploy kind: Deployment
PrefixSuffixTransformer
Usage via kustomization.yaml
field names: namePrefix
, nameSuffix
Prepends or postfixes the value to the names of all resources.
E.g. a deployment named wordpress
could
become alices-wordpress
or wordpress-v2
or alices-wordpress-v2
.
namePrefix: alices-
nameSuffix: -v2
The suffix is appended before the content hash if the resource type is ConfigMap or Secret.
Usage via plugin
Arguments
Prefix string
Suffix string
FieldSpecs []config.FieldSpec
Example
apiVersion: builtin kind: PrefixSuffixTransformer metadata: name: not-important-to-example prefix: baked- suffix: -pie fieldSpecs: - path: metadata/name
ReplicaCountTransformer
Usage via kustomization.yaml
field name: replicas
Replicas modified the number of replicas for a resource.
E.g. Given this kubernetes Deployment fragment:
kind: Deployment
metadata:
name: deployment-name
spec:
replicas: 3
one can change the number of replicas to 5 by adding the following to your kustomization:
replicas:
- name: deployment-name
count: 5
This field accepts a list, so many resources can be modified at the same time.
As this declaration does not take in a kind:
nor a group:
it will match any group
and kind
that has a matching name and
that is one of:
Deployment
ReplicationController
ReplicaSet
StatefulSet
For more complex use cases, revert to using a patch.
Usage via plugin
Arguments
Replica types.Replica
FieldSpecs []config.FieldSpec
Example
apiVersion: builtin kind: ReplicaCountTransformer metadata: name: not-important-to-example replica: name: myapp count: 23 fieldSpecs: - path: spec/replicas create: true kind: Deployment - path: spec/replicas create: true kind: ReplicationController
SecretGenerator
Usage via kustomization.yaml
field name: secretGenerator
Each entry in the argument list results in the creation of one Secret resource (it’s a generator of n secrets).
This works like the configMapGenerator
field
described above.
secretGenerator:
- name: app-tls
files:
- secret/tls.cert
- secret/tls.key
type: "kubernetes.io/tls"
- name: app-tls-namespaced
# you can define a namespace to generate
# a secret in, defaults to: "default"
namespace: apps
files:
- tls.crt=catsecret/tls.cert
- tls.key=secret/tls.key
type: "kubernetes.io/tls"
- name: env_file_secret
envs:
- env.txt
type: Opaque
- name: secret-with-annotation
files:
- app-config.yaml
type: Opaque
options:
annotations:
app_config: "true"
labels:
app.kubernetes.io/name: "app2"
Usage via plugin
Arguments
Example
apiVersion: builtin kind: SecretGenerator metadata: name: my-secret namespace: whatever behavior: merge envs: - a.env - b.env files: - obscure=longsecret.txt literals: - FRUIT=apple - VEGETABLE=carrot


Use the border spinners for a lightweight loading indicator.
The border spinner uses currentColor
for its border-color
, meaning you can customize the color with text color utilities. You can use any of our text color utilities on the standard spinner.
 While it doesn’t technically spin, it does repeatedly grow!
Once again, this spinner is built with currentColor
, so you can easily change its appearance with text color utilities. Here it is in blue, along with the supported variants.
Spinners in Bootstrap are built with rem
s, currentColor
, and display: inline-flex
. This means they can easily be resized, recolored, and quickly aligned.
Use margin utilities like .m-5
for easy spacing.
Use flexbox utilities, float utilities, or text alignment utilities to place spinners exactly where you need them in any situation.
Add .spinner-border-sm
and .spinner-grow-sm
to make a smaller spinner that can quickly be used within other components.
Or, use custom CSS or inline styles to change the dimensions as needed.
Use spinners within buttons to indicate an action is currently processing or taking place. You may also swap the text out of the spinner element and utilize button text as needed.


The percentage in parenthesis tells how good the match is. Only matches that are better 50% (or exactly 50%) are listed.
Back


|
BTK
0.3dev.0
Open-source library to visualize/process biomechanical data
|
To display BTK data in VTK 5.8 or greater. More...
Classes | |
| class | btk::VTKAxesWidget |
| VTK widget displaying global axes orientation. More... | |
| class | btk::VTKChartExtraAcquisition |
| Display extra information on the chart (events, timebar, region of interest) More... | |
| class | btk::VTKChartLayout |
| Layout (vertical, horizontal, array) of VTKChartTimeSeries charts. More... | |
| class | btk::VTKChartTimeSeries |
| Chart for the time series data with only a bottom and left axes. More... | |
| class | btk::VTKDataObjectAdapter |
| Adapter to use a btk::DataObject in a VTK pipeline. More... | |
| class | btk::VTKForcePlatformsSource |
| Displays force platform geometries from a collection of btk::ForcePlatform object. More... | |
| class | btk::VTKFrustumFromTwoPoints |
| Frustum's generator from two points defining a rectangle. More... | |
| class | btk::VTKGRFsFramesSource |
| Display ground reaction forces (GRF). More... | |
| class | btk::VTKGroundSource |
| Displays ground based on the given orientation. More... | |
| class | btk::VTKMarkersFramesSource |
| Display markers with interactive possibilities as hide/show markers, modify colors or diameters. More... | |
| class | btk::VTKMarkersSource |
| Markers' generator. More... | |
| class | btk::VTKQtStringToImage |
| Text renderer inheriting from vtkQtStringToImage. More... | |
| class | btk::VTKSegmentsFramesSource |
| Display segments with interactive possibilities as hide/show segment, modify colors. More... | |
Functions | |
| void | btk::VTKPickerInteractionCallback (vtkObject *, unsigned long event, void *clientdata, void *) |
| void | btk::VTKRubberRenderInteractionCallback (vtkObject *, unsigned long, void *clientdata, void *) |
To display BTK data in VTK 5.8 or greater.
This modules corresponds to the library BTKVTK.
| void btk::VTKPickerInteractionCallback | ( | vtkObject * | , |
| unsigned long | event, | ||
| void * | clientdata, | ||
| void * | |||
| ) |
Add mouse picking to the interactor VTKInteractorStyleTrackballFixedUpCamera style. Multiple choices are available, by priority:
| void btk::VTKRubberRenderInteractionCallback | ( | vtkObject * | , |
| unsigned | long, | ||
| void * | clientdata, | ||
| void * | |||
| ) |
To update the rubber even if the scene is moving


Tasks to Do
- Complete mock-up for client website
Completed Tasks
- Clear email inbox
- Finalise requirements for client web design
- Begin work on mock-up for client website
Topics/Concepts to Revise
- HTML Elements
- HTML Form Validation
Topics/Concepts to Learn
- HTML 5.2 New Features
- Responsive Images (picture element, srcset/sizes etc.)
- Static Site Generators (Jekyll, Hugo, Gatsby etc.)
Useful Websites for Learning
- Code Academy
- CodePen
- Codrops
Web Dev YouTube Channels
CodePen Ideas
- Something cool with CSS Grid
Practise Website Ideas
- Airsoft/Paintballing Centre
JavaScript Project Ideas


|
Cassandra PHP Client Library
Cassandra PHP-based client library for managing and querying your Cassandra cluster.
|
Public Member Functions | |
| __construct (CassandraColumnFamily $columnFamily, cassandra_ColumnParent $columnParent, cassandra_SlicePredicate $slicePredicate, $startKey, $consistency, $rowCountLimit, $bufferSize) | |
| current () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
| getAll () | |
Protected Member Functions | |
| updateBuffer () | |
Protected Attributes | |
| $columnFamily | |
| $columnParent | |
| $slicePredicate | |
| $consistency | |
| $rowCountLimit | |
| $bufferSize | |
| $buffer | |
| $originalStartKey | |
| $nextStartKey | |
| $isValid | |
| $rowsSeen | |
| $expectedPageSize | |
| $currentPageSize |
Cassandra iterator used for indexed and key range queries where there may be more rows than is possible or reasonable to fetch in a single go so instead an iterator is returned that fetches the data in batches as the data is iterated.
This is an abstract class with implementations for indexed and range queries.
Definition at line 3176 of file Cassandra.php.
| CassandraDataIterator::__construct | ( | CassandraColumnFamily $ | columnFamily, |
| cassandra_ColumnParent $ | columnParent, | ||
| cassandra_SlicePredicate $ | slicePredicate, | ||
| $ | startKey, | ||
| $ | consistency, | ||
| $ | rowCountLimit, | ||
| $ | bufferSize | ||
| ) |
Sets the information needed to iterate the data in batches.
| CassandraColumnFamily | $columnFamily | Column family |
| cassandra_ColumnParent | $columnParent | Parent column |
| cassandra_SlicePredicate | $slicePredicate | Slice predicate |
| type | $startKey | Key to start fetching data from |
| type | $consistency | Consistency to use |
| type | $rowCountLimit | Maximum number or rows to fetch |
| type | $bufferSize | How many rows to fetch in a single request |
Definition at line 3282 of file Cassandra.php.
{
$this->columnFamily = $columnFamily;
$this->columnParent = $columnParent;
$this->slicePredicate = $slicePredicate;
$this->consistency = $consistency;
$this->rowCountLimit = $rowCountLimit;
$this->bufferSize = $bufferSize;
$this->originalStartKey = $startKey;
$this->nextStartKey = $startKey;
$this->buffer = null;
if ($rowCountLimit !== null) {
$this->bufferSize = min($rowCountLimit, $bufferSize);
}
}
| CassandraDataIterator::current | ( | ) |
Returns the current element in the array.
Definition at line 3311 of file Cassandra.php.
{ return current($this->buffer); }
| CassandraDataIterator::getAll | ( | ) |
Iterates over the whole matches data set and compiles the results into a single array.
Only use this if you are not expecting many thousand of lines as it can get slow and require lots of memory.
Definition at line 3427 of file Cassandra.php.
| CassandraDataIterator::key | ( | ) |
Returns the key of the array element that's currently being pointed to by the internal pointer.
If the internal pointer points beyond the end of the elements list or the array is empty, returns NULL.
Definition at line 3324 of file Cassandra.php.
{ return key($this->buffer); }
| CassandraDataIterator::next | ( | ) |
Advances the internal array pointer one place forward before returning the element value.
Definition at line 3334 of file Cassandra.php.
{ $value = null; $beyondLastRow = false; if (!empty($this->buffer)) { $this->nextStartKey = key($this->buffer); $value = next($this->buffer); if (count(current($this->buffer)) == 0) { $this->next(); } else { $key = key($this->buffer); if (isset($key)) { $this->rowsSeen++; if ( $this->rowCountLimit !== null && $this->rowsSeen > $this->rowCountLimit ) { $this->isValid = false; return null; } } else { $beyondLastRow = true; } } } else { $beyondLastRow = true; } if ($beyondLastRow) { if ($this->currentPageSize < $this->expectedPageSize) { $this->isValid = false; } else { $this->updateBuffer(); if (count($this->buffer) == 1) { $this->isValid = false; } else { $this->next(); } } } return $value; }
| CassandraDataIterator::rewind | ( | ) |
Rewinds the iterator internal pointer back to the beginning.
Definition at line 3389 of file Cassandra.php.
{ $this->rowsSeen = 0; $this->isValid = true; $this->nextStartKey = $this->originalStartKey; $this->updateBuffer(); if (count($this->buffer) == 0) { $this->isValid = false; return; } if (count(current($this->buffer)) == 0) { $this->next(); } else { $this->rowsSeen++; } }
| CassandraDataIterator::updateBuffer | ( | ) | [abstract, protected] |
Updates the internal buffer, fetching a new batch of data.
Reimplemented in CassandraIndexedDataIterator, and CassandraRangeDataIterator.
| CassandraDataIterator::valid | ( | ) |
Returns whether the iterator is still valid and has more data.
Definition at line 3414 of file Cassandra.php.
{
return $this->isValid;
}


97A, 2nd Avenu, Fontainebleau
<EMAIL_ADDRESS>+27 730 115 992
ABOUT US
HOW IT WORK
SECURITY
SITEMAP
QUOTES
NEWS
PRIVACY POLICY
TERMS & CONDITIONS
COPYRIGHT POLICY
CODE OF CONDUCT
FREES AND CHARGES


| Top |
| struct | GParamSpec |
| struct | GParamSpecClass |
| enum | GParamFlags |
| #define | G_PARAM_MASK |
| #define | G_PARAM_USER_SHIFT |
| struct | GParamSpecTypeInfo |
| GParamSpecPool |
GParamSpec is an object structure that encapsulates the metadata required to specify parameters, such as e.g. GObject properties.
#define G_TYPE_IS_PARAM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)
Checks whether type
"is a" G_TYPE_PARAM
.
#define G_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))
Casts a derived GParamSpec object (e.g. of type GParamSpecInt) into a GParamSpec object.
#define G_IS_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE ((pspec), G_TYPE_PARAM))
Checks whether pspec
"is a" valid GParamSpec structure of type G_TYPE_PARAM
or derived.
#define G_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))
Casts a derived GParamSpecClass structure into a GParamSpecClass structure.
#define G_IS_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))
Checks whether pclass
"is a" valid GParamSpecClass structure of type
G_TYPE_PARAM
or derived.
#define G_PARAM_SPEC_GET_CLASS(pspec) (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))
Retrieves the GParamSpecClass of a GParamSpec.
#define G_PARAM_SPEC_TYPE(pspec) (G_TYPE_FROM_INSTANCE (pspec))
Retrieves the GType of this pspec
.
#define G_PARAM_SPEC_TYPE_NAME(pspec) (g_type_name (G_PARAM_SPEC_TYPE (pspec)))
Retrieves the GType name of this pspec
.
#define G_PARAM_SPEC_VALUE_TYPE(pspec) (G_PARAM_SPEC (pspec)->value_type)
Retrieves the GType to initialize a GValue for this parameter.
#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
GParamFlags value alias for G_PARAM_STATIC_NAME
| G_PARAM_STATIC_NICK
| G_PARAM_STATIC_BLURB
.
Since 2.13.0
GParamSpec *
g_param_spec_ref (GParamSpec *pspec
);
Increments the reference count of pspec
.
void
g_param_spec_unref (GParamSpec *pspec
);
Decrements the reference count of a pspec
.
void
g_param_spec_sink (GParamSpec *pspec
);
The initial reference count of a newly created GParamSpec is 1,
even though no one has explicitly called g_param_spec_ref()
on it
yet. So the initial reference count is flagged as "floating", until
someone calls g_param_spec_ref (pspec); g_param_spec_sink
(pspec);
in sequence on it, taking over the initial
reference count (thus ending up with a pspec
that has a reference
count of 1 still, but is not flagged "floating" anymore).
GParamSpec *
g_param_spec_ref_sink (GParamSpec *pspec
);
Convenience function to ref and sink a GParamSpec.
Since 2.10
const GValue *
g_param_spec_get_default_value (GParamSpec *param
);
void g_param_value_set_default (GParamSpec *pspec
,GValue *value
);
Sets value
to its default value as specified in pspec
.
gboolean g_param_value_defaults (GParamSpec *pspec
,GValue *value
);
Checks whether value
contains the default value as specified in pspec
.
gboolean g_param_value_validate (GParamSpec *pspec
,GValue *value
);
Ensures that the contents of value
comply with the specifications
set out by pspec
. For example, a GParamSpecInt might require
that integers stored in value
may not be smaller than -42 and not be
greater than +42. If value
contains an integer outside of this range,
it is modified accordingly, so the resulting value will fit into the
range -42 .. +42.
gboolean g_param_value_convert (GParamSpec *pspec
,const GValue *src_value
,GValue *dest_value
,gboolean strict_validation
);
Transforms src_value
into dest_value
if possible, and then
validates dest_value
, in order for it to conform to pspec
. If
strict_validation
is TRUE
this function will only succeed if the
transformed dest_value
complied to pspec
without modifications.
See also g_value_type_transformable()
, g_value_transform()
and
g_param_value_validate()
.
pspec |
a valid GParamSpec |
|
src_value |
souce GValue |
|
dest_value |
destination GValue of correct type for |
|
strict_validation |
|
gint g_param_values_cmp (GParamSpec *pspec
,const GValue *value1
,const GValue *value2
);
Compares value1
with value2
according to pspec
, and return -1, 0 or +1,
if value1
is found to be less than, equal to or greater than value2
,
respectively.
pspec |
a valid GParamSpec |
|
value1 |
a GValue of correct type for |
|
value2 |
a GValue of correct type for |
const gchar *
g_param_spec_get_name (GParamSpec *pspec
);
Get the name of a GParamSpec.
The name is always an "interned" string (as per g_intern_string()
).
This allows for pointer-value comparisons.
const gchar *
g_param_spec_get_nick (GParamSpec *pspec
);
Get the nickname of a GParamSpec.
const gchar *
g_param_spec_get_blurb (GParamSpec *pspec
);
Get the short description of a GParamSpec.
gpointer g_param_spec_get_qdata (GParamSpec *pspec
,GQuark quark
);
Gets back user data pointers stored via g_param_spec_set_qdata()
.
void g_param_spec_set_qdata (GParamSpec *pspec
,GQuark quark
,gpointer data
);
Sets an opaque, named pointer on a GParamSpec. The name is
specified through a GQuark (retrieved e.g. via
g_quark_from_static_string()
), and the pointer can be gotten back
from the pspec
with g_param_spec_get_qdata()
. Setting a
previously set user data pointer, overrides (frees) the old pointer
set, using NULL
as pointer essentially removes the data stored.
pspec |
the GParamSpec to set store a user data pointer |
|
quark |
a GQuark, naming the user data pointer |
|
data |
an opaque user data pointer |
void g_param_spec_set_qdata_full (GParamSpec *pspec
,GQuark quark
,gpointer data
,GDestroyNotify destroy
);
This function works like g_param_spec_set_qdata()
, but in addition,
a void (*destroy) (gpointer)
function may be
specified which is called with data
as argument when the pspec
is
finalized, or the data is being overwritten by a call to
g_param_spec_set_qdata()
with the same quark
.
pspec |
the GParamSpec to set store a user data pointer |
|
quark |
a GQuark, naming the user data pointer |
|
data |
an opaque user data pointer |
|
destroy |
function to invoke with |
gpointer g_param_spec_steal_qdata (GParamSpec *pspec
,GQuark quark
);
Gets back user data pointers stored via g_param_spec_set_qdata()
and removes the data
from pspec
without invoking its destroy()
function (if any was set). Usually, calling this function is only
required to update user data pointers with a destroy notifier.
pspec |
the GParamSpec to get a stored user data pointer from |
|
quark |
a GQuark, naming the user data pointer |
GParamSpec *
g_param_spec_get_redirect_target (GParamSpec *pspec
);
If the paramspec redirects operations to another paramspec,
returns that paramspec. Redirect is used typically for
providing a new implementation of a property in a derived
type while preserving all the properties from the parent
type. Redirection is established by creating a property
of type GParamSpecOverride. See g_object_class_override_property()
for an example of the use of this capability.
paramspec to which requests on this
paramspec should be redirected, or NULL
if none.
[transfer none]
Since 2.4
gpointer g_param_spec_internal (GType param_type
,const gchar *name
,const gchar *nick
,const gchar *blurb
,GParamFlags flags
);
Creates a new GParamSpec instance.
A property name consists of segments consisting of ASCII letters and digits, separated by either the '-' or '_' character. The first character of a property name must be a letter. Names which violate these rules lead to undefined behaviour.
When creating and looking up a GParamSpec, either separator can be used, but they cannot be mixed. Using '-' is considerably more efficient and in fact required when using property names as detail strings for signals.
Beyond the name, GParamSpecs have two more descriptive
strings associated with them, the nick
, which should be suitable
for use as a label for the property in a property editor, and the
blurb
, which should be a somewhat longer description, suitable for
e.g. a tooltip. The nick
and blurb
should ideally be localized.
param_type |
the GType for the property; must be derived from G_TYPE_PARAM |
|
name |
the canonical name of the property |
|
nick |
the nickname of the property |
|
blurb |
a short description of the property |
|
flags |
a combination of GParamFlags |
GType g_param_type_register_static (const gchar *name
,const GParamSpecTypeInfo *pspec_info
);
Registers name
as the name of a new static type derived from
G_TYPE_PARAM. The type system uses the information contained in
the GParamSpecTypeInfo structure pointed to by info
to manage the
GParamSpec type and its instances.
name |
0-terminated string used as the name of the new GParamSpec type. |
|
pspec_info |
The GParamSpecTypeInfo for this GParamSpec type. |
GParamSpecPool *
g_param_spec_pool_new (gboolean type_prefixing
);
Creates a new GParamSpecPool.
If type_prefixing
is TRUE
, lookups in the newly created pool will
allow to specify the owner as a colon-separated prefix of the
property name, like "GtkContainer:border-width". This feature is
deprecated, so you should always set type_prefixing
to FALSE
.
void g_param_spec_pool_insert (GParamSpecPool *pool
,GParamSpec *pspec
,GType owner_type
);
Inserts a GParamSpec in the pool.
void g_param_spec_pool_remove (GParamSpecPool *pool
,GParamSpec *pspec
);
Removes a GParamSpec from the pool.
GParamSpec * g_param_spec_pool_lookup (GParamSpecPool *pool
,const gchar *param_name
,GType owner_type
,gboolean walk_ancestors
);
Looks up a GParamSpec in the pool.
pool |
||
param_name |
the name to look for |
|
owner_type |
the owner to look for |
|
walk_ancestors |
If |
GParamSpec ** g_param_spec_pool_list (GParamSpecPool *pool
,GType owner_type
,guint *n_pspecs_p
);
Gets an array of all GParamSpecs owned by owner_type
in
the pool.
pool |
||
owner_type |
the owner to look for |
|
n_pspecs_p |
return location for the length of the returned array. |
[out] |
a newly
allocated array containing pointers to all GParamSpecs
owned by owner_type
in the pool.
[array length=n_pspecs_p][transfer container]
GList * g_param_spec_pool_list_owned (GParamSpecPool *pool
,GType owner_type
);
Gets an GList of all GParamSpecs owned by owner_type
in
the pool.
a
GList of all GParamSpecs owned by owner_type
in
the poolGParamSpecs.
[transfer container][element-type GObject.ParamSpec]
struct GParamSpec { GTypeInstance g_type_instance; const gchar *name; /* interned string */ GParamFlags flags; GType value_type; GType owner_type; /* class or interface using this property */ };
All other fields of the GParamSpec struct are private and should not be used directly.
GTypeInstance |
private GTypeInstance portion |
|
const gchar * |
name of this parameter: always an interned string |
|
GParamFlags |
GParamFlags flags for this parameter |
|
GType |
the GValue type for this parameter |
|
GType |
GType type that uses (introduces) this parameter |
struct GParamSpecClass { GTypeClass g_type_class; GType value_type; void (*finalize) (GParamSpec *pspec); /* GParam methods */ void (*value_set_default) (GParamSpec *pspec, GValue *value); gboolean (*value_validate) (GParamSpec *pspec, GValue *value); gint (*values_cmp) (GParamSpec *pspec, const GValue *value1, const GValue *value2); };
The class structure for the GParamSpec type.
Normally, GParamSpec classes are filled by
g_param_type_register_static()
.
GTypeClass |
the parent class |
|
GType |
the GValue type for this parameter |
|
The instance finalization function (optional), should chain up to the finalize method of the parent class. |
||
Resets a |
||
Ensures that the contents of |
||
Compares |
Through the GParamFlags flag values, certain aspects of parameters can be configured. See also G_PARAM_READWRITE and G_PARAM_STATIC_STRINGS.
|
the parameter is readable |
||
|
the parameter is writable |
||
|
alias for |
||
|
the parameter will be set upon object construction |
||
|
the parameter will only be set upon object construction |
||
|
upon parameter conversion (see |
||
|
the string used as name when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8 |
||
|
internal |
||
|
the string used as nick when constructing the parameter is guaranteed to remain valid and unmmodified for the lifetime of the parameter. Since 2.8 |
||
|
the string used as blurb when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8 |
||
|
calls to |
||
|
the parameter is deprecated and will be removed in a future version. A warning will be generated if it is used while running with G_ENABLE_DIAGNOSTIC=1. Since 2.26 |
#define G_PARAM_MASK (0x000000ff)
Mask containing the bits of GParamSpec.flags which are reserved for GLib.
#define G_PARAM_USER_SHIFT (8)
Minimum shift count to be used for user defined flags, to be stored in GParamSpec.flags. The maximum allowed is 10.
struct GParamSpecTypeInfo { /* type system portion */ guint16 instance_size; /* obligatory */ guint16 n_preallocs; /* optional */ void (*instance_init) (GParamSpec *pspec); /* optional */ /* class portion */ GType value_type; /* obligatory */ void (*finalize) (GParamSpec *pspec); /* optional */ void (*value_set_default) (GParamSpec *pspec, /* recommended */ GValue *value); gboolean (*value_validate) (GParamSpec *pspec, /* optional */ GValue *value); gint (*values_cmp) (GParamSpec *pspec, /* recommended */ const GValue *value1, const GValue *value2); };
This structure is used to provide the type system with the information
required to initialize and destruct (finalize) a parameter's class and
instances thereof.
The initialized structure is passed to the g_param_type_register_static()
The type system will perform a deep copy of this structure, so its memory
does not need to be persistent across invocation of
g_param_type_register_static()
.
guint16 |
Size of the instance (object) structure. |
|
guint16 |
Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the slice allocator now. |
|
Location of the instance initialization function (optional). |
||
GType |
The GType of values conforming to this GParamSpec |
|
The instance finalization function (optional). |
||
Resets a |
||
Ensures that the contents of |
||
Compares |
typedef struct _GParamSpecPool GParamSpecPool;
A GParamSpecPool maintains a collection of GParamSpecs which can be quickly accessed by owner and name. The implementation of the GObject property system uses such a pool to store the GParamSpecs of the properties all object types.
g_object_class_install_property(), g_object_set()
,
g_object_get()
, g_object_set_property()
, g_object_get_property()
,
g_value_register_transform_func()


Gryffyn
on 2012-07-08 19:48:34
A couple people mentioned the .toFixed(precision) but I overlooked them because they didn't mention the specific problem I was having (or at least not with the keywords I was searching the page for).
Basically I wanted to display money values in a way that was consistent with how we usually write money values.
With the round() function as it is today, 1.10 would return 1.1 even with precision of 2.
I ended up not using the rounding function since I didn't need precision, just wanted to truncate after the second decimal but always show two decimals (which wasn't working when it had a zero on the end).
If you're starting with a string, you can either do this:
var fixed = new Number(somestring);
alert(fixed.toFixed(2));
Or you can do:
var fixed = parseFloat(somestring);
alert(fixed.toFixed(2));
Again, this was mostly mentioned but not in the context of money (dollar, etc) values and trailing zeros.
Michael Pivonka
on 2012-04-04 12:07:20
190000000 gives out 189999999.99999997
and
200000000 gives out 199999999.99999988
max4ever
on 2011-10-11 18:14:53
this one is tiny and works (doesn't support the php_round_... variables though) http://stackoverflow.com/questions/6437062/javascript-vs-php-rounding/6438281#6438281
Mickey
on 2011-03-29 17:53:26
Just realized that I "killed" the function for integers.
if(String(value).lastIndexOf(".") < 0) {
value *= m;
} else {
// my posted code
}
:)
Mickey
on 2011-03-29 17:36:28
Hello!
Thank you for this. But... I found some examples where this gives inaccurate results:
round(162.295, 2); //gives 162.29
round(613.305, 2); //gives 613.3
The problem is multiplying by power of ten gives:
162.295 * 100; //gives 16229.499999999998
There is one more, but the result is OK:
162.395 * 100; //gives 16239.500000000002
I changed (line 33):
value *= m;
with this:
var stringValue = String(value);
var newDecimalPlace = stringValue.lastIndexOf(".") + precision;
stringValue = stringValue.replace(".", "");
if (newDecimalPlace < 0) {
var tempStringValue = "0.";
for (var i = newDecimalPlace; i < 0; i++) {
tempStringValue += "0";
}
value = Number(tempStringValue + stringValue);
} else {
value = Number(stringValue.substr(0, newDecimalPlace) + "." + stringValue.substr(newDecimalPlace));
}
Basically I multiply by power of 10 by moving the "." in the number converted to a string. If "precision" is negative - pad the number with "0." and needed number of zeros, otherwise - place the "." in new place.
It works for examples I found.
Thanks.
Josep Sanz
on 2010-09-10 16:15:40
I update the php.js library to the lastest version and the round function work as expected.
Thanks Rafał Kukawski.
Josep.
Kevin van Zonneveld
on 2010-09-08 19:41:46
@ Josep Sanz: Rafał Kukawski has fixed your issue!
@ Rafał Kukawski: Thanks, this one is much better. All current tests (found in the example comment blocks) pass!
https://github.com/kvz/phpjs/commit/9d563a56bcc28c290a6148ffcbd37e3052cee523
PS
If you'd like commit access to our github repository, drop me a line<EMAIL_ADDRESS>Rafa? Kukawski
on 2010-09-04 10:11:14
BTW. while doing basic tests I compared the results with PHP 5.3.1.
Rafa? Kukawski
on 2010-09-04 10:06:51
Didn't test it much, but this is my implementation of the function.
function round(value, precision, mode){
var m, f, isHalf, sgn; // helper variables
precision |= 0; // making sure precision is integer
m = Math.pow(10, precision);
value *= m;
sgn = (value>0)|-(value<0); // sign of the number
isHalf = value % 1 === 0.5 * sgn;
f = Math.floor(value);
if(isHalf){
switch(mode){
case 'PHP_ROUND_HALF_DOWN':
value = f + (sgn < 0); // rounds .5 toward zero
break;
case 'PHP_ROUND_HALF_EVEN':
value = f + (f % 2 * sgn); // rouds .5 towards the next even integer
break;
case 'PHP_ROUND_HALF_ODD':
value = f + !(f % 2); // rounds .5 towards the next odd integer
break;
default:
value = f + (sgn > 0); // rounds .5 away from zero
}
}
return (isHalf ? value : Math.round(value)) / m;
}
I'll try to prepare some unit tests today and test this function.
Josep Sanz
on 2010-09-02 12:22:23
Hi PHPJS team.
I detect an error:
round(58551.799999999996,2)
returns 58551.799999999996
If I change the precision to 1 or 3, work as expected
Thanks.
Brett Zamir
on 2010-04-20 11:20:10
@gaurav: Please try with the latest version at http://github.com/kvz/phpjs/raw/master/functions/math/round.js and see if that works as we made a fix here recently...
gaurav
on 2010-04-20 07:51:44
this function rounds "1236.0000000000002" to 123.12.
how shall I solve this problem.
Brett Zamir
on 2010-04-03 08:03:54
@William: What's missing is a digit, and I don't mean a finger or a toe... The code had problems when the first digit was 0 or when the number to be rounded up was 9, now fixed in Git; see http://github.com/kvz/phpjs/raw/master/functions/math/round.js . Nice test, btw... and thanks! :)
William
on 2010-04-02 21:13:31
round(179.06) = 17?
What am I missing here?
while (mynum < 300)
{
mynum += Math.random();
if (round(mynum) != Math.round(mynum))
document.getElementsByTagName('body')[0].innerHTML += '<br>'+mynum+' '+round(mynum)+' '+Math.round(mynum);
}
Brett Zamir
on 2010-01-09 13:43:33
@kadimi: Thank you for offering your shorter version. Since we're offering the full PHP API (with all three arguments), more was necessary... If you can reimplement in a shorter form than ours and still fully support all 3 arguments (without adding processing), we'd be all for it...In any case, maybe your version will be of interest to others who don't care about the full API...
kadimi
on 2010-01-09 10:19:43
My tiny version... lol
function round_float(x,n){
if(arguments.length < 2 || !parseInt(n))
var n=0;
if(!parseFloat(x))
return false;
return Math.round(x*Math.pow(10,n))/Math.pow(10,n);
}
Kevin van Zonneveld
on 2009-12-14 16:19:15
@ meo: I've added testcases to confirm your issue:
http://github.com/kvz/phpjs/commit/c8dda288ef6f4e1a5c803c7e7338e460a6ca006e
Try with
1.1749999999999 // 13 digits
and php still gives the correct
1.17
Try with
1.17499999999999 // 14 digits
and php gives the 'incorrect'
1.18
Both on my 32 bits as my 64 bits system, PHP messes it up and turns the last number into 1.18.
So it looks like PHP is simplifying the number as it gets 14 decimal digits. I checked here http://php.net/manual/en/language.types.float.php and my suspicion was confirmed: "The size of a float is platform-dependent, although a maximum of ~1.8e308 with a precision of roughly 14 decimal digits is a common value (the 64 bit IEEE format)."
So even though this is a gray array, we may need to consider to break round on purpose, just to make it complient with PHP.
Thoughts?
meo
on 2009-11-09 12:32:41
Correction! For on step rounding like before it works, but for the following.
round(1.1749999999999998, 2);
returns 1.18 on php and 1.17 on JavaScript. Sorry about the previous post.
meo
on 2009-11-09 10:24:55
when I round:
round(0.175, 2);
I get 0.17 instead of 0.18 in php round, what could be wrong?
meo
on 2009-11-09 10:20:28
when I round round(0.175, 2); I get 0.17 instead of 0.178 in php round, what could be wrong?
Kevin van Zonneveld
on 2009-08-04 11:35:08
@ T.Wild: Great job!
(for the record: I like http://phpjs.org/functions/pathinfo:486 's way of handling constant arguments best)
Brett Zamir
on 2009-07-29 02:39:38
@T. Wild: I've added your changes, with some whitespace clean-up, capitalization changes (initial-capitalized generally represent constructors, while full-capitalized generally represent constants), and removed the comment about the constant values being unknown, since you had the correct numeric values per the PHP source
@Kevin: It looks ready to be applied the next time we update.
T.Wild
on 2009-07-28 20:13:23
O.K, re-written version of my round function, I really should learn how to test better and actually double check returned values :) anyway, this version appears to work and implements round half up, half down, half even and half odd.
I removed ceiling, floor, up and down since their not mentioned in the PHP manual.
any further suggestions are welcome.
function round (val, precision, mode) {
// http://kevin.vanzonneveld.net
// + original by: Philip Peterson
// + revised by: Onno Marsman
// + input by: Greenseed
// + revised by: T.Wild
// % note 1: Great work. Ideas for improvement:
// % note 1: - code more compliant with developer guidelines
// % note 1: - for implementing PHP constant arguments look at
// % note 1: the pathinfo() function, it offers the greatest
// % note 1: flexibility & compatibility possible
// * example 1: round(1241757, -3);
// * returns 1: 1242000
// * example 2: round(3.6);
// * returns 2: 4
// * example 3: round(2.835,2);
// * returns 3: 2.84
/*Declare Variables
* Retval - temporay holder of the value to be returned
* V - String representation of val
* integer - Integer portion of val
* decimal - decimal portion of val
* decp - characterindex of . [decimal point] inV
* negative- was val a negative value?
*
* ROUND_HALF_OE - Rounding function for ROUND_HALF_ODD and ROUND_HALF_EVEN
* ROUND_HALF_UD - Rounding function for ROUND_HALF_UP and ROUND_HALF_DOWN
* ROUND_HALF - Primary function for round half rounding modes
*/
var RetVal=0,V='',integer='',decimal='',decp=0,negative=false;
var ROUND_HALF_OE = function(DtR,DtLa,even){
if(even === true){
if(DtLa == 50){
if((DtR % 2) === 1){
if(DtLa >= 5){
DtR+=1;
}else{
DtR-=1;
}
}
}else if(DtLa >= 5){
DtR+=1;
}
}else{
if(DtLa == 5){
if((DtR % 2) === 0){
if(DtLa >= 5){
DtR+=1;
}else{
DtR-=1;
}
}
}else if(DtLa >= 5){
DtR+=1;
}
}
return DtR;
};
var ROUND_HALF_UD = function(DtR,DtLa,up){
if(up === true){
if(DtLa>=5){
DtR+=1;
}
}else{
if(DtLa>5){
DtR+=1;
}
}
return DtR;
};
var ROUND_HALF = function(Val,Decplaces,mode){
/*Declare variables
*V - string representation of Val
*Vlen - The length of V - used only when rounding intgerers
*VlenDif - The difference between the lengths of the original V
* and the V after being truncated
*decp - character in index of . [decimal place] in V
*integer - Integr protion of Val
*decimal - Decimal portion of Val
*DigitToRound - The digit to round
*DigitToLookAt- The digit to comapre when rounding
*
*round - A function to do the rounding
*/
var V = Val.toString(),Vlen=0,VlenDif=0;
var decp = V.indexOf('.');
var DigitToRound = 0,DigitToLookAt = 0;
var integer='',decimal='';
var round = null,bool=false;
switch(mode){
case 'up':
bool = true;
case 'down':
round = ROUND_HALF_UD;
break;
case 'even':
bool = true;
case 'odd':
round = ROUND_HALF_OE;
break;
}
if (Decplaces < 0){ //Int round
Vlen=V.length;
Decplaces = Vlen + Decplaces;
DigitToLookAt = Number(V.charAt(Decplaces));
DigitToRound = Number(V.charAt(Decplaces-1));
DigitToRound = round(DigitToRound,DigitToLookAt,bool);
V = V.slice(0,Decplaces-1);
VlenDif = Vlen-V.length-1;
if (DigitToRound == 10){
V = String(Number(V)+1)+"0";
}else{
V+=DigitToRound;
}
V = Number(V)*(Math.pow(10,VlenDif));
}else if(Decplaces > 0){
integer=V.slice(0,decp);
decimal=V.slice(decp+1);
DigitToLookAt = Number(decimal.charAt(Decplaces));
DigitToRound = Number(decimal.charAt(Decplaces-1));
DigitToRound = round(DigitToRound,DigitToLookAt,bool);
decimal=decimal.slice(0,Decplaces-1);
if(DigitToRound==10){
V=Number(integer+'.'+decimal)+(1*(Math.pow(10,(0-decimal.length))));
}else{
V=Number(integer+'.'+decimal+DigitToRound);
}
}else{
integer=V.slice(0,decp);
decimal=V.slice(decp+1);
DigitToLookAt = Number(decimal.charAt(Decplaces));
DigitToRound = Number(integer.charAt(integer.length-1));
DigitToRound = round(DigitToRound,DigitToLookAt,bool);
decimal='0';
integer = integer.slice(0,integer.length-1);
if(DigitToRound==10){
V=Number(integer)+1;
}else{
V=Number(integer+DigitToRound);
}
}
return V;
};
//precision optional - defaults 0
if (typeof precision == 'undefined') {
precision = 0;
}
//mode optional - defaults round half up
if (typeof mode == 'undefined') {
mode = 'PHP_ROUND_HALF_UP';
}
if (val < 0){ //Remember if val is negative
negative = true;
}else{
negative = false;
}
V = Math.abs(val).toString(); //Take a string representation of val
decp = V.indexOf('.'); //And locate the decimal point
if ((decp == -1) && (precision >=0)){
/* If there is no deciaml point and the precision is greater than 0
* there is no need to round, return val
*/
return val;
}else{
if (decp == -1){
//There are no decimals so intger=V and decimal=0
integer = V;
decimal = '0';
}else{
//Otherwise we have to split the decimals from the integer
integer = V.slice(0,decp);
if(precision >= 0){
//If the precision is greater than 0 then split the decimals from the integer
//We truncate the decimals to a number of places equal to the precision requested+1
decimal = V.substr(decp+1,precision+1);
}else{
//If the precision is less than 0 ignore the decimals - set to 0
decimal = '0';
}
}
if ((precision > 0) && (precision >= decimal.length)){
/*If the precision requested is more decimal places than already exist
*there is no need to round - return val
*/
return val;
}else if ((precision < 0) && (Math.abs(precision) >= integer.length)){
/*If the precison is less than 0, and is greater than than the
*number of digits in integer, return 0 - mimics PHP
*/
return 0;
}
val = Number(integer+'.'+decimal); //After sanitizing recreate val,
}
//Call approriate function based on passed mode, fall through for integer constants
//INTEGER VALUES MAY NOT BE CORRECT, UNABLE TO VERIFY WITHOUT PHP 5.3//
switch (mode){
case 0:
case 'PHP_ROUND_HALF_UP':
RetVal = ROUND_HALF(val,precision,'up');
break;
case 1:
case 'PHP_ROUND_HALF_DOWN':
RetVal = ROUND_HALF(val, precision,'down');
break;
case 2:
case 'PHP_ROUND_HALF_EVEN':
RetVal = ROUND_HALF(val,precision,'even');
break;
case 3:
case 'PHP_ROUND_HALF_ODD':
RetVal = ROUND_HALF(val,precision,'odd');
break;
}
if(negative){
return 0-RetVal;
}else{
return RetVal;
}
}
Kevin van Zonneveld
on 2009-07-14 12:39:04
ohyeah:
@ Greenseed: Thanks for helping us out!
@ T. Wild: PS, you can have a look at the source here:
http://trac.plutonia.nl/projects/phpjs/browser/trunk/functions/math/round.js
I'll actually deploy it to the site when all test-cases pass.
Kevin van Zonneveld
on 2009-07-14 12:37:24
@ T.Wild: Thanks a lot for really going out of your way to make this solid! I added Greenseed's testcase and it passes. The first function example currently fails though, you may want to look at that if you feel like it. Other than that: Great stuff T. Wild! Awesome.
T.Wild
on 2009-07-12 01:26:20
A slight oversight on my part,
you'll need to add
if(typeof precision == 'undefined'){precision = 0;}
to the line before
decp = V.indexOf('.');
to account for a precision not being past to the function.
T.Wild
on 2009-07-12 01:15:54
A round implementation with support for:
PHP_ROUND_UP, PHP_ROUND_DOWN, PHP_ROUND_HALF_UP, PHP_ROUND_HALF_DOWN, PHP_ROUND_FLOOR, PHP_ROUND_CEILING
using http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak05380_.htm as reference,
It's not pretty but as far as I can tell it works, passes the tests I've thrown at it anyway :)
**can't fully test, don't have PHP 5.3 yet**
The only reason I haven't implemented PHP_ROUND_HALF_EVEN is the example I have to work on only uses 1 dp with a precision of 0, so I don't know what it's meant to do if there are multiple dps.
function round( val, precision, mode ) {
var V = val.toString(),integer,decimal,reint = false,decp,d1,d2,pow=0; //Define variables.
decp = V.indexOf('.'); //Find index of decimal place
if (decp == -1){ //If there is no decimal place we are most likely dealing with an integer
/*---ROUNDING AN INTEGER---
* If the precision is 0 then we don't need to round
* otherwise turn the integer into a decimal E.G
* 100 becomes 0.1
* 2143 becomes 0.2143
* take the modulus of the precision and then round the decimal
* we turn it back into an intgeger at the end
*/
if (precision === 0){
return val;
}else{
pow = V.length; //Rember how many powers of ten we need to turn the decimal back to an integer
V = '0.'+V;
precision = Math.abs(precision);
reint = true; //Remeber to change it back
decp = 1;
}
}else if(precision < 0){
/*
* Deling with decimal already, but still want to round an intgeger
* So truncate V and then do the same as above.
*/
integer = V.slice(0,decp);
pow = integer.length;
V = '0.'+integer;
precision = Math.abs(precision);
reint = true;
decp = 1;
}
/*
* Split the integer and decimal parts of the number
*/
integer = V.slice(0,decp);
decimal = V.slice(decp+1);
/** d1 = decimal before the subject decimal **/
if (decimal.length <= precision){
//If the precision is less or equal to the number of decimals then we don't need to round
return val;
}else if(precision === 0){
/**
* Special handling of precision = 0
* In this case the number before the subject decimal is the last digit of integer
* not part of the `decimal` variable
*/
d1 = Number(integer.charAt(integer.length-1));
integer = integer.slice(0,integer.length-1);//Remove the last digit of integer
}else{
d1 = Number(decimal.charAt(precision-1));
}
/** d2 = the subject decimal **/
d2 = Number(decimal.charAt(precision));
decimal = decimal.slice(0,precision-1); //remove last digit of decimal
if (mode=='ROUND_CEILING'){
if (val > 0){
mode = 'PHP_ROUND_UP';
}else{
mode = 'PHP_ROUND_DOWN';
}
}else if(mode=='ROUND_FLOOR'){
if (val > 0){
mode = 'PHP_ROUND_DOWN';
}else{
mode = 'PHP_ROUND_UP';
}
}
switch (mode){
case 'PHP_ROUND_UP': //Always round up
d1+=1;
break;
case 'PHP_ROUND_HALF_DOWN': //If subject decimal is more than 5 then round up
if (d2 > 5){
d1+=1;
}
break;
default: //If the subject decimal is 5 or more, then round up
//ROUND_HALF_UP
if (d2 >= 5){
d1+=1;
}
break;
}
if(precision === 0){
/*
* Again, special handling for precision 0
* if the round has made a value of 10, then add 1 to the integer and set d1 to 0
* this works because of the way I concatinate them
*/
if (d1 == 10){
integer+=1;
d1 = '0';
}
val=Number(integer+d1);
}else{
if (d1 == 10){
/*
* intger = 1
* decimal = 0.555
* Number(integr+'.'+decimal) = 1.555
* (0-decimal.length) = -3
* 1*(10^-3) = 0.001
* Number(integr+'.'+decimal)+0.001 = 1.556
*/
val = Number(integer+'.'+decimal)+(1*(Math.pow(10,(0-decimal.length))));
}else{
/*
* otherwsie just re-concatinate the numbers
*/
val = Number(integer+'.'+decimal+d1);
}
}
if (reint){
return val*Math.pow(10,pow);
}else{
return val;
}
}
T.Wild
on 2009-07-11 20:58:29
GreenSeed is right, And a test of all 3 digit decimals between 0 and 1 match the PHP value,
A (working) fixed version, not messing with the prototypes:
function round ( val, precision, mode ) {
// Returns the number rounded to specified precision
//
// version: 904.2314
// discuss at: http://phpjs.org/functions/round
// + original by: Philip Peterson
// + revised by: Onno Marsman
// * example 1: round(1241757, -3);
// * returns 1: 1242000
// * example 2: round(3.6);
// * returns 2: 4
// Need to support mode flags: PHP_ROUND_HALF_UP, PHP_ROUND_HALF_DOWN, PHP_ROUND_HALF_EVEN, or PHP_ROUND_HALF_ODD
precision2 = Math.pow(10,precision);
return Math.round(val*precision2)/precision2;
}
Greenseed
on 2009-07-11 05:24:56
Sorry for last code, was showing what i meaned but wrong :)
here is the working and tested solution.
Number.prototype.round = function(precision)
{
precision2 = Math.pow(10,precision);
return Math.round(this*precision2)/precision2;
};
But see this page , into the very bottom , about JS way of storing number
Greenseed
on 2009-07-11 04:29:07
The round funtion will not gave same answer as Php.
PHP:
round(2.835,2) == 2.84
PHP.JS
round(2.835,2) == 2.83
Code i had to add for making it correctely
Number.prototype.round = function(precision)
{
var diff = this - this.toFixed(precision);
return parseFloat( (this+diff).toFixed(precision) );
}
I did not test it very much , but with the value i show seem to work better , so see this as a proof of concept
Kevin van Zonneveld
on 2008-09-24 09:37:13
@ Onno Marsman: works just fine, I've revised it. Muchos! ;)
Onno Marsman
on 2008-09-23 17:25:03
Better than my previous suggestion:
function round (val, precision) {
return parseFloat(parseFloat(val).toFixed(precision));
}
Onno Marsman
on 2008-09-22 15:44:54
How about the following?
function round (val, precision) {
return parseFloat(val).toFixed(precision);
}
I've checked for a call without precision, it also works fine.


ALSET
Home
(current)
Coins
Jobs
Coins
Equity: 120142120
Equity: 120142120
Buy
RM
Buy
Sell
Coins
Sell


Nine sunscreens fail protection tests
gettyimages-1160172778.jpg
The Cancer Society is being asked to recall all batches of one of its sunblocks because it doesn't give people the protection claimed on the label.
The Everyday Sun Lotion SPF50+ is one of nine different brands which fell short in the latest round of testing by Consumer NZ, which covered 20 products.
Consumer NZ chief executive Sue Chetwin said the Cancer Society sunblock was tested at two different labs and scored a maximum sun protection factor of 30.
"As a result of our findings, the Cancer Society said it's withdrawing the batch of the product we tested. However, given the reports we have from two separate labs showing the sunscreen doesn't measure up to its claimed performance we've asked it to recall all batches of this product," Ms Chetwin said.
The Cancer Society's chief executive, Mike Kernaghan, said in a statement it had its sunscreen range "independently tested at an FDA-approved, ISO registered laboratory this year. The results show all products exceed their SPF claims. However, for the product batch being withdrawn (Everyday Very High Protection Sun Lotion SPF50+ with Expiry Oct 2021), Consumer NZ's results were significantly different.
"We would have preferred to retest the batch to prove its effectiveness, however that would take eight weeks so we've made the call to voluntarily withdraw the batch from retailers now."
The company remained "100 percent confident in the effectiveness of our sunscreen products", Mr Kernaghan said.
"I would like to reassure the public there is no health risk, because even at the lower level of SPF30 that batch still provides high protection."
Other sunscreens that failed to stand up their SPF50 claim were Sunsense Ultra, Banana Boat Dry Balance and Marine Blue Australia Dry Touch, with protection scores ranging from 20 to 26.
Five other products also fell short of their claims, but still had high protection from SPF 30 to 50.
Ms Chetwin said several companies, including the Cancer Society and Sunsense, had tested their products at AMA Laboratories, a sunscreen-testing facility in the US.
"In August 2019, the US Food and Drug Administration announced AMA's owner had been charged with, and some staff had pleaded guilty to, falsifying test results from 1987 to April 2017," she said.
"For many years, sunscreen companies have been sending us test results from AMA that conflicted with our tests. We think companies relying on these results should urgently re-test at a different lab to ensure they can back up claims."
Ms Chetwin said the government needed to urgently regulate sunscreens.
"New Zealand has one of the highest rates of skin cancer and melanoma in the world but the sunscreen standard remains voluntary."
In April, Consumer NZ made a submission to the Ministry of Health supporting sunscreens being required to comply with the Australian New Zealand standard.
Consumer NZ sunscreen tests (prices per 100g):
Did NOT meet SPF claims on label
Hawaiian Tropic Silk Hydration Sunscreen Lotion SPF50+ A Touch of Mango and Papaya, $12.22 (48.68SPF)
Invisible Zinc Face + Body Mineral Sunscreen SPF50, $19.99 (46.48SPF)
Natio Suncare Moisturising Sun Lotion SPF50+, $10.50 (38.78SPF)
Frankie Apothecary Natural Sunscreen + Kawakawa and Antioxidant SPF50, $41.63 (38.42SPF)
MooGoo Natural Sunscreen SPF40, $19.58 (38.42SPF)
Cancer Society Everyday Sun Lotion SPF50+, $12.48 (30.6SPF)
Marine Blue Australia Dry Touch Sunscreen Lotion SPF50+, $9.99 (26.4SPF)
Sunsense Ultra SPF50+, $15.50 (25.82SPF)
Banana Boat Dry Balance Sunscreen Lotion SPF50+, $9.71 (20.61SPF)
Met SPC claim but failed 'broad spectrum'
Beauty Care Co Zinc Sport Sunscreen Lotion SPF50+B $7.00
Surf Life Saving Sunscreen Lotion Dry Touch Formula SPF50 $12.99
Wotnot Deeply Moisturising Sunscreen SPF30 $22.41
Met claim and passed broad spectrum
La Roche-Posay Anthelios XL Ultra-Light Fluid SPF50+ $69.98
Neutrogena Ultra Sheer Dry-Touch Sunscreen Lotion SPF50+ $25.87
Nivea Sun Protect & Moisture Moisturising Sunscreen Lotion SPF50+ $11.00
Smart365 Sun Sunscreen Lotion SPF50+A $7.20
Oasis Sun Sport PA++++ SPF40 $34.99
Badger Sport Unscented Natural Mineral Sunscreen Cream SPF35 $29.34
My Sunshine Natural Sunscreen + Antioxidants SPF30 $29.98
Solzinc Natural Sun Protection 30+ $50.00


gate.gui.docview
Interface AnnotationList
- All Superinterfaces:
- ActionsPublisher, DocumentView, FeatureBearer, NameBearer, Resource, Serializable, VisualResource
- All Known Implementing Classes:
- AnnotationListView
public interface AnnotationList
- extends DocumentView
Interface for document views showing a list of annotations.
getSelectionModel
ListSelectionModel getSelectionModel()
- Obtains the selection model used by this list view.
- Returns:
- a
ListSelectionModel
object.
getAnnotationAtRow
AnnotationData getAnnotationAtRow(int row)
- Provides the annotation
getRowForAnnotation
int getRowForAnnotation(AnnotationData aData)
- Returns the display row for a given annotation.
- Parameters:
aData
- the annotation for which the row is required
- Returns:
- a positive int value if the annotation is found or -1 otherwise


Onboard Diagnostic Monitoring
Create new user
Please enter Username, Password, and Car ID(Driver Only):
Driver
Fleet Manager
Create new user
Back to Login
form = {{ user | json }}
cookie = {{ retrieved | json }}


Dashboard
Product
Report
Edit Product
This template is under maintenance!
From Product
Product Name
Price
Condition
New
Used
Quantity
Total Cost
Submit
Cancel


You go home in a panic. You check your mail, but find it full of letters from Joyce. You burn them, but more fly in through the windows. Soon, the letters are knee-high. You run outside... straight into a spaceship. You see some aliens and pass out from the shock of it all. When you wake up, you are on a new planet. You are informed that a baby alien parasite was extracted from your left ventricle.
TRUE END


Check this box if you wish to use the Dial-Up Networking (Windows95) or Remote Access Server (WindowsNT) service that you have set up in your operating system. For help on setting up these services see the help files or manual for your operating system.


|
Niki's DB
|
#include <Database.h>
Public Member Functions | |
| Database (std::vector< Table > tables=std::vector< Table >()) | |
| void | save (std::string fileName, std::string tableName) const |
| saves a single table to a file | |
| void | loadTable (std::string fileName) |
| void | showTables () const |
| lists table names | |
| int | findTable (std::string tableName) const |
| uses the name of the table to find it's index in the vector and returns it | |
| void | describe (std::string tableName) const |
| lists the columns and their types | |
| void | printTable (std::string tableName) const |
| void | dbSelect (int column, std::string searchedValue, std::string tableName) const |
| searches in the given column for the searchValue and prints all the rows with that value | |
| void | addColumn (std::string tableName, std::string columnName, std::string colType) |
| void | updateCells (std::string tableName, int columnId, std::string searchValue, int targetColumnId, std::string targetValue) |
| void | addRow (std::string tableName, std::vector< std::string > Row) |
| void | deleteRow (std::string tableName, int columnId, std::string searchValue) |
| The function searches for a value in a column. Once it finds it, it deletes thr row that contains it. | |
| void | renameTable (std::string tableOldName, std::string tableNewName) |
| void | countRowsInTable (std::string tableName, std::string searchedValue, int columnIndex) |
| Counts the rows in a table that contain the searched value in the respective column. | |
| void | aggregate (std::string tableName, int searchColumn, std::string searchValue, int targetColumn, std::string operation) |
| void | innerJoin (std::string newTableName, std::string firstTableName, std::string secondTableName, int firstTableColIndex, int secondTableColIndex) |
| void | close (std::string tableName) |
| removes a table from a vector, without keeping the changes made to it in the file | |
| void | addNewTable (std::string tableName) |
The database class's purpose is to hold different tables the user can manipulate so he can have more than one table open at a time. It is used to save and load tables and to collect data from them.
| void Database::aggregate | ( | std::string | tableName, |
| int | searchColumn, | ||
| std::string | searchValue, | ||
| int | targetColumn, | ||
| std::string | operation | ||
| ) |
The funtion performs an operation on n number of cells. n depends on the searchColumn and the search value you are trying to find in that column. On all rows the value is found, the operation is performed on the respective cells from the target column
| void Database::innerJoin | ( | std::string | newTableName, |
| std::string | firstTableName, | ||
| std::string | secondTableName, | ||
| int | firstTableColIndex, | ||
| int | secondTableColIndex | ||
| ) |
The funtion creates a new table by performing an innerJoin on two tables based on a column given from the each of the two tables.
| void Database::updateCells | ( | std::string | tableName, |
| int | columnId, | ||
| std::string | searchValue, | ||
| int | targetColumnId, | ||
| std::string | targetValue | ||
| ) |
The function uses a columnId and a searchValue he wishes to search for in that column. Once the value is found on the same row, but in the targetColumn, the value is changed to the targetValue.