My first piece of advice is to allow yourself to feel uncomfortable, don’t try to remedy it immediately. The discomfort you feel is normal and honestly very healthy. It is a wonderful opportunity to learn more about yourself. Use this feeling to do some reflection. Why are you uncomfortable? Is it because you are lonely?  Do you miss the community you grew up in? Once you have narrowed down what is causing you discomfort, you can begin to find something in Athens that will nurture your soul.
Find your people. Yes, I mean find other Jewish students. Even if all your best friends back home aren’t Jewish, I promise you will appreciate having someone who shares your background. It can be so grounding to find individuals who are like you, especially on a campus where very few people are Jewish. In the moments when you feel isolated you will be so thankful to know that you have friends who know exactly what you’re feeling. You will find your transition to be much less painful.
Get involved. Not just on campus, but everywhere. In the Jewish National Fund, in the Jewish Federation of your town, in any camp that people in your area attend. You might not be aware of all of the opportunities that are available to Jewish students, but there are actually so many. (I am actually writing this while at a conference that was essentially free! How crazy is that!) Once you start, you will find so many other students all over the country and the world that are interested in the same things you are. I promise that you’ll be amazed at the things you learn and the people you meet.
Be proud. Be so proud of who you are. Because who you are is amazing, and a semi-rare breed at OU. The truth is that you’re special. I hope you know that.  Make your voice heard, share what you know, be a pillar of the Jewish community. You can be a real inspiration to students who will soon be in your same position.
My last piece of advice is to talk to me. Seriously, reach out to me. If there is anyone who is prepared and able to help first year Jewish students it's me. I know your position very well, and sometimes I feel like I am still one of you. But the sense of loss is lesser because I have followed my own advice. I have felt uncomfortable, I have found my people, I am involved and I am beyond proud of who I am. I hope you are too.
Hadass Galili is a senior studying political science pre-law at Ohio University. Please note that the views and opinions of the columnist do not reflect those of The Post. Do you agree? Tell Hadass by tweeting her at @HadassGalili.


This will be replaced by the content of html-blocks/pages--external/main-video-block.html
This will be replaced by the content of html-blocks/common/head.html
This will be replaced by the content of html-blocks/common/if-ie.html This will be replaced by the content of html-blocks/pages--external/header--external.html


import numpy as np
import scipy.cluster.hierarchy as hierarchy
from . import mrc
from . import mac
from . import dgp
from . import utilities
from . import constants
# These methods don't require approximation
NON_APPROX_METHODS = ["equicorrelated", "eq", "ci", "ciknock"]
[docs]def parse_method(method, groups, p=None):
""" Decides which method to use to create the knockoff S matrix """
if method is not None:
return method
if groups is None:
return "mvr"
if p is None:
p = groups.shape[0]
if np.all(groups == np.arange(1, p + 1, 1)):
return "mvr"
else:
return "sdp"
return method
def divide_computation(Sigma, max_block):
"""
Approximates Sigma as a block-diagonal matrix.
Parameters
----------
Sigma : np.ndarray
``(p, p)``-shaped covariance matrix of X
max_size : int
Maximum size of a block in the block-diagonal approximation.
Returns
-------
blocks : np.ndarray
``(p, )``-shaped numpy array where ``blocks[i] == j`` indicates
that variable ``i`` belongs to block ``j``.
"""
[docs]def divide_computation(Sigma, max_block):
"""
Approximates a correlation matrix Sigma as a block-diagonal matrix
using hierarchical clustering. Roughly follows the R knockoff package.
"""
# Correlation tree. We add noise to deal with highly structured Sigma.
p = Sigma.shape[0]
noise = np.random.randn(p, p) * 1e-6
noise += noise.T
Sigma = Sigma + noise
link = dgp.create_correlation_tree(Sigma)
# Set up binary search
max_clusters = p
min_clusters = 1
prev_max_clusters = p
prev_min_clusters = 1
# Binary search to create clusters
for j in range(100):
# Create new groups and check maximum size
n_clusters = int((max_clusters + min_clusters) / 2)
groups = hierarchy.cut_tree(link, n_clusters).reshape(-1) + 1
current_max_block = utilities.calc_group_sizes(groups).max()
# Cache search info and check maximum size
prev_max_clusters = max_clusters
prev_min_clusters = min_clusters
if current_max_block > max_block:
min_clusters = n_clusters
else:
max_clusters = n_clusters
# Break if nothing has changed between iterations
if min_clusters == prev_min_clusters and max_clusters == prev_max_clusters:
if current_max_block > max_block:
groups = hierarchy.cut_tree(link, n_clusters + 1).reshape(-1) + 1
break
return merge_groups(groups, max_block)
[docs]def merge_groups(groups, max_block):
"""
Merges groups of variables together while ensuring all new groups
have size less than max_block.
"""
p = groups.shape[0]
new_groups = np.zeros(p)
# Loop through groups and concatenate them together
# until we exceed max size
current_size = 0
new_group_id = 1
old_group_ids = np.unique(groups)
np.random.shuffle(old_group_ids)
# Iterate through old groups
for old_group_id in old_group_ids:
flag = groups == old_group_id
old_group_size = flag.sum()
# Either count old group as part of new group
if current_size + old_group_size <= max_block:
current_size += old_group_size
# Or add a new group
elif old_group_size <= max_block:
current_size = old_group_size
new_group_id += 1
else:
raise ValueError(
f"Group {old_group_id} has size {old_group_size}, exceeding max_block {max_block}"
)
new_groups[flag] = new_group_id
return new_groups
[docs]def compute_smatrix_factored(
Sigma,
D=None,
U=None,
method='mvr',
num_factors=20,
**kwargs
):
"""
Wraps S-matrix generation functions which approximate
``Sigma = np.diag(D) + np.dot(U, U.T)``.
Parameters
----------
Sigma : np.ndarray
``(p, p)``-shaped covariance matrix of X
D : np.ndarray
``p``-shaped array of diagonal elements for factor model. Only used
if how_approx='factor'. This is optional if Sigma is not None.
U : np.ndarray
``(p, k)``-shaped matrix for factor model. Usually k << p. Only used
if how_approx='factor'. This is optional if Sigma is not None.
method : str
Method for constructing S-matrix. One of mvr, maxent, mmi.
num_factors : int
The number of factors if how_approx='factor'. Defaults to 20.
kwargs : dict
kwargs to pass to one of the wrapped S-matrix solvers.
Notes
-----
mmi stands for minimum mutual information, which is the same as maximizing
entropy.
Returns
-------
S : np.ndarray
``(p, p)``-shaped (block) diagonal matrix used to generate knockoffs
"""
# Compute factor model if not inputted
if D is None or U is None:
raise NotImplementedError("TODO")
p = D.shape[0]
k = U.shape[1]
# Solve using specialized methods
if method == 'mvr':
S = mrc.solve_mvr_factored(D=D, U=U, **kwargs)
elif method == 'maxent' or method == 'mmi':
S = mrc.solve_maxent_factored(D=D, U=U, **kwargs)
else:
raise NotImplementedError(f"Factor model solver is not implemented for method={method}")
# If Sigma is provided, ensure exact validity
tol = kwargs.get('tol', constants.DEFAULT_TOL)
S = utilities.shift_until_PSD(S, tol=tol)
if Sigma is not None:
S, _ = utilities.scale_until_PSD(Sigma, S, tol=tol, num_iter=10)
return S
[docs]def compute_smatrix(
Sigma,
groups=None,
method=None,
solver="cd",
how_approx='blockdiag',
max_block=1000,
num_factors=20,
num_processes=1,
D=None,
U=None,
**kwargs,
):
"""
Wraps a variety of S-matrix generation functions.
For mvr, maxent, mmi, and sdp methods, this can use
a block-diagonal approximation of Sigma if the dimension
of Sigma exceeds max_block or a factor approximation.
Parameters
----------
Sigma : np.ndarray
``(p, p)``-shaped covariance matrix of X
groups : np.ndarray
For group knockoffs, a p-length array of integers from 1 to
num_groups such that ``groups[j] == i`` indicates that variable `j`
is a member of group `i`. Defaults to ``None`` (regular knockoffs).
method : str
Method for constructing S-matrix. One of mvr, maxent, mmi, sdp, equicorrelated, ci.
solver : str
Method for solving mrc knockoffs. One of 'cd' (coordinate descent)
or 'psgd' (projected gradient descent). Coordinate descent is
highly recommended.
how_approx : str
How to approximate the covariance matrix to speed up computation.
- If 'blockdiag', approximates Sigma as a block-diagonal matrix.
- If 'factor', approximates ``Sigma = np.diag(D) + np.dot(U, U.T)``,
a factor model.
max_block : int
The maximum size of a block if how_approx='blockdiag'. Defaults to 1000.
num_factors : int
The number of factors if how_approx='factor'. Defaults to 20.
num_processes : int
Number of parallel process to use if Sigma is approximated as
a block-diagonal matrix.
D : np.ndarray
``p``-shaped array of diagonal elements for factor model. Only used
if how_approx='factor'. This is optional if Sigma is not None.
U : np.ndarray
``(p, k)``-shaped matrix for factor model. Usually k << p. Only used
if how_approx='factor'. This is optional if Sigma is not None.
kwargs : dict
kwargs to pass to one of the wrapped S-matrix solvers.
Notes
-----
mmi stands for minimum mutual information, which is the same as maximizing
entropy.
Returns
-------
S : np.ndarray
``(p, p)``-shaped (block) diagonal matrix used to generate knockoffs
"""
# If S in kwargs, just return S (important
# for chaining methods in metro sampling)
kwargs = kwargs.copy()
if "S" in kwargs:
if kwargs["S"] is not None:
return kwargs["S"]
else:
kwargs.pop("S")
# Parse method
if method is not None:
method = str(method).lower()
method = parse_method(method, groups, None)
# These two are the same
if method == 'mmi':
method = 'maxent'
# Factor-models go to a specialized helper
if how_approx == 'factor':
if method in NON_APPROX_METHODS:
pass
else:
return compute_smatrix_factored(
Sigma=Sigma, D=D, U=U, method=method, num_factors=num_factors, **kwargs
)
# Initial params
p = Sigma.shape[0]
if groups is None:
groups = np.arange(1, p + 1, 1)
# Scale to correlation matrix
scale = np.sqrt(np.diag(Sigma))
scale_matrix = np.outer(scale, scale)
Sigma = Sigma / scale_matrix
# Possibly use block-diagonal approximation, either using
# hierarchical clustering for non-grouped knockoffs or
# randomly merging groups for group knockoffs.
if p > max_block and method not in NON_APPROX_METHODS:
if np.all(groups == np.arange(1, p + 1, 1)):
blocks = divide_computation(Sigma, max_block)
else:
blocks = merge_groups(groups, max_block)
block_sizes = utilities.calc_group_sizes(blocks)
nblocks = block_sizes.shape[0]
print(
f"Using blockdiag approx. with nblocks={nblocks} and max_size={block_sizes.max()}..."
)
Sigma_blocks = utilities.blockdiag_to_blocks(Sigma, blocks)
group_blocks = []
for j in range(int(blocks.min()), int(blocks.max()) + 1):
group_blocks.append(utilities.preprocess_groups(groups[blocks == j]))
# Recursive subcall for each block. Possibly use multiprocessing.
constant_inputs = {
"method": method,
"solver": solver,
"max_block": p,
}
for key in kwargs:
constant_inputs[key] = kwargs[key]
S_blocks = utilities.apply_pool(
func=compute_smatrix,
constant_inputs=constant_inputs,
Sigma=Sigma_blocks,
groups=group_blocks,
num_processes=num_processes,
)
print("Finished comp of blocks, putting together")
# Put blocks together
S = np.zeros((p, p))
block_id = 1
for Sigma_block, S_block in zip(Sigma_blocks, S_blocks):
block_inds = np.where(blocks == block_id)[0]
block_inds = np.ix_(block_inds, block_inds)
S[block_inds] = S_block
block_id += 1
# Make S feasible
S, _ = utilities.scale_until_PSD(
Sigma=Sigma,
S=S,
tol=kwargs.get("tol", constants.DEFAULT_TOL),
num_iter=kwargs.get("num_iter", 10),
)
# Line search for MRC methods
smoothing = kwargs.get("smoothing", 0)
if method == "mvr":
loss_fn = mrc.mvr_loss
elif method == "maxent":
loss_fn = mrc.maxent_loss
best_gamma = 1
if method in ["mvr", "maxent"]:
best_loss = loss_fn(Sigma=Sigma, S=S, smoothing=smoothing)
for gamma in np.arange(20)/10:
loss = loss_fn(Sigma=Sigma, S=gamma * S, smoothing=smoothing)
if loss < best_loss:
best_gamma = gamma
best_loss = loss
return S * best_gamma * scale_matrix
# Currently cd solvers cannot handle group knockoffs
# (this is todo)
if not np.all(groups == np.arange(1, p + 1, 1)):
solver = "psgd"
if (method == "mvr" or method == "maxent") and solver == "psgd":
# Check for imports
utilities.check_kpytorch_available(purpose="group MRC knockoffs OR PSGD solver")
from .kpytorch import mrcgrad
S = mrcgrad.solve_mrc_psgd(Sigma=Sigma, groups=groups, method=method, **kwargs)
elif method == "mvr":
S = mrc.solve_mvr(Sigma=Sigma, **kwargs)
elif method == "maxent":
S = mrc.solve_maxent(Sigma=Sigma, **kwargs)
elif method == "sdp" or method == "asdp":
S = mac.solve_group_SDP(Sigma, groups, **kwargs,)
elif method == "ciknock" or method == "ci":
S = mrc.solve_ciknock(Sigma, **kwargs)
elif method == "equicorrelated" or method == "eq":
S = mac.solve_equicorrelated(Sigma, groups, **kwargs)
else:
raise ValueError(f"Unrecognized method {method}")
# Rescale and return
return S * scale_matrix


1. Has anyone ever told you that you have potential? Do you believe it? Why or why not?
Many persons have told me I have potential and I've believed every one of them. Throughout my life I've seen myself grow in many facets that include professional and personal development. I think to have potential is to have the willingness to learn and constantly strive for goals that help me pursue my interests.
2. What are internal and external factors keeping you from achieving your goal? How can you overcome them?
Internal factors can be self doubt and negative self talk. Those cross my mind from time to time. To overcome those types of talk is to talk it out with a person who is experienced in this field of study. It also helps to do self practices such as deep breaths, vision boards, and positive mantras. When it comes to external factors, my history with the judicial system comes to mind. As some employers conduct deep background checks, some opportunities my not be available for me and that's okay. Finding/creating other opportunities for myself is a way to overcome this obstacle. Location, in terms of collaboration with other Indigenous artists and entities is another external factor. The people I may want to work with may not be in this region so I may have to rely on using the Internet to connect with others via social media and/or email.
3. How do you create value for others?
I help create value for others by providing them opportunities by utilizing the knowledge I possess and creating ideas from unique perspectives. I also help create value for others by offering my time to help with tasks which may need assistance. It shows character about someone when they are willing to help others out in order to build camaraderie and community.
Click here to return to the home page.


Return to profile page
Update User Details
First Name
Last Name
Address
Email
New password
Confirm new password
Save changes
Return to profile


Testing Safari and List Styles
Radi buttons?
Nested Lists
Can we improve the the listening expereince by removing bullets with CSS and returning list semantics with ARIA? Explored For MAL issue https://github.com/phetsims/molecules-and-light/issues/351
Answer: Yes, we can!
- Radio, large range:
- Frequencies...
- Wavelengths...
- Microwave, medium range:
- Frequencies.
- Wavelengths.
- Microwave, medium range:
- Frequencies...
- Wavelengths...
- Visible, tiny range:
- Shown as a rainbow...
- Frequencies...
- Wavelengths...
- Ultraviolet, small range:
- Frequencies.
- Wavelengths.
- X-ray, medium range:
- Frequencies...
- Wavelengths...
- Gamma ray, medium range:
- Frequencies...
- Wavelengths...


Welcome to Acropalis!
Enter your details to start a game:
Name:
Difficulty:
Choose your difficulty
Easy
Medium
Hard
Choose your avatar:
New Game
Welcome to Acropalis
Where post-apocalptic fun meets farming
Days:
00
Hours:
00
Back to Main Menu
Farm Borders
Health
100
Hunger
100
Sleep
100


Chef's Corner: Restaurant Verbena welcomes new executive chef
by Manila Standard LifestyleAfter five years of lending his talent to the award-winning 22 Prime Steakhouse, Executive Chef Gerwin Bailon heads to Tagaytay to lead Discovery Country Suites’ Restaurant Verbena.
Chef Gerwin has since been hard at work bringing his expertise to the steak-hungry Tagaytay market. Restaurant Verbena recently introduced 22 Prime items such as USDA Prime Rib Eye, Surf and Turf, and New York Striploin.
Chef Gerwin’s latest brainchild, Unli Steak & Eggs, a lunch event on November 30, brings together the best of both flagship establishments with unlimited USDA Prime Rib, a live egg station, and an array of sides such as Mushroom Pilaf Rice, Truffle Potato Gratin, Tagaytay Vegetables, and Farfale Pasta with Sundried Tomato Sauce.
Restaurant Verbena is at Discovery Country Suites along 300 Calamba Road, San Jose, Tagaytay City. Call (02) 8529-8172 or email<EMAIL_ADDRESS>for inquiries and reservations.


Begin
Pick Your Fight
Iron Man
Thanos
Select this Fight
Select Player 1
Select Player 2
Player Comparison


Steve: We already paid!
Brian: I know. It's what you say after restaurant weirdness.
The usual punchline uttered at the end of any sustained mayhem in a bar or a restaurant. Usually delivered by whatever major character either instigated or was caught up in the melee. When not, it is instead delivered by an otherwise nondescript background character who has made it through the entire disaster completely unscathed. Also heard when a guy gets lucky in a bar, just before he heads out to consummate his newfound luck.
Usually restricted to comedies and those dramas which are not afraid of the occasional lighter touch. Compare/contrast the subtler Was Just Leaving.
Check out the Huffington Post's epic "Check, please" supercut here
Examples:
- The Zales Jewelry Store chain has a commercial showing a woman at a table in a restaurant looking at the jewelry the man she is dining with gave her, then at him, with a sparkle in her eyes. The side message literally reads, "The 'Check Please' store" while the song playing at that moment has the lyrics, "It's nice to see you in my bed."
- A "Got Milk?" commercial where a guy eating pancakes took a 'small sip' on a female customer's milk, but realizes he actually drank most of it. So, he pours his water into the glass to "fill" it back up, with another guy watching the whole thing unfold. The female customer returns and reveals the other guy was her boyfriend. The first guy has an Oh, Crap! expression and meekly asks for the check.
- Appears as Dub Text in one episode of Digimon Adventure 02. Yolei and Sora are being held captive by Deputymon and Starmon, who force the girls to watch them duel. Yolei and Sora find it boring.
Sora: This is a battle of wits, and it looks like Deputymon is out of ammunition.
Yolei: Check, please.
- Garfield comics have been doing this for years, practically every time Garfield and Jon visit Irma's diner. The hijinks range from cheese that has been aged in the back of Irma's pickup truck, ice cream cones with scoops of mashed potatoes on top, and lobster so fresh that it grabs the chef's nose (off-panel). Out of those comics, a few use the phrase word-for-word.
- In Pearls Before Swine, it's practically Goat's Catch Phrase. One example. And another example here.
- In Get Fuzzy, after Bucky bites another restaurant-goer on the arm for talking loudly on a cell phone, Rob says this word for word.

Harry: Right. Tom! Cheque please!
- In the animated film The Iron Giant, after the squirrel Hogarth wants to keep as a pet escapes and causes havoc in the diner. The mayhem begins when the Squirrel gets In Dean's Pants, and he has to unzip in public in order to let it out. His phrase before the mayhem? "I would like to apologize to everyone in advance for this!"
- At the end of Captain Underpants: The First Epic Movie: Mr. Krupp's dinner date is interrupted by an army of mutant talking toilets. He shouts "Check, please!" and snaps his fingers... accidentally turning himself into Captain Underpants.
- After the Sunset has Pierce Brosnan's character saying "Check!" after he and his fiancé are having dinner with a couple who casually admit that they like to swap partners.
- Happens twice in Spaceballs:
- When the protagonists are walking through the desert, Barf says this just before collapsing from dehydration and heat stroke.
- After an alien has burst out of John Hurt's chest at a space diner, then goes on to do an impression of Michigan J. Frog, the main characters say the phrase word-for-word.
- In the movie Robin Hood: Men in Tights, Prince John says this when the fight that's broken out at the big banquet scene lands on his table.
- Star Wars IV: A New Hope, when Han Solo tosses a few coins to the bartender saying "Sorry about the mess" after killing Greedo. However, the bartender is soon grateful: as the Expanded Universe reveals, he grinds up Greedo's body into a drink for Jabba the Hutt.

- In the first Major League movie, Rick "Wild Thing" Vaughn uses this trope at a bar when a beautiful woman makes a very flagrant pass at him, just before taking her back to his hotel room. (Only later does he learn that she's the wife of one of his teammates and slept with Vaughn for revenge on her husband, provoked by the latter's own infidelity.)
- Sneakers, uttered by Liz after her nerdy computer date, Werner, insinuates the predictable follow up to the dinner
- In Sahara, there's a scene where Dirk and Al are having lunch, and Al just wants to get the check and can't figure out how to say it in French. Dirk eventually wanders off for plot-important reasons (taking the camera's point of view with him), leaving Al to repeatedly call for the check. We never find out whether he gets the check or just leaves, or how long he sits there.
- Hudson Hawk. Eddie and Anna Baragli are sitting in a cafe. Eddie has just told her that he was in prison.
Anna: You were in the joint. Doing hard time. It's funny, but that excites me.
Eddie: Check please! - In Fatal Attraction, after Alex bluntly acknowledges the sexual tension between them, Dan calmly declares, "Let's get the check". The next scene is of them going at it in her apartment.
- A non-comedic example in Our Man Flint. Flint is going to every restaurant in a section of Marseille to find a restaurant that serves bouillabaisse made with a specific recipe. After tasting the bouillabaisse at one restaurant, he immediately calls for the check so he can move onto the next one.
- In Big, Josh and Billy are at a diner, looking through the classifieds for a job for Josh to support himself until he can find the Zoltar machine.  It goes to show you the things you do at 13 aren't so amusing at 30.
- Nonverbal example: In the film of Popeye, when it becomes obvious that a group of thugs in the local diner are fixing to fight with the titular one-eyed sailor, several people begin signaling for their checks.
- In 17 Again, after Ned discovers that the object of his crush speaks fluent Elvish, and they're both turned on by this.
- Boy Meets World:
- Shawn tries this in a classroom.
- Another episode had Eric saying this repeatedly in a restaurant while hanging out with a very annoying girl. He can't take anymore, Eric screams, "CHECK! For the love of God, WILL SOMEONE PLEASE BRING ME A CHECK!" The waitress in question, who was only a few feet behind him at the time and taking another order, jumped about a foot in the air.
- In the sequel series Girl Meets World, Riley is trying to figure out why Shawn doesn't come around very much if he and her dad are best friends. She asks if she can ask something a little scary. Shawn is doubtful that a 12 year old can say anything that would scare him. Riley asks if Shawn doesn't come around because seeing her makes him think of what he doesn't have, to which Shawn responds by yelling "CHECK!"
- In one episode of Sex and the City, Samantha and another woman have fought for the attentions of a man in a restaurant. Samantha then corners the other woman and tells her, bluntly, that she doesn't have a chance with the guy in question and offers to pay for the woman's dinner. The woman concedes, whereupon Samantha triumphantly declares, "Check!"
- The page quote is from The Sarah Silverman Program, in which Laura, Jay and Sarah have a discussion about Laura's marriage to Jay. Jay compares the marriage to Sarah living with her dog Doug. "Sarah!" "Laura!" "Check, please!" It comes up later, when Steve demonstrates his understanding of it, although they're no longer in a restaurant.
- A regular sketch in the BBC sketch show Goodness Gracious Me involved a man in a restaurant who would invariably say something offensive or disturbing to his date. When she stormed out, he would look up at the waiter sadly and say "Cheque, please". You can chalk this up to Eagleland Osmosis; it's almost universally called the 'bill' in the UK, but the "check please" punchline is still recognised.
- One episode of The Golden Girls deals with Rose dating a man who is impotent. After a raunchy discussion over dinner, he tells her it's time. "Check, please!" Rose cries.
- In the Monk episode "Mr. Monk and the Captain's Wife," when Monk is taking Captain Stottlemeyer's children out to lunch, he says this into a microphone after the restaurant staff start performing to a music track on the diner's jukebox.
- A variation of this takes place in the Firefly episode "Shindig," after Mal and Jayne start up a bar fight. Inara doesn't actually ask for a check, but she does tell the barkeep that she'll recommend the place to her friends as she hurries out.
- In Babylon 5 episode "Objects in Motion", as star-crossed lovers Stephen Franklin and Tessa Holloran (Number One) realize they have about an hour before he departs the station permanently, Stephen dashes off to prepare a rendezvous while Tessa throatily calls out, "Check! Check please!"
- Even though this is a little differently quoted The Suite Life of Zack and Cody had a Check reference from the dog Ivana was supposed to mate with, but she went with Scamp.
- Keith Olbermann's fallback response to something truly baffling.
- In The Mentalist, after Patrick Jane shoots who he believes to be Red John, the man who killed his family, in the mall. He then sits back down, and calmly asks for the check. The waitress however fled in terror (along with everyone else in the mall), leaving Jane to simply leave the money on the table, finish his tea, and let himself be arrested.
- An In Living Color! skit has a businessman say it after his blind date Grace Jones cut an alligator's tail off.
Harvey: Waiter, check please!
 - Dinosaurs: Robbie invented a device that'd allow people to draw energy from a volcano. Fearing the financial loss Wesayso Corporation would suffer, Mr. Richfield invited the Sinclairs for dinner and tried to buy all rights to the device. When Earl unwittingly gave Richfield the idea to buy the volcano instead, Richfield quickly left the scene and Earl asked for the check.
- Power Rangers Jungle Fury: Casey, Theo and Lily had to look for a new instructor after their previous one was killed by the Big Bad and all they knew about him was his address: Jungle Karma Pizza Parlor. They didn't know his name or what he looks like. Arriving there, they found a patron that stereotypically looked like an old instructor and they (wrongly) assumed it was him. After unwittingly freaking him out by asking him to train them, he asked for the check.
- The Bachelorette season where Trista Rehn chose Ryan Sutter. In each season the remaining 3 men have a one-on-one date with the Bachelorette. At the end of the dinner, the pair receives a message saying they can spend the night together. During Trista and Ryan's date, after the message arrived, Trista says "Waiter!" and Ryan says "Check please!".
- Ray Charles' At The Club: *whistle* "Hey barkeep! You better come here and get your bread. This little girl's getting ready to split, and I'm about to go out of my head."
- This is the title of a 1996 song by Country Music singer Paul Jefferson, where the narrator dismisses uncomfortable situations in this fashion.
- Used in the P!nk song "Slut Like You" after her date fails to get her increasingly obvious hints.
 Wow!
Check please!
- In RENT, during the wild song La Vie Boheme, the "straight man" Benny calls anxiously for the waiter after the lines "to sodomy/it's between God and me/to S&M". In the Broadway version, he also actually yells "CHECK!" a little bit later in the song.
- Check, Please is a one-act play by Jonathan Rand about a series of hilariously awful dinner dates. "Check, please," is also the last line of the play, and it's said by a guy in a burlap sack. To a mime.
- In Legally Blonde: The Musical, after Elle and Warner have an awkward breakup during their dinner date, Warner utters this line.
- In Crash Tag Team Racing, this is said as one of Cortex's Non Sequiturs for when his car is destroyed during a race.
- In an early Megatokyo comic, Piro says this when Dom pulls out a pistol.
- Used at the end of a Terrible Interviewees Montage in Las Lindas as seen here.
- This Nothing Nice To Say features the trope in full force.
 Nip says it in the third panel.
- This Penny Arcade strip.
- Sandra on the Rocks gives us this strip.
- The Last Podcast on the Left: Parodied in the series on Jonestown, where it's joked that if you're in a cult you can save yourself by yelling "Check, please!", at which point the cult is obliged to let you leave. It sees use again in the show's next cult series on the Order of the Solar Temple.
- Dungeons & Daddies: Used by one of the players to end an episode of the podcast after the main cast argues in a sports bar.
- At the end of a conversation by the "Game Grumps" that started about a girl who died by drinking too much water that eventually turns into a bit about a girl who who will only talk about cats.
- In the 5th episode of season 1 of Dilbert , Dilbert is at a dinner party in another country where it is revealed that he is left-handed (being left handed makes you a member of the oppressed minority.) The guards raise their guns at Dilbert, who replies with the trope.
- Family Guy:
- Once featured a cut-away gag with "Check Please" as one of the many cliche lines on the CD "Sitcom Punchlines of the 80's".
- And also said by Death in the episode "Death Lives", after he kills an environmentalist woman he's on a date with.
- Robot Chicken did a The Golden Girls/Sex and the City mashup with Bea Arthur and her friends discussing their torrid, explicit love affairs. A man in the booth next to theirs immediately asked for the check when they started... and kept pleading for the check when it was not delivered promptly after tale after tale. He just left money on the table in the end.

- Kim Possible. Said by Shego to Drakken after she got soundly beat by Kim in a restaurant.
- The Spectacular Spider Man. After he and the Sinister Six have finished their meal, Doc Ock says this to a nearby waiter. The waiter stammers out that it's on the house, which is only natural, considering it's a party of six supervillains. Presumably, he wasn't planning to pay either way, and it was just part of the power trip he's been on all episode.
Doctor Octopus: How kind of you... and wise.
- In the Ed, Edd n Eddy episode "In like Ed", when Eddy gives Ed items to sort for Garage Sale day, this exchange happens.
Ed: Service is my middle toe! Check, please!Eddy: You should've ate breakfast, Ed.
- Said in a House of Mouse episode by Red Riding Hood when the Big Bad Wolf comes on stage for his musical performance.
- Said in VeggieTales "Asparagus of La Mancha" when Archibald playing Don Quixote lands on the sign.
- Rocko's Modern Life. Said by Rocko after he accidentally knocks out his date while cutting some meat.
- Invoked several times during the Adventure Time episode "Videomakers". Jake tries to shoehorn the line into several different scenes because he wants to make the movie he and Finn are working on a romantic-comedy, but it isn't really used in a restaurant at any point.
- A series of coincidences once mislead Johnny Bravo into believing time stopped for everyone except for him and he decided to take advantage in every possible way. One was eating at a restaurant for free. Nobody paid attention to Johnny asking for the check because everyone was distracted.
- The Avengers: Earth's Mightiest Heroes! in the episode "Who Do You Trust", the Avengers are eating out at a resturant when a monster flies by the resturant. As soon as the team sees it, Tony simply says this phrase word for word. However, as Tony is about to pay said check while the others fight, the waitress turns out to be Black Widow who puts a knockout dart into him.
- Used as a one-episode Running Gag in season 6 of BoJack Horseman, as Doctor Champ, fresh off the wagon and pounding drinks at BoJack's preferred pub, keeps saying this trope whenever he makes a point, and then being surprised when he actually gets the check, as he'd just meant it as an expression.


End to end test functions. Whenever these are updated, it may also be necessary to update the associated tutorial.


I'm passionate about technology business and almost everything that lies in the scope of it.
My expertise ranges from new venture finance and strategic management to programming and digital marketing.
Being such an all-round person I'm still obsessed with high quality approach to work, rigorous attention to details and minimalism.
strategy // project management // qa&qc
startup fundraising // business planning
html // css // js


UTM Example
Click here to test code
(form fields are filled)
Click to show it works
(form fields remain filled)


Current projects:
- Robust AI in Finance
- Representation Learning for Software Testing
- Efficient Model Serving by Caching
- Robust and Explainable AI in Software
- Domain Adaptation in Health and Software
- System log-based Failure Prediction
- Sequence Learning for Test Generation
{% include page-scripts.html %}


Adds a video to a user or community page.
Creates an empty album for videos.
Adds a new comment on a video.
Deletes a video from a user or community page.
Deletes a video album.
Deletes a comment on a video.
Edits information about a video on a user or community page.
Edits the title of a video album.
Edits the text of a comment on a video.
Returns detailed information about videos.
Returns video album info
Returns a list of video albums owned by a user or community.
Returns a list of comments on a video.
Reorders the album in the list of user video albums.
Reorders the video in the video album.
Reports (submits a complaint about) a video.
Reports (submits a complaint about) a comment on a video.
Restores a previously deleted video.
Restores a previously deleted comment on a video.
Returns a server address (required for upload) and video data.
Returns a list of videos under the set search criterion.
Generated using TypeDoc
The API video group


GUI components for the SecureUML GUI. Basically everything that is displayed in the details pane in ArgoUML.


Eat wherever and whenever
Restaurant Search
Start Bootstrap
Home
(current)
About
Products
Login
Load Restaurants
Eat to your heart's content
Restaurants Near You
Food
Description
Price
Order


z12hidp5dybtff1ws04cgvcqex3htfbgiuk0k
David Higgins
118252903045381283898
Aug 23, 2013
Aug 23, 2013
Reshared Post
Public
I've been wondering about a few things lately. And came to an annoying conclusion: we are obsessed with...
I've been wondering about a few things lately. And came to an annoying conclusion: we are obsessed with numbers and it is killing our creativity. Our online life right now is running the danger of being a constant chase of bigger numbers and more reach and there is actually not much substance to it.
http://christianheilmann.com/2013/08/20/numbers-and-bullshit/
article
Numbers… and bullshit. | Christian Heilmann
In the last few weeks I was slightly off the grid. I had a quick holiday, I traveled, I enjoyed the “fun” of wireless offers in US hotels. Sometimes that is a good thing. I realised a few things in that time, and discovered a few amazing posts online that very much agreed with what I thought.


Reus strikes late to rescue shell-shocked Dortmund against lowly Paderborn
The captain apologised to fans after his side found themselves 3-0 down at half-time.
by AFPBORUSSIA DORTMUND CAPTAIN Marco Reus equalised in added time to salvage a 3-3 draw at home to Bundesliga bottom side Paderborn as a shock result left Dortmund coach Lucien Favre under pressure.
Dortmund, who face Barcelona away on Wednesday in the Champions League, were 3-0 down at half-time at Signal Iduna Park and out-played before launching a second-half fight back.
“We have to apologise to our fans for that performance, especially in the first-half,” said Dortmund’s visibly shaken captain Marco Reus.
 It’s not on.”
Paderborn striker Streli Mamba ran riot in the first-half with two goals before left wing Gerrit Holtmann grabbed the visitor’s third just before the break.
It was a different story in the second-half as England winger Jadon Sancho gave Dortmund hope before Axel Witsel, then Reus both headed late goals to poach a point.
The draw leaves Dortmund fifth in the table, but they could finish the weekend eight points behind leaders Borussia Moenchengaldbach, who are at mid-table FC Union Berlin on Saturday.
Having been drubbed 4-0 away at Bayern Munich before the international break, Dortnund were again guilty of woeful defending in the first-half to put Favre in a precarious position.
Hosts Dortmund were behind with just five minutes gone when Paderborn winger Kai Proeger out-sprinted, then rode the tackle of Germany international Nico Schulz on the right flank.
With the defence beaten, Proeger passed inside for Mamba to tap home and silence home fans.
In response Dortmund pushed forward, but were punished for defending high up the pitch when Paderborn forward Ben Zolinski lifted the ball over the defence.
Mamba outsprinted Germany defender Julian Weigl to fire Paderborn 2-0 up on 37 minutes.
The visitor’s third goal came two minutes before the break when Dortmund’s Belgium Axel Witsel lost possession and Holtmann sprinted clear of Weigl to fire past home goalkeeper Roman Buerki.
Stunned Dortmund trudged off to a chorus of whistles from their fans at half-time.
Their CEO Hans-Joachim Watzke, watching in the stands, looked far from happy after such a weak display from his star-studded squad.
Favre reacted by bringing on the attack-minded trio of Julian Brandt, Thorgan Hazard and Achraf Hakimi for the second-half.
Dortmund flew out of the blocks with Sancho firing home after his captain Marco Reus had won back possession to make it 3-1 just two minutes into the second-half.
Paderborn still had plenty of fire and Mamba came within a whisker of grabbing his hat-trick after firing wide on 67 minutes.
With the final whistle approaching, Dortmund defender Mats Hummels hooked the ball across goal for Witsel to header home before Reus spared his side’s blushes with the equaliser right at the end.


- calculateRoute(RoutePlan, RouteManager.Listener) - Method in class com.here.android.mpa.routing.RouteManager
-
Invokes an asynchronous route calculation.
- cancel() - Method in class com.here.android.mpa.routing.RouteManager
-
Cancels the current route calculation.
- cancel() - Method in class com.here.android.mpa.search.Request
-
Cancels any pending results from an invoked request.
- cancelKineticPanning() - Method in interface com.here.android.mpa.mapping.MapGesture
-
Cancels all currently active motions caused by kinetic panning.
- Category - Class in com.here.android.mpa.search
-
Represents a category with which a
Place
can be associated.
- Category.Global - Enum in com.here.android.mpa.search
-
Represents a set of fixed category filters on the resources of the Places search service.
- CategoryFilter - Class in com.here.android.mpa.search
-
Represents a filter used when performing a search for popular places within a specific geographic
area.
- CategoryFilter() - Constructor for class com.here.android.mpa.search.CategoryFilter
-
Default constructor.
- clear() - Method in class com.here.android.mpa.common.GeoPolyline
-
Remove all points from the GeoPolyline
- com.here.android.mpa.common - package com.here.android.mpa.common
-
This
package includes classes, interfaces, and enumerations that are generally used by other
packages in the Android SDK.
- com.here.android.mpa.mapping - package com.here.android.mpa.mapping
-
The mapping
package provides classes, interfaces, and enumerations that display an
interactive map, and related functionality that allows your application
to create and add map content.
- com.here.android.mpa.routing - package com.here.android.mpa.routing
-
This
package provides classes, interfaces, and enumerations for route calculation and
route description (directions).
- com.here.android.mpa.search - package com.here.android.mpa.search
-
The search package provides classes for performing places and geocoder searches.
- ContactDetail - Class in com.here.android.mpa.search
-
Represents detailed information about a contact for a
Place
.
- contains(GeoBoundingBox) - Method in class com.here.android.mpa.common.GeoBoundingBox
-
Determines whether the specified
GeoBoundingBox
is covered entirely by this
GeoBoundingBox
.
- contains(GeoCoordinate) - Method in class com.here.android.mpa.common.GeoBoundingBox
-
- contains(GeoCoordinate) - Method in class com.here.android.mpa.common.GeoPolyline
-
Check to see if a GeoCoordinate
resides within this GeoPolyline
- CopyrightLogoPosition - Enum in com.here.android.mpa.common
-
Represents values that describe on-display view positions for the HERE copyright logo.
- CreateLink - Class in com.here.android.mpa.search
-
Represents a
CreateLink
which contains information to POST media content (image, review).
- CREATOR - Static variable in class com.here.android.mpa.mapping.MapState
-


|
iDreamSky Game Engine
v1.0.0
|
#include <Font.h>
複合項目 | |
| class | Data |
| class | Quad |
| class | Resource |
公開方法(Public Methods) | |
| bool | construct (const char *path_) |
| void | destruct () |
| virtual void * | getHandle () const |
| Get the Handle of the Texture. 更多... | |
| virtual int | getFontMaxHeight () const |
| virtual int | getFontWidth (char c) const |
| virtual int | getFontHeight (char c) const |
| virtual int | getWidth () const |
| Get the Width of the Texture. 更多... | |
| virtual int | getHeight () const |
| Get the Height of the Texture. 更多... | |
| virtual int | getLevelCount () const |
| Get the Mipmap Level Count of the Texture. 更多... | |
| virtual bool | isRenderable () const |
| Check if texture is renderable. 更多... | |
| virtual bool | isPowerOfTwo () const |
| Check if texture is power of 2 in both width and height. 更多... | |
| int | getNumQuads () const |
| const Font::Quad & | getQuad (int i) const |
| 公開方法(Public Methods) 繼承自 IDreamSky::Texture2DBase | |
| Texture2DBase () | |
| Texture2DBase Constructor. 更多... | |
| virtual | ~Texture2DBase () |
| TextureBase Destructor. 更多... | |
| 公開方法(Public Methods) 繼承自 IDreamSky::TextureBase | |
| TextureBase () | |
| TextureBase Constructor. 更多... | |
| virtual | ~TextureBase () |
| TextureBase Destructor. 更多... | |
| void | setMinFilterMode (const GXTextureMinFilterMode &minFilter_) |
| Set the Minification Filter of the Texture. 更多... | |
| void | setMagFilterMode (const GXTextureMagFilterMode &magFilter_) |
| Set the Magification Filter of the Texture. 更多... | |
| const GXTextureMinFilterMode & | getMinFilterMode () const |
| Get the Minification Filter of the Texture. 更多... | |
| const GXTextureMagFilterMode & | getMagFilterMode () const |
| Get the Magification Filter of the Texture. 更多... | |
| void | setWrapS (const GXTextureWrapMode &wrapS_) |
| Set the Warp Mode of S direction of the Texture. 更多... | |
| const GXTextureWrapMode & | getWrapS () const |
| Get the Warp Mode of S direction of the Texture. 更多... | |
| void | setWrapT (const GXTextureWrapMode &wrapT_) |
| Set the Warp Mode of T direction of the Texture. 更多... | |
| const GXTextureWrapMode & | getWrapT () const |
| Get the Warp Mode of T direction of the Texture. 更多... | |
Font Graphics Object.
|
virtual |
Get the Handle of the Texture.
This is a pure virtual function all sub classes should implemented this function
|
virtual |
Get the Height of the Texture.
This is a pure virtual function all sub classes should implemented this function
|
virtual |
Get the Mipmap Level Count of the Texture.
This is a pure virtual function all sub classes should implemented this function
|
virtual |
Get the Width of the Texture.
This is a pure virtual function all sub classes should implemented this function
|
virtual |
Check if texture is power of 2 in both width and height.
This is a pure virtual function all sub classes should implemented this function
|
virtual |
Check if texture is renderable.
This is a pure virtual function all sub classes should implemented this function


A layer shown behind a
Popup control and
above the background UI. An overlay is responsible for absorbing mouse clicks
outside the popup and/or providing a visual effect behind the popup (generally
to focus user attention on the popup). See the background behind a Popup-based
control such as
ComboBox for a demo.


Use the spaceless tag to remove whitespace between HTML tags, not whitespace within HTML tags or whitespace in plain text:
{% spaceless %}

foo

{% endspaceless %}
{# output will be
foo
 #}
This tag is not meant to “optimize” the size of the generated HTML content but merely to avoid extra whitespace between HTML tags to avoid browser rendering quirks under some circumstances.
Tip
If you want to optimize the size of the generated HTML content, gzip compress the output instead.
Tip
If you want to create a tag that actually removes all extra whitespace in an HTML string, be warned that this is not as easy as it seems to be (think of textarea or pre tags for instance). Using a third-party library like Tidy is probably a better idea.
Tip
For more information on whitespace control, read the dedicated section of the documentation and learn how you can also use the whitespace control modifier on your tags.


Created: 2021-01-22 Fri 18:12
| Plato: | Calvin: |
| we sin out of ignorance | we are ignorant because of sin |
| Calvin | Luther |
|---|---|
| private and rarely personal | theology built on personal experience |
| God's Glory & Power | Sin & need of justification |
| Covenant | Law & Gospel |
| Sanctification before justification | emphasis on Grace & justification |
| Vague about presence in Eucharist | "consubstantiation" contra "transubstantiation" |
| Church maintains discipline | |
| Predestination |
Created by Dale Hathaway.


Unchained Capital Bitcoin Utilities
This library builds on the excellent bitcoinjs-lib, adding valuable but missing functionality for validation, HD wallets, block explorers, and especially multisig.
Full API documentation can be found at unchained-bitcoin.
This library was built and is maintained by Unchained Capital.
Installation
unchained-bitcoin
is distributed as an NPM package. Add it to your
application's dependencies:
$ npm install --save unchained-bitcoin
Usage
The library provides a functional API which builds upon data
structures used by bitcoinjs-lib
.
In particular, many functions accept a multisig
argument which is
the kind of object returned by functions such as
bitcoin.payments.p2ms
, bitcoin.payments.p2sh
, &c. from
bitcoinjs-lib
.
The examples below provide an initial idea of how to use this library, but see the API documentation for full details.
Interacting with a multisig address.
Generating multisigs
Multisignature objects can be generated with two functions:
generateMultisigFromPublicKeys
-- useful when directly passing public keysgenerateMultisigFromHex
-- useful when parsing an existing redeem script
Each of these functions accepts additional arguments which determines the multisig address type (e.g. P2SH or P2WSH).
import {
generateMultisigFromPublicKeys,
P2SH, // or: P2SH_P2WSH, P2WSH
MAINNET, // or: TESTNET
} from "unchained-bitcoin";
// Public keys are represented as compressed hex.
const publicKeys = [
"03d703e0d7622f087f27e18b61b1c131d4a7b868a4960ab66d89c76f9daf1a1569",
"031c27e952c332fc0630e29d6ec2a10ba18c33cf096ccaeb7620983e0daf625946",
"03f6eed874ad71db090325dc92ccec9b722187dfd4aac19c9f54b9047bc4fac2b0",
];
// A mainnet P2SH 2-of-3 multisig.
const multisig = generateMultisigFromPublicKeys(MAINNET, P2SH, 2, ...publicKeys);
Querying multisigs
The multisig
object above can be passed around and queried with
other functions in the API.
multisigAddress(multisig); // Returns public address
multisigAddressType(multisig); // P2SH
multisigRequiredSigners(multisig); // 2
multisigTotalSigners(multisig); // 3
multisigRedeemScript(multisig); // Returns redeem script in hex
multisigWitnessScript(multisig); // Returns witness script in hex (null for P2SH)
multisigPublicKeys(multisig); // Returns publicKeys
Validation
This library contains several useful functions for validation not
provided by bitcoinjs-lib
or other libraries. The validation
functions are designed to return an empty string ''
on valid input
and provide a helpful error message otherwise.
-
validateAddress
-- understands Bech32 addresses and is aware of differences in addresses across networks -
valdiateBIP32Path
-- understands absolute and relative BIP32 paths, validates maximum BIP32 index values, and can optionally check for fully hardened or unhardened paths -
validateExtendedPublicKey
-- understands network-dependent differences in encoding extended public keys -
validatePublicKey
-- allows any hexadecimal value -
validateFeeRate
-- implements a reasonable maximum fee rate in Satoshis/byte -
validateFee
-- implements a reasonable maximum fee in BTC -
validateOutputAmount
-- checks for dust and that amount is less than total input amount -
validateMultisigSignature
-- checks signatures for correctness and works across all multisig address types
Developers
Developers who want to work on this library should clone the source code and install dependencies:
$ git clone https://github.com/unchained-capital/unchained-bitcoin`
...
$ cd unchained-bitcoin
$ npm install
Testing
Unit tests are implemented in Jest and can be run via
$ npm test
Contributing
Unchained Capital welcomes bug reports, new features, and better documentation for this library.
If you are fixing a bug or adding a feature, please first check the GitHub issues page to see if there is any existing discussion about it.
To contribute, create a pull request (PR) on GitHub against the Unchained Capital fork of unchained-bitcoin.
Before you submit your PR, make sure to update and run the test suite!


|
darts-engines
|
Volumetric rate and temperature control for injection geothermal well. More...
#include <well_controls.h>
Public Attributes | |
| std::vector< std::string > | phase_names |
| index_t | target_phase_idx |
| index_t | n_equations |
| index_t | n_variables |
| size_t | n_phases |
| value_t | target_rate |
| value_t | target_temperature |
| std::vector< value_t > | injection_stream |
| std::vector< value_t > | state |
| std::vector< value_t > | rate_temp_ops |
| std::vector< value_t > | rate_temp_ops_derivs |
| operator_set_gradient_evaluator_iface * | rate_etor |
| Public Attributes inherited from well_control_iface | |
| std::string | name |
| std::vector< index_t > | block_idx |
Volumetric rate and temperature control for injection geothermal well.


Mechanical Engineer | Machine Learning Enthusiast
Find Out MoreProfessional Integrity Engineer
Over 8 years of experience in mechanical design and Fitness-for-Service Analysis and briefly worked as a Type 1 Wildfire Firefighter in Alberta
Passionate about combining Machine Learning and Data Science with Integrity or Mechanical Engineering
Intrigued by data driven control systems, wildfire management, reinforcement learning, and generative engineering design
See my Project Portfolio


|
|
|
|
|
inv_gaussian(mu=1.0,
_lambda=1.0,
shape=None)
Generate random samples from inverse gaussian. |
source code
|
|
|
|
|
|
3 x 3 numpy array
|
random_rotation(A,
n_iter=10,
initial_values=None)
Generation of three-dimensional random rotations in fitting and
matching problems, Habeck 2009. |
source code
|
|
|
|
|
|
|
|
|
numpy array
|
|
|
|
truncated_gamma(shape=None,
alpha=1.0,
beta=1.0,
x_min=None,
x_max=None)
Generate random variates from a lower-and upper-bounded gamma
distribution. |
source code
|
|
|
|
truncated_normal(shape=None,
mu=0.0,
sigma=1.0,
x_min=None,
x_max=None)
Generates random variates from a lower-and upper-bounded normal
distribution |
source code
|
|


Site Menu
Home & Signup
Events
Sign Up
Join the Discussion
Powered by Curator.io
Our Team
2020 / 2021
WIP


Library: Foundation
Package: Hashing
Header: Poco/LinearHashTable.h
Inheritance
Direct Base Classes: std::iterator < std::forward_iterator_tag, Value >
All Base Classes: std::iterator < std::forward_iterator_tag, Value >
Known Derived Classes: Iterator
Member Summary
Member Functions: operator !=, operator *, operator ++, operator =, operator ==, operator->, swap
Constructors
ConstIterator
ConstIterator
ConstIterator(
const ConstIterator & it
);
ConstIterator
ConstIterator(
const BucketVecIterator & vecIt,
const BucketVecIterator & endIt,
const BucketIterator & buckIt
);
Member Functions
operator !=
bool operator != (
const ConstIterator & it
) const;
operator *
const typename Bucket::value_type & operator * () const;
operator ++
ConstIterator & operator ++ ();
operator ++
ConstIterator operator ++ (
int
);
operator =
ConstIterator & operator = (
const ConstIterator & it
);
operator ==
bool operator == (
const ConstIterator & it
) const;
operator->
const typename Bucket::value_type * operator-> () const;
swap
void swap(
ConstIterator & it
);
Variables
_buckIt
BucketIterator _buckIt;
_endIt
BucketVecIterator _endIt;
_initialized
bool _initialized;
_vecIt
BucketVecIterator _vecIt;


Agent Address Information & Payment
Country
Zip
Street Address
City
State
Registration Type & Subscription Types
A
B
50.00
A
B
6 - Months
Make Payment
Cancel


Gujarat High Court Case Information System Print CR.A/430/1999 7/ 7 JUDGMENT IN THE HIGH COURT OF GUJARAT AT AHMEDABAD CRIMINAL APPEAL No. 430 of 1999 For Approval and Signature: HONOURABLE MR.JUSTICE Z.K.SAIYED ========================================================= 1 Whether Reporters of Local Papers may be allowed to see the judgment ? 2 To be referred to the Reporter or not ? 3 Whether their Lordships wish to see the fair copy of the judgment ? 4 Whether this case involves a substantial question of law as to the interpretation of the constitution of India, 1950 or any order made thereunder ? 5 Whether it is to be circulated to the civil judge ? ========================================================= D K SOLANKI LAW OFFICER - Appellant(s) Versus KALANGIDHAR TEXTILE MILLS & 9 - Opponent(s) ========================================================= Appearance : MR SUNIL L MEHTA for Appellant(s) : 1, MR PM VYAS for Opponent(s) : 1, MR HIREN P VYAS for Opponent(s) : 1, MS SEJAL H VYAS for Opponent(s) : 1, NOTICE SERVED for Opponent(s) : 2 - 9. MR DC SEJPAL, APP for Opponent(s) : 10, ========================================================= CORAM : HONOURABLE MR.JUSTICE Z.K.SAIYED Date : 08/12/2010 ORAL JUDGMENT
The present appeal, under section 378 of the Code of Criminal Procedure, 1973, is directed against the judgment and order of acquittal dated 24.04.1998 passed by the learned Chief Metropolitan Magistrate, Ahmedabad, in Criminal Case No. 1552 of 1991, whereby the learned Magistrate has acquitted the respondents - accused from the charges levelled against them.
The brief facts of the prosecution case is that the respondent No. 1 is the company and respondents No.2 to 8 are the Partners of the said respondent No.1 - Company. It is alleged that the said company is engaged in doing the business of processing and finishing of synthetic cloths and discharging the effluent water in river Sabarmati and has not constructed the plant for purifying the said water prepared without purifying the same. It is alleged that on 9.5.1981 the authorized Officers of the Board have visited the factory of respondent No.1 for inspection, after issuing the notice. They have taken the sample water from the said company in presence of factory in-charge. It is alleged that after sealing the sample the same was sent to the Board Analyst for analysis. It is alleged that the Analyst submitted the Report, the copy of which was also sent to the company on 18.6.1991 by registered Post and as per the said Report it was found that the accused have committed the breach of Section 24 & 25 of the Water Act and, therefore, they are responsible for the offences under Sections 43, 44 read with Section 47 of the Water Act. Thereafter, after obtaining sanction complaint has been filed against the respondents - accused. Thereafter, the trial was conducted against the respondents - accused. The trial Court examined the witnesses and also considered the documentary evidence led before it and after considering the documentary as well as oral evidence has acquitted the respondents - accused from the charges levelled against them.
It was contended by learned Advocate Mr. Sunil Mehta for the appellant that the judgment and order of the learned Magistrate is not proper, legal and it is erroneous. He has also contended that the learned Magistrate has not considered the evidence of the witnesses. He has contended that the Board Officers have followed the rules prescribed by law and the Officer of the Board have also followed the procedure of taking the sample. The sample was seized and sealed properly. Yet, the learned Magistrate has not considered the evidence of prosecution. Therefore, the order impugned in this appeal passed by the learned Magistrate requires to be quashed and set aside.
Learned Advocate, appearing for the respondents - original accused, have supported the judgment and order of acquittal passed by the trial Court and contended that the trial Court has rightly acquitted the respondents - accused.
It is a settled legal position that in acquittal appeal, the Appellate Court is not required to re-write the judgment or to give fresh reasonings when the Appellate Court is in agreement with the reasons assigned by the trial court acquitting the accused. In the instant case, this Court is in full agreement with the reasons given and findings recorded by the trial Court while acquitting the respondents- accused and adopting the said reasons and for the reasons aforesaid, in my view, the impugned judgment is just, legal and proper and requires no interference by this Court at this stage. From the perusal of record it appears that the prosecution has not followed Rules framed by the Board, which is mandatory and, therefore, there is no question to entertain this Appeal. Hence, this appeal requires to be dismissed.
Even in a recent decision of the Apex Court in the case of State of Goa V. Sanjay Thakran & Anr. Reported in (2007)3 SCC 75, the Court has reiterated the powers of the High Court in such cases. In para 16 of the said decision the Court has observed as under:
"16.
From the aforesaid decisions, it is apparent that while exercising the powers in appeal against the order of acquittal the Court of appeal would not ordinarily interfere with the order of acquittal unless the approach of the lower Court is vitiated by some manifest illegality and the conclusion arrived at would not be arrived at by any reasonable person and, therefore, the decision is to be characterized as perverse. Merely because two views are possible, the Court of appeal would not take the view which would upset the judgment delivered by the Court below. However, the appellate court has a power to review the evidence if it is of the view that the conclusion arrived at by the Court below is perverse and the Court has committed a manifest error of law and ignored the material evidence on record. A duty is cast upon the appellate court, in such circumstances, to re-appreciate the evidence to arrive to a just decision on the basis of material placed on record to find out whether any of the accused is connected with the commission of the crime he is charged with."
Similar principle has been laid down by the Apex Court in the cases of State of Uttar Pradesh Vs. Ram Veer Singh & Ors, reported in 2007 AIR SCW 5553 and in Girja Prasad (Dead) by LRs Vs. state of MP, reported in 2007 AIR SCW 5589. Thus, the powers which this Court may exercise against an order of acquittal are well settled.
It is also a settled legal position that in acquittal appeal, the appellate court is not required to re-write the judgment or to give fresh reasonings, when the reasons assigned by the Court below are found to be just and proper. Such principle is laid down by the Apex Court in the case of State of Karnataka Vs. Hemareddy, reported in AIR 1981 SC 1417, wherein, it is held as under:
"...
This court has observed in Girija Nandini Devi V.
Bigendra Nandini Chaudhary (1967)1 SCR 93: (AIR 1967 SC 1124) that it is not the duty of the appellate court when it agrees with the view of the trial court on the evidence to repeat the narration of the evidence or to reiterate the reasons given by the trial court expression of general agreement with the reasons given by the Court the decision of which is under appeal, will ordinarily suffice."
Thus, in case the appellate court agrees with the reasons and the opinion given by the lower court, then the discussion of evidence is not necessary.
I have gone through the judgment and order passed by the trial court. I have also perused the oral as well as documentary evidence led by the trial court and also considered the submissions made by learned Advocates for the parties. The trial Court has found that while taking the sample panchnama was not prepared in presence of any independent witness. The trial Court has also found that there is clear braech of provision of Rule 27. The trial Court has also clearly observed that the Board Officers have not followed the mandatory provisions of the Act and the Rules while collecting the sample. The trial Court has clearly found that the prosecution has failed to prove its case beyond reasonable doubt. Even in the present appeal, nothing is produced or pointed out to rebut the conclusion of the trial Court. Thus, from the evidence itself it is established that the prosecution has not proved its case beyond reasonable doubt.
Mr Sunil Mehta learned Advocate for the appellant is not in a position to show any evidence to take a contrary view of the matter or that the approach of the trial court is vitiated by some manifest illegality or that the decision is perverse or that the trial court has ignored the material evidence on record.
In the above view of the matter, I am of the considered opinion that the trial court was completely justified in acquitting the respondent of the charges leveled against him.
I find that the findings recorded by the trial court are absolutely just and proper and in recording the said findings, no illegality or infirmity has been committed by it.
I am, therefore, in complete agreement with the findings, ultimate conclusion and the resultant order of acquittal recorded by the court below and hence find no reasons to interfere with the same. Hence the appeal is hereby dismissed. R & P to be sent back to the trial Court, forthwith. Bail bond, if any, stands cancelled.
(Z.K.
SAIYED, J.) sas Top


Data are saved in files with the extension '*.map' as geographic coordinates Gauss-Krueger or UTM coordinates, and azimuths of dip und dip angle. All files with extension '*.map' of the chosen folder appear in the right list field (The folder is changed with the button 'change directory'). Click on the file with which you want to draw a map. You may also click on more than one file, if you want to draw a map for several files. The choice of files is terminated with the button 'selection ok'. The data of all chosen files appear in the left list field. With the button 'plot' you reach the graphic screen which displays the map.


Interface IFocuser
Defines the capabilities supported by an ASCOM Alpaca Focuser device
Inherited Members
Namespace: ES.Ascom.Alpaca.Devices
Assembly: ES.Ascom.Alpaca.Shared.dll
Syntax
public interface IFocuser : IDevice
Methods
| Improve this Doc View SourceGetMaxIncrement()
Maximum increment size allowed by the focuser; i.e. the maximum number of steps allowed in one move operation.
Declaration
int GetMaxIncrement()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetMaxStep()
Returns the focuser's maximum step size.
Declaration
int GetMaxStep()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetPosition()
Returns the focuser's current position.
Declaration
int GetPosition()
Returns
| Type | Description |
|---|---|
| System.Int32 |
GetStepSize()
Returns the focuser's step size.
Declaration
double GetStepSize()
Returns
| Type | Description |
|---|---|
| System.Double | Step size (microns) for the focuser. |
GetTemperature()
Returns the focuser's current temperature.
Declaration
double GetTemperature()
Returns
| Type | Description |
|---|---|
| System.Double |
Halt()
Immediately stops focuser motion.
Declaration
void Halt()
IsAbsolute()
Indicates whether the focuser is capable of absolute position.
Declaration
bool IsAbsolute()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the focuser is capable of absolute position |
IsMoving()
Indicates whether the focuser is currently moving.
Declaration
bool IsMoving()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the focuser is currently moving to a new position. False if the focuser is stationary. |
IsTempComp()
Gets the state of temperature compensation mode (if available), else always False.
Declaration
bool IsTempComp()
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsTempCompAvailable()
Indicates whether the focuser has temperature compensation.
Declaration
bool IsTempCompAvailable()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if focuser has temperature compensation available. |
Move(Int32)
Moves the focuser by the specified amount or to the specified position depending on the value of the Absolute property.
Declaration
void Move(int position)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | position | Step distance or absolute position, depending on the value of the Absolute property |
SetTempComp(Boolean)
Sets the state of temperature compensation mode.
Declaration
void SetTempComp(bool tempComp)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | tempComp | Set true to enable the focuser's temperature compensation mode, otherwise false for normal operation. |


001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.shiro.realm.ldap; 020 021import org.apache.shiro.authc.AuthenticationException; 022import org.apache.shiro.authc.AuthenticationInfo; 023import org.apache.shiro.authc.AuthenticationToken; 024import org.apache.shiro.authc.SimpleAuthenticationInfo; 025import org.apache.shiro.authc.credential.AllowAllCredentialsMatcher; 026import org.apache.shiro.authz.AuthorizationException; 027import org.apache.shiro.authz.AuthorizationInfo; 028import org.apache.shiro.ldap.UnsupportedAuthenticationMechanismException; 029import org.apache.shiro.realm.AuthorizingRealm; 030import org.apache.shiro.subject.PrincipalCollection; 031import org.apache.shiro.util.StringUtils; 032import org.slf4j.Logger; 033import org.slf4j.LoggerFactory; 034 035import javax.naming.AuthenticationNotSupportedException; 036import javax.naming.NamingException; 037import javax.naming.ldap.LdapContext; 038 039/** 040 * An LDAP {@link org.apache.shiro.realm.Realm Realm} implementation utilizing Sun's/Oracle's 041 * JNDI API as an LDAP API. This is 042 * Shiro's default implementation for supporting LDAP, as using the JNDI API has been a common approach for Java LDAP 043 * support for many years. 044 *
 045 * This realm implementation and its backing {@link JndiLdapContextFactory} should cover 99% of all Shiro-related LDAP 046 * authentication and authorization needs. However, if it does not suit your needs, you might want to look into 047 * creating your own realm using an alternative, perhaps more robust, LDAP communication API, such as the 048 * Apache LDAP API. 049 *
Authentication
 050 * During an authentication attempt, if the submitted {@code AuthenticationToken}'s 051 * {@link org.apache.shiro.authc.AuthenticationToken#getPrincipal() principal} is a simple username, but the 052 * LDAP directory expects a complete User Distinguished Name (User DN) to establish a connection, the 053 * {@link #setUserDnTemplate(String) userDnTemplate} property must be configured. If not configured, 054 * the property will pass the simple username directly as the User DN, which is often incorrect in most LDAP 055 * environments (maybe Microsoft ActiveDirectory being the exception). 056 *
Authorization
 057 * By default, authorization is effectively disabled due to the default 058 * {@link #doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection)} implementation returning {@code null}. 059 * If you wish to perform authorization based on an LDAP schema, you must subclass this one 060 * and override that method to reflect your organization's data model. 061 *
Configuration
 062 * This class primarily provides the {@link #setUserDnTemplate(String) userDnTemplate} property to allow you to specify 063 * the your LDAP server's User DN format. Most other configuration is performed via the nested 064 * {@link LdapContextFactory contextFactory} property. 065 *
 066 * For example, defining this realm in Shiro .ini: 067 *
 068 * [main] 069 * ldapRealm = org.apache.shiro.realm.ldap.DefaultLdapRealm 070 * ldapRealm.userDnTemplate = uid={0},ou=users,dc=mycompany,dc=com 071 * ldapRealm.contextFactory.url = ldap://ldapHost:389 072 * ldapRealm.contextFactory.authenticationMechanism = DIGEST-MD5 073 * ldapRealm.contextFactory.environment[some.obscure.jndi.key] = some value 074 * ... 075 *
 076 * The default {@link #setContextFactory contextFactory} instance is a {@link JndiLdapContextFactory}. See that 077 * class's JavaDoc for more information on configuring the LDAP connection as well as specifying JNDI environment 078 * properties as necessary. 079 * 080 * @see JndiLdapContextFactory 081 * 082 * @since 1.3 083 */ 084public class DefaultLdapRealm extends AuthorizingRealm { 085 086 private static final Logger log = LoggerFactory.getLogger(DefaultLdapRealm.class); 087 088 //The zero index currently means nothing, but could be utilized in the future for other substitution techniques. 089 private static final String USERDN_SUBSTITUTION_TOKEN = "{0}"; 090 091 private String userDnPrefix; 092 private String userDnSuffix; 093 094 /*-------------------------------------------- 095 | I N S T A N C E V A R I A B L E S | 096 ============================================*/ 097 /** 098 * The LdapContextFactory instance used to acquire {@link javax.naming.ldap.LdapContext LdapContext}'s at runtime 099 * to acquire connections to the LDAP directory to perform authentication attempts and authorizatino queries. 100 */ 101 private LdapContextFactory contextFactory; 102 103 /*-------------------------------------------- 104 | C O N S T R U C T O R S | 105 ============================================*/ 106 107 /** 108 * Default no-argument constructor that defaults the internal {@link LdapContextFactory} instance to a 109 * {@link JndiLdapContextFactory}. 110 */ 111 public DefaultLdapRealm() { 112 //Credentials Matching is not necessary - the LDAP directory will do it automatically: 113 setCredentialsMatcher(new AllowAllCredentialsMatcher()); 114 //Any Object principal and Object credentials may be passed to the LDAP provider, so accept any token: 115 setAuthenticationTokenClass(AuthenticationToken.class); 116 this.contextFactory = new JndiLdapContextFactory(); 117 } 118 119 /*-------------------------------------------- 120 | A C C E S S O R S / M O D I F I E R S | 121 ============================================*/ 122 123 /** 124 * Returns the User DN prefix to use when building a runtime User DN value or {@code null} if no 125 * {@link #getUserDnTemplate() userDnTemplate} has been configured. If configured, this value is the text that 126 * occurs before the {@link #USERDN_SUBSTITUTION_TOKEN} in the {@link #getUserDnTemplate() userDnTemplate} value. 127 * 128 * @return the the User DN prefix to use when building a runtime User DN value or {@code null} if no 129 * {@link #getUserDnTemplate() userDnTemplate} has been configured. 130 */ 131 protected String getUserDnPrefix() { 132 return userDnPrefix; 133 } 134 135 /** 136 * Returns the User DN suffix to use when building a runtime User DN value. or {@code null} if no 137 * {@link #getUserDnTemplate() userDnTemplate} has been configured. If configured, this value is the text that 138 * occurs after the {@link #USERDN_SUBSTITUTION_TOKEN} in the {@link #getUserDnTemplate() userDnTemplate} value. 139 * 140 * @return the User DN suffix to use when building a runtime User DN value or {@code null} if no 141 * {@link #getUserDnTemplate() userDnTemplate} has been configured. 142 */ 143 protected String getUserDnSuffix() { 144 return userDnSuffix; 145 } 146 147 /*-------------------------------------------- 148 | M E T H O D S | 149 ============================================*/ 150 151 /** 152 * Sets the User Distinguished Name (DN) template to use when creating User DNs at runtime. A User DN is an LDAP 153 * fully-qualified unique user identifier which is required to establish a connection with the LDAP 154 * directory to authenticate users and query for authorization information. 155 *
Usage
 156 * User DN formats are unique to the LDAP directory's schema, and each environment differs - you will need to 157 * specify the format corresponding to your directory. You do this by specifying the full User DN as normal, but 158 * but you use a {@code {0}} placeholder token in the string representing the location where the 159 * user's submitted principal (usually a username or uid) will be substituted at runtime. 160 *
 161 * For example, if your directory 162 * uses an LDAP {@code uid} attribute to represent usernames, the User DN for the {@code jsmith} user may look like 163 * this: 164 *
 165 *
uid=jsmith,ou=users,dc=mycompany,dc=com
 166 *
 167 * in which case you would set this property with the following template value: 168 *
 169 *
uid={0},ou=users,dc=mycompany,dc=com
 170 *
 171 * If no template is configured, the raw {@code AuthenticationToken} 172 * {@link AuthenticationToken#getPrincipal() principal} will be used as the LDAP principal. This is likely 173 * incorrect as most LDAP directories expect a fully-qualified User DN as opposed to the raw uid or username. So, 174 * ensure you set this property to match your environment! 175 * 176 * @param template the User Distinguished Name template to use for runtime substitution 177 * @throws IllegalArgumentException if the template is null, empty, or does not contain the 178 * {@code {0}} substitution token. 179 * @see LdapContextFactory#getLdapContext(Object,Object) 180 */ 181 public void setUserDnTemplate(String template) throws IllegalArgumentException { 182 if (!StringUtils.hasText(template)) { 183 String msg = "User DN template cannot be null or empty."; 184 throw new IllegalArgumentException(msg); 185 } 186 int index = template.indexOf(USERDN_SUBSTITUTION_TOKEN); 187 if (index < 0) { 188 String msg = "User DN template must contain the '" + 189 USERDN_SUBSTITUTION_TOKEN + "' replacement token to understand where to " + 190 "insert the runtime authentication principal."; 191 throw new IllegalArgumentException(msg); 192 } 193 String prefix = template.substring(0, index); 194 String suffix = template.substring(prefix.length() + USERDN_SUBSTITUTION_TOKEN.length()); 195 if (log.isDebugEnabled()) { 196 log.debug("Determined user DN prefix [{}] and suffix [{}]", prefix, suffix); 197 } 198 this.userDnPrefix = prefix; 199 this.userDnSuffix = suffix; 200 } 201 202 /** 203 * Returns the User Distinguished Name (DN) template to use when creating User DNs at runtime - see the 204 * {@link #setUserDnTemplate(String) setUserDnTemplate} JavaDoc for a full explanation. 205 * 206 * @return the User Distinguished Name (DN) template to use when creating User DNs at runtime. 207 */ 208 public String getUserDnTemplate() { 209 return getUserDn(USERDN_SUBSTITUTION_TOKEN); 210 } 211 212 /** 213 * Returns the LDAP User Distinguished Name (DN) to use when acquiring an 214 * {@link javax.naming.ldap.LdapContext LdapContext} from the {@link LdapContextFactory}. 215 *
 216 * If the the {@link #getUserDnTemplate() userDnTemplate} property has been set, this implementation will construct 217 * the User DN by substituting the specified {@code principal} into the configured template. If the 218 * {@link #getUserDnTemplate() userDnTemplate} has not been set, the method argument will be returned directly 219 * (indicating that the submitted authentication token principal is the User DN). 220 * 221 * @param principal the principal to substitute into the configured {@link #getUserDnTemplate() userDnTemplate}. 222 * @return the constructed User DN to use at runtime when acquiring an {@link javax.naming.ldap.LdapContext}. 223 * @throws IllegalArgumentException if the method argument is null or empty 224 * @throws IllegalStateException if the {@link #getUserDnTemplate userDnTemplate} has not been set. 225 * @see LdapContextFactory#getLdapContext(Object, Object) 226 */ 227 protected String getUserDn(String principal) throws IllegalArgumentException, IllegalStateException { 228 if (!StringUtils.hasText(principal)) { 229 throw new IllegalArgumentException("User principal cannot be null or empty for User DN construction."); 230 } 231 String prefix = getUserDnPrefix(); 232 String suffix = getUserDnSuffix(); 233 if (prefix == null && suffix == null) { 234 log.debug("userDnTemplate property has not been configured, indicating the submitted " + 235 "AuthenticationToken's principal is the same as the User DN. Returning the method argument " + 236 "as is."); 237 return principal; 238 } 239 240 int prefixLength = prefix != null ? prefix.length() : 0; 241 int suffixLength = suffix != null ? suffix.length() : 0; 242 StringBuilder sb = new StringBuilder(prefixLength + principal.length() + suffixLength); 243 if (prefixLength > 0) { 244 sb.append(prefix); 245 } 246 sb.append(principal); 247 if (suffixLength > 0) { 248 sb.append(suffix); 249 } 250 return sb.toString(); 251 } 252 253 /** 254 * Sets the LdapContextFactory instance used to acquire connections to the LDAP directory during authentication 255 * attempts and authorization queries. Unless specified otherwise, the default is a {@link JndiLdapContextFactory} 256 * instance. 257 * 258 * @param contextFactory the LdapContextFactory instance used to acquire connections to the LDAP directory during 259 * authentication attempts and authorization queries 260 */ 261 @SuppressWarnings({"UnusedDeclaration"}) 262 public void setContextFactory(LdapContextFactory contextFactory) { 263 this.contextFactory = contextFactory; 264 } 265 266 /** 267 * Returns the LdapContextFactory instance used to acquire connections to the LDAP directory during authentication 268 * attempts and authorization queries. Unless specified otherwise, the default is a {@link JndiLdapContextFactory} 269 * instance. 270 * 271 * @return the LdapContextFactory instance used to acquire connections to the LDAP directory during 272 * authentication attempts and authorization queries 273 */ 274 public LdapContextFactory getContextFactory() { 275 return this.contextFactory; 276 } 277 278 /*-------------------------------------------- 279 | M E T H O D S | 280 ============================================*/ 281 282 /** 283 * Delegates to {@link #queryForAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken, LdapContextFactory)}, 284 * wrapping any {@link NamingException}s in a Shiro {@link AuthenticationException} to satisfy the parent method 285 * signature. 286 * 287 * @param token the authentication token containing the user's principal and credentials. 288 * @return the {@link AuthenticationInfo} acquired after a successful authentication attempt 289 * @throws AuthenticationException if the authentication attempt fails or if a 290 * {@link NamingException} occurs. 291 */ 292 protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { 293 AuthenticationInfo info; 294 try { 295 info = queryForAuthenticationInfo(token, getContextFactory()); 296 } catch (AuthenticationNotSupportedException e) { 297 String msg = "Unsupported configured authentication mechanism"; 298 throw new UnsupportedAuthenticationMechanismException(msg, e); 299 } catch (javax.naming.AuthenticationException e) { 300 throw new AuthenticationException("LDAP authentication failed.", e); 301 } catch (NamingException e) { 302 String msg = "LDAP naming error while attempting to authenticate user."; 303 throw new AuthenticationException(msg, e); 304 } 305 306 return info; 307 } 308 309 310 protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { 311 AuthorizationInfo info; 312 try { 313 info = queryForAuthorizationInfo(principals, getContextFactory()); 314 } catch (NamingException e) { 315 String msg = "LDAP naming error while attempting to retrieve authorization for user [" + principals + "]."; 316 throw new AuthorizationException(msg, e); 317 } 318 319 return info; 320 } 321 322 /** 323 * Returns the principal to use when creating the LDAP connection for an authentication attempt. 324 *
 325 * This implementation uses a heuristic: it checks to see if the specified token's 326 * {@link AuthenticationToken#getPrincipal() principal} is a {@code String}, and if so, 327 * {@link #getUserDn(String) converts it} from what is 328 * assumed to be a raw uid or username {@code String} into a User DN {@code String}. Almost all LDAP directories 329 * expect the authentication connection to present a User DN and not an unqualified username or uid. 330 *
 331 * If the token's {@code principal} is not a String, it is assumed to already be in the format supported by the 332 * underlying {@link LdapContextFactory} implementation and the raw principal is returned directly. 333 * 334 * @param token the {@link AuthenticationToken} submitted during the authentication process 335 * @return the User DN or raw principal to use to acquire the LdapContext. 336 * @see LdapContextFactory#getLdapContext(Object, Object) 337 */ 338 protected Object getLdapPrincipal(AuthenticationToken token) { 339 Object principal = token.getPrincipal(); 340 if (principal instanceof String) { 341 String sPrincipal = (String) principal; 342 return getUserDn(sPrincipal); 343 } 344 return principal; 345 } 346 347 /** 348 * This implementation opens an LDAP connection using the token's 349 * {@link #getLdapPrincipal(org.apache.shiro.authc.AuthenticationToken) discovered principal} and provided 350 * {@link AuthenticationToken#getCredentials() credentials}. If the connection opens successfully, the 351 * authentication attempt is immediately considered successful and a new 352 * {@link AuthenticationInfo} instance is 353 * {@link #createAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken, Object, Object, javax.naming.ldap.LdapContext) created} 354 * and returned. If the connection cannot be opened, either because LDAP authentication failed or some other 355 * JNDI problem, an {@link NamingException} will be thrown. 356 * 357 * @param token the submitted authentication token that triggered the authentication attempt. 358 * @param ldapContextFactory factory used to retrieve LDAP connections. 359 * @return an {@link AuthenticationInfo} instance representing the authenticated user's information. 360 * @throws NamingException if any LDAP errors occur. 361 */ 362 protected AuthenticationInfo queryForAuthenticationInfo(AuthenticationToken token, 363 LdapContextFactory ldapContextFactory) 364 throws NamingException { 365 366 Object principal = token.getPrincipal(); 367 Object credentials = token.getCredentials(); 368 369 log.debug("Authenticating user '{}' through LDAP", principal); 370 371 principal = getLdapPrincipal(token); 372 373 LdapContext ctx = null; 374 try { 375 ctx = ldapContextFactory.getLdapContext(principal, credentials); 376 //context was opened successfully, which means their credentials were valid. Return the AuthenticationInfo: 377 return createAuthenticationInfo(token, principal, credentials, ctx); 378 } finally { 379 LdapUtils.closeContext(ctx); 380 } 381 } 382 383 /** 384 * Returns the {@link AuthenticationInfo} resulting from a Subject's successful LDAP authentication attempt. 385 *
 386 * This implementation ignores the {@code ldapPrincipal}, {@code ldapCredentials}, and the opened 387 * {@code ldapContext} arguments and merely returns an {@code AuthenticationInfo} instance mirroring the 388 * submitted token's principal and credentials. This is acceptable because this method is only ever invoked after 389 * a successful authentication attempt, which means the provided principal and credentials were correct, and can 390 * be used directly to populate the (now verified) {@code AuthenticationInfo}. 391 *
 392 * Subclasses however are free to override this method for more advanced construction logic. 393 * 394 * @param token the submitted {@code AuthenticationToken} that resulted in a successful authentication 395 * @param ldapPrincipal the LDAP principal used when creating the LDAP connection. Unlike the token's 396 * {@link AuthenticationToken#getPrincipal() principal}, this value is usually a constructed 397 * User DN and not a simple username or uid. The exact value is depending on the 398 * configured 399 *  400 * LDAP authentication mechanism in use. 401 * @param ldapCredentials the LDAP credentials used when creating the LDAP connection. 402 * @param ldapContext the LdapContext created that resulted in a successful authentication. It can be used 403 * further by subclasses for more complex operations. It does not need to be closed - 404 * it will be closed automatically after this method returns. 405 * @return the {@link AuthenticationInfo} resulting from a Subject's successful LDAP authentication attempt. 406 * @throws NamingException if there was any problem using the {@code LdapContext} 407 */ 408 @SuppressWarnings({"UnusedDeclaration"}) 409 protected AuthenticationInfo createAuthenticationInfo(AuthenticationToken token, Object ldapPrincipal, 410 Object ldapCredentials, LdapContext ldapContext) 411 throws NamingException { 412 return new SimpleAuthenticationInfo(token.getPrincipal(), token.getCredentials(), getName()); 413 } 414 415 416 /** 417 * Method that should be implemented by subclasses to build an 418 * {@link AuthorizationInfo} object by querying the LDAP context for the 419 * specified principal.
 420 * 421 * @param principals the principals of the Subject whose AuthenticationInfo should be queried from the LDAP server. 422 * @param ldapContextFactory factory used to retrieve LDAP connections. 423 * @return an {@link AuthorizationInfo} instance containing information retrieved from the LDAP server. 424 * @throws NamingException if any LDAP errors occur during the search. 425 */ 426 protected AuthorizationInfo queryForAuthorizationInfo(PrincipalCollection principals, 427 LdapContextFactory ldapContextFactory) throws NamingException { 428 return null; 429 } 430}


You're in a smoll computa' so i don't know if some animations will work... let's hope they will ps:you'll not see anything cos it's only made 25%
25%


{% comment %}Div that is visible if there are no pages in the course.{% endcomment %}
This course currently has no pages. Create a new page using:
Create new page
{% comment %}
HIDDEN SECTIONS
- The modal for creating new pages.
- The modal for warning the user about page deletions.
{% endcomment %}
{% include 'courses/course/update/manage/modals/new-page-create.html' %}
{% include 'courses/course/update/manage/modals/page-delete-warning.html' %}