STPAPIClient
@interface STPAPIClient : NSObject
A client for making connections to the Stripe API.
-
A shared singleton API client. Its API key will be initially equal to [Stripe defaultPublishableKey].
Declaration
Objective-C
+ (nonnull instancetype)sharedClient;
Swift
class func shared() -> Self
-
Initializes an API client with the given configuration. Its API key will be set to the configuration’s publishable key.
Declaration
Objective-C
- (nonnull instancetype)initWithConfiguration: (nonnull STPPaymentConfiguration *)configuration;
Swift
init(configuration: STPPaymentConfiguration)
Parameters
configuration
The configuration to use.
Return Value
An instance of STPAPIClient.
-
Initializes an API client with the given publishable key.
Declaration
Objective-C
- (nonnull instancetype)initWithPublishableKey: (nonnull NSString *)publishableKey;
Swift
convenience init(publishableKey: String)
Parameters
publishableKey
The publishable key to use.
Return Value
An instance of STPAPIClient.
-
The client’s publishable key.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *publishableKey;
Swift
var publishableKey: String? { get set }
-
The client’s configuration.
Declaration
Objective-C
@property (readwrite, copy, nonatomic) STPPaymentConfiguration *_Nonnull configuration;
Swift
@NSCopying var configuration: STPPaymentConfiguration { get set }
-
In order to perform API requests on behalf of a connected account, e.g. to create a source on a connected account, set this property to the ID of the account for which this request is being made.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *stripeAccount;
Swift
var stripeAccount: String? { get set }
-
Converts a PKPayment object into a Stripe token using the Stripe API.
Declaration
Objective-C
- (void)createTokenWithPayment:(nonnull PKPayment *)payment completion:(nonnull STPTokenCompletionBlock)completion;
Swift
func createToken(with payment: PKPayment, completion: @escaping STPTokenCompletionBlock)
Parameters
payment
The user’s encrypted payment information as returned from a PKPaymentAuthorizationViewController. Cannot be nil.
completion
The callback to run with the returned Stripe token (and any errors that may have occurred).
-
Converts a PKPayment object into a Stripe source using the Stripe API.
Declaration
Objective-C
- (void)createSourceWithPayment:(nonnull PKPayment *)payment completion:(nonnull STPSourceCompletionBlock)completion;
Swift
func createSource(with payment: PKPayment, completion: @escaping STPSourceCompletionBlock)
Parameters
payment
The user’s encrypted payment information as returned from a PKPaymentAuthorizationViewController. Cannot be nil.
completion
The callback to run with the returned Stripe source (and any errors that may have occurred).
-
Converts an STPBankAccount object into a Stripe token using the Stripe API.
Declaration
Objective-C
- (void)createTokenWithBankAccount:(nonnull STPBankAccountParams *)bankAccount completion: (STPTokenCompletionBlock _Nullable)completion;
Swift
func createToken(withBankAccount bankAccount: STPBankAccountParams, completion: STPTokenCompletionBlock? = nil)
Parameters
bankAccount
The user’s bank account details. Cannot be nil. - see: https://stripe.com/docs/api#create_bank_account_token
completion
The callback to run with the returned Stripe token (and any errors that may have occurred).
-
Converts a personal identification number into a Stripe token using the Stripe API.
Declaration
Objective-C
- (void)createTokenWithPersonalIDNumber:(nonnull NSString *)pii completion: (STPTokenCompletionBlock _Nullable)completion;
Swift
func createToken(withPersonalIDNumber pii: String, completion: STPTokenCompletionBlock? = nil)
Parameters
pii
The user’s personal identification number. Cannot be nil. - see: https://stripe.com/docs/api#create_pii_token
completion
The callback to run with the returned Stripe token (and any errors that may have occurred).
-
Converts an
STPConnectAccountParams
object into a Stripe token using the Stripe API.This allows the connected account to accept the Terms of Service, and/or send Legal Entity information.
Declaration
Objective-C
- (void)createTokenWithConnectAccount:(nonnull STPConnectAccountParams *)account completion: (STPTokenCompletionBlock _Nullable)completion;
Swift
func createToken(withConnectAccount account: STPConnectAccountParams, completion: STPTokenCompletionBlock? = nil)
Parameters
account
The Connect Account parameters. Cannot be nil.
completion
The callback to run with the returned Stripe token (and any errors that may have occurred).
-
Uses the Stripe file upload API to upload an image. This can be used for identity verification and evidence disputes.
Declaration
Objective-C
- (void)uploadImage:(nonnull UIImage *)image purpose:(STPFilePurpose)purpose completion:(nullable STPFileCompletionBlock)completion;
Swift
func uploadImage(_ image: UIImage, purpose: STPFilePurpose, completion: STPFileCompletionBlock? = nil)
Parameters
image
The image to be uploaded. The maximum allowed file size is 4MB for identity documents and 8MB for evidence disputes. Cannot be nil. Your image will be automatically resized down if you pass in one that is too large
purpose
The purpose of this file. This can be either an identifing document or an evidence dispute.
completion
The callback to run with the returned Stripe file (and any errors that may have occurred).
-
Converts an STPCardParams object into a Stripe token using the Stripe API.
Declaration
Objective-C
- (void)createTokenWithCard:(nonnull STPCardParams *)card completion:(nullable STPTokenCompletionBlock)completion;
Swift
func createToken(withCard card: STPCardParams, completion: STPTokenCompletionBlock? = nil)
Parameters
card
The user’s card details. Cannot be nil. - see: https://stripe.com/docs/api#create_card_token
completion
The callback to run with the returned Stripe token (and any errors that may have occurred).
-
Converts a CVC string into a Stripe token using the Stripe API.
Declaration
Objective-C
- (void)createTokenForCVCUpdate:(nonnull NSString *)cvc completion:(nullable STPTokenCompletionBlock)completion;
Swift
func createToken(forCVCUpdate cvc: String, completion: STPTokenCompletionBlock? = nil)
Parameters
cvc
The CVC/CVV number used to create the token. Cannot be nil.
completion
The callback to run with the returned Stripe token (and any errors that may have occurred).
-
Creates a Source object using the provided details. Note: in order to create a source on a connected account, you can set your API client’s
stripeAccount
property to the ID of the account.Declaration
Objective-C
- (void)createSourceWithParams:(nonnull STPSourceParams *)params completion:(nonnull STPSourceCompletionBlock)completion;
Swift
func createSource(with params: STPSourceParams, completion: @escaping STPSourceCompletionBlock)
Parameters
params
The details of the source to create. Cannot be nil. - see: https://stripe.com/docs/api#create_source
completion
The callback to run with the returned Source object, or an error.
-
Retrieves the Source object with the given ID. - see: https://stripe.com/docs/api#retrieve_source
Declaration
Objective-C
- (void)retrieveSourceWithId:(nonnull NSString *)identifier clientSecret:(nonnull NSString *)secret completion:(nonnull STPSourceCompletionBlock)completion;
Swift
func retrieveSource(withId identifier: String, clientSecret secret: String, completion: @escaping STPSourceCompletionBlock)
Parameters
identifier
The identifier of the source to be retrieved. Cannot be nil.
secret
The client secret of the source. Cannot be nil.
completion
The callback to run with the returned Source object, or an error.
-
Deprecated
You should poll your own backend to update based on source status change webhook events it may receive.
Starts polling the Source object with the given ID. For payment methods that require additional customer action (e.g. authorizing a payment with their bank), polling allows you to determine if the action was successful. Polling will stop and the provided callback will be called once the source’s status is no longer
pending
, or if the given timeout is reached and the source is stillpending
. If polling stops due to an error, the callback will be fired with the latest retrieved source and the error.Note that if a poll is already running for a source, subsequent calls to
startPolling
with the same source ID will do nothing.Declaration
Objective-C
- (void)startPollingSourceWithId:(nonnull NSString *)identifier clientSecret:(nonnull NSString *)secret timeout:(NSTimeInterval)timeout completion:(nonnull STPSourceCompletionBlock)completion;
Swift
func startPollingSource(withId identifier: String, clientSecret secret: String, timeout: TimeInterval, completion: @escaping STPSourceCompletionBlock)
Parameters
identifier
The identifier of the source to be retrieved. Cannot be nil.
secret
The client secret of the source. Cannot be nil.
timeout
The timeout for the polling operation, in seconds. Timeouts are capped at 5 minutes.
completion
The callback to run with the returned Source object, or an error.
-
Deprecated
Stops polling the Source object with the given ID. Note that the completion block passed to
startPolling
will not be fired whenstopPolling
is called.Declaration
Objective-C
- (void)stopPollingSourceWithId:(nonnull NSString *)identifier;
Swift
func stopPollingSource(withId identifier: String)
Parameters
identifier
The identifier of the source to be retrieved. Cannot be nil.
-
Retrieves the PaymentIntent object using the given secret. - see: https://stripe.com/docs/api#retrieve_payment_intent
Declaration
Objective-C
- (void)retrievePaymentIntentWithClientSecret:(nonnull NSString *)secret completion: (nonnull STPPaymentIntentCompletionBlock) completion;
Swift
func retrievePaymentIntent(withClientSecret secret: String, completion: @escaping STPPaymentIntentCompletionBlock)
Parameters
secret
The client secret of the payment intent to be retrieved. Cannot be nil.
completion
The callback to run with the returned PaymentIntent object, or an error.
-
Confirms the PaymentIntent object with the provided params object.
At a minimum, the params object must include the
clientSecret
.Declaration
Objective-C
- (void)confirmPaymentIntentWithParams: (nonnull STPPaymentIntentParams *)paymentIntentParams completion:(nonnull STPPaymentIntentCompletionBlock) completion;
Swift
func confirmPaymentIntent(with paymentIntentParams: STPPaymentIntentParams, completion: @escaping STPPaymentIntentCompletionBlock)
Parameters
paymentIntentParams
The
STPPaymentIntentParams
to pass to/confirm
completion
The callback to run with the returned PaymentIntent object, or an error.
-
Creates a PaymentMethod object with the provided params object.
Declaration
Objective-C
- (void)createPaymentMethodWithParams: (nonnull STPPaymentMethodParams *)paymentMethodParams completion:(nonnull STPPaymentMethodCompletionBlock) completion;
Swift
func createPaymentMethod(with paymentMethodParams: STPPaymentMethodParams, completion: @escaping STPPaymentMethodCompletionBlock)
Parameters
paymentMethodParams
The
STPPaymentMethodParams
to pass to/v1/payment_methods
. Cannot be nil.completion
The callback to run with the returned PaymentMethod object, or an error.


36 states assembly speakers push for executive order on legislative autonomy
by https://www.facebook.com/CheerfulpraiseAugustine Ehikioya, Abuja
The speakers of the 36 state Houses of Assembly on Thursday urged President Muhammadu Buhari to issue an executive order on the implementation of full autonomy for state legislatures.
The call was part of the agenda of a meeting between President Buhari and the speakers at the Presidential Villa, Abuja.
The speakers were led by the Chairman of the Conference of Speakers of State Houses of Assembly and Lagos State House of Assembly Speaker, Mr. Mudashiru Obasa.
Speaking with State House Correspondents after the meeting, Obasa noted that although the amended 1999 Constitution had incorporated the independence and financial autonomy for state legislatures, it was not being implemented in many states.
Read Also: Buhari, Speakers of Houses of Assembly meet in Aso Rock
According to him, a presidential intervention by way of an executive order would fast-track the implementation across the Federation.
“So, we are urging Mr. President to intervene and speed up the implementation.
“We urged the President to come in by an executive order for this implementation to move faster,” he said.
The group also called for the devolution of powers to the states and local governments through a review of the Exclusive Legislative list.


On august 3, 2004 my friend told me about a drug called dramanine. he said that if you took a whole bottle of them you would trip out, so i decided to check it out. i head over to my local grocery store and took a trip to the pill section. i found the drug and noticed that it cost 5 bucks. so i was like fuck that an i stole 2 bottels. i headed back to my grandma's house where i was staying for the summer and popped all of the pills within seconds of eachother. Washing it down with a little poweraid and then i waited.
About ohh say 45 minutes later i started to trip out. like hardcore, my couzin was with me, he hadnt taken any of the drug. he told me not to go around my grandma because i was so fucked up. about 5 minutes later he went inside and i continued what i was doing outside. i remember sitting there and talking because i thought one of my friends was next to me, i would just talk and then look over and notice that nothing was there. i kept getting mad at myself for talking to nothing but i kept forgetting that i was doing it. the trip lasted for about an hour and then it was done. i went over to my friends house and bragged about it and they seemed mildley interested.
Well here is where the shit started to happen. the next day august 4, 2004 i persuaded 4 other people to take them with me and we went to the grocery store again and proceeded to purchase about 10 bottels of dramanine. we went back to the car sat down and took all of them. i myself took 36 (900 mg) and drove back to my friends house and started to wait.

Then i went downstairs cause thats where everybody was. i only remember a few things from this point. my girlfriend was throwing up from taking the pills, which proceeded to make her friend throw up from watching her throw up. i asked her if she was ok and went into the other room. i sat down for a little while and when i tried to stand back up i remember feeling really drunk. i tried to walk into the other room and i tripped over a cooler hit my head on the ground and i remember feeling the worste pain i had ever felt from hitting my head on solid concrete with nothing stopping it. i remember trying to lift myself back up and i started shaking uncontrollably. 5 seconds later, i collapsed.
from what my friends told me i had a seizure for about 3 minutes and then stopped but i was breathing really hard. well in this time they had called 911 and the next thing i remember is hearing my name. well i felt better waking up cause i knew i was alive, but when i opened my eyes i saw a FUCKING COP hovering over me. he asked me about a billion questions including could i walk, i said yes and tried to get up but they made me lay back odwn. well about a minute later the paramedics got there, and 2 cops helped me up and walked me out to the ambulance.
the ride to the hospital was fun, i found out that my heart rate was 3 times above normal and my blood pressure was as well. the lady asked me what i took and how much and i told her. i remember going to the hospital and waiting in the room upstairs for my mom to get there. she had to drive 45 minutes to get to the hospital because i was visiting with my grandparents. i had to do the whole routiene and drink 2 cups of charcoal (the worse tasting stuff in the fucking world.) i stayed in the hospital for the next 2 hours where they monitored me and the cops came and talked to me once again. they let me go after things seemed to be normal and i had to hear it all the way home from my mom.
about a week later i got a call from a police officer informing me that they were pressing charges and i was like FUCK. well what happened after that is about 3 weeks later i went to court, the judge was nice he gave me 60 days of unsupervised probation (your partents are your probation officers,) a 75$ fine 4 hours of community service and i have to attend rehab once a week for an hour for at least 4 weeks.
my expirence with this drug sucked, if you want to try this i do agree that it can be safe but in smaller doses, but remember that you take the chance of having happen to you happen to me. of you decide after reading this that you want to try it, my only advice is dont take more than 24.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


public interface IUnityAdsListener
| Modifier and Type | Method and Description |
|---|---|
void |
onUnityAdsError(UnityAds.UnityAdsError error,
String message)
Callback for different errors in Unity Ads.
|
void |
onUnityAdsFinish(String placementId,
UnityAds.FinishState result)
Callback after advertisement has closed.
|
void |
onUnityAdsReady(String placementId)
Callback that tells placement is ready to show ads.
|
void |
onUnityAdsStart(String placementId)
Callback for a successful start of advertisement after UnityAds.show.
|
void onUnityAdsReady(String placementId)
placementId
- Placement, as defined in Unity Ads admin toolsvoid onUnityAdsStart(String placementId)
placementId
- Placement, as defined in Unity Ads admin toolsvoid onUnityAdsFinish(String placementId, UnityAds.FinishState result)
placementId
- Placement, as defined in Unity Ads admin toolsresult
- If FinishState.COMPLETED, advertisement was watched to the end without skipping.
If FinishState.SKIPPED, advertisement was skipped.
If FinishState.ERROR, there was a technical error that prevented Unity Ads from showing ads.void onUnityAdsError(UnityAds.UnityAdsError error, String message)
error
- Error categorymessage
- Human-readable error message


| Course Member: | {{firstname}} {{surname}} |
| Email: | {{email}} |
| Role: | {{role}} |
| User ID: | {{user_id}} |
Pageviews
Course Communication {{range_str}}
| Title | Type | Pageviews | Posts |
|---|
Course Assessment {{range_str}}
| Title | Type | Pageviews | Attempts | Average Student Score |
|---|
| Course Member: | {{firstname}} {{surname}} |
| Email: | {{email}} |
| Role: | {{role}} |
| User ID: | {{user_id}} |
| Title | Type | Pageviews | Posts |
|---|
| Title | Type | Pageviews | Attempts | Average Student Score |
|---|


Meeting Room and Castle Rock Community Bandstand Guidelines
- Programs held in the meeting rooms or bandstand venue must not disrupt the use of the library by others.
- Please do not attach any material to walls, windows, doors or hallways leading into the meeting rooms or to the bandstand structure.
- Private parties or receptions are not permitted.
- Groups are responsible for setup and cleanup of chairs, tables and any refreshments. A fee will be charged for cleaning, repairs or replacements due to excessive damage.
- Please end meetings 10 minutes before library closure.
- Light refreshments may be served.
- The use of alcoholic beverages is prohibited unless special permission is granted by the Library Board of Trustees. Please use the Alcohol Use Request Form
to submit an application for special permission.
- Use of tobacco is prohibited everywhere in the library.
- No storage is provided for groups using the library or the bandstand, and the library is not responsible for anything left on the premises.
- Audiovisual and computer equipment available at each library is listed on the reservation form. All technical support is the responsibility of the group booking the room.
- The library manager must grant specific permission for any group wanting to charge a fee for supplies, services or fundraising.
- Permission to use facilities does not constitute endorsement by the library. No advertisement or announcement implying such endorsement is permitted.
- Nonprofit groups may be asked to provide a copy of their IRS Determination Letter, their Articles of Incorporation, or a Tax Exempt Certificate.
- Groups may be asked to provide Proof of Insurance.
Study Room Guidelines
- Rooms may be reserved for a maximum of two hours, once each week and up to one month in advance. Room use may be extended if no one is waiting. Due to large demand for study rooms, your room may be given to another group if you are more than 15 minutes late for your reserved time.
- All other meeting room guidelines apply.
Castle Rock Community Bandstand
- Use of the bandstand is free for nonprofit and community groups, which are given preference in reservations. Proof of status may be required in the form of an IRS Form 501(c)(3), Articles of Incorporation, or a Tax Exempt Certificate.
- For-profit groups may reserve the bandstand when it is available.
- Groups using the bandstand are limited to one event per month.
- The bandstand is available for use during the library's regular hours, and before/after hours with the library manager's approval. Restroom facilities will not be available at after-hours events.
- Events at the bandstand are free and open to the public except by special permission by the library manager; the collection of donations is permissible. CDs or other event-related merchandise may be sold with a valid Business and Sales Tax License from the Town of Castle Rock.
- Cancellations must be made 24 hours in advance of scheduled usage. Please call<PHONE_NUMBER> in the event of inclement weather.
Meeting Room and Community Bandstand Publicity Guidelines:
- Library-sponsored meetings, workshops and events are those that are organized, co-organized or specifically requested by library staff. These events are promoted via Douglas County Libraries' standard publicity channels. Please feel free to contact us about promotions for your library-sponsored program.
- Non-library-sponsored meetings, workshops and events are those scheduled to occur in library meeting rooms or venues, but which do not qualify as library-sponsored events and do not receive support from library staff or resources beyond the provision of the room or venue.
- Please include the following statement on any/all promotional materials, including but not limited to signs/posters, fliers/mailings, press releases, online promotions, and similar advertising:
[Event] is funded and presented by [organization/individual] and is not sponsored by Douglas County Libraries. For more information, please contact [insert your contact name and phone number; do NOT include library contact information without prior consent from the manager of the library where your meeting will be held].


| The page is targeted mainly to make it easier to check and execute web services that Zend Server provides. This plugin scans the entire code of Zend Server and tries to identify all the available web services, yet not all of them appear on the page, and you might find some services missing. The page was created by Gregory Chris<EMAIL_ADDRESS>2016. Enjoy, and visit zend.com to check other products and services. |


When I play an audio element my attention tends to drift. I start opening tabs and reading other things and before I know it I've lost track of what I'm supposed to be listening to.
ArtMix gives the user something to look at and hopefully, keep their attention.
- Download the zip file from this site, or clone the code from git.
- The /artmix folder is the only one you need. I provided the index.html and /audio to make it a complete demo.
- Include in your header (depending on your path):
<link rel="stylesheet" href="artmix/css/artmix.css" />
<script src="artmix/js/config.js"></script>
<script src="artmix/js/artmix.js"></script>
- And a single div with id="artmix":
<div id="artmix">
</div>
- In config.js the editmode should be set to true ("editmode":true). When you load the page the ArtMix box will appear in the upper left corner of the page, like it does on this page. Click on that to open the settings panels. When you're done with the settings, click on the Download button in the lower left. That will open a popup with your new config.js file. Save that in the /artmix directory. When you reload the page you should have all your new settings.
- When You've settled on your settings manually set editmode to false to hide the settings panels for good.
- There's probably a better way to produce the >em>config.js file.
- I'm not crazy about the Setting Panel's style


Across: 1. Beer adds to students’ debts — Head has a desire to change things (14) 9. Mr Damone gets a lot in from the cells (7) 10. I croon “O wand’ring river!” (7) 11. Innocent Eva gets in a mess (5) 12. Tested out body cut into three parts (9) 13. Heir to endless change (6 3) 14. Dog leads one to a court (5) 15. Day off work because of chip lodged in airway? (5) 17. Displaced expert goes round to journalist (9) 20. Is this bread all you need to eat? (9) 22. Literary creature gives thanks when getting in boat... (5) 23. ...Terrible din each creature makes! (7) 24.  The men mess Bill about with extra details (14) Down: 1. Bitter statement after poorly-received main course? (7 2 5) 2. Intimidated over due bill (7) 3. Possible sign of rain, so studies non-waterproof cover (6 3) 4. Urges nicest one to come in (7) 5. Idealistic and fashionable to beat Hislop (7) 6. Sound of Number One around London (5) 7. Bob meets Beatrix — could be a looker! (7) 8. Aristocratic bloomer? (5 3 6) 14. Cleaner motor has a place for maps (9) 16. Roast meat in Spencer’s village (7) 17. Come out on top in a vile PR stunt! (7) 18. Requires ex-pupil Giles to change (7) 19. Run north after South African Arab (7) 21. Provide for universal need abroad (5)


Nokia 2.3 launched. Official Video, Specifications, Release Date, Photos, Price & more
by NayanThis is the dedicated page for the latest entry-level Nokia Android smartphone, Nokia 2.3. You can check out detailed leaked specifications, features, images, videos related to Nokia 2.3 on this page.
Nokia 2.3 comes with a display size of 6.2-inch with HD resolution. It packs a dual-camera setup in a big upgrade over Nokia 2.2. It features a bigger battery of 4000 mAH capacity as compared to Nokia 2.2. Nokia 2.3 also comes with Bluetooth 5.0 as compared to Bluetooth 4.2 on Nokia 2.2.
Nokia 2.3 top features:
- The Nokia 2.3 features a dual camera and comes with ‘Recommended Shot’, a brand-new Nokia phones feature helping you choose the best picture. Whether it’s the mid-air backflip, the family portrait where everyone is actually smiling or the winning goal, ‘Recommended Shot’ automatically captures alternate images before and after the shutter button is pressed and suggests the best one.
- Alongside even more AI-powered features such as ‘Portrait Mode’ and low-light imaging, fans can capture creative images in a variety of settings.
- Save precious time with the Nokia 2.3, which has a dedicated Google Assistant Button. Just use your voice to view upcoming calendar entries, commute times and other info.
- The Nokia 2.3 also comes with biometric face recognition, allowing you to unlock your phone at a glance.
Nokia 2.3 official Specs:
DESIGN
- 3D nano-textured cover
- Colors Cyan Green, Sand, Charcoal
- Size 157.69 x 75.41 x 8.68mm
- Weight 183g
PERFORMANCE
- Operating system Android 9 Pie
- RAM 2 GB DDR3
- CPU Quad-Core MediaTek Helio A22
DISPLAY
- Size 6.2”
- Type HD+ with waterdrop notch
- Display ratio 19:9
CONNECTIVITY
- Cable type Micro USB (USB 2.0)
- SIM cards Dual SIM and Single SIM models available
- SIM card type Nano SIM
- Sensors Ambient light sensor, Proximity sensor, Accelerometer (G-sensor)
- Keys The Google Assistant Button2
NETWORK AND CONNECTIVITY
- Network bands GSM: 850, 900, 1800, 1900 | WCDMA: 1, 5, 8 | LTE: 1, 3, 5, 7, 8, 20, 28, 38, 40, 41 (120MHz)
- Network bands (Latin America and USA) GSM: 850, 900, 1800, 1900 | WCDMA: 1, 2, 4, 5, 8 | LTE: 1, 2, 3, 4, 5, 7, 8, 12/17, 28, 66
- Network bands (India) GSM 850, 900, 1800 | WCDMA: 1, 5, 8 | LTE: 1, 3, 5, 8, 40, 41 (120MHz)
- Network speed LTE Cat 4
- WiFi 802.11 b/g/n
- Bluetooth® 5.0
- No NFC
- GPS/AGPS+GLONASS+Beidou
STORAGE
- Internal storage 32 GB4
- MicroSD card slot Support for up to 512 GB
AUDIO
- 3.5 mm headphone jack
- FM radio receiver (headset required)
- 1 microphone
CAMERA
- Rear cameras 13 MP f/2.2 + 2 MP depth sensing
- Rear flash LED
- Front-facing camera 5 MP f/2.4
- Other Biometric face unlock
POWER
- Battery type Non-removable 4000 mAh3
- Charging 5V/1A compatible
Nokia 2.3 Images gallery:
Nokia 2.3 Intro video:
Nokia 2.3 release Date & Pricing:
The Nokia 2.3 comes in Cyan Green, Sand and Charcoal, and will be available mid-December starting at 109 euros.
You can read our complete Nokia 2.3 coverage by clicking here.


We Stick to the Basics
We take a simple, handmade approach to every cookie. Learn more about our cookie-making process by visiting out about us page.
Not Sure About Salmon Cookies?
"I thought they would be gross, but they actually taste great!" -The Wilkerson Family.
Not sure if Salmon Cookies are for you? Check out our reviews page to see what our customers think about our unique approach to cookies.
We Had a Blast!
Kids' Cookie Day was a success! Check out the pictures from the event on our Instagram.
Fun for the Family!
Do your kids like making cookies? Do they like eating cookies? Then they'll love our Kids' Cookie Day! Join us to learn how to make your very own Salmon Cookies!
Check out our events page for more details.


This is a very simple rough chat application implemented with Angularjs and Faye - Simple pub/sub messaging for the web.
Enter your name and start chatting with every other visitor of this page.


Entries used in tinyobj's own hash table implementation
Hash value
Is this entry filled
Value
Next entry


Error #64: FILE TYPE MISMATCH The file type does not match the file type in the directory entry for the requested file.


Rebecca Iwata Wood
Democrat
Sr Applied Analytics Advisor PayScale
MBA- University of Denver BA - University of Rochester
80226
Donations to Pete Buttigieg, Amy Klobuchar presidential campaigns, protested against the Jeffco school board about 7-8 years ago, walked to support Ed Perlmutter.
none currently (since 11/10/15)
I support the Sakura Foundation, by volunteering. I have not been able to separate from my work restrictions to focus on solely Colorado-based organizations
It has always been, and will continue to be, essential that ALL stakeholders of Colorado be represented fairly and equitably in their government. I use the term stakeholders deliberately, as that primarily business term represents the fact that everyone who lives in Colorado, regardless of race, gender, socioeconomic status, citizen status, or any other label, has a stake in how they should be governed and the redistricting committee is there to ensure fair and equal representation.
I know that there are always complexities associated with multiple parties coming together to formulate a solution. People bring their own experiences, upbringing, cultural norms, biases, and education to the table. It is important to encourage diversity of thought and perspective and for everyone to listen with an open mind to develop a recommendation that is reasonable. As a long-time HR professional, I have substantial experience with helping opposing personalities arrive at a mutually beneficial solution
I have a masters degree in statistics, I work everyday with Tableau visualization software and our own software product to help clients make good business decisions using their compensation software. I teach quantitative methods to WorldatWork members and co-wrote their course. (37+ years). I also built and administer our Pay Equity quantitative analysis and consulting product. While I have a very extensive background in applying logic and reason to all sorts of HR and business problems, I am also a long time manager of people, and have experience resolving conflict and also confronting difficult situations and whenever possible, diffusing them.
female


Before Change
agent, environment = self.prepare(recorder=dict(directory=directory))
for _ in range(3):
states = environment.reset()
terminal = False
while not terminal:
actions = agent.act(states=states)
states, terminal, reward = environment.execute(actions=actions)
agent.observe(terminal=terminal, reward=reward)
agent.close()
// TODO: recorder currently does not include internal states
agent = Agent.create(agent=self.agent_spec(
After Change
runner.close()
files = os.listdir(path=directory)
self.assertEqual(len(files), 10)
self.assertTrue(
all(file.startswith("trace-") and file.endswith(".npz") for file in files)
)


JETM: Five minute tutorial
This tutorial demonstrates some advanced features of JETM. It assumes you have already taken a look at advanced concepts. If you are new to JETM better start with one minute tutorial.
In this tutorial we will enhance a Java™ application such that we are able to gain performance statistics without touching source code at all. Out of convenience we use the Springframework as runtime and performance monitoring infrastructure (and there are further options to do so).
Attention: If you never heard about the Springframework before this tutorial might take longer than five minutes. In this case we recommend reading the introductional material at springframework.org.
Step 1: Prerequisites
The JETM samples archive includes all required sources and dependencies for this tutorial. Download the archive and expand it.
There are two options to execute the tutorial application: If you want to run the tutorial from within your favourite IDE just create a new project from the content of tutorial/five-minute and ensure that
- lib/jetm-{VERSION}.jar,
- lib/jetm-optional-{VERSION}.jar and
- all libraries in tutorial/five-minute/lib
are in your project classpath. Alternatively you can just use ant and run this tutorial from the command line. Therefore a valid ant installation (>= 1.6.x) is required.
Step 2: Examine tutorial source code
Our five minute tutorial application is a simple console grocery store, where you can buy apples, oranges and such. It is made of the Store itself that is using a Dao Mockup for persistence. The class OrderClient acts as a client to our store and is executed with the help of Main.
Starting in Main you will see that the application loads its configuration from five-minute-tutorial.xml, a spring configuration file. This file contains all bean (class) definitions that are wired automatically using constructor injection.
The lines
OrderClient client = (OrderClient) context.getBean("orderClient"); client.execute();
retrieve a fully configured instance of the class OrderClient and execute the demo. The surrounding thread is used to avoid blocking when executed within ant.
Step 3: Run the tutorial application
We are now ready to run the tutorial application. Depending on whether you run the demo from your IDE or from command line the process is slightly different.
| IDE Setup |
1. Compile the demo in your IDE. 2. Execute the main class etm.tutorial.fiveminute.Main. 3. Interact with tutorial application. |
| Command line |
1. Change to directory tutorial/five-minute 2. Execute ant demo from the commandline 3. Interact with tutorial application. |
You should now see at your console the JETM Grocery Store output:
Welcome to the JETM Grocery Store! We currently have in stock: ------------------------------ | ID | Qty | Item | Price | ------------------------------ | 1 | 15 | apples | $2.99 | | 2 | 5 | oranges | $1.49 | | 3 | 20 | bananas | $1.99 | | 4 | 11 | grapes | $2.49 | ------------------------------ Enter item id to order (or 0 exit):
Not that pretty - but works for now;)
Step 4: Enable performance monitoring
If you examine the tutorial classes you will notice that there isn't a single etm.* import. This is because we will monitor execution performance purely by configuration.
Eventually you have noticed in five-minute-tutorial.xml the tag <jetm:runtime>. This Spring 2.0 bean definition attachs a single JETM runtime to the Spring lifecycle. Nevertheless performance monitoring has to be enabled manually on a per-bean basis.
The tag <jetm:monitoring> will be used for this purpose: As you can see in five-minute-tutorial.xml past section <!-- Step 4: ... --> you can register beans using wildcards (*Dao) and complete names (groceryStore). Uncomment the section and restart the application.
<!-- Step 4: Enable performance monitoring --> <jetm:monitoring> <jetm:bean-pattern>*Dao</jetm:bean-pattern> <jetm:bean-pattern>groceryStore</jetm:bean-pattern> </jetm:monitoring>
Interestingly the application is running just like before - and there aren't any performance details. That's because we enabled performance monitoring but did not add means to access the collected details.
Step 5: Access aggregated results
One option to access those details is the build-in HTTP console.
Therefore uncomment the bean definition past <!-- Step 5: ... > and restart the application.
<!-- Step 5: Access aggregated results --> <jetm:console expanded="true"/>
Now point your browser to http://localhost:40000 and you will see aggregated performance statistics.
The attribute expanded in the bean definition decides whether all performance results should be rendered (including the nested ones) or just the top level results only. To see the difference set this property to false (or remove it) and restart the tutorial application.
Step 6: Alter aggregation chain
By default all collected performance data will be buffered and aggregated as soon as a certain threshold was reached. The default threshold is 1000 measurements. However there is one negative side effect: The thread that collected the last result will be used to calculate the aggregated performance statistics.
This negative effect can be minimized by using interval based buffering that buffers collected results for a certain period of time and aggregates them asynchronously. In the example below we enable interval based buffering as JETM runtime feature. Simply uncomment the interval definition past <!-- Step 6: ... > and restart the demo.
<!-- Step 6: Alter aggregation chain --> <jetm:runtime> <jetm:features> <jetm:interval-buffer interval="1000"/> ... </jetm:features> </jetm:runtime>
Step 7: Log raw performance results
While being able to access aggregated performance statistics it still may be useful to have access to raw performance data for post processing. This can be achieved by enabling the JETM runtime feature raw data logging.
<!-- Step 7: Log raw performance results --> <jetm:runtime> <jetm:features> ... <jetm:raw-data-log type="commons"/> </jetm:features> </jetm:runtime>
After restarting the tutorial application raw performance data will be logged to a file called performance.log in the directory tutorial/five-minute. The example above uses Jakarte commons-logging to log the raw performance data.
That's it!
Next...
Now proceed to the remaining JETM documentation.


Solvers are presented with a list of blanks and a list of words.
We can assemble the words into lyrics that fit into the blanks, with slashes corresponding to line breaks (sometimes approximately, as sources differ on where “line breaks” go in lyrics) and other punctuation preserved. If words are capitalized because they’re proper nouns or variations of “I”, their capitalization is preserved, but the capitalization of words at the beginning of lines is not preserved. For Puzzle 3, for example, this gives:
- ‘neath the halo of a streetlamp / [I turned my collar] to the cold and damp
- [I’ve been staring at] the edge of the water / long as I can remember / never really knowing why
- her mind is [Tiffany-twisted] / she got the Mercedes Benz
- [if there’s something strange] / in your neighborhood / who you gonna call?
In addition, some words are bracketed in each line. The key observation solvers must make is that in each line, the bracketed words consist of five syllables and five notes in total, and the notes have exactly two distinct pitches. Solvers who make any attempt to transcribe the notes of the lines should be able to make this observation fairly quickly, or they might observe that the lengths of the bracketed fragments are broadly similar and happen upon counting syllables by trying different ways to measure their length. The title is also a very faint nod to this, referencing the song “Unchained Melody” to suggest that solvers might look at the melody (in addition to loosely describing the way the words in the lyrics have been scrambled.)
Those five notes can be translated into five-bit binary by treating the low pitch as 0 and the high pitch as 1, and then to letters via A = 1, B = 2, etc. Doing this gives:
| Lyric |
Pitches |
Letter |
| ‘neath the halo of a streetlamp / [I turned my collar] to the cold and damp |
00011 |
C |
| [I’ve been staring at] the edge of the water / long as I can remember / never really knowing why |
10101 |
U |
| her mind is [Tiffany-twisted] / she got the Mercedes Benz |
10010 |
R |
| [if there’s something strange] / in your neighborhood / who you gonna call? |
00101 |
E |
The answer, CURE, can be read off one letter per lyric fragment.
Author’s Notes
I had been thinking about the seed of this puzzle idea, interpreting pitches in fragments of popular songs as five-bit binary, since at least Galactic Puzzle Hunt 2018, but I didn’t have any puzzle steps to put before this interpretation step that I was happy with. Even if I did, I thought the puzzle idea was somewhat inelegantly underconstrained, as there were many songs with any given five-bit pattern, but I didn’t have a systematic way to find such songs and any natural puzzle-relevant constraint I could think of would immediately make it overconstrained. So the context of the Infinite Corridor actually provided a nice cover for this puzzle by making the underconstrained nature of the construction a feature — it enabled us to automatically generate dozens of unrelated instances of the puzzle.
I like music puzzles and was prompted to make this puzzle because I felt that there aren’t many puzzles that use already-existing music as “data”, particularly puzzles that don’t directly contain any musical content themselves. I think this is maybe one of the simplest possible ways to use music this way.
In case you’re wondering, all the data for this puzzle was generated manually by listening to songs and keeping an ear out for fragments with two pitches. The letters E, T, I, and R were the hardest to get. I generated most of the data myself by listening to random songs, but a large group of factcheckers listening to all the songs again to catch errors and ambiguities (any remaining errors are, of course, my own). Thanks to Jenna in particular for adding a handful of the rarer patterns at the eleventh hour. In total we used 250 lyric fragments from around 120 distinct songs.
Here's a playlist of all the Unchained songs:


LLDB API Documentation
#include <SBStream.h>
Public Member Functions | |
| SBStream () | |
| ~SBStream () | |
| bool | IsValid () const |
| const char * | GetData () |
| size_t | GetSize () |
| void | Printf (const char *format,...) __attribute__((format(printf |
| void void | RedirectToFile (const char *path, bool append) |
| void | RedirectToFileHandle (FILE *fh, bool transfer_fh_ownership) |
| void | RedirectToFileDescriptor (int fd, bool transfer_fh_ownership) |
| void | Clear () |
Protected Member Functions | |
| lldb_private::Stream * | operator-> () |
| lldb_private::Stream * | get () |
| lldb_private::Stream & | ref () |
Friends | |
| class | SBAddress |
| class | SBBlock |
| class | SBBreakpoint |
| class | SBBreakpointLocation |
| class | SBCommandReturnObject |
| class | SBCompileUnit |
| class | SBData |
| class | SBDebugger |
| class | SBDeclaration |
| class | SBEvent |
| class | SBFileSpec |
| class | SBFileSpecList |
| class | SBFrame |
| class | SBFunction |
| class | SBInstruction |
| class | SBInstructionList |
| class | SBLineEntry |
| class | SBModule |
| class | SBModuleSpec |
| class | SBModuleSpecList |
| class | SBProcess |
| class | SBSection |
| class | SBSourceManager |
| class | SBSymbol |
| class | SBSymbolContext |
| class | SBSymbolContextList |
| class | SBTarget |
| class | SBThread |
| class | SBType |
| class | SBTypeMember |
| class | SBValue |
| class | SBWatchpoint |
Definition at line 19 of file SBStream.h.
| lldb::SBStream::SBStream | ( | ) |
| lldb::SBStream::~SBStream | ( | ) |
| void lldb::SBStream::Clear | ( | ) |
|
protected |
| const char* lldb::SBStream::GetData | ( | ) |
| size_t lldb::SBStream::GetSize | ( | ) |
| bool lldb::SBStream::IsValid | ( | ) | const |
|
protected |
| void lldb::SBStream::Printf | ( | const char * | format, |
| ... | |||
| ) |
| void void lldb::SBStream::RedirectToFile | ( | const char * | path, |
| bool | append | ||
| ) |
| void lldb::SBStream::RedirectToFileDescriptor | ( | int | fd, |
| bool | transfer_fh_ownership | ||
| ) |
| void lldb::SBStream::RedirectToFileHandle | ( | FILE * | fh, |
| bool | transfer_fh_ownership | ||
| ) |
|
protected |
|
friend |
Definition at line 60 of file SBStream.h.
|
friend |
Definition at line 61 of file SBStream.h.
|
friend |
Definition at line 62 of file SBStream.h.
|
friend |
Definition at line 63 of file SBStream.h.
|
friend |
Definition at line 64 of file SBStream.h.
|
friend |
Definition at line 65 of file SBStream.h.
|
friend |
Definition at line 66 of file SBStream.h.
|
friend |
Definition at line 67 of file SBStream.h.
|
friend |
Definition at line 68 of file SBStream.h.
|
friend |
Definition at line 69 of file SBStream.h.
|
friend |
Definition at line 70 of file SBStream.h.
|
friend |
Definition at line 71 of file SBStream.h.
|
friend |
Definition at line 72 of file SBStream.h.
|
friend |
Definition at line 73 of file SBStream.h.
|
friend |
Definition at line 74 of file SBStream.h.
|
friend |
Definition at line 75 of file SBStream.h.
|
friend |
Definition at line 76 of file SBStream.h.
|
friend |
Definition at line 77 of file SBStream.h.
|
friend |
Definition at line 78 of file SBStream.h.
|
friend |
Definition at line 79 of file SBStream.h.
|
friend |
Definition at line 80 of file SBStream.h.
|
friend |
Definition at line 81 of file SBStream.h.
|
friend |
Definition at line 82 of file SBStream.h.
|
friend |
Definition at line 83 of file SBStream.h.
|
friend |
Definition at line 84 of file SBStream.h.
|
friend |
Definition at line 85 of file SBStream.h.
|
friend |
Definition at line 86 of file SBStream.h.
|
friend |
Definition at line 87 of file SBStream.h.
|
friend |
Definition at line 88 of file SBStream.h.
|
friend |
Definition at line 89 of file SBStream.h.
|
friend |
Definition at line 90 of file SBStream.h.
|
friend |
Definition at line 91 of file SBStream.h.


Construct a (non-naïve) function that satisfies the following specification:
forall p:positive, {s:Z &{r:Z | Zpos p = s*s+r /\ s*s <= Zpos p < (s+1)*(s+1)}}


Here is our schedule!
We will post the specs for Season-III soon!
Contacts
Join
us on discord!Email us at<EMAIL_ADDRESS>We will post the specs for Season-III soon!
Join
us on discord!Email us at<EMAIL_ADDRESS>Splinter, Frank Whoee, Ewirkerman, Gavi and Dhallstr


You could win a Galaxy Note 10 in Samsung Malaysia’s latest contest
by Mihai M.Samsung Malaysia has launched a photography contest via Instagram that gives participants a chance to win a Galaxy Note 10. Those who want to participate in the #MYSamsungCreation Contest need to send photos that follow a specific theme. The theme for the first week (November 15-21) is Light & Shadows while week 2 (November 22-28) will treat the subject of Little Things to Focus in Life. The final two weeks will explore themes like The Perspective and The Urban Love.
To join the contest, Samsung fans need to follow Samsung Malaysia on Instagram, take photos based on the weekly theme and submit them using the hashtags #withGalaxy and #MYSamsungCreation, followed by the Galaxy phone model used to capture the photo. They’re also required to tag @SamsungMalaysia and two of their friends in their Instagram submission.
Creativity and originality will be rewarded
Samsung doesn’t seem to have limited the contest to owners of specific Galaxy smartphone models. Evidently, participants who own handsets with less powerful camera setups would be at a disadvantage if Samsung would focus solely on the quality of photos. However, the company claims that the creativity and originality of submissions will be the main factor determining the judges’ final decision. The grand prize winner of a Galaxy Note 10 with 256GB of storage will be announced on December 20.
Interestingly, Samsung doesn’t mention the Galaxy Note 10+ but uses it as a promotional image for the contest, so it’s not entirely clear which one of the two models will be given as the grand prize. Either way, both variants offer similar specs and deliver great photos. You can check some Galaxy Note 10+ photo samples in our review.
As usual, terms and conditions apply so do make sure you read them on the contest page if you wish to join. There’s no limit to how many photos each person can submit, but participants must be residents of Malaysia aged 18 and up.
Galaxy Note 10
- Model: SM-N970F
- Dimensions: 151.0 x71.8x7.9mm
- Display: 6.3"(160.02mm) Super AMOLED
- CPU: Exynos 9825
- Camera: 12 MP, CMOS F2.2 Telephoto & 12MP F1.5/F2.4 77° & 16MP F2.2 123° Ultra-wide
Galaxy Note 10+
- Model: SM-N975F
- Dimensions: 162.3 x 77,2 x 7.9mm
- Display: 6.8"(172.7mm) Super AMOLED
- CPU: Exynos 9825
- Camera: 12 Ultra Wide: 16MP F2.2 (123°) & Wide-angle: 12MP 2PD AF F1.5/F2.4 OIS (77°) & Telephoto: 12MP F2.1 OIS (45°) & DepthVision Camera: VGA


Seb Duggan, PresideCon 2017
adminThumbnail
pickerIcon
width
and height
argumentsquality
(defaults to "highPerformance")settings.assetManager.derivatives.adminCropping = {
permissions = "inherit"
, transformations = [ {
method = "shrinkToFit"
, args = { width=300, height=300 }
} ]
};
width
and/or height
argumentsquality
(defaults to "highPerformance")maintainAspectRatio
(defaults to false)settings.assetManager.derivatives.width300 = {
inEditor = true
, transformations = [ {
method = "resize"
, args = { width=300 }
} ]
};
settings.assetManager.derivatives.square300 = {
transformations = [ {
method = "resize"
, args = { width=300, height=300 }
} ]
};
settings.assetManager.derivatives.square300 = {
transformations = [ {
method = "resize"
, args = {
width = 300, height = 300
, maintainAspectRatio = true
}
} ] };
imageUrl = event.buildLink(
assetId = "..."
, derivative = "bannerImage"
);
derivative
will return the original imagerenderedImage = renderAsset(
assetId = "..."
, args = {
derivative = "bannerImage"
}
);

tagrenderedImage = renderAsset(
assetId = "..."
, args = {
derivative = "bannerImage"
, class = "customClass"
, label = "Image description"
}
);
renderAsset()
uses the default renderer for the file type, e.g. renderers.asset.image.default
renderers.asset.jpg.default
renderedImage = renderAsset(
assetId = "..."
, context = "banner"
);
If context is banner
, a JPEG image asset would be rendered using the first of these that is available:
renderers.asset.jpg.banner
renderers.asset.image.banner
renderers.asset.jpg.default
renderers.asset.image.default
renderers.asset.default
/application/views/renderers/asset/image/banner.cfm
<cfscript>
id = args.id ?: "";
label = args.label ?: "";
imageUrl = event.buildLink(
assetId = id
, derivative = "bannerImage"
);
</cfscript>
/application/views/renderers/asset/image/banner.cfm
<cfoutput>

</cfoutput>
Resized using our 300x300 derivative:
How about a 650x200 banner derivative?
Previous options for dealing with this:
Introduced in Preside 10.9
Introduced in Preside 10.9
Now our square crop will produce this:
...and our banner derivative:
Resized as a 100x100 thumbnail:
Introduced in Preside 10.9
Introduced in Preside 10.9
Simply tell your derivative to use crop hints:
args = {
width = 100
, height = 100
, useCropHint = true
}
Now our thumbnail will look like this:
Crop hints are also useful for cropping portraits:
Crop hints are also useful for cropping portraits:
Crop hints are also useful for cropping portraits:
img.avatar {
border-radius : 50%;
}

<picture/>
src
image if not supportedBrowser support matrix from caniuse.com

sizes
is optional; defaults to image being 100% widesrcset
can include multiple resolutions
content if not supportedBrowser support matrix from caniuse.com
<picture>
<source srcset="large.jpg" media="(min-width: 901px)">
<source srcset="medium.jpg" media="(min-width: 600px)">
<source srcset="small.jpg">

</picture>

elementsrcset
items


Home
Inventory
Maintenance
Add Books
Query Book
Change Book Disposition
Replace Barcode
Query Course
Course Message
Change Book Code/Year
Patron
Check In/Check Out
Patron Schedule
Patron's Previous Books
Patron's Sold Books
Reports
Supervisor
Change Password
Logout
Northwest Missouri State University Textbook Services
Title:
Author:
Publisher:
ISBN:


Modularity and the iOS Status Bar Network Indicator
Gilt recently released Mockingbird Toolbox, an open-source project for iOS intended to make common development tasks easier. The Toolbox is the basic building block of Mockingbird library, which will be released in stages over the coming months. Mockingbird serves as the base layer of Gilt’s award-winning iPhone and iPad applications.
This post is the first in a series that will be highlighting the code available in Mockingbird Toolbox and explaining how you can use it in your iOS projects.
Modularity
Modularity in software design is a key strategy for managing complexity. A well-crafted code module is:
- Focused — it tries to do one main thing; anything else it does is in support of that
- Isolated — it reduces interconnections within code by providing a public API that minimizes the points of contact between modules
- Well-behaved — it doesn’t change global state in a way that interferes with other modules
When separate modules need to interact with a shared resource, modularity becomes more difficult to attain.
In order to be well-behaved, modules need to use shared resources in a way that recognizes the fact that other modules may be using that resource, too.
One way to try to account for that might be to introduce a mechanism for modules to communicate with each other to ensure proper behavior with respect to the shared resource. But doing so would make the modules less focused and isolated.
Gilt’s mobile team faced these sorts of design decisions during the evolution of our iOS apps. One generic solution we built was the MBServiceManager
class, which we’ll discuss further in a future post.
But there was one specific shared resource that required its own solution: namely, the network indicator that appears in the status bar.
The Status Bar Network Indicator
The network indicator is the animated spinner that you sometimes see in the status bar, typically to the right of the other network information in the upper-left corner of the device screen.
The spinner doesn’t appear automatically; instead, applications are responsible for turning it on when they’re using the network, and turning it back off once they’re done. Displaying the network indicator is entirely optional, but polite applications are honest about when they’re consuming the user’s bandwidth.
Applications control the spinner through the UIApplication
’s networkActivityIndicatorVisible
property. Setting the value to YES
causes the animated spinner to appear. Setting the property back to NO
hides the spinner.
You might think that managing the network indicator is as simple as setting networkActivityIndicatorVisible
to YES
when an operation starts and back to NO
when it finishes, but consider what happens when an app sends multiple network requests:
- Network operation A starts
- Network operation B starts
- Network operation B completes
- Network operation C starts
- Network operation A completes
- Network operation C completes
Under this scenario, the spinner should be animating from Step 1 through Step 6.
But that’s not what happens if we directly manipulate the networkActivityIndicatorVisible
property at the start and end of each request. Instead, we get this behavior:
- Spinner appears
- Spinner animating
- Spinner disappears
- Spinner appears
- Spinner disappears
- Spinner remains hidden
Half the time, the network indicator is reflecting the wrong state.
Because the beginning and end of different network operations can be interleaved, the fact that there is only a single on/off value for the network indicator becomes problematic. If more than one set of code attempts to directly manipulate the value of networkActivityIndicatorVisible
, we will get unexpected results.
Network Indicator Coordination
To avoid this problem, we decided upon creating a coordinator for the network indicator. The coordinator provides a simple interface for reporting when operations begin and end. Wherever network operations are performed, our code interacts with the coordinator, which in turn decides when to show and hide the spinner based on what’s happening across the entire application at any given moment.
The coordinator was designed to:
- Maintain a count of in-progress network operations
- Whenever an operation starts, the count would increment
- Whenever one completes, the count would decrement
-
Set
networkActivityIndicatorVisible
property toYES
whenever the count increases from0
to1
-
Set
networkActivityIndicatorVisible
property toNO
whenever the count decreases from1
to0
-
Operate correctly in a multi-threaded environment
Introducing MBNetworkIndicator
The public interface to our coordinator is provided by the MBNetworkIndicator
class, part of the Mockingbird Toolbox open-source project.
Any code that issues network requests can maintain one or more MBNetworkIndicator
objects. Each instance is intended to represent one or more related network operations occurring on a single thread. While those operations are in progress, the MBNetworkIndicator
instance is kept around, and is notified when operations begin and end.
The API consists of three instance methods:
operationStarted
— Called whenever a network operation beginsoperationFinished
— Called whenever a network operation completescancelOperations
— Called to signal that all in-progress operations associated with that specific instance should be considered finished (equivalent to callingoperationFinished
once for each in-progress operation)
Implementation
Every MBNetworkIndicator
instance maintains a counter of network operations that is incremented for each call to its operationStarted
method and decremented for each call to its operationFinished
method.
Calls to those methods also update a master counter, which keeps a single, application-wide count of in-progress operations.
You can think of it this way:
-
The count maintained by any given
MBNetworkIndicator
instance is equal to (the number of times itsoperationStarted
method was called) minus (the number of times itsoperationFinished
method was called) -
The master count is equal to (the number of times
operationStarted
was called on allMBNetworkIndicator
instances) minus (the number of timesoperationFinished
was called on allMBNetworkIndicator
instances)
Whenever the master count of network operations is greater than zero, the status bar network indicator is displayed. Otherwise, when there are no operations, the indicator is hidden.
Canceling Operations
Let’s say you have a UINavigationController
-based app, and any given UIViewController
pushed onto the navigation stack could result in multiple network requests being issued. Further, you handle the user tapping the Back button by hooking into viewWillDisappear:
to cancel any network operations that haven’t yet finished.
In such a case, you might opt to have each UIViewController
maintain its own MBNetworkIndicator
instance. You would call operationStarted
and operationFinished
as requests are processed normally. But within viewWillDisappear:
, you would call cancelOperations
to signal that all pending operations for that view controller have been cancelled.
Calling cancelOperations
is equivalent to calling operationFinished
once for each pending operation.
Maintaining References
To ensure that the master counter balances over time, MBNetworkIndicator
assumes that when an instance is deallocated, it is a signal that there are no related network operations still pending. (This is achieved by a call to cancelOperations
from within dealloc
.)
Because of this, you are expected to maintain strong references to MBNetworkIndicator
instances that are still tracking pending operations.
Thread Safety
Because individual network operations are bound to specific threads, MBNetworkIndicator
instances are designed to be used only on a single thread; instances must not be shared across threads.
However, the underlying mechanism that maintains the master counter and manages showing and hiding the network activity indicator is thread-safe.
The mechanism uses functions declared in <libkern/OSAtomic.h>
to ensure that the master counter is handled correctly when several MBNetworkIndicator
instances are in simultaneous use on multiple threads.
What’s Next
Our MBNetworkIndicator
class is just one way to manage a shared resource while adhering to the principles of modularity.
In subsequent posts, we’ll discuss:
-
The
MBSingleton
protocol and our super-easy way to make singletons -
The
MBServiceManager
class and how we use it to manage shared runtime services that we don’t necessarily want running all the time


Taxi driver makes netizens' blood boil after he attacks a woman for walking too slowly
by sl278A taxi driver has caused netizens' blood to boil after attacking an innocent woman who was crossing the street.
According to news reports, last month in Gwangju, a taxi driver lost control of his anger and left his car to hit the woman. It was reported that he was angry because the woman was crossing the road too slowly for his liking. MBC News revealed the CCTV footage of the incident on November 6 which you can view below.
Netizen comments include:
"He needs to have his license taken away."

"I think that man needs to go to the hospital and get treatment..."
What do you think of this situation?


Please sit down over here be seated
might be beneficiate for work here in this benefit my company
my mother mother's shop
Si So
deal with customers
I have also a good level am fluent in English
applicants into in my
we can have only hire one of you vacancy
Thank you Thanks for coming
I will eagerly wait


Gecode::Int::Linear Namespace Reference
Linear propagators More...
Classes | |
| class | BoolNegTraits< BoolView > |
| Traits for Boolean negation view. More... | |
| class | BoolNegTraits< NegBoolView > |
| Traits for Boolean negation view. More... | |
| class | SupportSet |
| Set for support information More... | |
| class | SupportIter |
| Base-class for support-based iterator. More... | |
| class | PosSupportIter |
| Support-based iterator for positive view. More... | |
| class | NegSupportIter |
| Support-based iterator for negative view. More... | |
| class | NoView |
| No view serves as filler for empty view arrays. More... | |
| class | TermLess |
| Sort linear terms by view. More... | |
| class | LinBin |
| Base-class for binary linear propagators. More... | |
| class | ReLinBin |
| Base-class for reified binary linear propagators. More... | |
| class | EqBin |
| Propagator for bounds consistent binary linear equality More... | |
| class | ReEqBin |
| Propagator for reified bounds consistent binary linear equality More... | |
| class | NqBin |
| Propagator for bounds consistent binary linear disequality More... | |
| class | LqBin |
| Propagator for bounds consistent binary linear less or equal More... | |
| class | GqBin |
| Propagator for bounds consistent binary linear greater or equal More... | |
| class | ReLqBin |
| Propagator for reified bounds consistent binary linear less or equal More... | |
| class | LinTer |
| Base-class for ternary linear propagators. More... | |
| class | EqTer |
| Propagator for bounds consistent ternary linear equality More... | |
| class | NqTer |
| Propagator for bounds consistent ternary linear disquality More... | |
| class | LqTer |
| Propagator for bounds consistent ternary linear less or equal More... | |
| class | Lin |
| Base-class for n-ary linear propagators. More... | |
| class | ReLin |
| Base-class for reified n-ary linear propagators. More... | |
| class | Eq |
| Propagator for bounds consistent n-ary linear equality More... | |
| class | DomEq |
| Propagator for domain consistent n-ary linear equality More... | |
| class | ReEq |
| Propagator for reified bounds consistent n-ary linear equality More... | |
| class | Nq |
| Propagator for bounds consistent n-ary linear disequality More... | |
| class | Lq |
| Propagator for bounds consistent n-ary linear less or equal More... | |
| class | ReLq |
| Propagator for reified bounds consistent n-ary linear less or equal More... | |
| class | LinBoolInt |
| Baseclass for integer Boolean sum. More... | |
| class | EqBoolInt |
| Propagator for integer equal to Boolean sum (cardinality) More... | |
| class | GqBoolInt |
| Propagator for integer less or equal to Boolean sum (cardinality) More... | |
| class | NqBoolInt |
| Propagator for integer disequal to Boolean sum (cardinality) More... | |
| class | ReLinBoolInt |
| Baseclass for reified integer Boolean sum. More... | |
| class | BoolNegTraits |
| Traits for Boolean negation view. More... | |
| class | ReGqBoolInt |
| Propagator for reified integer less or equal to Boolean sum (cardinality) More... | |
| class | ReEqBoolInt |
| Propagator for reified integer equal to Boolean sum (cardinality) More... | |
| class | LinBoolView |
| Base-class for Boolean linear propagators. More... | |
| class | EqBoolView |
| Propagator for equality to Boolean sum (cardinality) More... | |
| class | NqBoolView |
| Propagator for disequality to Boolean sum (cardinality) More... | |
| class | GqBoolView |
| Propagator for greater or equal to Boolean sum (cardinality) More... | |
| class | ScaleBool |
| Coefficient and Boolean view. More... | |
| class | ScaleBoolArray |
| Array of scale Boolean views. More... | |
| class | EmptyScaleBoolArray |
| Empty array of scale Boolean views. More... | |
| class | LinBoolScale |
| Base class for linear Boolean constraints with coefficients. More... | |
| class | EqBoolScale |
| Propagator for equality to Boolean sum with coefficients More... | |
| class | LqBoolScale |
| Propagator for inequality to Boolean sum with coefficients More... | |
| class | NqBoolScale |
| Propagator for disequality to Boolean sum with coefficients More... | |
| class | Term |
| Class for describing linear term . More... | |
Enumerations | |
| enum | BinMod { BM_X0_MIN = 1<<0, BM_X0_MAX = 1<<1, BM_X1_MIN = 1<<2, BM_X1_MAX = 1<<3, BM_ALL = BM_X0_MIN|BM_X0_MAX|BM_X1_MIN|BM_X1_MAX } |
Describe which view has been modified how. More... | |
| enum | TerMod { TM_X0_MIN = 1<<0, TM_X0_MAX = 1<<1, TM_X1_MIN = 1<<2, TM_X1_MAX = 1<<3, TM_X2_MIN = 1<<4, TM_X2_MAX = 1<<5, TM_ALL = TM_X0_MIN|TM_X0_MAX|TM_X1_MIN|TM_X1_MAX|TM_X2_MIN|TM_X2_MAX } |
Describe which view has been modified how. More... | |
Functions | |
| IntRelType | inverse (const IntRelType r) |
| Inverse the relation. | |
| void | eliminate (Term< BoolView > *t, int &n, double &d) |
| Eliminate assigned views. | |
| void | rewrite (IntRelType &r, double &d) |
| Rewrite non-strict relations. | |
| void | post_pos_unit (Home home, Term< BoolView > *t_p, int n_p, IntRelType r, IntView y, int c) |
| void | post_pos_unit (Home home, Term< BoolView > *t_p, int n_p, IntRelType r, ZeroIntView, int c) |
| void | post_pos_unit (Home home, Term< BoolView > *t_p, int n_p, IntRelType r, int c, BoolView b, IntConLevel) |
| void | post_neg_unit (Home home, Term< BoolView > *t_n, int n_n, IntRelType r, IntView y, int c) |
| void | post_neg_unit (Home home, Term< BoolView > *t_n, int n_n, IntRelType r, ZeroIntView, int c) |
| void | post_neg_unit (Home home, Term< BoolView > *t_n, int n_n, IntRelType r, int c, BoolView b, IntConLevel) |
| void | post_mixed (Home home, Term< BoolView > *t_p, int n_p, Term< BoolView > *t_n, int n_n, IntRelType r, IntView y, int c) |
| void | post_mixed (Home home, Term< BoolView > *t_p, int n_p, Term< BoolView > *t_n, int n_n, IntRelType r, ZeroIntView y, int c) |
| template<class View > | |
| void | post_all (Home home, Term< BoolView > *t, int n, IntRelType r, View x, int c) |
| void | post (Home home, Term< BoolView > *t, int n, IntRelType r, IntView y, int c=0, IntConLevel=ICL_DEF) |
| Post propagator for linear constraint over Booleans. | |
| void | post (Home home, Term< BoolView > *t, int n, IntRelType r, int c, IntConLevel=ICL_DEF) |
| Post propagator for linear constraint over Booleans. | |
| void | post (Home home, Term< BoolView > *t, int n, IntRelType r, IntView y, BoolView b, IntConLevel=ICL_DEF) |
| Post propagator for reified linear constraint over Booleans. | |
| void | post (Home home, Term< BoolView > *t, int n, IntRelType r, int c, BoolView b, IntConLevel=ICL_DEF) |
| Post propagator for reified linear constraint over Booleans. | |
| template<class P , class N > | |
| bool | isunit (ViewArray< P > &, ViewArray< N > &) |
| Test if only unit-coefficient arrays used. | |
| template<> | |
| bool | isunit (ViewArray< IntView > &, ViewArray< IntView > &) |
| template<> | |
| bool | isunit (ViewArray< IntView > &, ViewArray< NoView > &) |
| template<> | |
| bool | isunit (ViewArray< NoView > &, ViewArray< IntView > &) |
| template<class Val , class View > | |
| void | bounds_p (ModEventDelta med, ViewArray< View > &x, Val &c, Val &sl, Val &su) |
| template<class Val , class View > | |
| void | bounds_n (ModEventDelta med, ViewArray< View > &y, Val &c, Val &sl, Val &su) |
| template<class Val , class P , class N > | |
| ExecStatus | prop_bnd (Space &home, ModEventDelta med, Propagator &p, ViewArray< P > &x, ViewArray< N > &y, Val &c) |
| template<class Val , class P , class N > | |
| Actor * | eqtobin (Space &, bool, Propagator &, ViewArray< P > &, ViewArray< N > &, Val) |
| Rewriting of equality to binary propagators. | |
| template<class Val > | |
| Actor * | eqtobin (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< NoView > &, Val c) |
| template<class Val > | |
| Actor * | eqtobin (Space &home, bool share, Propagator &p, ViewArray< NoView > &, ViewArray< IntView > &y, Val c) |
| template<class Val > | |
| Actor * | eqtobin (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< IntView > &y, Val c) |
| template<class Val , class P , class N > | |
| Actor * | eqtoter (Space &, bool, Propagator &, ViewArray< P > &, ViewArray< N > &, Val) |
| Rewriting of equality to ternary propagators. | |
| template<class Val > | |
| Actor * | eqtoter (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< NoView > &, Val c) |
| template<class Val > | |
| Actor * | eqtoter (Space &home, bool share, Propagator &p, ViewArray< NoView > &, ViewArray< IntView > &y, Val c) |
| template<class Val > | |
| Actor * | eqtoter (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< IntView > &y, Val c) |
| template<class Val , class P , class N > | |
| Actor * | nqtobin (Space &, bool, Propagator &, ViewArray< P > &, ViewArray< N > &, Val) |
| Rewriting of disequality to binary propagators. | |
| template<class Val > | |
| Actor * | nqtobin (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< NoView > &, Val c) |
| template<class Val > | |
| Actor * | nqtobin (Space &home, bool share, Propagator &p, ViewArray< NoView > &, ViewArray< IntView > &y, Val c) |
| template<class Val > | |
| Actor * | nqtobin (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< IntView > &y, Val c) |
| template<class Val , class P , class N > | |
| Actor * | nqtoter (Space &, bool, Propagator &, ViewArray< P > &, ViewArray< N > &, Val) |
| Rewriting of disequality to ternary propagators. | |
| template<class Val > | |
| Actor * | nqtoter (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< NoView > &, Val c) |
| template<class Val > | |
| Actor * | nqtoter (Space &home, bool share, Propagator &p, ViewArray< NoView > &, ViewArray< IntView > &y, Val c) |
| template<class Val > | |
| Actor * | nqtoter (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< IntView > &y, Val c) |
| template<class Val , class P , class N > | |
| Actor * | lqtobin (Space &, bool, Propagator &, ViewArray< P > &, ViewArray< N > &, Val) |
| Rewriting of inequality to binary propagators. | |
| template<class Val > | |
| Actor * | lqtobin (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< NoView > &, Val c) |
| template<class Val > | |
| Actor * | lqtobin (Space &home, bool share, Propagator &p, ViewArray< NoView > &, ViewArray< IntView > &y, Val c) |
| template<class Val > | |
| Actor * | lqtobin (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< IntView > &y, Val c) |
| template<class Val , class P , class N > | |
| Actor * | lqtoter (Space &, bool, Propagator &, ViewArray< P > &, ViewArray< N > &, Val) |
| Rewriting of inequality to ternary propagators. | |
| template<class Val > | |
| Actor * | lqtoter (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< NoView > &, Val c) |
| template<class Val > | |
| Actor * | lqtoter (Space &home, bool share, Propagator &p, ViewArray< NoView > &, ViewArray< IntView > &y, Val c) |
| template<class Val > | |
| Actor * | lqtoter (Space &home, bool share, Propagator &p, ViewArray< IntView > &x, ViewArray< IntView > &y, Val c) |
| void | eliminate (Term< IntView > *t, int &n, double &d) |
| Eliminate assigned views. | |
| void | rewrite (IntRelType &r, double &d, Term< IntView > *&t_p, int &n_p, Term< IntView > *&t_n, int &n_n) |
| Rewrite all inequations in terms of IRT_LQ. | |
| bool | precision (Term< IntView > *t_p, int n_p, Term< IntView > *t_n, int n_n, double d) |
| Decide the required precision and check for overflow. | |
| template<class Val , class View > | |
| void | post_nary (Home home, ViewArray< View > &x, ViewArray< View > &y, IntRelType r, Val c) |
| Posting n-ary propagators. | |
| void | post (Home home, Term< IntView > *t, int n, IntRelType r, int c, IntConLevel=ICL_DEF) |
| Post propagator for linear constraint over integers. | |
| template<class Val , class View > | |
| void | post_nary (Home home, ViewArray< View > &x, ViewArray< View > &y, IntRelType r, Val c, BoolView b) |
| Posting reified n-ary propagators. | |
| void | post (Home home, Term< IntView > *t, int n, IntRelType r, int c, BoolView b, IntConLevel=ICL_DEF) |
| Post reified propagator for linear constraint. | |
| template<class View > | |
| void | estimate (Term< View > *t, int n, int c, int &l, int &u) |
| Estimate lower and upper bounds. | |
| template<class View > | |
| bool | normalize (Term< View > *t, int &n, Term< View > *&t_p, int &n_p, Term< View > *&t_n, int &n_n) |
| Normalize linear integer constraints. |
Detailed Description
Linear propagators
Enumeration Type Documentation
Describe which view has been modified how.
Definition at line 160 of file int-bin.hpp.
Describe which view has been modified how.
Definition at line 125 of file int-ter.hpp.
Function Documentation
| IntRelType Gecode::Int::Linear::inverse | ( | const IntRelType | r | ) | [inline] |
Inverse the relation.
Definition at line 46 of file bool-post.cpp.
| void Gecode::Int::Linear::eliminate | ( | Term< BoolView > * | t, | |
| int & | n, | |||
| double & | d | |||
| ) | [inline] |
Eliminate assigned views.
Definition at line 61 of file bool-post.cpp.
| void Gecode::Int::Linear::rewrite | ( | IntRelType & | r, | |
| double & | d | |||
| ) | [inline] |
Rewrite non-strict relations.
Definition at line 74 of file bool-post.cpp.
| void Gecode::Int::Linear::post_pos_unit | ( | Home | home, | |
| Term< BoolView > * | t_p, | |||
| int | n_p, | |||
| IntRelType | r, | |||
| IntView | y, | |||
| int | c | |||
| ) |
Definition at line 88 of file bool-post.cpp.
| void Gecode::Int::Linear::post_pos_unit | ( | Home | home, | |
| Term< BoolView > * | t_p, | |||
| int | n_p, | |||
| IntRelType | r, | |||
| ZeroIntView | , | |||
| int | c | |||
| ) |
Definition at line 134 of file bool-post.cpp.
| void Gecode::Int::Linear::post_pos_unit | ( | Home | home, | |
| Term< BoolView > * | t_p, | |||
| int | n_p, | |||
| IntRelType | r, | |||
| int | c, | |||
| BoolView | b, | |||
| IntConLevel | ||||
| ) |
Definition at line 175 of file bool-post.cpp.
| void Gecode::Int::Linear::post_neg_unit | ( | Home | home, | |
| Term< BoolView > * | t_n, | |||
| int | n_n, | |||
| IntRelType | r, | |||
| IntView | y, | |||
| int | c | |||
| ) |
Definition at line 218 of file bool-post.cpp.
| void Gecode::Int::Linear::post_neg_unit | ( | Home | home, | |
| Term< BoolView > * | t_n, | |||
| int | n_n, | |||
| IntRelType | r, | |||
| ZeroIntView | , | |||
| int | c | |||
| ) |
Definition at line 266 of file bool-post.cpp.
| void Gecode::Int::Linear::post_neg_unit | ( | Home | home, | |
| Term< BoolView > * | t_n, | |||
| int | n_n, | |||
| IntRelType | r, | |||
| int | c, | |||
| BoolView | b, | |||
| IntConLevel | ||||
| ) |
Definition at line 307 of file bool-post.cpp.
| void Gecode::Int::Linear::post_mixed | ( | Home | home, | |
| Term< BoolView > * | t_p, | |||
| int | n_p, | |||
| Term< BoolView > * | t_n, | |||
| int | n_n, | |||
| IntRelType | r, | |||
| IntView | y, | |||
| int | c | |||
| ) |
Definition at line 350 of file bool-post.cpp.
| void Gecode::Int::Linear::post_mixed | ( | Home | home, | |
| Term< BoolView > * | t_p, | |||
| int | n_p, | |||
| Term< BoolView > * | t_n, | |||
| int | n_n, | |||
| IntRelType | r, | |||
| ZeroIntView | y, | |||
| int | c | |||
| ) |
Definition at line 399 of file bool-post.cpp.
| void Gecode::Int::Linear::post_all | ( | Home | home, | |
| Term< BoolView > * | t, | |||
| int | n, | |||
| IntRelType | r, | |||
| View | x, | |||
| int | c | |||
| ) | [inline] |
All coefficients are 1
Definition at line 445 of file bool-post.cpp.
| bool Gecode::Int::Linear::isunit | ( | ViewArray< P > & | , | |
| ViewArray< N > & | ||||
| ) | [inline] |
Test if only unit-coefficient arrays used.
Definition at line 48 of file int-nary.hpp.
| bool Gecode::Int::Linear::isunit | ( | ViewArray< IntView > & | , | |
| ViewArray< IntView > & | ||||
| ) | [inline] |
Definition at line 51 of file int-nary.hpp.
| bool Gecode::Int::Linear::isunit | ( | ViewArray< IntView > & | , | |
| ViewArray< NoView > & | ||||
| ) | [inline] |
Definition at line 54 of file int-nary.hpp.
| bool Gecode::Int::Linear::isunit | ( | ViewArray< NoView > & | , | |
| ViewArray< IntView > & | ||||
| ) | [inline] |
Definition at line 57 of file int-nary.hpp.
| void Gecode::Int::Linear::bounds_p | ( | ModEventDelta | med, | |
| ViewArray< View > & | x, | |||
| Val & | c, | |||
| Val & | sl, | |||
| Val & | su | |||
| ) | [related] |
Definition at line 129 of file int-nary.hpp.
| void Gecode::Int::Linear::bounds_n | ( | ModEventDelta | med, | |
| ViewArray< View > & | y, | |||
| Val & | c, | |||
| Val & | sl, | |||
| Val & | su | |||
| ) | [related] |
Definition at line 150 of file int-nary.hpp.
| ExecStatus Gecode::Int::Linear::prop_bnd | ( | Space & | home, | |
| ModEventDelta | med, | |||
| Propagator & | p, | |||
| ViewArray< P > & | x, | |||
| ViewArray< N > & | y, | |||
| Val & | c | |||
| ) | [inline] |
Definition at line 172 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::eqtobin | ( | Space & | , | |
| bool | , | |||
| Propagator & | , | |||
| ViewArray< P > & | , | |||
| ViewArray< N > & | , | |||
| Val | ||||
| ) | [inline] |
Rewriting of equality to binary propagators.
Definition at line 293 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::eqtobin | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< NoView > & | , | |||
| Val | c | |||
| ) | [inline] |
Definition at line 298 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::eqtobin | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< NoView > & | , | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 306 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::eqtobin | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 314 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::eqtoter | ( | Space & | , | |
| bool | , | |||
| Propagator & | , | |||
| ViewArray< P > & | , | |||
| ViewArray< N > & | , | |||
| Val | ||||
| ) | [inline] |
Rewriting of equality to ternary propagators.
Definition at line 332 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::eqtoter | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< NoView > & | , | |||
| Val | c | |||
| ) | [inline] |
Definition at line 337 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::eqtoter | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< NoView > & | , | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 345 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::eqtoter | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 353 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::nqtobin | ( | Space & | , | |
| bool | , | |||
| Propagator & | , | |||
| ViewArray< P > & | , | |||
| ViewArray< N > & | , | |||
| Val | ||||
| ) | [inline] |
Rewriting of disequality to binary propagators.
Definition at line 487 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::nqtobin | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< NoView > & | , | |||
| Val | c | |||
| ) | [inline] |
Definition at line 492 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::nqtobin | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< NoView > & | , | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 500 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::nqtobin | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 508 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::nqtoter | ( | Space & | , | |
| bool | , | |||
| Propagator & | , | |||
| ViewArray< P > & | , | |||
| ViewArray< N > & | , | |||
| Val | ||||
| ) | [inline] |
Rewriting of disequality to ternary propagators.
Definition at line 526 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::nqtoter | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< NoView > & | , | |||
| Val | c | |||
| ) | [inline] |
Definition at line 531 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::nqtoter | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< NoView > & | , | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 539 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::nqtoter | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 547 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::lqtobin | ( | Space & | , | |
| bool | , | |||
| Propagator & | , | |||
| ViewArray< P > & | , | |||
| ViewArray< N > & | , | |||
| Val | ||||
| ) | [inline] |
Rewriting of inequality to binary propagators.
Definition at line 636 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::lqtobin | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< NoView > & | , | |||
| Val | c | |||
| ) | [inline] |
Definition at line 641 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::lqtobin | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< NoView > & | , | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 649 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::lqtobin | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 657 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::lqtoter | ( | Space & | , | |
| bool | , | |||
| Propagator & | , | |||
| ViewArray< P > & | , | |||
| ViewArray< N > & | , | |||
| Val | ||||
| ) | [inline] |
Rewriting of inequality to ternary propagators.
Definition at line 675 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::lqtoter | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< NoView > & | , | |||
| Val | c | |||
| ) | [inline] |
Definition at line 680 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::lqtoter | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< NoView > & | , | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 688 of file int-nary.hpp.
| Actor* Gecode::Int::Linear::lqtoter | ( | Space & | home, | |
| bool | share, | |||
| Propagator & | p, | |||
| ViewArray< IntView > & | x, | |||
| ViewArray< IntView > & | y, | |||
| Val | c | |||
| ) | [inline] |
Definition at line 696 of file int-nary.hpp.
| void Gecode::Int::Linear::eliminate | ( | Term< IntView > * | t, | |
| int & | n, | |||
| double & | d | |||
| ) | [inline] |
Eliminate assigned views.
Definition at line 48 of file int-post.cpp.
| void Gecode::Int::Linear::rewrite | ( | IntRelType & | r, | |
| double & | d, | |||
| Term< IntView > *& | t_p, | |||
| int & | n_p, | |||
| Term< IntView > *& | t_n, | |||
| int & | n_n | |||
| ) | [inline] |
Rewrite all inequations in terms of IRT_LQ.
Definition at line 60 of file int-post.cpp.
| bool Gecode::Int::Linear::precision | ( | Term< IntView > * | t_p, | |
| int | n_p, | |||
| Term< IntView > * | t_n, | |||
| int | n_n, | |||
| double | d | |||
| ) | [inline] |
Decide the required precision and check for overflow.
Definition at line 81 of file int-post.cpp.
| void Gecode::Int::Linear::post_nary | ( | Home | home, | |
| ViewArray< View > & | x, | |||
| ViewArray< View > & | y, | |||
| IntRelType | r, | |||
| Val | c | |||
| ) | [inline] |
Posting n-ary propagators.
Definition at line 142 of file int-post.cpp.
| void Gecode::Int::Linear::post_nary | ( | Home | home, | |
| ViewArray< View > & | x, | |||
| ViewArray< View > & | y, | |||
| IntRelType | r, | |||
| Val | c, | |||
| BoolView | b | |||
| ) | [inline] |
Posting reified n-ary propagators.
Definition at line 375 of file int-post.cpp.
| void Gecode::Int::Linear::estimate | ( | Term< View > * | t, | |
| int | n, | |||
| int | c, | |||
| int & | l, | |||
| int & | u | |||
| ) | [inline] |
Estimate lower and upper bounds.
Estimates the boundaries for a linear expression . If the boundaries exceed the limits as defined in Limits::Int, these boundaries are returned.
- Parameters:
-
t array of linear terms n size of array c constant l lower bound u upper bound
| bool Gecode::Int::Linear::normalize | ( | Term< View > * | t, | |
| int & | n, | |||
| Term< View > *& | t_p, | |||
| int & | n_p, | |||
| Term< View > *& | t_n, | |||
| int & | n_n | |||
| ) | [inline] |
Normalize linear integer constraints.
- Parameters:
-
t array of linear terms n size of array t_p array of linear terms over integers with positive coefficients n_p number of postive terms t_n array of linear terms over integers with negative coefficients n_n number of negative terms
Replaces all negative coefficients by positive coefficients.
- Variables occuring multiply in the term array are replaced by a single occurence: for example, becomes .
- If in the above simplification the value for (or for and ) exceeds the limits for integers as defined in Limits::Int, an exception of type Int::NumericalOverflow is thrown.
Returns true, if all coefficients are unit coefficients


| Top |
Functions
Properties
| gboolean | auto-trim | Read / Write / Construct |
| guint | auto-trim-div | Read / Write / Construct |
| char * | data-file | Read / Write |
| NcmFit * | fit | Read / Write / Construct Only |
| NcmObjArray * | function-array | Read / Write / Construct Only |
| guint | intermediary-log | Read / Write / Construct |
| double | log-time-interval | Read / Write / Construct |
| double | lre-step | Read / Write / Construct |
| double | max-runs-time | Read / Write / Construct |
| guint | min-runs | Read / Write / Construct |
| NcmFitRunMsgs | mtype | Read / Write |
| guint | nthreads | Read / Write |
| int | nwalkers | Read / Write / Construct Only |
| NcmMSetTransKern * | sampler | Read / Write / Construct |
| NcmMSetCatalogTrimType | trim-type | Read / Write / Construct |
| gboolean | use-mpi | Read / Write / Construct |
| NcmFitESMCMCWalker * | walker | Read / Write / Construct Only |
Types and Values
| #define | NCM_FIT_ESMCMC_MIN_SYNC_INTERVAL |
| #define | NCM_FIT_ESMCMC_M2LNL_ID |
| #define | NCM_FIT_ESMCMC_MPI_IN_LEN |
| #define | NCM_FIT_ESMCMC_MPI_OUT_LEN |
Functions
ncm_fit_esmcmc_new ()
NcmFitESMCMC * ncm_fit_esmcmc_new (NcmFit *fit
,gint nwalkers
,NcmMSetTransKern *sampler
,NcmFitESMCMCWalker *walker
,NcmFitRunMsgs mtype
);
FIXME
Parameters
fit |
a NcmFit |
|
nwalkers |
number of walkers |
|
sampler |
inital points sampler NcmMSetTransKern |
|
walker |
[allow-none] | |
mtype |
FIXME |
ncm_fit_esmcmc_new_funcs_array ()
NcmFitESMCMC * ncm_fit_esmcmc_new_funcs_array (NcmFit *fit
,gint nwalkers
,NcmMSetTransKern *sampler
,NcmFitESMCMCWalker *walker
,NcmFitRunMsgs mtype
,NcmObjArray *funcs_array
);
FIXME
Parameters
fit |
a NcmFit |
|
nwalkers |
number of walkers |
|
sampler |
inital points sampler NcmMSetTransKern |
|
walker |
[allow-none] | |
mtype |
FIXME |
|
funcs_array |
a NcmObjArray of scalar functions to include in the catalog. |
ncm_fit_esmcmc_set_data_file ()
void ncm_fit_esmcmc_set_data_file (NcmFitESMCMC *esmcmc
,const gchar *filename
);
FIXME
ncm_fit_esmcmc_set_sampler ()
void ncm_fit_esmcmc_set_sampler (NcmFitESMCMC *esmcmc
,NcmMSetTransKern *sampler
);
ncm_fit_esmcmc_set_mtype ()
void ncm_fit_esmcmc_set_mtype (NcmFitESMCMC *esmcmc
,NcmFitRunMsgs mtype
);
FIXME
ncm_fit_esmcmc_set_nthreads ()
void ncm_fit_esmcmc_set_nthreads (NcmFitESMCMC *esmcmc
,guint nthreads
);
If nthreads
is larger than nwalkers / 2, it will be set to
nwalkers / 2.
ncm_fit_esmcmc_use_mpi ()
void ncm_fit_esmcmc_use_mpi (NcmFitESMCMC *esmcmc
,gboolean use_mpi
);
If use_mpi
is TRUE then the parallelization will be accomplished
using MPI if any slaves are available. If no slaves are available
then it falls back to threads.
Note that parallelization will only occur if the number of threads
set using ncm_fit_esmcmc_set_nthreads()
is larger than one.
ncm_fit_esmcmc_set_auto_trim ()
void ncm_fit_esmcmc_set_auto_trim (NcmFitESMCMC *esmcmc
,gboolean enable
);
If enable
is TRUE turns on the auto-trimming when performing a
run_lre.
ncm_fit_esmcmc_set_auto_trim_div ()
void ncm_fit_esmcmc_set_auto_trim_div (NcmFitESMCMC *esmcmc
,guint div
);
Sets the divisor for the auto trim tests.
ncm_fit_esmcmc_set_auto_trim_type ()
void ncm_fit_esmcmc_set_auto_trim_type (NcmFitESMCMC *esmcmc
,NcmMSetCatalogTrimType ttype
);
Sets the trim type.
ncm_fit_esmcmc_set_min_runs ()
void ncm_fit_esmcmc_set_min_runs (NcmFitESMCMC *esmcmc
,guint min_runs
);
Sets the minimum number of runs between tests.
ncm_fit_esmcmc_set_max_runs_time ()
void ncm_fit_esmcmc_set_max_runs_time (NcmFitESMCMC *esmcmc
,gdouble max_runs_time
);
Sets the maximum time for the runs between tests.
ncm_fit_esmcmc_get_accept_ratio ()
gdouble
ncm_fit_esmcmc_get_accept_ratio (NcmFitESMCMC *esmcmc
);
FIXME
ncm_fit_esmcmc_get_offboard_ratio ()
gdouble
ncm_fit_esmcmc_get_offboard_ratio (NcmFitESMCMC *esmcmc
);
FIXME
ncm_fit_esmcmc_get_accept_ratio_last_update ()
gdouble
ncm_fit_esmcmc_get_accept_ratio_last_update
(NcmFitESMCMC *esmcmc
);
FIXME
ncm_fit_esmcmc_get_offboard_ratio_last_update ()
gdouble
ncm_fit_esmcmc_get_offboard_ratio_last_update
(NcmFitESMCMC *esmcmc
);
FIXME
ncm_fit_esmcmc_run ()
void ncm_fit_esmcmc_run (NcmFitESMCMC *esmcmc
,guint n
);
Runs the Monte Carlo until it reaches the n
-th realization. Note that
if the first_id is non-zero it will run n
- first_id realizations.
ncm_fit_esmcmc_run_lre ()
void ncm_fit_esmcmc_run_lre (NcmFitESMCMC *esmcmc
,guint prerun
,gdouble lre
);
Runs the ESMCMC algorithm until the least relative error is less than lre
.
It runs at least prerun
pre-runs before starting the algorithm.
ncm_fit_esmcmc_run_burnin ()
void ncm_fit_esmcmc_run_burnin (NcmFitESMCMC *esmcmc
,guint prerun
,guint ntimes
);
FIXME
ncm_fit_esmcmc_peek_ser ()
NcmSerialize *
ncm_fit_esmcmc_peek_ser (NcmFitESMCMC *esmcmc
);
Peeks the internal NcmSerialize object from esmcmc
.
ncm_fit_esmcmc_get_catalog ()
NcmMSetCatalog *
ncm_fit_esmcmc_get_catalog (NcmFitESMCMC *esmcmc
);
Gets the generated catalog of esmcmc
.
ncm_fit_esmcmc_peek_catalog ()
NcmMSetCatalog *
ncm_fit_esmcmc_peek_catalog (NcmFitESMCMC *esmcmc
);
Gets the generated catalog of esmcmc
.
ncm_fit_esmcmc_peek_fit ()
NcmFit *
ncm_fit_esmcmc_peek_fit (NcmFitESMCMC *esmcmc
);
Gets the NcmFit object used by the sampler.
ncm_fit_esmcmc_validate ()
gboolean ncm_fit_esmcmc_validate (NcmFitESMCMC *esmcmc
,gulong pi
,gulong pf
);
Recalculates the value of $-2\ln(L)$ and compares with the values found in the catalog. This function is particularly useful to check if any problem occured during a multithread evaluation of the likelihood.
Choosing pf
== 0 performs the validation from pi
to the end.
ncm_fit_esmcmc_peek_walker ()
NcmFitESMCMCWalker *
ncm_fit_esmcmc_peek_walker (NcmFitESMCMC *esmcmc
);
Property Details
The “auto-trim”
property
“auto-trim” gboolean
Whether to automatically trim the catalog.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Default value: FALSE
The “auto-trim-div”
property
“auto-trim-div” guint
Automatically trim divisor.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 100
The “data-file”
property
“data-file” char *
Data filename.
Owner: NcmFitESMCMC
Flags: Read / Write
Default value: NULL
The “fit”
property
“fit” NcmFit *
Fit object.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct Only
The “function-array”
property
“function-array” NcmObjArray *
Functions array.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct Only
The “intermediary-log”
property
“intermediary-log” guint
Number of intermediary logs.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 5
The “log-time-interval”
property
“log-time-interval” double
Time interval between log.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 60
The “lre-step”
property
“lre-step” double
Step size in the lre run.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: [0.01,1]
Default value: 0.1
The “max-runs-time”
property
“max-runs-time” double
Maximum time between runs.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 7200
The “min-runs”
property
“min-runs” guint
Minumum number of runs.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 10
The “mtype”
property
“mtype” NcmFitRunMsgs
Run messages type.
Owner: NcmFitESMCMC
Flags: Read / Write
Default value: NCM_FIT_RUN_MSGS_SIMPLE
The “nthreads”
property
“nthreads” guint
Number of threads to run.
Owner: NcmFitESMCMC
Flags: Read / Write
Default value: 0
The “nwalkers”
property
“nwalkers” int
Number of walkers.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct Only
Allowed values: >= 1
Default value: 1
The “sampler”
property
“sampler” NcmMSetTransKern *
Initial points sampler.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
The “trim-type”
property
“trim-type” NcmMSetCatalogTrimType
Trimming tests to apply.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Default value: NCM_MSET_CATALOG_TRIM_TYPE_ESS
The “use-mpi”
property
“use-mpi” gboolean
Use MPI instead of threads.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Default value: TRUE
The “walker”
property
“walker” NcmFitESMCMCWalker *
Walker object.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct Only


To enable copy/paste between V2 Cloud and your local PC, you must use Google Chrome and have V2 Cloud extension installed. You can download and install the extension at the following address: