text
stringlengths
3
1.04M
# Options Reference Options have a 2-hyphen prefix, e.g. `--format`. The value follows, either separated by a space or an equal sign -- `--format mp3` and `--format=mp3` are equally valid. ## `--access-key` / `--secret-key` **Supported: AWS** The access key and secret key are the credentials that AWS uses to identify your account. If you do not want to put your credentials in a [configuration file](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html), or if you want to use credentials different than what are in your configuration file, you will need to specify them when you run tts-cli. ``` $ tts test.txt test.mp3 --access-key ABCDEFG --secret-key hwl500CZygitV91n ``` ## `--effect` **Supported: GCP** Adds an audio effect (also called an audio profile or a device profile) to the speech after synthesis. Can be specified multiple times -- effects are applied on top of each other in the order given. ``` $ tts test.txt test.mp3 --service gcp --effect handset-class-device ``` See the [GCP documentation](https://cloud.google.com/text-to-speech/docs/audio-profiles) for the available effects. ## `--email` **Supported: GCP** Specifies the email address used to identify the account. This is the same as the `client_email` for your GCP project. ``` $ tts test.txt test.mp3 --service gcp --email starting-account-kjd6bvn58@alert-vista-12345.iam.gserviceaccount.com --private-key-file .\key.pem ``` ## `--engine` **Supported: AWS** Specifies the voice engine to use for generating the speech. ``` $ tts test.txt test.mp3 --engine neural ``` See the [AWS documentation](https://docs.aws.amazon.com/polly/latest/dg/NTTS-main.html) for the available engines. ## `--ffmpeg` **Supported: AWS, GCP** Specifies the location of the `ffmpeg` program on your machine. Ideally, the program would automatically be located (usually through the `PATH` environment variable), but you can specify it manually. ``` $ tts test.txt test.mp3 --ffmpeg C:\ffmpeg\ffmpeg.exe ``` ## `--format` **Supported: AWS, GCP** Specifies the audio format you want for the output file. Possible values: * `mp3` (default) * `ogg` -- [Vorbis](https://en.wikipedia.org/wiki/Vorbis) (AWS) or [Opus](https://en.wikipedia.org/wiki/Opus_(audio_format)) (GCP) audio wrapped inside an Ogg container. * `ogg_vorbis` -- Deprecated, use `ogg` instead. * `pcm` -- Audio in a linear PCM sequence (signed 16-bit, 1 channel mono, little-endian format). Audio frequency depends on the `--sample-rate` option. AWS returns raw audio; GCP includes a WAV file header. ``` $ tts test.txt test.ogg --format ogg ``` ## `--gain` **Supported: GCP** Volume gain (in dB), from -96.0 to 16.0. A value of 0.0 will play at normal native signal amplitude. A value of -6.0 will play at approximately half the amplitude. A value of +6.0 will play at approximately twice the amplitude. ``` $ tts test.txt test.mp3 --service gcp --gain 6 ``` Note that negative gains must be specified using the equal-sign syntax, otherwise the value is interpreted as an option name: ``` $ tts test.txt test.mp3 --service gcp --gain=-12 ``` ## `--gender` **Supported: GCP** Gender of the voice. Leave it unspecified if you don't care what gender the selected voice will have. * `male` for a male voice * `female` for a female voice * `neutral` for a gender-neutral voice ``` $ tts test.txt test.mp3 --service gcp --gender female ``` ## `--language` **Supported: GCP** Language for the voice, expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag (e.g. `en-US`, `es-419`, `cmn-tw`). This should not include a script tag (e.g. use `cmn-cn` rather than `cmn-Hant-cn`). Defaults to `en-US` if not specified. > Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using `en-US` rather than `en-CA` if there isn't a Canadian voice available), or even a different language, e.g. using `nb` (Norwegian Bokmal) instead of `no` (Norwegian). ``` $ tts test.txt test.mp3 --service gcp --language zh-CN ``` ## `--lexicon` **Supported: AWS** Applies a stored pronunciation lexicon. (See the AWS Polly documentation on [managing lexicons](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html).) Lexicons are applied only if the language of the lexicon is the same as the language of the voice. Can be specified multiple times. ``` $ tts test.txt test.ogg --lexicon lexicon1 --lexicon lexicon2 ``` ## `--pitch` **Supported: GCP** Changes the speaking pitch (in semitones), from -20.0 to 20.0. ``` $ tts test.txt test.mp3 --service gcp --pitch 10 ``` Note that negative pitch must be specified using the equal-sign syntax, otherwise the value is interpreted as an option name: ``` $ tts test.txt test.mp3 --service gcp --pitch=-10 ``` ## `--private-key` / `--private-key-file` **Supported: GCP** Specifies the private key (`--private-key`), or the file containing the private key (`--private-key-file`), used to make secure requests to Google Cloud. It should be either in [PEM format](http://how2ssl.com/articles/working_with_pem_files/) (beginning with "-----BEGIN PRIVATE KEY-----" and ending with "-----END PRIVATE KEY-----") or in [PKCS #12](https://en.wikipedia.org/wiki/PKCS_12) format. You must also specify `--email` if you use either option. For security and ease of use, `--private-key-file` is recommended over `--private-key`. ``` $ tts test.txt test.mp3 --service gcp --email [email protected] --private-key-file .\key.pem ``` ``` $ tts test.txt test.mp3 --service gcp --email [email protected] --private-key "-----BEGIN PRIVATE KEY-----\nMIIEvQIBA......DAAMY=\n-----END PRIVATE KEY-----\n" ``` ## `--project-file` **Supported: GCP** Specifies the `.json` file with your project configuration. When setting up a Google Cloud project, you should be able to download a project file that looks something like this: ```json { "type": "service_account", "project_id": "alert-vista-895093", "private_key_id": "ad386093c2ab", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBAD....AAMY=\n-----END PRIVATE KEY-----\n", "client_email": "[email protected]", "client_id": "6873947275063", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/my-account-gj38dl%40alert-vista-895093.iam.gserviceaccount.com" } ``` If you save this file to your computer, you can then invoke tts-cli and use the `--project-file` option to point to that file. ``` $ tts test.txt test.mp3 --service gcp ---project-file .\my-project.json ``` ## `--project-id` **Supported: GCP** Specifies the ID used to identify your project. Usually you'll want to use `--project-file`, or `--email` + `--private-key-file`, to identify your project instead. ``` $ tts test.txt test.mp3 --service gcp --email [email protected] ---project-id grape-spaceship-123 ``` ## `--region` **Supported: AWS** Specifies the [AWS region](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html) to send requests to. Using a region closer to your location may result in faster processing, but note that regions may vary in cost. ``` $ tts test.txt test.mp3 --region us-west-2 ``` ## `--sample-rate` **Supported: AWS, GCP** Specifies the audio frequency (in Hz). * Valid values for `mp3` and `ogg` formats are `8000`, `11025` (GCP only), `16000`, `22050` (default), `32000` (GCP only), `44100` (GCP only), and `48000` (GCP only). * Valid values for `pcm` are `8000`, `11025` (GCP only), `16000` (default), and `22050` (GCP only). ``` $ tts test.txt test.mp3 --sample-rate 8000 ``` ## `--service` **Supported: AWS, GCP** Specifies which service to use: * `aws` to use AWS Polly (default) * `gcp` to use Google Cloud Text-to-Speech ``` $ tts test.txt test.mp3 --service gcp ``` ## `--speed` **Supported: GCP** Specifies the speaking rate, from 0.25 to 4.0, where 1.0 is normal speed. Using 2.0 will result in speech that is twice as fast, while 0.5 will result in speech that is half as fast as normal. ``` $ tts test.txt test.mp3 --service gcp --speed 2 ``` ## `--throttle` **Supported: AWS, GCP** Indicates how many simultaneous requests to make against the service. A higher number will send requests faster to AWS or GCP, but will use of more of your bandwidth, and the service may reject your requests if you send too many at a time. ``` $ tts test.txt test.mp3 --throttle 2 ``` ## `--type` **Supported: AWS, GCP** Specifies the type of input text. * `text` indicates plain text (default). * `ssml` indicates an [SSML](https://www.w3.org/TR/speech-synthesis/)-formatted document. The document must be valid, well-formed SSML. Support and extensions to SSML elements vary by service; check the [AWS docs](https://docs.aws.amazon.com/polly/latest/dg/supported-ssml.html) and [GCP docs](https://cloud.google.com/text-to-speech/docs/ssml) for details. ``` $ tts test.ssml test.mp3 --type ssml ``` ## `--voice` **Supported: AWS, GCP** Indicates the voice to use for speech. AWS has a [collection of voices](https://docs.aws.amazon.com/polly/latest/dg/voicelist.html) available. The default is `Joanna`. ``` $ tts test.ssml test.mp3 --service aws --voice Geraint ``` GCP will choose a voice based on the `--language` and `--gender` values (either specified by you or from the defaults); there is no default voice. You can still specify a voice name using this option -- see the list of [supported voices](https://cloud.google.com/text-to-speech/docs/voices). ``` $ tts test.ssml test.mp3 --service gcp --voice en-US-Standard-E ```
# dronekit-python tests Before running, make sure to export your api keys: ``` export DRONEAPI_KEY=<app id>.<app key> ``` Run tests using nose (`pip install nose`): ``` $ nosetests .............. ---------------------------------------------------------------------- Ran _ tests in _.___s OK ```
Menards Gas Fireplaces – Through the thousand pictures on the web in relation to menards gas fireplaces, we selects the very best choices together with greatest resolution simply for you all, and now this photos is actually considered one of photographs choices in your greatest graphics gallery in relation to Menards Gas Fireplaces. I hope you will think it’s great. submitted by admin in 2018-04-02 12:05:19. To find out just about all graphics in Menards Gas Fireplaces images gallery make sure you adhere to this kind of url.
In case you are considering betting on greyhounds then betting totally on luck might not exactly deliver you the desired results. Instead, a little help in the form of scientific calculations could ensure that you win nearly all your bets. Therefore, it is possible to certainly race to top place with free betting systems greyhounds betting bonus. Greyhound racing is actually a sport that is similar to horse racing, but whereas horses need jockeys to egg them on, greyhounds run the race entirely on their own. But, still there are always greyhounds that command a more substantial bet once they consistently show up on the first three spots. Other dogs are usually mentioned as staying out of the board, if they normally fail to make it to the top three places. If you are serious about winning on racing greyhounds then you will have to pay heed to the following points regarding any greyhound. You should check the class in which the greyhound specializes, its current form, the rate at which it makes the initial burst, the trap draw and the amount that you can consider betting on that dog. All these factors are crucial should you prefer a higher chance at winning your bet. If this gets really perplexing then you could simply hop onto the internet where you will find many experts offering free greyhound betting systems that combine all of the above parameters. Many companies offer the software totally free of charge although some offer a free trial on premium packages that combine additional features to supply a detailed report. A great free betting system should ask for all the relevant information related to any race and process the information logically to show winners which also seem sensible to you. You can start out with smaller bets to determine if the betting system truly works or only runs on a brief winning streak before fizzling out. Be sure to follow the instructions provided by any free betting system for this to work perfectly. Whether you download a free or even a premium betting system just be sure you consult friends or fellow bettors before betting with your precious money. Also, make certain you bet only if you’ve got money to spare since it is essential that you have fun while betting. All that you should do in order to get into the virtual greyhound betting arena will be to open an account with any of the online betting sites or bookmakers and you’re simply ready to place your bets. You ought to check around for reliable bookmakers that offer higher odds before playing with them. Playing with many bookmakers at once will improve your chances of winning, although you will also require more money to sustain that strategy. Do not download a general betting system even if it really is totally free because the parameters in the sport like soccer are completely different than betting on horses or greyhounds. Decide on a system that focuses solely on greyhound racing link. Hence, it is vital to study greyhound racing from all angles including the sport itself as well as the betting strategies that hold an improved promise. You can also download free betting systems greyhounds and try them on a continuous basis to evaluate for good results. If a particular betting system is working wonders on your betting results then simply race ahead along with it.
Before / After: Frau M.N. At Moser Medical, I was convinced about going forward with the procedure because I felt such a great sense of trust in the professionals there. The result is more than convincing, and I recommend Moser Medical.
blockchain ========== [![Build Status](http://img.shields.io/travis/qchain/btcd.svg)] (https://travis-ci.org/qchain/btcd) [![ISC License] (http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] (http://godoc.org/github.com/qchain/btcd/blockchain) Package blockchain implements bitcoin block handling and chain selection rules. The test coverage is currently only around 60%, but will be increasing over time. See `test_coverage.txt` for the gocov coverage report. Alternatively, if you are running a POSIX OS, you can run the `cov_report.sh` script for a real-time report. Package blockchain is licensed under the liberal ISC license. There is an associated blog post about the release of this package [here](https://blog.conformal.com/btcchain-the-bitcoin-chain-package-from-bctd/). This package has intentionally been designed so it can be used as a standalone package for any projects needing to handle processing of blocks into the bitcoin block chain. ## Installation and Updating ```bash $ go get -u github.com/qchain/btcd/blockchain ``` ## Bitcoin Chain Processing Overview Before a block is allowed into the block chain, it must go through an intensive series of validation rules. The following list serves as a general outline of those rules to provide some intuition into what is going on under the hood, but is by no means exhaustive: - Reject duplicate blocks - Perform a series of sanity checks on the block and its transactions such as verifying proof of work, timestamps, number and character of transactions, transaction amounts, script complexity, and merkle root calculations - Compare the block against predetermined checkpoints for expected timestamps and difficulty based on elapsed time since the checkpoint - Save the most recent orphan blocks for a limited time in case their parent blocks become available - Stop processing if the block is an orphan as the rest of the processing depends on the block's position within the block chain - Perform a series of more thorough checks that depend on the block's position within the block chain such as verifying block difficulties adhere to difficulty retarget rules, timestamps are after the median of the last several blocks, all transactions are finalized, checkpoint blocks match, and block versions are in line with the previous blocks - Determine how the block fits into the chain and perform different actions accordingly in order to ensure any side chains which have higher difficulty than the main chain become the new main chain - When a block is being connected to the main chain (either through reorganization of a side chain to the main chain or just extending the main chain), perform further checks on the block's transactions such as verifying transaction duplicates, script complexity for the combination of connected scripts, coinbase maturity, double spends, and connected transaction values - Run the transaction scripts to verify the spender is allowed to spend the coins - Insert the block into the block database ## Examples * [ProcessBlock Example] (http://godoc.org/github.com/qchain/btcd/blockchain#example-BlockChain-ProcessBlock) Demonstrates how to create a new chain instance and use ProcessBlock to attempt to attempt add a block to the chain. This example intentionally attempts to insert a duplicate genesis block to illustrate how an invalid block is handled. * [CompactToBig Example] (http://godoc.org/github.com/qchain/btcd/blockchain#example-CompactToBig) Demonstrates how to convert the compact "bits" in a block header which represent the target difficulty to a big integer and display it using the typical hex notation. * [BigToCompact Example] (http://godoc.org/github.com/qchain/btcd/blockchain#example-BigToCompact) Demonstrates how to convert how to convert a target difficulty into the compact "bits" in a block header which represent that target difficulty. ## GPG Verification Key All official release tags are signed by Conformal so users can ensure the code has not been tampered with and is coming from the qchain developers. To verify the signature perform the following: - Download the public key from the Conformal website at https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt - Import the public key into your GPG keyring: ```bash gpg --import GIT-GPG-KEY-conformal.txt ``` - Verify the release tag with the following command where `TAG_NAME` is a placeholder for the specific tag: ```bash git tag -v TAG_NAME ``` ## License Package blockchain is licensed under the [copyfree](http://copyfree.org) ISC License.
The Wyong Creek Hall is available for hire for weddings, birthdays, family functions, business conferences, public meetings, art shows, yoga classes and theatrical performances. We are sorry that we cannot permit birthday parties for the 18 to 21 year old age group. Hall hire rates depend on the type of function and length of time the hall is required. Please contact us for a quote. Click on the link to download a copy of the Wyong Creek Hall Hire Agreement.
Alternantheras are tender, low growing spreading plants most often used for bedding or borders. Native to South America, the plants belong to the Amaranth family (Amaranthacaeae). Propagation is done by sowing seed, by taking cuttings, or by root division. Seed should be sown in a soiless mix (1 part sphagnum peat to 1 part sand) in pots, trays or prepared beds. Temperature should be maintained at above 65F until germination. Seedlings can then be transplanted to larger containers, or outdoors temperatures remain above 65F. To propagate from cuttings, remove the tips of the shoots and insert into sand or sandy soil in pots, trays or prepared beds in a greenhouse (in cooler climates) or outdoors in early spring when the temperatures remain above 65F. Keep planting medium moist, but not soggy. When rooted, the seedlings may be transplanted to larger containers or outdoors (if outdoor temperatures remain 65F or above). To propagate by root division, dig existing plants, pry the roots apart into several smaller plants and transplant into containers, or outdoors in a prepared bed. Plants can be sheared in the summer to maintain compact growth. Purple Knight - Alternanthera dentata - Annual - Foliage plant with deep purple leaves for use in bedding or containers. Spreads to 30 inches. Full sun or Partial shade; height: 16in.
Travel the world through your kitchen this year as you explore the cooking of far-off lands with Prue Leith Chefs Academy in this new course. Join us as we travel to Italy, France, the Middle East and Mexico. Each course will focus on the flavours and specific cooking techniques of the culture and culminate in an authentic festive feast. Refreshments – lunch or dinner and a glass of wine or beverage. Understand the flavours and food culture. Special equipment and cooking techniques. Preparing a three course buffet. Prepared recipes will be served as lunch or dinner.
Claim and/or create your business’s local presence on the three main map listing services. A map listing is slightly different on Google, Bing and Yahoo, but they all do the same thing- help people searching for local businesses find yours. They are the new Yellow Pages and they are more integrated than ever before thanks to mobile devices (iPad’s) and smartphones (Droids). Take about 10 minutes and create your Google Map Business Listing. This is called Google Places for Businesses. Follow this link for Google Places for Business. Then take a few more minutes and create your Bing Map Listing, called Bing Business Portal. This as of (12/12/2012) is in the BETA stages. Follow this link for Bing Business Portal. And lets not forget Yahoo’s map listing service. Follow the link for Yahoo’s Map Listing service. Create as many directory categories as possible and keep them related to your business. For example, I manage one of the largest Tanning Salon chains in the USA, so we have them for Google Maps in five different categories such as Tanning Salon, Beauty Salon, Tanning Product Retailer, Sunless Tanning Salon, etc. Make sure your information is correct (number, address, store hours, payment methods) and be sure to include your website link in the correct format. I prefer the http://www. format which almost always works. The map listing is a powerful back-link for your website. So if you do not have one, work with a qualified web designer. More on this a bit later. Add pictures and once claimed change the header with a professional custom header. When you are in the claiming process, add as many hi-quality pictures of the store, products and maybe a picture of you or your staff. Now that you have created your businesses map listing, then we need to go check some of the other review site and directory listing services and create a presence there. The same process is similar where you will need to create or claim each listing as yours. Now understand there are hundreds of these so lets focus on the more important ones. Head over to Yelp for business owners and create or claim your page there. Once you have, respond to any negative reviews with a positive progressive response. Make sure to private message your best positive comments and make a personal connection with them. These are the people that will rave about your business everywhere offline, so get to know them so they refer you by name! Lastly, to claim a page, you will need to answer the work phone and/or submit an official bill (electrical). If you are a restaurant, head over to UrbanSpoon and Open Table and take care of those directory listings. Same process as Yelp. I would also recommend claiming your Foursquare listing, Yellow Pages listing, creating a SuperPages listing, Merchant Circle, and above all your Google + business listing. If you are a professional, LinkedIn is a must have. There are so many, here is a top 20 business directory list as of 2012. There are so many articles on social media strategy and ideas on how to engage your audience. For example, you don’t want to have traits like the 12 most annoying Facebook users. I recommend developing a message that is on point and relates to what you do. For example, if you are a restaurant did you come up with a new menu item? Did you win an award? Did you donate money for Hurricane Sandy victims? Get creative but PLEASE keep it visual Don’t tell me you have a sale or buy 1 get 1 offer, show me a picture and make me hungry, or thirsty, or show me that you personalized the message. I recommend using Google +, Facebook Fan (business) page and a Twitter page. That is really about it. Sure create a Foursquare as listing above but just keep those. Unless you are a professional, then LinkedIn is a must. There is a quote I love that basically says everyone on the web can compete, from the biggest players to the smallest, just at different levels. Your web site is the key to your business. Your web site will make one of the largest impressions on people in your businesses dealings. So naturally, it drives me nutes when I see so many cookie cutter or garbage template sites. Not to go into a great sales pitch, but at Titan Web Marketing Solutions, we build custom premium professional WordPress based sites every week. We go the extra mile and custom code and add graphics unique to you. This means your site is your site, on your domain, with custom dynamic content, graphics and all the features one would expect to find on any professional site. I’m sure there is a good local firm. And remember, make sure they develop a site that avoids flash. To many mobile devices are out there and while Driod’s and Windows 8 phones do load flash, you don’t want low cell phone signals to cause people to click off your site on long load times. Believe it or not, you can still create some great sites that have the features you want from flash like moving images, roll over text, and 3D effects without Flash. If the web firm still builds old school .html sites that are not using .php and .CSS (cascading style sheets) enabled themes to begin (like WordPress Content Management System) then just make sure you have seen some of the designers previous sites. Odds are, most of his custom build .html sites look like garbage. It’s not his/her fault, its just difficult to achieve especially when keeping costs down. Other tips I suggest are make sure you have lots of dynamic content, such as a blog that is updated every month. Make sure the About Us looks good, and that there are clear focal elements on the home page to help people navigate. Make sure the site matches your brand, including colors and overall vibe. Incorporate all your social media links into the site, and list clearly on the home page your number. In addition, make sure to have a Google Map and detailed Contact Us page. This is so important I gave it its own step. More times than not, SEO on most of the sites I see are either not done at all or done incorrectly. So here are some tips to help you get this part right. Pick the SEO plugin that works with your theme! If you are using a WordPress or other CMS (content management system), then make sure you install the plug-in that is recommended with the theme you choose. Especially if you bought a premium theme, this is so important. Spell out every term and add geographic information all separated by commas! I am referring to META keywords and while Google does not give these much weight Bing and Yahoo still do. So here is how you set them up correctly. Lets say you are a local pizza restaurant in Atlanta that does mostly New York Style pizza. META Keywords: pizza restaurant atlanta, new york style pizza restaurant atlanta, local pizza restaurant atlanta,, best pizza restaurant atlanta, Independent pizza restaurant atlanta, new york style pizza atlanta, new york style pizza atlanta. You can name each city you serve with “pizza” before it as well. You can get creative and this applies to each industry. Just take out “pizza” and add roofing, or whatever. Now adding META information is literally just the start of generating search engine optimization for your businesses web site. While it does help the search engines understand where to place your site, it will not help you much get to the first page of Google. A professional can give advice on marketing your business through search engines, social media, creating a newsletter and of course design your website, logo and print materials. Naturally, I recommend my business, Titan Web Marketing Solutions but there are thousands of qualified businesses out there. I recommend that you ask for examples of their work, references and prices on the front end. I also recommend doing a down-payment split set up where there is a down payment and a completing payment when work is complete. That alone will solve most all your potential issues. I hope you found this helpful. If you have any specific questions please use the contact form or follow that link above. By: Adam Faragalli on 12/30/2012.
Arriving in Blackmore, turn down by the war memorial , and tucked behind Blackmore's picturesque Village (Duckpond) Green in Jericho Cottage, is Megarrys.. You can also enjoy freshly toasted crumpets or teacakes. In cooler weather you can warm up with a cup of soup and a hot roll. Our snack range includes flapjacks, shortbread, biscuits, chocolate and crisps. We also have a range of wheat and Gluten free treats! If we haven't got your favourite tea or coffee on your first visit we will almost certainly have it next time you visit us! Just ask!
#!/bin/sh iscsiadm -m node
define([ 'jquery', 'calendarData' ], function($, data){ var DSGCalendar = { options: { container: 'calendar-container', }, data: {}, activeSlot: {}, isActive: false, initialize: function(dataPath){ var that = this; // Testing - the module accepts pre-loaded data. In production, this would load the data via ajax. this.data = data; this.render(); //this.loadData(dataPath); $('.dup').on('click', function(e){ e.preventDefault(); that.duplicateLast(); }); $('.calendar-container').on('click', '.slot p' ,function(e){ e.stopPropagation(); if(!that.isActive){ that.activeSlot = $(this).parent(); that.activateSlot(); } else { if($(this).parent() != that.activeSlot){ // Out with the old that.deactivateSlot(); // In with the new that.activeSlot = $(this).parent(); that.activateSlot(); } } }); // Press the enter key $(document).keypress(function(e) { if(e.which == 13) { if(that.isActive) that.deactivateSlot(); } }); //$('.ticker').addClass('vertical-collapse'); }, loadData: function(dataPath){ var that = this; $.getJSON(dataPath, function(data){ that.data = data; that.render(); }); }, render: function(){ this.renderKey(this.data.days[0]); for(day in this.data.days){ this.renderDay(this.data.days[day]); } }, renderKey: function(day){ var dayElem = $('<div class="day key"><p class="header-block">&nbsp;</p><p class="header-block">&nbsp;</p></div>'); for(g in day.slotgroups){ var groupObj = day.slotgroups[g], groupElem = $('<div class="group ' + groupObj.name.toLowerCase().replace(/ /g, '') + ' cf"><p class="group-name">' + groupObj.name + '</p></div>'), groupKeyElem = $('<div class="key-group"></div>'); for (i in groupObj.items){ var itemObj = groupObj.items[i], itemElem = $('<div class="slot"><div class="box"><p>' + itemObj.slot +'</p></div></div>'); groupKeyElem.append(itemElem); } groupElem.append(groupKeyElem); dayElem.append(groupElem); } $('.' + this.options.container + ' .dup').before(dayElem); }, renderDay: function(day){ var dayElem = $('<div class="day"><p class="header-block">'+ day.name+'</p><p class="header-block">'+ day.date+'</p></div>'); for(g in day.slotgroups){ var groupObj = day.slotgroups[g], groupElem = $('<div class="group ' + groupObj.name.toLowerCase().replace(/ /g, '') + '"></div>'); for (i in groupObj.items){ var itemObj = groupObj.items[i], itemElem; if(itemObj.value == ''){ itemObj.value = '&nbsp;'; } itemElem = $('<div class="slot"><div class="box"><p>' + itemObj.value +'</p></div></div>'); groupElem.append(itemElem); } dayElem.append(groupElem); } $('.' + this.options.container + ' .dup').before(dayElem); }, duplicateLast: function(){ $('.calendar-container .dup').before($('.day:last').clone()); }, activateSlot: function(){ var that = this, slotElem = $(this.activeSlot), pel = slotElem.find('p'), iel = $('<input id="textEdit" />'); that.isActive = true; // Set the text value of the input iel.attr('value', pel.text()); iel.on('blur', function(){ that.deactivateSlot(); }); // Hide the P tag pel.addClass('hide'); slotElem.append(iel); iel.focus(); }, deactivateSlot: function(){ var slotElem = this.activeSlot, pel = slotElem.find('p'), iel = slotElem.find('input'); this.isActive = false; // Check the value for CHANGED if(iel.val() != pel.text()){ slotElem.addClass('change'); pel.text(iel.val()); } // Flip the display black pel.removeClass('hide'); slotElem.find('input').remove() } } return DSGCalendar; });
South Canterbury won the toss and chose to field. We started really well with Charlie Martin taking 3 for 6 and Todd Phillips 1 for 4 in their first spells to have Mid Canterbury 4 for 10 before an excellent partnership took them through to 85 for 5. Wickets then fell regularly to have Mid Canterbury all out in the 40th over for 137. For South Canterbury Isaac Kinney and Hamish Booth took 2 wickets each aided by Callum Crawford taking 2 great catches. South Canterbury’s turn to bat and we lost two early wickets fell before Hamish Stowell 25 and Todd Phillips 16 got us back on track at 45 for 3. Unfortunately the middle order failed to keep the momentum going and South Canterbury slumped to 67 for 10 before Luke McRae and Hamish Booth combined to get South Canterbury through to 80 all out. Charlie Martin 7-1-12-3, Isaac Kinney 2-0-9-2, Hamish Booth 4-0-21-2. Tournament Jan 21st – 24th. This week the Primary Development side are playing their annual tournament at Mandeville, Rangiora, so good luck to all the boys, coaches and managers.
Am I suitable for CP work? I'm new here; I stumbled across the forum a few days ago and, after browsing for several days, decided that I wanted to join the community. I am here seeking advice, however, I do hope that in time I will be able to make my own contributions. I am currently working as a security officer in a retail store in a busy and relatively rough town (quite severe substance abuse/homelessness problem, high shop theft/violence). The store is based inside of a shopping centre, and I work with PCs/PCSOs/street wardens and security from other stores in a bid to prevent crime in the area. Whilst I have been in the store for a year, it is my first security job, although I have taken to it very well even if I do say so myself. I've received quite a bit of praise for the work I do and am not ashamed to say it; I make several 'arrests' each week, detect and report thefts that happen on my rest days (I'm the only security officer there) and regularly assist other stores. I've been told that I write good statements, communicate clearly over the radio and handle myself well in confrontations. The problem I have is that the pay is crap. As you guys will know, the SIA licence is so easy to obtain that as long as you can front the initial cost and count from 1-10, you can work retail security. I know some 'officers' who sit on a podium playing with their phones all day and get paid the same as I do and, well, maybe I'm the fool, but I just can't do that. I need to work hard and do a good job. It must be an ego thing; I couldn't stand the feeling of looking weak/lazy/rubbish at the job. It would kill me! That said, I've been wondering lately whether CP work would be a natural progression for me, or if, realistically, employers would be looking for those with a police/military background or a more extensive security background instead. Add to that, I am a slim guy who is not physically imposing (although I can handle myself and know when to get aggressive), and I'm thinking that I might struggle to find work. I'm fit as a fiddle, extremely hard working and sharp on the communications/investigative side of things but I get the impression that clients may want a guy with a bit more beef as part of their CP team. Is it advisable for me to gain more experience before I apply for a CP licence, or will I struggle either way to compete with those of a police/military background? Apologies for being so long-winded, and thanks in advance to any who reply. Welcome to CPW, I would seriously consider the fact that you will never work within the CP circuit as you have no experience nor do you have someone to recommend you or better still put you on a team or with a principal. I’m not saying it will be impossible but it isn’t very plausible, sorry to be the bearer of bad news but it is an honest answer. My advice would be work within the security sector move on to door supervisor or CCTV operations and see how you get on. Many thanks for your reply. Despite not being what I wanted to hear, I always appreciate a frank answer. I like the idea of progressing within the security industry but it seems ever so difficult. And sadly, any potential I may (or may not) have means very little when all I can prove on paper is that I've nabbed a few druggies for stealing razors! Welcome to the forum & hope you find it very informative. The company you are working for now may be the best place to further your career in security. Or the shopping centre in which you are working, you could possibly look to move over to the centre rather than within one of the stores. There are many avenues to try so do not despair at this stage of your career. Nope. I'll arm wrestle you for a fiver, .... if you accept you won't be in my company. No one needs to know if you can, "handle yourself" I'm sure you're some pup but you lost me on that. I've posted similar to this before but thought I'd wheel it out again as you seem a sensible chap and no doubt other newbies are on here and reading this. Almost everyone new aproaches this from their own point of view, without thinking about why the role really exists, what they have to offer the industry or what can make them stand out from the crowd. They post stuff about being new and inexperienced and wanting to make money or have some excitement, then ask if they'll make it. CP isn't there as a progression path for guys and gals wanting to move up from guarding or bouncing. At all. You may be in one of those roles and have what it takes for CP, but one doesn't feed the other. It's a very different role to the others, it takes a certain kind of individual and it takes a lot of training and CPD and most don't make it, either because they don't have the contacts to put them forward or because they're just not cut out for the work, they lack a certain-something, they lack the patience, commitment, the natural quirks that'll see them succeed. It's a very mental role, lots of planning and lots of effort to identify and avoid trouble, if you have to rely on being hard and go hands-on to protect the Principal, you've already failed them as you shouldn't have let the threat get that close in the first place. People hire you to potentially save their life - if you needed life-saving surgery, would you pick someone who did Security work in the Hospital, was good with a knife and fancied having a go, or would you pick a guy who had years of training and experience and could be vouched for by other guys doing the job already? If you're a Millionaire VIP and could afford to hire the very best to protect the most important things in their life, themselves and their family, is that you? If you blagged your way on to a job and found as a result of not knowing what you're doing that someone was seriously injured or killed, how would you feel? Unfortunatly lots of selfish guys out there couldn't care less, are you one of them? Lots of people don't get it, they like to be able to brag down the pub they're a Bodyguard and like how they can pull women and throw their weight about, they lie on their CV to get roles and they bounce around between jobs when they are constantly found out by those who know what they're doing. The others, the few who make it, and the few who you should aspire to be like, spend years developing themselves, training, learning. They're professionals in the same way a Doctor or a Pilot is, they have something about them you can't teach, and a massive skill set that took years to aquire and they're the sort of person you'd hire if your life depended on it. Thanks for the informed reply.
Here we describe the third of the project’s three sub-themes: Language. We discuss how the notion is relevant in the Platonic context and outline its relation to contemporary debate. Third, even if most contemporary versions of rational autonomy recognize some form of relation between reason and language, they often bypass a critical appraisal of its implications. Although it is acknowledged that language connects rational deliberation to its written and spoken forms, the linguistic conditions of reason are nevertheless often assessed in purely abstract terms. In John McDowell’s recent and influential discussion of how language-based reasoning is the key to the distanced attitude required to make autonomous and morally informed choices (2010), for example, this is manifest in the way he outlines what discursive deliberation provides. According to McDowell, the human ability to frame a circumstance in words puts us is the privileged position of being able to ask ourselves whether this circumstance constitutes a reason for doing what it inclines us to do (2010, 7). Nowhere does he suggest that this ability can have the very opposite impact, that is, that it can prevent us from making a proper evaluation of the situation we find ourselves in. For Plato, this is a very concrete possibility. Plato does not only isolate and identify a set of reasons to pay attention to the fallible and deceptive characteristics of human language. He also offers strong reasons not to leave the linguistic underpinnings of rational deliberation unexamined. The central task of this part of the project will be to spell out and critically assess the force of these reasons. To begin with, in Plato, thought is internal dialogue (e.g. Sedley 2006, 214f). This does not only mean that the conditions of the individual process of rational deliberation coincide with the conditions of interpersonal communication. This also suggests that insofar as reason is constitutive of the integrity, self-knowledge and the moral legitimacy of the autonomous agent, everything stands and falls with how we handle language in its manifest forms. That this is an urgent task for Plato is evidenced by his incessant engagement in negotiating viable conversational norms and standards of discursive transparency; norms and standards that are often referred to with the generic label dialectic. Plato’s identification of the problems that necessitate these norms and standards are articulated on at least three levels: Written language, spoken language and words or names. On the first level, one of the concreate problems of language is that its written form offers an attractive yet deceptive supplement of autonomous reasoning. As Plato makes clear at the end of the Phaedrus, by appearing to be a remedy against forgetfulness, and by offering what seems to be a secure path to wisdom, it threatens to undermine an independent perspective: Living and active memory is replaced by petrified views, and the self-constitutive act of independent scrutiny is substituted by a trust in external authority. As Plato suggest both in the Phaedrus, in the Protagoras, and in the contested Seventh Letter, the written word’s seductive promise of access to comprehensive and stable knowledge works by eclipsing the necessity of assessing and determining one’s own epistemic limits. For Plato, this process is also closely connected to the ways in which dependence on written material is disintegrating. By anchoring one’s sources of trust in a set of external authorities (Nightingale 1995; Griswold 1986 & 1999) one leaves the resources and responsibility of independent scrutiny and autonomous agency behind. But how exactly is this connection to be understood and are all forms of text equally flawed? On the second level, the worry is extended to spoken language (Ferrari 1987; Dixsaut 2003; Pettersson 2013). By distinguishing between genuine and alien forms of speech (as in the Phaedrus and the Protagoras), Plato shows the consequences of replacing your own authentic voice with the practice of imitating external authorities. In a set of dramatized examples, e.g. in the Protagoras, the Phaedrus, the Hippias Minor, and the Gorgias, Plato reveals the hubristic effects of this substitution (McCoy 1999; Nightingale 2003). The trust in alien sources eclipses the experience of one’s own epistemic conditions, resulting, for example, in the presumptuous beliefs of Hippias and Protagoras that a single sophist can answer any question, or in Gorgias’ claim that rhetoric and the ability to persuade guarantees freedom and independence from external coercion. These beliefs are not only the result of a deceptive psychological stability. As such, they also hinder moral progress and falsely satisfy the need for philosophical inquiry. In Plato’s Cratylus we are offered an important example of these mechanisms. Staged as an analysis of the correctness of words or names (gr. onoma), Plato here investigates a third linguistic level and the theory that our words are encoded encapsulations of truth. Imagined as established by a set of original and trustworthy name-makers, the words are taken to carry their own independent meaning (Sedley 2003; Cf. Trivigno 2012; Sallis 1975, Ch.4). Contrasted to a functionalists’ view of words, where meaning emerges from use (Gonzalez 1998, Ch.3), Plato considers the idea that truth can be revealed by etymological decoding of the words’ sounds and letters. Accordingly, the words themselves are assumed to have independent and external authority. This deliberately absurd suggestion is telling. By showing how all etymological analyses, at best, can reveal how the etymologists’ own set of beliefs are projected back into his decodings, Plato reduces confidence in external authority to absurdity. This example allows us to raise a pair of important questions pertinent to all three levels of language: How is it possible to speak (or write) with an authentic voice, insofar as language itself invites us to give up the autonomy of our own rational judgment? And if the inherited nature of our words asks us to subject to the sovereignty of external authority, how is discursive deliberation to be used to secure a position from which we can speak and act as self-governed agents?
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.runtime.executiongraph.failover.flip1; import org.apache.flink.runtime.execution.SuppressRestartsException; import org.apache.flink.runtime.jobgraph.JobVertexID; import org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID; import org.apache.flink.util.IterableUtils; import org.apache.flink.util.TestLogger; import org.junit.Before; import org.junit.Test; import java.util.Collections; import java.util.Set; import java.util.stream.Collectors; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** * Tests for {@link ExecutionFailureHandler}. */ public class ExecutionFailureHandlerTest extends TestLogger { private static final long RESTART_DELAY_MS = 1234L; private FailoverTopology<?, ?> failoverTopology; private TestFailoverStrategy failoverStrategy; private TestRestartBackoffTimeStrategy backoffTimeStrategy; private ExecutionFailureHandler executionFailureHandler; @Before public void setUp() { TestFailoverTopology.Builder topologyBuilder = new TestFailoverTopology.Builder(); topologyBuilder.newVertex(); failoverTopology = topologyBuilder.build(); failoverStrategy = new TestFailoverStrategy(); backoffTimeStrategy = new TestRestartBackoffTimeStrategy(true, RESTART_DELAY_MS); executionFailureHandler = new ExecutionFailureHandler(failoverTopology, failoverStrategy, backoffTimeStrategy); } /** * Tests the case that task restarting is accepted. */ @Test public void testNormalFailureHandling() { final Set<ExecutionVertexID> tasksToRestart = Collections.singleton( new ExecutionVertexID(new JobVertexID(), 0)); failoverStrategy.setTasksToRestart(tasksToRestart); // trigger a task failure final FailureHandlingResult result = executionFailureHandler.getFailureHandlingResult( new ExecutionVertexID(new JobVertexID(), 0), new Exception("test failure")); // verify results assertTrue(result.canRestart()); assertEquals(RESTART_DELAY_MS, result.getRestartDelayMS()); assertEquals(tasksToRestart, result.getVerticesToRestart()); try { result.getError(); fail("Cannot get error when the restarting is accepted"); } catch (IllegalStateException ex) { // expected } assertEquals(1, executionFailureHandler.getNumberOfRestarts()); } /** * Tests the case that task restarting is suppressed. */ @Test public void testRestartingSuppressedFailureHandlingResult() { // restart strategy suppresses restarting backoffTimeStrategy.setCanRestart(false); // trigger a task failure final FailureHandlingResult result = executionFailureHandler.getFailureHandlingResult( new ExecutionVertexID(new JobVertexID(), 0), new Exception("test failure")); // verify results assertFalse(result.canRestart()); assertNotNull(result.getError()); assertFalse(ExecutionFailureHandler.isUnrecoverableError(result.getError())); try { result.getVerticesToRestart(); fail("get tasks to restart is not allowed when restarting is suppressed"); } catch (IllegalStateException ex) { // expected } try { result.getRestartDelayMS(); fail("get restart delay is not allowed when restarting is suppressed"); } catch (IllegalStateException ex) { // expected } assertEquals(0, executionFailureHandler.getNumberOfRestarts()); } /** * Tests the case that the failure is non-recoverable type. */ @Test public void testNonRecoverableFailureHandlingResult() { // trigger an unrecoverable task failure final FailureHandlingResult result = executionFailureHandler.getFailureHandlingResult( new ExecutionVertexID(new JobVertexID(), 0), new Exception(new SuppressRestartsException(new Exception("test failure")))); // verify results assertFalse(result.canRestart()); assertNotNull(result.getError()); assertTrue(ExecutionFailureHandler.isUnrecoverableError(result.getError())); try { result.getVerticesToRestart(); fail("get tasks to restart is not allowed when restarting is suppressed"); } catch (IllegalStateException ex) { // expected } try { result.getRestartDelayMS(); fail("get restart delay is not allowed when restarting is suppressed"); } catch (IllegalStateException ex) { // expected } assertEquals(0, executionFailureHandler.getNumberOfRestarts()); } /** * Tests the check for unrecoverable error. */ @Test public void testUnrecoverableErrorCheck() { // normal error assertFalse(ExecutionFailureHandler.isUnrecoverableError(new Exception())); // direct unrecoverable error assertTrue(ExecutionFailureHandler.isUnrecoverableError(new SuppressRestartsException(new Exception()))); // nested unrecoverable error assertTrue(ExecutionFailureHandler.isUnrecoverableError( new Exception(new SuppressRestartsException(new Exception())))); } @Test public void testGlobalFailureHandling() { final FailureHandlingResult result = executionFailureHandler.getGlobalFailureHandlingResult( new Exception("test failure")); assertEquals( IterableUtils.toStream(failoverTopology.getVertices()) .map(FailoverVertex::getId) .collect(Collectors.toSet()), result.getVerticesToRestart()); } // ------------------------------------------------------------------------ // utilities // ------------------------------------------------------------------------ /** * A FailoverStrategy implementation for tests. It always suggests restarting the given tasks to restart. */ private static class TestFailoverStrategy implements FailoverStrategy { private Set<ExecutionVertexID> tasksToRestart; public TestFailoverStrategy() { } public void setTasksToRestart(final Set<ExecutionVertexID> tasksToRestart) { this.tasksToRestart = tasksToRestart; } @Override public Set<ExecutionVertexID> getTasksNeedingRestart( final ExecutionVertexID executionVertexId, final Throwable cause) { return tasksToRestart; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Bivi.Domaine.Results; using Bivi.Domaine; namespace Bivi.Domaine.Composite { public class GetDroitsByIdComposite { public GetDroitsByIdComposite() { DroitModule = new List<LienDroitComposite<ModuleDto>>(); DroitActionGenerales = new List<LienDroitComposite<ActionGeneraleDto>>(); DroitActionSpecifiques = new List<LienDroitComposite<ActionSpecifiqueDto>>(); DroitVues = new List<LienDroitComposite<VueDto>>(); DroitEditions = new List<LienDroitComposite<EditionDto>>(); DroitLienExterne = new List<LienDroitComposite<LienExterneDto>>(); } public DroitDto Droit { get; set; } public IEnumerable<LienDroitComposite<ModuleDto>> DroitModule { get; set; } public IEnumerable<LienDroitComposite<ActionGeneraleDto>> DroitActionGenerales { get; set; } public IEnumerable<LienDroitComposite<ActionSpecifiqueDto>> DroitActionSpecifiques { get; set; } public IEnumerable<LienDroitComposite<VueDto>> DroitVues { get; set; } public IEnumerable<LienDroitComposite<EditionDto>> DroitEditions { get; set; } public IEnumerable<LienDroitComposite<LienExterneDto>> DroitLienExterne { get; set; } public IEnumerable<LienDroitComposite<AlerteDto>> DroitAlerte { get; set; } } }
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef WEBRTC_VOICE_ENGINE_OUTPUT_MIXER_H_ #define WEBRTC_VOICE_ENGINE_OUTPUT_MIXER_H_ #include "audio_conference_mixer.h" #include "audio_conference_mixer_defines.h" #include "common_types.h" #include "dtmf_inband.h" #include "file_recorder.h" #include "level_indicator.h" #include "resampler.h" #include "voice_engine_defines.h" namespace webrtc { class AudioProcessing; class CriticalSectionWrapper; class FileWrapper; class VoEMediaProcess; namespace voe { class Statistics; class OutputMixer : public AudioMixerOutputReceiver, public AudioMixerStatusReceiver, public FileCallback { public: static WebRtc_Word32 Create(OutputMixer*& mixer, const WebRtc_UWord32 instanceId); static void Destroy(OutputMixer*& mixer); WebRtc_Word32 SetEngineInformation(Statistics& engineStatistics); WebRtc_Word32 SetAudioProcessingModule( AudioProcessing* audioProcessingModule); // VoEExternalMedia int RegisterExternalMediaProcessing( VoEMediaProcess& proccess_object); int DeRegisterExternalMediaProcessing(); // VoEDtmf int PlayDtmfTone(WebRtc_UWord8 eventCode, int lengthMs, int attenuationDb); int StartPlayingDtmfTone(WebRtc_UWord8 eventCode, int attenuationDb); int StopPlayingDtmfTone(); WebRtc_Word32 MixActiveChannels(); WebRtc_Word32 DoOperationsOnCombinedSignal(); WebRtc_Word32 SetMixabilityStatus(MixerParticipant& participant, const bool mixable); WebRtc_Word32 SetAnonymousMixabilityStatus(MixerParticipant& participant, const bool mixable); int GetMixedAudio(int sample_rate_hz, int num_channels, AudioFrame* audioFrame); // VoEVolumeControl int GetSpeechOutputLevel(WebRtc_UWord32& level); int GetSpeechOutputLevelFullRange(WebRtc_UWord32& level); int SetOutputVolumePan(float left, float right); int GetOutputVolumePan(float& left, float& right); // VoEFile int StartRecordingPlayout(const char* fileName, const CodecInst* codecInst); int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst); int StopRecordingPlayout(); virtual ~OutputMixer(); // from AudioMixerOutputReceiver virtual void NewMixedAudio( const WebRtc_Word32 id, const AudioFrame& generalAudioFrame, const AudioFrame** uniqueAudioFrames, const WebRtc_UWord32 size); // from AudioMixerStatusReceiver virtual void MixedParticipants( const WebRtc_Word32 id, const ParticipantStatistics* participantStatistics, const WebRtc_UWord32 size); virtual void VADPositiveParticipants( const WebRtc_Word32 id, const ParticipantStatistics* participantStatistics, const WebRtc_UWord32 size); virtual void MixedAudioLevel(const WebRtc_Word32 id, const WebRtc_UWord32 level); // For file recording void PlayNotification(const WebRtc_Word32 id, const WebRtc_UWord32 durationMs); void RecordNotification(const WebRtc_Word32 id, const WebRtc_UWord32 durationMs); void PlayFileEnded(const WebRtc_Word32 id); void RecordFileEnded(const WebRtc_Word32 id); private: OutputMixer(const WebRtc_UWord32 instanceId); void APMAnalyzeReverseStream(); int InsertInbandDtmfTone(); // uses Statistics* _engineStatisticsPtr; AudioProcessing* _audioProcessingModulePtr; // owns CriticalSectionWrapper& _callbackCritSect; // protect the _outputFileRecorderPtr and _outputFileRecording CriticalSectionWrapper& _fileCritSect; AudioConferenceMixer& _mixerModule; AudioFrame _audioFrame; Resampler _resampler; // converts mixed audio to fit ADM format Resampler _apmResampler; // converts mixed audio to fit APM rate AudioLevel _audioLevel; // measures audio level for the combined signal DtmfInband _dtmfGenerator; int _instanceId; VoEMediaProcess* _externalMediaCallbackPtr; bool _externalMedia; float _panLeft; float _panRight; int _mixingFrequencyHz; FileRecorder* _outputFileRecorderPtr; bool _outputFileRecording; }; } // namespace voe } // namespace werbtc #endif // VOICE_ENGINE_OUTPUT_MIXER_H_
Driving home this evening I heard on the radio that Journalist, Angela Rippon has a new, two part show being aired on Thursdays 7 and 14 April 2016 on BBC 1, 9pm. She spoke about dance being scientifically good for us because it ticks all the boxes such as, fitness, flexibility, core stability, socialisation and keeps the brain active remembering all those steps and dances. She spoke passionately about older people dancing and how good it is for people in their 50s, 60s, 70s, 80s and 90s. Having taught ladies and gents of 80 plus and even on or two of 90 plus I can confirm how well they respond to dancing as long as it is taught and danced at a pace they can cope with. The first of Angela Rippon’s programmes is apparently about keeping the body young and the second one is about keeping the brain (or mind) young. They seem worth watching if you can. It is always good to hear someone speak passionately about older people dancing. I think the genres she mentioned specifically are ballet, Line dancing and belly dancing. So quite a range and why not? Dancing is not just for the young. It has so much to offer people of all ages. If you are interested in teaching older people to dance or already teach classes for older people then why not take the short online CPD course starting in May: Learning and Teaching Dance: teaching dance to older people? And don’t forget you can now pay for your courses online via Paypal and credit cards.
Cattails in Burney, CA can be a real problem for municipal and home owners ponds and lakes as well as golf course ponds throughout the State of California. Now there is help with controlling and removing Cattails in Burney. View our machines at dkenvironmental.com. Aquatic plants are plants that have adapted to living in water locations (salt water as well as fresh water). They’re also often known as hydrophytes or macrophytes. A lot of these plants will require special adaptations for living submerged in water, or at the water’s surface. The most popular variation is aerenchyma, but floating leaves and very finely dissected leaves are also prevalent. Water plants can only grow in water or in dirt that’s completely soaked with water. They are for that reason a typical component of wetlands. Water plants are by and large a beneficial portion of the water body, be it a lagoon or simply a fish-pond. The water vegetation is a source of food, protection and oxygen to the creatures currently in water-feature or body of water. Having said that remaining uncontrolled a majority of these aquatic plants can certainly propagate fairly quickly and constrain the activities within the fish pond and / or lake. That’s when these water plants come to be water weeds. A quick definition of a water weed is a plant which grows (generally too densely) in an area in ways that it prevents the value or enjoyment of the particular area. A handful of typical kinds of aquatic plants that will develop into unwanted weeds are water milfoil, duck weed, pondweed, hydrilla, water hyacinth, cattail, bulrush, ludwigia, and many others. They will often flourish in fish ponds, lakes, streams, canals, navigation channels, storm water basins and channels, wetlands and lagoons. The growth might be due to a number of variables for instance excessive nutrients in the water or even introduction of rapidly-growing exotic species. The down sides caused by aquatic unwanted weeds are extensive, ranging from unsightly growth and nuisance odors to blockage of waterways, flood damage, motorboat damages, and in some cases drowning and impairment of water quality. Most often it’s more effective as well as cost effective to work with a competent aquatic weed control firm to clear out and control your aquatic weed troubles. When it comes to California the most skilled business is DK Environmental. DK Environmental is located in the San Francisco Bay area yet works aquatic weed removals all around the State of California. The equipment that DK Environmental uses is rather distinctive to the western U . S. Having its fleet of Aquamogs DK can access any type of water body system.
import {DataNode} from "./dataNode"; import {LessonData, ObjectHelper, RoomData} from "@hwr-berlin-scheduler/utils"; export class RoomDataNode implements DataNode { public static generateRoomDataNodes(lessons: LessonData[]): RoomDataNode[] { const allRooms: { [roomIdentifier: string]: RoomDataNode } = {}; lessons.forEach((lesson: LessonData): void => { const roomsOfLesson: RoomDataNode[] = this.generateALessonsRoomDataNodes(lesson); roomsOfLesson.forEach((room: RoomDataNode): void => { allRooms[room.roomIdentifier] = room; }); }); // TODO In future version: Exchange with native Object.values(allRooms) for improved readability return ObjectHelper.values<RoomDataNode>(allRooms); } private static generateRoomDataNode(room: RoomData): RoomDataNode { return new RoomDataNode(room); } private static generateALessonsRoomDataNodes(lesson: LessonData): RoomDataNode[] { return lesson.roomData.map((room: RoomData): RoomDataNode => this.generateRoomDataNode(room)); } public databaseId?: string; public readonly roomIdentifier: string; public readonly roomName?: string; public readonly roomNameDe?: string; constructor(room: RoomData) { this.roomIdentifier = room.roomIdentifier; if (room.roomName) { this.roomName = room.roomName; } if (room.roomNameDe) { this.roomNameDe = room.roomNameDe; } } }
<html> <head></head> <body> <p>Before</p> <p>One</p> <p>Two</p> <p>Three</p> <p>After</p> </body> </html>
Wild West Online, an MMO developed by 612 Games can bring Wild West fantasies to your PC. Whether it’s bounty hunters, prospectors, deputy officers, outlaws, gamblers, or civilians, players choose what to do and how to survive. There are no classes, and the developers are considering character progression through skills. Before we get to the bread and butter, the Wild West Online Release Date, let’s talk about the world and gameplay. Wild West Online is an open world map, similar to Red Dead Redemption (which the game is based on) features wilderness, settlements or towns, lone farms, train stations, gang hideouts, and landmarks. There are uncharted areas explorers won’t be able to resist discovering. Towns offer many places to visit, including saloons, shops, and stables. The game features a day-night cycle where players can shoot during broad daylight and hunker down for the night. There are hotels or inns to stay for the night, or you can drink and gamble in the saloons. Another alternative is to take advantage when the sun goes down to sneak in properties and steal things. Considering the history of the West, PvP is unavoidable here. Shootouts and showdowns mean that missing a shot may cost your life. However, there isn’t a “permadeath” condition, and you will safely respawn with all your skills and inventory intact. There are protected areas, but going further away from them increases the risk of encountering hostile players, making exploration high risk and high reward. There is a moral aspect to characters and choices made in this MMO. If you’re witnessed doing lawless actions (i.e., stealing or safecracking) your wanted level (stars) go up. Earning enough of those stars will make your character an outlaw who can be shot by anyone, even in protected areas. On the other hand, playing the role of deputy gives a license to kill any bandits in sight. Also, Outlaws get special bonuses for killing lawmen. With the right materials, you can make a camp that will benefit those in the same clan or group. Camps give various benefits, and you can kill invaders of a camp without repercussions. It’s a vital feature, as hunters and explorers will have to stay overnight in the wild as they travel. Traveling to quest destinations might require some work. According to the FAQ section, characters can get customized with variable skin tones and the option to play as a Native American. Female characters can wear trousers if they desire. There will be community managed servers for role-playing purposes, as well as private servers, although both of those will get hosted by 612 Games. Wild West Online is set to release by the end of this year (2017). The alpha testing should come out in September. If the game gets delayed, the launch could be pushed to early next year (2018). You could pre-order now and gain keys for the closed alpha and beta testing, along with a Steam key upon release. They’re even offering full refunds, as long as you ask for it before the second phase of alpha testing. Anyone could pre-order and join the alpha testing. Wild West Online will come out for PC and available on Steam’s site. The game has planned on future features to be released in expansions for free for all players. Some of these features include customizable player houses, scheduled server-wide raids, and new environments. We can’t forget about the fort-defense type event, where NPCs ask players to protect a place for a night. The players have to barricade and booby-trap the place to defend it from other players for a set amount of time. Other players are summoned by an announcement that the area getting protected can be raided for loot. A shootout ensues between the invading and defending parties until one side gives up or time runs out. Pre-order now to secure a slot for alpha and beta testing, as well as a Steam key once it’s released. I hope you’re looking forward to the Wild West Online Release Date! Happy trails, y’all!
I've had a TRS-80 64K PAL Colour (not Color, it's an Australian version) Computer 2 laying around for a little while now. Purchased as an untested item and as such I presumed would have some issues to deal with. Thankfully I've finally I found some time (in amongst everything else) to look into what issues if any there might be, and decide if it's worth going further and conducting a full restoration. Plugging the computer in and turning it on revealed that there was indeed some life inside; but it's bit of a half life with a screen full of garbage characters. On the plus side the garbage is over a green background, green being the colour it's supposed to be. I was suspecting this was going to be a DRAM issue, a little bit of googling seemed to confirm suspicions. Time to open the COCO up. First switch on of the COCO and a load of Garbage Characters on the screen. From the awful amount of rust on the modulator it appears the computer has had a hard end of life. It looks as if the COCO's spent some time in damp back sheds and garages. What we're looking for at this stage though is the DRAM. This is to be found on a plug in board hovering above the motherboard, with some cardboard shielding over it. Arranged in a row on the plugin board, are eight 8k MB8264A DRAM chips, these provide the systems total of 64k. Unfortunately the DRAM is soldered onto the plugin board, these needed to be removed to find the problem ones. Rather than solder replacement DRAM back in directly I also took the opportunity to solder IC sockets. Plugin DRAM Board, eight 8k MB8264A chips. After some time consuming un-soldering a bit of snipping, re-soldering and finally mounting new DRAM, four ICs in total the Colour Computer came back from the dead. I now have the expected boot screen on a green background, this is a good start. I'm not sure if it's the LCD TV, the computers modulator or something else, but the quality of the display is abysmal. Still now that I know the computer is essentially working I'm going to give the whole system a going over and full restoration. Plenty more updates and some proper investigations into the world of TRS-80 Colour Computers to come. And We have a Working Computer, Sort Of. The ZeaMouse version 2 firmware should take a USB mouse and have it function in a similar fashion to a Commodore 64s 1351 mouse. The 1351 had two modes of operation, an analogue mode and a digital compatibility mode. In digital mode a 1351s analogue movements are converted into digital signal for use on standard Atari style joystick port. The trick to the converting an analogue like signal to a digital one is in the preservation of the proportional analogue mouse movement feel. Complicating matters is the host computer and the particular piece of software reading the joystick port at any given time. In version one of the ZeaMouse I thought I'd got the mouse timings and movement about right. However at the time I only had a ZXPand equipt ZX81 for testing. Unfortunately what I though was working well was in reality only doing so for the ZX81. Thankfully I've acquired a ZX Spectrum Omni which has a Kempston compatible port, and so have been able to conduct more extensive testing this time around. After about a month of testing I'm satisfied the mouse interface works just as well with the Spectrum (Kempston and Sinclair adapters) as a ZX81. Note that the Spectrums joystick ports should provide power on pin 5 else you'll need to power the mouse interface externally. Proportional movement is simulated by keeping the joystick direction triggered for longer periods the more the mouse is moved in a constant direction. Getting the acceleration just right proved a little tricky. The mouse is also decelerated, but this happens at about twice the rate of acceleration. The latest firmware ZeamMouse_V2_03.tar.gz is now avaliable for download, as always newer versions as they become avaliable are on the ZX81 Projects page.
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. DOCUMENTATION = ''' --- module: postgresql_user short_description: Adds or removes a users (roles) from a PostgreSQL database. description: - Add or remove PostgreSQL users (roles) from a remote host and, optionally, grant the users access to an existing database or tables. - The fundamental function of the module is to create, or delete, roles from a PostgreSQL cluster. Privilege assignment, or removal, is an optional step, which works on one database at a time. This allows for the module to be called several times in the same module to modify the permissions on different databases, or to grant permissions to already existing users. - A user cannot be removed until all the privileges have been stripped from the user. In such situation, if the module tries to remove the user it will fail. To avoid this from happening the fail_on_user option signals the module to try to remove the user, but if not possible keep going; the module will report if changes happened and separately if the user was removed or not. version_added: "0.6" options: name: description: - name of the user (role) to add or remove required: true default: null password: description: - set the user's password, before 1.4 this was required. - "When passing an encrypted password, the encrypted parameter must also be true, and it must be generated with the format C('str[\\"md5\\"] + md5[ password + username ]'), resulting in a total of 35 characters. An easy way to do this is: C(echo \\"md5`echo -n \\"verysecretpasswordJOE\\" | md5`\\"). Note that if encrypted is set, the stored password will be hashed whether or not it is pre-encrypted." required: false default: null db: description: - name of database where permissions will be granted required: false default: null fail_on_user: description: - if C(yes), fail when user can't be removed. Otherwise just log and continue required: false default: 'yes' choices: [ "yes", "no" ] port: description: - Database port to connect to. required: false default: 5432 login_user: description: - User (role) used to authenticate with PostgreSQL required: false default: postgres login_password: description: - Password used to authenticate with PostgreSQL required: false default: null login_host: description: - Host running PostgreSQL. required: false default: localhost login_unix_socket: description: - Path to a Unix domain socket for local connections required: false default: null priv: description: - "PostgreSQL privileges string in the format: C(table:priv1,priv2)" required: false default: null role_attr_flags: description: - "PostgreSQL role attributes string in the format: CREATEDB,CREATEROLE,SUPERUSER" required: false default: "" choices: [ "[NO]SUPERUSER","[NO]CREATEROLE", "[NO]CREATEUSER", "[NO]CREATEDB", "[NO]INHERIT", "[NO]LOGIN", "[NO]REPLICATION" ] state: description: - The user (role) state required: false default: present choices: [ "present", "absent" ] encrypted: description: - whether the password is stored hashed in the database. boolean. Passwords can be passed already hashed or unhashed, and postgresql ensures the stored password is hashed when encrypted is set. required: false default: false version_added: '1.4' expires: description: - sets the user's password expiration. required: false default: null version_added: '1.4' no_password_changes: description: - if C(yes), don't inspect database for password changes. Effective when C(pg_authid) is not accessible (such as AWS RDS). Otherwise, make password changes as necessary. required: false default: 'no' choices: [ "yes", "no" ] version_added: '2.0' notes: - The default authentication assumes that you are either logging in as or sudo'ing to the postgres account on the host. - This module uses psycopg2, a Python PostgreSQL database adapter. You must ensure that psycopg2 is installed on the host before using this module. If the remote host is the PostgreSQL server (which is the default case), then PostgreSQL must also be installed on the remote host. For Ubuntu-based systems, install the postgresql, libpq-dev, and python-psycopg2 packages on the remote host before using this module. - If the passlib library is installed, then passwords that are encrypted in the DB but not encrypted when passed as arguments can be checked for changes. If the passlib library is not installed, unencrypted passwords stored in the DB encrypted will be assumed to have changed. - If you specify PUBLIC as the user, then the privilege changes will apply to all users. You may not specify password or role_attr_flags when the PUBLIC user is specified. requirements: [ psycopg2 ] author: "Ansible Core Team" ''' EXAMPLES = ''' # Create django user and grant access to database and products table - postgresql_user: db=acme name=django password=ceec4eif7ya priv=CONNECT/products:ALL # Create rails user, grant privilege to create other databases and demote rails from super user status - postgresql_user: name=rails password=secret role_attr_flags=CREATEDB,NOSUPERUSER # Remove test user privileges from acme - postgresql_user: db=acme name=test priv=ALL/products:ALL state=absent fail_on_user=no # Remove test user from test database and the cluster - postgresql_user: db=test name=test priv=ALL state=absent # Example privileges string format INSERT,UPDATE/table:SELECT/anothertable:ALL # Remove an existing user's password - postgresql_user: db=test user=test password=NULL ''' import re import itertools try: import psycopg2 import psycopg2.extras except ImportError: postgresqldb_found = False else: postgresqldb_found = True from ansible.module_utils.six import iteritems _flags = ('SUPERUSER', 'CREATEROLE', 'CREATEUSER', 'CREATEDB', 'INHERIT', 'LOGIN', 'REPLICATION') VALID_FLAGS = frozenset(itertools.chain(_flags, ('NO%s' % f for f in _flags))) VALID_PRIVS = dict(table=frozenset(('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER', 'ALL')), database=frozenset(('CREATE', 'CONNECT', 'TEMPORARY', 'TEMP', 'ALL')), ) # map to cope with idiosyncracies of SUPERUSER and LOGIN PRIV_TO_AUTHID_COLUMN = dict(SUPERUSER='rolsuper', CREATEROLE='rolcreaterole', CREATEUSER='rolcreateuser', CREATEDB='rolcreatedb', INHERIT='rolinherit', LOGIN='rolcanlogin', REPLICATION='rolreplication') class InvalidFlagsError(Exception): pass class InvalidPrivsError(Exception): pass # =========================================== # PostgreSQL module specific support methods. # def user_exists(cursor, user): # The PUBLIC user is a special case that is always there if user == 'PUBLIC': return True query = "SELECT rolname FROM pg_roles WHERE rolname=%(user)s" cursor.execute(query, {'user': user}) return cursor.rowcount > 0 def user_add(cursor, user, password, role_attr_flags, encrypted, expires): """Create a new database user (role).""" # Note: role_attr_flags escaped by parse_role_attrs and encrypted is a literal query_password_data = dict(password=password, expires=expires) query = ['CREATE USER %(user)s' % { "user": pg_quote_identifier(user, 'role')}] if password is not None: query.append("WITH %(crypt)s" % { "crypt": encrypted }) query.append("PASSWORD %(password)s") if expires is not None: query.append("VALID UNTIL %(expires)s") query.append(role_attr_flags) query = ' '.join(query) cursor.execute(query, query_password_data) return True def user_alter(cursor, module, user, password, role_attr_flags, encrypted, expires, no_password_changes): """Change user password and/or attributes. Return True if changed, False otherwise.""" changed = False # Note: role_attr_flags escaped by parse_role_attrs and encrypted is a literal if user == 'PUBLIC': if password is not None: module.fail_json(msg="cannot change the password for PUBLIC user") elif role_attr_flags != '': module.fail_json(msg="cannot change the role_attr_flags for PUBLIC user") else: return False # Handle passwords. if not no_password_changes and (password is not None or role_attr_flags != ''): # Select password and all flag-like columns in order to verify changes. query_password_data = dict(password=password, expires=expires) select = "SELECT * FROM pg_authid where rolname=%(user)s" cursor.execute(select, {"user": user}) # Grab current role attributes. current_role_attrs = cursor.fetchone() # Do we actually need to do anything? pwchanging = False if password is not None: if encrypted: if password.startswith('md5'): if password != current_role_attrs['rolpassword']: pwchanging = True else: try: from passlib.hash import postgres_md5 as pm if pm.encrypt(password, user) != current_role_attrs['rolpassword']: pwchanging = True except ImportError: # Cannot check if passlib is not installed, so assume password is different pwchanging = True else: if password != current_role_attrs['rolpassword']: pwchanging = True role_attr_flags_changing = False if role_attr_flags: role_attr_flags_dict = {} for r in role_attr_flags.split(' '): if r.startswith('NO'): role_attr_flags_dict[r.replace('NO', '', 1)] = False else: role_attr_flags_dict[r] = True for role_attr_name, role_attr_value in role_attr_flags_dict.items(): if current_role_attrs[PRIV_TO_AUTHID_COLUMN[role_attr_name]] != role_attr_value: role_attr_flags_changing = True expires_changing = (expires is not None and expires == current_roles_attrs['rol_valid_until']) if not pwchanging and not role_attr_flags_changing and not expires_changing: return False alter = ['ALTER USER %(user)s' % {"user": pg_quote_identifier(user, 'role')}] if pwchanging: alter.append("WITH %(crypt)s" % {"crypt": encrypted}) alter.append("PASSWORD %(password)s") alter.append(role_attr_flags) elif role_attr_flags: alter.append('WITH %s' % role_attr_flags) if expires is not None: alter.append("VALID UNTIL %(expires)s") try: cursor.execute(' '.join(alter), query_password_data) except psycopg2.InternalError: e = get_exception() if e.pgcode == '25006': # Handle errors due to read-only transactions indicated by pgcode 25006 # ERROR: cannot execute ALTER ROLE in a read-only transaction changed = False module.fail_json(msg=e.pgerror) return changed else: raise psycopg2.InternalError(e) # Grab new role attributes. cursor.execute(select, {"user": user}) new_role_attrs = cursor.fetchone() # Detect any differences between current_ and new_role_attrs. for i in range(len(current_role_attrs)): if current_role_attrs[i] != new_role_attrs[i]: changed = True return changed def user_delete(cursor, user): """Try to remove a user. Returns True if successful otherwise False""" cursor.execute("SAVEPOINT ansible_pgsql_user_delete") try: cursor.execute("DROP USER %s" % pg_quote_identifier(user, 'role')) except: cursor.execute("ROLLBACK TO SAVEPOINT ansible_pgsql_user_delete") cursor.execute("RELEASE SAVEPOINT ansible_pgsql_user_delete") return False cursor.execute("RELEASE SAVEPOINT ansible_pgsql_user_delete") return True def has_table_privileges(cursor, user, table, privs): """ Return the difference between the privileges that a user already has and the privileges that they desire to have. :returns: tuple of: * privileges that they have and were requested * privileges they currently hold but were not requested * privileges requested that they do not hold """ cur_privs = get_table_privileges(cursor, user, table) have_currently = cur_privs.intersection(privs) other_current = cur_privs.difference(privs) desired = privs.difference(cur_privs) return (have_currently, other_current, desired) def get_table_privileges(cursor, user, table): if '.' in table: schema, table = table.split('.', 1) else: schema = 'public' query = '''SELECT privilege_type FROM information_schema.role_table_grants WHERE grantee=%s AND table_name=%s AND table_schema=%s''' cursor.execute(query, (user, table, schema)) return frozenset([x[0] for x in cursor.fetchall()]) def grant_table_privileges(cursor, user, table, privs): # Note: priv escaped by parse_privs privs = ', '.join(privs) query = 'GRANT %s ON TABLE %s TO %s' % ( privs, pg_quote_identifier(table, 'table'), pg_quote_identifier(user, 'role') ) cursor.execute(query) def revoke_table_privileges(cursor, user, table, privs): # Note: priv escaped by parse_privs privs = ', '.join(privs) query = 'REVOKE %s ON TABLE %s FROM %s' % ( privs, pg_quote_identifier(table, 'table'), pg_quote_identifier(user, 'role') ) cursor.execute(query) def get_database_privileges(cursor, user, db): priv_map = { 'C':'CREATE', 'T':'TEMPORARY', 'c':'CONNECT', } query = 'SELECT datacl FROM pg_database WHERE datname = %s' cursor.execute(query, (db,)) datacl = cursor.fetchone()[0] if datacl is None: return set() r = re.search('%s=(C?T?c?)/[a-z]+\,?' % user, datacl) if r is None: return set() o = set() for v in r.group(1): o.add(priv_map[v]) return normalize_privileges(o, 'database') def has_database_privileges(cursor, user, db, privs): """ Return the difference between the privileges that a user already has and the privileges that they desire to have. :returns: tuple of: * privileges that they have and were requested * privileges they currently hold but were not requested * privileges requested that they do not hold """ cur_privs = get_database_privileges(cursor, user, db) have_currently = cur_privs.intersection(privs) other_current = cur_privs.difference(privs) desired = privs.difference(cur_privs) return (have_currently, other_current, desired) def grant_database_privileges(cursor, user, db, privs): # Note: priv escaped by parse_privs privs =', '.join(privs) if user == "PUBLIC": query = 'GRANT %s ON DATABASE %s TO PUBLIC' % ( privs, pg_quote_identifier(db, 'database')) else: query = 'GRANT %s ON DATABASE %s TO %s' % ( privs, pg_quote_identifier(db, 'database'), pg_quote_identifier(user, 'role')) cursor.execute(query) def revoke_database_privileges(cursor, user, db, privs): # Note: priv escaped by parse_privs privs = ', '.join(privs) if user == "PUBLIC": query = 'REVOKE %s ON DATABASE %s FROM PUBLIC' % ( privs, pg_quote_identifier(db, 'database')) else: query = 'REVOKE %s ON DATABASE %s FROM %s' % ( privs, pg_quote_identifier(db, 'database'), pg_quote_identifier(user, 'role')) cursor.execute(query) def revoke_privileges(cursor, user, privs): if privs is None: return False revoke_funcs = dict(table=revoke_table_privileges, database=revoke_database_privileges) check_funcs = dict(table=has_table_privileges, database=has_database_privileges) changed = False for type_ in privs: for name, privileges in iteritems(privs[type_]): # Check that any of the privileges requested to be removed are # currently granted to the user differences = check_funcs[type_](cursor, user, name, privileges) if differences[0]: revoke_funcs[type_](cursor, user, name, privileges) changed = True return changed def grant_privileges(cursor, user, privs): if privs is None: return False grant_funcs = dict(table=grant_table_privileges, database=grant_database_privileges) check_funcs = dict(table=has_table_privileges, database=has_database_privileges) changed = False for type_ in privs: for name, privileges in iteritems(privs[type_]): # Check that any of the privileges requested for the user are # currently missing differences = check_funcs[type_](cursor, user, name, privileges) if differences[2]: grant_funcs[type_](cursor, user, name, privileges) changed = True return changed def parse_role_attrs(role_attr_flags): """ Parse role attributes string for user creation. Format: attributes[,attributes,...] Where: attributes := CREATEDB,CREATEROLE,NOSUPERUSER,... [ "[NO]SUPERUSER","[NO]CREATEROLE", "[NO]CREATEUSER", "[NO]CREATEDB", "[NO]INHERIT", "[NO]LOGIN", "[NO]REPLICATION" ] """ if ',' in role_attr_flags: flag_set = frozenset(r.upper() for r in role_attr_flags.split(",")) elif role_attr_flags: flag_set = frozenset((role_attr_flags.upper(),)) else: flag_set = frozenset() if not flag_set.issubset(VALID_FLAGS): raise InvalidFlagsError('Invalid role_attr_flags specified: %s' % ' '.join(flag_set.difference(VALID_FLAGS))) o_flags = ' '.join(flag_set) return o_flags def normalize_privileges(privs, type_): new_privs = set(privs) if 'ALL' in new_privs: new_privs.update(VALID_PRIVS[type_]) new_privs.remove('ALL') if 'TEMP' in new_privs: new_privs.add('TEMPORARY') new_privs.remove('TEMP') return new_privs def parse_privs(privs, db): """ Parse privilege string to determine permissions for database db. Format: privileges[/privileges/...] Where: privileges := DATABASE_PRIVILEGES[,DATABASE_PRIVILEGES,...] | TABLE_NAME:TABLE_PRIVILEGES[,TABLE_PRIVILEGES,...] """ if privs is None: return privs o_privs = { 'database':{}, 'table':{} } for token in privs.split('/'): if ':' not in token: type_ = 'database' name = db priv_set = frozenset(x.strip().upper() for x in token.split(',') if x.strip()) else: type_ = 'table' name, privileges = token.split(':', 1) priv_set = frozenset(x.strip().upper() for x in privileges.split(',') if x.strip()) if not priv_set.issubset(VALID_PRIVS[type_]): raise InvalidPrivsError('Invalid privs specified for %s: %s' % (type_, ' '.join(priv_set.difference(VALID_PRIVS[type_])))) priv_set = normalize_privileges(priv_set, type_) o_privs[type_][name] = priv_set return o_privs # =========================================== # Module execution. # def main(): module = AnsibleModule( argument_spec=dict( login_user=dict(default="postgres"), login_password=dict(default=""), login_host=dict(default=""), login_unix_socket=dict(default=""), user=dict(required=True, aliases=['name']), password=dict(default=None), state=dict(default="present", choices=["absent", "present"]), priv=dict(default=None), db=dict(default=''), port=dict(default='5432'), fail_on_user=dict(type='bool', default='yes'), role_attr_flags=dict(default=''), encrypted=dict(type='bool', default='no'), no_password_changes=dict(type='bool', default='no'), expires=dict(default=None) ), supports_check_mode = True ) user = module.params["user"] password = module.params["password"] state = module.params["state"] fail_on_user = module.params["fail_on_user"] db = module.params["db"] if db == '' and module.params["priv"] is not None: module.fail_json(msg="privileges require a database to be specified") privs = parse_privs(module.params["priv"], db) port = module.params["port"] no_password_changes = module.params["no_password_changes"] try: role_attr_flags = parse_role_attrs(module.params["role_attr_flags"]) except InvalidFlagsError: e = get_exception() module.fail_json(msg=str(e)) if module.params["encrypted"]: encrypted = "ENCRYPTED" else: encrypted = "UNENCRYPTED" expires = module.params["expires"] if not postgresqldb_found: module.fail_json(msg="the python psycopg2 module is required") # To use defaults values, keyword arguments must be absent, so # check which values are empty and don't include in the **kw # dictionary params_map = { "login_host":"host", "login_user":"user", "login_password":"password", "port":"port", "db":"database" } kw = dict( (params_map[k], v) for (k, v) in iteritems(module.params) if k in params_map and v != "" ) # If a login_unix_socket is specified, incorporate it here. is_localhost = "host" not in kw or kw["host"] == "" or kw["host"] == "localhost" if is_localhost and module.params["login_unix_socket"] != "": kw["host"] = module.params["login_unix_socket"] try: db_connection = psycopg2.connect(**kw) cursor = db_connection.cursor(cursor_factory=psycopg2.extras.DictCursor) except Exception: e = get_exception() module.fail_json(msg="unable to connect to database: %s" % e) kw = dict(user=user) changed = False user_removed = False if state == "present": if user_exists(cursor, user): try: changed = user_alter(cursor, module, user, password, role_attr_flags, encrypted, expires, no_password_changes) except SQLParseError: e = get_exception() module.fail_json(msg=str(e)) else: try: changed = user_add(cursor, user, password, role_attr_flags, encrypted, expires) except SQLParseError: e = get_exception() module.fail_json(msg=str(e)) try: changed = grant_privileges(cursor, user, privs) or changed except SQLParseError: e = get_exception() module.fail_json(msg=str(e)) else: if user_exists(cursor, user): if module.check_mode: changed = True kw['user_removed'] = True else: try: changed = revoke_privileges(cursor, user, privs) user_removed = user_delete(cursor, user) except SQLParseError: e = get_exception() module.fail_json(msg=str(e)) changed = changed or user_removed if fail_on_user and not user_removed: msg = "unable to remove user" module.fail_json(msg=msg) kw['user_removed'] = user_removed if changed: if module.check_mode: db_connection.rollback() else: db_connection.commit() kw['changed'] = changed module.exit_json(**kw) # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.database import * main()
<?php namespace app\admin\library; class Uri { const SCHEMES_WITH_AUTHORITY = ';http;https;ftp'; /** @var string */ private $scheme; /** @var string */ private $host; /** @var string */ private $user; /** @var string */ private $pass; /** @var string */ private $path; /** @var string */ private $query; /** @var string */ private $fragment; /** @var int */ private $port; /** @var bool */ private $absolute = true; /** * If $uri is set, we'll hydrate this object with it * * @param string $uri {optional} */ public function __construct($uri = null) { if ($uri !== null) { $this->fromString($uri); } } /** * Alias for getUri. * @return string */ public function __toString() { return $this->getUri(); } /** * Hydrate this object with values from a string * @param $uri * @return self */ public function fromString($uri) { if (is_numeric($uri)) { //Could be a valid url $uri = '' . $uri; } if (!is_string($uri)) { $uri = ''; } $this->setRelative(); if (0 === strpos($uri, '//')) { $this->setAbsolute(); } $parsed_url = parse_url($uri); if (!$parsed_url) { return $this; } if (array_key_exists('scheme', $parsed_url)) { $this->setAbsolute(); } foreach ($parsed_url as $urlPart => $value) { $method = 'set' . ucfirst($urlPart); if (method_exists($this, $method)) { $this->$method($value); } } return $this; } /** * Get the URI from the set parameters * @return string */ public function getUri() { $userPart = ''; if ($this->getUser() !== null && $this->getPass() !== null) { $userPart = $this->getUser() . ':' . $this->getPass() . '@'; } else if ($this->getUser() !== null) { $userPart = $this->getUser() . '@'; } $schemePart = ($this->getScheme() ? $this->getScheme() . '://' : '//'); if (!in_array($this->getScheme(), self::getSchemesWithAuthority())) { $schemePart = $this->getScheme() . ':'; } $portPart = ($this->getPort() ? ':' . $this->getPort() : ''); $queryPart = ($this->getQuery() ? '?' . $this->getQuery() : ''); $fragmentPart = ($this->getFragment() ? '#' . $this->getFragment() : ''); if ($this->isRelative()) { return $this->getPath() . $queryPart . $fragmentPart; } $path = $this->getPath(); if (0 !== strlen($path) && '/' !== $path[0]) { $path = '/' . $path; } return $schemePart . $userPart . $this->getHost() . $portPart . $path . $queryPart . $fragmentPart; } /** * @param string $fragment * @return self */ public function setFragment($fragment) { $this->fragment = $fragment; return $this; } /** * @return string */ public function getFragment() { return $this->fragment; } /** * @param string $host * @return self */ public function setHost($host) { $this->host = $host; $this->setAbsolute(); return $this; } /** * @return string */ public function getHost() { return $this->host; } /** * @param string $pass * @return self */ public function setPass($pass) { $this->pass = $pass; return $this; } /** * @return string */ public function getPass() { return $this->pass; } /** * @param string $path * @return self */ public function setPath($path) { $this->path = $path; return $this; } /** * @return string */ public function getPath() { return $this->path; } /** * Set the query. Must be a string, and the prepending "?" will be trimmed. * Example: ?a=b&c[]=123 -> "a=b&c[]=123" * @see Sensimity_Helper_UriTest::provideSetQuery * * @param string $query * @return self */ public function setQuery($query) { $this->query = null; if (is_string($query)) { $this->query = ltrim($query, '?'); } return $this; } /** * @return string */ public function getQuery() { return $this->query; } /** * Set the scheme. If its empty, it will be set to null. * * Must be a string. Can only contain "a-z A-Z 0-9 . : -". * Will be forced to lowercase. * Appended : or // will be removed. * @see Sensimity_Helper_UriTest::provideSetScheme * * @param string $scheme * @return self */ public function setScheme($scheme) { $this->scheme = null; if (empty($scheme) || null === $scheme) { return $this; } $scheme = preg_replace('/[^a-zA-Z0-9\.\:\-]/', '', $scheme); $scheme = strtolower($scheme); $scheme = rtrim($scheme, ':/'); $scheme = trim($scheme, ':/'); $scheme = str_replace('::', ':', $scheme); if (strlen($scheme) != 0) { if ($this->isRelative()) { /* Explained: */ /* @see Sensimity_Helper_UriTest::testRelativeAbsoluteUrls */ $exp = explode('/', ltrim($this->getPath(), '/')); $this->setHost($exp[0]); unset($exp[0]); $this->setPath(null); $path = implode('/', $exp); if (strlen($path) > 0) { //Only create the "/" if theres a path $this->setPath('/' . $path); } $this->setAbsolute(); } $this->scheme = $scheme; } return $this; } /** * @return string */ public function getScheme() { return $this->scheme; } /** * @param string $user * @return self */ public function setUser($user) { $this->user = $user; return $this; } /** * @return string */ public function getUser() { return $this->user; } /** * Port must be a valid number. Otherwise it will be set to NULL. (default scheme port) * @see Sensimity_Helper_UriTest::provideSetPort * * @param int|string $port * @return self */ public function setPort($port) { $this->port = null; if ((is_string($port) || is_numeric($port)) && ctype_digit(strval($port))) { $this->port = (int) $port; } return $this; } /** * @return int */ public function getPort() { return $this->port; } /** * @return bool */ public function isRelative() { return (!$this->absolute); } /** * @return bool */ public function isAbsolute() { return ($this->absolute); } /** * @return $this */ public function setAbsolute() { $this->absolute = true; return $this; } /** * @return $this */ public function setRelative() { $this->absolute = false; return $this; } /** Some helpful static functions */ /** * @param $uri * @param null $scheme * @return string */ public static function changeScheme($uri, $scheme = null) { if ($scheme == null) { //null for scheme = just no change at all - only in this static function, for BC! return $uri; } $class = get_called_class(); $uri = new $class($uri); $uri->setScheme($scheme); return $uri->getUri(); } /** * @see http://tools.ietf.org/html/rfc3986#section-3 * @return array */ public static function getSchemesWithAuthority() { return explode(';', self::SCHEMES_WITH_AUTHORITY); } /** * @return bool */ public function isSchemeless() { $scheme = $this->getScheme(); return (bool) ($this->isRelative() || ($this->isAbsolute() && empty($scheme))); } }
In the second game, the Keys led 5-0 after three innings as starter John Lamb allowed five runs on five hits in four innings with two walks and a strikeout. Wilmington scored four in the fourth, five in the fifth, a run in the sixth and eight in the seventh and turned the game into a blowout. Shortstop Jack Lopez went three for five with a triple, a home run and seven RBIs. In his first game, first baseman Jared Schlehuber had two hits, four RBIs and scored twice. He was the 2012 Summit League Player of the Year. Right fielder Jorge Bonifacio was four for four with two walks and two runs scored. His average is up to .320. Cheslor Cuthbert had two hits and scored twice, and Lane Adams had two hits and scored three runs. In the opener, Wilmington trailed 2-0 after five innings, but pushed five runs across in the sixth, added a run in the seventh and held on for the victory. Kenny Diekroeger had a two-run single in the sixth inning, and Wilmington also got runs on a bunt and a sacrifice fly. Kyle Zimmer got a no-decision as he gave up five hits and two runs in four innings. He struck out three and walked two. The Storm Chasers save a five-run lead disappear in a 10-7 loss at Colorado Springs. Omaha scored four runs in the top of the first as David Lough doubled and moved to second on a sacrifice by Christian Colon. Johnny Giavotella doubled home Lough and Max Ramirez singled to score Giavotella. Anthony Seratelli then delivered an RBI double and scored on a single by Chad Tracy. In the fourth, Tracy’s sacrifice fly made it 5-0. However, Colorado Springs scored four in the fifth to make it a one-run game. Brett Hayes’ RBI double got a run back, but the Sky Sox scored four in the seventh for an 8-6 lead. A wild run in the eighth got the Storm Chasers a run closer, but Colorado Springs scored a pair in their half of the inning. Omaha starter Chris Dwyer gave us four runs in 5 1/3 innings, Blaine Boyer gave up four more in 1 2/3 innings and Donnie Joseph allowed two in the eighth. Colin Rodgers threw six shutout innings as Lexington won the opener of a doubleheader against West Virginia 2-0. The Power rallied late and won the nightcap 4-3. In the first game, Rodgers struck out six and walked just one and lowered his ERA to 2.30. Mark Peterson got the save with a scoreless seventh. The Legends got a run in the fifth as Nick Cuckovich walked, stole second and scored on a single by Raul Mondesi. In the sixth, Bubba Starling doubled and scored on a double by Jin-Ho Shin. In the second game, Lexington led 3-1 after five innings, but coughed up the lead as the Power scored one in the sixth and two in the seventh. Legends reliever Ali Williams walked three and gave up a run in one-third of an inning, while Alec Mills gave up two walks and a two-run homer in the seventh. Terrance Gore had three hits, scored twice and added an RBI for the Legends, while Starling and Mondesi each had a hit and an RBI.
Channel News Asia posted last week that hackers could steal your info by just knowing your phone number. Woah!! Must be some uber NSA stuff right–but no, it was a couple of guys with Metasploit and they required a LOT more than ‘just’ the phone number. The post was an add-on to a current affairs show called Talking Point, that aired an episode last week about cybersecurity, which (like most mainstream media reporting) had more than a few errors I’d like to address. The show starts off, by highlighting that Cybercrime cost Singaporeans S$1.25bln, which might be true, but lacks context, or rather had the context removed. Because the very report that estimated the cost, also mentioned that society was willing to tolerate malicious activity that cost less than 2% of GDP, like Narcotics (0.9%) and even pilferage (1.5%). S$1.25bln is less than 0.3% of Singapore’s GDP, and is long way off the 2% threshold. Giving out big numbers without context gives readers the wrong impression. So allow me to provide context on just how big that S$1.25bln is. In 2010, Singapore’s retail sector lost S$222 mln to shrinkage, a term used to describe the losses attributed to employee theft, shoplifting, administrative error, and others. Had we split the cost of cybercrime across different industry based on their percentage of overall GDP, the total losses for cybercrime on the retail sector in 2015 would be $225 mln–almost identical to what the sector lost to shrinkage….7 years ago! Cybercrime is a problem, but not one that is wildly out of proportion to the other issues society is facing.
A limited number of Forms and Resources are listed below. For the complete list, please log in. There was a problem with your search, please try again later. The following forms require Adobe Acrobat Reader to view. You can download the Reader free from Adobe.com by clicking on the Reader Icon.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <TITLE> com.google.gwt.editor.ui.client.adapters Class Hierarchy (Google Web Toolkit Javadoc) </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="com.google.gwt.editor.ui.client.adapters Class Hierarchy (Google Web Toolkit Javadoc)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> GWT 2.6.0</EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../../../com/google/gwt/editor/ui/client/package-tree.html"><B>PREV</B></A>&nbsp; &nbsp;<A HREF="../../../../../../../com/google/gwt/event/dom/client/package-tree.html"><B>NEXT</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../../index.html?com/google/gwt/editor/ui/client/adapters/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> Hierarchy For Package com.google.gwt.editor.ui.client.adapters </H2> </CENTER> <DL> <DT><B>Package Hierarchies:</B><DD><A HREF="../../../../../../../overview-tree.html">All Packages</A></DL> <HR> <H2> Class Hierarchy </H2> <UL> <LI TYPE="circle">java.lang.Object<UL> <LI TYPE="circle">com.google.gwt.editor.ui.client.adapters.<A HREF="../../../../../../../com/google/gwt/editor/ui/client/adapters/HasTextEditor.html" title="class in com.google.gwt.editor.ui.client.adapters"><B>HasTextEditor</B></A> (implements com.google.gwt.editor.client.<A HREF="../../../../../../../com/google/gwt/editor/client/LeafValueEditor.html" title="interface in com.google.gwt.editor.client">LeafValueEditor</A>&lt;T&gt;) <LI TYPE="circle">com.google.gwt.editor.client.adapters.<A HREF="../../../../../../../com/google/gwt/editor/client/adapters/TakesValueEditor.html" title="class in com.google.gwt.editor.client.adapters"><B>TakesValueEditor</B></A>&lt;T&gt; (implements com.google.gwt.editor.client.<A HREF="../../../../../../../com/google/gwt/editor/client/LeafValueEditor.html" title="interface in com.google.gwt.editor.client">LeafValueEditor</A>&lt;T&gt;) <UL> <LI TYPE="circle">com.google.gwt.editor.ui.client.adapters.<A HREF="../../../../../../../com/google/gwt/editor/ui/client/adapters/ValueBoxEditor.html" title="class in com.google.gwt.editor.ui.client.adapters"><B>ValueBoxEditor</B></A>&lt;T&gt; (implements com.google.gwt.editor.client.<A HREF="../../../../../../../com/google/gwt/editor/client/HasEditorDelegate.html" title="interface in com.google.gwt.editor.client">HasEditorDelegate</A>&lt;T&gt;) </UL> </UL> </UL> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> GWT 2.6.0</EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../../../com/google/gwt/editor/ui/client/package-tree.html"><B>PREV</B></A>&nbsp; &nbsp;<A HREF="../../../../../../../com/google/gwt/event/dom/client/package-tree.html"><B>NEXT</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../../index.html?com/google/gwt/editor/ui/client/adapters/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
round is at 750 pts mission and deployment as of yet unknown and will be played on a 4x4 board with the same limitations as the last round . The answer is never the Devildog. Sorry to say I'm not very helpful with lower point lists as I've regularly played 1750+ for years. First and foremost, you can not take a Ghost Ark with a unit of Immortals so the question is, would you prefer Immortals this time and would a Night Scythe be an option, or is another Warrior unit in Ghost Ark what you want. Also you can not take 2 Lightning Fields as you only have 1 Royal Court and those pieces of wargear are basically "Unique." Overall I agree with your HQ because I like to run one of those myself, same wargear too as it keeps him nice and cheap. It seems like you have a good variety of everything to deal with most threats. Gauss and the Voltaic Staff are a good combination in my opinion because they can both do vehicles and infantry fairly well. I don't see the need for the Lightning Field though. With such a small unit of Warriors, whatever is assaulting you is probably going to win anyway. As you go up in points, I might look to some Canoptek Spyders since they will help keep your gunboats afloat and are great for counter assault or holding back the front lines if necessary. Plus being a Monstrous Creature with a good Toughness will give those anti-tank weapons second guessing what to shoot. They can't keep up to well... I guess for home objectives they could be ok, but not something I like to bank on. What about either 4 Scarabs, or 3 Tomb Blades or 2 Wraiths? Or perhaps best of all would be a Harbinger of Destruction with all the goodies, for 65 pts. the idea with the warriors was to reserve and walk on to a home objective . the army i am trying to build overall i want to be skimmer and flyer based so wraiths alhough great in this list will not fit later on . Edit: played my 750 game last night . was against vanilla marines with some sprshial character a couple of tac squads (ML, plasma) and a storm talon . it went very well tabled my opponent with a loss of just the lord and hes bargr . i deployed the ghost arks in an l shape with the annihilation barges sat within the arks and the board edge and turbo'ed the ccb towards he's objective. he droped he's 9 man plague squad by he's objective and the two 5 man ones in a position to get mine ( the 3rd misshaped and went back into reserve). i then sweeped and assaulted the 9 man squad with the ccb killing half. shot up 4 out of 5 of one of the 5 man squads . he's turn two he droped the lamers and screamers by my ghosts and barges. he took two hull points of a barge with flamers and turboed the screamers behind cover. turn 3 i killed the flamers finished of the lone plague and the 9 man squad and put a few wounds on the screamers. he then droped the last 5 man squad by he's own objective and then multi assaulted both barges and and ark killing them all with the screamers. he assaulted my remaining ark with he's screamers losint two to overwatch and assaulted the plagues in my deployment into my warriors that fell out of the other ark.
<?php /* Template Name: page-exhibition */ get_header(); //Japan design include_once(APP_ROOT.'/custom/template/exhibition.php'); ?> <?php get_footer(); ?>
#!/usr/bin/python import sys service_name = "cherrypy-dns" pidfile_path = "/var/run/" + service_name + ".pid" port = 8001 if len(sys.argv) > 1 and sys.argv[1] == "service_name": print service_name; sys.exit(0) if len(sys.argv) > 1 and sys.argv[1] == "pidfile_path": print pidfile_path; sys.exit(0) if len(sys.argv) > 1 and sys.argv[1] == "port": print port; sys.exit(0) import cherrypy, os, subprocess from cherrypy.process.plugins import PIDFile p = PIDFile(cherrypy.engine, pidfile_path) p.subscribe() script_dir = os.path.dirname(os.path.realpath(__file__)) class ScriptRunner: @cherrypy.expose def add(self, hostname="", ip=""): return self.execute_command('bash ' + script_dir + '/add-domain-name.sh "' + hostname + '" "' + ip + '"') @cherrypy.expose def remove(self, hostname=None, ip=None): if not hostname: raise cherrypy.HTTPError(400, "Hostname parameter is required.") if not ip: raise cherrypy.HTTPError(400, "IP parameter is required.") return self.execute_command('bash ' + script_dir + '/remove-domain-name.sh "' + hostname + '" "' + ip + '"') #@cherrypy.expose #def lookup(self, attr): # return subprocess.check_output('bash -c "cat $HADOOP_CONF_DIR/slaves"', shell=True) def execute_command(self, command): try: return subprocess.check_output(command, shell=True) except subprocess.CalledProcessError as e: raise cherrypy.HTTPError(500, e.cmd + " exited with code " + str(e.returncode) + "\n" + e.output) conf = { 'global': { 'server.socket_host': '127.0.0.1', 'server.socket_port': port, 'server.thread_pool': 1 } } cherrypy.quickstart(ScriptRunner(), '/domain-names/', conf)
import {Injectable} from "@angular/core"; import {Http, Response} from "@angular/http"; import {Observable} from "rxjs/Observable"; import {Consts} from "../consts"; import {UserDataService} from "../providers/userDataService"; @Injectable() export class OrganizationsService { constructor(private http: Http, private consts: Consts, private userDataService: UserDataService) { } public getDepartments(latitude: string, longitude: string): Observable<Response> { return this.http.get(this.consts.ResgridApiUrl + "/ListDepartments"); } public getDepartment(profileId: number): Observable<Response> { return this.http.get(this.consts.ResgridApiUrl + "/GetDepartment?profileId=" + profileId + "&userId=" + this.userDataService.getUserId()); } }
> Surface Grinding Machines Nissei has stood simultaneous double face grinding on it’s end. They are one of the pioneers of “Vertical” double disc grinding. DANOBAT-OVERBECK Internal Grinding Machines are used to work in the most demanding ... face and radius grinding machines. ... Simultaneous Internal & External grinding. ID, OD, Face, Taper, Radius, Contour Grinding in Single Chucking Eastec 2017: Hardinge Grinding Group, a subsidiary of Hardinge Inc., will showcase its USACH 100‐T4 machine for ID/OD precision cylindrical grinding in a variety of industries. Simultaneous Internal / Rib Face, Simultaneous Internal / External Grinder KMT Precision Grinding is Sweden`s largest machine tool manufacturer. The SUU platform can be set up for Internal, External or Rib face grinding operations and the SUUC platform can be set up for simultaneous Internal and External or Internal and Rib face grinding. Our goal is to give you accuracy, efficiency and reliability through our products, our process knowledge and development, customer support and service. Simultaneous grinding of O.D. & End Face ... End face can be ground simultaneously Grinding Wheel ... Grinding capacity is subject to workpiece feed type. Junker JUMAT Machine Offers Simultaneous Grinding of ID, OD and Faces of Gears May 31, 2017 Junker's newest JUMAT machine allows for simultaneous grinding of the ID, OD and faces of gears. A hazard assessment should determine the risk of exposure to eye and face hazards, including those which may be encountered in an emergency. Employers should be aware of the possibility of multiple and simultaneous hazard exposures and be prepared to protect against the highest level of each hazard.
CREATE TABLE country (id VARCHAR(2) NOT NULL, name VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "country" ("id", "name") VALUES ('ak', 'akánɛ'); INSERT INTO "country" ("id", "name") VALUES ('am', 'amalíke'); INSERT INTO "country" ("id", "name") VALUES ('my', 'bímanɛ'); INSERT INTO "country" ("id", "name") VALUES ('bg', 'bulgálɛ'); INSERT INTO "country" ("id", "name") VALUES ('cs', 'cɛ́kɛ́ɛ'); INSERT INTO "country" ("id", "name") VALUES ('fr', 'feleŋsí'); INSERT INTO "country" ("id", "name") VALUES ('ig', 'íbo'); INSERT INTO "country" ("id", "name") VALUES ('hi', 'índí'); INSERT INTO "country" ("id", "name") VALUES ('id', 'índonísiɛ'); INSERT INTO "country" ("id", "name") VALUES ('en', 'íŋgilísé'); INSERT INTO "country" ("id", "name") VALUES ('it', 'itáliɛ'); INSERT INTO "country" ("id", "name") VALUES ('km', 'kímɛɛ'); INSERT INTO "country" ("id", "name") VALUES ('ko', 'kolíe'); INSERT INTO "country" ("id", "name") VALUES ('ms', 'máliɛ'); INSERT INTO "country" ("id", "name") VALUES ('ja', 'ndiáman'); INSERT INTO "country" ("id", "name") VALUES ('nl', 'nilándɛ'); INSERT INTO "country" ("id", "name") VALUES ('yav', 'nuasue'); INSERT INTO "country" ("id", "name") VALUES ('es', 'nuɛspanyɔ́lɛ'); INSERT INTO "country" ("id", "name") VALUES ('vi', 'nufiɛtnamíɛŋ'); INSERT INTO "country" ("id", "name") VALUES ('uk', 'nukeleniɛ́ŋɛ'); INSERT INTO "country" ("id", "name") VALUES ('rw', 'nuluándɛ́ɛ'); INSERT INTO "country" ("id", "name") VALUES ('ro', 'nulumɛ́ŋɛ'); INSERT INTO "country" ("id", "name") VALUES ('ru', 'nulúse'); INSERT INTO "country" ("id", "name") VALUES ('ur', 'nulutú'); INSERT INTO "country" ("id", "name") VALUES ('ne', 'nunipálɛ'); INSERT INTO "country" ("id", "name") VALUES ('fa', 'nupɛ́lisɛ'); INSERT INTO "country" ("id", "name") VALUES ('pl', 'nupolonɛ́ɛ'); INSERT INTO "country" ("id", "name") VALUES ('pt', 'nupɔlitukɛ́ɛ'); INSERT INTO "country" ("id", "name") VALUES ('pa', 'nupunsapíɛ́'); INSERT INTO "country" ("id", "name") VALUES ('so', 'nusomalíɛ'); INSERT INTO "country" ("id", "name") VALUES ('sv', 'nusuetua'); INSERT INTO "country" ("id", "name") VALUES ('zu', 'nusulú'); INSERT INTO "country" ("id", "name") VALUES ('ta', 'nutámule'); INSERT INTO "country" ("id", "name") VALUES ('th', 'nutáyɛ'); INSERT INTO "country" ("id", "name") VALUES ('tr', 'nutúluke'); INSERT INTO "country" ("id", "name") VALUES ('yo', 'nuyolúpa'); INSERT INTO "country" ("id", "name") VALUES ('de', 'ŋndiáman'); INSERT INTO "country" ("id", "name") VALUES ('hu', 'ɔ́ŋgɛ'); INSERT INTO "country" ("id", "name") VALUES ('ha', 'pakas'); INSERT INTO "country" ("id", "name") VALUES ('ar', '́pakas'); INSERT INTO "country" ("id", "name") VALUES ('bn', 'pengálɛ́ɛ'); INSERT INTO "country" ("id", "name") VALUES ('be', 'pielúse'); INSERT INTO "country" ("id", "name") VALUES ('zh', 'sinúɛ'); INSERT INTO "country" ("id", "name") VALUES ('el', 'yavánɛ'); INSERT INTO "country" ("id", "name") VALUES ('jv', 'yávanɛ');
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.5"/> <title>Bombás játék: Tween Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Bombás játék </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> &#124; <a href="class_tween-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">Tween Class Reference</div> </div> </div><!--header--> <div class="contents"> <div class="dynheader"> Inheritance diagram for Tween:</div> <div class="dyncontent"> <div class="center"> <img src="class_tween.png" usemap="#Tween_map" alt=""/> <map id="Tween_map" name="Tween_map"> <area href="class_object.html" alt="Object" shape="rect" coords="0,0,49,24"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:aabf46e53623cc19ca44dfb5363b7d389"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aabf46e53623cc19ca44dfb5363b7d389"></a> &#160;</td><td class="memItemRight" valign="bottom"><b>Tween</b> (float ir, float ig, float ib)</td></tr> <tr class="separator:aabf46e53623cc19ca44dfb5363b7d389"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:afde90e795bbf44b815e5550b284b0ef9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afde90e795bbf44b815e5550b284b0ef9"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>draw</b> (float x, float y)</td></tr> <tr class="separator:afde90e795bbf44b815e5550b284b0ef9"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2e1dc18b17def212817a3d6bf77f23ee"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e1dc18b17def212817a3d6bf77f23ee"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>draw</b> (float x, float y, float w, float h)</td></tr> <tr class="separator:a2e1dc18b17def212817a3d6bf77f23ee"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="inherit_header pub_methods_class_object"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_object')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_object.html">Object</a></td></tr> <tr class="memitem:a0e232e1ef6a070f5b9cee6aafc937dc7 inherit pub_methods_class_object"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e232e1ef6a070f5b9cee6aafc937dc7"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>draw</b> (float x, float y, std::string param=&quot;&quot;)</td></tr> <tr class="separator:a0e232e1ef6a070f5b9cee6aafc937dc7 inherit pub_methods_class_object"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a13b99ec4da0a1c798104560c492c2a7e inherit pub_methods_class_object"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a13b99ec4da0a1c798104560c492c2a7e"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>draw</b> (float x, float y, float w, float h, std::string param=&quot;&quot;)</td></tr> <tr class="separator:a13b99ec4da0a1c798104560c492c2a7e inherit pub_methods_class_object"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a210c8bac4e5705ffee71d0837e46ab46 inherit pub_methods_class_object"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a210c8bac4e5705ffee71d0837e46ab46"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>bind</b> ()</td></tr> <tr class="separator:a210c8bac4e5705ffee71d0837e46ab46 inherit pub_methods_class_object"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <hr/>The documentation for this class was generated from the following files:<ul> <li>rubbish/<a class="el" href="tween_8h_source.html">tween.h</a></li> <li>rubbish/tween.cpp</li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Thu Oct 24 2013 01:01:06 for Bombás játék by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.5 </small></address> </body> </html>
Free Auto Insurance Quotes can Save You Hundreds of Dollars Each Year in Rancho Santa Margarita, California (CA)! Under the rental payment every single day. Of course, if the vehicle must not have to go to a lack of time. Finally, make sure you are given better deals, which you cannot escape from the associated category and move it if such a lot easier for people to get the most savings, you did not hear from them may work as well as best suited for you. The offshore companies on the phone company representatives make those features. That's one reason is that their identity without going to be repaired by a licensed agent assist you, it would be able to those women who are schizophrenic and might offer a measure of protection of the companies. Once you have worked out well. Still, cheap Florida insurance would cover most accidents but does not mandate that they have different benefits. If your car on time. All policies will send in a quote with that tool and get in touch with your health insurance, key person insurance, and other things such as collision coverage when the company receives its business through referrals. Remember that brand loyalty will not result in a good reason behind it. Sometimes a company that specializes in interpreting the insurance premiums become unaffordable. In order to pay should you go over to some moral high ground because they value your business draws customers from but does that amount, figure out what kind of loan that can be a private vehicle. A good sign and treat you like and dislike about your proposal immediately. Although it is crucial when you get and needs. Retain a lawyer that you learn about policy coverage is nominal when you go to work through the painstaking process of getting insurance quotes it would be promptly told no and that what value the next time there's a history of previous insurance and why there are many choices may good, but great cheap auto insurance in CA premium. In most of us spend has been there in Rancho Santa Margarita for long time without any obligation to teenagers at the customers know different types of policies and will have a difficult time getting them their own carrier. If the accident is blamed on whoever is in an accident is blamed on whoever is in your own insurance company. By spending just a little research to get better rates. Medical expenses or $5,000 would go high as 50%. In a certain amount in your case.
'use strict'; var handyJS = {}; 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; handyJS.ajax = {}; handyJS.ajax.request = function (options) { var self = this; var blankFun = function blankFun() {}; self.xhr = new XMLHttpRequest(); if (options.method === undefined) { options.method = 'GET'; } else { options.method = options.method.toUpperCase(); } if (options.async === undefined) { options.async = true; } if (!options.data) { options.segments = null; } else if (!Array.isArray(options.data)) { throw Error('Option.data must be an Array.'); } else if (options.data.length === 0) { options.segments = null; } else { //detect the form to send data. if (options.method === 'POST') { options.data.forEach(function (segment) { if (segment === null) { throw Error('Do not send null variable.'); } else if ((typeof segment === 'undefined' ? 'undefined' : _typeof(segment)) === 'object') { for (var key in segment) { if (segment.hasOwnProperty(key)) { if (segment[key] === undefined) { continue; } if (segment[key] instanceof Blob) { if (options.enctype === undefined) { options.enctype = 'FORMDATA'; break; } if (options.enctype.toUpperCase() !== 'FORMDATA') { throw Error('You have to set dataForm to \'FormData\'' + ' because you about to send file, or just ignore this property.'); } } if (options.enctype === undefined) { options.enctype = 'URLENCODE'; } } } } else { throw Error('You have to use {key: value} structure to send data.'); } }); } else { options.enctype = 'URLINLINE'; } } //transform some type of value var transformValue = function transformValue(value) { if (value === null) { return ''; } if (value === undefined) { return ''; } switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { case 'object': if (value instanceof Blob) { return value; } else { return JSON.stringify(value); } break; case 'string': return value; default: return value; } }; //encode uri string //Copied from MDN, if wrong, pls info me. var encodeUriStr = function encodeUriStr(str) { return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { return '%' + c.charCodeAt(0).toString(16); }); }; //add event handler. These handlers must added before open method. //set blank functions options.onProgress = options.onProgress || blankFun; options.onComplete = options.onComplete || blankFun; options.onFailed = options.onFailed || blankFun; options.onCanceled = options.onCanceled || blankFun; options.onLoadEnd = options.onLoadEnd || blankFun; self.xhr.addEventListener('progress', options.onProgress); self.xhr.addEventListener('load', options.onComplete); self.xhr.addEventListener('error', options.onFailed); self.xhr.addEventListener('abort', options.onCanceled); self.xhr.addEventListener('loadend', options.onLoadEnd); self.xhr.open(options.method, options.url, options.async, options.user, options.password); //digest the data decided by encode type //header setting must be done here switch (options.enctype.toUpperCase()) { case 'FORMDATA': console.log('Encode data as FormData type.'); options.segments = new FormData(); options.data.forEach(function (segment) { if (segment.fileName) { for (var key in segment) { if (segment.hasOwnProperty(key)) { if (key !== 'fileName') { options.segments.append(key, segment[key], segment.fileName); } } } } else { for (var _key in segment) { if (segment.hasOwnProperty(_key)) { options.segments.append(_key, transformValue(segment[_key])); } } } }); break; case 'URLINLINE': console.log('Encode data as url inline type.'); options.segments = null; options.data.forEach(function (segment, index) { for (var key in segment) { if (segment.hasOwnProperty(key)) { var value = encodeUriStr(transformValue(segment[key])); if (index === 0) { options.url = options.url + '?' + value; } else { options.url = options.url + '&' + value; } } } }); break; case 'URLENCODE': console.log('Encode data as url encode type.'); self.xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); options.segments = ''; options.data.forEach(function (segment, index) { for (var key in segment) { if (segment.hasOwnProperty(key)) { var value = encodeUriStr(transformValue(segment[key])); if (index === 0) { options.segments = options.segments + key + '=' + value; } else { options.segments = options.segments + '&' + key + '=' + value; } } } }); break; } self.xhr.send(options.segments); }; handyJS.ajax.post = function (url, data, cb) { var self = this; self.request({ method: 'POST', url: url, data: data, onComplete: function onComplete() { //get response content types var contentType = handyJS.string.removeWhitespace(this.getResponseHeader('content-type').toLowerCase()).split(';'); //callback with probably variables. if (contentType.indexOf('application/json') === -1) { cb(this.responseText); } else { cb(JSON.parse(this.responseText)); } } }); }; 'use strict'; //All bout file manipulate handyJS.file = {}; // sources: // http://stackoverflow.com/questions/190852/how-can-i-get-file-extensions-with-javascript handyJS.file.getExtension = function (fileName) { return fileName.slice((Math.max(0, fileName.lastIndexOf('.')) || Infinity) + 1); }; //usage: changeFileName('ding.js', 'dong'); => dong.js handyJS.file.changeName = function (originalName, newName) { var extension = this.getExtension(originalName); return newName + '.' + extension; }; 'use strict'; handyJS.string = {}; //remove whitespace, tab and new line handyJS.string.removeAllSpace = function (string) { return string.replace(/\s/g, ''); }; //only remove whitespace handyJS.string.removeWhitespace = function (string) { return string.replace(/ /g, ''); }; "use strict";
2019 Big Science Competition will take place from 20 May to 29 May 2019. There are no minimum registrations required to register. That’s right! You can register one student or your whole year 7-10 cohort. $7.00 plus GST per student. $8.00 plus GST per student*. *There are additional shipping costs for international schools. The freight charges help cover the cost of couriering papers and answer sheets directly to your school. Freight charges are one-way only. Schools are responsible for returning completed answer sheets to Australian Science Innovations at their own expense. All other countries please contact [email protected] for freight details. Schools can pay by credit card, cheque or EFT. Credit card payments are made online using the secure payment gateway. An invoice will be created and emailed to you when you register your students. Schools must register the number of students via the school sign in area on this website. If you do not know, or can’t access your school ID or password, please email [email protected] and we will send it to you. See if your school’s technology meets the requirements for the online competition. Parents cannot register their children. Please speak with your school to register students wanting to take part. Home schooled students are welcome to take part and can register by contacting [email protected] or call us on 02 6125 6228. Home schooled students or students whose school chooses not to participate are free to make arrangements to sit under the supervision of another school.
using System; using System.IO; using System.Text; using System.Collections.Generic; public static class DirectoryTraversers { ///<summary> /// Sample class, which traverses given directory /// based on the Breath-First-Search (BFS) algorithm /// /// Sample class, which traverses recursively given directory /// based on the Depth-First-Search (DFS) algorithm ///</summary> public static void Main() { Console.OutputEncoding = Encoding.Unicode; //TraverseDirBFS("D:\\"); TraverseDirDFS("D:\\"); } ///<summary> /// Traverses and prints given directory with BFS ///</summary> ///<param name="directoryPath">the path to the directory /// which should be traversed</param> public static void TraverseDirBFS(string directoryPath) { Queue<DirectoryInfo> visitedDirsQueue = new Queue<DirectoryInfo>(); visitedDirsQueue.Enqueue(new DirectoryInfo(directoryPath)); while (visitedDirsQueue.Count > 0) { try { DirectoryInfo currentDir = visitedDirsQueue.Dequeue(); Console.WriteLine(currentDir.FullName); DirectoryInfo[] children = currentDir.GetDirectories(); foreach (DirectoryInfo child in children) { visitedDirsQueue.Enqueue(child); } } catch (UnauthorizedAccessException) { continue; } } } ///<summary> /// Traverses and prints given directory recursively ///</summary> ///<param name="directoryPath">the path to the directory /// whichshould be traversed</param> public static void TraverseDirDFS(string directoryPath) { TraverseDirDFS(new DirectoryInfo(directoryPath), string.Empty); } ///<summary> /// Traverses and prints given directory recursively ///</summary> ///<param name="dir">the directory to be traversed</param> ///<param name="spaces">the spaces used for representation /// of the parent-child relation</param> private static void TraverseDirDFS(DirectoryInfo dir, string spaces) { // Visit the current directory Console.WriteLine(spaces + dir.FullName); DirectoryInfo[] children = dir.GetDirectories(); // For each child go and visit its subtree foreach (DirectoryInfo child in children) { try { TraverseDirDFS(child, spaces + " "); } catch (UnauthorizedAccessException) { continue; } } } }
You have given me one of the topics that I like to talk about … Very, very interesting subject. First recommend the Spanish movie “Kiki” by Paco León. Funny comedy, teaches several sexual phobias, very unknown, real. More like hobbies, weird attractions. The phobia that I bring you is “Filofobia” … guess??!! … Very good post! He made a mistake. I said it in Spanish. “Filofobia” in Spain means phobia to fall in love. It is not easy, the explanation is more serious than it seems and has an explanation too technical. But it is another phobia that exists. Thanks to you for your Post. Thankfully I do not suffer from any of the listed fears. I am so reclusive that some people say I have a bad case of social phobia. Yes, scared by flying is Aviophobia. Thank you nice blog.Welcome fakanal01 caffee. Hi. I am still recalling what my phobia is. But what i can remember is my husband has a phobia in height. He really avoid like walking in a hanging bridge or something like looking down when he’s on top of a building. Very interesting post. I came across ambulothanatophobia when doing research on zombies. It is literally the irrational fear of the walking dead. Hows the phobia to be alone? I think phobia is treatable by hipnotherapy, to know the origin of it. Snakes 😩 – the only good snake is a dead snake in my opinion. A fantastic article, I real ly enjoyed it ! Nice educative and informative piece Sir. Additional phobia? Well every man had this once when they were boys. I call it “Hydrophobia/Aquaphobia” The fear of water. As in literally, the fear of taking a bath or hitting the showers. Trust me, it was quite the intimidating one. Some men still struggle to date you know! 😏 Nice read. Fall under 2, Ophidiophobia. But I think almost three quarters of the world population is afraid of snakes. I have almost all the phobia… Astraphobia, acrophobia and ophidiophobia. Good job. Would love if you could review my new post. I have all of these phobias 😂😭 Yay! Fear of being buried alive. Sometimes before I go to bed I imagine that! LOL. I don’t think they’d help with my active imagination. Should never had read about gulags and concentration camps as a kid! I have no unreasonable fears of height, snakes, crowds, and so on. I think most people have reasonable fears, nervousness you might call it. I know if I ride in a plane longer than 5 hours I have to then suppress some anxiety.
/* linux/arch/arm/mach-msm/board-swordfish.c * * Copyright (C) 2009 Google, Inc. * Author: Brian Swetland <[email protected]> * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/io.h> #include <linux/delay.h> #include <linux/fs.h> #include <linux/android_pmem.h> #include <linux/msm_kgsl.h> #include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> #include <asm/setup.h> #include <mach/board.h> #include <mach/irqs.h> #include <mach/msm_iomap.h> #include <mach/msm_hsusb.h> #include <mach/msm_ts.h> #include <linux/usb/android_composite.h> #include "board-swordfish.h" #include "devices.h" #include "proc_comm.h" extern int swordfish_init_mmc(void); static struct resource smc91x_resources[] = { [0] = { .start = 0x70000300, .end = 0x70000400, .flags = IORESOURCE_MEM, }, [1] = { .start = MSM_GPIO_TO_INT(156), .end = MSM_GPIO_TO_INT(156), .flags = IORESOURCE_IRQ, }, }; static struct platform_device smc91x_device = { .name = "smc91x", .id = 0, .num_resources = ARRAY_SIZE(smc91x_resources), .resource = smc91x_resources, }; static int swordfish_phy_init_seq[] = { 0x0C, 0x31, 0x1D, 0x0D, 0x1D, 0x10, -1 }; static void swordfish_usb_phy_reset(void) { u32 id; int ret; id = PCOM_CLKRGM_APPS_RESET_USB_PHY; ret = msm_proc_comm(PCOM_CLK_REGIME_SEC_RESET_ASSERT, &id, NULL); if (ret) { pr_err("%s: Cannot assert (%d)\n", __func__, ret); return; } msleep(1); id = PCOM_CLKRGM_APPS_RESET_USB_PHY; ret = msm_proc_comm(PCOM_CLK_REGIME_SEC_RESET_DEASSERT, &id, NULL); if (ret) { pr_err("%s: Cannot assert (%d)\n", __func__, ret); return; } } static void swordfish_usb_hw_reset(bool enable) { u32 id; int ret; u32 func; id = PCOM_CLKRGM_APPS_RESET_USBH; if (enable) func = PCOM_CLK_REGIME_SEC_RESET_ASSERT; else func = PCOM_CLK_REGIME_SEC_RESET_DEASSERT; ret = msm_proc_comm(func, &id, NULL); if (ret) pr_err("%s: Cannot set reset to %d (%d)\n", __func__, enable, ret); } static struct msm_hsusb_platform_data msm_hsusb_pdata = { .phy_init_seq = swordfish_phy_init_seq, .phy_reset = swordfish_usb_phy_reset, .hw_reset = swordfish_usb_hw_reset, }; static struct usb_mass_storage_platform_data mass_storage_pdata = { .nluns = 1, .vendor = "Qualcomm", .product = "Swordfish", .release = 0x0100, }; static struct platform_device usb_mass_storage_device = { .name = "usb_mass_storage", .id = -1, .dev = { .platform_data = &mass_storage_pdata, }, }; static struct resource msm_kgsl_resources[] = { { .name = "kgsl_reg_memory", .start = MSM_GPU_REG_PHYS, .end = MSM_GPU_REG_PHYS + MSM_GPU_REG_SIZE - 1, .flags = IORESOURCE_MEM, }, { .name = "kgsl_phys_memory", .start = MSM_GPU_MEM_BASE, .end = MSM_GPU_MEM_BASE + MSM_GPU_MEM_SIZE - 1, .flags = IORESOURCE_MEM, }, { .start = INT_GRAPHICS, .end = INT_GRAPHICS, .flags = IORESOURCE_IRQ, }, }; static struct platform_device msm_kgsl_device = { .name = "kgsl", .id = -1, .resource = msm_kgsl_resources, .num_resources = ARRAY_SIZE(msm_kgsl_resources), }; static struct android_pmem_platform_data mdp_pmem_pdata = { .name = "pmem", .start = MSM_PMEM_MDP_BASE, .size = MSM_PMEM_MDP_SIZE, .no_allocator = 0, .cached = 1, }; static struct android_pmem_platform_data android_pmem_gpu0_pdata = { .name = "pmem_gpu0", .start = MSM_PMEM_GPU0_BASE, .size = MSM_PMEM_GPU0_SIZE, .no_allocator = 0, .cached = 0, }; static struct android_pmem_platform_data android_pmem_gpu1_pdata = { .name = "pmem_gpu1", .start = MSM_PMEM_GPU1_BASE, .size = MSM_PMEM_GPU1_SIZE, .no_allocator = 0, .cached = 0, }; static struct android_pmem_platform_data android_pmem_adsp_pdata = { .name = "pmem_adsp", .start = MSM_PMEM_ADSP_BASE, .size = MSM_PMEM_ADSP_SIZE, .no_allocator = 0, .cached = 0, }; static struct platform_device android_pmem_mdp_device = { .name = "android_pmem", .id = 0, .dev = { .platform_data = &mdp_pmem_pdata }, }; static struct platform_device android_pmem_adsp_device = { .name = "android_pmem", .id = 1, .dev = { .platform_data = &android_pmem_adsp_pdata, }, }; static struct platform_device android_pmem_gpu0_device = { .name = "android_pmem", .id = 2, .dev = { .platform_data = &android_pmem_gpu0_pdata, }, }; static struct platform_device android_pmem_gpu1_device = { .name = "android_pmem", .id = 3, .dev = { .platform_data = &android_pmem_gpu1_pdata, }, }; static char *usb_functions[] = { "usb_mass_storage" }; static char *usb_functions_adb[] = { "usb_mass_storage", "adb" }; static struct android_usb_product usb_products[] = { { .product_id = 0x0c01, .num_functions = ARRAY_SIZE(usb_functions), .functions = usb_functions, }, { .product_id = 0x0c02, .num_functions = ARRAY_SIZE(usb_functions_adb), .functions = usb_functions_adb, }, }; static struct android_usb_platform_data android_usb_pdata = { .vendor_id = 0x18d1, .product_id = 0x0d01, .version = 0x0100, .serial_number = "42", .product_name = "Swordfishdroid", .manufacturer_name = "Qualcomm", .num_products = ARRAY_SIZE(usb_products), .products = usb_products, .num_functions = ARRAY_SIZE(usb_functions_adb), .functions = usb_functions_adb, }; static struct platform_device android_usb_device = { .name = "android_usb", .id = -1, .dev = { .platform_data = &android_usb_pdata, }, }; static struct platform_device fish_battery_device = { .name = "fish_battery", }; static struct msm_ts_platform_data swordfish_ts_pdata = { .min_x = 296, .max_x = 3800, .min_y = 296, .max_y = 3800, .min_press = 0, .max_press = 256, .inv_x = 4096, .inv_y = 4096, }; static struct platform_device *devices[] __initdata = { #if !defined(CONFIG_MSM_SERIAL_DEBUGGER) &msm_device_uart3, #endif &msm_device_smd, &msm_device_nand, &msm_device_hsusb, &usb_mass_storage_device, &android_usb_device, &fish_battery_device, &smc91x_device, &msm_device_touchscreen, &android_pmem_mdp_device, &android_pmem_adsp_device, &android_pmem_gpu0_device, &android_pmem_gpu1_device, &msm_kgsl_device, }; extern struct sys_timer msm_timer; static struct msm_acpu_clock_platform_data swordfish_clock_data = { .acpu_switch_time_us = 20, .max_speed_delta_khz = 256000, .vdd_switch_time_us = 62, .power_collapse_khz = 128000000, .wait_for_irq_khz = 128000000, }; void msm_serial_debug_init(unsigned int base, int irq, struct device *clk_device, int signal_irq); static void __init swordfish_init(void) { int rc; msm_acpu_clock_init(&swordfish_clock_data); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3, &msm_device_uart3.dev, 1); #endif msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; msm_device_touchscreen.dev.platform_data = &swordfish_ts_pdata; platform_add_devices(devices, ARRAY_SIZE(devices)); msm_hsusb_set_vbus_state(1); rc = swordfish_init_mmc(); if (rc) pr_crit("%s: MMC init failure (%d)\n", __func__, rc); } static void __init swordfish_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi) { mi->nr_banks = 1; mi->bank[0].start = PHYS_OFFSET; mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET); mi->bank[0].size = (101*1024*1024); } static void __init swordfish_map_io(void) { msm_map_common_io(); msm_clock_init(); } MACHINE_START(SWORDFISH, "Swordfish Board (QCT SURF8250)") #ifdef CONFIG_MSM_DEBUG_UART .phys_io = MSM_DEBUG_UART_PHYS, .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc, #endif .boot_params = 0x20000100, .fixup = swordfish_fixup, .map_io = swordfish_map_io, .init_irq = msm_init_irq, .init_machine = swordfish_init, .timer = &msm_timer, MACHINE_END
Summer is just around the corner. Summer is typically associated with fun times for kids. This is because they will be able to enjoy the outdoors at this time. This is why you would typically find families or groups of friends going on road trips during this season. What were mentioned are just some examples of activities that people commonly do and enjoy while it is the summer season. The first thing that you would have to do is to research about the names of the companies that build swimming pools. One can easily get this information when one searches for it on the internet. Then when you have their names you will have to go the homepage of their company so that you get more info about their swimming pool building services. You will be able to see a lot of information there about the work that they do that can help you decide which company to hire. One of the things that you need to seek out in their page is the number of years that they have been in operation. Typically the longer one has experience in doing something the better they are doing it. That is why you need to pick one with a longer number of years of experience. You need to pick out this company over one that has a short number of years of experience. Not only but you also need to find reviews on the swimming pools that they made. You can also ask other people for a referral. You also need at the pictures of their sample works on their website.
package com.libmailcore; /** Operation to authenticate against SMTP server. */ public class SMTPLoginOperation extends SMTPOperation { }
/**************************************************************************** This file is part of the GLC-lib library. Copyright (C) 2005-2008 Laurent Ribon ([email protected]) http://glc-lib.sourceforge.net GLC-lib is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. GLC-lib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GLC-lib; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ //! \file glc_rotationmanipulator.h Interface for the GLC_RotationManipulator class. #ifndef GLC_ROTATIONMANIPULATOR_H_ #define GLC_ROTATIONMANIPULATOR_H_ #include "../glc_config.h" #include "glc_abstractmanipulator.h" #include "../maths/glc_line3d.h" class GLC_Viewport; ////////////////////////////////////////////////////////////////////// //! \class GLC_RotationManipulator /*! \brief GLC_RotationManipulator : */ /*! GLC_RotationManipulator */ ////////////////////////////////////////////////////////////////////// class GLC_LIB_EXPORT GLC_RotationManipulator : public GLC_AbstractManipulator { ////////////////////////////////////////////////////////////////////// /*! @name Constructor / Destructor */ //@{ ////////////////////////////////////////////////////////////////////// public: //! Construct a rotation manipulator with the given viewport and rotation line GLC_RotationManipulator(GLC_Viewport* pViewport, const GLC_Line3d& rotationLine); //! Copy constructor GLC_RotationManipulator(const GLC_RotationManipulator& rotationmanipulator); //! Destructor virtual ~GLC_RotationManipulator(); //@} ////////////////////////////////////////////////////////////////////// /*! \name Get Functions*/ //@{ ////////////////////////////////////////////////////////////////////// public: //! Clone the concrete manipulator virtual GLC_AbstractManipulator* clone() const; //! Return the rotation line of this rotation manipulator inline GLC_Line3d rotationLine() const {return m_RotationLine;} //@} ////////////////////////////////////////////////////////////////////// /*! \name Set Functions*/ //@{ ////////////////////////////////////////////////////////////////////// public: //! Set the rotation line of this rotation manipulator void setRotationLine(const GLC_Line3d line) {m_RotationLine= line;} //@} ////////////////////////////////////////////////////////////////////// // Protected services function ////////////////////////////////////////////////////////////////////// protected: //! Manipulate this manipulator and return the moving matrix virtual GLC_Matrix4x4 doManipulate(const GLC_Point3d& newPoint, const GLC_Vector3d& projectionDirection); ////////////////////////////////////////////////////////////////////// // Private Member ////////////////////////////////////////////////////////////////////// private: //! The rotation line of this manipulator GLC_Line3d m_RotationLine; }; #endif /* GLC_ROTATIONMANIPULATOR_H_ */
<?php namespace Kubus\BackendBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Lesson */ class Lesson { /** * @var integer */ private $id; /** * @var integer */ private $courseId; /** * @var integer */ private $stateId; /** * @var \DateTime */ private $beginAt; /** * @var \DateTime */ private $endAt; /** * @var integer */ private $participantsMinNumber; /** * @var integer */ private $participantsMaxNumber; /** * @var boolean */ private $childCare; /** * @var \DateTime */ private $publishAt; /** * @var string */ private $description; /** * @var integer */ private $charge; /** * @var string */ private $externUrl; /** * @var string */ private $graduationYears; /** * @var \DateTime * * @ORM\Column(name="created_at", type="datetime") */ private $createdAt; /** * @var \DateTime * * @ORM\Column(name="updated_at", type="datetime") */ private $updatedAt; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set courseId * * @param integer $courseId * @return Lesson */ public function setCourseId($courseId) { $this->courseId = $courseId; return $this; } /** * Get courseId * * @return integer */ public function getCourseId() { return $this->courseId; } /** * Set stateId * * @param integer $stateId * @return Lesson */ public function setStateId($stateId) { $this->stateId = $stateId; return $this; } /** * Get stateId * * @return integer */ public function getStateId() { return $this->stateId; } /** * Set beginAt * * @param \DateTime $beginAt * @return Lesson */ public function setBeginAt($beginAt) { $this->beginAt = $beginAt; return $this; } /** * Get beginAt * * @return \DateTime */ public function getBeginAt() { return $this->beginAt; } /** * Set endAt * * @param \DateTime $endAt * @return Lesson */ public function setEndAt($endAt) { $this->endAt = $endAt; return $this; } /** * Get endAt * * @return \DateTime */ public function getEndAt() { return $this->endAt; } /** * Set participantsMinNumber * * @param integer $participantsMinNumber * @return Lesson */ public function setParticipantsMinNumber($participantsMinNumber) { $this->participantsMinNumber = $participantsMinNumber; return $this; } /** * Get participantsMinNumber * * @return integer */ public function getParticipantsMinNumber() { return $this->participantsMinNumber; } /** * Set participantsMaxNumber * * @param integer $participantsMaxNumber * @return Lesson */ public function setParticipantsMaxNumber($participantsMaxNumber) { $this->participantsMaxNumber = $participantsMaxNumber; return $this; } /** * Get participantsMaxNumber * * @return integer */ public function getParticipantsMaxNumber() { return $this->participantsMaxNumber; } /** * Set childCare * * @param boolean $childCare * @return Lesson */ public function setChildCare($childCare) { $this->childCare = $childCare; return $this; } /** * Get childCare * * @return boolean */ public function getChildCare() { return $this->childCare; } /** * Set publishAt * * @param \DateTime $publishAt * @return Lesson */ public function setPublishAt($publishAt) { $this->publishAt = $publishAt; return $this; } /** * Get publishAt * * @return \DateTime */ public function getPublishAt() { return $this->publishAt; } /** * Set description * * @param string $description * @return Lesson */ public function setDescription($description) { $this->description = $description; return $this; } /** * Get description * * @return string */ public function getDescription() { return $this->description; } /** * Set charge * * @param integer $charge * @return Lesson */ public function setCharge($charge) { $this->charge = $charge; return $this; } /** * Get charge * * @return integer */ public function getCharge() { return $this->charge; } /** * Set externUrl * * @param string $externUrl * @return Lesson */ public function setExternUrl($externUrl) { $this->externUrl = $externUrl; return $this; } /** * Get externUrl * * @return string */ public function getExternUrl() { return $this->externUrl; } /** * Set graduationYear * * @param integer $graduationYears * @return Lesson */ public function setGraduationYears($graduationYears) { $this->graduationYears = $graduationYears; return $this; } /** * Get graduationYears * * @return string */ public function getGraduationYears() { return $this->graduationYears; } /** * Set createdAt * * @param \DateTime $createdAt * @return Course */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get createdAt * * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * Set updatedAt * * @param \DateTime $updatedAt * @return Course */ public function setUpdatedAt($updatedAt) { $this->updatedAt = $updatedAt; return $this; } /** * Get updatedAt * * @return \DateTime */ public function getUpdatedAt() { return $this->updatedAt; } }
The first project operating in the province must continue until 2060. The company’s Cuda Oil and gas intends to launch the first project of oil exploitation business in Quebec by drilling at least 30 wells in an area located to the west of Gaspé. According to the documents filed by such subsidiary of an alberta company, the deposit of fossil fuels is expected to produce more than 15 million barrels and would be operated until 2060. The ministry of the Environment and the Fight against climate change (MELCC) has published Thursday in the Register of environmental assessments the” Notice of project “filed by Cuda, dated November 30, 2018, as well as the “Directive” of the ministry for the environmental impact study of the project, dated 20 December. The Duty was also tried, in vain, to get clarification on the part of the MELCC and the cabinet of the minister MarieChantal Chassé on the environmental assessment to come. We know, however, that citizens, groups and municipalities have until 1 February to submit their ” observations on the issues that the study of the impact of the project should address “. As to the Opinion of the project published on Thursday, he said that Cuda Oil and gas, a company born out of the “reunion” last August, Junex and the alberta Cuda Energy, provides for the ” implementation of production from the deposit of Galt South-West “, located at about 20 km to the west of the town of Gaspé, in the Gaspé peninsula. According to the data presented by the company, the deposit is found to a depth ranging from one to three kilometres, over an area of about 20 km2. The amount of oil “salvage” is estimated at a maximum of 15 million barrels, equivalent to 42 days of consumption for Québec, at current levels of consumption. All this oil should be extracted to ” forty years “, after the drilling of different wells, expected from 2020 to 2025. This means that the operation would continue ” until 2060 “. At the peak of productivity of the reservoir, it is anticipated that the daily production would reach more than 3000 barrels. “This is a petroleum storage tank conventional the production of which does not require hydraulic fracturing,” says in addition to the document submitted to the MELCC. We do not, however, specify if horizontal wells will be required for the operation. In the framework of the exploration work carried out over the past few years, Junex had created such drilling, including in the framework of its “production tests” which helped to recover a few thousand barrels of oil. Oil and gas, including Investment Quebec is a shareholder, assesses that” a thirty producing wells will be needed ” to extract the oil. It is estimated, however, that the number of wells to be drilled could increase to thirty-seven, ” in order to take into account the technical uncertainties and geological “. Consult the map of exploration permits and oil and gas in Quebec. The drilling of each well “requires the use” of 150 000 litres of water, depending on what is stipulated in the Notice of project. This water will come from a levy authorized ” or ” re-use of the previous operations “. Assuming that the number of wells drilled is limited to thirty, the drilling may require 4.5 million litres of water. In addition to the drilling sites, which ” will be located in places that are far enough from the water course “, the company plans to build a network of pipelines that will transport crude oil to a storage site located near route 198. The project does not specify how will be then transported the oil, which is likely to be transhipped on board of tankers chartered by “different customers” who will buy the production. It was not possible Thursday to seek clarification from the company, which has not responded to calls and e-mails of the Duty. In addition to oil production, the deposit of Galt will produce natural gas. Cuda Oil and gas has not yet decided how it will dispose of this gas, which is expected to be burnt during the ” production tests “, which generate greenhouse gas emissions. The idea of selling it, however, would be considered “very interesting” during the period of oil production business. Is it that the government of the Coalition avenir Québec is in favour of oil development ? The office of the minister of Energy and natural Resources, Jonatan Julien, said on Thursday that the minister would be back in the office next Monday. Groups of citizens in the region opposed the past several years to oil and gas projects in the Gaspé, a region coveted for over a century by the oil companies, but that has never produced oil on a commercial basis. According to the list of permitted oil and gas exploration the ministry of Energy and natural Resources, there are currently more than 21 580 km2 of permits in the area. The Galt project, which is the subject of an application for a production lease, a total of only 214 km2. The environmental groups also oppose these projects for the extraction of fossil fuels. Contacted Thursday, the spokesman of Greenpeace, Patrick Bonin, has criticized the timing of publishing the documents on the project. “It is totally disrespectful and unacceptable that a public consultation is launched on 2 January, while the people and the municipal governments concerned are still on leave “, he said.
from __future__ import unicode_literals from future.builtins import str from datetime import datetime import re try: from urllib.parse import quote except ImportError: # Python 2 from urllib import quote from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.html import urlize from django.utils.timezone import make_aware, utc from django.utils.translation import ugettext_lazy as _ from requests_oauthlib import OAuth1 import requests from mezzanine.conf import settings from mezzanine.twitter import QUERY_TYPE_CHOICES, QUERY_TYPE_USER, \ QUERY_TYPE_LIST, QUERY_TYPE_SEARCH from mezzanine.twitter import get_auth_settings from mezzanine.twitter.managers import TweetManager re_usernames = re.compile("(^|\W)@([0-9a-zA-Z+_]+)", re.IGNORECASE) re_hashtags = re.compile("#([0-9a-zA-Z+_]+)", re.IGNORECASE) replace_hashtags = "<a href=\"http://twitter.com/search?q=%23\\1\">#\\1</a>" replace_usernames = "\\1<a href=\"http://twitter.com/\\2\">@\\2</a>" class TwitterQueryException(Exception): pass @python_2_unicode_compatible class Query(models.Model): type = models.CharField(_("Type"), choices=QUERY_TYPE_CHOICES, max_length=10) value = models.CharField(_("Value"), max_length=140) interested = models.BooleanField("Interested", default=True) class Meta: verbose_name = _("Twitter query") verbose_name_plural = _("Twitter queries") ordering = ("-id",) def __str__(self): return "%s: %s" % (self.get_type_display(), self.value) def run(self): """ Request new tweets from the Twitter API. """ try: value = quote(self.value) except KeyError: value = self.value urls = { QUERY_TYPE_USER: ("https://api.twitter.com/1.1/statuses/" "user_timeline.json?screen_name=%s" "&include_rts=true" % value.lstrip("@")), QUERY_TYPE_LIST: ("https://api.twitter.com/1.1/lists/statuses.json" "?list_id=%s&include_rts=true" % value), QUERY_TYPE_SEARCH: "https://api.twitter.com/1.1/search/tweets.json" "?q=%s" % value, } try: url = urls[self.type] except KeyError: raise TwitterQueryException("Invalid query type: %s" % self.type) auth_settings = get_auth_settings() if not auth_settings: from mezzanine.conf import registry if self.value == registry["TWITTER_DEFAULT_QUERY"]["default"]: # These are some read-only keys and secrets we use # for the default query (eg nothing has been configured) auth_settings = ( "KxZTRD3OBft4PP0iQW0aNQ", "sXpQRSDUVJ2AVPZTfh6MrJjHfOGcdK4wRb1WTGQ", "1368725588-ldWCsd54AJpG2xcB5nyTHyCeIC3RJcNVUAkB1OI", "r9u7qS18t8ad4Hu9XVqmCGxlIpzoCN3e1vx6LOSVgyw3R", ) else: raise TwitterQueryException("Twitter OAuth settings missing") try: tweets = requests.get(url, auth=OAuth1(*auth_settings)).json() except Exception as e: raise TwitterQueryException("Error retrieving: %s" % e) try: raise TwitterQueryException(tweets["errors"][0]["message"]) except (IndexError, KeyError, TypeError): pass if self.type == "search": tweets = tweets["statuses"] for tweet_json in tweets: remote_id = str(tweet_json["id"]) tweet, created = self.tweets.get_or_create(remote_id=remote_id) if not created: continue if "retweeted_status" in tweet_json: user = tweet_json['user'] tweet.retweeter_user_name = user["screen_name"] tweet.retweeter_full_name = user["name"] tweet.retweeter_profile_image_url = user["profile_image_url"] tweet_json = tweet_json["retweeted_status"] if self.type == QUERY_TYPE_SEARCH: tweet.user_name = tweet_json['user']['screen_name'] tweet.full_name = tweet_json['user']['name'] tweet.profile_image_url = \ tweet_json['user']["profile_image_url"] date_format = "%a %b %d %H:%M:%S +0000 %Y" else: user = tweet_json["user"] tweet.user_name = user["screen_name"] tweet.full_name = user["name"] tweet.profile_image_url = user["profile_image_url"] date_format = "%a %b %d %H:%M:%S +0000 %Y" tweet.text = urlize(tweet_json["text"]) tweet.text = re_usernames.sub(replace_usernames, tweet.text) tweet.text = re_hashtags.sub(replace_hashtags, tweet.text) if getattr(settings, 'TWITTER_STRIP_HIGH_MULTIBYTE', False): chars = [ch for ch in tweet.text if ord(ch) < 0x800] tweet.text = ''.join(chars) d = datetime.strptime(tweet_json["created_at"], date_format) tweet.created_at = make_aware(d, utc) try: tweet.save() except Warning: pass tweet.save() self.interested = False self.save() class Tweet(models.Model): remote_id = models.CharField(_("Twitter ID"), max_length=50) created_at = models.DateTimeField(_("Date/time"), null=True) text = models.TextField(_("Message"), null=True) profile_image_url = models.URLField(_("Profile image URL"), null=True) user_name = models.CharField(_("User name"), max_length=100, null=True) full_name = models.CharField(_("Full name"), max_length=100, null=True) retweeter_profile_image_url = models.URLField( _("Profile image URL (Retweeted by)"), null=True) retweeter_user_name = models.CharField( _("User name (Retweeted by)"), max_length=100, null=True) retweeter_full_name = models.CharField( _("Full name (Retweeted by)"), max_length=100, null=True) query = models.ForeignKey("Query", on_delete=models.CASCADE, related_name="tweets") objects = TweetManager() class Meta: verbose_name = _("Tweet") verbose_name_plural = _("Tweets") ordering = ("-created_at",) def __str__(self): return "%s: %s" % (self.user_name, self.text) def is_retweet(self): return self.retweeter_user_name is not None
import express = require('express'); import ntlm = require('express-ntlm'); const app = express(); app.use(ntlm({ debug() { const args = Array.prototype.slice.apply(arguments); console.log.apply(null, args); }, domain: 'MYDOMAIN', domaincontroller: 'ldap://myad.example', // use different port (default: 389) // domaincontroller: 'ldap://myad.example:3899', })); app.all('*', (request, response) => { response.end(JSON.stringify(request.ntlm)); // {"DomainName":"MYDOMAIN","UserName":"MYUSER","Workstation":"MYWORKSTATION"} }); app.listen(80);
SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/syncthing -home=${SYNOPKG_PKGVAR}" SVC_BACKGROUND=y SVC_WRITE_PID=y GROUP="sc-syncthing" service_prestart () { # Read additional startup options from /usr/local/syncthing/var/options.conf if [ -f ${SYNOPKG_PKGVAR}/options.conf ]; then . ${SYNOPKG_PKGVAR}/options.conf SERVICE_COMMAND="${SERVICE_COMMAND} ${SYNCTHING_OPTIONS}" fi # Required: set $HOME environment variable HOME=${SYNOPKG_PKGVAR} export HOME }
We hope you can find what you need here. We always effort to show a picture with HD resolution or at least with perfect images. Different Types Of Shingles New Metal Shingle Roofing Design Inspo Pinterest can be beneficial inspiration for those who seek an image according specific categories, you can find it in this site. Finally all pictures we have been displayed in this site will inspire you all. Thank you for visiting.
Welcome to Justus Clothing Men's Apparel! Specializing in Comfortable, Quality Men's Jocks, Hip Briefs, Trunk Briefs, and Boxers. Check out our premium, super soft and comfy tees. We offer a 100% Satisfaction Guarantee. © 2019 The Justus Clothing Company. All Rights Reserved.
Ello Lovies! We’ve officially entered the holiday season with Halloween just yesterday & thanksgiving around the corner! 🎃 Apologies to anyone who doesn’t know what Thanksgiving is. It’s our first Christmas here in the States except there are no presents which in my opinion is the BEST, no pressure & no expectations!🙋🏽 Just some great company & good food shared among family & friends if your lucky. Option 1: Wonder Woman. Did you see that empowering film released earlier this year? Female lead, Female Director & predominantly Female Cast & Producer. Need I say more?? Option 2: Khaleesi & Khal Drogo because it’s Game of Thrones’ epic couple & those characters are EVERYTHING!! All hail the Mother of Dragons! Option 3: Pennywise from the movie “IT” though creepy this character has risen in popularity with the updated release of the movie… And it’s creepy A.F.
/* Simple array of integers example. This program populates an array of integers with random values, then sums them and then sorts them. Possible output: Sum is: 97 Sum is: 97 3 6 17 15 13 15 6 12 9 1 1 3 6 6 9 12 13 15 15 17 */ #include <stdio.h> #include <stdlib.h> #include "cagl/array.h" /* Declare and define an array of integers. */ CAG_DEC_DEF_ARRAY(int_arr, int); int main(void) { int_arr iarr; /* an array of integers. */ it_int_arr it; /* an iterator over the array. */ int total = 0; size_t i; /* Every container must be initiated before use with a call to new_[container] or similar function. */ new_int_arr(&iarr); /* populate the array with random integers. */ for (i = 0; i < 10; ++i) append_int_arr(&iarr, rand() % 20); /* iterate over the array, summing its elements. */ for (it = beg_int_arr(&iarr); it != end_int_arr(&iarr); it = next_int_arr(it)) /* Every iterator has an element called value which is the element pointed to. */ total += it->value; printf("Sum is: %d\n", total); /* You could also do it this way. */ total = 0; it = beg_int_arr(&iarr); for (i = 0; i < distance_all_int_arr(&iarr); ++i) total += at_int_arr(it, i)->value; printf("Sum is: %d\n", total); /* Print all the elements of the array. This demonstrates a third way of applying an operation to every element of a container, using a macro. */ CAG_FOR_ALL(int_arr, &iarr, it, { printf("%d ", it->value); }); printf("\n"); /* Let's sort the array. This example uses a macro, but a safer sorting function can be generated instead. */ CAG_SORT_ARRAY_DEFAULT(int, beg_int_arr(&iarr), end_int_arr(&iarr), CAG_CMP_PRIMITIVE); /* A fourth way to iterate over the elements, also using a macro. In fact CAG_FOR_EACH is called by CAG_FOR_ALL. */ CAG_FOR_EACH(beg_int_arr(&iarr), end_int_arr(&iarr), next_int_arr, it, { printf("%d ", it->value); }); printf("\n"); /* Every container must be destroyed after use with a call to free_[container] or similar function. */ free_int_arr(&iarr); return 0; }
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Struct base_unit_info&lt;astronomical::light_hour_base_unit&gt;</title> <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> <link rel="up" href="../../boost_units/Reference.html#header.boost.units.base_units.astronomical.light_hour_hpp" title="Header &lt;boost/units/base_units/astronomical/light_hour.hpp&gt;"> <link rel="prev" href="base_unit_inf_idp366191104.html" title="Struct base_unit_info&lt;astronomical::light_day_base_unit&gt;"> <link rel="next" href="base_unit_inf_idp366207792.html" title="Struct base_unit_info&lt;astronomical::light_minute_base_unit&gt;"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> <td align="center"><a href="../../../../index.html">Home</a></td> <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="base_unit_inf_idp366191104.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_units/Reference.html#header.boost.units.base_units.astronomical.light_hour_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="base_unit_inf_idp366207792.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="refentry"> <a name="boost.units.base_unit_inf_idp366199456"></a><div class="titlepage"></div> <div class="refnamediv"> <h2><span class="refentrytitle">Struct base_unit_info&lt;astronomical::light_hour_base_unit&gt;</span></h2> <p>boost::units::base_unit_info&lt;astronomical::light_hour_base_unit&gt;</p> </div> <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_units/Reference.html#header.boost.units.base_units.astronomical.light_hour_hpp" title="Header &lt;boost/units/base_units/astronomical/light_hour.hpp&gt;">boost/units/base_units/astronomical/light_hour.hpp</a>&gt; </span> <span class="keyword">struct</span> <a class="link" href="base_unit_inf_idp366199456.html" title="Struct base_unit_info&lt;astronomical::light_hour_base_unit&gt;">base_unit_info</a><span class="special">&lt;</span><span class="identifier">astronomical</span><span class="special">::</span><span class="identifier">light_hour_base_unit</span><span class="special">&gt;</span> <span class="special">{</span> <span class="comment">// <a class="link" href="base_unit_inf_idp366199456.html#idp366200576-bb">public static functions</a></span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="base_unit_inf_idp366199456.html#idp366201136-bb"><span class="identifier">name</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="base_unit_inf_idp366199456.html#idp366202256-bb"><span class="identifier">symbol</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> <span class="special">}</span><span class="special">;</span></pre></div> <div class="refsect1"> <a name="idp538586736"></a><h2>Description</h2> <div class="refsect2"> <a name="idp538587152"></a><h3> <a name="idp366200576-bb"></a><code class="computeroutput">base_unit_info</code> public static functions</h3> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a name="idp366201136-bb"></a><span class="identifier">name</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li> <li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a name="idp366202256-bb"></a><span class="identifier">symbol</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li> </ol></div> </div> </div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2008 Matthias Christian Schabel<br>Copyright &#169; 2007-2010 Steven Watanabe<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="base_unit_inf_idp366191104.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_units/Reference.html#header.boost.units.base_units.astronomical.light_hour_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="base_unit_inf_idp366207792.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
/* gcrypt.h - GNU Cryptographic Library Interface -*- c -*- * Copyright (C) 1998-2015 Free Software Foundation, Inc. * Copyright (C) 2012-2015 g10 Code GmbH * * This file is part of Libgcrypt. * * Libgcrypt is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * Libgcrypt is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see <http://www.gnu.org/licenses/>. * * File: src/gcrypt.h. Generated from gcrypt.h.in by configure. */ #ifndef _GCRYPT_H #define _GCRYPT_H #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <gpg-error.h> #include <sys/types.h> #if defined _WIN32 || defined __WIN32__ # include <winsock2.h> # include <ws2tcpip.h> # include <time.h> # ifndef __GNUC__ typedef long ssize_t; typedef int pid_t; # endif /*!__GNUC__*/ #else # include <sys/socket.h> # include <sys/time.h> # include <sys/select.h> #endif /*!_WIN32*/ typedef socklen_t gcry_socklen_t; /* This is required for error code compatibility. */ #define _GCRY_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_GCRYPT #ifdef __cplusplus extern "C" { #if 0 /* (Keep Emacsens' auto-indent happy.) */ } #endif #endif /* The version of this header should match the one of the library. It should not be used by a program because gcry_check_version() should return the same version. The purpose of this macro is to let autoconf (using the AM_PATH_GCRYPT macro) check that this header matches the installed library. */ #define GCRYPT_VERSION "1.6.3" /* The version number of this header. It may be used to handle minor API incompatibilities. */ #define GCRYPT_VERSION_NUMBER 0x010603 /* Internal: We can't use the convenience macros for the multi precision integer functions when building this library. */ #ifdef _GCRYPT_IN_LIBGCRYPT #ifndef GCRYPT_NO_MPI_MACROS #define GCRYPT_NO_MPI_MACROS 1 #endif #endif /* We want to use gcc attributes when possible. Warning: Don't use these macros in your programs: As indicated by the leading underscore they are subject to change without notice. */ #ifdef __GNUC__ #define _GCRY_GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) #if _GCRY_GCC_VERSION >= 30100 #define _GCRY_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) #endif #if _GCRY_GCC_VERSION >= 29600 #define _GCRY_GCC_ATTR_PURE __attribute__ ((__pure__)) #endif #if _GCRY_GCC_VERSION >= 30200 #define _GCRY_GCC_ATTR_MALLOC __attribute__ ((__malloc__)) #endif #define _GCRY_GCC_ATTR_PRINTF(f,a) __attribute__ ((format (printf,f,a))) #if _GCRY_GCC_VERSION >= 40000 #define _GCRY_GCC_ATTR_SENTINEL(a) __attribute__ ((sentinel(a))) #endif #endif /*__GNUC__*/ #ifndef _GCRY_GCC_ATTR_DEPRECATED #define _GCRY_GCC_ATTR_DEPRECATED #endif #ifndef _GCRY_GCC_ATTR_PURE #define _GCRY_GCC_ATTR_PURE #endif #ifndef _GCRY_GCC_ATTR_MALLOC #define _GCRY_GCC_ATTR_MALLOC #endif #ifndef _GCRY_GCC_ATTR_PRINTF #define _GCRY_GCC_ATTR_PRINTF(f,a) #endif #ifndef _GCRY_GCC_ATTR_SENTINEL #define _GCRY_GCC_ATTR_SENTINEL(a) #endif /* Make up an attribute to mark functions and types as deprecated but allow internal use by Libgcrypt. */ #ifdef _GCRYPT_IN_LIBGCRYPT #define _GCRY_ATTR_INTERNAL #else #define _GCRY_ATTR_INTERNAL _GCRY_GCC_ATTR_DEPRECATED #endif /* Wrappers for the libgpg-error library. */ typedef gpg_error_t gcry_error_t; typedef gpg_err_code_t gcry_err_code_t; typedef gpg_err_source_t gcry_err_source_t; static GPG_ERR_INLINE gcry_error_t gcry_err_make (gcry_err_source_t source, gcry_err_code_t code) { return gpg_err_make (source, code); } /* The user can define GPG_ERR_SOURCE_DEFAULT before including this file to specify a default source for gpg_error. */ #ifndef GCRY_ERR_SOURCE_DEFAULT #define GCRY_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_USER_1 #endif static GPG_ERR_INLINE gcry_error_t gcry_error (gcry_err_code_t code) { return gcry_err_make (GCRY_ERR_SOURCE_DEFAULT, code); } static GPG_ERR_INLINE gcry_err_code_t gcry_err_code (gcry_error_t err) { return gpg_err_code (err); } static GPG_ERR_INLINE gcry_err_source_t gcry_err_source (gcry_error_t err) { return gpg_err_source (err); } /* Return a pointer to a string containing a description of the error code in the error value ERR. */ const char *gcry_strerror (gcry_error_t err); /* Return a pointer to a string containing a description of the error source in the error value ERR. */ const char *gcry_strsource (gcry_error_t err); /* Retrieve the error code for the system error ERR. This returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report this). */ gcry_err_code_t gcry_err_code_from_errno (int err); /* Retrieve the system error for the error code CODE. This returns 0 if CODE is not a system error code. */ int gcry_err_code_to_errno (gcry_err_code_t code); /* Return an error value with the error source SOURCE and the system error ERR. */ gcry_error_t gcry_err_make_from_errno (gcry_err_source_t source, int err); /* Return an error value with the system error ERR. */ gcry_err_code_t gcry_error_from_errno (int err); /* NOTE: Since Libgcrypt 1.6 the thread callbacks are not anymore used. However we keep it to allow for some source code compatibility if used in the standard way. */ /* Constants defining the thread model to use. Used with the OPTION field of the struct gcry_thread_cbs. */ #define GCRY_THREAD_OPTION_DEFAULT 0 #define GCRY_THREAD_OPTION_USER 1 #define GCRY_THREAD_OPTION_PTH 2 #define GCRY_THREAD_OPTION_PTHREAD 3 /* The version number encoded in the OPTION field of the struct gcry_thread_cbs. */ #define GCRY_THREAD_OPTION_VERSION 1 /* Wrapper for struct ath_ops. */ struct gcry_thread_cbs { /* The OPTION field encodes the thread model and the version number of this structure. Bits 7 - 0 are used for the thread model Bits 15 - 8 are used for the version number. */ unsigned int option; } _GCRY_ATTR_INTERNAL; #define GCRY_THREAD_OPTION_PTH_IMPL \ static struct gcry_thread_cbs gcry_threads_pth = { \ (GCRY_THREAD_OPTION_PTH | (GCRY_THREAD_OPTION_VERSION << 8))} #define GCRY_THREAD_OPTION_PTHREAD_IMPL \ static struct gcry_thread_cbs gcry_threads_pthread = { \ (GCRY_THREAD_OPTION_PTHREAD | (GCRY_THREAD_OPTION_VERSION << 8))} /* A generic context object as used by some functions. */ struct gcry_context; typedef struct gcry_context *gcry_ctx_t; /* The data objects used to hold multi precision integers. */ struct gcry_mpi; typedef struct gcry_mpi *gcry_mpi_t; struct gcry_mpi_point; typedef struct gcry_mpi_point *gcry_mpi_point_t; #ifndef GCRYPT_NO_DEPRECATED typedef struct gcry_mpi *GCRY_MPI _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_mpi *GcryMPI _GCRY_GCC_ATTR_DEPRECATED; #endif /* A structure used for scatter gather hashing. */ typedef struct { size_t size; /* The allocated size of the buffer or 0. */ size_t off; /* Offset into the buffer. */ size_t len; /* The used length of the buffer. */ void *data; /* The buffer. */ } gcry_buffer_t; /* Check that the library fulfills the version requirement. */ const char *gcry_check_version (const char *req_version); /* Codes for function dispatchers. */ /* Codes used with the gcry_control function. */ enum gcry_ctl_cmds { /* Note: 1 .. 2 are not anymore used. */ GCRYCTL_CFB_SYNC = 3, GCRYCTL_RESET = 4, /* e.g. for MDs */ GCRYCTL_FINALIZE = 5, GCRYCTL_GET_KEYLEN = 6, GCRYCTL_GET_BLKLEN = 7, GCRYCTL_TEST_ALGO = 8, GCRYCTL_IS_SECURE = 9, GCRYCTL_GET_ASNOID = 10, GCRYCTL_ENABLE_ALGO = 11, GCRYCTL_DISABLE_ALGO = 12, GCRYCTL_DUMP_RANDOM_STATS = 13, GCRYCTL_DUMP_SECMEM_STATS = 14, GCRYCTL_GET_ALGO_NPKEY = 15, GCRYCTL_GET_ALGO_NSKEY = 16, GCRYCTL_GET_ALGO_NSIGN = 17, GCRYCTL_GET_ALGO_NENCR = 18, GCRYCTL_SET_VERBOSITY = 19, GCRYCTL_SET_DEBUG_FLAGS = 20, GCRYCTL_CLEAR_DEBUG_FLAGS = 21, GCRYCTL_USE_SECURE_RNDPOOL= 22, GCRYCTL_DUMP_MEMORY_STATS = 23, GCRYCTL_INIT_SECMEM = 24, GCRYCTL_TERM_SECMEM = 25, GCRYCTL_DISABLE_SECMEM_WARN = 27, GCRYCTL_SUSPEND_SECMEM_WARN = 28, GCRYCTL_RESUME_SECMEM_WARN = 29, GCRYCTL_DROP_PRIVS = 30, GCRYCTL_ENABLE_M_GUARD = 31, GCRYCTL_START_DUMP = 32, GCRYCTL_STOP_DUMP = 33, GCRYCTL_GET_ALGO_USAGE = 34, GCRYCTL_IS_ALGO_ENABLED = 35, GCRYCTL_DISABLE_INTERNAL_LOCKING = 36, GCRYCTL_DISABLE_SECMEM = 37, GCRYCTL_INITIALIZATION_FINISHED = 38, GCRYCTL_INITIALIZATION_FINISHED_P = 39, GCRYCTL_ANY_INITIALIZATION_P = 40, GCRYCTL_SET_CBC_CTS = 41, GCRYCTL_SET_CBC_MAC = 42, /* Note: 43 is not anymore used. */ GCRYCTL_ENABLE_QUICK_RANDOM = 44, GCRYCTL_SET_RANDOM_SEED_FILE = 45, GCRYCTL_UPDATE_RANDOM_SEED_FILE = 46, GCRYCTL_SET_THREAD_CBS = 47, GCRYCTL_FAST_POLL = 48, GCRYCTL_SET_RANDOM_DAEMON_SOCKET = 49, GCRYCTL_USE_RANDOM_DAEMON = 50, GCRYCTL_FAKED_RANDOM_P = 51, GCRYCTL_SET_RNDEGD_SOCKET = 52, GCRYCTL_PRINT_CONFIG = 53, GCRYCTL_OPERATIONAL_P = 54, GCRYCTL_FIPS_MODE_P = 55, GCRYCTL_FORCE_FIPS_MODE = 56, GCRYCTL_SELFTEST = 57, /* Note: 58 .. 62 are used internally. */ GCRYCTL_DISABLE_HWF = 63, GCRYCTL_SET_ENFORCED_FIPS_FLAG = 64, GCRYCTL_SET_PREFERRED_RNG_TYPE = 65, GCRYCTL_GET_CURRENT_RNG_TYPE = 66, GCRYCTL_DISABLE_LOCKED_SECMEM = 67, GCRYCTL_DISABLE_PRIV_DROP = 68, GCRYCTL_SET_CCM_LENGTHS = 69, GCRYCTL_CLOSE_RANDOM_DEVICE = 70, GCRYCTL_INACTIVATE_FIPS_FLAG = 71, GCRYCTL_REACTIVATE_FIPS_FLAG = 72 }; /* Perform various operations defined by CMD. */ gcry_error_t gcry_control (enum gcry_ctl_cmds CMD, ...); /* S-expression management. */ /* The object to represent an S-expression as used with the public key functions. */ struct gcry_sexp; typedef struct gcry_sexp *gcry_sexp_t; #ifndef GCRYPT_NO_DEPRECATED typedef struct gcry_sexp *GCRY_SEXP _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_sexp *GcrySexp _GCRY_GCC_ATTR_DEPRECATED; #endif /* The possible values for the S-expression format. */ enum gcry_sexp_format { GCRYSEXP_FMT_DEFAULT = 0, GCRYSEXP_FMT_CANON = 1, GCRYSEXP_FMT_BASE64 = 2, GCRYSEXP_FMT_ADVANCED = 3 }; /* Create an new S-expression object from BUFFER of size LENGTH and return it in RETSEXP. With AUTODETECT set to 0 the data in BUFFER is expected to be in canonized format. */ gcry_error_t gcry_sexp_new (gcry_sexp_t *retsexp, const void *buffer, size_t length, int autodetect); /* Same as gcry_sexp_new but allows to pass a FREEFNC which has the effect to transfer ownership of BUFFER to the created object. */ gcry_error_t gcry_sexp_create (gcry_sexp_t *retsexp, void *buffer, size_t length, int autodetect, void (*freefnc) (void *)); /* Scan BUFFER and return a new S-expression object in RETSEXP. This function expects a printf like string in BUFFER. */ gcry_error_t gcry_sexp_sscan (gcry_sexp_t *retsexp, size_t *erroff, const char *buffer, size_t length); /* Same as gcry_sexp_sscan but expects a string in FORMAT and can thus only be used for certain encodings. */ gcry_error_t gcry_sexp_build (gcry_sexp_t *retsexp, size_t *erroff, const char *format, ...); /* Like gcry_sexp_build, but uses an array instead of variable function arguments. */ gcry_error_t gcry_sexp_build_array (gcry_sexp_t *retsexp, size_t *erroff, const char *format, void **arg_list); /* Release the S-expression object SEXP */ void gcry_sexp_release (gcry_sexp_t sexp); /* Calculate the length of an canonized S-expresion in BUFFER and check for a valid encoding. */ size_t gcry_sexp_canon_len (const unsigned char *buffer, size_t length, size_t *erroff, gcry_error_t *errcode); /* Copies the S-expression object SEXP into BUFFER using the format specified in MODE. */ size_t gcry_sexp_sprint (gcry_sexp_t sexp, int mode, void *buffer, size_t maxlength); /* Dumps the S-expression object A in a format suitable for debugging to Libgcrypt's logging stream. */ void gcry_sexp_dump (const gcry_sexp_t a); gcry_sexp_t gcry_sexp_cons (const gcry_sexp_t a, const gcry_sexp_t b); gcry_sexp_t gcry_sexp_alist (const gcry_sexp_t *array); gcry_sexp_t gcry_sexp_vlist (const gcry_sexp_t a, ...); gcry_sexp_t gcry_sexp_append (const gcry_sexp_t a, const gcry_sexp_t n); gcry_sexp_t gcry_sexp_prepend (const gcry_sexp_t a, const gcry_sexp_t n); /* Scan the S-expression for a sublist with a type (the car of the list) matching the string TOKEN. If TOKLEN is not 0, the token is assumed to be raw memory of this length. The function returns a newly allocated S-expression consisting of the found sublist or `NULL' when not found. */ gcry_sexp_t gcry_sexp_find_token (gcry_sexp_t list, const char *tok, size_t toklen); /* Return the length of the LIST. For a valid S-expression this should be at least 1. */ int gcry_sexp_length (const gcry_sexp_t list); /* Create and return a new S-expression from the element with index NUMBER in LIST. Note that the first element has the index 0. If there is no such element, `NULL' is returned. */ gcry_sexp_t gcry_sexp_nth (const gcry_sexp_t list, int number); /* Create and return a new S-expression from the first element in LIST; this called the "type" and should always exist and be a string. `NULL' is returned in case of a problem. */ gcry_sexp_t gcry_sexp_car (const gcry_sexp_t list); /* Create and return a new list form all elements except for the first one. Note, that this function may return an invalid S-expression because it is not guaranteed, that the type exists and is a string. However, for parsing a complex S-expression it might be useful for intermediate lists. Returns `NULL' on error. */ gcry_sexp_t gcry_sexp_cdr (const gcry_sexp_t list); gcry_sexp_t gcry_sexp_cadr (const gcry_sexp_t list); /* This function is used to get data from a LIST. A pointer to the actual data with index NUMBER is returned and the length of this data will be stored to DATALEN. If there is no data at the given index or the index represents another list, `NULL' is returned. *Note:* The returned pointer is valid as long as LIST is not modified or released. */ const char *gcry_sexp_nth_data (const gcry_sexp_t list, int number, size_t *datalen); /* This function is used to get data from a LIST. A malloced buffer to the data with index NUMBER is returned and the length of this data will be stored to RLENGTH. If there is no data at the given index or the index represents another list, `NULL' is returned. */ void *gcry_sexp_nth_buffer (const gcry_sexp_t list, int number, size_t *rlength); /* This function is used to get and convert data from a LIST. The data is assumed to be a Nul terminated string. The caller must release the returned value using `gcry_free'. If there is no data at the given index, the index represents a list or the value can't be converted to a string, `NULL' is returned. */ char *gcry_sexp_nth_string (gcry_sexp_t list, int number); /* This function is used to get and convert data from a LIST. This data is assumed to be an MPI stored in the format described by MPIFMT and returned as a standard Libgcrypt MPI. The caller must release this returned value using `gcry_mpi_release'. If there is no data at the given index, the index represents a list or the value can't be converted to an MPI, `NULL' is returned. */ gcry_mpi_t gcry_sexp_nth_mpi (gcry_sexp_t list, int number, int mpifmt); /* Convenience fucntion to extract parameters from an S-expression * using a list of single letter parameters. */ gpg_error_t gcry_sexp_extract_param (gcry_sexp_t sexp, const char *path, const char *list, ...) _GCRY_GCC_ATTR_SENTINEL(0); /******************************************* * * * Multi Precision Integer Functions * * * *******************************************/ /* Different formats of external big integer representation. */ enum gcry_mpi_format { GCRYMPI_FMT_NONE= 0, GCRYMPI_FMT_STD = 1, /* Twos complement stored without length. */ GCRYMPI_FMT_PGP = 2, /* As used by OpenPGP (unsigned only). */ GCRYMPI_FMT_SSH = 3, /* As used by SSH (like STD but with length). */ GCRYMPI_FMT_HEX = 4, /* Hex format. */ GCRYMPI_FMT_USG = 5, /* Like STD but unsigned. */ GCRYMPI_FMT_OPAQUE = 8 /* Opaque format (some functions only). */ }; /* Flags used for creating big integers. */ enum gcry_mpi_flag { GCRYMPI_FLAG_SECURE = 1, /* Allocate the number in "secure" memory. */ GCRYMPI_FLAG_OPAQUE = 2, /* The number is not a real one but just a way to store some bytes. This is useful for encrypted big integers. */ GCRYMPI_FLAG_IMMUTABLE = 4, /* Mark the MPI as immutable. */ GCRYMPI_FLAG_CONST = 8, /* Mark the MPI as a constant. */ GCRYMPI_FLAG_USER1 = 0x0100,/* User flag 1. */ GCRYMPI_FLAG_USER2 = 0x0200,/* User flag 2. */ GCRYMPI_FLAG_USER3 = 0x0400,/* User flag 3. */ GCRYMPI_FLAG_USER4 = 0x0800,/* User flag 4. */ }; /* Macros to return pre-defined MPI constants. */ #define GCRYMPI_CONST_ONE (_gcry_mpi_get_const (1)) #define GCRYMPI_CONST_TWO (_gcry_mpi_get_const (2)) #define GCRYMPI_CONST_THREE (_gcry_mpi_get_const (3)) #define GCRYMPI_CONST_FOUR (_gcry_mpi_get_const (4)) #define GCRYMPI_CONST_EIGHT (_gcry_mpi_get_const (8)) /* Allocate a new big integer object, initialize it with 0 and initially allocate memory for a number of at least NBITS. */ gcry_mpi_t gcry_mpi_new (unsigned int nbits); /* Same as gcry_mpi_new() but allocate in "secure" memory. */ gcry_mpi_t gcry_mpi_snew (unsigned int nbits); /* Release the number A and free all associated resources. */ void gcry_mpi_release (gcry_mpi_t a); /* Create a new number with the same value as A. */ gcry_mpi_t gcry_mpi_copy (const gcry_mpi_t a); /* Store the big integer value U in W and release U. */ void gcry_mpi_snatch (gcry_mpi_t w, gcry_mpi_t u); /* Store the big integer value U in W. */ gcry_mpi_t gcry_mpi_set (gcry_mpi_t w, const gcry_mpi_t u); /* Store the unsigned integer value U in W. */ gcry_mpi_t gcry_mpi_set_ui (gcry_mpi_t w, unsigned long u); /* Swap the values of A and B. */ void gcry_mpi_swap (gcry_mpi_t a, gcry_mpi_t b); /* Return 1 if A is negative; 0 if zero or positive. */ int gcry_mpi_is_neg (gcry_mpi_t a); /* W = - U */ void gcry_mpi_neg (gcry_mpi_t w, gcry_mpi_t u); /* W = [W] */ void gcry_mpi_abs (gcry_mpi_t w); /* Compare the big integer number U and V returning 0 for equality, a positive value for U > V and a negative for U < V. */ int gcry_mpi_cmp (const gcry_mpi_t u, const gcry_mpi_t v); /* Compare the big integer number U with the unsigned integer V returning 0 for equality, a positive value for U > V and a negative for U < V. */ int gcry_mpi_cmp_ui (const gcry_mpi_t u, unsigned long v); /* Convert the external representation of an integer stored in BUFFER with a length of BUFLEN into a newly create MPI returned in RET_MPI. If NSCANNED is not NULL, it will receive the number of bytes actually scanned after a successful operation. */ gcry_error_t gcry_mpi_scan (gcry_mpi_t *ret_mpi, enum gcry_mpi_format format, const void *buffer, size_t buflen, size_t *nscanned); /* Convert the big integer A into the external representation described by FORMAT and store it in the provided BUFFER which has been allocated by the user with a size of BUFLEN bytes. NWRITTEN receives the actual length of the external representation unless it has been passed as NULL. */ gcry_error_t gcry_mpi_print (enum gcry_mpi_format format, unsigned char *buffer, size_t buflen, size_t *nwritten, const gcry_mpi_t a); /* Convert the big integer A int the external representation described by FORMAT and store it in a newly allocated buffer which address will be put into BUFFER. NWRITTEN receives the actual lengths of the external representation. */ gcry_error_t gcry_mpi_aprint (enum gcry_mpi_format format, unsigned char **buffer, size_t *nwritten, const gcry_mpi_t a); /* Dump the value of A in a format suitable for debugging to Libgcrypt's logging stream. Note that one leading space but no trailing space or linefeed will be printed. It is okay to pass NULL for A. */ void gcry_mpi_dump (const gcry_mpi_t a); /* W = U + V. */ void gcry_mpi_add (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v); /* W = U + V. V is an unsigned integer. */ void gcry_mpi_add_ui (gcry_mpi_t w, gcry_mpi_t u, unsigned long v); /* W = U + V mod M. */ void gcry_mpi_addm (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m); /* W = U - V. */ void gcry_mpi_sub (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v); /* W = U - V. V is an unsigned integer. */ void gcry_mpi_sub_ui (gcry_mpi_t w, gcry_mpi_t u, unsigned long v ); /* W = U - V mod M */ void gcry_mpi_subm (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m); /* W = U * V. */ void gcry_mpi_mul (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v); /* W = U * V. V is an unsigned integer. */ void gcry_mpi_mul_ui (gcry_mpi_t w, gcry_mpi_t u, unsigned long v ); /* W = U * V mod M. */ void gcry_mpi_mulm (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m); /* W = U * (2 ^ CNT). */ void gcry_mpi_mul_2exp (gcry_mpi_t w, gcry_mpi_t u, unsigned long cnt); /* Q = DIVIDEND / DIVISOR, R = DIVIDEND % DIVISOR, Q or R may be passed as NULL. ROUND should be negative or 0. */ void gcry_mpi_div (gcry_mpi_t q, gcry_mpi_t r, gcry_mpi_t dividend, gcry_mpi_t divisor, int round); /* R = DIVIDEND % DIVISOR */ void gcry_mpi_mod (gcry_mpi_t r, gcry_mpi_t dividend, gcry_mpi_t divisor); /* W = B ^ E mod M. */ void gcry_mpi_powm (gcry_mpi_t w, const gcry_mpi_t b, const gcry_mpi_t e, const gcry_mpi_t m); /* Set G to the greatest common divisor of A and B. Return true if the G is 1. */ int gcry_mpi_gcd (gcry_mpi_t g, gcry_mpi_t a, gcry_mpi_t b); /* Set X to the multiplicative inverse of A mod M. Return true if the value exists. */ int gcry_mpi_invm (gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t m); /* Create a new point object. NBITS is usually 0. */ gcry_mpi_point_t gcry_mpi_point_new (unsigned int nbits); /* Release the object POINT. POINT may be NULL. */ void gcry_mpi_point_release (gcry_mpi_point_t point); /* Store the projective coordinates from POINT into X, Y, and Z. */ void gcry_mpi_point_get (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z, gcry_mpi_point_t point); /* Store the projective coordinates from POINT into X, Y, and Z and release POINT. */ void gcry_mpi_point_snatch_get (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z, gcry_mpi_point_t point); /* Store the projective coordinates X, Y, and Z into POINT. */ gcry_mpi_point_t gcry_mpi_point_set (gcry_mpi_point_t point, gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z); /* Store the projective coordinates X, Y, and Z into POINT and release X, Y, and Z. */ gcry_mpi_point_t gcry_mpi_point_snatch_set (gcry_mpi_point_t point, gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z); /* Allocate a new context for elliptic curve operations based on the parameters given by KEYPARAM or using CURVENAME. */ gpg_error_t gcry_mpi_ec_new (gcry_ctx_t *r_ctx, gcry_sexp_t keyparam, const char *curvename); /* Get a named MPI from an elliptic curve context. */ gcry_mpi_t gcry_mpi_ec_get_mpi (const char *name, gcry_ctx_t ctx, int copy); /* Get a named point from an elliptic curve context. */ gcry_mpi_point_t gcry_mpi_ec_get_point (const char *name, gcry_ctx_t ctx, int copy); /* Store a named MPI into an elliptic curve context. */ gpg_error_t gcry_mpi_ec_set_mpi (const char *name, gcry_mpi_t newvalue, gcry_ctx_t ctx); /* Store a named point into an elliptic curve context. */ gpg_error_t gcry_mpi_ec_set_point (const char *name, gcry_mpi_point_t newvalue, gcry_ctx_t ctx); /* Store the affine coordinates of POINT into X and Y. */ int gcry_mpi_ec_get_affine (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_point_t point, gcry_ctx_t ctx); /* W = 2 * U. */ void gcry_mpi_ec_dup (gcry_mpi_point_t w, gcry_mpi_point_t u, gcry_ctx_t ctx); /* W = U + V. */ void gcry_mpi_ec_add (gcry_mpi_point_t w, gcry_mpi_point_t u, gcry_mpi_point_t v, gcry_ctx_t ctx); /* W = N * U. */ void gcry_mpi_ec_mul (gcry_mpi_point_t w, gcry_mpi_t n, gcry_mpi_point_t u, gcry_ctx_t ctx); /* Return true if POINT is on the curve described by CTX. */ int gcry_mpi_ec_curve_point (gcry_mpi_point_t w, gcry_ctx_t ctx); /* Return the number of bits required to represent A. */ unsigned int gcry_mpi_get_nbits (gcry_mpi_t a); /* Return true when bit number N (counting from 0) is set in A. */ int gcry_mpi_test_bit (gcry_mpi_t a, unsigned int n); /* Set bit number N in A. */ void gcry_mpi_set_bit (gcry_mpi_t a, unsigned int n); /* Clear bit number N in A. */ void gcry_mpi_clear_bit (gcry_mpi_t a, unsigned int n); /* Set bit number N in A and clear all bits greater than N. */ void gcry_mpi_set_highbit (gcry_mpi_t a, unsigned int n); /* Clear bit number N in A and all bits greater than N. */ void gcry_mpi_clear_highbit (gcry_mpi_t a, unsigned int n); /* Shift the value of A by N bits to the right and store the result in X. */ void gcry_mpi_rshift (gcry_mpi_t x, gcry_mpi_t a, unsigned int n); /* Shift the value of A by N bits to the left and store the result in X. */ void gcry_mpi_lshift (gcry_mpi_t x, gcry_mpi_t a, unsigned int n); /* Store NBITS of the value P points to in A and mark A as an opaque value. On success A received the the ownership of the value P. WARNING: Never use an opaque MPI for anything thing else than gcry_mpi_release, gcry_mpi_get_opaque. */ gcry_mpi_t gcry_mpi_set_opaque (gcry_mpi_t a, void *p, unsigned int nbits); /* Store NBITS of the value P points to in A and mark A as an opaque value. The function takes a copy of the provided value P. WARNING: Never use an opaque MPI for anything thing else than gcry_mpi_release, gcry_mpi_get_opaque. */ gcry_mpi_t gcry_mpi_set_opaque_copy (gcry_mpi_t a, const void *p, unsigned int nbits); /* Return a pointer to an opaque value stored in A and return its size in NBITS. Note that the returned pointer is still owned by A and that the function should never be used for an non-opaque MPI. */ void *gcry_mpi_get_opaque (gcry_mpi_t a, unsigned int *nbits); /* Set the FLAG for the big integer A. Currently only the flag GCRYMPI_FLAG_SECURE is allowed to convert A into an big intger stored in "secure" memory. */ void gcry_mpi_set_flag (gcry_mpi_t a, enum gcry_mpi_flag flag); /* Clear FLAG for the big integer A. Note that this function is currently useless as no flags are allowed. */ void gcry_mpi_clear_flag (gcry_mpi_t a, enum gcry_mpi_flag flag); /* Return true if the FLAG is set for A. */ int gcry_mpi_get_flag (gcry_mpi_t a, enum gcry_mpi_flag flag); /* Private function - do not use. */ gcry_mpi_t _gcry_mpi_get_const (int no); /* Unless the GCRYPT_NO_MPI_MACROS is used, provide a couple of convenience macros for the big integer functions. */ #ifndef GCRYPT_NO_MPI_MACROS #define mpi_new(n) gcry_mpi_new( (n) ) #define mpi_secure_new( n ) gcry_mpi_snew( (n) ) #define mpi_release(a) \ do \ { \ gcry_mpi_release ((a)); \ (a) = NULL; \ } \ while (0) #define mpi_copy( a ) gcry_mpi_copy( (a) ) #define mpi_snatch( w, u) gcry_mpi_snatch( (w), (u) ) #define mpi_set( w, u) gcry_mpi_set( (w), (u) ) #define mpi_set_ui( w, u) gcry_mpi_set_ui( (w), (u) ) #define mpi_abs( w ) gcry_mpi_abs( (w) ) #define mpi_neg( w, u) gcry_mpi_neg( (w), (u) ) #define mpi_cmp( u, v ) gcry_mpi_cmp( (u), (v) ) #define mpi_cmp_ui( u, v ) gcry_mpi_cmp_ui( (u), (v) ) #define mpi_is_neg( a ) gcry_mpi_is_neg ((a)) #define mpi_add_ui(w,u,v) gcry_mpi_add_ui((w),(u),(v)) #define mpi_add(w,u,v) gcry_mpi_add ((w),(u),(v)) #define mpi_addm(w,u,v,m) gcry_mpi_addm ((w),(u),(v),(m)) #define mpi_sub_ui(w,u,v) gcry_mpi_sub_ui ((w),(u),(v)) #define mpi_sub(w,u,v) gcry_mpi_sub ((w),(u),(v)) #define mpi_subm(w,u,v,m) gcry_mpi_subm ((w),(u),(v),(m)) #define mpi_mul_ui(w,u,v) gcry_mpi_mul_ui ((w),(u),(v)) #define mpi_mul_2exp(w,u,v) gcry_mpi_mul_2exp ((w),(u),(v)) #define mpi_mul(w,u,v) gcry_mpi_mul ((w),(u),(v)) #define mpi_mulm(w,u,v,m) gcry_mpi_mulm ((w),(u),(v),(m)) #define mpi_powm(w,b,e,m) gcry_mpi_powm ( (w), (b), (e), (m) ) #define mpi_tdiv(q,r,a,m) gcry_mpi_div ( (q), (r), (a), (m), 0) #define mpi_fdiv(q,r,a,m) gcry_mpi_div ( (q), (r), (a), (m), -1) #define mpi_mod(r,a,m) gcry_mpi_mod ((r), (a), (m)) #define mpi_gcd(g,a,b) gcry_mpi_gcd ( (g), (a), (b) ) #define mpi_invm(g,a,b) gcry_mpi_invm ( (g), (a), (b) ) #define mpi_point_new(n) gcry_mpi_point_new((n)) #define mpi_point_release(p) \ do \ { \ gcry_mpi_point_release ((p)); \ (p) = NULL; \ } \ while (0) #define mpi_point_get(x,y,z,p) gcry_mpi_point_get((x),(y),(z),(p)) #define mpi_point_snatch_get(x,y,z,p) gcry_mpi_point_snatch_get((x),(y),(z),(p)) #define mpi_point_set(p,x,y,z) gcry_mpi_point_set((p),(x),(y),(z)) #define mpi_point_snatch_set(p,x,y,z) gcry_mpi_point_snatch_set((p),(x),(y),(z)) #define mpi_get_nbits(a) gcry_mpi_get_nbits ((a)) #define mpi_test_bit(a,b) gcry_mpi_test_bit ((a),(b)) #define mpi_set_bit(a,b) gcry_mpi_set_bit ((a),(b)) #define mpi_set_highbit(a,b) gcry_mpi_set_highbit ((a),(b)) #define mpi_clear_bit(a,b) gcry_mpi_clear_bit ((a),(b)) #define mpi_clear_highbit(a,b) gcry_mpi_clear_highbit ((a),(b)) #define mpi_rshift(a,b,c) gcry_mpi_rshift ((a),(b),(c)) #define mpi_lshift(a,b,c) gcry_mpi_lshift ((a),(b),(c)) #define mpi_set_opaque(a,b,c) gcry_mpi_set_opaque( (a), (b), (c) ) #define mpi_get_opaque(a,b) gcry_mpi_get_opaque( (a), (b) ) #endif /* GCRYPT_NO_MPI_MACROS */ /************************************ * * * Symmetric Cipher Functions * * * ************************************/ /* The data object used to hold a handle to an encryption object. */ struct gcry_cipher_handle; typedef struct gcry_cipher_handle *gcry_cipher_hd_t; #ifndef GCRYPT_NO_DEPRECATED typedef struct gcry_cipher_handle *GCRY_CIPHER_HD _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_cipher_handle *GcryCipherHd _GCRY_GCC_ATTR_DEPRECATED; #endif /* All symmetric encryption algorithms are identified by their IDs. More IDs may be registered at runtime. */ enum gcry_cipher_algos { GCRY_CIPHER_NONE = 0, GCRY_CIPHER_IDEA = 1, GCRY_CIPHER_3DES = 2, GCRY_CIPHER_CAST5 = 3, GCRY_CIPHER_BLOWFISH = 4, GCRY_CIPHER_SAFER_SK128 = 5, GCRY_CIPHER_DES_SK = 6, GCRY_CIPHER_AES = 7, GCRY_CIPHER_AES192 = 8, GCRY_CIPHER_AES256 = 9, GCRY_CIPHER_TWOFISH = 10, /* Other cipher numbers are above 300 for OpenPGP reasons. */ GCRY_CIPHER_ARCFOUR = 301, /* Fully compatible with RSA's RC4 (tm). */ GCRY_CIPHER_DES = 302, /* Yes, this is single key 56 bit DES. */ GCRY_CIPHER_TWOFISH128 = 303, GCRY_CIPHER_SERPENT128 = 304, GCRY_CIPHER_SERPENT192 = 305, GCRY_CIPHER_SERPENT256 = 306, GCRY_CIPHER_RFC2268_40 = 307, /* Ron's Cipher 2 (40 bit). */ GCRY_CIPHER_RFC2268_128 = 308, /* Ron's Cipher 2 (128 bit). */ GCRY_CIPHER_SEED = 309, /* 128 bit cipher described in RFC4269. */ GCRY_CIPHER_CAMELLIA128 = 310, GCRY_CIPHER_CAMELLIA192 = 311, GCRY_CIPHER_CAMELLIA256 = 312, GCRY_CIPHER_SALSA20 = 313, GCRY_CIPHER_SALSA20R12 = 314, GCRY_CIPHER_GOST28147 = 315 }; /* The Rijndael algorithm is basically AES, so provide some macros. */ #define GCRY_CIPHER_AES128 GCRY_CIPHER_AES #define GCRY_CIPHER_RIJNDAEL GCRY_CIPHER_AES #define GCRY_CIPHER_RIJNDAEL128 GCRY_CIPHER_AES128 #define GCRY_CIPHER_RIJNDAEL192 GCRY_CIPHER_AES192 #define GCRY_CIPHER_RIJNDAEL256 GCRY_CIPHER_AES256 /* The supported encryption modes. Note that not all of them are supported for each algorithm. */ enum gcry_cipher_modes { GCRY_CIPHER_MODE_NONE = 0, /* Not yet specified. */ GCRY_CIPHER_MODE_ECB = 1, /* Electronic codebook. */ GCRY_CIPHER_MODE_CFB = 2, /* Cipher feedback. */ GCRY_CIPHER_MODE_CBC = 3, /* Cipher block chaining. */ GCRY_CIPHER_MODE_STREAM = 4, /* Used with stream ciphers. */ GCRY_CIPHER_MODE_OFB = 5, /* Outer feedback. */ GCRY_CIPHER_MODE_CTR = 6, /* Counter. */ GCRY_CIPHER_MODE_AESWRAP= 7, /* AES-WRAP algorithm. */ GCRY_CIPHER_MODE_CCM = 8, /* Counter with CBC-MAC. */ GCRY_CIPHER_MODE_GCM = 9 /* Galois Counter Mode. */ }; /* Flags used with the open function. */ enum gcry_cipher_flags { GCRY_CIPHER_SECURE = 1, /* Allocate in secure memory. */ GCRY_CIPHER_ENABLE_SYNC = 2, /* Enable CFB sync mode. */ GCRY_CIPHER_CBC_CTS = 4, /* Enable CBC cipher text stealing (CTS). */ GCRY_CIPHER_CBC_MAC = 8 /* Enable CBC message auth. code (MAC). */ }; /* GCM works only with blocks of 128 bits */ #define GCRY_GCM_BLOCK_LEN (128 / 8) /* CCM works only with blocks of 128 bits. */ #define GCRY_CCM_BLOCK_LEN (128 / 8) /* Create a handle for algorithm ALGO to be used in MODE. FLAGS may be given as an bitwise OR of the gcry_cipher_flags values. */ gcry_error_t gcry_cipher_open (gcry_cipher_hd_t *handle, int algo, int mode, unsigned int flags); /* Close the cioher handle H and release all resource. */ void gcry_cipher_close (gcry_cipher_hd_t h); /* Perform various operations on the cipher object H. */ gcry_error_t gcry_cipher_ctl (gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen); /* Retrieve various information about the cipher object H. */ gcry_error_t gcry_cipher_info (gcry_cipher_hd_t h, int what, void *buffer, size_t *nbytes); /* Retrieve various information about the cipher algorithm ALGO. */ gcry_error_t gcry_cipher_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Map the cipher algorithm whose ID is contained in ALGORITHM to a string representation of the algorithm name. For unknown algorithm IDs this function returns "?". */ const char *gcry_cipher_algo_name (int algorithm) _GCRY_GCC_ATTR_PURE; /* Map the algorithm name NAME to an cipher algorithm ID. Return 0 if the algorithm name is not known. */ int gcry_cipher_map_name (const char *name) _GCRY_GCC_ATTR_PURE; /* Given an ASN.1 object identifier in standard IETF dotted decimal format in STRING, return the encryption mode associated with that OID or 0 if not known or applicable. */ int gcry_cipher_mode_from_oid (const char *string) _GCRY_GCC_ATTR_PURE; /* Encrypt the plaintext of size INLEN in IN using the cipher handle H into the buffer OUT which has an allocated length of OUTSIZE. For most algorithms it is possible to pass NULL for in and 0 for INLEN and do a in-place decryption of the data provided in OUT. */ gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t h, void *out, size_t outsize, const void *in, size_t inlen); /* The counterpart to gcry_cipher_encrypt. */ gcry_error_t gcry_cipher_decrypt (gcry_cipher_hd_t h, void *out, size_t outsize, const void *in, size_t inlen); /* Set KEY of length KEYLEN bytes for the cipher handle HD. */ gcry_error_t gcry_cipher_setkey (gcry_cipher_hd_t hd, const void *key, size_t keylen); /* Set initialization vector IV of length IVLEN for the cipher handle HD. */ gcry_error_t gcry_cipher_setiv (gcry_cipher_hd_t hd, const void *iv, size_t ivlen); /* Provide additional authentication data for AEAD modes/ciphers. */ gcry_error_t gcry_cipher_authenticate (gcry_cipher_hd_t hd, const void *abuf, size_t abuflen); /* Get authentication tag for AEAD modes/ciphers. */ gcry_error_t gcry_cipher_gettag (gcry_cipher_hd_t hd, void *outtag, size_t taglen); /* Check authentication tag for AEAD modes/ciphers. */ gcry_error_t gcry_cipher_checktag (gcry_cipher_hd_t hd, const void *intag, size_t taglen); /* Reset the handle to the state after open. */ #define gcry_cipher_reset(h) gcry_cipher_ctl ((h), GCRYCTL_RESET, NULL, 0) /* Perform the OpenPGP sync operation if this is enabled for the cipher handle H. */ #define gcry_cipher_sync(h) gcry_cipher_ctl( (h), GCRYCTL_CFB_SYNC, NULL, 0) /* Enable or disable CTS in future calls to gcry_encrypt(). CBC mode only. */ #define gcry_cipher_cts(h,on) gcry_cipher_ctl( (h), GCRYCTL_SET_CBC_CTS, \ NULL, on ) /* Set counter for CTR mode. (CTR,CTRLEN) must denote a buffer of block size length, or (NULL,0) to set the CTR to the all-zero block. */ gpg_error_t gcry_cipher_setctr (gcry_cipher_hd_t hd, const void *ctr, size_t ctrlen); /* Retrieve the key length in bytes used with algorithm A. */ size_t gcry_cipher_get_algo_keylen (int algo); /* Retrieve the block length in bytes used with algorithm A. */ size_t gcry_cipher_get_algo_blklen (int algo); /* Return 0 if the algorithm A is available for use. */ #define gcry_cipher_test_algo(a) \ gcry_cipher_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /************************************ * * * Asymmetric Cipher Functions * * * ************************************/ /* The algorithms and their IDs we support. */ enum gcry_pk_algos { GCRY_PK_RSA = 1, /* RSA */ GCRY_PK_RSA_E = 2, /* (deprecated: use 1). */ GCRY_PK_RSA_S = 3, /* (deprecated: use 1). */ GCRY_PK_ELG_E = 16, /* (deprecated: use 20). */ GCRY_PK_DSA = 17, /* Digital Signature Algorithm. */ GCRY_PK_ECC = 18, /* Generic ECC. */ GCRY_PK_ELG = 20, /* Elgamal */ GCRY_PK_ECDSA = 301, /* (deprecated: use 18). */ GCRY_PK_ECDH = 302 /* (deprecated: use 18). */ }; /* Flags describing usage capabilities of a PK algorithm. */ #define GCRY_PK_USAGE_SIGN 1 /* Good for signatures. */ #define GCRY_PK_USAGE_ENCR 2 /* Good for encryption. */ #define GCRY_PK_USAGE_CERT 4 /* Good to certify other keys. */ #define GCRY_PK_USAGE_AUTH 8 /* Good for authentication. */ #define GCRY_PK_USAGE_UNKN 128 /* Unknown usage flag. */ /* Modes used with gcry_pubkey_get_sexp. */ #define GCRY_PK_GET_PUBKEY 1 #define GCRY_PK_GET_SECKEY 2 /* Encrypt the DATA using the public key PKEY and store the result as a newly created S-expression at RESULT. */ gcry_error_t gcry_pk_encrypt (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t pkey); /* Decrypt the DATA using the private key SKEY and store the result as a newly created S-expression at RESULT. */ gcry_error_t gcry_pk_decrypt (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t skey); /* Sign the DATA using the private key SKEY and store the result as a newly created S-expression at RESULT. */ gcry_error_t gcry_pk_sign (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t skey); /* Check the signature SIGVAL on DATA using the public key PKEY. */ gcry_error_t gcry_pk_verify (gcry_sexp_t sigval, gcry_sexp_t data, gcry_sexp_t pkey); /* Check that private KEY is sane. */ gcry_error_t gcry_pk_testkey (gcry_sexp_t key); /* Generate a new key pair according to the parameters given in S_PARMS. The new key pair is returned in as an S-expression in R_KEY. */ gcry_error_t gcry_pk_genkey (gcry_sexp_t *r_key, gcry_sexp_t s_parms); /* Catch all function for miscellaneous operations. */ gcry_error_t gcry_pk_ctl (int cmd, void *buffer, size_t buflen); /* Retrieve information about the public key algorithm ALGO. */ gcry_error_t gcry_pk_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Map the public key algorithm whose ID is contained in ALGORITHM to a string representation of the algorithm name. For unknown algorithm IDs this functions returns "?". */ const char *gcry_pk_algo_name (int algorithm) _GCRY_GCC_ATTR_PURE; /* Map the algorithm NAME to a public key algorithm Id. Return 0 if the algorithm name is not known. */ int gcry_pk_map_name (const char* name) _GCRY_GCC_ATTR_PURE; /* Return what is commonly referred as the key length for the given public or private KEY. */ unsigned int gcry_pk_get_nbits (gcry_sexp_t key) _GCRY_GCC_ATTR_PURE; /* Return the so called KEYGRIP which is the SHA-1 hash of the public key parameters expressed in a way depending on the algorithm. */ unsigned char *gcry_pk_get_keygrip (gcry_sexp_t key, unsigned char *array); /* Return the name of the curve matching KEY. */ const char *gcry_pk_get_curve (gcry_sexp_t key, int iterator, unsigned int *r_nbits); /* Return an S-expression with the parameters of the named ECC curve NAME. ALGO must be set to an ECC algorithm. */ gcry_sexp_t gcry_pk_get_param (int algo, const char *name); /* Return 0 if the public key algorithm A is available for use. */ #define gcry_pk_test_algo(a) \ gcry_pk_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /* Return an S-expression representing the context CTX. */ gcry_error_t gcry_pubkey_get_sexp (gcry_sexp_t *r_sexp, int mode, gcry_ctx_t ctx); /************************************ * * * Cryptograhic Hash Functions * * * ************************************/ /* Algorithm IDs for the hash functions we know about. Not all of them are implemnted. */ enum gcry_md_algos { GCRY_MD_NONE = 0, GCRY_MD_MD5 = 1, GCRY_MD_SHA1 = 2, GCRY_MD_RMD160 = 3, GCRY_MD_MD2 = 5, GCRY_MD_TIGER = 6, /* TIGER/192 as used by gpg <= 1.3.2. */ GCRY_MD_HAVAL = 7, /* HAVAL, 5 pass, 160 bit. */ GCRY_MD_SHA256 = 8, GCRY_MD_SHA384 = 9, GCRY_MD_SHA512 = 10, GCRY_MD_SHA224 = 11, GCRY_MD_MD4 = 301, GCRY_MD_CRC32 = 302, GCRY_MD_CRC32_RFC1510 = 303, GCRY_MD_CRC24_RFC2440 = 304, GCRY_MD_WHIRLPOOL = 305, GCRY_MD_TIGER1 = 306, /* TIGER fixed. */ GCRY_MD_TIGER2 = 307, /* TIGER2 variant. */ GCRY_MD_GOSTR3411_94 = 308, /* GOST R 34.11-94. */ GCRY_MD_STRIBOG256 = 309, /* GOST R 34.11-2012, 256 bit. */ GCRY_MD_STRIBOG512 = 310 /* GOST R 34.11-2012, 512 bit. */ }; /* Flags used with the open function. */ enum gcry_md_flags { GCRY_MD_FLAG_SECURE = 1, /* Allocate all buffers in "secure" memory. */ GCRY_MD_FLAG_HMAC = 2, /* Make an HMAC out of this algorithm. */ GCRY_MD_FLAG_BUGEMU1 = 0x0100 }; /* (Forward declaration.) */ struct gcry_md_context; /* This object is used to hold a handle to a message digest object. This structure is private - only to be used by the public gcry_md_* macros. */ typedef struct gcry_md_handle { /* Actual context. */ struct gcry_md_context *ctx; /* Buffer management. */ int bufpos; int bufsize; unsigned char buf[1]; } *gcry_md_hd_t; /* Compatibility types, do not use them. */ #ifndef GCRYPT_NO_DEPRECATED typedef struct gcry_md_handle *GCRY_MD_HD _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_md_handle *GcryMDHd _GCRY_GCC_ATTR_DEPRECATED; #endif /* Create a message digest object for algorithm ALGO. FLAGS may be given as an bitwise OR of the gcry_md_flags values. ALGO may be given as 0 if the algorithms to be used are later set using gcry_md_enable. */ gcry_error_t gcry_md_open (gcry_md_hd_t *h, int algo, unsigned int flags); /* Release the message digest object HD. */ void gcry_md_close (gcry_md_hd_t hd); /* Add the message digest algorithm ALGO to the digest object HD. */ gcry_error_t gcry_md_enable (gcry_md_hd_t hd, int algo); /* Create a new digest object as an exact copy of the object HD. */ gcry_error_t gcry_md_copy (gcry_md_hd_t *bhd, gcry_md_hd_t ahd); /* Reset the digest object HD to its initial state. */ void gcry_md_reset (gcry_md_hd_t hd); /* Perform various operations on the digest object HD. */ gcry_error_t gcry_md_ctl (gcry_md_hd_t hd, int cmd, void *buffer, size_t buflen); /* Pass LENGTH bytes of data in BUFFER to the digest object HD so that it can update the digest values. This is the actual hash function. */ void gcry_md_write (gcry_md_hd_t hd, const void *buffer, size_t length); /* Read out the final digest from HD return the digest value for algorithm ALGO. */ unsigned char *gcry_md_read (gcry_md_hd_t hd, int algo); /* Convenience function to calculate the hash from the data in BUFFER of size LENGTH using the algorithm ALGO avoiding the creating of a hash object. The hash is returned in the caller provided buffer DIGEST which must be large enough to hold the digest of the given algorithm. */ void gcry_md_hash_buffer (int algo, void *digest, const void *buffer, size_t length); /* Convenience function to hash multiple buffers. */ gpg_error_t gcry_md_hash_buffers (int algo, unsigned int flags, void *digest, const gcry_buffer_t *iov, int iovcnt); /* Retrieve the algorithm used with HD. This does not work reliable if more than one algorithm is enabled in HD. */ int gcry_md_get_algo (gcry_md_hd_t hd); /* Retrieve the length in bytes of the digest yielded by algorithm ALGO. */ unsigned int gcry_md_get_algo_dlen (int algo); /* Return true if the the algorithm ALGO is enabled in the digest object A. */ int gcry_md_is_enabled (gcry_md_hd_t a, int algo); /* Return true if the digest object A is allocated in "secure" memory. */ int gcry_md_is_secure (gcry_md_hd_t a); /* Retrieve various information about the object H. */ gcry_error_t gcry_md_info (gcry_md_hd_t h, int what, void *buffer, size_t *nbytes); /* Retrieve various information about the algorithm ALGO. */ gcry_error_t gcry_md_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Map the digest algorithm id ALGO to a string representation of the algorithm name. For unknown algorithms this function returns "?". */ const char *gcry_md_algo_name (int algo) _GCRY_GCC_ATTR_PURE; /* Map the algorithm NAME to a digest algorithm Id. Return 0 if the algorithm name is not known. */ int gcry_md_map_name (const char* name) _GCRY_GCC_ATTR_PURE; /* For use with the HMAC feature, the set MAC key to the KEY of KEYLEN bytes. */ gcry_error_t gcry_md_setkey (gcry_md_hd_t hd, const void *key, size_t keylen); /* Start or stop debugging for digest handle HD; i.e. create a file named dbgmd-<n>.<suffix> while hashing. If SUFFIX is NULL, debugging stops and the file will be closed. */ void gcry_md_debug (gcry_md_hd_t hd, const char *suffix); /* Update the hash(s) of H with the character C. This is a buffered version of the gcry_md_write function. */ #define gcry_md_putc(h,c) \ do { \ gcry_md_hd_t h__ = (h); \ if( (h__)->bufpos == (h__)->bufsize ) \ gcry_md_write( (h__), NULL, 0 ); \ (h__)->buf[(h__)->bufpos++] = (c) & 0xff; \ } while(0) /* Finalize the digest calculation. This is not really needed because gcry_md_read() does this implicitly. */ #define gcry_md_final(a) \ gcry_md_ctl ((a), GCRYCTL_FINALIZE, NULL, 0) /* Return 0 if the algorithm A is available for use. */ #define gcry_md_test_algo(a) \ gcry_md_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /* Return an DER encoded ASN.1 OID for the algorithm A in buffer B. N must point to size_t variable with the available size of buffer B. After return it will receive the actual size of the returned OID. */ #define gcry_md_get_asnoid(a,b,n) \ gcry_md_algo_info((a), GCRYCTL_GET_ASNOID, (b), (n)) /********************************************** * * * Message Authentication Code Functions * * * **********************************************/ /* The data object used to hold a handle to an encryption object. */ struct gcry_mac_handle; typedef struct gcry_mac_handle *gcry_mac_hd_t; /* Algorithm IDs for the hash functions we know about. Not all of them are implemented. */ enum gcry_mac_algos { GCRY_MAC_NONE = 0, GCRY_MAC_HMAC_SHA256 = 101, GCRY_MAC_HMAC_SHA224 = 102, GCRY_MAC_HMAC_SHA512 = 103, GCRY_MAC_HMAC_SHA384 = 104, GCRY_MAC_HMAC_SHA1 = 105, GCRY_MAC_HMAC_MD5 = 106, GCRY_MAC_HMAC_MD4 = 107, GCRY_MAC_HMAC_RMD160 = 108, GCRY_MAC_HMAC_TIGER1 = 109, /* The fixed TIGER variant */ GCRY_MAC_HMAC_WHIRLPOOL = 110, GCRY_MAC_HMAC_GOSTR3411_94 = 111, GCRY_MAC_HMAC_STRIBOG256 = 112, GCRY_MAC_HMAC_STRIBOG512 = 113, GCRY_MAC_CMAC_AES = 201, GCRY_MAC_CMAC_3DES = 202, GCRY_MAC_CMAC_CAMELLIA = 203, GCRY_MAC_CMAC_CAST5 = 204, GCRY_MAC_CMAC_BLOWFISH = 205, GCRY_MAC_CMAC_TWOFISH = 206, GCRY_MAC_CMAC_SERPENT = 207, GCRY_MAC_CMAC_SEED = 208, GCRY_MAC_CMAC_RFC2268 = 209, GCRY_MAC_CMAC_IDEA = 210, GCRY_MAC_CMAC_GOST28147 = 211, GCRY_MAC_GMAC_AES = 401, GCRY_MAC_GMAC_CAMELLIA = 402, GCRY_MAC_GMAC_TWOFISH = 403, GCRY_MAC_GMAC_SERPENT = 404, GCRY_MAC_GMAC_SEED = 405 }; /* Flags used with the open function. */ enum gcry_mac_flags { GCRY_MAC_FLAG_SECURE = 1, /* Allocate all buffers in "secure" memory. */ }; /* Create a MAC handle for algorithm ALGO. FLAGS may be given as an bitwise OR of the gcry_mac_flags values. CTX maybe NULL or gcry_ctx_t object to be associated with HANDLE. */ gcry_error_t gcry_mac_open (gcry_mac_hd_t *handle, int algo, unsigned int flags, gcry_ctx_t ctx); /* Close the MAC handle H and release all resource. */ void gcry_mac_close (gcry_mac_hd_t h); /* Perform various operations on the MAC object H. */ gcry_error_t gcry_mac_ctl (gcry_mac_hd_t h, int cmd, void *buffer, size_t buflen); /* Retrieve various information about the MAC algorithm ALGO. */ gcry_error_t gcry_mac_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Set KEY of length KEYLEN bytes for the MAC handle HD. */ gcry_error_t gcry_mac_setkey (gcry_mac_hd_t hd, const void *key, size_t keylen); /* Set initialization vector IV of length IVLEN for the MAC handle HD. */ gcry_error_t gcry_mac_setiv (gcry_mac_hd_t hd, const void *iv, size_t ivlen); /* Pass LENGTH bytes of data in BUFFER to the MAC object HD so that it can update the MAC values. */ gcry_error_t gcry_mac_write (gcry_mac_hd_t hd, const void *buffer, size_t length); /* Read out the final authentication code from the MAC object HD to BUFFER. */ gcry_error_t gcry_mac_read (gcry_mac_hd_t hd, void *buffer, size_t *buflen); /* Verify the final authentication code from the MAC object HD with BUFFER. */ gcry_error_t gcry_mac_verify (gcry_mac_hd_t hd, const void *buffer, size_t buflen); /* Retrieve the length in bytes of the MAC yielded by algorithm ALGO. */ unsigned int gcry_mac_get_algo_maclen (int algo); /* Retrieve the default key length in bytes used with algorithm A. */ unsigned int gcry_mac_get_algo_keylen (int algo); /* Map the MAC algorithm whose ID is contained in ALGORITHM to a string representation of the algorithm name. For unknown algorithm IDs this function returns "?". */ const char *gcry_mac_algo_name (int algorithm) _GCRY_GCC_ATTR_PURE; /* Map the algorithm name NAME to an MAC algorithm ID. Return 0 if the algorithm name is not known. */ int gcry_mac_map_name (const char *name) _GCRY_GCC_ATTR_PURE; /* Reset the handle to the state after open/setkey. */ #define gcry_mac_reset(h) gcry_mac_ctl ((h), GCRYCTL_RESET, NULL, 0) /* Return 0 if the algorithm A is available for use. */ #define gcry_mac_test_algo(a) \ gcry_mac_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /****************************** * * * Key Derivation Functions * * * ******************************/ /* Algorithm IDs for the KDFs. */ enum gcry_kdf_algos { GCRY_KDF_NONE = 0, GCRY_KDF_SIMPLE_S2K = 16, GCRY_KDF_SALTED_S2K = 17, GCRY_KDF_ITERSALTED_S2K = 19, GCRY_KDF_PBKDF1 = 33, GCRY_KDF_PBKDF2 = 34, GCRY_KDF_SCRYPT = 48 }; /* Derive a key from a passphrase. */ gpg_error_t gcry_kdf_derive (const void *passphrase, size_t passphraselen, int algo, int subalgo, const void *salt, size_t saltlen, unsigned long iterations, size_t keysize, void *keybuffer); /************************************ * * * Random Generating Functions * * * ************************************/ /* The type of the random number generator. */ enum gcry_rng_types { GCRY_RNG_TYPE_STANDARD = 1, /* The default CSPRNG generator. */ GCRY_RNG_TYPE_FIPS = 2, /* The FIPS X9.31 AES generator. */ GCRY_RNG_TYPE_SYSTEM = 3 /* The system's native generator. */ }; /* The possible values for the random quality. The rule of thumb is to use STRONG for session keys and VERY_STRONG for key material. WEAK is usually an alias for STRONG and should not be used anymore (except with gcry_mpi_randomize); use gcry_create_nonce instead. */ typedef enum gcry_random_level { GCRY_WEAK_RANDOM = 0, GCRY_STRONG_RANDOM = 1, GCRY_VERY_STRONG_RANDOM = 2 } gcry_random_level_t; /* Fill BUFFER with LENGTH bytes of random, using random numbers of quality LEVEL. */ void gcry_randomize (void *buffer, size_t length, enum gcry_random_level level); /* Add the external random from BUFFER with LENGTH bytes into the pool. QUALITY should either be -1 for unknown or in the range of 0 to 100 */ gcry_error_t gcry_random_add_bytes (const void *buffer, size_t length, int quality); /* If random numbers are used in an application, this macro should be called from time to time so that new stuff gets added to the internal pool of the RNG. */ #define gcry_fast_random_poll() gcry_control (GCRYCTL_FAST_POLL, NULL) /* Return NBYTES of allocated random using a random numbers of quality LEVEL. */ void *gcry_random_bytes (size_t nbytes, enum gcry_random_level level) _GCRY_GCC_ATTR_MALLOC; /* Return NBYTES of allocated random using a random numbers of quality LEVEL. The random numbers are created returned in "secure" memory. */ void *gcry_random_bytes_secure (size_t nbytes, enum gcry_random_level level) _GCRY_GCC_ATTR_MALLOC; /* Set the big integer W to a random value of NBITS using a random generator with quality LEVEL. Note that by using a level of GCRY_WEAK_RANDOM gcry_create_nonce is used internally. */ void gcry_mpi_randomize (gcry_mpi_t w, unsigned int nbits, enum gcry_random_level level); /* Create an unpredicable nonce of LENGTH bytes in BUFFER. */ void gcry_create_nonce (void *buffer, size_t length); /*******************************/ /* */ /* Prime Number Functions */ /* */ /*******************************/ /* Mode values passed to a gcry_prime_check_func_t. */ #define GCRY_PRIME_CHECK_AT_FINISH 0 #define GCRY_PRIME_CHECK_AT_GOT_PRIME 1 #define GCRY_PRIME_CHECK_AT_MAYBE_PRIME 2 /* The function should return 1 if the operation shall continue, 0 to reject the prime candidate. */ typedef int (*gcry_prime_check_func_t) (void *arg, int mode, gcry_mpi_t candidate); /* Flags for gcry_prime_generate(): */ /* Allocate prime numbers and factors in secure memory. */ #define GCRY_PRIME_FLAG_SECRET (1 << 0) /* Make sure that at least one prime factor is of size `FACTOR_BITS'. */ #define GCRY_PRIME_FLAG_SPECIAL_FACTOR (1 << 1) /* Generate a new prime number of PRIME_BITS bits and store it in PRIME. If FACTOR_BITS is non-zero, one of the prime factors of (prime - 1) / 2 must be FACTOR_BITS bits long. If FACTORS is non-zero, allocate a new, NULL-terminated array holding the prime factors and store it in FACTORS. FLAGS might be used to influence the prime number generation process. */ gcry_error_t gcry_prime_generate (gcry_mpi_t *prime, unsigned int prime_bits, unsigned int factor_bits, gcry_mpi_t **factors, gcry_prime_check_func_t cb_func, void *cb_arg, gcry_random_level_t random_level, unsigned int flags); /* Find a generator for PRIME where the factorization of (prime-1) is in the NULL terminated array FACTORS. Return the generator as a newly allocated MPI in R_G. If START_G is not NULL, use this as teh start for the search. */ gcry_error_t gcry_prime_group_generator (gcry_mpi_t *r_g, gcry_mpi_t prime, gcry_mpi_t *factors, gcry_mpi_t start_g); /* Convenience function to release the FACTORS array. */ void gcry_prime_release_factors (gcry_mpi_t *factors); /* Check wether the number X is prime. */ gcry_error_t gcry_prime_check (gcry_mpi_t x, unsigned int flags); /************************************ * * * Miscellaneous Stuff * * * ************************************/ /* Release the context object CTX. */ void gcry_ctx_release (gcry_ctx_t ctx); /* Log data using Libgcrypt's own log interface. */ void gcry_log_debug (const char *fmt, ...) _GCRY_GCC_ATTR_PRINTF(1,2); void gcry_log_debughex (const char *text, const void *buffer, size_t length); void gcry_log_debugmpi (const char *text, gcry_mpi_t mpi); void gcry_log_debugpnt (const char *text, gcry_mpi_point_t point, gcry_ctx_t ctx); void gcry_log_debugsxp (const char *text, gcry_sexp_t sexp); /* Log levels used by the internal logging facility. */ enum gcry_log_levels { GCRY_LOG_CONT = 0, /* (Continue the last log line.) */ GCRY_LOG_INFO = 10, GCRY_LOG_WARN = 20, GCRY_LOG_ERROR = 30, GCRY_LOG_FATAL = 40, GCRY_LOG_BUG = 50, GCRY_LOG_DEBUG = 100 }; /* Type for progress handlers. */ typedef void (*gcry_handler_progress_t) (void *, const char *, int, int, int); /* Type for memory allocation handlers. */ typedef void *(*gcry_handler_alloc_t) (size_t n); /* Type for secure memory check handlers. */ typedef int (*gcry_handler_secure_check_t) (const void *); /* Type for memory reallocation handlers. */ typedef void *(*gcry_handler_realloc_t) (void *p, size_t n); /* Type for memory free handlers. */ typedef void (*gcry_handler_free_t) (void *); /* Type for out-of-memory handlers. */ typedef int (*gcry_handler_no_mem_t) (void *, size_t, unsigned int); /* Type for fatal error handlers. */ typedef void (*gcry_handler_error_t) (void *, int, const char *); /* Type for logging handlers. */ typedef void (*gcry_handler_log_t) (void *, int, const char *, va_list); /* Certain operations can provide progress information. This function is used to register a handler for retrieving these information. */ void gcry_set_progress_handler (gcry_handler_progress_t cb, void *cb_data); /* Register a custom memory allocation functions. */ void gcry_set_allocation_handler ( gcry_handler_alloc_t func_alloc, gcry_handler_alloc_t func_alloc_secure, gcry_handler_secure_check_t func_secure_check, gcry_handler_realloc_t func_realloc, gcry_handler_free_t func_free); /* Register a function used instead of the internal out of memory handler. */ void gcry_set_outofcore_handler (gcry_handler_no_mem_t h, void *opaque); /* Register a function used instead of the internal fatal error handler. */ void gcry_set_fatalerror_handler (gcry_handler_error_t fnc, void *opaque); /* Register a function used instead of the internal logging facility. */ void gcry_set_log_handler (gcry_handler_log_t f, void *opaque); /* Reserved for future use. */ void gcry_set_gettext_handler (const char *(*f)(const char*)); /* Libgcrypt uses its own memory allocation. It is important to use gcry_free () to release memory allocated by libgcrypt. */ void *gcry_malloc (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_calloc (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_malloc_secure (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_calloc_secure (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_realloc (void *a, size_t n); char *gcry_strdup (const char *string) _GCRY_GCC_ATTR_MALLOC; void *gcry_xmalloc (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_xcalloc (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_xmalloc_secure (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_xcalloc_secure (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_xrealloc (void *a, size_t n); char *gcry_xstrdup (const char * a) _GCRY_GCC_ATTR_MALLOC; void gcry_free (void *a); /* Return true if A is allocated in "secure" memory. */ int gcry_is_secure (const void *a) _GCRY_GCC_ATTR_PURE; /* Return true if Libgcrypt is in FIPS mode. */ #define gcry_fips_mode_active() !!gcry_control (GCRYCTL_FIPS_MODE_P, 0) #if 0 /* (Keep Emacsens' auto-indent happy.) */ { #endif #ifdef __cplusplus } #endif #endif /* _GCRYPT_H */ /* Local Variables: buffer-read-only: t End: */
jsonp({"cep":"17607323","logradouro":"Rua Andr\u00e9 Garcia Soares","bairro":"Parque Universit\u00e1rio","cidade":"Tup\u00e3","uf":"SP","estado":"S\u00e3o Paulo"});
This Summer | I am JuJu! I wanted to share some of our summer with you all. Just going to warn you up front that this will be extremely picture heavy. So here we go! This summer we went on our annual trip to Chicago to see Dr. Usman. This summer we got Skylar’s adaptive bike! This summer we were devastated by the loss of our dear friend Buddy Hopkins! Chris was honored to be a pall bearer at his funeral. Such a wonderful husband, father, son, brother, friend!! This summer we traveled to Albuquerque to visit my folks at the end of June. We were thrilled to see friends and spend lots of time in grandma and grandpa’s pool! This summer we drove down to Phoenix for therapy each Friday. Our favorite part was having lunch with the cousins afterwards. And sometimes stopping to get a candy treat! This summer we sent daddy off to field training for 2 months! We cherish the opportunities we get to FaceTime with him! Gotta love technology! We are ready for him to be home….not long now! This summer we enjoyed being outside in the beautiful northern Arizona weather! Blue skies, beautiful mountains, and cool breezes! This summer the girls and I took a second trip to Albuquerque with my 3 nieces to visit my folks. We spent hours swimming, watching the Olympics, and eating ice cream up at grandma’s bar. This summer the kids learned how to vacuum grandpa’s pool! This summer the girls made me laugh…..A LOT! This summer officially comes to a close tonight as we start back to school tomorrow morning. However…..I am going to try and hold on to summer for just a bit longer! I hope you all had a nice summer! Looking forward to being back here more regularly now that we will be getting back to our normal routine!
import Ember from 'ember'; import EnginesInitializer from '../../../initializers/engines'; import { module, test } from 'qunit'; let application; module('Unit | Initializer | engines', { beforeEach() { Ember.run(function() { application = Ember.Application.create(); application.deferReadiness(); }); } }); // Replace this with your real tests. test('it works', function(assert) { EnginesInitializer.initialize(application); // you would normally confirm the results of the initializer here assert.ok(true); });
/* MicroBuild Copyright (C) 2016 TwinDrills This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include "Schemas/Project/ProjectFile.h" #include "App/Builder/Toolchains/Toolchain.h" #include "App/Builder/Tasks/BuildTask.h" namespace MicroBuild { // Links all the files given into a final output binary. class LinkTask : public BuildTask { private: Toolchain* m_toolchain; std::vector<BuilderFileInfo>& m_sourceFiles; BuilderFileInfo m_outputFile; public: LinkTask(std::vector<BuilderFileInfo>& sourceFiles, Toolchain* toolchain, ProjectFile& project, BuilderFileInfo& outputFile); virtual BuildAction GetAction() override; }; }; // namespace MicroBuild
// Copyright 2018 MaidSafe.net limited. // // This SAFE Network Software is licensed to you under The General Public License (GPL), version 3. // Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed // under the GPL Licence is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. /// `FileHelper` provides functions for CRUD on file. pub mod file_helper; mod data_map; mod dir; mod errors; mod file; mod reader; #[cfg(test)] mod tests; mod writer; pub use self::dir::create_dir; pub use self::errors::NfsError; pub use self::file::File; pub use self::reader::Reader; pub use self::writer::{Mode, Writer}; use futures::Future; /// Helper type for futures that can result in `NfsError`. pub type NfsFuture<T> = Future<Item = T, Error = NfsError>;
By registering your email account I’ll be able to update you when new information is added. I will not spam you (I don’t have time). Thank you for visiting this site.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_11) on Fri Jan 24 10:13:04 PST 2014 --> <title>BoxObjectResponseParser</title> <meta name="date" content="2014-01-24"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="BoxObjectResponseParser"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/BoxObjectResponseParser.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev Class</li> <li><a href="../../../../com/box/boxjavalibv2/responseparsers/ErrorResponseParser.html" title="class in com.box.boxjavalibv2.responseparsers"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?com/box/boxjavalibv2/responseparsers/BoxObjectResponseParser.html" target="_top">Frames</a></li> <li><a href="BoxObjectResponseParser.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#methods_inherited_from_class_com.box.restclientv2.responseparsers.DefaultBoxJSONResponseParser">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li>Method</li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">com.box.boxjavalibv2.responseparsers</div> <h2 title="Class BoxObjectResponseParser" class="title">Class BoxObjectResponseParser</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li><a href="../../../../com/box/restclientv2/responseparsers/DefaultBoxJSONResponseParser.html" title="class in com.box.restclientv2.responseparsers">com.box.restclientv2.responseparsers.DefaultBoxJSONResponseParser</a></li> <li> <ul class="inheritance"> <li>com.box.boxjavalibv2.responseparsers.BoxObjectResponseParser</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd><a href="../../../../com/box/restclientv2/interfaces/IBoxResponseParser.html" title="interface in com.box.restclientv2.interfaces">IBoxResponseParser</a></dd> </dl> <hr> <br> <pre>public class <span class="strong">BoxObjectResponseParser</span> extends <a href="../../../../com/box/restclientv2/responseparsers/DefaultBoxJSONResponseParser.html" title="class in com.box.restclientv2.responseparsers">DefaultBoxJSONResponseParser</a></pre> <div class="block">Parser to parse <a href="../../../../com/box/restclientv2/responses/DefaultBoxResponse.html" title="class in com.box.restclientv2.responses"><code>DefaultBoxResponse</code></a> into Box DAO objects. It analyse the response JSON String and uses <a href="http://jackson.codehaus.org/">Jackson JSON processor</a> to generate Box DAO objects.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../com/box/boxjavalibv2/responseparsers/BoxObjectResponseParser.html#BoxObjectResponseParser(java.lang.Class, com.box.boxjavalibv2.interfaces.IBoxJSONParser)">BoxObjectResponseParser</a></strong>(java.lang.Class&nbsp;cls, <a href="../../../../com/box/boxjavalibv2/interfaces/IBoxJSONParser.html" title="interface in com.box.boxjavalibv2.interfaces">IBoxJSONParser</a>&nbsp;parser)</code> <div class="block">Constructor.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_com.box.restclientv2.responseparsers.DefaultBoxJSONResponseParser"> <!-- --> </a> <h3>Methods inherited from class&nbsp;com.box.restclientv2.responseparsers.<a href="../../../../com/box/restclientv2/responseparsers/DefaultBoxJSONResponseParser.html" title="class in com.box.restclientv2.responseparsers">DefaultBoxJSONResponseParser</a></h3> <code><a href="../../../../com/box/restclientv2/responseparsers/DefaultBoxJSONResponseParser.html#getObjectClass()">getObjectClass</a>, <a href="../../../../com/box/restclientv2/responseparsers/DefaultBoxJSONResponseParser.html#getParser()">getParser</a>, <a href="../../../../com/box/restclientv2/responseparsers/DefaultBoxJSONResponseParser.html#parse(com.box.restclientv2.interfaces.IBoxResponse)">parse</a>, <a href="../../../../com/box/restclientv2/responseparsers/DefaultBoxJSONResponseParser.html#parseInputStream(java.io.InputStream)">parseInputStream</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="BoxObjectResponseParser(java.lang.Class, com.box.boxjavalibv2.interfaces.IBoxJSONParser)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>BoxObjectResponseParser</h4> <pre>public&nbsp;BoxObjectResponseParser(java.lang.Class&nbsp;cls, <a href="../../../../com/box/boxjavalibv2/interfaces/IBoxJSONParser.html" title="interface in com.box.boxjavalibv2.interfaces">IBoxJSONParser</a>&nbsp;parser)</pre> <div class="block">Constructor.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - type of the box resource</dd><dd><code>cls</code> - Object class.</dd></dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/BoxObjectResponseParser.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev Class</li> <li><a href="../../../../com/box/boxjavalibv2/responseparsers/ErrorResponseParser.html" title="class in com.box.boxjavalibv2.responseparsers"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?com/box/boxjavalibv2/responseparsers/BoxObjectResponseParser.html" target="_top">Frames</a></li> <li><a href="BoxObjectResponseParser.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#methods_inherited_from_class_com.box.restclientv2.responseparsers.DefaultBoxJSONResponseParser">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li>Method</li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
<table> <tr><td>355</td><td>foo</td><td>Mildred A. Perkins</td><td>In eget odio interdum, pharetra orci eu, blandit dolor.</td><td>2017-07-20</td></tr> <tr><td>356</td><td>bar</td><td>Richard Porath</td><td>Quisque vitae mollis justo.</td><td>2017-07-20</td></tr> <tr><td>357</td><td>bar</td><td>Roger P. Lyle</td><td>Suspendisse aliquam nibh lacus, eget tincidunt orci imperdiet in. Duis sed finibus odio. Sed luctus purus at iaculis efficitur.</td><td>2017-07-21</td></tr> <tr><td>358</td><td>baz</td><td>Ondřej Mrázek</td><td>Etiam placerat venenatis erat, sed dapibus libero pellentesque non.</td><td>2017-07-21</td></tr> <tr><td>359</td><td>quux</td><td>Leah Herman</td><td>Integer efficitur ullamcorper libero, vitae dignissim libero feugiat ut.</td><td>2017-07-22</td></tr> </table>
By following, you can get an email notification whenever there is activity on this item. You can set your email preferences for blogpost "Hospice Team Goes 'Above and Beyond' To Help Patient Attend Family Wedding" here. Return to Hospice Team Goes 'Above and Beyond' To Help Patient Attend Family Wedding or the site homepage.
"He's chosen wonderful women to be with, and he doesn't hold a grudge." "When I presented at the Oscars last year, everyone would say to me, 'Where's your husband? Is there trouble in the marriage?' ... And I was like, Why on earth would I bring my husband?" "I would still travel for a shoot, but it involves a lot more logistics. The hours are so hard and long. That's why I think one movie a year would be plenty, and I could be at home the rest of the time. Gone are the days of doing back-to-back movies. That will never happen again. At least not until they're all in college." "It's given me a kind of centeredness and roundedness and a feeling of perspective," "I made the mistake of working too much and it turned out to be really the wrong thing. I just had a lot of life in 10 years. I worked so much for so long. I achieved a lot early, but I wasn't very happy. At this point in my life, I have a real life." "I never go into anything with intentions other than doing justice to the material. I just feel fortunate for the part." "She's so clever and very, very funny," "(Last year), I just had a baby and thought, 'I don't want to live there.' Bush's anti-environment, pro-war policies are a (disgrace)." "There's a group I've been close to, since childhood. We spend a lot of time together.'" "My father, he was like the rock, the guy you went to with every problem."
Uncompromising quality, beauty, and functionality make up this Premier 33" Hammered Copper Kitchen Single Basin Sink with Space for Faucet Mounting. This Premier Copper Sink is optimized to allow for an easy replacement of your existing kitchen sink and is a perfect solution for an effortless upgrade. Simply take out your old sink and drop in/surface mount your new one-of-a-kind hand made copper kitchen sink. Replaces a 33" x 22" (outer dimension) standard size kitchen sink. * Inner Dimension: 31" x 20" x 9" Uncompromising quality, beauty, and functionality make up this Premier 25" Copper Hammered Kitchen Single Basin Sink. Each Premier Copper Sink is optimized to allow ample room to deck mount your faucet in a standard 25" countertop. * Inner Dimension: 23" x 17" x 9" * Outer Dimension: 25" x 19" x 9"
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.zookeeper.server.quorum; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetSocketAddress; import java.net.SocketException; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Random; import java.util.Map.Entry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.zookeeper.jmx.MBeanRegistry; import org.apache.zookeeper.server.quorum.Vote; import org.apache.zookeeper.server.quorum.QuorumPeer.LearnerType; import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer; import org.apache.zookeeper.server.quorum.QuorumPeer.ServerState; /** * @deprecated This class has been deprecated as of release 3.4.0. */ @Deprecated public class LeaderElection implements Election { private static final Logger LOG = LoggerFactory.getLogger(LeaderElection.class); protected static final Random epochGen = new Random(); protected QuorumPeer self; public LeaderElection(QuorumPeer self) { this.self = self; } protected static class ElectionResult { public Vote vote; public int count; public Vote winner; public int winningCount; public int numValidVotes; } protected ElectionResult countVotes(HashMap<InetSocketAddress, Vote> votes, HashSet<Long> heardFrom) { final ElectionResult result = new ElectionResult(); // Initialize with null vote result.vote = new Vote(Long.MIN_VALUE, Long.MIN_VALUE); result.winner = new Vote(Long.MIN_VALUE, Long.MIN_VALUE); // First, filter out votes from unheard-from machines. Then // make the views consistent. Sometimes peers will have // different zxids for a server depending on timing. final HashMap<InetSocketAddress, Vote> validVotes = new HashMap<InetSocketAddress, Vote>(); final Map<Long, Long> maxZxids = new HashMap<Long,Long>(); for (Map.Entry<InetSocketAddress, Vote> e : votes.entrySet()) { // Only include votes from machines that we heard from final Vote v = e.getValue(); if (heardFrom.contains(v.getId())) { validVotes.put(e.getKey(), v); Long val = maxZxids.get(v.getId()); if (val == null || val < v.getZxid()) { maxZxids.put(v.getId(), v.getZxid()); } } } // Make all zxids for a given vote id equal to the largest zxid seen for // that id for (Map.Entry<InetSocketAddress, Vote> e : validVotes.entrySet()) { final Vote v = e.getValue(); Long zxid = maxZxids.get(v.getId()); if (v.getZxid() < zxid) { // This is safe inside an iterator as per // http://download.oracle.com/javase/1.5.0/docs/api/java/util/Map.Entry.html e.setValue(new Vote(v.getId(), zxid, v.getElectionEpoch(), v.getPeerEpoch(), v.getState())); } } result.numValidVotes = validVotes.size(); final HashMap<Vote, Integer> countTable = new HashMap<Vote, Integer>(); // Now do the tally for (Vote v : validVotes.values()) { Integer count = countTable.get(v); if (count == null) { count = 0; } countTable.put(v, count + 1); if (v.getId() == result.vote.getId()) { result.count++; } else if (v.getZxid() > result.vote.getZxid() || (v.getZxid() == result.vote.getZxid() && v.getId() > result.vote.getId())) { result.vote = v; result.count = 1; } } result.winningCount = 0; LOG.info("Election tally: "); for (Entry<Vote, Integer> entry : countTable.entrySet()) { if (entry.getValue() > result.winningCount) { result.winningCount = entry.getValue(); result.winner = entry.getKey(); } LOG.info(entry.getKey().getId() + "\t-> " + entry.getValue()); } return result; } /** * There is nothing to shutdown in this implementation of * leader election, so we simply have an empty method. */ public void shutdown(){} /** * Invoked in QuorumPeer to find or elect a new leader. * * @throws InterruptedException */ public Vote lookForLeader() throws InterruptedException { try { self.jmxLeaderElectionBean = new LeaderElectionBean(); MBeanRegistry.getInstance().register( self.jmxLeaderElectionBean, self.jmxLocalPeerBean); } catch (Exception e) { LOG.warn("Failed to register with JMX", e); self.jmxLeaderElectionBean = null; } try { self.setCurrentVote(new Vote(self.getId(), self.getLastLoggedZxid())); // We are going to look for a leader by casting a vote for ourself byte requestBytes[] = new byte[4]; ByteBuffer requestBuffer = ByteBuffer.wrap(requestBytes); byte responseBytes[] = new byte[28]; ByteBuffer responseBuffer = ByteBuffer.wrap(responseBytes); /* The current vote for the leader. Initially me! */ DatagramSocket s = null; try { s = new DatagramSocket(); s.setSoTimeout(200); } catch (SocketException e1) { LOG.error("Socket exception when creating socket for leader election", e1); System.exit(4); } DatagramPacket requestPacket = new DatagramPacket(requestBytes, requestBytes.length); DatagramPacket responsePacket = new DatagramPacket(responseBytes, responseBytes.length); int xid = epochGen.nextInt(); while (self.isRunning()) { HashMap<InetSocketAddress, Vote> votes = new HashMap<InetSocketAddress, Vote>(self.getVotingView().size()); requestBuffer.clear(); requestBuffer.putInt(xid); requestPacket.setLength(4); HashSet<Long> heardFrom = new HashSet<Long>(); for (QuorumServer server : self.getVotingView().values()) { LOG.info("Server address: " + server.addr); try { requestPacket.setSocketAddress(server.addr); } catch (IllegalArgumentException e) { // Sun doesn't include the address that causes this // exception to be thrown, so we wrap the exception // in order to capture this critical detail. throw new IllegalArgumentException( "Unable to set socket address on packet, msg:" + e.getMessage() + " with addr:" + server.addr, e); } try { s.send(requestPacket); responsePacket.setLength(responseBytes.length); s.receive(responsePacket); if (responsePacket.getLength() != responseBytes.length) { LOG.error("Got a short response: " + responsePacket.getLength()); continue; } responseBuffer.clear(); int recvedXid = responseBuffer.getInt(); if (recvedXid != xid) { LOG.error("Got bad xid: expected " + xid + " got " + recvedXid); continue; } long peerId = responseBuffer.getLong(); heardFrom.add(peerId); //if(server.id != peerId){ Vote vote = new Vote(responseBuffer.getLong(), responseBuffer.getLong()); InetSocketAddress addr = (InetSocketAddress) responsePacket .getSocketAddress(); votes.put(addr, vote); //} } catch (IOException e) { LOG.warn("Ignoring exception while looking for leader", e); // Errors are okay, since hosts may be // down } } ElectionResult result = countVotes(votes, heardFrom); // ZOOKEEPER-569: // If no votes are received for live peers, reset to voting // for ourselves as otherwise we may hang on to a vote // for a dead peer if (result.numValidVotes == 0) { self.setCurrentVote(new Vote(self.getId(), self.getLastLoggedZxid())); } else { if (result.winner.getId() >= 0) { self.setCurrentVote(result.vote); // To do: this doesn't use a quorum verifier if (result.winningCount > (self.getVotingView().size() / 2)) { self.setCurrentVote(result.winner); s.close(); Vote current = self.getCurrentVote(); LOG.info("Found leader: my type is: " + self.getLearnerType()); /* * We want to make sure we implement the state machine * correctly. If we are a PARTICIPANT, once a leader * is elected we can move either to LEADING or * FOLLOWING. However if we are an OBSERVER, it is an * error to be elected as a Leader. */ if (self.getLearnerType() == LearnerType.OBSERVER) { if (current.getId() == self.getId()) { // This should never happen! LOG.error("OBSERVER elected as leader!"); Thread.sleep(100); } else { self.setPeerState(ServerState.OBSERVING); Thread.sleep(100); return current; } } else { self.setPeerState((current.getId() == self.getId()) ? ServerState.LEADING: ServerState.FOLLOWING); if (self.getPeerState() == ServerState.FOLLOWING) { Thread.sleep(100); } return current; } } } } Thread.sleep(1000); } return null; } finally { try { if(self.jmxLeaderElectionBean != null){ MBeanRegistry.getInstance().unregister( self.jmxLeaderElectionBean); } } catch (Exception e) { LOG.warn("Failed to unregister with JMX", e); } self.jmxLeaderElectionBean = null; } } }
<?php namespace Q3i\NawSso\Adapter; use Q3i\NawSso\Exception\AdapterException; use Q3i\NawSso\Exception\UsernameTakenException; /** * Created by IntelliJ IDEA. * * (c) net&works GmbH, Hannover, Germany * http://www.single-signon.com * (c) Q3i GmbH, Düsseldorf, Germany * http://www.q3i.de */ class PhpBB3 extends AbstractAdapter { /** * @param int $newUserId * @param array $accessDefinition */ protected function initUser($newUserId, array $accessDefinition) { $forumsToSet = $accessDefinition['forums']; foreach ($forumsToSet as $forumId) { $this->aclGrantUserForum($newUserId, $forumId, true); } $accessGroups = $accessDefinition['groups']; foreach ($accessGroups as $groupId) { $this->aclGrantUserGroup($newUserId, $groupId, true); } } /** * process the userdata string and return an associative array * @param string $sso_userdata: the data from fe_users (pipe-separated) * @return array $sso_userdata: the userdata * @throws AdapterException */ function processIncomingUserdata($sso_userdata) { $data = array(); $sso_userdata = explode("|", $sso_userdata); for ($i = 0; $i < count($sso_userdata); $i++) { $sso_userdata[$i] = explode("=", $sso_userdata[$i]); $data[array_shift($sso_userdata[$i])] = implode('=', $sso_userdata[$i]); } unset ($sso_userdata); $sso_userdata = $data; // check "name" column if (!$sso_userdata['name']) throw new AdapterException("Field >>name<< mustn't be empty. Please check your source user data."); // check "username" column if (!$sso_userdata['username']) throw new AdapterException("Field >>username<< mustn't be empty. Please check your source user data."); // check "email" column if (!$sso_userdata['email']) throw new AdapterException("Field >>email<< mustn't be empty. Please check your source user data."); // reformat $User_Name //* begin : exception for air cargo germany - here nickname will be taken instead of name */ // if (!$sso_userdata['tx_q8ycockpit_nickname']) return array("Error"=>"Field >>tx_q8ycockpit_nickname<< mustn't be empty. Please check your source user data."); //$sso_userdata['name'] = $sso_userdata['tx_q8ycockpit_nickname']; /* end : exception for air cargo germany - here nickname will be taken instead of name */ //$sso_userdata['name'] = substr(str_replace("\\'", "'", $sso_userdata['name']), 0, 25); //$sso_userdata['name'] = str_replace("'", "\\'", $sso_userdata['name']); //$sso_userdata['name'] = str_replace(" ", ".", $sso_userdata['name']); return $sso_userdata; } /** * Check local user if present: * 1) first match with field q3i_typo3_username * 2) fallback to field user_email * 3) no local user found if neither 1) or 2) applies * @param $sso_userdata * @return mixed * @throws AdapterException */ function checkLocalUser($sso_userdata) { $remoteIdentifier = strtolower(trim($sso_userdata['username'])); $email = strtolower(trim($sso_userdata['email'])); // check for typ3-identifier match (case insensitive) $sql = "SELECT user_id, q3i_typo3_username, username, user_password, user_sig FROM " . USERS_TABLE . " WHERE q3i_typo3_username COLLATE UTF8_GENERAL_CI = '{$remoteIdentifier}'"; if ($result = $this->dbHandle->sql_query($sql)) { $rows = $this->dbHandle->sql_fetchrowset($result); if (count($rows) > 1) { throw new AdapterException("Multiple users with the TYPO3 username (field:q3i_typo3_username) {$remoteIdentifier} available. Abort."); } else if (count($rows) == 1) { return $rows[0]; } } else { throw new AdapterException("Error fetching user record."); } // no user with typo3-identifier match found // try fallback with email match (case insensitive) $sql = "SELECT user_id, q3i_typo3_username, username, user_password, user_sig FROM " . USERS_TABLE . " WHERE user_email COLLATE UTF8_GENERAL_CI = '{$email}'"; if ($result = $this->dbHandle->sql_query($sql)) { $rows = $this->dbHandle->sql_fetchrowset($result); if (count($rows) > 1) { throw new AdapterException("Multiple users with the email (field:user_email) {$email} available. Abort."); } else if (count($rows) == 1) { return $rows[0]; } } else { throw new AdapterException("Error fetching user record."); } } /** * @param $sso_userdata * @param array $allowedUserGroups * @param array $groupMap * @return array * @throws AdapterException */ function parseIncomingGroupData($sso_userdata, array $allowedUserGroups, array $groupMap) { // parse the submitted groups where the user is a member $sso_groups = explode(',',$sso_userdata['usergroup']); // build array with allowed group names $allowedGroupNames = Array(); foreach ($allowedUserGroups as $key => $groupName) { if ($groupName) $allowedGroupNames[$key] = trim(strtolower($groupName)); } // check if user belongs to one of allowed groups, if not - no access $intersec = Array('forums'=>array(),'groups'=>array()); foreach ($sso_groups as $key => $userGroup) { $normalGroupName = trim(strtolower($userGroup)); if (in_array($normalGroupName, $allowedGroupNames)) { if (array_key_exists($normalGroupName,$groupMap)) { $mappingData = $groupMap[$normalGroupName]; $intersec['forums'] = array_unique(array_merge($intersec['forums'], explode(',', $mappingData['forums']))); $intersec['groups'] = array_unique(array_merge($intersec['groups'], explode(',', $mappingData['groups']))); } } } if (!is_array($intersec) || count($intersec) == 0) { // group name not allowed for imported users throw new AdapterException("not allowed group membership"); } else { $accessDefinition = $intersec; } return $accessDefinition; } /** * @param array $sso_userdata * @param array $accessDefinition * @return array * @throws AdapterException */ function process(array $sso_userdata, array $accessDefinition) { // check if the given $User_Name exists in the DB $localUserData = $this->checkLocalUser($sso_userdata); $sso_action = $this->getVariable('action'); $sso_flags = $this->getVariable('flags'); if (is_array($sso_flags) && $sso_flags['create_modify'] > 0) { $sso_action = 'create_modify'; } switch ($sso_action) { // action: create user / update userdata case 'create_modify': if (!$localUserData) { // given $User_Name doesn't exist in DB -> create new account $localUserData = $this->actionCreate($sso_userdata, $accessDefinition); } else { // user already exists, update profile with data from TYPO3's fe_users // data used from fe_users: email $this->actionModify($sso_userdata, $accessDefinition, $localUserData); } return $this->actionLogon($localUserData); break; // perform logon for given $User_Name case 'logon': if (!$localUserData) { //no valid user found; return error throw new AdapterException("No account for this user"); } else { return $this->actionLogon($localUserData); } break; default: throw new AdapterException('Unknown action'); } } /** * @param $newUsername * @param null $existingLocalUserId * @return string */ protected function ensureUsernameUnique($newUsername, $existingLocalUserId = null) { /** * @param $newUsername * @param $dbHandle * @param null $existingLocalUserId * @return bool */ function isUsernameUnique($newUsername, $dbHandle, $existingLocalUserId = null) { // check if username will be unique (case insensitive) $sql = "SELECT * FROM " . USERS_TABLE . " WHERE username COLLATE UTF8_GENERAL_CI = '{$newUsername}'"; if ($existingLocalUserId > 0) { $sql .= " AND NOT user_id = {$existingLocalUserId}"; } $result = $dbHandle->sql_query($sql); $row_check = $dbHandle->sql_fetchrow($result); if ($row_check['user_id']) { return false; } else { return true; } } // ensure username to be unique $div = 0; $original_new_username = $newUsername; while (!isUsernameUnique($newUsername, $this->dbHandle, $existingLocalUserId)) { $div++; $newUsername = $original_new_username . " {$div}"; } return $newUsername; } /** * Create/Modify user info signature * @param $sso_userdata * @param null|array $localUserData * @return string */ protected function processUserInfoSignature($sso_userdata, array $localUserData = null) { $sig = ''; if ($sso_userdata['company']) { $sig .= trim($sso_userdata['company']); } if ($localUserData['user_sig'] > '') { $localUserData['user_sig'] = str_replace($sig, '', $localUserData['user_sig']); $sig .= "\n" . trim($localUserData['user_sig']); } return $sig; } /** * Create new local user * @param $sso_userdata * @param $accessDefinition * @return mixed * @throws UsernameTakenException * @throws AdapterException */ protected function actionCreate($sso_userdata, $accessDefinition) { $remoteIdentifier = strtolower(trim($sso_userdata['username'])); $local_email = strtolower(trim($sso_userdata['email'])); $local_username = $this->ensureUsernameUnique(trim($sso_userdata['name'])); // username clean $local_username_clean = strtolower($local_username); $local_signature = $this->processUserInfoSignature($sso_userdata); // check if $remoteIdentifier will be unique (case insensitive) $sql = "SELECT user_id FROM " . USERS_TABLE . " WHERE q3i_typo3_username COLLATE UTF8_GENERAL_CI = '{$remoteIdentifier}'"; $result = $this->dbHandle->sql_query($sql); $row_check = $this->dbHandle->sql_fetchrow($result); if ($row_check['user_id']) { // desired username is already taken throw new AdapterException("Remote identifier {$remoteIdentifier} is already taken. Please contact our support."); } // check if email will be unique (case insensitive) $sql = "SELECT user_id FROM " . USERS_TABLE . " WHERE user_email COLLATE UTF8_GENERAL_CI LIKE '{$local_email}'"; $result = $this->dbHandle->sql_query($sql); $row_check = $this->dbHandle->sql_fetchrow($result); if ($row_check['user_id']) { // desired email address is already taken throw new AdapterException("E-Mail {$local_email} is already taken"); } // determine the next free user_id; $sql = "SELECT MAX(user_id) AS total FROM " . USERS_TABLE; $result = $this->dbHandle->sql_query($sql); $row2 = $this->dbHandle->sql_fetchrow($result); $new_user_id = $row2['total'] + 1; // insert userdata into DB // data used from TYPO3's fe_users: email, country, website $sql = "SELECT group_id FROM " . GROUPS_TABLE . " WHERE group_name LIKE 'REGISTERED'"; $result = $this->dbHandle->sql_query($sql); if (!$result) { throw new AdapterException("error fetching main user group"); } $grpIdData = $this->dbHandle->sql_fetchrow(); $group_id = $grpIdData['group_id']; $sql = "INSERT INTO " . USERS_TABLE . " ( user_id, username, username_clean, group_id, user_regdate, user_password, user_email, user_permissions, user_sig, user_lang, user_dateformat, user_style, user_lastvisit, user_lastmark, user_ip, user_colour, q3i_typo3_username ) VALUES( '{$new_user_id}', '{$local_username}', '{$local_username_clean}', {$group_id}, '" . time() . "', '%notallowed%', '{$local_email}', '', '{$local_signature}', 'de', 'D M d, Y g:i a', 1, '" . time() . "', '" . time() . "', '" . $this->getVariable('ip') ."', '9E8DA7', '{$remoteIdentifier}' )"; // var_dump($sql);die(); if (!($result = $this->dbHandle->sql_query($sql))) throw new AdapterException("error creating user"); // init ACL for the user $this->initUser($new_user_id, $accessDefinition); $sql = "SELECT user_id, username, user_password FROM " . USERS_TABLE . " WHERE username_clean = '" . $local_username_clean . "'"; $result = $this->dbHandle->sql_query($sql); $localUserData = $this->dbHandle->sql_fetchrow($result); return $localUserData; } /** * Update existing local user record * @param $sso_userdata * @param $accessDefinition * @param $localUserData * @return array * @throws AdapterException */ protected function actionModify($sso_userdata, $accessDefinition, $localUserData) { $remoteIdentifier = strtolower(trim($sso_userdata['username'])); $local_email = strtolower(trim($sso_userdata['email'])); $local_username = $this->ensureUsernameUnique(trim($sso_userdata['name']), $localUserData['user_id']); // username clean $local_username_clean = strtolower($local_username); $local_signature = $this->processUserInfoSignature($sso_userdata, $localUserData); // check if username was submitted and update if so if ($local_username && $localUserData['user_id']) { // update user name $sql = "UPDATE " . USERS_TABLE . " SET username='{$local_username}', username_clean='{$local_username_clean}' WHERE user_id='{$localUserData['user_id']}'"; if (!($result = $this->dbHandle->sql_query($sql))) throw new AdapterException("error updating profile"); } // check if $remoteIdentifier was submitted and update local reference if so if ($remoteIdentifier && !$localUserData['q3i_typo3_username']) { // check if remote identifier is available $sql = "SELECT user_id FROM " . USERS_TABLE . " WHERE q3i_typo3_username COLLATE UTF8_GENERAL_CI = '{$remoteIdentifier}' AND NOT user_id = {$localUserData['user_id']}"; $result = $this->dbHandle->sql_query($sql); $row_check = $this->dbHandle->sql_fetchrow($result); if ($row_check['user_id']) { // desired username is already taken throw new AdapterException("Remote identifier {$remoteIdentifier} is already taken. Please contact our support."); } // update remote identifier $sql = "UPDATE " . USERS_TABLE . " SET q3i_typo3_username='{$remoteIdentifier}' where user_id='{$localUserData['user_id']}'"; if (!($result = $this->dbHandle->sql_query($sql))) throw new AdapterException("error updating profile"); } // check if email was submitted and update local if so if ($local_email) { // check if email is available $sql = "SELECT user_id FROM " . USERS_TABLE . " WHERE user_email COLLATE UTF8_GENERAL_CI = '{$local_email}' AND NOT user_id = {$localUserData['user_id']}"; $result = $this->dbHandle->sql_query($sql); $row_check = $this->dbHandle->sql_fetchrow($result); if ($row_check['user_id']) { // desired username is already taken throw new AdapterException("E-Mail {$sso_userdata['email']} is already taken. Please contact our support."); } // update email $sql = "UPDATE " . USERS_TABLE . " SET user_email='{$local_email}' WHERE user_id='{$localUserData['user_id']}'"; if (!($result = $this->dbHandle->sql_query($sql))) throw new AdapterException("error updating profile"); } if ($local_signature) { // update signature $sql = "UPDATE " . USERS_TABLE . " SET user_sig='{$local_signature}' WHERE user_id='{$localUserData['user_id']}'"; if (!($result = $this->dbHandle->sql_query($sql))) throw new AdapterException("error updating profile"); } // update the usergroups: foreach ($accessDefinition['groups'] as $groupId) { // for each submitted TYPO3 group check if there's a group in phpBB $sql = "SELECT group_id FROM " . GROUPS_TABLE . " WHERE group_id = '{$groupId}'"; $result = $this->dbHandle->sql_query($sql); if ($row = $this->dbHandle->sql_fetchrow($result)) { if (!$this->aclCheckUserGroup($localUserData['user_id'], $row['group_id'])) { if (!$this->aclGrantUserGroup($localUserData['user_id'], $row['group_id'], true)) { return array("Error" => "error updating group memberships"); } } } else { throw new AdapterException("Group ID {$groupId} not found locally"); } } // update the user forum acl: foreach ($accessDefinition['forums'] as $forumId) { // for each submitted forum ID check if there's a forum in phpBB $sql = "SELECT forum_id FROM " . FORUMS_TABLE . " WHERE forum_id = '{$forumId}'"; $result = $this->dbHandle->sql_query($sql); if ($row = $this->dbHandle->sql_fetchrow($result)) { if (!$this->aclCheckUserForum($localUserData['user_id'], $row['forum_id'])) { if (!$this->aclGrantUserForum($localUserData['user_id'], $row['forum_id'], true)) { return array("Error" => "error updating forum access"); } } } else { throw new AdapterException("Forum ID {$forumId} not found locally"); } } // clear user permissions cache, PHPBB will recreate it based on the acl and group membership we set above $sql = "UPDATE " . USERS_TABLE . " SET user_permissions = '' WHERE user_id = {$localUserData['user_id']}"; $this->dbHandle->sql_query($sql); // // remove user from all other groups than the TYPO3 ones // // first, get group_id and group_name from the DB // $sql = "SELECT " . GROUPS_TABLE . ".group_id, " . GROUPS_TABLE . ".group_name from " . USER_GROUP_TABLE . // " LEFT JOIN " . GROUPS_TABLE . // " ON " . USER_GROUP_TABLE . ".group_id = " . GROUPS_TABLE . ".group_id // where user_id = '{$localUserData['user_id']}' AND " . GROUPS_TABLE . ".group_type != 3"; // // $result = $this->dbHandle->sql_query($sql); // $is_member = $this->dbHandle->sql_fetchrowset($result); // if ($is_member) { // foreach ($is_member as $temp) { // // if the user is member to this group, but this group wasn't submitted by TYPO3 -> remove user // if ($temp['group_id'] > 0 && !in_array($temp['group_id'], $accessDefinition['groups'])) { // $this->aclGrantUserGroup($localUserData['user_id'], $temp['group_id'], false); // } // } // } } /** * Create user session for the given local user * @param $localUserData * @return array */ protected function actionLogon($localUserData) { //create the session define('IN_LOGIN', true); // Give us some basic information $userAgent = $_SERVER['HTTP_USER_AGENT']; $forwarderFor = $_SERVER['HTTP_USER_AGENT']; $httpHost = $_SERVER['$_SERVER']; // Give us some basic information $time_now = time(); $update_session_page = 1; $browser = (!empty($userAgent)) ? htmlspecialchars((string)$userAgent) : ''; $forwarded_for = (!empty($forwarderFor)) ? (string)$forwarderFor : ''; $host = (!empty($httpHost)) ? (string)$httpHost : 'localhost'; $page = 'index.php'; $cookie_data['k'] = ''; $cookie_data['u'] = $localUserData['user_id']; $sql = 'SELECT * FROM ' . USERS_TABLE . ' WHERE user_id = ' . (int)$cookie_data['u'] . ' AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; $result = $this->dbHandle->sql_query($sql); $data = $this->dbHandle->sql_fetchrow($result); $this->dbHandle->sql_freeresult($result); $data['session_last_visit'] = (isset($data['session_time']) && $data['session_time']) ? $data['session_time'] : (($data['user_lastvisit']) ? $data['user_lastvisit'] : time()); // Force user id to be integer... $data['user_id'] = (int)$data['user_id']; $data['is_registered'] = ($data['user_id'] != ANONYMOUS && ($data['user_type'] == USER_NORMAL || $data['user_type'] == USER_FOUNDER)) ? true : false; $data['is_bot'] = false; // Create or update the session $sql_ary = array( 'session_user_id' => (int)$data['user_id'], 'session_start' => (int)$time_now, 'session_last_visit' => (int)$data['session_last_visit'], 'session_time' => (int)$time_now, 'session_browser' => (string)substr($browser, 0, 149), 'session_forwarded_for' => (string)$forwarded_for, 'session_ip' => (string)$this->getVariable('ip'), 'session_autologin' => 0, 'session_admin' => 0, 'session_viewonline' => 1, ); $this->dbHandle->sql_return_on_error(true); $sql = 'DELETE FROM ' . SESSIONS_TABLE . ' WHERE session_id = \'' . $this->dbHandle->sql_escape($data['session_id']) . '\' AND session_user_id = ' . ANONYMOUS; if (!defined('IN_ERROR_HANDLER') && (!$data['session_id'] || !$this->dbHandle->sql_query($sql) || !$this->dbHandle->sql_affectedrows())) { // Limit new sessions in 1 minute period (if required) if (empty($data['session_time']) && $this->targetSystemConfig['active_sessions']) { $sql = 'SELECT COUNT(session_id) AS sessions FROM ' . SESSIONS_TABLE . ' WHERE session_time >= ' . ($time_now - 60); $result = $this->dbHandle->sql_query($sql); $localUserData = $this->dbHandle->sql_fetchrow($result); $this->dbHandle->sql_freeresult($result); if ((int)$localUserData['sessions'] > (int)$this->targetSystemConfig['active_sessions']) { header('HTTP/1.1 503 Service Unavailable'); trigger_error('BOARD_UNAVAILABLE'); } } } $data['session_id'] = md5(unique_id()); $sql_ary['session_id'] = (string)$data['session_id']; $sql_ary['session_page'] = 'index.php'; $sql = 'INSERT INTO ' . SESSIONS_TABLE . ' ' . $this->dbHandle->sql_build_array('INSERT', $sql_ary); $this->dbHandle->sql_query($sql); $this->dbHandle->sql_return_on_error(false); // refresh data $SID = '?sid=' . $data['session_id']; $_SID = $data['session_id']; $data = array_merge($data, $sql_ary); $cookie_expire = $time_now + (($this->targetSystemConfig['max_autologin_time']) ? 86400 * (int)$this->targetSystemConfig['max_autologin_time'] : 31536000); $this->setCookie('u', $cookie_data['u'], $cookie_expire); $this->setCookie('k', $cookie_data['k'], $cookie_expire); $this->setCookie('sid', $data['session_id'], $cookie_expire); unset($cookie_expire); $sql = 'SELECT COUNT(session_id) AS sessions FROM ' . SESSIONS_TABLE . ' WHERE session_user_id = ' . (int)$data['user_id'] . ' AND session_time >= ' . ($time_now - $this->targetSystemConfig['form_token_lifetime']); $result = $this->dbHandle->sql_query($sql); $localUserData = $this->dbHandle->sql_fetchrow($result); $this->dbHandle->sql_freeresult($result); if ((int)$localUserData['sessions'] <= 1 || empty($data['user_form_salt'])) { $data['user_form_salt'] = unique_id(); // Update the form key $sql = 'UPDATE ' . USERS_TABLE . ' SET user_form_salt = \'' . $this->dbHandle->sql_escape($data['user_form_salt']) . '\' WHERE user_id = ' . (int)$data['user_id']; $this->dbHandle->sql_query($sql); } $return_val[0] = array(); $return_val += array("redirecturl" => $this->getVariable('sso_url')); // pass session data to the SSO-Agent if (strstr($return_val["redirecturl"], '?')) { $return_val["redirecturl"] .= "&sid=" . $data['session_id']; } else { $return_val["redirecturl"] .= "?sid=" . $data['session_id']; } return $return_val; } /** * Check users group membership * @param $userId * @param $groupId * @return bool */ private function aclCheckUserGroup($userId, $groupId) { $sql = "SELECT * FROM " . USER_GROUP_TABLE . " WHERE group_id = '{$groupId}' AND user_id = '{$userId}'"; $result = $this->dbHandle->sql_query($sql); $row = $this->dbHandle->sql_fetchrow($result); if (!$row) { return false; } return true; } /** * Add(remove) a user to group * @param $userId * @param $groupId * @param bool $allow * @return bool */ private function aclGrantUserGroup($userId, $groupId, $allow=true) { $sql = null; if ($allow) { $sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id,user_id,user_pending) VALUES ('{$groupId}','{$userId}','0')"; } else { $sql = "DELETE FROM " . USER_GROUP_TABLE . " WHERE user_id = '{$userId}' AND group_id = '{$groupId}'"; } if (!($result = $this->dbHandle->sql_query($sql))) { return false; } return true; } /** * Check users group membership * @param $userId * @param $forumId * @return bool */ private function aclCheckUserForum($userId, $forumId) { $sql = "SELECT * FROM phpbb_acl_users WHERE user_id = '{$userId}' AND forum_id = '{$forumId}'"; $result = $this->dbHandle->sql_query($sql); $row = $this->dbHandle->sql_fetchrow($result); if (!$row) { return false; } return true; } /** * Add(remove) a user to group * @param $userId * @param $forumId * @param bool $allow * @return bool */ private function aclGrantUserForum($userId, $forumId, $allow=true) { $sql = null; if ($allow) { $sql = "INSERT INTO phpbb_acl_users (user_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES({$userId}, '$forumId', 0, 15, 0)"; } else { $sql = "DELETE FROM phpbb_acl_users WHERE user_id = '{$userId}' AND forum_id = '{$forumId}'"; } if (!($result = $this->dbHandle->sql_query($sql))) { return false; } return true; } }
Howlite was first discovered in Nova Scotia in 1868 by Canadian mineralogist, Henry How. It is most commonly found in Canada and the U.S., but it has also been found in Mexico, Germany, Russia, Turkey, Pakistan, and Namibia. It’s raw form grows in cauliflower-like masses. Natural Howlite is an opaque white with grey veining, similar to the beautiful white & gray marble counter tops everyone wants in their kitchens right now. It has often been dyed in an attempt to pass it off as other, more expensive gemstones (typically turquoise or coral), but recently it has been easier to find in its natural white form. We’re so happy about that because it is beautiful in it’s natural state too. A beneficial stone for pretty much everyone, Howlite is calming and soothes emotions. It brings a level of peace, happiness, and contentment to the wearer. The calming nature of Howlite reduces anxiety, tension, stress, pain, and anger. It can also increase awareness, wisdom, and enlightenment. In addition to all of that, Howlite can be used to combat insomnia and quiet overactive minds. Stop into Bead World to feel the calming, peaceful vibes of Howlite. Error: Error validating access token: Session has expired on Wednesday, 22-Aug-18 13:57:01 PDT. The current time is Thursday, 25-Apr-19 01:04:06 PDT.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_08) on Sat Apr 22 18:57:16 PDT 2006 --> <TITLE> org.apache.axis.server (Axis API) </TITLE> <META NAME="keywords" CONTENT="org.apache.axis.server package"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <FONT size="+1" CLASS="FrameTitleFont"> <A HREF="../../../../org/apache/axis/server/package-summary.html" target="classFrame">org.apache.axis.server</A></FONT> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> Interfaces</FONT>&nbsp; <FONT CLASS="FrameItemFont"> <BR> <A HREF="AxisServerFactory.html" title="interface in org.apache.axis.server" target="classFrame"><I>AxisServerFactory</I></A></FONT></TD> </TR> </TABLE> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> Classes</FONT>&nbsp; <FONT CLASS="FrameItemFont"> <BR> <A HREF="AxisServer.html" title="class in org.apache.axis.server" target="classFrame">AxisServer</A> <BR> <A HREF="DefaultAxisServerFactory.html" title="class in org.apache.axis.server" target="classFrame">DefaultAxisServerFactory</A> <BR> <A HREF="JNDIAxisServerFactory.html" title="class in org.apache.axis.server" target="classFrame">JNDIAxisServerFactory</A> <BR> <A HREF="ParamList.html" title="class in org.apache.axis.server" target="classFrame">ParamList</A> <BR> <A HREF="Transport.html" title="class in org.apache.axis.server" target="classFrame">Transport</A></FONT></TD> </TR> </TABLE> </BODY> </HTML>
Jarāsandha and all the other princes were very angry at Kṛṣṇa for having kidnapped Rukmiṇī. Struck by Rukmiṇī’s beauty, they had fallen from the backs of their horses and elephants, but now they began to stand up and properly arm themselves. Picking up their bows and arrows, they began to chase Kṛṣṇa on their chariots, horses and elephants. To check their progress, the soldiers of the Yadu dynasty turned and faced them. Thus terrible fighting began between the two belligerent groups. The princes opposing Kṛṣṇa, who were led by Jarāsandha and were all expert in fighting, shot their arrows at the Yadu soldiers just as a cloud splashes the face of a mountain with torrents of rain. Gathered on the face of a mountain, a cloud does not move very much, and therefore the force of rain is much more severe on a mountain than anywhere else. As Kṛṣṇa was speaking with Rukmiṇī, the commanders of the Yadu dynasty’s soldiers, headed by Lord Balarāma, who is also known as Saṅkarṣaṇa, as well as by Gada, not tolerating the defiant attitude of the opposing soldiers, began to strike their horses, elephants and chariots with arrows. As the fighting progressed, the princes and soldiers of the enemy began to fall from their horses, elephants and chariots. Within a short time, millions of severed heads, decorated with helmets and earrings, had fallen on the battlefield. The soldiers’ hands were severed along with their bows and arrows and clubs; arms were piled upon arms, thighs upon thighs, and horses upon horses. Similarly, other animals, such as camels, elephants and asses, as well as infantry soldiers, all fell with severed heads. When the enemy, headed by Jarāsandha, found that they were gradually being defeated by the soldiers of Kṛṣṇa, they thought it unwise to risk losing their armies in the battle for the sake of Śiśupāla. Śiśupāla himself should have fought to rescue Rukmiṇī from the hands of Kṛṣṇa, but when the soldiers saw that Śiśupāla was not competent to fight with Kṛṣṇa, they decided not to lose their armies unnecessarily; therefore they ceased fighting and dispersed. Although in the beginning the princes had been full of hope for success in their heroic action, after their defeat they could only try to encourage Śiśupāla with flattering words. Thus Śiśupāla, instead of marrying Rukmiṇī, had to be satisfied with the flattering words of his friends, and he returned home in disappointment. The kings who had come to assist him, also disappointed, then returned to their respective kingdoms. The whole catastrophe of the defeat was due to the envious nature of Rukmiṇī’s elder brother Rukmī. Having seen his sister forcibly taken away by Kṛṣṇa after he had planned to marry her to Śiśupāla, Rukmī was frustrated. So after Śiśupāla, his friend and intended brother-in-law, returned home, Rukmī, very much agitated, was determined to teach Kṛṣṇa a lesson personally. He called for his own soldiers—a military phalanx consisting of several thousand elephants, horses, chariots and infantry—and equipped with this military strength, he began to follow Kṛṣṇa to Dvārakā. To show his prestige, Rukmī promised all the returning kings, “You could not help Śiśupāla marry my sister, Rukmiṇī, but I cannot allow Rukmiṇī to be taken away by Kṛṣṇa. I shall teach Him a lesson. Now I am going to follow Him.” He presented himself as a big commander and vowed before all the princes, “Unless I kill Kṛṣṇa in the fight and bring back my sister from His clutches, I shall not return to my capital city, Kuṇḍina. I make this vow before you all, and you will see that I shall fulfill it.” After thus vibrating all these boasting words, Rukmī immediately got on his chariot and told his chariot driver to pursue Kṛṣṇa. He said, “I want to fight with Him immediately. This cowherd boy has become proud of His tricky way of fighting with kṣatriyas, but today I shall teach Him a good lesson. Because He had the impudence to kidnap my sister, I, with my sharp arrows, shall teach Him very good lessons indeed.” Thus this unintelligent man, Rukmī, ignorant of the extent of the strength and activities of the Supreme Personality of Godhead, voiced his impudent threats. Lord Kṛṣṇa, after hearing all these crazy words from Rukmī, immediately shot an arrow and severed the string of Rukmī’s bow, making him unable to use another arrow. Rukmī immediately took another bow and shot another five arrows at Kṛṣṇa. Being attacked for the second time, Kṛṣṇa again severed Rukmī’s bowstring. Rukmī took a third bow, and Kṛṣṇa again cut its string. This time, to teach Rukmī a lesson, Kṛṣṇa shot six arrows at him and then shot another eight arrows, killing four horses with four arrows, killing the chariot driver with another arrow, and chopping off the upper portion of Rukmī’s chariot, including the flag, with the remaining three arrows. Rukmī, having run out of arrows, took assistance from swords, shields, tridents, lances and similar weapons used for fighting hand to hand, but Kṛṣṇa immediately broke them all in the same way. Being repeatedly baffled in his attempts, Rukmī took his sword and ran swiftly toward Kṛṣṇa, just as a fly proceeds toward a fire. But as soon as Rukmī reached Kṛṣṇa, Kṛṣṇa cut his weapon to pieces. This time Kṛṣṇa took out His sharp sword and was about to kill him immediately, but Rukmī’s sister, Rukmiṇī, understanding that this time Kṛṣṇa would not excuse her brother, fell down at Kṛṣṇa’s lotus feet and in a very grievous tone, trembling with great fear, began to plead with her husband. Rukmiṇī first addressed Kṛṣṇa as Yogeśvara. Yogeśvara means “one who is possessed of inconceivable opulence and energy.” Kṛṣṇa possesses inconceivable opulence and energy, whereas Rukmiṇī’s brother had only limited military potency. Kṛṣṇa is immeasurable, whereas her brother was measured in every step of his life. Therefore, Rukmī was not comparable even to an insignificant insect before the unlimited power of Kṛṣṇa. She also addressed Kṛṣṇa as the God of the gods. There are many powerful demigods, such as Lord Brahmā, Lord Śiva, Indra, Candra and Varuṇa, but Kṛṣṇa is the Lord of all these gods, whereas Rukmiṇī’s brother was not only an ordinary human being but in fact the lowest of all because he had no understanding of Kṛṣṇa. In other words, a human being who has no conception of the actual position of Kṛṣṇa is the lowest in human society. Then Rukmiṇī addressed Kṛṣṇa as Mahābhuja, which means “one with unlimited strength.” She also addressed Kṛṣṇa as Jagatpati, the master of the whole cosmic manifestation. In comparison, her brother was only an ordinary prince. In this way, Rukmiṇī compared the position of Rukmī with that of Kṛṣṇa and very feelingly pleaded with her husband not to kill her brother just at the auspicious time of her being united with Kṛṣṇa, but to excuse him. In other words, she displayed her real position as a woman. She was happy to get Kṛṣṇa as her husband at the moment when her marriage to another was to be performed, but she did not want it to be at the loss of her elder brother, who, after all, loved his young sister and wanted to hand her over to one who, according to his own calculations, was a better man. While Rukmiṇī was praying to Kṛṣṇa for the life of her brother, her whole body trembled, and because of her anxiety, her face appeared to dry up and her throat became choked, and due to her trembling, the ornaments on her body loosened and fell scattered on the ground. In this manner, when Rukmiṇī was very much perturbed, she fell down on the ground, and Lord Kṛṣṇa immediately became compassionate and agreed not to kill the foolish Rukmī. But, at the same time, He wanted to give him some light punishment, so He tied him up with a piece of cloth and snipped at his mustache, beard and hair, keeping some spots here and there. While Kṛṣṇa was dealing with Rukmī in this way, the soldiers of the Yadu dynasty, commanded by Balarāma Himself, broke the whole strength of Rukmī’s army just as an elephant in a pond discards the feeble stem of a lotus flower. In other words, as an elephant breaks the whole construction of a lotus flower while bathing in a reservoir of water, the military strength of the Yadus broke up Rukmī’s forces. After this, to pacify Rukmiṇī, Lord Balarāma said to her, “You should not be sorry that your brother has been made odd-looking. Everyone suffers or enjoys the results of his own actions.” Lord Balarāma wanted to impress upon Rukmiṇī that she should not be sorry for the consequences her brother suffered due to his actions. There was no need of being too affectionate toward such a brother. Balarāma again turned toward Rukmiṇī and informed her that the current duty of the kṣatriya in human society is so fixed that, according to the principles of fighting, one’s own brother may become an enemy. Then a kṣatriya does not hesitate to kill his own brother. In other words, Lord Balarāma wanted to instruct Rukmiṇī that Rukmī and Kṛṣṇa were right in not showing mercy to each other in the fighting, despite the family consideration that they happened to be brothers-in-law. Śrī Balarāma informed Rukmiṇī that kṣatriyas are typical emblems of the materialistic way of life; they become puffed up whenever there is a question of material acquisition. Therefore, when there is a fight between two belligerent kṣatriyas for kingdom, land, wealth, women, prestige or power, they try to put one another into the most abominable condition. Balarāma instructed Rukmiṇī that her affection toward her brother Rukmī, who had created enmity with so many persons, was a perverse consideration befitting an ordinary materialist. Her brother’s character was not at all admirable, considering his treatment of his friends, and yet Rukmiṇī, like an ordinary woman, was affectionate toward him. He was not fit to be her brother, and still Rukmiṇī was lenient toward him. The example of the sunshine and the material manifestation is very appropriate in understanding the living entity’s contact with the material world. In the morning the sun rises, and the heat and light gradually expand throughout the whole day. The sun is the cause of all material shapes and forms, for it is due to the sun that integration and disintegration of material elements take place. But as soon as the sun sets, the whole manifestation is no longer connected to the sun, which has passed from one place to another. When the sun passes from the eastern to the western hemisphere, the results of the interactions due to the sunshine in the eastern hemisphere remain, but the sunshine itself is visible in the western hemisphere. Similarly, the living entity accepts or produces different bodies and different bodily relationships in a particular circumstance, but as soon as he gives up the present body and accepts another, he has nothing to do with the former body. Similarly, the living entity has nothing to do with the next body he accepts. He is always free from the contact of this bodily contamination. “Therefore,” continued Balarāma, “the appearance and disappearance of the body have nothing to do with the living entity, just as the waxing and waning of the moon have nothing to do with the moon.” When the moon waxes we falsely think that the moon is developing, and when it wanes we think the moon is decreasing. Factually, the moon, as it is, is always the same; it has nothing to do with such visible activities of waxing and waning. After hearing such enlightening instructions from Śrī Balarāma, Rukmiṇī immediately became pacified and happy and adjusted her mind, which was very much afflicted by the degraded position of her brother Rukmī. As far as Rukmī was concerned, his promise was not fulfilled, nor was his mission successful. He had come from home with his soldiers and military phalanx to defeat Kṛṣṇa and release his sister, but on the contrary he lost all his soldiers and military strength. He was personally degraded and very sorry, but by the grace of the Lord he could continue his life to its fixed destination. Because he was a kṣatriya, he could remember his promise that he would not return to his capital city, Kuṇḍina, without killing Kṛṣṇa and releasing his sister, which he had failed to do; therefore, he decided in anger not to return to his capital city, and he constructed a small cottage in the village known as Bhojakaṭa, where he resided for the rest of his life. After defeating all the opposing elements and forcibly carrying away Rukmiṇī, Kṛṣṇa brought her to His capital city, Dvārakā, and then married her according to the Vedic ritualistic principles. After this marriage, Kṛṣṇa became the King of the Yadus at Dvārakā. On the occasion of His marriage with Rukmiṇī, all the inhabitants were happy, and in every house there were great ceremonies. The inhabitants of Dvārakā City were so much pleased that they dressed themselves with the nicest possible ornaments and garments and went to present gifts, according to their means, to the newly married couple, Kṛṣṇa and Rukmiṇī. All the houses of Yadupurī (Dvārakā) were decorated with flags, festoons and flowers. Each and every house had an extra gate specifically prepared for this occasion, and on both sides of the gate were big water jugs filled with water. The whole city was made fragrant by the burning of fine incense, and at night there was illumination from thousands of lamps, which decorated every building. The entire city appeared jubilant on the occasion of Lord Kṛṣṇa’s marriage with Rukmiṇī. Everywhere in the city there were profuse decorations of banana trees and betel-nut trees. These two trees are considered very auspicious in happy ceremonies. At the same time there was an assembly of many elephants, who carried the respective kings of different friendly kingdoms. It is the habit of the elephant that whenever he sees some small plants and trees, out of his sportive and frivolous nature he uproots the trees and throws them hither and thither. The elephants assembled on this occasion also scattered the banana and betel nut trees, but in spite of such intoxicated action, the whole city, with the trees thrown here and there, looked very nice. The friendly kings of the Kurus and the Pāṇḍavas were represented by Bhīṣma, Dhṛtarāṣṭra, the five Pāṇḍava brothers, King Drupada, King Santardana and Rukmiṇī’s father, Bhīṣmaka. Because of Kṛṣṇa’s kidnapping Rukmiṇī, there was initially some misunderstanding between the two families, but Bhīṣmaka, King of Vidarbha, being approached by Śrī Balarāma and persuaded by many saintly persons, was induced to participate in the marriage ceremony of Kṛṣṇa and Rukmiṇī. Although the incident of the kidnapping was not a very happy occurrence in the kingdom of Vidarbha, kidnapping was not an unusual affair among kṣatriyas. Kidnapping was, in fact, current in almost all their marriages. Anyway, King Bhīṣmaka was from the very beginning inclined to hand over his beautiful daughter to Kṛṣṇa. In one way or another his purpose had been served, and so he was pleased to join the marriage ceremony, even though his eldest son was degraded in the fight. It is mentioned in the Padma Purāṇa that Mahārāja Nanda and the cowherd boys of Vṛndāvana joined the marriage ceremony. Kings from the kingdoms of Kuru, Sṛñjaya, Kekaya, Vidarbha and Kunti all came to Dvārakā on this occasion and met with one another very joyfully. The story of Rukmiṇī’s being kidnapped by Kṛṣṇa was poeticized, and professional readers recited it everywhere. All the assembled kings and their daughters especially were struck with wonder and very much pleased upon hearing the chivalrous activities of Kṛṣṇa. In this way, all the visitors as well as the inhabitants of Dvārakā City were joyful to see Kṛṣṇa and Rukmiṇī together. In other words, the goddess of fortune was now united with the Supreme Lord, the maintainer of everyone, and thus all the people felt extremely jubilant.
Order online for delivery and takeout: 25. House Special Chow Mein from Chang Express - Greensboro. Serving the best Chinese in Greensboro, NC.
Remodeling Pictures Before And After - This is the latest information about Remodeling Pictures Before And After, this information can be your reference when you are confused to choose the right design for your home. Remodeling Pictures Before And After. Designing your own home will give your own satisfaction and pleasure, which you will not get by sharing other jobs in this world. If you intend to do so, designing your own home is not impossible. Interior, What To Give Her For Valentine Day was posted June on this site by Clevrhome.co. More over What To Give Her For Valentine Day has viewed by 46232 visitor. Interior, Fun Facts About The Presidents was posted June on this site by Clevrhome.co. More over Fun Facts About The Presidents has viewed by 7890 visitor. Interior, Tile Designs For Fireplaces was posted June on this site by Clevrhome.co. More over Tile Designs For Fireplaces has viewed by 28085 visitor. Interior, Tile Floor Designs For Entryways was posted June on this site by Clevrhome.co. More over Tile Floor Designs For Entryways has viewed by 61453 visitor. Interior, Interesting Facts About American History was posted June on this site by Clevrhome.co. More over Interesting Facts About American History has viewed by 45409 visitor. Interior, What Is The Best Beach In The World was posted June on this site by Clevrhome.co. More over What Is The Best Beach In The World has viewed by 9359 visitor. Interior, Art Deco Porch Light was posted June on this site by Clevrhome.co. More over Art Deco Porch Light has viewed by 13756 visitor. Interior, Painting With Multiple Colors was posted June on this site by Clevrhome.co. More over Painting With Multiple Colors has viewed by 71020 visitor. Interior, Christmas Gift Ideas For Home was posted June on this site by Clevrhome.co. More over Christmas Gift Ideas For Home has viewed by 22856 visitor. Interior, Cheapest Country To Visit In Europe was posted June on this site by Clevrhome.co. More over Cheapest Country To Visit In Europe has viewed by 54972 visitor. Interior, Sweet Valentines Day Quotes was posted June on this site by Clevrhome.co. More over Sweet Valentines Day Quotes has viewed by 95582 visitor. Interior, Bedford New York Real Estate was posted June on this site by Clevrhome.co. More over Bedford New York Real Estate has viewed by 4262 visitor. Interior, Make Your Own Flower Arrangement was posted June on this site by Clevrhome.co. More over Make Your Own Flower Arrangement has viewed by 89624 visitor. Interior, Club Med Adults Only Resorts was posted June on this site by Clevrhome.co. More over Club Med Adults Only Resorts has viewed by 80015 visitor. Interior, Dash And Albert Runner was posted June on this site by Clevrhome.co. More over Dash And Albert Runner has viewed by 71297 visitor. Interior, Most Expensive Hotel In Nyc was posted June on this site by Clevrhome.co. More over Most Expensive Hotel In Nyc has viewed by 22286 visitor. Interior, Buy House In Washington Dc was posted June on this site by Clevrhome.co. More over Buy House In Washington Dc has viewed by 46097 visitor. Interior, Floral Arrangements With Branches was posted June on this site by Clevrhome.co. More over Floral Arrangements With Branches has viewed by 59128 visitor. Interior, Books On Interior Design was posted June on this site by Clevrhome.co. More over Books On Interior Design has viewed by 94997 visitor. Interior, Modern Dining Room Lights was posted June on this site by Clevrhome.co. More over Modern Dining Room Lights has viewed by 97715 visitor. Interior, Prints For Home Decor was posted June on this site by Clevrhome.co. More over Prints For Home Decor has viewed by 34901 visitor. Interior, Townhouses For Sale In Manhattan Ny was posted June on this site by Clevrhome.co. More over Townhouses For Sale In Manhattan Ny has viewed by 87422 visitor. Interior, The Best City To Live In America was posted June on this site by Clevrhome.co. More over The Best City To Live In America has viewed by 43088 visitor. Interior, Top Five All Inclusive Resorts was posted June on this site by Clevrhome.co. More over Top Five All Inclusive Resorts has viewed by 56813 visitor. Interior, Best Online Valentines Gifts was posted June on this site by Clevrhome.co. More over Best Online Valentines Gifts has viewed by 64341 visitor. Interior, Best Budget Kitchen Cabinets was posted June on this site by Clevrhome.co. More over Best Budget Kitchen Cabinets has viewed by 5374 visitor. Interior, Best Show To See In New York was posted June on this site by Clevrhome.co. More over Best Show To See In New York has viewed by 39306 visitor.
/** * Send/Receive all serial commands to pco camera. Several functions called by * writeInt32, write Double etc. that send commands to camera. * Function that runs in own thread that keeps track of status on camera, reads * camera serial port to get cam status. All serial transactions here. * *@author Tim Madden *@date 2012 */ //#include "stdafx.h" #include <stdio.h> #include <math.h> #include <asynOctetSyncIO.h> #include <asynShellCommands.h> #include "ccd_exception.h" #include <epicsExport.h> #include "pco.h" // define if building for silicon softwarwe grabber. //#ifdef USE_SISW //#include "siswSerialPort.h" //#endif // define dimax image size to 1800 for certain modes #define _LIMITIMGSIZE // limit image size no less than 600 for edge, y size. //!!#define _LIMITIMGSIZE600 /** * Run on thread, monitor camera status over serial port. */ void pco::pcoTask() { char mesx[256]; lf.log("PCO Serial Thread started up"); while (true) { epicsThreadSleep(0.1); if (getIntParam(pco_is_running) > 0) { // release serial mutex in case some exception caused us not to release // properly... /// if we never owned it, then it just errors.. who cares. // releaseSerialMutex(); // releaseGrabberMutex(); setIntegerParam(pco_run_counter, getIntParam(pco_run_counter) + 1); callParamCallbacks(); if ((getIntParam(is_com_open) == 1) && (getIntParam(ADAcquire) == 1) && (time1.isElapsed((double)getIntParam(pco_check_time) / 1000.0))) { grabSerialMutex(); getPcoStatusParams(); releaseSerialMutex(); // dump memory stats on the driver... nd array use: sprintf(mesx, "cor_nd_datasize %d", getIntParam(cor_nd_datasize)); lf.log(mesx); sprintf(mesx, "cor_max_ndbuffers %d", getIntParam(cor_max_ndbuffers)); lf.log(mesx); sprintf(mesx, "cor_num_ndbuffers %d", getIntParam(cor_num_ndbuffers)); lf.log(mesx); sprintf(mesx, "cor_max_ndmemory %d", getIntParam(cor_max_ndmemory)); lf.log(mesx); sprintf(mesx, "cor_alloc_ndmemory %d", getIntParam(cor_alloc_ndmemory)); lf.log(mesx); sprintf(mesx, "cor_free_ndbuffers %d", getIntParam(cor_free_ndbuffers)); lf.log(mesx); sprintf(mesx, "cor_est_buffers_left %d", getIntParam(cor_est_buffers_left)); lf.log(mesx); sprintf(mesx, "total_missed_frames %d", getIntParam(total_missed_frames)); lf.log(mesx); sprintf(mesx, "recent_missed_frames %d", getIntParam(recent_missed_frames)); lf.log(mesx); sprintf(mesx, "cor_cant_get_ndarray %d", getIntParam(cor_cant_get_ndarray)); lf.log(mesx); time1.tic(); callParamCallbacks(); } if ((getIntParam(is_com_open) == 1) && (getIntParam(ADAcquire) == 0) && time2.isElapsed((double)getIntParam(pco_check_time2) / 1000.0)) { // lf.log("Checking all Params on Camera"); // we assume we have recursive mutex.. // epicmmutex is recursive according to docs grabSerialMutex(); // lf.log("pcotasx get mutex"); // epicsMutexShowAll(1,1); try { setIntegerParam(pco_force_check, 0); getPcoStatusParams(); getPcoGeneralParams(); getPcoSensorParams(); getPcoTimingParams(); getPcoStorageParams(); getPcoRecordingParams(); getPcoImageReadParams(); getPcoCameraLinkParams(); } catch (...) { lf.log("pco task threw exception..."); } releaseSerialMutex(); // lf.log("pcotasx get mutex"); // epicsMutexShowAll(1,1); time2.tic(); callParamCallbacks(); } if ((getIntParam(pco_dump_camera_memory) == 1) && (getIntParam(ADAcquire) == 0)) { grabSerialMutex(); dumpCameraMemory(); // setIntegerParam(ADAcquire,0); // doHighLevelParams(ADAcquire); releaseSerialMutex(); } // if dump mem } // if is rnning } // while true } /** * Deprecated. */ void pco::pcoTask2() {} /** * Read serial port until nothing in pipe. For clearing errors etc. * Deprecated function. * *@param fp Pointer to serial port, assuming it is opened w/ fopen. */ void pco::clearPipe(FILE *fp) { int ret; int counter = 0; ret = fgetc(fp); while (ret != EOF) { counter++; if (counter > 100) break; } } /** * Called by asyn writeInt32 and writeDouble, which pass the pasynuser and vales etc. to this function. * Because so many parameters, the param setting is split into many functions. * @param pasynUser The standard pasynUser pointer from asyn. * @param ivalue- param val if an int. * @param dvalue- param val if a double. * @param paramtype- enum for double or int. Deprecated and not used. */ int pco::updateParameters(asynUser *pasynUser, epicsInt32 ivalue, epicsFloat64 dvalue, int paramtype) { int err; int function = pasynUser->reason; // lf.log("PCO entering main function"); doSerialTransactions(function, ivalue, dvalue, paramtype); // if we got some excaption it is possuible we still own the serial mutex... // so we release. // if we never oened it, then it just errors... who cares. // releaseSerialMutex(); // releaseGrabberMutex(); setIntegerParam(pco_force_check, 1); callParamCallbacks(); // lf.log("PCOSerCam leaving main funtionc"); return (0); } /** * Main called by updateParams, and ultimately writeInt32, writeDouble. * also called by pcoTask periodically. * @param function- param num. * @param ivalue- param val if int. * @param dvalue= param val if double * @param paramtype- enum if doubl or int. not used I think. */ int pco::doSerialTransactions(int function, int ivalue, double dvalue, int paramtype) { char mesg[128]; int err; try { lf.enableLog(getIntParam(pco_is_log)); // setIntegerParam(pco_run_counter, getIntParam(pco_run_counter) + 1); // call back to client so it can do somehing like update params in EPICS // etc. // my_addriver->callback(general, this); if (function == open_com && ivalue == 1) { setIntegerParam(open_com, 0); lf.log("Attempt to open PCO Camera"); grabSerialMutex(); OpenCamera(); releaseSerialMutex(); setIntegerParam(pco_force_check, 1); } if (function == pco_comport_number) { char cpstr[32]; sprintf(cpstr, "COM%d", getIntParam(pco_comport_number)); setStringParam(com_port_name, cpstr); } if (function == close_com && getIntParam(close_com) == 1) { setIntegerParam(is_com_open, 0); setIntegerParam(close_com, 0); grabSerialMutex(); #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif releaseSerialMutex(); } if (function == pco_dbg_serwrite || function == pco_dbg_serread) { dbgSerial(); } if (function == pco_reconfig_grabber) { //!! need to actuallty reconfig here!!! setIntegerParam(pco_reconfig_grabber, 0); grabSerialMutex(); reconfigGrabber(); releaseSerialMutex(); } // setIntegerParam(size_x,getIntParam(ADSizeX)); // setIntegerParam(size_y,getIntParam(ADSizeY)); // setIntegerParam(frame_delay,getIntParam(ADAcquirePeriod)); if (getIntParam(is_com_open)) { int stacode; // function = function; // stacode=checkCameraMessages(); // while(stacode==0) // stacode=checkCameraMessages(); grabSerialMutex(); // lf.log("doSerialTransactions got mutex"); // epicsMutexShowAll(1,1); try { setPcoBaudrate(function); doHighLevelParams(function); setPcoGeneralParams(function); setPcoSensorParams(function); setPcoTimingParams(function); // setPcoStorageParams(); deletes memory--- let us do this when we acq. setPcoRecordingParams(function); setPcoImageReadParams(function); setPcoCameraLinkParams(function); } catch (...) { lf.log("doSeriaTrans threw exception"); } releaseSerialMutex(); // lf.log("doSerialTransactions release mutex"); // epicsMutexShowAll(1,1); //!! put this into a task // setPcoBaudrate(); // if ( //(getIntParam(ADAcquire)==0) && // ((getIntParam(pco_force_check)==1) //|| // (time2.isElapsed((double)getIntParam(pco_check_time2)/1000.0)))) if (((getIntParam(ADAcquire) == 0) && (getIntParam(pco_force_check) == 1)) || function == pco_force_check) { // lf.log("Checking all Params on Camera"); setIntegerParam(pco_force_check, 0); grabSerialMutex(); // lf.log("doSerialTransactions get mutex"); // epicsMutexShowAll(1,1); try { getPcoGeneralParams(); getPcoSensorParams(); getPcoTimingParams(); getPcoStorageParams(); getPcoRecordingParams(); getPcoImageReadParams(); getPcoCameraLinkParams(); time2.tic(); } catch (...) { lf.log("doSeriaTrans threw exception"); } releaseSerialMutex(); // lf.log("doSerialTransactions rel mutex"); // epicsMutexShowAll(1,1); } } else setIntegerParam(ADStatus, ADStatusError); } // try catch (ccd_exception err) { lf.log(err.err_mess()); setIntegerParam(ADStatus, ADStatusError); } // catch return (0); } // main /** * Reconfig grabber on the pco serial thread. It must grab the grabber mutex from the * grabber thread before messing w./ grabber. we assume we already have the * serial port mutex. Yes- there are 2 mutexes. Serial port and grabber. */ void pco::reconfigGrabber(void) { setIntegerParam(pco_reconfig_grabber, 0); // make sure acquire is OFF. setIntegerParam(ADAcquire, 0); doHighLevelParams(ADAcquire); setIntegerParam(ADStatus, ADStatusWaiting); // my_addriver->callback(general, this); lf.log("Setting up Grabber"); // grabSerialMutex(); #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif // releaseSerialMutex(); setIntegerParam(is_com_open, 0); if (getIntParam(pco_which_camera) == pco_edge) { // setStringParam(ccf_filename,"D:/corecofiles/P_Edge_5120_2160_.ccf"); setIntegerParam(is_force_img_size, 1); setIntegerParam(is_mult_width2, 1); if (getIntParam(pco_edge_fastscan) == 2) setIntegerParam(is_mult_width2, 2); } else { // setStringParam(ccf_filename,"D:/corecofiles/dimax2k2k.ccf"); setIntegerParam(is_force_img_size, 1); setIntegerParam(is_mult_width2, 0); } //!! need to load ccf here setIntegerParam(is_loadccf, 1); // we will grab BOTH serial and grabber mutex grabberSetup(is_loadccf); setIntegerParam(is_grab, 1); grabberSetup(is_grab); setIntegerParam(ADStatus, ADStatusIdle); // my_addriver->callback(general, this); // setIntegerParam(open_com,1); lf.log("Attempt to open PCO Camera"); // grabSerialMutex(); OpenCamera(); //!! must open here setIntegerParam(pco_reset_memory, 1); //!! must do here setIntegerParam(pco_force_check, 1); //!! must do here setIntegerParam(ADStatus, ADStatusIdle); } /** * Debugging function- Deprecated. */ void pco::dbgSerial(void) { char serstr[256]; char textstr[512]; char *msg; int k, m; char bytestr[16]; int len; grabSerialMutex(); if (getIntParam(pco_dbg_serwrite) > 0) { for (k = 0; k < 512; k++) textstr[k] = 0; msg = getStringParam(pco_dbg_serstr); len = strlen(msg); // format is 00ffef23a2, all hex nibbles- take byte at a time and comvert to // real bivnary codes m = 0; for (k = 0; k < len; k = k + 2) { bytestr[0] = msg[k]; bytestr[1] = msg[k + 1]; bytestr[2] = 0; sscanf(bytestr, "%x", &serstr[m]); m++; } for (k = 0; k < getIntParam(pco_dbg_serwrite); k++) { printf("%02x", serstr[k]); } printf("\n"); #ifndef USEASYNSERIAL serial_port->write((unsigned char *)serstr, getIntParam(pco_dbg_serwrite)); #else pasynOctetSyncIO->write(pasynUserSerial, (const char *)serstr, getIntParam(pco_dbg_serwrite), 0, &mynwrite); #endif } else if (getIntParam(pco_dbg_serread) > 0) { for (k = 0; k < 256; k++) serstr[k] = 0; for (k = 0; k < 512; k++) textstr[k] = 0; #ifndef USEASYNSERIAL // serial_port->read((unsigned char*)serstr,getIntParam(pco_dbg_serread)); #else pasynOctetSyncIO->read(pasynUserSerial, (char *)serstr, getIntParam(pco_dbg_serread), 0, &mynread, &myeomreason); #endif m = 0; for (k = 0; k < getIntParam(pco_dbg_serread); k++) { sprintf(bytestr, "%02x", serstr[k]); textstr[m] = bytestr[0]; textstr[m + 1] = bytestr[1]; m = m + 2; } printf("%s\n", textstr); // setStringParam(pco_dbg_serstr,textstr); } setIntegerParam(pco_dbg_serwrite, 0); setIntegerParam(pco_dbg_serread, 0); releaseSerialMutex(); } /** * Send pco command, and recv. serial command from serial port. * @param cmd- command to pco. * @param rsp- response to pco. It is filled in by this funciton. * @param obj- any raw binary data returned * @param len- len of raw binary data. */ int pco::doSerialCommand(pco_command &cmd, pco_response &rsp, unsigned char *obj, int len) { unsigned short code; unsigned short length; unsigned char code_hi; unsigned char code_lo; char mesgx[128]; bool is_print = false; unsigned char *xptr; int k; // grabSerialMutex(); try { // Sleep(250); code = cmd.getCode(); // code_lo = (unsigned char)(code&255); // code_hi = (unsigned char)((code&(255*256)) / 256); length = cmd.getLen(); if (getIntParam(pco_dbg_serprint) == code) is_print = true; // send the command #ifndef USEASYNSERIAL serial_port->write((unsigned char *)&code, sizeof(unsigned short)); #else pasynOctetSyncIO->write(pasynUserSerial, (const char *)&code, sizeof(unsigned short), 0, &mynwrite); #endif if (is_print) printf("Write: %04x", code); if (getIntParam(pco_ser_waitms) > 0) epicsThreadSleep((double)(getIntParam(pco_ser_waitms)) / 1000.0); // send all the data in the command... // need length -2 because getData has no codehi and codelo, but length includes // it... #ifndef USEASYNSERIAL serial_port->write(cmd.getData(), length - 2); #else pasynOctetSyncIO->write(pasynUserSerial, (const char *)cmd.getData(), length - 2, 0, &mynwrite); #endif if (is_print) { xptr = cmd.getData(); for (k = 0; k < length - 2; k++) { printf("%02x", *(xptr + k)); } printf("\n\n"); } #ifndef USEASYNSERIAL serial_port->flush(); #else pasynOctetSyncIO->flush(pasynUserSerial); #endif // wait for the camera to do something... // Sleep(250); #ifndef USEASYNSERIAL serial_port->read((unsigned char *)&code, sizeof(unsigned short)); #else pasynOctetSyncIO->read(pasynUserSerial, (char *)&code, sizeof(unsigned short), 0, &mynread, &myeomreason); #endif if (is_print) printf("read: %04x", code); // code=((unsigned short)code_hi)*256 + (unsigned short)code_lo; rsp.setCode(code); #ifndef USEASYNSERIAL serial_port->read((unsigned char *)&length, sizeof(unsigned short)); #else pasynOctetSyncIO->read(pasynUserSerial, (char *)&length, sizeof(unsigned short), 0, &mynread, &myeomreason); #endif rsp.setLength(length); // first word of data is the length, which is already read in... // lenth-4 to not count code and length word. // getData2 to give pointer AFTER length word. if (is_print) printf("%04x", length); if (length > 256) { sprintf(mesgx, "Length Too Long:\n Command: %x Response: %x Rsp Length: %d\n", cmd.getCode(), rsp.getCode(), length); lf.log(mesgx); lf.log("Close/OPen port"); #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif // because openCamera grabs serial mutex, we release it here so we dont // grab twite // releaseSerialMutex(); OpenCamera(); // grabSerialMutex(); com_error_counter++; if (com_error_counter > getIntParam(pco_com_err_max)) { #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif setIntegerParam(is_com_open, 0); throw ccd_exception("Lost Link to Camera"); } // releaseSerialMutex(); return (1); } else { #ifndef USEASYNSERIAL serial_port->read(rsp.getData2(), length - 4); #else pasynOctetSyncIO->read(pasynUserSerial, (char *)rsp.getData2(), length - 4, 0, &mynread, &myeomreason); #endif if (is_print) { xptr = rsp.getData2(); for (k = 0; k < length - 4; k++) { printf("%02x", *(xptr + k)); } printf("\n\n"); } } if (rsp.verifyCheckSum()) { ReportError(cmd.getCode(), "CheckSum/Com Error, Clear pipe"); #ifndef USEASYNSERIAL serial_port->clearPipe(); #else asynSetOption(myServerPort, 0, "clearPipe", "yes"); #endif // lf.log("Wait 1s Timeout"); // Sleep(1000); com_error_counter++; if (com_error_counter > getIntParam(pco_com_err_max)) { #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif setIntegerParam(is_com_open, 0); throw ccd_exception("Lost Link to Camera"); } // releaseSerialMutex(); return (1); } if (rsp.getCode() == rsp.getErrCode()) { ReportError(rsp.getCode(), "PCO Returned Error Code "); sprintf(mesgx, "Command: %x Response: %x Error: %x\n", cmd.getCode(), rsp.getCode(), rsp.getULong(2)); lf.log(mesgx); com_error_counter = 0; // releaseSerialMutex(); return (2); } else if (rsp.getCode() != rsp.getExpCode()) { ReportError(rsp.getCode(), "PCO Returned Unknown Error Code "); lf.log("Close Open port"); #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif OpenCamera(); com_error_counter++; if (com_error_counter > getIntParam(pco_com_err_max)) { #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif setIntegerParam(is_com_open, 0); throw ccd_exception("Lost Link to Camera"); } // releaseSerialMutex(); return (3); } else { com_error_counter = 0; if (obj > 0) { rsp.copy2Obj(obj, len); } } com_error_counter = 0; // releaseSerialMutex(); return (0); } catch (ccd_exception err) { lf.log(err.err_mess()); } catch (...) { lf.log("Serial Port threw exceptiuon"); } // releaseSerialMutex(); return (8); } /** * See if there are any messages pending from camera. * */ int pco::checkCameraMessages(void) { pco_response rsp; unsigned short code; unsigned short length; unsigned char code_hi; unsigned char code_lo; char mesgx[128]; try { #ifndef USEASYNSERIAL serial_port->read((unsigned char *)&code, sizeof(unsigned short)); #else pasynOctetSyncIO->read(pasynUserSerial, (char *)&code, sizeof(unsigned short), 0, &mynread, &myeomreason); #endif } catch (...) { return (6); } // code=((unsigned short)code_hi)*256 + (unsigned short)code_lo; rsp.setCode(code); #ifndef USEASYNSERIAL serial_port->read((unsigned char *)&length, sizeof(unsigned short)); #else pasynOctetSyncIO->read(pasynUserSerial, (char *)&length, sizeof(unsigned short), 0, &mynread, &myeomreason); #endif rsp.setLength(length); // first word of data is the length, which is already read in... // lenth-4 to not count code and length word. // getData2 to give pointer AFTER length word. if (length > 256) { sprintf(mesgx, "checkCameraMessages: Length Too Long:\n Response: %x Rsp Length: " "%d\n", rsp.getCode(), length); lf.log(mesgx); #ifndef USEASYNSERIAL serial_port->clearPipe(); #else asynSetOption(myServerPort, 0, "clearpipe", "yes"); #endif return (1); } else { #ifndef USEASYNSERIAL serial_port->read(rsp.getData2(), length - 4); #else pasynOctetSyncIO->read(pasynUserSerial, (char *)rsp.getData2(), length - 4, 0, &mynread, &myeomreason); #endif } lf.log("Got Cam Stat message"); rsp.sprintHeader(mesgx); lf.log(mesgx); if (rsp.verifyCheckSum()) { ReportError(rsp.getCode(), "checkCameraMessages: CheckSum/Com Error"); return (1); } return (0); } /** * Deprecated. */ int pco::getlib(void) { return FALSE; } /** * report error from camera. Prob. deprecated. * * @param code returned code from pco camera * @param usrmsg C string for a user defined error message. */ int pco::ReportError(int code, char *usrmsg) { char mesgx[256]; char errx[128]; // PCO_GetErrorText(code, errx, 127); // sprintf(mesgx,"Disconnected: %s %d %s\n",usrmsg,code,errx); sprintf(mesgx, "ReportError: %s %d \n", usrmsg, code); lf.log(mesgx); return (0); } /** * Close serial port. ** @param code Not used * @param usrmsg Not used */ int pco::Disconnected(int code, char *usrmsg) { ReportError(code, usrmsg); lf.log("Closing Serial Port"); #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif return (0); } /** * Open serial port to camera, set up serial port. */ int pco::OpenCamera(void) { pco_command cmd; pco_response rsp; // grabSerialMutex(); #ifndef USEASYNSERIAL serial_port->setPortName(getStringParam(com_port_name)); serial_port->open(getIntParam(pco_baudrate), 0, 8, 0); #else asynSetOption(myServerPort, 0, "name", getStringParam(com_port_name)); char msg[64]; sprintf(msg, "%d", getIntParam(pco_baudrate)); asynSetOption(myServerPort, 0, "baud", msg); asynSetOption(myServerPort, 0, "parity", "none"); asynSetOption(myServerPort, 0, "bits", "8"); asynSetOption(myServerPort, 0, "stop", "0"); asynSetOption(myServerPort, 0, "open", "open"); #endif setIntegerParam(is_com_open, 1); // releaseSerialMutex(); return 0; } /** * Get function from writeInt32, which param. Read that param from camera. * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. The param defined in fucntion will be * set from camera settings, or sent to camera settings on hardware ,depending on * if the functino is named ReadParams, or WriteParams. * @param function -asyn parameter number. */ int pco::setPcoImageReadParams(int function) { pco_command cmd; pco_response rsp; if (function == pco_play_slow || function == pco_play_stop || function == pco_setallparams) { // setIntegerParam(pco_play_slow,0); lf.log("Play images"); // Read Images from Segment (Recorder Mode only) cmd.setCode(0x0B15); cmd.addUShort(getIntParam(pco_read_which_seg)); cmd.addUShort(1); if (getIntParam(pco_play_slow) == 1) cmd.addUShort(3); // mode else if (getIntParam(pco_play_stop) == 1) cmd.addUShort(0); // mode else { cmd.addUShort(0); // mode lf.log("ERROR"); } cmd.addUShort(1); // speed cmd.addULong(getIntParam(pco_read_st_img)); cmd.addULong(getIntParam(pco_read_end_img)); cmd.addULong(getIntParam(pco_read_st_img)); rsp.setExpCode(0x0B95); rsp.setErrCode(0x0BD5); setIntegerParam(pco_play_stop, 0); setIntegerParam(pco_play_slow, 0); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { lf.log("Play Started"); } else { lf.log("Could not start play"); } } if (function == pco_do_read_imgs || function == pco_setallparams) { setIntegerParam(pco_do_read_imgs, 0); // Read Images from Segment (Recorder Mode only) cmd.setCode(0x0515); cmd.addUShort(getIntParam(pco_read_which_seg)); cmd.addULong(getIntParam(pco_read_st_img)); cmd.addULong(getIntParam(pco_read_end_img)); rsp.setExpCode(0x0595); rsp.setErrCode(0x05D5); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_read_which_seg, rsp.getUShort(2)); setIntegerParam(pco_read_st_img, rsp.getULong(4)); setIntegerParam(pco_read_end_img, rsp.getULong(8)); // notify IOC to update the PVs to reflect in epics DB // my_addriver->callback(general, this); } } // Request Image if (function == pco_req_img || function == pco_setallparams) { setIntegerParam(pco_req_img, 0); cmd.setCode(0x0615); rsp.setExpCode(0x0695); rsp.setErrCode(0x06D5); doSerialCommand(cmd, rsp, 0, 0); } // Reeat Image if (function == pco_rpt_img || function == pco_setallparams) { setIntegerParam(pco_rpt_img, 0); cmd.setCode(0x0815); cmd.addShort(0); cmd.addShort(0); cmd.addShort(0); rsp.setExpCode(0x0895); rsp.setErrCode(0x08D5); doSerialCommand(cmd, rsp, 0, 0); } //!! image dump must be on a task so we can cancel it // Cancel Image Transfer if (function == pco_cancel_img || function == pco_setallparams) { setIntegerParam(pco_cancel_img, 0); cmd.setCode(0x0715); cmd.addShort(0); rsp.setExpCode(0x0795); rsp.setErrCode(0x07D5); doSerialCommand(cmd, rsp, 0, 0); } // Set Bit Alignment if (function == pco_bit_alignment || function == pco_setallparams) { cmd.setCode(0x0A15); cmd.addShort(getIntParam(pco_bit_alignment)); rsp.setExpCode(0x0A95); rsp.setErrCode(0x0AD5); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_bit_alignment, rsp.getUShort(2)); // my_addriver->callback(general, this); } } return (0); } /** * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. If functino is called get, we read * serial port from camera and set a param. If function called set, we read a param * from asyn param list and send its value to the camera. */ int pco::getPcoStatusParams(void) { unsigned short val1; char msgx[256]; unsigned long lval1; pco_command cmd; pco_response rsp; double prd_sec; // Get Number Of Images in Segment 0 if (getIntParam(pco_which_camera) == pco_dimax) { cmd.setCode(0x0215); cmd.addUShort(1); rsp.setExpCode(0x0295); rsp.setErrCode(0x02D5); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_num_imgs_seg0, rsp.getULong(4)); setIntegerParam(pco_max_imgs_seg0, rsp.getULong(8)); } } // Get Recording Status cmd.setCode(0x0514); rsp.setExpCode(0x0594); rsp.setErrCode(0x05D4); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_rec_status, rsp.getUShort(2)); if (getIntParam(pco_rec_status) == 0) { // if is_allow_kill_acquire is true, then recording was started, and now // its done. // if is_allow_kill_acquire is false, then there was no recording, so // leave ADAcquire alone in case // someone just set it to 1, requestig a new recording. this aviods race // condition. if (is_allow_kill_acquire && getIntParam(pco_which_camera) == pco_dimax) { setIntegerParam(ADAcquire, 0); doHighLevelParams(ADAcquire); is_allow_kill_acquire = false; lf.log("sensed Recording OFF, so shut Acquire"); } } else { setIntegerParam(ADStatus, ADStatusAcquire); // case where ACquire is 0 but cam is recording if (getIntParam(ADAcquire) == 0) { lf.log("Acqiure OFF, but Recording ON, so stop Camera"); doHighLevelParams(ADAcquire); is_allow_kill_acquire = false; } } } // Get Camera Busy status cmd.setCode(0x0612); rsp.setErrCode(0x06D2); rsp.setExpCode(0x0692); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_busy, rsp.getUShort(2)); } getPcoTimingParams(); // Get Camera Health Status cmd.setCode(0x0210); rsp.setErrCode(0x02D0); rsp.setExpCode(0x0290); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { lval1 = rsp.getULong(2); setIntegerParam(pco_health_warning, lval1); if (lval1 != 0) { sprintf(msgx, "Warning from PCO: %d\n", lval1); lf.log(msgx); setIntegerParam(ADStatus, ADStatusError); } lval1 = rsp.getULong(6); setIntegerParam(pco_health_error, lval1); if (lval1 != 0) { sprintf(msgx, "Error from PCO: %d\n", lval1); lf.log(msgx); setIntegerParam(ADStatus, ADStatusError); } lval1 = rsp.getULong(10); setIntegerParam(pco_health_status, lval1); } #if 0 //!! this is completely messed up!!! //get frame fate from camera if (getIntParam(pco_rec_status)==1) { cmd.setCode(0x1012); cmd.addUShort(1); rsp.setExpCode(0x1092); rsp.setErrCode(0x10D2); if (doSerialCommand(cmd,rsp,0,0)==0) { prd_sec = (double)(rsp.getULong(2)); prd_sec += (double)(rsp.getULong(6)) * 1e-9; if (prd_sec>0.0) setDoubleParam(pco_frame_rate,1.0/prd_sec); } } else { setDoubleParam(pco_frame_rate,0.0); } #endif // notify IOC to update the PVs to reflect in epics DB // my_addriver->callback(general, this); // clear changes to prevent constant update return (0); } /** * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. If functino is called get, we read * serial port from camera and set a param. If function called set, we read a param * from asyn param list and send its value to the camera. */ int pco::getPcoImageReadParams(void) { unsigned short val1; char msgx[256]; unsigned long lval1; pco_command cmd; pco_response rsp; int k; if (getIntParam(pco_which_camera) != pco_dimax) return (0); for (k = 1; k <= 4; k++) { // Get Segment Image Settings cmd.setCode(0x0115); cmd.addUShort(k); // number of segment 0 to 3? rsp.setExpCode(0x0195); rsp.setErrCode(0x01D5); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { sprintf(msgx, "Seg 0x%x ResHV %d,%d BinXY (%d , %d) ROIXY0 (%d,%d) ROI1XY " "(%d,%d) \n", rsp.getUShort(2), rsp.getUShort(4), rsp.getUShort(6), rsp.getUShort(8), rsp.getUShort(10), rsp.getUShort(12), rsp.getUShort(14), rsp.getUShort(16), rsp.getUShort(18)); // lf.log(msgx); } else { lf.log("Seg Settings Read Error"); } } // Get Number Of Images in Segment 0 cmd.setCode(0x0215); cmd.addUShort(1); rsp.setExpCode(0x0295); rsp.setErrCode(0x02D5); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_num_imgs_seg0, rsp.getULong(4)); setIntegerParam(pco_max_imgs_seg0, rsp.getULong(8)); // Get Number Of Images in Segment 1 cmd.setCode(0x0215); cmd.addUShort(2); rsp.setExpCode(0x0295); rsp.setErrCode(0x02D5); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_num_imgs_seg1, rsp.getULong(4)); setIntegerParam(pco_max_imgs_seg1, rsp.getULong(8)); // Get Number Of Images in Segment 2 cmd.setCode(0x0215); cmd.addUShort(3); rsp.setExpCode(0x0295); rsp.setErrCode(0x02D5); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_num_imgs_seg2, rsp.getULong(4)); setIntegerParam(pco_max_imgs_seg2, rsp.getULong(8)); // Get Number Of Images in Segment 3 cmd.setCode(0x0215); cmd.addUShort(4); rsp.setExpCode(0x0295); rsp.setErrCode(0x02D5); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_num_imgs_seg3, rsp.getULong(4)); setIntegerParam(pco_max_imgs_seg3, rsp.getULong(8)); // which seg? ret num valid images and num max images // Get Bit Alignment cmd.setCode(0x0915); rsp.setExpCode(0x0995); rsp.setErrCode(0x09D5); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_bit_alignment, rsp.getUShort(2)); // notify IOC to update the PVs to reflect in epics DB // my_addriver->callback(general, this); // clear changes to prevent constant update return (0); } /** * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. If functino is called get, we read * serial port from camera and set a param. If function called set, we read a param * from asyn param list and send its value to the camera. */ int pco::getPcoCameraLinkParams(void) { unsigned short val1; char msgx[256]; unsigned long lval1; pco_command cmd; pco_response rsp; // Get Number Of Images in Segment 0 cmd.setCode(0x3416); rsp.setExpCode(0x3496); rsp.setErrCode(0x34D6); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_camlink_pixfreq, rsp.getULong(2)); setIntegerParam(pco_cclines, rsp.getUChar(6)); setIntegerParam(pco_camlink_pixperclk, rsp.getUChar(7)); setIntegerParam(pco_camlink_cont, rsp.getUChar(8)); // notify IOC to update the PVs to reflect in epics DB // my_addriver->callback(general, this); return (0); } /** * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. If functino is called get, we read * serial port from camera and set a param. If function called set, we read a param * from asyn param list and send its value to the camera. * @param function - asyn Parameter number from writeInt32. */ int pco::setPcoCameraLinkParams(int function) { unsigned short val1; char msgx[256]; unsigned long lval1; pco_command cmd; pco_response rsp; // Get Number Of Images in Segment 0 if (function == pco_camlink_pixfreq || function == pco_cclines || function == pco_camlink_pixperclk || function == pco_camlink_cont || function == pco_setallparams) { cmd.setCode(0x3516); cmd.addULong((unsigned long)getIntParam(pco_camlink_pixfreq)); cmd.addUChar((unsigned char)getIntParam(pco_cclines)); cmd.addUChar((unsigned char)getIntParam(pco_camlink_pixperclk)); cmd.addUChar((unsigned char)getIntParam(pco_camlink_cont)); rsp.setExpCode(0x3596); rsp.setErrCode(0x35D6); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_camlink_pixfreq, rsp.getULong(2)); setIntegerParam(pco_cclines, rsp.getUChar(6)); setIntegerParam(pco_camlink_pixperclk, rsp.getUChar(7)); setIntegerParam(pco_camlink_cont, rsp.getUChar(8)); // my_addriver->callback(general, this); } } return (0); } /** * Set pco baud rate. * @param function asyn param number, should be pco_baudrate or pco_setallparams */ int pco::setPcoBaudrate(int function) { unsigned short val1; char msgx[256]; unsigned long lval1; pco_command cmd; pco_response rsp; if (getIntParam(is_com_open) == 0) { return (1); } // Get Number Of Images in Segment 0 if (function == pco_baudrate || function == pco_setallparams) { lf.log("Testing baud at 9600"); #ifndef USEASYNSERIAL serial_port->close(); serial_port->open(9600, 0, 8, 0); #else asynSetOption(myServerPort, 0, "open", "close"); asynSetOption(myServerPort, 0, "baud", "9600"); asynSetOption(myServerPort, 0, "parity", "none"); asynSetOption(myServerPort, 0, "bits", "8"); asynSetOption(myServerPort, 0, "stop", "0"); asynSetOption(myServerPort, 0, "open", "open"); #endif // lf.log("getting baudrate to see of we are on comm"); cmd.setCode(0x3216); rsp.setExpCode(0x3296); rsp.setErrCode(0x32D6); com_error_counter = 0; if (doSerialCommand(cmd, rsp, 0, 0) == 0) { lf.log("Baudrate Successful at 9600"); } else { lf.log("No commat 9600, try 115200"); #ifndef USEASYNSERIAL serial_port->close(); serial_port->open(115200, 0, 8, 0); #else asynSetOption(myServerPort, 0, "open", "close"); asynSetOption(myServerPort, 0, "baud", "115200"); asynSetOption(myServerPort, 0, "parity", "none"); asynSetOption(myServerPort, 0, "bits", "8"); asynSetOption(myServerPort, 0, "stop", "0"); asynSetOption(myServerPort, 0, "open", "open"); #endif com_error_counter = 0; lf.log("getting baudrate to see of we are on comm"); cmd.setCode(0x3216); rsp.setExpCode(0x3296); rsp.setErrCode(0x32D6); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { lf.log("Can comm at 115200. "); } else { lf.log("Something wrong- cannot comm at 115200 either. restart camera"); } } cmd.setCode(0x3316); cmd.addULong((unsigned long)getIntParam(pco_baudrate)); rsp.setExpCode(0x3396); rsp.setErrCode(0x33D6); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { lf.log("Baudrate change OK"); // setIntegerParam(pco_baudrate,rsp.getULong(2)); // my_addriver->callback(general, this); // lf.log("close Ser port"); #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif setIntegerParam(is_com_open, 0); epicsThreadSleep(1.0); lf.log("Open Serial port, new baudrate"); #ifndef USEASYNSERIAL serial_port->open(getIntParam(pco_baudrate), 0, 8, 0); #else char msg[64]; sprintf(msg, "%d", getIntParam(pco_baudrate)); asynSetOption(myServerPort, 0, "baud", msg); asynSetOption(myServerPort, 0, "parity", "none"); asynSetOption(myServerPort, 0, "bits", "8"); asynSetOption(myServerPort, 0, "stop", "0"); asynSetOption(myServerPort, 0, "open", "open"); #endif setIntegerParam(is_com_open, 1); lf.log("Get baudrate"); epicsThreadSleep(0.500); cmd.setCode(0x3216); rsp.setExpCode(0x3296); rsp.setErrCode(0x32D6); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { lf.log("Baudrate Successful"); setIntegerParam(pco_baudrate, rsp.getULong(2)); // my_addriver->callback(general, this); } else { lf.log("Baudrate Failed"); setIntegerParam(pco_baudrate, 9600); // my_addriver->callback(general, this); lf.log("close Ser port"); #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif setIntegerParam(is_com_open, 0); throw ccd_exception("Baudrate error"); } } else { lf.log("Baudrate change error."); setIntegerParam(pco_baudrate, 9600); // my_addriver->callback(general, this); lf.log("close Ser port"); #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif setIntegerParam(is_com_open, 0); throw ccd_exception("Baudrate error"); } } return (0); } /** * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. If functino is called get, we read * serial port from camera and set a param. If function called set, we read a param * from asyn param list and send its value to the camera. * @param function- param number from writeInt32. */ int pco::setPcoRecordingParams(int function) { pco_command cmd; pco_response rsp; // Set pco_arm_camera if (function == pco_arm_camera || function == pco_setallparams) { lf.log("Arm Camera"); cmd.setCode(0x0A14); rsp.setExpCode(0x0A94); rsp.setErrCode(0x0AD4); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { lf.log("Camera Armed"); setIntegerParam(ADStatus, ADStatusIdle); } else { lf.log("ERROR: Could not Arm Camera"); setIntegerParam(ADStatus, ADStatusError); } } // Set Recording State if (function == pco_rec_status || function == pco_setallparams) { cmd.setCode(0x0614); cmd.addUShort(getIntParam(pco_rec_status)); rsp.setExpCode(0x0694); rsp.setErrCode(0x06D4); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_rec_status, rsp.getUShort(2)); // my_addriver->callback(general, this); if (getIntParam(pco_rec_status) == 1) { lf.log("Started Recording"); setIntegerParam(ADStatus, ADStatusAcquire); } else { lf.log("Stopped Recording"); setIntegerParam(ADStatus, ADStatusIdle); } } else { lf.log("ERROR: Could not set recording"); setIntegerParam(ADStatus, ADStatusError); } // my_addriver->callback(general, this); } // // All commands below are for dimax only // if (getIntParam(pco_which_camera) != pco_dimax) { return (0); } // Set Storage Mode (Recorder / FIFO buffer) if (function == pco_storage_mode || function == pco_setallparams) { cmd.setCode(0x0214); cmd.addUShort(getIntParam(pco_storage_mode)); rsp.setExpCode(0x0294); rsp.setErrCode(0x02D4); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_storage_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set Recorder Submode (Sequence / Ring buffer) if (function == pco_rec_submode || function == pco_setallparams) { cmd.setCode(0x0414); cmd.addUShort(getIntParam(pco_rec_submode)); rsp.setExpCode(0x0494); rsp.setErrCode(0x04D4); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_rec_submode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } if (getIntParam(pco_rec_status)) setIntegerParam(ADStatus, ADStatusAcquire); else { setIntegerParam(ADStatus, ADStatusIdle); } // Set Acquire mode (Auto / External) if (function == pco_acq_mode || function == pco_setallparams) { cmd.setCode(0x0814); cmd.addUShort(getIntParam(pco_acq_mode)); rsp.setExpCode(0x0894); rsp.setErrCode(0x08D4); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_acq_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } //!! set date time... // Set timestamp mode if (function == pco_timestamp_mode || function == pco_setallparams) { cmd.setCode(0x0D14); cmd.addUShort(getIntParam(pco_timestamp_mode)); rsp.setExpCode(0x0D94); rsp.setErrCode(0x0DD4); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_timestamp_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set Record Stop Event if (function == (pco_rec_stop_event_mode) || function == (pco_rec_stop_event_nimgs) || function == pco_setallparams) { cmd.setCode(0x0F14); cmd.addUShort(getIntParam(pco_rec_stop_event_mode)); cmd.addULong(getIntParam(pco_rec_stop_event_nimgs)); rsp.setExpCode(0x0F94); rsp.setErrCode(0x0FD4); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_rec_stop_event_mode, rsp.getUShort(2)); setIntegerParam(pco_rec_stop_event_nimgs, rsp.getULong(4)); // my_addriver->callback(general, this); } } // Stop Record if (function == (pco_stop_record) || function == pco_setallparams) { cmd.setCode(0x1014); cmd.addUShort(0); cmd.addULong(0); rsp.setExpCode(0x1094); rsp.setErrCode(0x10D4); doSerialCommand(cmd, rsp, 0, 0); } return (0); } /** * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. If functino is called get, we read * serial port from camera and set a param. If function called set, we read a param * from asyn param list and send its value to the camera. */ int pco::getPcoRecordingParams(void) { unsigned short val1; char msgx[256]; unsigned long lval1; pco_command cmd; pco_response rsp; // Get Storage Mode (Recorder / FIFO buffer) cmd.setCode(0x0114); rsp.setExpCode(0x0194); rsp.setErrCode(0x01D4); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_storage_mode, rsp.getUShort(2)); // Get Recorder Submode (Sequence / Ring buffer) cmd.setCode(0x0314); rsp.setExpCode(0x0394); rsp.setErrCode(0x03D4); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_rec_submode, rsp.getUShort(2)); // Get Recording Status cmd.setCode(0x0514); rsp.setExpCode(0x0594); rsp.setErrCode(0x05D4); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_rec_status, rsp.getUShort(2)); // GetAcquire mode (Auto / External) cmd.setCode(0x0714); rsp.setExpCode(0x0794); rsp.setErrCode(0x07D4); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_acq_mode, rsp.getUShort(2)); // Get <acq enbl> Signal Status cmd.setCode(0x0914); rsp.setExpCode(0x0994); rsp.setErrCode(0x09D4); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_acqen_sig_stat, rsp.getUShort(2)); // Get Timestamp Mode cmd.setCode(0x0C14); rsp.setExpCode(0x0C94); rsp.setErrCode(0x0CD4); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_timestamp_mode, rsp.getUShort(2)); if (getIntParam(pco_which_camera) != pco_edge) { // Get Record Stop Event cmd.setCode(0x0E14); rsp.setExpCode(0x0E94); rsp.setErrCode(0x0ED4); doSerialCommand(cmd, rsp, 0, 0); } //!! // notify IOC to update the PVs to reflect in epics DB // my_addriver->callback(general, this); // clear changes to prevent constant update return (0); } /** * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. If functino is called get, we read * serial port from camera and set a param. If function called set, we read a param * from asyn param list and send its value to the camera. * @param function- param number from writeInt32. */ int pco::setPcoStorageParams(int function) { pco_command cmd; pco_response rsp; if (getIntParam(pco_which_camera) != pco_dimax) { return (0); } // Set Camera RAM Segment Size if (function == (pco_camera_seg_size0) || function == (pco_camera_seg_size1) || function == (pco_camera_seg_size2) || function == (pco_camera_seg_size3) || function == pco_setallparams) { cmd.setCode(0x0313); cmd.addULong(getIntParam(pco_camera_seg_size0)); cmd.addULong(getIntParam(pco_camera_seg_size1)); cmd.addULong(getIntParam(pco_camera_seg_size2)); cmd.addULong(getIntParam(pco_camera_seg_size3)); rsp.setExpCode(0x0393); rsp.setErrCode(0x03D3); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { lf.log("Successfully set seg size"); setIntegerParam(pco_camera_seg_size0, rsp.getULong(2)); setIntegerParam(pco_camera_seg_size1, rsp.getULong(6)); setIntegerParam(pco_camera_seg_size2, rsp.getULong(10)); setIntegerParam(pco_camera_seg_size3, rsp.getULong(14)); // my_addriver->callback(general, this); } else { lf.log("Error setting seg mem size- serial port- try again"); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { lf.log("Successfully set seg size"); setIntegerParam(pco_camera_seg_size0, rsp.getULong(2)); setIntegerParam(pco_camera_seg_size1, rsp.getULong(6)); setIntegerParam(pco_camera_seg_size2, rsp.getULong(10)); setIntegerParam(pco_camera_seg_size3, rsp.getULong(14)); // my_addriver->callback(general, this); } else { lf.log("Failed 2nd time- setting seg size"); } } } // Clear RAM Segment if (function == (pco_clear_ram_seg) || function == pco_setallparams) { cmd.setCode(0x0413); rsp.setExpCode(0x0493); rsp.setErrCode(0x04D3); doSerialCommand(cmd, rsp, 0, 0); } // Set Active RAM Segment if (function == (pco_active_seg) || function == pco_setallparams) { cmd.setCode(0x0613); cmd.addUShort(getIntParam(pco_active_seg)); rsp.setExpCode(0x0693); rsp.setErrCode(0x06D3); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_active_seg, rsp.getUShort(2)); // my_addriver->callback(general, this); } } return (0); } /** * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. If functino is called get, we read * serial port from camera and set a param. If function called set, we read a param * from asyn param list and send its value to the camera. */ int pco::getPcoStorageParams(void) { unsigned short val1; char msgx[256]; unsigned long lval1; pco_command cmd; pco_response rsp; if (getIntParam(pco_which_camera) != pco_dimax) { return (0); } // Get Camera RAM size cmd.setCode(0x0113); rsp.setErrCode(0x01D3); rsp.setExpCode(0x0193); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_camera_ram_page_size, rsp.getUShort(6)); setIntegerParam(pco_camera_ram_npages, rsp.getULong(2)); // setIntegerParam( // pco_camera_tot_ram_size, // getIntParam(pco_camera_ram_page_size) * //getIntParam(pco_camera_ram_npages)); // Get Camera RAM Segment Size cmd.setCode(0x0213); rsp.setErrCode(0x02D3); rsp.setExpCode(0x0293); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_camera_seg_size0, rsp.getULong(2)); setIntegerParam(pco_camera_seg_size1, rsp.getULong(6)); setIntegerParam(pco_camera_seg_size2, rsp.getULong(10)); setIntegerParam(pco_camera_seg_size3, rsp.getULong(14)); // Clear RAM Segment // cmd.setCode(0x0413); // rsp.setErrCode(0x0493); // rsp.setExpCode(0x04D3); // doSerialCommand(cmd,rsp,0,0); // Get Active RAM Segment cmd.setCode(0x0513); rsp.setErrCode(0x05D3); rsp.setExpCode(0x0593); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_active_seg, rsp.getUShort(2)); // notify IOC to update the PVs to reflect in epics DB // my_addriver->callback(general, this); // clear changes to prevent constant update return (0); } /** * PCO settings are defined in PCO docs. Because so many, we group them as * categories folling the pco docs. If functino is called get, we read * serial port from camera and set a param. If function called set, we read a param * from asyn param list and send its value to the camera. * @param function- param number from writeInt32. */ int pco::setPcoTimingParams(int function) { pco_command cmd; pco_response rsp; // Set Timebase if (function == (pco_exp_timebase) || function == (pco_dly_timebase) || function == pco_setallparams) { unsigned short id, ie; cmd.setCode(0x0D12); cmd.addUShort(getIntParam(pco_dly_timebase)); cmd.addUShort(getIntParam(pco_exp_timebase)); rsp.setExpCode(0x0D92); rsp.setErrCode(0x0DD2); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_dly_timebase, rsp.getUShort(2)); setIntegerParam(pco_exp_timebase, rsp.getUShort(4)); // my_addriver->callback(general, this); } } // // set exptime delay time if ((getIntParam(pco_is_frame_rate_mode) == 0) && (function == (pco_delay_time) || function == (ADAcquireTime) || function == pco_setallparams) ) { unsigned long ex, dl; double exb, dlb; char mxxx[80]; sprintf(mxxx, "EXPDLYMODE Set DlyTime %f ExpTime%f \n", getDoubleParam(pco_delay_time), getDoubleParam(ADAcquireTime)); lf.log(mxxx); sprintf(mxxx, "Min DlyTime %d ns MaxDkytime %d ms\n", pco_desc.dwMinDelayDESC, pco_desc.dwMaxDelayDESC); lf.log(mxxx); sprintf(mxxx, "Min Exptime %d ns Exptime %d ms\n", pco_desc.dwMinExposureDESC, pco_desc.dwMaxExposureDESC); lf.log(mxxx); if (getIntParam(pco_exp_timebase) == 2) exb = 1000.0; else if (getIntParam(pco_exp_timebase) == 1) exb = 1000000.0; else exb = 1000000000.0; if (getIntParam(pco_dly_timebase) == 2) dlb = 1000.0; else if (getIntParam(pco_dly_timebase) == 1) dlb = 1000000.0; else dlb = 1000000000.0; ex = (unsigned long)floor(getDoubleParam(ADAcquireTime) * exb); dl = (unsigned long)floor(getDoubleParam(pco_delay_time) * dlb); cmd.setCode(0x0212); cmd.addULong(dl); cmd.addULong(ex); rsp.setExpCode(0x0292); rsp.setErrCode(0x02D2); printf("SND ex %d dl %d dlb %f exb %f", ex, dl, dlb, exb); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { dl = rsp.getULong(2); ex = rsp.getULong(6); printf("RCV ex %d dl %d dlb %f exb %f", ex, dl, dlb, exb); setDoubleParam(ADAcquireTime, ((double)ex) / exb); setDoubleParam(pco_delay_time, ((double)dl) / dlb); // my_addriver->callback(general, this); } setIntegerParam(pco_arm_camera, 1); setPcoRecordingParams(function); getPcoStatusParams(); sprintf(mxxx, "Actual DlyTime %f ExpTime%f \n", getDoubleParam(pco_delay_time), getDoubleParam(ADAcquireTime)); lf.log(mxxx); } // set exptime delay time if ((getIntParam(pco_is_frame_rate_mode) == 1) && (function == (pco_set_frame_rate) || function == (ADAcquirePeriod) || function == (ADAcquireTime) || function == pco_setallparams)) { unsigned long ex, dl; double exb, dlb; char mxxx[80]; if (function == (ADAcquirePeriod)) { sprintf(mxxx, "FRMODE Set AcPrd %f ExpTime%f \n", getDoubleParam(ADAcquirePeriod), getDoubleParam(ADAcquireTime)); lf.log(mxxx); if (getDoubleParam(ADAcquirePeriod) > 0.0) setDoubleParam(pco_set_frame_rate, 1.0 / getDoubleParam(ADAcquirePeriod)); } else { sprintf(mxxx, "FRMODE Set FrRate %f ExpTime%f \n", getDoubleParam(pco_set_frame_rate), getDoubleParam(ADAcquireTime)); lf.log(mxxx); } sprintf(mxxx, "Min DlyTime %d ns MaxDkytime %d ms\n", pco_desc.dwMinDelayDESC, pco_desc.dwMaxDelayDESC); lf.log(mxxx); sprintf(mxxx, "Min Exptime %d ns Exptime %d ms\n", pco_desc.dwMinExposureDESC, pco_desc.dwMaxExposureDESC); lf.log(mxxx); // convert to ns ex = (unsigned long)floor(getDoubleParam(ADAcquireTime) * 1e9); // covert to mHz dl = (unsigned long)floor(getDoubleParam(pco_set_frame_rate) * 1e3); // if (getIntParam(pco_cdi_mode)==1) //{ // dl=dl*2; // } cmd.setCode(0x1812); cmd.addUShort(1); // trim exp time cmd.addULong(dl); // frame rate cmd.addULong(ex); // ex time rsp.setExpCode(0x1892); rsp.setErrCode(0x18D2); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { dl = rsp.getULong(4); ex = rsp.getULong(8); setDoubleParam(ADAcquireTime, ((double)ex) / 1e9); setDoubleParam(pco_set_frame_rate, ((double)dl) / 1000.0); if (getDoubleParam(pco_set_frame_rate) > 0.0) { setDoubleParam(ADAcquirePeriod, 1.0 / getDoubleParam(pco_set_frame_rate)); } // my_addriver->callback(general, this); } // arm the camera setIntegerParam(pco_arm_camera, 1); setPcoRecordingParams(pco_arm_camera); getPcoStatusParams(); sprintf(mxxx, "Actual Frate %f ExpTime%f \n", getDoubleParam(pco_set_frame_rate), getDoubleParam(ADAcquireTime)); lf.log(mxxx); } // Set FPS Exposure Mode if (function == (pco_fps_mode) || function == pco_setallparams) { cmd.setCode(0x1412); cmd.addUShort(getIntParam(pco_fps_mode)); rsp.setExpCode(0x1492); rsp.setErrCode(0x14D2); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_fps_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } if (function == (pco_trigger_mode) || function == pco_setallparams) { cmd.setCode(0x0412); cmd.addUShort(getIntParam(pco_trigger_mode)); rsp.setExpCode(0x0492); rsp.setErrCode(0x04D2); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_trigger_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } if (function == (pco_force_trigger) || function == pco_setallparams) { lf.log("Force Trigger"); cmd.setCode(0x0512); rsp.setExpCode(0x0592); rsp.setErrCode(0x05D2); doSerialCommand(cmd, rsp, 0, 0); } return (0); } /** * High level parameters are things like ADAcquire. The idea of a high level param is that * when set, it will set many low level params in the camera. To Acquire for example, about 5 * low level settins in the camera must be tweaked. * @param function from writeInt32, the parm numb. */ int pco::doHighLevelParams(int function) { int edx, k; stopWatch timex; double tx; char stxx[128]; pco_response rsp; pco_command cmd; if (function == (pco_edge_fastscan) || function == pco_setallparams) { if (getIntParam(pco_edge_fastscan) == 2) { // setIntegerParam(pco_sensor_format,1); // set pixclock to 286000000Hz setIntegerParam(pco_pixelrate, 286000000); // turn on lookup table if (getIntParam(pco_global_shutter) == 0) setIntegerParam(pco_1612_lookup, 5650); else setIntegerParam(pco_1612_lookup, 0); // set clink to 12but lut setIntegerParam(pco_camlink_pixperclk, 7); setIntegerParam(pco_camlink_cont, 3); setDoubleParam(pco_set_frame_rate, 20.0); // tells image grab to conv 12but format to 16bit if rolling shut if (getIntParam(pco_global_shutter) == 0) setIntegerParam(pco_conv_12to16, 1); else setIntegerParam(pco_conv_12to16, 0); // to set up grabber for 12 bit compressed mode... mut xsize by 1.5 setIntegerParam(is_mult_width2, 2); } else if (getIntParam(pco_edge_fastscan) == 1) { // setIntegerParam(pco_sensor_format,0); #ifdef _LIMITIMGSIZE setIntegerParam(ADSizeX, 1800); setIntegerParam(ADSizeY, 1800); #endif // set pixclock to 286000000Hz setIntegerParam(pco_pixelrate, 286000000); // turn on lookup table setIntegerParam(pco_1612_lookup, 0); // set clink to 12but lut if (getIntParam(pco_global_shutter) == 0) setIntegerParam(pco_camlink_pixperclk, 5); else setIntegerParam(pco_camlink_pixperclk, 7); setIntegerParam(pco_conv_12to16, 0); setIntegerParam(pco_camlink_cont, 3); // to set up grabber for 12 bit compressed mode... mut xsize by 1.5 setIntegerParam(is_mult_width2, 1); //!! setDoubleParam(pco_set_frame_rate,20.0); } else { setIntegerParam(ADSizeX, 2560); setIntegerParam(ADSizeY, 2160); // setIntegerParam(pco_sensor_format,0); // set pixclock to 95333333Hz setIntegerParam(pco_pixelrate, 95333333); // turn off looup table. setIntegerParam(pco_1612_lookup, 0); // set clink to 16bit // setIntegerParam(pco_camlink_pixperclk,5); if (getIntParam(pco_global_shutter) == 0) setIntegerParam(pco_camlink_pixperclk, 5); else setIntegerParam(pco_camlink_pixperclk, 7); setIntegerParam(pco_camlink_cont, 3); // to set up grabber for 12 bit compressed mode... mut xsize by 1.5 setIntegerParam(is_mult_width2, 1); setIntegerParam(pco_conv_12to16, 0); setDoubleParam(pco_set_frame_rate, 1.0); } setPcoSensorParams(pco_setallparams); setPcoTimingParams(pco_setallparams); setPcoCameraLinkParams(pco_setallparams); reconfigGrabber(); } if ((getIntParam(pco_which_camera) == pco_dimax) && (function == (pco_live_view) || function == pco_setallparams)) { setIntegerParam(pco_camlink_cont, getIntParam(pco_live_view)); if (getIntParam(pco_live_view)) { setIntegerParam(pco_rec_submode, 1); // setIntegerParam(ADNumImages,100000); } else { setIntegerParam(pco_rec_submode, 0); } setPcoCameraLinkParams(pco_setallparams); setPcoRecordingParams(pco_setallparams); } // arm and record/run if (function == (ADAcquire)) { if (getIntParam(ADAcquire) == 1) { // set up memory before new acq if (is_reset_memory) { resetDimaxMemory(); is_reset_memory = false; } setIntegerParam(is_grab, 1); grabberSetup(is_grab); setIntegerParam(ADNumImagesCounter, 0); lf.log("Arm and Run"); setIntegerParam(pco_arm_camera, 1); setPcoRecordingParams(pco_arm_camera); // Sleep(100); setIntegerParam(pco_rec_status, 1); // here we are getting 2 mutexes--- we want to make sure grabber loop is // not doing somtehing important.. // sio wegrab is nutex setPcoRecordingParams(pco_rec_status); // getPcoRecordingParams(); // Sleep(100); // once we start recording- allow driver to turn off ADAcquire when // recording is done. // this prevents threading race condition problem where getstatus params // from camera always tirns off ADACquire // once every vew seconds, that may happen same time as user hits // ADAcquire. // for dimax- we acquire into RAM. then the camera stops recording. // we wnat to turn off ADACquire when camera stops recording, when mem is // full // for dimax only is_allow_kill_acquire = true; setIntegerParam(pco_ready2acquire, 1); } if (getIntParam(ADAcquire) == 0) { lf.log("Stop Run"); setIntegerParam(pco_rec_status, 0); // setIntegerParam(is_abort,1); // grabberSetup(is_abort); setIntegerParam(is_grab, 0); grabberSetup(is_grab); // we get grabber mutex to make sure it is not doing anything in grabber // loop. setPcoRecordingParams(pco_rec_status); if (getIntParam(pco_dump_counter) < 1) setIntegerParam(pco_dump_counter, 1); else if (getIntParam(pco_dump_counter) > getIntParam(pco_num_imgs_seg0)) setIntegerParam(pco_dump_counter, getIntParam(pco_num_imgs_seg0)); if (getIntParam(pco_imgs2dump) > getIntParam(pco_num_imgs_seg0)) setIntegerParam(pco_imgs2dump, getIntParam(pco_num_imgs_seg0)); else if (getIntParam(pco_imgs2dump) < 1) setIntegerParam(pco_imgs2dump, getIntParam(pco_num_imgs_seg0)); } } if (function == (pco_reset_memory) || function == (ADNumImages) || function == pco_setallparams) { lf.log("req reset Memory- will reset on ACQ"); // resetDimaxMemory(); is_reset_memory = true; is_reset_dump_counters = true; setIntegerParam(pco_imgs2dump, getIntParam(ADNumImages)); setIntegerParam(pco_dump_counter, 0); } if (function == (pco_dump_maxdatarate) || function == pco_setallparams) { setIntegerParam(pco_favor_dlytime, 0); } if (function == (pco_dump_waitms) || function == pco_setallparams) { setIntegerParam(pco_favor_dlytime, 1); } // if ((getIntParam(pco_dump_camera_memory)==1) && //(getIntParam(ADAcquire)==0)) // { // dumpCameraMemory(); // }//if dump mem setIntegerParam(ADStatus, ADStatusIdle); return (0); } /** * Read out all images from dimax RAM over CL grabber. We must run on a thread, the seriao port thread, * which is separate from the asynDriver thread on which writeInt32 runs. This function sends commmand via * serial port to camera to get ONE image. Then it waits for image to show uip on grabber. then it does *again and again in a loop until all iamges read out. It must be on separate thread so the writeInt32 does * not block for minutes. */ void pco::dumpCameraMemory(void) { int edx, k; stopWatch timex; double tx; char stxx[128]; pco_response rsp; pco_command cmd; int waitms; int last_val; int max_data_rate; float max_fps; float min_frame_period; int waitcounter; int start_cnt; int dumpcntsave; setIntegerParam(pco_cancel_dump, 0); // in bytes/sec.param is in kB/sec // max_data_rate = 1024*getIntParam(pco_dump_maxdatarate); // sprintf(stxx,"MaxDataRate in Bytes %d\n",max_data_rate); // lf.log(stxx); // max_fps=((float)max_data_rate) // /((float)(getIntParam(ADSizeX)*getIntParam(ADSizeY)*2)); // if (max_fps>0.0) // min_frame_period=1.0/max_fps; // make sure wait time is as long as min frame poeriod. or else we lose frames // 1000 to concert sec to ms. // setIntegerParam(pco_dump_waitms, (int)(min_frame_period*1000.0)); // sprintf(stxx,"Max FPS %f Min Frame Period %f\n",max_fps,min_frame_period); // lf.log(stxx); setIntegerParam(is_grab, 1); grabberSetup(is_grab); // waitms = getIntParam(pco_dump_waitms); setIntegerParam(ADStatus, ADStatusReadout); setIntegerParam(pco_camlink_cont, 1); setPcoCameraLinkParams(pco_setallparams); lf.log("To dump Memory"); lf.log("Getting Read info from camera"); getPcoImageReadParams(); // Read Images from Segment (Recorder Mode only) setIntegerParam(total_missed_frames, 0); setIntegerParam(pco_double_image_error, 0); if (getIntParam(pco_dump_counter) < 1) setIntegerParam(pco_dump_counter, 1); else if (getIntParam(pco_dump_counter) > getIntParam(pco_num_imgs_seg0)) setIntegerParam(pco_dump_counter, getIntParam(pco_num_imgs_seg0)); if (getIntParam(pco_imgs2dump) > getIntParam(pco_num_imgs_seg0)) setIntegerParam(pco_imgs2dump, getIntParam(pco_num_imgs_seg0)); else if (getIntParam(pco_imgs2dump) < 1) setIntegerParam(pco_imgs2dump, getIntParam(pco_num_imgs_seg0)); edx = getIntParam(pco_imgs2dump); callParamCallbacks(); setIntegerParam(pco_array_counter, getIntParam(pco_dump_counter)); if (getIntParam(pco_imgs2dump) > getIntParam(pco_num_imgs_seg0)) setIntegerParam(pco_imgs2dump, getIntParam(pco_num_imgs_seg0)); else if (getIntParam(pco_imgs2dump) < 1) setIntegerParam(pco_imgs2dump, getIntParam(pco_num_imgs_seg0)); edx = getIntParam(pco_imgs2dump); callParamCallbacks(); setIntegerParam(pco_array_counter, getIntParam(pco_dump_counter)); // timex.tic(); dumpcntsave = getIntParam(pco_dump_counter); waitcounter = 0; // we will grab images on THIS tgread. The grabber thread will block and do // nothing. grabGrabberMutex(); // read one image at a time. for (k = getIntParam(pco_dump_counter); (k <= edx) && (is_cancel_dump == false); k++) { // this is current counter that says how many images from beginning of time // have vbeen grabbed. we use it to see if a frame came into the grabber. last_val = getIntParam(pco_array_counter); // tell camera to send frame k. // checks to see if pcoarray counter increments... it wont, because we // killed the // grabber thread... waitcounter = 0; while (dumpOneFrame(k) != 0 && waitcounter < 10 && is_cancel_dump == false) { // if we got in here we had serial port error, so try again. // wait for 1ms... just for fun... we DUID have an error... epicsThreadSleep(0.001); waitcounter++; } if (waitcounter > 8) { lf.log("Too many serial port errors...cannot dump memory"); break; // exit for loop } waitcounter = 0; // this has to run ONCE- bacause pro array counter will not increment until // grabber gets a frame // because we stopped the grabber thread, no frame is ther. // so we call oneLoopImage at least once. while (last_val == getIntParam(pco_array_counter) && waitcounter < 200 && is_cancel_dump == false) { // run the grabber code once to get the frame // it MAY not get frame if it did not arrive from camera yet. so we have // to check. oneLoopImage(); // if the image never came, we sleep and try again. if (last_val == getIntParam(pco_array_counter)) epicsThreadSleep(getIntParam(cor_sleep_ms) / 1000.0); waitcounter++; // we weill tend to cancel if we get stuck in this loop... // check for cancellation. } if (waitcounter > 198) { lf.log("Could not dump memory- "); setIntegerParam(total_missed_frames, 1000); k = 100000000; // forces break from the for... } // if // oupdate epics dump counter pv every 16 shots setIntegerParam(pco_dump_counter, k); callParamCallbacks(); } // for releaseGrabberMutex(); lf.log("Finished Dump"); setIntegerParam(pco_cancel_dump, 0); is_cancel_dump = false; setIntegerParam(ADStatus, ADStatusIdle); setIntegerParam(pco_camlink_cont, 0); setIntegerParam(pco_dump_counter, dumpcntsave); setPcoCameraLinkParams(pco_setallparams); setIntegerParam(pco_dump_camera_memory, 0); setIntegerParam(is_grab, 0); grabberSetup(is_grab); callParamCallbacks(); } // if dump mem /** * Get ONE frame from dimax RAM. Just send the serial message to pco dimax to send next frame. * @param k which frame number to return. */ int pco::dumpOneFrame(int k) { pco_response rsp; pco_command cmd; cmd.setCode(0x0515); cmd.addUShort(1); cmd.addULong(k); cmd.addULong(k); rsp.setExpCode(0x0595); rsp.setErrCode(0x05D5); if (doSerialCommand(cmd, rsp, 0, 0) != 0) { // com error // see if frame made it // wait and timeout at 1s //!! need to do eqv of waitDone(1000); return (-1); } // if do serial return (0); } /** * Reset Dimax memory to default settings, erasing all frames and segment sizes. * * */ void pco::resetDimaxMemory(void) { double npixels; double pagepixels; double npages_img; int req_pages; lf.log("Resetting memory- deleting images on camera"); setIntegerParam(pco_reset_memory, 0); getPcoSensorParams(); getPcoStorageParams(); // calc needed memory for one image. // num pixels npixels = (double)(getIntParam(ADSizeX) * getIntParam(ADSizeY)); pagepixels = (double)(getIntParam(pco_camera_ram_page_size)); npages_img = npixels / pagepixels; // in manual- we need room for 3 images if we want to store 1. so I add 3. double nimgsfudge = ((double)getIntParam(pco_dimax_nimgs_fudge) + (double)getIntParam(ADNumImages)); if (nimgsfudge < 3.0) nimgsfudge = 3.0; req_pages = (int)ceil(npages_img * nimgsfudge); if (getIntParam(pco_cdi_mode)) req_pages = req_pages * 2; if (req_pages > getIntParam(pco_camera_ram_npages)) { lf.log("Req too many images for RAM, use Max Ram"); req_pages = getIntParam(pco_camera_ram_npages); } lf.log("Set Seg0 to RAm based on #Images PV"); // setIntegerParam(pco_camera_seg_size0,getIntParam(pco_camera_ram_npages)); setIntegerParam(pco_camera_seg_size0, req_pages); setIntegerParam(pco_camera_seg_size1, 0); setIntegerParam(pco_camera_seg_size2, 0); setIntegerParam(pco_camera_seg_size3, 0); // run 5 times bacause it keeps not working... it pass thru once it works. setPcoStorageParams(pco_setallparams); // setPcoStorageParams(); // setPcoStorageParams(); // setPcoStorageParams(); // setPcoStorageParams(); lf.log("Set seg0 active"); setIntegerParam(pco_active_seg, 1); setPcoStorageParams(pco_active_seg); lf.log("Clear Seg memory"); setIntegerParam(pco_clear_ram_seg, 1); setPcoStorageParams(pco_clear_ram_seg); if (is_reset_dump_counters) { // getPcoStatusParams(); setIntegerParam(pco_dump_counter, 1); setIntegerParam(pco_imgs2dump, getIntParam(ADNumImages)); is_reset_dump_counters = false; } } /** * Read PCO image timing params from camera. set asyn params appropriately. * * */ int pco::getPcoTimingParams(void) { unsigned short val1; char msgx[256]; unsigned long lval1; double etb, dtb; pco_command cmd; pco_response rsp; etb = 1e-3; dtb = 1e-3; // Get Timebase cmd.setCode(0x0C12); rsp.setErrCode(0x0CD2); rsp.setExpCode(0x0C92); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { // 0 1 2= ns, us. ms setIntegerParam(pco_exp_timebase, rsp.getUShort(4)); setIntegerParam(pco_dly_timebase, rsp.getUShort(2)); etb = 1e-9; if (getIntParam(pco_exp_timebase) == 1) etb = 1e-6; if (getIntParam(pco_exp_timebase) == 2) etb = 1e-3; dtb = 1e-9; if (getIntParam(pco_dly_timebase) == 1) dtb = 1e-6; if (getIntParam(pco_dly_timebase) == 2) dtb = 1e-3; } if (getIntParam(pco_is_frame_rate_mode) == 0) { // Get Delay / Exposure Time cmd.setCode(0x0112); rsp.setErrCode(0x01D2); rsp.setExpCode(0x0192); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setDoubleParam(ADAcquireTime, etb * (double)(rsp.getULong(6))); setDoubleParam(pco_delay_time, dtb * (double)(rsp.getULong(2))); } } else { // Get fraerate / Exposure Time cmd.setCode(0x1712); rsp.setErrCode(0x17D2); rsp.setExpCode(0x1792); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setDoubleParam(ADAcquireTime, (1e-9) * (double)(rsp.getULong(8))); setDoubleParam(pco_set_frame_rate, (1e-3) * (double)(rsp.getULong(4))); if (getDoubleParam(pco_set_frame_rate) > 0.0) { setDoubleParam(ADAcquirePeriod, 1.0 / getDoubleParam(pco_set_frame_rate)); } } } // Get delay / exposure time table // cmd.setCode(0x0A12); // rsp.setErrCode(0x0AD2); // rsp.setExpCode(0x0A92); // doSerialCommand(cmd,rsp,0,0); if (getIntParam(pco_which_camera) == pco_other) { // Get FPS Exposure Mode cmd.setCode(0x1312); rsp.setErrCode(0x13D2); rsp.setExpCode(0x1392); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_fps_mode, rsp.getUShort(2)); if (getIntParam(pco_fps_mode) == 1) { setDoubleParam(ADAcquireTime, 10e-9 * (double)(rsp.getULong(4))); } } } // Get Trigger Mode cmd.setCode(0x0312); rsp.setErrCode(0x03D2); rsp.setExpCode(0x0392); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { switch (rsp.getUShort(2)) { case 0: setIntegerParam(ADTriggerMode, 2); // auto break; case 1: setIntegerParam(ADTriggerMode, ADTriggerInternal); // int break; case 2: setIntegerParam(ADTriggerMode, ADTriggerExternal); // ext break; case 3: setIntegerParam(ADTriggerMode, 3); // gate break; default: setIntegerParam(ADTriggerMode, ADTriggerInternal); // auto } } // Get Camera Busy status cmd.setCode(0x0612); rsp.setErrCode(0x06D2); rsp.setExpCode(0x0692); if (doSerialCommand(cmd, rsp, 0, 0) == 0) setIntegerParam(pco_busy, rsp.getUShort(2)); if (getIntParam(pco_which_camera) == pco_other) { // Get Power Down Mode cmd.setCode(0x0E12); rsp.setErrCode(0x0ED2); rsp.setExpCode(0x0E92); doSerialCommand(cmd, rsp, 0, 0); // Get User Power Down Time cmd.setCode(0x0712); rsp.setErrCode(0x07D2); rsp.setExpCode(0x0792); doSerialCommand(cmd, rsp, 0, 0); } // Get Get <exp trig> Signal Status cmd.setCode(0x0912); rsp.setErrCode(0x09D2); rsp.setExpCode(0x0992); if (doSerialCommand(cmd, rsp, 0, 0) == 0) setIntegerParam(pco_exp_trig_stat, rsp.getUShort(2)); // notify IOC to update the PVs to reflect in epics DB return (0); } /** * Get pco general settings, as defined in pco docs. * set asyn params accordingly. * */ int pco::getPcoGeneralParams(void) { unsigned short val1; char msgx[256]; unsigned long lval1; pco_command cmd; pco_response rsp; // Get Camera Type cmd.setCode(0x0110); rsp.setErrCode(0x01D0); rsp.setExpCode(0x0190); setIntegerParam(pco_which_camera, pco_other); doSerialCommand(cmd, rsp, 0, 0); setStringParam(ADManufacturer, "PCO-Cooke"); setStringParam(ADManufacturer, "PCO-Cooke"); val1 = rsp.getUShort(2); if ((val1 & 0xff00) == 0x0100) setStringParam(ADModel, "PCO 1200 Camera"); if ((val1 & 0xff00) == 0x0200) setStringParam(ADModel, "PCO 13k-4k Camera"); if ((val1 & 0xff00) == 0x0800) setStringParam(ADModel, "PCO 13k14k Camera"); if ((val1 & 0xff00) == 0x0900) setStringParam(ADModel, "PCO Pixelfly Camera"); if ((val1 & 0xff00) == 0x1000) { setStringParam(ADModel, "PCO Dimax Camera"); setIntegerParam(pco_which_camera, pco_dimax); setIntegerParam(cor_check_timestamps, 0); setIntegerParam(pco_descramble, 0); setIntegerParam(is_mult_width2, 0); setIntegerParam(is_force_img_size, 1); setIntegerParam(cor_use_image_mode, 0); } if ((val1 & 0xff00) == 0x1200) setStringParam(ADModel, "PCO Sensicam Camera"); if ((val1 & 0xff00) == 0x1300) { setStringParam(ADModel, "PCO Edge Camera"); setIntegerParam(pco_which_camera, pco_edge); setIntegerParam(cor_check_timestamps, 1); setIntegerParam(pco_descramble, 1); setIntegerParam(is_mult_width2, 1); if (getIntParam(pco_edge_fastscan) == 2) setIntegerParam(is_mult_width2, 2); setIntegerParam(is_force_img_size, 1); setIntegerParam(cor_use_image_mode, 1); } // Get Camera Health Status cmd.setCode(0x0210); rsp.setErrCode(0x02D0); rsp.setExpCode(0x0290); doSerialCommand(cmd, rsp, 0, 0); lval1 = rsp.getULong(2); setIntegerParam(pco_health_warning, lval1); if (lval1 != 0) { sprintf(msgx, "Warning from PCO: %d\n", lval1); lf.log(msgx); setIntegerParam(ADStatus, ADStatusError); } lval1 = rsp.getULong(6); setIntegerParam(pco_health_error, lval1); if (lval1 != 0) { sprintf(msgx, "Error from PCO: %d\n", lval1); lf.log(msgx); setIntegerParam(ADStatus, ADStatusError); } lval1 = rsp.getULong(10); setIntegerParam(pco_health_status, lval1); // Get Camera FW Ver // cmd.setCode(0x0810); // rsp.setErrCode(0x08D0); // rsp.setExpCode(0x0890); // doSerialCommand(cmd,rsp,0,0); // Get Camera HW Ver // cmd.setCode(0x0710); // rsp.setErrCode(0x07D0); // rsp.setExpCode(0x0790); // doSerialCommand(cmd,rsp,0,0); // Get Camera Temp cmd.setCode(0x0610); rsp.setErrCode(0x06D0); rsp.setExpCode(0x0690); doSerialCommand(cmd, rsp, 0, 0); short sval1 = (short)rsp.getUShort(2); setDoubleParam(ADTemperature, (double)sval1); // notify IOC to update the PVs to reflect in epics DB // my_addriver->callback(general, this); // clear changes to prevent constant update return (0); } /** * Given asyn param number from writeInt32, the param number, write pco general param * according to function. * @param function - asyn param. */ int pco::setPcoGeneralParams(int function) { // Reset Settings to Default if (function == (pco_reset_default_settings) || function == pco_setallparams) { setIntegerParam(pco_reset_default_settings, 0); pco_command cmd; pco_response rsp; cmd.setCode(0x0310); rsp.setExpCode(0x0390); rsp.setErrCode(0x03D0); doSerialCommand(cmd, rsp, 0, 0); lf.log("Reset Camera to Default Settings"); } // Initiate Selftest Procedure if (function == pco_init_selftest || function == pco_setallparams) { setIntegerParam(pco_init_selftest, 0); pco_command cmd; pco_response rsp; cmd.setCode(0x0510); rsp.setExpCode(0x0590); rsp.setErrCode(0x05D0); doSerialCommand(cmd, rsp, 0, 0); lf.log("Init Self Test"); } if (function == pco_global_shutter && getIntParam(pco_which_camera) == pco_edge) { lf.log("pco_global_shutter- getting cam setup"); char mesgx[200]; // the scan speed on camera will be reset to slow scan setIntegerParam(pco_edge_fastscan, 0); setIntegerParam(ADStatus, ADStatusWaiting); callParamCallbacks(); pco_command cmd; pco_response rsp; // Get Camera Setup cmd.setCode(0x1110); // wtype- what is type? cmd.addUShort(0); // add 4 flags cmd.addULong(0); cmd.addULong(0); cmd.addULong(0); cmd.addULong(0); rsp.setExpCode(0x1190); rsp.setErrCode(0x11D0); doSerialCommand(cmd, rsp, 0, 0); unsigned short wtype = rsp.getUShort(2); unsigned int p0new = 0; unsigned int p0 = rsp.getULong(4); unsigned int p1 = rsp.getULong(6); unsigned int p2 = rsp.getULong(8); unsigned int p3 = rsp.getULong(10); int PCO_EDGE_SETUP_GLOBAL_SHUTTER = 2; int PCO_EDGE_SETUP_ROLLING_SHUTTER = 1; sprintf(mesgx, "wtype= %d p's %d %d %d %d\n", wtype, p0, p1, p2, p3); lf.log(mesgx); // Set timeouts if (getIntParam(pco_global_shutter) == 1) { // reboot w/ global shutter ON p0new = PCO_EDGE_SETUP_GLOBAL_SHUTTER; setIntegerParam(ADSizeX, 2560); setIntegerParam(ADSizeY, 2160); setStringParam(cor_ccf_filename, getStringParam(pco_globshut_mcfname)); } if (getIntParam(pco_global_shutter) == 0) { // reboot w/ global shutter OFF p0new = PCO_EDGE_SETUP_ROLLING_SHUTTER; setIntegerParam(ADSizeX, 2560); setIntegerParam(ADSizeY, 2160); setStringParam(cor_ccf_filename, getStringParam(pco_rollshut_mcfname)); } // // if camera is already set to correct settings we need not reboot. // figure oyt of we must reboot // if (p0 != p0new) { sprintf(mesgx, "pco::setPcoGeneralParams - mcf/ccf file name %s", getStringParam(cor_ccf_filename)); lf.log(mesgx); lf.log("SetCameraSetuyp"); // Set Camera Setup cmd.setCode(0x1210); // wtype- what is type? cmd.addUShort(wtype); // add 4 flags cmd.addULong(p0new); // p0 determine global or rolling shutter setup cmd.addULong(p1); cmd.addULong(p2); cmd.addULong(p3); rsp.setExpCode(0x1290); rsp.setErrCode(0x12D0); doSerialCommand(cmd, rsp, 0, 0); lf.log("Reboot Camera"); cmd.setCode(0x1704); rsp.setExpCode(0x1794); rsp.setErrCode(0x17D4); doSerialCommand(cmd, rsp, 0, 0); lf.log("Close Ser port"); #ifndef USEASYNSERIAL serial_port->close(); #else asynSetOption(myServerPort, 0, "open", "close"); #endif lf.log("Waiting 10s for reboot Camera"); epicsThreadSleep(10.0); lf.log("Open Ser port"); #ifndef USEASYNSERIAL serial_port->open(); #else asynSetOption(myServerPort, 0, "open", "open"); #endif } reconfigGrabber(); setIntegerParam(ADStatus, ADStatusIdle); } return (0); } /** * set pco sensor param defined in functino, the asyn param from writeInt32 * send setting via serial port. * @param function asyn param number */ int pco::setPcoSensorParams(int function) { char mesgxx[256]; pco_command cmd; pco_response rsp; // Set Sensor Format if ((function == pco_sensor_format || function == pco_setallparams) && getIntParam(pco_which_camera) == pco_dimax) { cmd.setCode(0x1511); cmd.addUShort(getIntParam(pco_sensor_format)); rsp.setExpCode(0x1591); rsp.setErrCode(0x15D1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_sensor_format, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set ROI if (function == ADSizeY || function == ADSizeX || function == pco_setallparams) { double x0, y0, x1, y1; unsigned short xs0, ys0, xs1, ys1; int sizex, sizey; // turn off acquisition if we change image size setIntegerParam(ADAcquire, 0); doHighLevelParams(ADAcquire); setIntegerParam(ADMinX, 1); setIntegerParam(ADMinY, 1); if (getIntParam(pco_which_camera) == pco_edge) { #ifdef _LIMITIMGSIZE600 if (getIntParam(ADSizeY) < 600) setIntegerParam(ADSizeY, 600); #endif #ifdef _LIMITIMGSIZE if (getIntParam(pco_edge_fastscan) == 1) { if (getIntParam(ADSizeX) > 1800) setIntegerParam(ADSizeX, 1800); if (getIntParam(ADSizeY) > 1800) setIntegerParam(ADSizeY, 1800); } #endif } cmd.setCode(0x0311); x0 = (double)getIntParam(ADMinX); y0 = (double)getIntParam(ADMinY); x1 = getIntParam(ADSizeX) + getIntParam(ADMinX) - 1; y1 = getIntParam(ADSizeY) + getIntParam(ADMinY) - 1; // in dimax pco_desc.wRoiHorStepsDESC is 24. We use 48 , so we have // divisable by 16 too, for grabber. //!! need better way to do this. int magic_number = pco_desc.wRoiHorStepsDESC; if (magic_number > 2560) { magic_number = 16; printf("Problem with magic number\n"); } while ((magic_number < 16) || ((magic_number % 16) != 0)) { magic_number = magic_number * 2; } printf("magic number %d\n", magic_number); double magicd = (double)magic_number; // make size x by divisible by twice mag number //!!sizex=getIntParam(ADSizeX); //!!sizex = sizex - (sizex % (2*magic_number)); //!!int maxsizex=getIntParam(ADMaxSizeX); //!!x0 = 1; //!!x1 = sizex; x0 = 1.0 + (floor(((x0 - 1.0) / magicd) + 0.5) * magicd); x1 = (floor(((x1) / magicd) + 0.5) * magicd); // sizey=getIntParam(ADSizeY); // sizey = sizey - (sizey % (2*pco_desc.wRoiVertStepsDESC)); // int maxsizey=getIntParam(ADMaxSizeY); // y0 = 1; // y1 = sizey; int vsteps = 2 * pco_desc.wRoiVertStepsDESC; y0 = 1.0 + (floor(((y0 - 1.0) / vsteps) + 0.5) * vsteps); y1 = (floor(((y1) / vsteps) + 0.5) * vsteps); xs0 = (unsigned short)x0; xs1 = (unsigned short)x1; ys0 = (unsigned short)y0; ys1 = (unsigned short)y1; cmd.addUShort(xs0); cmd.addUShort(ys0); cmd.addUShort(xs1); cmd.addUShort(ys1); sprintf(mesgxx, "x0=%d x1=%d y0=%d y1=%d \n", xs0, xs1, ys0, ys1); lf.log(mesgxx); rsp.setExpCode(0x0391); rsp.setErrCode(0x03D1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(ADMinX, rsp.getUShort(2)); setIntegerParam(ADMinY, rsp.getUShort(4)); setIntegerParam(ADSizeX, rsp.getUShort(6) - getIntParam(ADMinX) + 1); setIntegerParam(ADSizeY, rsp.getUShort(8) - getIntParam(ADMinY) + 1); // my_addriver->callback(general, this); // setIntegerParam(pco_reconfig_grabber,1); reconfigGrabber(); lf.log("reconfig'ed grabber"); sprintf(mesgxx, "sizex =%d sizey=%d \n", getIntParam(ADSizeX), getIntParam(ADSizeY)); } } // Set Binn if ((function == ADBinX || function == ADBinY || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_dimax)) { cmd.setCode(0x0311); cmd.addUShort(getIntParam(ADBinX)); cmd.addUShort(getIntParam(ADBinY)); rsp.setExpCode(0x0391); rsp.setErrCode(0x03D1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(ADBinX, rsp.getUShort(2)); setIntegerParam(ADBinY, rsp.getUShort(4)); // my_addriver->callback(general, this); } } // Set pixelrate if (function == pco_pixelrate || function == pco_setallparams) { cmd.setCode(0x0711); cmd.addULong(getIntParam(pco_pixelrate)); rsp.setExpCode(0x0791); rsp.setErrCode(0x07D1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_pixelrate, rsp.getULong(2)); // my_addriver->callback(general, this); } } // Set Gain- Conv Factor if ((function == ADGain || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_dimax)) { unsigned short igain; igain = (unsigned short)floor(getDoubleParam(ADGain) * 100.0); cmd.setCode(0x0911); cmd.addUShort(igain); rsp.setExpCode(0x0991); rsp.setErrCode(0x09D1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setDoubleParam(ADGain, ((double)rsp.getUShort(2)) / 100.0); // my_addriver->callback(general, this); } } // Set doub image mode if ((function == pco_doub_img_mode || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_dimax)) { cmd.setCode(0x0B11); cmd.addUShort(getIntParam(pco_doub_img_mode)); rsp.setExpCode(0x0B91); rsp.setErrCode(0x0BD1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_doub_img_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set ADC Operation if ((function == pco_adc_mode || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_dimax)) { cmd.setCode(0x0D11); cmd.addUShort(getIntParam(pco_adc_mode)); rsp.setExpCode(0x0D91); rsp.setErrCode(0x0DD1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_adc_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set Cooling Setpoint Temperature if (function == (pco_temp_setpt) || function == pco_setallparams) { cmd.setCode(0x1111); cmd.addShort(getIntParam(pco_temp_setpt)); rsp.setExpCode(0x1191); rsp.setErrCode(0x11D1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_temp_setpt, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // set Hot Pix Correction Mode if ((function == pco_hotpix_corr || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_edge)) { cmd.setCode(0x1F11); cmd.addUShort(getIntParam(pco_hotpix_corr)); rsp.setExpCode(0x1F91); rsp.setErrCode(0x1FD1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_hotpix_corr, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set Offset Mode if ((function == pco_offset_mode || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_dimax)) { cmd.setCode(0x1311); cmd.addUShort(getIntParam(pco_offset_mode)); rsp.setExpCode(0x1391); rsp.setErrCode(0x13D1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_offset_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set Noise Filter Mode if ((function == pco_noise_filt_mode || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_dimax)) { cmd.setCode(0x1A11); cmd.addUShort(getIntParam(pco_noise_filt_mode)); rsp.setExpCode(0x1A91); rsp.setErrCode(0x1AD1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_noise_filt_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set pco_cdi_mode if ((function == pco_cdi_mode || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_dimax)) { cmd.setCode(0x3011); cmd.addUShort(getIntParam(pco_cdi_mode)); cmd.addUShort(0); rsp.setExpCode(0x3091); rsp.setErrCode(0x30D1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_cdi_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set pco_dnsu_mode if ((function == pco_dnsu_mode || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_dimax)) { cmd.setCode(0x2D11); cmd.addUShort(getIntParam(pco_dnsu_mode)); cmd.addUShort(0); rsp.setExpCode(0x2D91); rsp.setErrCode(0x2DD1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_dnsu_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); } } // Set pco_dnsu_mode if ((function == pco_dnsu_init_mode || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_dimax)) { cmd.setCode(0x2E11); cmd.addUShort(getIntParam(pco_dnsu_init_mode)); cmd.addUShort(0); rsp.setExpCode(0x2E91); rsp.setErrCode(0x2ED1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_dnsu_init_mode, rsp.getUShort(2)); // my_addriver->callback(general, this); lf.log("Init DNSU Mode"); } } // set 16bit 2 12 bit lookup table if ((function == pco_1612_lookup || function == pco_setallparams) && (getIntParam(pco_which_camera) == pco_edge)) { cmd.setCode(0x3311); cmd.addUShort(getIntParam(pco_1612_lookup)); cmd.addUShort(0); rsp.setExpCode(0x3391); rsp.setErrCode(0x33D1); if (doSerialCommand(cmd, rsp, 0, 0) == 0) { setIntegerParam(pco_1612_lookup, rsp.getUShort(2)); // my_addriver->callback(general, this); } } return (0); } /** * Read many sensor params from camera via serial port. * update asyn params accordingly. * */ int pco::getPcoSensorParams(void) { pco_command cmd; pco_response rsp; // Get Camera Description cmd.setCode(0x0111); rsp.setExpCode(0x0191); rsp.setErrCode(0x01D1); doSerialCommand(cmd, rsp, (unsigned char *)&pco_desc, sizeof(pco_desc)); setIntegerParam(ADMaxSizeX, rsp.getUShort(6)); setIntegerParam(ADMaxSizeY, rsp.getUShort(8)); // Get Sensor Format cmd.setCode(0x1411); rsp.setExpCode(0x1491); rsp.setErrCode(0x14D1); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_sensor_format, rsp.getUShort(2)); // Get ROI cmd.setCode(0x0211); rsp.setExpCode(0x0291); rsp.setErrCode(0x02D1); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(ADMinX, rsp.getUShort(2)); setIntegerParam(ADMinY, rsp.getUShort(4)); setIntegerParam(ADSizeX, 1 + rsp.getUShort(6) - rsp.getUShort(2)); setIntegerParam(ADSizeY, 1 + rsp.getUShort(8) - rsp.getUShort(4)); // Get Binning cmd.setCode(0x0411); rsp.setExpCode(0x0491); rsp.setErrCode(0x04D1); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(ADBinX, rsp.getUShort(2)); setIntegerParam(ADBinY, rsp.getUShort(4)); // Get Pixelrate cmd.setCode(0x0611); rsp.setExpCode(0x0691); rsp.setErrCode(0x06D1); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_pixelrate, rsp.getULong(2)); if ((getIntParam(pco_which_camera) == pco_dimax)) { // Get Conversion Factor cmd.setCode(0x0811); rsp.setExpCode(0x0891); rsp.setErrCode(0x08D1); doSerialCommand(cmd, rsp, 0, 0); // in elec/count. need 100 in there... setDoubleParam(ADGain, ((double)(rsp.getUShort(2))) / 100.0); // Get doub img mode cmd.setCode(0x0a11); rsp.setExpCode(0x0a91); rsp.setErrCode(0x0aD1); doSerialCommand(cmd, rsp, 0, 0); setIntegerParam(pco_doub_img_mode, rsp.getUShort(2)); // 1 =on 0=off } if ((getIntParam(pco_which_camera) == pco_other)) { // Get cam_adc_op cmd.setCode(0x0c11); rsp.setExpCode(0x0c91); rsp.setErrCode(0x0cD1); doSerialCommand(cmd, rsp, 0, 0); // 1 for 1ADC, 2 for 2ADCs setIntegerParam(pco_adc_mode, rsp.getUShort(2)); } // Get cam_ir_sense // cmd.setCode(0x0e11); // rsp.setExpCode(0x0e91); // rsp.setErrCode(0x0eD1); // doSerialCommand(cmd,rsp,0,0); if ((getIntParam(pco_which_camera) == pco_edge)) { // Get cam_stpt_temp cmd.setCode(0x1011); rsp.setExpCode(0x1091); rsp.setErrCode(0x10D1); doSerialCommand(cmd, rsp, 0, 0); // signed temp in C setIntegerParam(pco_temp_setpt, rsp.getShort(2)); } if (getIntParam(pco_which_camera) == pco_other) { // Get cam_offsmode cmd.setCode(0x1211); rsp.setExpCode(0x1291); rsp.setErrCode(0x12D1); doSerialCommand(cmd, rsp, 0, 0); // 0 auto,1 off setIntegerParam(pco_offset_mode, rsp.getShort(2)); } if (getIntParam(pco_which_camera) == pco_dimax) { // Get cam_noise_filt_mode cmd.setCode(0x1911); cmd.addShort(1); // mode 0=auto, 1 - OFF rsp.setExpCode(0x1991); rsp.setErrCode(0x19D1); doSerialCommand(cmd, rsp, 0, 0); // 0,1,2 = off, on, onHotPix setIntegerParam(pco_noise_filt_mode, rsp.getShort(2)); } if (getIntParam(pco_which_camera) == pco_edge) { // Get pco_hotpix_corr cmd.setCode(0x1E11); rsp.setExpCode(0x1E91); rsp.setErrCode(0x1ED1); doSerialCommand(cmd, rsp, 0, 0); // 0,1,2 = off, on, onHotPix setIntegerParam(pco_hotpix_corr, rsp.getShort(2)); // Get pco_1612_lookup cmd.setCode(0x3211); rsp.setExpCode(0x3291); rsp.setErrCode(0x32D1); doSerialCommand(cmd, rsp, 0, 0); // 0,1,2 = off, on, onHotPix setIntegerParam(pco_1612_lookup, rsp.getShort(2)); } if (getIntParam(pco_which_camera) != pco_edge) { // Get pco_cdi_mode cmd.setCode(0x2F11); cmd.addShort(1); // mode 0=auto, 1 - OFF rsp.setExpCode(0x2F91); rsp.setErrCode(0x2FD1); doSerialCommand(cmd, rsp, 0, 0); // 0,1,2 = off, on, onHotPix setIntegerParam(pco_cdi_mode, rsp.getShort(2)); } if (getIntParam(pco_which_camera) != pco_edge) { // Get pco_dnsu_mode cmd.setCode(0x2C11); cmd.addShort(1); // mode 0=auto, 1 - OFF rsp.setExpCode(0x2C91); rsp.setErrCode(0x2CD1); doSerialCommand(cmd, rsp, 0, 0); // 0,1,2 = off, on, onHotPix setIntegerParam(pco_dnsu_mode, rsp.getShort(2)); } return (0); }
name 'freeswitch' description 'Installs FreeSWITCH to run Adhearsion apps' run_list "recipe[apt]", "recipe[freeswitch::rayo]", "recipe[mojolingo-misc::freeswitch_ies]"
--- id: 587d7fae367417b2b2512be6 title: データソースからの画像をレンダリングする challengeType: 6 forumTopicId: 18265 dashedName: render-images-from-data-sources --- # --description-- 直前のいくつかのチャレンジでは、JSON 配列内の各オブジェクトに、猫の画像の URL である値を持つ `imageLink` キーが含まれていました。 これらのオブジェクトをループ処理する場合、この `imageLink` プロパティを使用すれば `img` 要素にこの画像を表示できます。 これを行うコードを次に示します。 ```js html += "<img src = '" + val.imageLink + "' " + "alt='" + val.altText + "'>"; ``` # --instructions-- `img` タグ内で `imageLink` プロパティと `altText` プロパティを使用するように、コードを追加してください。 # --hints-- `imageLink` プロパティを使用して画像を表示する必要があります 。 ```js assert(code.match(/val\.imageLink/g)); ``` 画像の `alt` 属性値には `altText` を使用する必要があります。 ```js assert(code.match(/val\.altText/g)); ``` # --seed-- ## --seed-contents-- ```html <script> document.addEventListener('DOMContentLoaded', function(){ document.getElementById('getMessage').onclick = function(){ const req=new XMLHttpRequest(); req.open("GET",'/json/cats.json',true); req.send(); req.onload = function(){ const json = JSON.parse(req.responseText); let html = ""; json.forEach(function(val) { html += "<div class = 'cat'>"; // Add your code below this line // Add your code above this line html += "</div><br>"; }); document.getElementsByClassName('message')[0].innerHTML=html; }; }; }); </script> <style> body { text-align: center; font-family: "Helvetica", sans-serif; } h1 { font-size: 2em; font-weight: bold; } .box { border-radius: 5px; background-color: #eee; padding: 20px 5px; } button { color: white; background-color: #4791d0; border-radius: 5px; border: 1px solid #4791d0; padding: 5px 10px 8px 10px; } button:hover { background-color: #0F5897; border: 1px solid #0F5897; } </style> <h1>Cat Photo Finder</h1> <p class="message box"> The message will go here </p> <p> <button id="getMessage"> Get Message </button> </p> ``` # --solutions-- ```html <script> document.addEventListener('DOMContentLoaded', function(){ document.getElementById('getMessage').onclick = function(){ const req = new XMLHttpRequest(); req.open("GET",'/json/cats.json',true); req.send(); req.onload = function(){ const json = JSON.parse(req.responseText); let html = ""; json.forEach(function(val) { html += "<div class = 'cat'>"; // Add your code below this line html += "<img src = '" + val.imageLink + "' " + "alt='" + val.altText + "'>"; // Add your code above this line html += "</div><br>"; }); document.getElementsByClassName('message')[0].innerHTML = html; }; }; }); </script> <style> body { text-align: center; font-family: "Helvetica", sans-serif; } h1 { font-size: 2em; font-weight: bold; } .box { border-radius: 5px; background-color: #eee; padding: 20px 5px; } button { color: white; background-color: #4791d0; border-radius: 5px; border: 1px solid #4791d0; padding: 5px 10px 8px 10px; } button:hover { background-color: #0F5897; border: 1px solid #0F5897; } </style> <h1>Cat Photo Finder</h1> <p class="message"> The message will go here </p> <p> <button id="getMessage"> Get Message </button> </p> ```
export default function newIndex(symbol, text) { let index = []; let pattern = new RegExp(`${symbol}`, 'gi'); let matches = pattern.exec(text); while (matches) { index.push(matches.index); matches = pattern.exec(text); } return index; }
(Nanowerk News) A Northwestern University-led international team is getting closer to understanding the mysteriously bright object that burst in the northern sky this summer. Margutti presented her findings on Jan. 10 at the 233rd meeting of the American Astronomical Society in Seattle. The research will then be published in the Astrophysical Journal. She is an assistant professor of physics and astronomy in Northwestern’s Weinberg College of Arts and Sciences and a member of CIERA (Center for Interdisciplinary Exploration and Research in Astrophysics), an endowed research center at Northwestern focused on advancing astrophysics studies with an emphasis on interdisciplinary connections. After ATLAS spotted the object, Margutti’s team quickly obtained follow-up observations of The Cow with NASA’s Nuclear Spectroscopic Telescope Array (NuSTAR) and the European Space Agency’s (ESA) INTErnational Gamma-Ray-Astrophysics Laboratory (INTEGRAL) in hard X-rays, with ESA’s XMM-Newton space observatory in soft X-rays and with the Very Large Array in radio waves.
MultiAjax class provides a convenient way to smart work with AJAX. It supports timeout, queue, session limits and batch mode. - Autoselect GET or POST method for HTTP request. - Timeouts. It is possible to setup different timeouts for AJAX requests. - Work with queue of requests and limit parallel queries. Example: setup queue for maximum 100 requests with 5 parallel sessions. - Batch mode. Multiple AJAX requests can be pack into batch structure and post as only one HTTP request. - Work with different encodings, including UTF-8.
This gorgeous monstrosity was once an Antec Lanboy Air, which is lovely but hardly capable of surviving a nuclear holocaust. Mod Brothers Podcast host Kyle Van Der Mewre and Mnpctech's Bill Owen saw fit to fix that, and fix it they did. Bristling with switches and hoses, swathed in neon green, and fitted with a pair of Gullwing-style spring-loaded side panels, the imposing "Apocalypse" mod is a prime example of the sort of amazing art that comes into existence when two masters of the modding craft combine their talents. Check out the video for a candid peek at the creation of this beast, or hit up the link below to find a detailed log of the PC you could have created if you just applied yourself.
<!doctype html> <html> <head> <meta charset="utf-8"> <base href="/meituan/"> <title>登录|找回登录密码</title> <link href="css/findpwd.css" type="text/css" rel="stylesheet"> <script src="js/jquery-1.11.3.js" type="text/javascript"></script> <script src="js/findpwd.js" type="text/javascript"></script> <script type="text/javascript"> /*$(function(){ $("#next_findpwd").click(function(){ document.getElementById("content_second").style.display='block'; document.getElementById("content_first").style.display='none'; }); $("#find_button").click(function(){ document.getElementById("content_second").style.display='none'; document.getElementById("content_third").style.display='block'; }); });*/ //显示查询,再是修改。查询是否存在邮箱账号。才能跳转至邮箱界面,跳转后就可以修改密码的页面~ /* function checkEmail(){//查询是否有次邮箱账号,并匹配验证码~ var uemail=$("#con_email").val(); var recode=$("#con_yz").val(); console.info(uemail); console.info(recode); $.ajax({ method:'POST', url:'/meituan/UserOperate.do', data:{ 'op':'checkforgetEmail', 'email':uemail, 'recode':recode }, dataType:'json', success:function(data){ //alert("回调函数"+data.code); if(data.code==1){// $("#content_second").css("display","block"); $("#content_first").css("display","none"); }else if(data.code==0){ alert("无此账号信息~"); }else if(data.code==2){ $("#user_reyanzheng").text("验证码错误"); alert("验证码验证失败"); } } }); }; */ function checkEmail(){//查询是否有次邮箱账号,并匹配验证码~ var uemail=$("#con_email").val(); var recode=$("#con_yz").val(); var zhengze=/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/; if(uemail.match(zhengze)&&uemail!=null){ console.info(32323); $.ajax({ type:'post', url:'user_checkFogetEmail.action', data:{ 'uemail':uemail, 'captcha':recode }, dataType:'json', success:function(data){ console.info(data); if(data==0){// $("#content_second").css("display","block"); $("#content_first").css("display","none"); }else if(data==1){ alert("无此账号信息~"); }else{ $("#user_reyanzheng").text("验证码错误"); alert("验证码验证失败"); } } }); }else{ $("#content_first").css("display","block"); alert("邮箱格式不正确,请重新输入"); return; } }; function fogetPwd(){ var uemail=$("#con_email").val(); $.ajax({ method:'POST', url:'user_fogetUemail.action', data:{ 'uemail':uemail }, dataType:'json', success:function(data){ if(data.code==1){ $("#forgetEmail").text(uemail); $("#content_third").css("display","block"); $("#content_second").css("display","none"); }else if(data.code==0){ alert("邮件发送失败,请重试"); window.location.href="page/findpwd.html"; } } }); } //重新获取验证码 function changeyanzheng(obj){ $("#signup_captcha_img").attr("src","user_code.action?t="+Math.random() );//改变验证码图片 } </script> </head> <body> <header class="header"> <div class="header_left"> <a class="header_left_logo" href=""><img src="images/mwituancom.png"/></a> <div class="header_right"> <span class="tip">已有美团账号?</span> <a class="header_right_login" href="login.html">登录</a> </div> </div> </header> <div class="line"></div><!--分隔线--> <!--第一步--> <div class="content" id="content_first" style="display:block"> <h3 class="headline"><span class="headline_content">找回登录密码</span></h3> <div class="form_wrapper"> <form class="form_content" method="POST" action=""> <div class="form_field"> <label>美团账户</label> <input class="f_text account" id="con_email" name="uemail" type="text" placeholder="请输入您的邮箱" /> <span class="tip" style="display:none;"> <span></span> </span> </div> <div class="form_field captcha cf" > <label>验证码</label> <input class="f_text verify_code" style="width: 100px;" id="con_yz" name="captcha" type="text" /> <img height="36px" width="72px" class="signup_captcha_img" id="signup_captcha_img" src="user_code.action" /> <a tabindex="-1" class="captcha_refresh J_captcha_refresh" href="javascript:void(0)" onclick="changeyanzheng(this)">看不清楚?换一张</a> </div> <div class="form_field"> <input type="hidden" name="csrf" value="" /> <a href="javascript:void(0)" id="next_findpwd"><input type="button" class="btn" id="next_findpwd" value="下一步" onClick="checkEmail()"/></a> </div> </form> </div> </div><!--找回密码--> <!--第二步--> <div class="bdw" id="content_second" style="display:none"> <div class="cf" id="bd"> <div class="content"> <h3 class="headline"> <span class="headline_content">找回密码</span> </h3> <p class="verify_tip_title">您正在<b></b>重置登录密码:</p> <ul class="find_ways"> <li class="way way_last "> <form action="/findpwd/info" method="POST" class="way_content cf" > <div id="way_find"> <a id="find_button" href="javascript:void(0)" > <img src="images/find_button.png" style="padding-top: 33px; padding-right: 245px;" onClick="fogetPwd()"/> </a> </div> </form> </li> </ul> </div> </div> </div><!--邮箱验证--> <!--第三步--> <!--<div class="bdw" id="bdw" style="display:block"> <div class="cf" id="bd"> <div class="content"> <img src="image/no_quanxian.png" /> </div> </div> </div>--><!--没有权限跳转页面--> <!--第三步--> <div class="content" id="content_third" style="display:none"> <div style="display:none" class="common-tip J-page-error-message"> <div class="sysmsg"> <p> <span class="tip-status tip-status--error"></span> <span class="J-error-content"></span> </p> </div> </div> <h3 class="headline"> <span class="headline__content">通过绑定的邮箱</span> </h3> <p class="verify-tip-title">您正在通过“绑定的邮箱”方式进行验证/修改</p> <form action="/findpwd/verify" method="POST" class="verify_cont verify_info"> <input type="hidden" value="13" name="id"> <div class="verify_help_title cf"> <span class="tip-status tip-status--large tip-status--large--info"></span> <h3 class="title">邮件已发送</h3> <p class="sub-title">请到<a target="_blank" id="forgetEmail"></a>查阅来自美团的邮件, 点击邮件中的链接重设您的登录密码</p> </div> <div class="form_field"> <a data-mtevent="gotomail" target="_blank" href="http://mail.qq.com/" class="btn next-step">去邮箱收信</a> <a data-mtevent="prevstep" onClick="showThird()" href="javascript:void(0)">上一步</a> </div> <div class="common_bubble resend_tip"> <h4 class="resend_tip_head">没有收到邮件?</h4> <ul class="resend_tip_list"> <li>请先检查是否在垃圾邮件中。如果还未收到,请重新发送邮件<br> <!--<div style="display:none;" class="J-resend-error-tip resend-error-tip"><span class="tip-status tip-status--error"></span><span class="J-content"></span></div>--> <input type="button" data-mtevent="resend/mail" href="javascript:void(0);" class="btn_normal btn_small resend_email_button J_resend_email_button" value="重新发送邮件"> </li> <li>还是没收到?请选择<a href="/findpwd/select">其他找回方式</a></li> </ul> </div> </form> </div><!--邮箱--> <!--第四步--> <div class="content" id="content_four" style="display:none"> <h3 class="headline"><span class="headline_content">找回登录密码</span></h3> <div class="form_wrapper"> <form action="/account/settingpassword" method="POST" class="form_content" style="height: 269px;"> <div class="retrieve_title" style="padding-left: 0px;"> <img src="images/yanzheng_ok.png" /> </div> <div class="form_field" style="padding-bottom: 0px;"> <label>新的登录密码</label> <input type="password" autocomplete="off" name="password" class="f_text J_new_password"> </div> <div class="pw_strength"> <span class="pw_strength_label" >弱</span> <span class="pw_strength_label">中</span> <span class="pw_strength_label pw-strength_label_noborder">强</span> </div> <div class="form_field new_password"> <label>确认登录密码</label> <input type="password" autocomplete="off" name="password2" class="f_text J_repeat_password"> </div> <div class="form_field"> <input type="hidden" value="BqQhlJo0-Z5WqTu1vR6lPl6WQWxNduQLXO1s" name="csrf"> <a href="javascript:void(0)" onClick="showFive()"><input type="submit" value="确认提交" class="btn"></a> </div> </form> </div> </div><!--新密码--> <!--修改密码成功--> <div class="content" id="content_five" style="display:none"> <h3 class="headline"><span class="headline_content">找回登录密码</span></h3> <h3 class="retrieve_tips">恭喜您已成功修改了登录密码</h3> <div class="retrieve_result"> <img src="images/update_ok.png" style="padding-left: 250px; padding-bottom: 20px;"> <div class="form_field retrieve_result_content"> <a href="https://passport.meituan.com/account/unitivelogin?service=www&amp;continue=http%3A%2F%2Fwww.meituan.com%2Faccount%2Fsettoken" class="btn">立即登录</a> </div> </div> </div><!--验证成功--> <div class="line_foot"></div> <footer class="footer"> <p class="foot"> © <a class="" href="">meituan.com</a> <a class="" href="">京ICP证070791号</a> <span>京公网安备11010502025545号</span> </p> </footer> </div> </body> </html>
Text_LTSV === [LTSV](http://ltsv.org/) parser and generator for PHP. Installation --- ``` $ pear channel-discover openpear.org $ pear install openpear/Text_LTSV-1.0.0 ``` Usage --- ```php require_once 'Text/LTSV.php'; $assoc = Text_LTSV::parseLine("hoge:foo\tfuga:bar\tpiyo:baz"); echo $assoc['hoge']; //=> foo echo $assoc['fuga']; //=> bar echo $assoc['piyo']; //=> baz $array = Text_LTSV::parse("hoge:foo\tfuga:bar\npiyo:baz"); echo count($array); //=> 2 echo $array[1]['piyo']; //=> baz echo Text_LTSV::generateLine(array('hoge' => 'foo', 'fuga' => 'bar', 'piyo' => 'baz')); //=> hoge:foo\tfuga:bar\tpiyo:baz echo Text_LTSV::generate(array( array('hoge' => 'foo', 'fuga' => 'bar'), array('piyo' => 'baz'), )); //=> hoge:foo\tfuga:bar\npiyo:baz ``` License --- Copyright (c) 2013 Takamasa Aoi. See LICENSE in this directory.
# Directory.Properties Security **Namespace:** [OfficeDevPnP.Core.Framework.Provisioning.Providers.Xml.V201705](OfficeDevPnP.Core.Framework.Provisioning.Providers.Xml.V201705.md) **Assembly:** OfficeDevPnP.Core.dll ## Syntax ```C# public ObjectSecurity Security { get; set; } ``` ### Property Value Type: [OfficeDevPnP.Core.Framework.Provisioning.Providers.Xml.V201705.ObjectSecurity](OfficeDevPnP.Core.Framework.Provisioning.Providers.Xml.V201705.ObjectSecurity.md) ## See also - [Directory](OfficeDevPnP.Core.Framework.Provisioning.Providers.Xml.V201705.Directory.md) - [OfficeDevPnP.Core.Framework.Provisioning.Providers.Xml.V201705](OfficeDevPnP.Core.Framework.Provisioning.Providers.Xml.V201705.md)
Fame & Fortune: why roll your own? This month's RPG Blog Carnival is courtesy of Evil Machinations and deals with worldbuilding's whys and wherefores. The work involved in creating a world appears daunting, especially to inexperienced game masters or someone unfamiliar with a new system. So why go and create a world of your own? You can start differently. You don't have to explore the Old Corbitt Place, meet Bargle the Infamous or play Skull-Skull. Metagaming is something game masters work around if they use the quickstart every player downloaded or the module that came with their boxed set. You are the final authority. One of the tenets of most tabletop RPGs. To create your own world is the ultimate expression of that. Encouraging input from other players is admirable, yet for some this is a part of the game they love for it's own sake. You can ask interesting questons. By creating your own setting you can go beyond obvious tropes. Some of the most inspiring gaming has come from settings that challenge tropes, remix or extrapolate on them to unexpected conclusions. You learn more about your game. Not just the system elements but also the playstyle, some games may suit sandbox play better, others favour a more structured approach. Also learning about the system aids you in asking interesting questions. No metaplot baggage. You don't need to incorporate shifting metaplots. The Time of Troubles need not be and Gehenna can wait. With a ready, steady diet of splatbook, re-imagined classics or updated setting, incorporating the new shiny even if it just hurdled Megalodon is tempting. Here Be... Dragons? The wonder of exploring terra incognito is at it's greatest when dealing with a new world. New settings aren't commonplace so if the paths to the Caves of Chaos look like ruts, there's always the option to go... offroad.
Many people have debit orders and stop orders deducted from their bank accounts every month without understanding the difference between the two. A debit order is a contract between yourself and a third party etc. an Insurance Company, Vodacom, Financial Institution. It authorises the third party to deduct a certain amount on a specified basis (usually monthly) from your bank / Visa / Mastercard account. Your bank cannot stop or change a debit order, it can only ensure that the debit order is processed against your specified account. Only the service provider in whose favour the debit order was implemented can affect any changes on the debit order. A stop order is an arrangement between the customer and his bank in terms of which a certain amount is paid to a third party on a specified basis. The customer can revoke or change a stop order at any time by instructing his bank accordingly. A stop order comes into effect when you arrange with your bank to pay a certain amount from a specified account to a third party on a specified basis. Early Debit Orders are collected from customer account shortly after midnight immediately after the processing of EFT credit payments such as salary payments. Early Debit Orders are processed against your account, just after midnight and immediately after processing of Electronic Fund Transfer payments into your account, etc. your salary. It the debit order request is not met successfully, it can be presented for a number of days of when a deposit is made into your account. The processing of Electronic Fund Transfer Debit Orders (EFT) takes place later in the day, on a chosen date by the customer (usually after business hours). When it happens that an EFT debit order is returned because it is not provided for on two consecutive action dates mandated for, the debit order is removed from the system by the third party. A new mandate for future payments to be made then have to be obtained from you by the third party. You have to provide the third party that is authorised to make deductions from your account with a written cancellation or other suitable notification that you are cancelling the debit order. If you want to stop a debit order payment for a certain period – you have to ask your bank to implement a stop payment instruction on your account. The Bank will inform you on the duration of the stop payment and normally charge a fee for their service. Please note that a stop payment instruction DOES NOT CANCEL THE DEBIT ORDER. It only prevents your account been debited for a specified period of time. If you want to cancel a debit order – you have to instruct the third party collecting the money from your account as explained above. When an amount has been deducted from your account by the third party before the specified date of the instruction. When the third party continues with collection of a cancelled debit order or one where you have authorised a stop payment instruction. When your account has been debited with an incorrect amount. An unauthorised debit order has been collected against your account, or it was collected in a manner that was not authorised, etc. the collection amount has been split in two or several debit orders have been consolidated and deducted in one amount from your account. Any debit order that is not consistent with the mandate given by you. Any unauthorised debit order and related fees may be reversed by the bank. When you have given authorisation of a debit order using your debit card and PIN number – that debit order cannot be disputed. Corporate Collect is a debit order management company in South Africa that has been managing and collecting debit order payments on behalf of different businesses for more than 15 years. Our secure online 24/7 debit order facilities save time and money. For more information about Why you should consider a debit order collections facility for your business – click here. Register online today with one of our debit order facility hubs in Nelspruit, Cape Town, Durban or Ballito Bay. To speak to us about how Corporate Collect debit order collections company can improve your cashflow – click here.
**********, **** ** *** ***** **** ******* ** **** **** cameras. *** **** ***** *** ****** **** *** **** ***** ** far ****** **** *** ** ***, **** ****** *** *** is *** ****. ***, ** ** ******** **** *** *** ***** '***' ** all *** *** *** ****** ** ******* ****** *** ** and **** *****. ** ** *****, *******, **** *** *** is **** ***** ** *** **** ****. "**** ** ******* ** *** ** *** ******* *****... *** 960H ***** (********* ******** ** ** **** **) ****** ***** like * ** ***** **** *** **** ********* *****. ***** is ********* ****** ***** ************ ******** ** ***, ** ***, over * ** *****." ** ********* ** ** *** ** *******, **** ** **** surprised that ****** ***** ****** **** * ******* *** ********* ****** '*******'. ** ** ****** **** ** *** ********: ********* ** ****** *******. ****** ****** *** * *********** ******** ** ********** ** *** will ** ************. *******, **** ** ********* ******** *** *** *** *** ******, with ** ********* ********* ********** **** *-******* ** *** *** ********* *** distribution. *** ***** ***** ** **** ** ********* ***** ** ****** and *** ******* **** **** ** ***** / ****** **** ones **** ***** ***, ********** ********** ****** ******* (**** *** stretched). *******, **** ********* **** **:* ****** ****** ***, ** **** offers ****, ** *** **** ** ************* ********** ******** ********. **********, ******, ******* ** *** ******* ****** *** *** ********* **'****' ****** ** *******, ** *** ********* ***** *** ***** *** ****** ** 960H. Very good article and right on point. Seems that the images from the 960H vs D1 versions of the SAME camera are actually a little better when used on a D1 recorder and on 4:3 monitor. I've noticed better color reproduction and crisper, straighter lines. Have you guys noticed this? On 16:9 displays, I AGREE 100% with your results. Disclaimer: I work as a rep for CCTV manufacturers. Yes, we have noticed the image quality is marginally better 4:3 when using both a 960H camera and recorder. That's what we mention at the end of the article above. Though the increase in pixel count with 960H offers no benefit, we found a visible increase in detail when connecting the QM9702B to a 960H-rated DVR, instead of D1 DVRs/encoders. This comparison shows the same camera, the 960H QM9702B, first connected to the 960H DVR, the QC524, then the D1 QT534. Notably, lines 5/6 are legible in the 960H DVR vs. 4/5 using the D1 model. Though the increase in pixel count with 960H offers no benefit, we found a visible increase in detail when connecting the QM9702B to a 960H-rated DVR, instead of D1 DVRs/encoders. If the increase in detail is not due to the increase in pixel count, what is it due to? There is one area where 960H trumps SD: manufacturer profit. We were paying $100 to $120 for high-quality analog SD cameras. Their 960H replacements are all priced at more than $230. In my opinion, that is the primary driver for manufacturers' switch to 960H - not improved picture quality but their bottom line. Are these sensors CCD's or CMOS? The ones we are looking at use Sony CCD imagers. I would have to say that if any brand is marketing 960H as a "HD" solution, then it is completely false. Also, 960H was meant to give more resolution on the horizontal part when recorded to a 960H DVR. It's not stretching D1 wider. So with this whole thing about stretching... i think the best way to test it would be to record video to a 960H DVR. Then export the video and play it back from the PC. Then you would see the resolution that it was recorded at. It is stretching. We've tested multiple 960H cameras with multiple 960H DVRs. Others have done the same and found the exact same result. Do you have a specific 960H camera/DVR combo that you've tested which you believe does not stretch the image? Also, 960H was meant to give more resolution on the horizontal part when recorded to a 960H DVR. It's not stretching D1 wider. Treating them non-square pixels as square is why they become all disproportionate. It's a deal with the devil. The cameras are not the source of increased horizontal pixel count. The cameras simply output NTSC / PAL. It is the recorders that are generating / creating / capturing more horizontal pixels. The 960H camera sensors have more pixels horizontally (~960 vs ~704) than your standard analog camera. NTSC is capable of transmitting this extra horizontal resolution. Oversampling of the NTSC signal by the receiver can decode this extra horizontal resolution. This extra horizontal information and the standard vertical information are encoded into pixels by the DVR software. Sir, if you agree with all of these, then why are the cameras not the original source of the increased horizontal pixel count? But if you believe the recorders are just creating additional detail by stretching, then how do you figure for the increased detail (as you say) when using 960H cameras and 960H DVRs together? The pixels are a product of the 960H and/or 1280H DVR. Connect a 960H or a 1280H camera to a traditional DVR and you will get a correct aspect ratio VGA / 4CIF / 2CIF / CIF stream but never 960H or 1280H video. I do not believe they are creating (marginally) better details by stretching. That is from a better imager (just like cameras moved from 300TVL to 400TVL to 500TVL to 600TVL, etc., etc.). However, encoding a 4:3 NTSC / PAL feed at 960 x 480 or 1280 x 480 is what is causing the distortion. Thanks kindly for the quick response. they are creating (marginally) better details...from a better imager. Yes sir, you are absolutely correct. I see why folk would think that if you take that camera wire from a supposedly higher res model, and plug it into any standard dvr input, and then don't see any thing but the same ol 4:3 4CIF resolution, you are gonna think "it sure ain't coming from the camera!" It's because there IS a limitation on horizontal resolution, but not one by NTSC, its because of the ITU-601 sampling rate being set at 720 pixels per scan line. So even though you got this NTSC signal modulated with a signal resolution of greater than that, that darn ITU-601 is only gonna make 720 out of it. All them standard analog DVR's use ITU-601. And that's the bit that them 960H DVR's do their own way, they sample the NTSC at a greater rate than ITU-601 to recover that detail. I'm not guessing a whit about this neither.
Over and Big Think, Michio Kaku has posted a bunch of questions he wants fans to answer for a project he's working on. I don't know what the project is, but if Michio Kaku is involved, then it's bound to be awesome. So, considering that his questions are blog worthy, I thought I'd start a little meme. If you'd like to participate, all you have to do is steal the questions for yourself and answer them. Make sure to link here, and, if you want, post the link over at Big Think so Mr. Kaku can see what you wrote. Simple enough, right? I want to see the stars and other planets in my lifetime. I can't do that when it takes longer than a single human lifetime to get to the nearest star. Just imagine seeing other planets and maybe finding a habitable one. It'd be nothing short of amazing. In science fiction, you sometimes see futures where we've cured most of the major human ailments, or, at the very least, have come up with extremely effective ways to fight off cancer and so on. For me, this is a must have, since I'm a cancer survivor and have an unreasonable amount of compassion for people who are suffering diseases and ailments that we should have cures or reasonably effective treatments for. Sadly, we seem more interested in spending money to build things to blow one another up than to find cures or improve food production to combat starvation, etc. Star Wars (the original trilogy). It's the science fiction series I grew up with. How can I not include it as my favorite? I've seen Star Wars more times than I can count, and I will continue to re-watch it in any format I can get it in so long as I live. The series is beautiful, action-packed, fun, thrilling, and altogether wonderful. It's like childhood in movie form. It's pure imagination. What's not to love? The entire sequence in Star Wars: Return of the Jedi from the moment the rebel fleet appears above Endor to the destruction of the second Death Star. I remember watching that scene with awe when I was younger. It's visually gorgeous and it's just freaking cool. Say what you will about Ewoks, you all know the fight was entertaining. And how about that space battle? That's the one big difference between the originals and the prequels for me. In the new films, the space battles just aren't as impressive. They're CGed and seem too fake to me; I think they're a mark of how George Lucas has fallen into the CG trap with directors like Michael Bay. But the originals were just amazing. Yes, the visuals are flawed, and obviously so, but they are still so much more "real" than anything else. The miniatures used are beautiful. That's an impossible question to answer. It doesn't matter who I pick, I'm leaving someone out that deserves to be mentioned. So, hopefully people will forgive me if I play the exclusionary type and pick Captain Malcolm Reynolds from Firefly. He's witty, gruff, and almost everything a good spaceship captain should be. For very personal reasons, the hypospray needle-less vaccine gizmo from Star Trek. I hate needles something awful. I can deal with being stabbed by them, but there's no reason for us to still have needles for administering vaccines and medicines. Where are my hypospray things? Hmm? Where?
/** * @license Copyright 2016 Google Inc. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ 'use strict'; const Audit = require('./audit'); const i18n = require('../lib/i18n/i18n.js'); const ComputedUserTimings = require('../computed/user-timings.js'); const UIStrings = { /** Descriptive title of a diagnostic audit that provides details on any timestamps generated by the page. User Timing refers to the 'User Timing API', which enables a website to record specific times as 'marks', or spans of time as 'measures'. */ title: 'User Timing marks and measures', /** Description of a Lighthouse audit that tells the user they may want to use the User Timing API to help measure the performance of aspects of their page load and interaction. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ description: 'Consider instrumenting your app with the User Timing API to measure your ' + 'app\'s real-world performance during key user experiences. ' + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/user-timing).', /** [ICU Syntax] Label for an audit identifying the number of User Timing timestamps present in the page. */ displayValue: `{itemCount, plural, =1 {1 user timing} other {# user timings} }`, /** Label for the Name column in the User Timing event data table. User Timing API entries are added by the developer of the web page. An example user timing event name: 'pageload_logoimage_done' */ columnName: 'Name', /** Label for the Type column in the User Timing event data table. User Timing API entries are added by the developer of the web page. The only possible types are 'Mark' and Measure'. */ columnType: 'Type', /** Label for the Start Time column in the User Timing event data table. User Timing API entries are added by the developer of the web page. Start Times are the number of milliseconds since the page started loading, e.g. '380.26 ms' */ columnStartTime: 'Start Time', /** Label for the Duration column in the User Timing event data table. User Timing API entries are added by the developer of the web page. Durations are only provided for 'Measure' entries. Durations are the number of total number milliseconds from Start Time to their ending point. e.g. '2,020.64 ms' */ columnDuration: 'Duration', }; const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings); /** @typedef {{name: string, isMark: true, args: LH.TraceEvent['args'], startTime: number}} MarkEvent */ /** @typedef {{name: string, isMark: false, args: LH.TraceEvent['args'], startTime: number, endTime: number, duration: number}} MeasureEvent */ class UserTimings extends Audit { /** * @return {LH.Audit.Meta} */ static get meta() { return { id: 'user-timings', title: str_(UIStrings.title), description: str_(UIStrings.description), scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE, requiredArtifacts: ['traces'], }; } /** * @return {Array<string>} */ static get blacklistedPrefixes() { return ['goog_']; } /** * We remove mark/measures entered by third parties not of interest to the user * @param {MarkEvent|MeasureEvent} evt * @return {boolean} */ static excludeBlacklisted(evt) { return UserTimings.blacklistedPrefixes.every(prefix => !evt.name.startsWith(prefix)); } /** * @param {LH.Artifacts} artifacts * @param {LH.Audit.Context} context * @return {Promise<LH.Audit.Product>} */ static audit(artifacts, context) { const trace = artifacts.traces[Audit.DEFAULT_PASS]; return ComputedUserTimings.request(trace, context).then(computedUserTimings => { const userTimings = computedUserTimings.filter(UserTimings.excludeBlacklisted); const tableRows = userTimings.map(item => { return { name: item.name, startTime: item.startTime, duration: item.isMark ? undefined : item.duration, timingType: item.isMark ? 'Mark' : 'Measure', }; }).sort((itemA, itemB) => { if (itemA.timingType === itemB.timingType) { // If both items are the same type, sort in ascending order by time return itemA.startTime - itemB.startTime; } else if (itemA.timingType === 'Measure') { // Put measures before marks return -1; } else { return 1; } }); /** @type {LH.Audit.Details.Table['headings']} */ const headings = [ {key: 'name', itemType: 'text', text: str_(UIStrings.columnName)}, {key: 'timingType', itemType: 'text', text: str_(UIStrings.columnType)}, {key: 'startTime', itemType: 'ms', granularity: 0.01, text: str_(UIStrings.columnStartTime)}, {key: 'duration', itemType: 'ms', granularity: 0.01, text: str_(UIStrings.columnDuration)}, ]; const details = Audit.makeTableDetails(headings, tableRows); /** @type {string|undefined} */ let displayValue; if (userTimings.length) { displayValue = str_(UIStrings.displayValue, {itemCount: userTimings.length}); } return { // mark the audit as notApplicable if there were no user timings score: Number(userTimings.length === 0), notApplicable: userTimings.length === 0, displayValue, extendedInfo: { value: userTimings, }, details, }; }); } } module.exports = UserTimings; module.exports.UIStrings = UIStrings;
#!/bin/sh # # VIM config files # # This installs VIM config files. git clone git://github.com/isundaylee/vimrc.git ~/.vim_runtime sh ~/.vim_runtime/install_awesome_vimrc.sh
Christopher from Orlando, Florida recently completed his latest home improvement project that included one of our many decorative gable vents! Perfectly placed next to the white trimming of his home, the gable vents beautifully accompany the front of his house. The specific gable vent used in this project photo is the Round Sunburst with Moulded Trim and Keystones gable vent. Feel free to check our entire line of gable vents below!
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.table.dataformat.vector; import org.apache.flink.table.dataformat.ColumnarRow; import org.apache.flink.table.dataformat.vector.heap.HeapBooleanVector; import org.apache.flink.table.dataformat.vector.heap.HeapByteVector; import org.apache.flink.table.dataformat.vector.heap.HeapBytesVector; import org.apache.flink.table.dataformat.vector.heap.HeapDoubleVector; import org.apache.flink.table.dataformat.vector.heap.HeapFloatVector; import org.apache.flink.table.dataformat.vector.heap.HeapIntVector; import org.apache.flink.table.dataformat.vector.heap.HeapLongVector; import org.apache.flink.table.dataformat.vector.heap.HeapShortVector; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; /** * Test {@link VectorizedColumnBatch}. */ public class VectorizedColumnBatchTest { private static final int VECTOR_SIZE = 1024; @Test public void testTyped() { HeapBooleanVector col0 = new HeapBooleanVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { col0.vector[i] = i % 2 == 0; } HeapBytesVector col1 = new HeapBytesVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { byte[] bytes = String.valueOf(i).getBytes(); col1.setVal(i, bytes, 0, bytes.length); } HeapByteVector col2 = new HeapByteVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { col2.vector[i] = (byte) i; } HeapDoubleVector col3 = new HeapDoubleVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { col3.vector[i] = i; } HeapFloatVector col4 = new HeapFloatVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { col4.vector[i] = i; } HeapIntVector col5 = new HeapIntVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { col5.vector[i] = i; } HeapLongVector col6 = new HeapLongVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { col6.vector[i] = i; } HeapShortVector col7 = new HeapShortVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { col7.vector[i] = (short) i; } VectorizedColumnBatch batch = new VectorizedColumnBatch( new ColumnVector[]{col0, col1, col2, col3, col4, col5, col6, col7}); for (int i = 0; i < VECTOR_SIZE; i++) { ColumnarRow row = new ColumnarRow(batch, i); assertEquals(row.getBoolean(0), i % 2 == 0); assertEquals(row.getString(1).toString(), String.valueOf(i)); assertEquals(row.getByte(2), (byte) i); assertEquals(row.getDouble(3), (double) i, 0); assertEquals(row.getFloat(4), (float) i, 0); assertEquals(row.getInt(5), i); assertEquals(row.getLong(6), (long) i); assertEquals(row.getShort(7), (short) i); } } @Test public void testNull() { // all null HeapIntVector col0 = new HeapIntVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { col0.setNullAt(i); } // some null HeapIntVector col1 = new HeapIntVector(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { if (i % 2 == 0) { col1.setNullAt(i); } else { col1.vector[i] = i; } } VectorizedColumnBatch batch = new VectorizedColumnBatch(new ColumnVector[]{col0, col1}); for (int i = 0; i < VECTOR_SIZE; i++) { ColumnarRow row = new ColumnarRow(batch, i); assertTrue(row.isNullAt(0)); if (i % 2 == 0) { assertTrue(row.isNullAt(1)); } else { assertEquals(row.getInt(1), i); } } } @Test public void testDictionary() { // all null HeapIntVector col = new HeapIntVector(VECTOR_SIZE); int[] dict = new int[2]; dict[0] = 1998; dict[1] = 9998; col.setDictionary(new TestDictionary(dict)); HeapIntVector heapIntVector = col.reserveDictionaryIds(VECTOR_SIZE); for (int i = 0; i < VECTOR_SIZE; i++) { heapIntVector.vector[i] = i % 2 == 0 ? 0 : 1; } VectorizedColumnBatch batch = new VectorizedColumnBatch(new ColumnVector[]{col}); for (int i = 0; i < VECTOR_SIZE; i++) { ColumnarRow row = new ColumnarRow(batch, i); if (i % 2 == 0) { assertEquals(row.getInt(0), 1998); } else { assertEquals(row.getInt(0), 9998); } } } private final class TestDictionary implements Dictionary { private int[] intDictionary; public TestDictionary(int[] dictionary) { this.intDictionary = dictionary; } @Override public int decodeToInt(int id) { return intDictionary[id]; } @Override public long decodeToLong(int id) { throw new UnsupportedOperationException("Dictionary encoding does not support float"); } @Override public float decodeToFloat(int id) { throw new UnsupportedOperationException("Dictionary encoding does not support float"); } @Override public double decodeToDouble(int id) { throw new UnsupportedOperationException("Dictionary encoding does not support double"); } @Override public byte[] decodeToBinary(int id) { throw new UnsupportedOperationException("Dictionary encoding does not support String"); } } }
Blake Marks-Dias: Corr Cronin: Business Litigation Attorneys, Seattle, Wa. Blake is a partner in the firm. His practice focuses on cases which the client “must win” and, when necessary, which must be tried. Blake has been widely recognized by his peers for his trial skills. He has consistently been listed as a Washington Super Lawyer (top 5% of attorneys statewide), and in 2016, 2017, and 2018 was listed as a Top 100 Super Lawyer. He is on the faculty of the National Institute for Trial Advocacy. Blake is also actively engaged in the community. He is the President of the Board of Northwest Health Law Advocates (NoHLA) and is a member of the Board of Trustees for Childhaven. Prior to joining the firm, Blake was a partner at Riddell Williams where he represented a broad mix of clients in complex litigation. In college, he earned the award of the top individual debater in the nation. He and his partner finished second in the 1995 national tournament (final round transcript published in one of the leading college speech and communications textbooks: Freeley and Steinberg, Argumentation and Debate (12th ed. 2009)). Defense verdict for Fortune 50 client following jury trial in employment discrimination case. Defense verdict following a three-week jury trial on behalf of the University of Washington in alleged employment discrimination case. Defense verdict following a three-week jury trial in Portland, Oregon, on behalf of client weatherproofing membrane manufacturer and its product consultant. The case involved a mix of product liability and professional liability claims. Currently representing a defendant former property owner in multi-million-dollar MTCA lawsuit. Multi-million dollar recovery on behalf of investor client in case involving mix of contract and professional negligence claims. Suzlon Energy Ltd. v. Microsoft, 671 F.3d 726 (9th Circuit 2011) – finding Electronic Communications Privacy Act’s protections applicable to foreigners in case of first impression. Unthaksinkun v. Porter, 2011 WL 4502050 (W.D. Wash. 2011) – order affirming motion for class certification and for preliminary injunction in case arising out of state’s unlawful termination of health care benefits for over 11,000 class members. Somal v. Allstate, 165 Wn. App. 1025 (2012) – reversal of trial court and remand for dismissal of putative class action claims based on insurer’s alleged duty to share recovery of deductibles. Favorable property valuation following two-week jury trial for public utility client in condemnation case. Favorable settlement on behalf of plaintiff property owner on eve of trial in multi-million-dollar MTCA lawsuit against neighboring polluting property owner.
package gh2013.payloads import net.liftweb.json.JsonAST.JValue case class IssuesEventPayload(number: Long, action: String, issue: Long) object IssuesEventPayload { def apply(json: JValue): Option[IssuesEventPayload] = { val n2l = gh3.node2Long(json)(_) val number = n2l("number") val action = gh3.node2String(json)("action") val issue = n2l("issue") val params = Seq(number, action, issue) if(params.forall(_.isDefined)) Some(IssuesEventPayload(number.get, action.get, issue.get)) else None } }
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Struct as_feature&lt;tag::mean_of_weights(lazy)&gt;</title> <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> <link rel="up" href="../../accumulators/reference.html#header.boost.accumulators.statistics.mean_hpp" title="Header &lt;boost/accumulators/statistics/mean.hpp&gt;"> <link rel="prev" href="as_feature_tag_idp26557216.html" title="Struct as_feature&lt;tag::mean(immediate)&gt;"> <link rel="next" href="as_feature_tag_idp26559168.html" title="Struct as_feature&lt;tag::mean_of_weights(immediate)&gt;"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> <td align="center"><a href="../../../../index.html">Home</a></td> <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="as_feature_tag_idp26557216.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../accumulators/reference.html#header.boost.accumulators.statistics.mean_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_feature_tag_idp26559168.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="refentry"> <a name="boost.accumulators.as_feature_tag_idp26558192"></a><div class="titlepage"></div> <div class="refnamediv"> <h2><span class="refentrytitle">Struct as_feature&lt;tag::mean_of_weights(lazy)&gt;</span></h2> <p>boost::accumulators::as_feature&lt;tag::mean_of_weights(lazy)&gt;</p> </div> <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../accumulators/reference.html#header.boost.accumulators.statistics.mean_hpp" title="Header &lt;boost/accumulators/statistics/mean.hpp&gt;">boost/accumulators/statistics/mean.hpp</a>&gt; </span> <span class="keyword">struct</span> <a class="link" href="as_feature_tag_idp26558192.html" title="Struct as_feature&lt;tag::mean_of_weights(lazy)&gt;">as_feature</a><span class="special">&lt;</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">mean_of_weights</span><span class="special">(</span><span class="identifier">lazy</span><span class="special">)</span><span class="special">&gt;</span> <span class="special">{</span> <span class="comment">// types</span> <span class="keyword">typedef</span> <a class="link" href="tag/mean_of_weights.html" title="Struct mean_of_weights">tag::mean_of_weights</a> <a name="boost.accumulators.as_feature_tag_idp26558192.type"></a><span class="identifier">type</span><span class="special">;</span> <span class="special">}</span><span class="special">;</span></pre></div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2005, 2006 Eric Niebler<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="as_feature_tag_idp26557216.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../accumulators/reference.html#header.boost.accumulators.statistics.mean_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_feature_tag_idp26559168.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
I have been quite busy since I last spoke to you all. (Including last weekend in Cape Town) So I have written the latest installment of Forced Removal over several days. Jamie, Robert and Laura report back on their findings on Baltra and this results in a re-evaluation of the surveys and the terms of reference of the study on Baltra. Not surprisingly therefor, this installment is called Re-evaluation.
Reboot of the Summer Classics collection circa 1999, Kennebunkport, originally made in pine wood, now designed in aluminum, offers a modern take on this classic design. The beauty of this collection is the versatility to be used individually or to mix with multiple other collections. Crafted using Summer Classics’ premium, wrought aluminum and a powder-coated finish, this collection offers a timeless look to any outdoor space.
See all 1 one bedroom apartments currently available for rent in Edgar County, IL. Check prices, compare amenities, view photos and floor plans, and explore area maps. Once you find the perfect 1 bedroom apartment, you can submit your lease application and receive a timely response to it. Residents of Edgar County, IL apartment buildings listed on RENTCafé can also submit online maintenance requests, renew their lease, and pay rent online (where available).