- CenterPanelScale - Static variable in class edu.ucsb.cs56.drawings.jstaahl.advanced.Pencil
-
- Circle - Class in edu.ucsb.cs56.drawings.jstaahl.simple
-
Circle extends Ellipse2D to make it easier to draw circles
because the parameters to the constructor are more convenient
- Circle(double, double, double) - Constructor for class edu.ucsb.cs56.drawings.jstaahl.simple.Circle
-
Constructor for objects of class Circle
- Circle - Class in edu.ucsb.cs56.drawings.pconrad.simple
-
Circle extends Ellipse2D to make it easier to draw circles
because the parameters to the constructor are more convenient
- Circle(double, double, double) - Constructor for class edu.ucsb.cs56.drawings.pconrad.simple.Circle
-
Constructor for objects of class Circle
- Circle - Class in edu.ucsb.cs56.drawings.peng00.simple
-
Circle extends Ellipse2D to make it easier to draw circles
because the parameters to the constructor are more convenient
- Circle(double, double, double) - Constructor for class edu.ucsb.cs56.drawings.peng00.simple.Circle
-
Constructor for objects of class Circle
- CoffeeCup - Class in edu.ucsb.cs56.drawings.pconrad.advanced
-
A Coffee Cup (wrapper around a General Path, implements Shape)
This provides an example of how you can start with the coordinates
of a hard coded object, and end up with an object that can be
drawn anywhere, with any width or height.
- CoffeeCup(double, double, double, double) - Constructor for class edu.ucsb.cs56.drawings.pconrad.advanced.CoffeeCup
-
Constructor for objects of class CoffeeCup
- CoffeeCup - Class in edu.ucsb.cs56.drawings.peng00.advanced
-
A Coffee Cup (wrapper around a General Path, implements Shape)
This provides an example of how you can start with the coordinates of a hard
coded object, and end up with an object that can be drawn anywhere, with any
width or height.
- CoffeeCup(double, double, double, double) - Constructor for class edu.ucsb.cs56.drawings.peng00.advanced.CoffeeCup
-
Constructor for objects of class CoffeeCup
- contains(double, double) - Method in class edu.ucsb.cs56.drawings.utilities.GeneralPathWrapper
-
- contains(double, double, double, double) - Method in class edu.ucsb.cs56.drawings.utilities.GeneralPathWrapper
-
Tests if the interior of the Shape entirely contains the
specified rectangular area.
- contains(Point2D) - Method in class edu.ucsb.cs56.drawings.utilities.GeneralPathWrapper
-
Tests if a specified Point2D is inside the boundary of
the Shape.
- contains(Rectangle2D) - Method in class edu.ucsb.cs56.drawings.utilities.GeneralPathWrapper
-
Tests if the interior of the Shape entirely contains the
specified Rectangle2D.
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.andrewberls.advanced.AnimatedPictureViewer
-
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.andrewberls.advanced.MultiPictureViewer
-
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.andrewberls.advanced.WritePictureToFile
-
Write the chosen picture to a file.
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.jstaahl.advanced.AnimatedPictureViewer
-
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.jstaahl.advanced.MultiPictureViewer
-
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.jstaahl.advanced.WritePictureToFile
-
Write the drawFourCoffeeCups picture to a file.
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.jstaahl.simple.PictureViewer
-
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.jstaahl.SimpleGui1
-
main method to fire up a JFrame on the screen
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.pconrad.advanced.MultiPictureViewer
-
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.pconrad.advanced.WritePictureToFile
-
Write the chosen picture to a file.
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.pconrad.simple.PictureViewer
-
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.pconrad.SimpleGui1
-
main method to fire up a JFrame on the screen
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.peng00.advanced.MultiPictureViewer
-
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.peng00.advanced.WritePictureToFile
-
Write the chosen picture to a file.
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.peng00.simple.PictureViewer
-
- main(String[]) - Static method in class edu.ucsb.cs56.drawings.peng00.SimpleGui1
-
main method to fire up a JFrame on the screen
- MultiPictureComponent - Class in edu.ucsb.cs56.drawings.andrewberls.advanced
-
A component that draws pictures by Andrew Berls
- MultiPictureComponent(int) - Constructor for class edu.ucsb.cs56.drawings.andrewberls.advanced.MultiPictureComponent
-
- MultiPictureComponent - Class in edu.ucsb.cs56.drawings.jstaahl.advanced
-
A component that draws one of three pictures by Jakob Staahl
- MultiPictureComponent(int) - Constructor for class edu.ucsb.cs56.drawings.jstaahl.advanced.MultiPictureComponent
-
- MultiPictureComponent - Class in edu.ucsb.cs56.drawings.pconrad.advanced
-
A component that draws a Picture by Phill Conrad
- MultiPictureComponent(int) - Constructor for class edu.ucsb.cs56.drawings.pconrad.advanced.MultiPictureComponent
-
- MultiPictureComponent - Class in edu.ucsb.cs56.drawings.peng00.advanced
-
A component that draws a Picture by Phill Conrad
- MultiPictureComponent(int) - Constructor for class edu.ucsb.cs56.drawings.peng00.advanced.MultiPictureComponent
-
- MultiPictureViewer - Class in edu.ucsb.cs56.drawings.andrewberls.advanced
-
A viewer class to see pictures drawn by Andrew Berls
- MultiPictureViewer() - Constructor for class edu.ucsb.cs56.drawings.andrewberls.advanced.MultiPictureViewer
-
- MultiPictureViewer - Class in edu.ucsb.cs56.drawings.jstaahl.advanced
-
A viewer class to see a picture I drew with
just three simple Java graphics objects, namely
Rectangle, Line2D.Double, Ellipse2D.Double
- MultiPictureViewer() - Constructor for class edu.ucsb.cs56.drawings.jstaahl.advanced.MultiPictureViewer
-
- MultiPictureViewer - Class in edu.ucsb.cs56.drawings.pconrad.advanced
-
A viewer class to see a picture I drew with
just three simple Java graphics objects, namely
Rectangle, Line2D.Double, Ellipse2D.Double
- MultiPictureViewer() - Constructor for class edu.ucsb.cs56.drawings.pconrad.advanced.MultiPictureViewer
-
- MultiPictureViewer - Class in edu.ucsb.cs56.drawings.peng00.advanced
-
A viewer class to see a picture I drew with just three simple Java graphics
objects, namely Rectangle, Line2D.Double, Ellipse2D.Double
- MultiPictureViewer() - Constructor for class edu.ucsb.cs56.drawings.peng00.advanced.MultiPictureViewer
-
- paintComponent(Graphics) - Method in class edu.ucsb.cs56.drawings.andrewberls.advanced.MultiPictureComponent
-
The paintComponent method is always required if you want
any graphics to appear in your JComponent.
- paintComponent(Graphics) - Method in class edu.ucsb.cs56.drawings.jstaahl.advanced.AnimatedPictureComponent
-
The paintComponent method is orverriden to display
out animation.
- paintComponent(Graphics) - Method in class edu.ucsb.cs56.drawings.jstaahl.advanced.MultiPictureComponent
-
The paintComponent method is always required if you want
any graphics to appear in your JComponent.
- paintComponent(Graphics) - Method in class edu.ucsb.cs56.drawings.jstaahl.simple.PictureComponent
-
The paintComponent method is always required if you want
any graphics to appear in your JComponent.
- paintComponent(Graphics) - Method in class edu.ucsb.cs56.drawings.pconrad.advanced.MultiPictureComponent
-
The paintComponent method is always required if you want
any graphics to appear in your JComponent.
- paintComponent(Graphics) - Method in class edu.ucsb.cs56.drawings.pconrad.simple.PictureComponent
-
The paintComponent method is always required if you want
any graphics to appear in your JComponent.
- paintComponent(Graphics) - Method in class edu.ucsb.cs56.drawings.peng00.advanced.MultiPictureComponent
-
The paintComponent method is always required if you want
any graphics to appear in your JComponent.
- paintComponent(Graphics) - Method in class edu.ucsb.cs56.drawings.peng00.simple.PictureComponent
-
The paintComponent method is always required if you want any graphics to
appear in your JComponent.
- Pencil - Class in edu.ucsb.cs56.drawings.jstaahl.advanced
-
A vector drawing of a pencil that implements
the Shape interface, and so can be drawn, as well as
rotated, scaled, etc.
- Pencil(double, double, double, double) - Constructor for class edu.ucsb.cs56.drawings.jstaahl.advanced.Pencil
-
Constructor
- PictureComponent - Class in edu.ucsb.cs56.drawings.jstaahl.simple
-
A component that draws a Picture by Phill Conrad
- PictureComponent() - Constructor for class edu.ucsb.cs56.drawings.jstaahl.simple.PictureComponent
-
- PictureComponent - Class in edu.ucsb.cs56.drawings.pconrad.simple
-
A component that draws a Picture by Phill Conrad
- PictureComponent() - Constructor for class edu.ucsb.cs56.drawings.pconrad.simple.PictureComponent
-
- PictureComponent - Class in edu.ucsb.cs56.drawings.peng00.simple
-
A component that draws a Picture by Phill Conrad
- PictureComponent() - Constructor for class edu.ucsb.cs56.drawings.peng00.simple.PictureComponent
-
- PictureViewer - Class in edu.ucsb.cs56.drawings.jstaahl.simple
-
A viewer class to see a picture I drew with
just three simple Java graphics objects, namely
Rectangle, Line2D.Double, Ellipse2D.Double
- PictureViewer() - Constructor for class edu.ucsb.cs56.drawings.jstaahl.simple.PictureViewer
-
- PictureViewer - Class in edu.ucsb.cs56.drawings.pconrad.simple
-
A viewer class to see a picture I drew with
just three simple Java graphics objects, namely
Rectangle, Line2D.Double, Ellipse2D.Double
- PictureViewer() - Constructor for class edu.ucsb.cs56.drawings.pconrad.simple.PictureViewer
-
- PictureViewer - Class in edu.ucsb.cs56.drawings.peng00.simple
-
A viewer class to see a picture I drew with
just three simple Java graphics objects, namely
Rectangle, Line2D.Double, Ellipse2D.Double
- PictureViewer() - Constructor for class edu.ucsb.cs56.drawings.peng00.simple.PictureViewer
-


New York Times Cooking allows readers to find, save and organize recipes using our website and app. We also send an email newsletter four times per week.
Yes. There is a Cooking app available for any iPad or iPhone with iOS 8.0 or later. For all other devices, you can visit our mobile site at cooking.nytimes.com.
Cooking is designed to make cooking easier. It provides inspiration on what to cook as well as helps you find, save and organize recipes. The Dining section publishes feature stories, food news, recipes and more.
No. Anyone may access unlimited recipes, collections and videos on the website and in the app. To save or rate recipes, you will need to register an account on NYTimes.com.
Please note that articles in the Dining section that are not part of New York Times Cooking will count toward your monthly limit.
You can save any recipe from a recipe card or the recipe page. Saved recipes will be available in your recipe box.
From the website:
If you hover over a recipe card on the website, a save icon will appear. Click this icon to save the recipe to your recipe box. On a recipe page, the save button is in the top right corner or directly under the recipe title.
Saved recipes will be available in your recipe box. You can visit your recipe box by clicking Recipe Box on the menu bar at the top of the screen or by opening the recipe drawer with the top left button from anywhere on the site.
From the app:
Click Save on a recipe card to save it to your Recipe Box. On a recipe page, the save button is in the top right corner.
No. You can download the app and browse the website without logging in. However, you will need to log in to rate recipes or save them to your recipe box.
The recipes are updated every day.
The New York Times Cooking app is available in the App Store. The app includes all of the recipes and collections featured on the website.
The Cooking app is currently available only on iPad and iPhone. However, the website may be accessed through any smartphone or tablet.
To share a recipe via Facebook or Pinterest, choose one of these tools while on the recipe page. To share a recipe via email or Twitter, click the arrow button in the top right corner of the recipe page, then choose one of these tools.
From the app:
To share a recipe or collection with friends via Twitter, Facebook, text message or email, tap the share icon (on iPhone) or Share (on iPad), then choose your sharing tool.
Click the print button in the top right corner of the recipe page.
Currently, you can read Notes in our iOS app, but you cannot create them. To read Notes, tap the icon in the top right of the screen. To create Notes from your iPhone or iPad, scroll to the bottom of the existing Notes and tap the link to open the recipe in Safari.
We are interested in your feedback and suggestions about our recipes. We look for Notes that might prove helpful to other readers who are preparing to cook a meal.
It’s O.K. if you don’t like a certain recipe or the ingredients listed, however, your Notes should offer constructive information for other readers.
A few things we won't tolerate: personal attacks, obscenity, vulgarity, profanity (including expletives and letters followed by dashes), commercial promotion, impersonations, incoherence and SHOUTING.
We moderate Notes to ensure that NYT Cooking is a reputable space to gather useful information about a recipe.
We hope to create an atmosphere in which people who use NYT Cooking can rely on Notes as a trustworthy source for critical feedback or tips regarding published recipes.
While most Notes will be posted expediently if they are on-topic and not abusive, moderating decisions are subjective and may take some time. We will make them as carefully and consistently as we can.
We ask you to complete the simple NYTimes.com registration process to ensure that you are a "real" person and that you accept our terms and conditions. The registration process serves to facilitate the development of our online community and ensure that members take responsibility for their comments. For more information, please see our Registration FAQ.
If you don’t already have a user name, you will be prompted to enter one:
After doing this, you can change your Cooking user name at any time. Click the settings icon in the top right and select Edit Profile.
Changing your user name updates how your name is displayed across the Cooking site, including Notes that you’ve already added to recipes.
When you leave a Note, your photo and your user name will be displayed with a link to your recipe box. Your email address will not be displayed anywhere on the site, and private notes will be visible only to you.
We welcome comments and suggestions, or complaints about errors that warrant correction. Messages can be emailed to<EMAIL_ADDRESS>We offer tools on desktop, phone, and all major browsers to help you easily save as you browse recipes across the web. Learn about all of our saving tools on our Tools page.
At this time, non-NYTimes recipes cannot be organized into different folders; however, we are planning this feature for an upcoming release.
An Evernote account is not required to save recipes. However, if you’d like to save recipes that aren’t on the web (e.g. that you’ve authored) to your Recipe Box, at this time please create the recipe in Evernote before sync-ing it to Cooking.
You can sync your accounts by simply logging into to both NYT Cooking and Evernote and confirming the sync; start by going to the bottom of the Tools page and clicking on the button “Connect With Evernote.”
We import all of your Evernote notes that Evernote has automatically identified as a recipe (see more information at Evernote Support), into your Recipe Box Evernote folder. If you have clipped NYT Cooking recipes into Evernote, those will sync to your Recipe Box as regular Cooking recipes, rather than into your Recipe Box Evernote folder.
Our system automatically keeps your Recipe Box up-to-date and imports new recipes every time you save a recipe to your Evernote account.
We import all of your Evernote notes that Evernote has automatically identified as a recipe. If your note was wrongly identified as a recipe, please contact Evernote Support.
First, access the Tools page. (On the iPad or iPhone app, tap on the main menu button on the top left of the screen, tap on the last menu item “Settings”, and in the pop up tap on “Tools for Saving Recipes”. On the website, click on menu button on the top left of the screen, and click the “Tools” link at the bottom of the menu.)
Scroll down to the bottom of the Tools page to find the “Unlink from Evernote” button.
At this time, we only support linking one Evernote account to your NYT Cooking Recipe Box.
In your Evernote account, you can find all your Cooking recipes under the “NYT Cooking” notebook.


You want to have crazy visual hallucinations? Stronger and more realistic than LSD or Shrooms or 2-CB? Well I have the drug for you. Alcohol.
Over the last year I progressed from a social drinker to a full blown alcoholic. I am not lying when I state that I could drink an entire 750ml bottle of vodka every single evening and not feel drunk in the slightest. For the last 3 or 4 months I just drank to keep the shakes and panic attacks away - I had no desire to get drunk, I just drank to stay sane.
Well, on New Year's day I decided enough was enough, and I quit cold turkey.
Bad idea.
I had managed to get 20 valium in order to help ease the withdrawlas and prevent delirium tremens in case things got ugly. Probably saved my life, really.
The first day with no alcohol I was a jittery paranoid mess - my heartrate was around 120bpm constantly, even when taking valium. I was sweating and freezing at the same time, and dizzy constantly. I had to call in sick for work because I literally could not stop shaking.
The second day is where the fun began. I'm being facetious.
All day long I kept seeing things out of the corner of my eye, almost like the shadow people seen after a 3-day meth binge. And then I started hearing things. And by 'things' I dont mean an occasional noise or sound that doesnt exist- I mean I started hearing voices everywhere. My guitar would whisper at me whenever I walked by it, and the wallpaper would tell me that it planned to kill me. In perfect english, and perfectly audible. Just as real as if someone was standing behind the wall shouting at me.
At this point I downed 4 valium in an attempt to knock myself out and avoid the madness.
As I turned off the lights and laid down in bed, the visuals began. I still don't know how to describe what I saw- the visuals were brightly colored and constantly swirling and spinning.. I saw flourescent outlined people walking around behind my eyelids, waves crashing against beaches, animals running around, friends and family walking towards me. I had an overpowering sense that my life was flashing before my eyes and I was minutes away from death. These visuals were more 'real' than anything I had ever seen, and I've tried almost every hallucinogen known to man. They were in a totally different category of strangeness. It absolutely scared the living daylights out of me. I quickly took 3 more valium and laid there shaking and crying, praying that I would soon pass out.
About an hour later, I finally blacked out.
The next day I was fine, except for a little residual case of the shakes.
I will never drink alcohol again, period. I clearly can't control my consumption and don't want to take the chance that I could end up in this sort of situation ever again.
No other drug has ever caused me so much grief in my entire life. I have tried basically every drug there is, except heroin, and had absolutely no problem with addiction. But alcohol is a different story altogether.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Vision-Based Indoor Localization of Nano Drone and its Applications
Under Review
S.Singh, F.Pocker, V.Fernandez, K. Arya
Abstract
Indoor localization of aerial vehicles are always a challenging and interesting research problem. There have been many
target recognition and locating technologies in recent years which uses the on-board camera of the drone or motion
capturing system to localize it. We propose here an affordable and accurate vision based indoor localization and
navigation model for Nano drone, in which a monocular camera and WhyCon marker are used for localization. An
overhead camera is used to track the marker on top of the drone. Using a modified ROS (Robot Operating System)
package of marker detection, the markers are detected and their respective positions in 3d space are computed. The
control system approach presented in this work is based on three parallel PID controller on an external control loop
based on the camera feedback to command the velocity of Nano drone in direction of its pitch, roll and throttle. The
applications such as Autonomous Path planning, Landing on a moving platform and Multi drone demonstrates the
feasibility of the proposed method, which opens new possibilities for the autonomous navigation of Nano-drones.
2019
Learning control system design using Nano drone in a PBL focused robotics competition
epiSTEME 8 Inter-national Conference to Review Research on Science, Technology and Mathematics Education; 111-120
F.Pocker, R.Madan, K.Arya
Abstract
Teaching advanced conceptual knowledge and practical skills in a hands-on-manner to a
large number of students is a challenge. The e-Yantra project hosted in IIT-Bombay, through
it's e-Yantra Robotics Competition(eYRC) for college students, teaches these skills scalably.
Participation is free and hardware is shipped to participants who are mentored constantly
throughout the competition. The 7th edition of the competition, eYRC-2018, had a theme (a
gamified problem statement), called “Hungry Bird,” that taught Marker-Based Localization,
Path planning using OMPL, and Waypoint Navigation using PID on a nano-drone using
open source platforms such as ROS and V-REP. This paper outlines how we optimally
designed and deployed these concepts as a series of tasks which eventually helped us to
quantify the learning outcomes among students. 832 students were assigned this theme, and
to achieve scale most of the tasks were automatically evaluated. Finally we illustrated how
we have achieved the effectiveness of the theme with task results and participant’s feedback.
This study and its outcomes are beneficial for academicians seeking to teach advanced
engineering skills at a large scale.


Ruby on Rails 2.2 Release Notes
Rails 2.2 delivers a number of new and improved features. This list covers the major upgrades, but doesn't include every little bug fix and change. If you want to see everything, check out the list of commits in the main Rails repository on GitHub.
Along with Rails, 2.2 marks the launch of the Ruby on Rails Guides, the first results of the ongoing Rails Guides hackfest. This site will deliver high-quality documentation of the major features of Rails.
1. Infrastructure
Rails 2.2 is a significant release for the infrastructure that keeps Rails humming along and connected to the rest of the world.
1.1. Internationalization
Rails 2.2 supplies an easy system for internationalization (or i18n, for those of you tired of typing).
-
Lead Contributors: Rails i18 Team
-
More information :
1.2. Compatibility with Ruby 1.9 and JRuby
Along with thread safety, a lot of work has been done to make Rails work well with JRuby and the upcoming Ruby 1.9. With Ruby 1.9 being a moving target, running edge Rails on edge Ruby is still a hit-or-miss proposition, but Rails is ready to make the transition to Ruby 1.9 when the latter is released.
2. Documentation
The internal documentation of Rails, in the form of code comments, has been improved in numerous places. In addition, the Ruby on Rails Guides project is the definitive source for information on major Rails components. In its first official release, the Guides page includes:
All told, the Guides provide tens of thousands of words of guidance for beginning and intermediate Rails developers.
If you want to these generate guides locally, inside your application:
rake doc:guides
This will put the guides inside RAILS_ROOT/doc/guides and you may start surfing straight away by opening RAILS_ROOT/doc/guides/index.html in your favourite browser.
-
Lead Contributors: Rails Documentation Team
-
Major contributions from Xavier Noria and Hongli Lai.
-
More information:
3. Better integration with HTTP : Out of the box ETag support
Supporting the etag and last modified timestamp in HTTP headers means that Rails can now send back an empty response if it gets a request for a resource that hasn't been modified lately. This allows you to check whether a response needs to be sent at all.
class ArticlesController < ApplicationController def show_with_respond_to_block @article = Article.find(params[:id]) # If the request sends headers that differs from the options provided to stale?, then # the request is indeed stale and the respond_to block is triggered (and the options # to the stale? call is set on the response). # # If the request headers match, then the request is fresh and the respond_to block is # not triggered. Instead the default render will occur, which will check the last-modified # and etag headers and conclude that it only needs to send a "304 Not Modified" instead # of rendering the template. if stale?(:last_modified => @article.published_at.utc, :etag => @article) respond_to do |wants| # normal response processing end end end def show_with_implied_render @article = Article.find(params[:id]) # Sets the response headers and checks them against the request, if the request is stale # (i.e. no match of either etag or last-modified), then the default render of the template happens. # If the request is fresh, then the default render will return a "304 Not Modified" # instead of rendering the template. fresh_when(:last_modified => @article.published_at.utc, :etag => @article) end end
4. Thread Safety
The work done to make Rails thread-safe is rolling out in Rails 2.2. Depending on your web server infrastructure, this means you can handle more requests with fewer copies of Rails in memory, leading to better server performance and higher utilization of multiple cores.
To enable multithreaded dispatching in production mode of your application, add the following line in your config/environments/production.rb:
config.threadsafe!
5. Active Record
There are two big additions to talk about here: transactional migrations and pooled database transactions. There's also a new (and cleaner) syntax for join table conditions, as well as a number of smaller improvements.
5.1. Transactional Migrations
Historically, multiple-step Rails migrations have been a source of trouble. If something went wrong during a migration, everything before the error changed the database and everything after the error wasn't applied. Also, the migration version was stored as having been executed, which means that it couldn't be simply rerun by rake db:migrate:redo after you fix the problem. Transactional migrations change this by wrapping migration steps in a DDL transaction, so that if any of them fail, the entire migration is undone. In Rails 2.2, transactional migrations are supported on PostgreSQL only. The code is extensible to other database types in the future.
-
Lead Contributor: Adam Wiggins
-
More information:
5.2. Connection Pooling
Connection pooling lets Rails distribute database requests across a pool of database connections that will grow to a maximum size (by default 5, but you can add a pool key to your database.yml to adjust this). This helps remove bottlenecks in applications that support many concurrent users. There's also a wait_timeout that defaults to 5 seconds before giving up. ActiveRecord::Base.connection_pool gives you direct access to the pool if you need it.
development: adapter: mysql username: root database: sample_development pool: 10 wait_timeout: 10
-
Lead Contributor: Nick Sieger
-
More information:
5.3. Hashes for Join Table Conditions
You can now specify conditions on join tables using a hash. This is a big help if you need to query across complex joins.
class Photo < ActiveRecord::Base belongs_to :product end class Product < ActiveRecord::Base has_many :photos end # Get all products with copyright-free photos: Product.all(:joins => :photos, :conditions => { :photos => { :copyright => false }})
-
More information:
5.4. New Dynamic Finders
Two new sets of methods have been added to Active Record's dynamic finders family.
5.4.1. find_last_by_<attribute>
The find_last_by_<attribute> method is equivalent to Model.last(:conditions ⇒ {:attribute ⇒ value})
# Get the last user who signed up from London User.find_last_by_city('London')
-
Lead Contributor: Emilio Tagua
5.4.2. find_by_<attribute>!
The new bang! version of find_by_<attribute>! is equivalent to Model.first(:conditions ⇒ {:attribute ⇒ value}) || raise ActiveRecord::RecordNotFound Instead of returning nil if it can't find a matching record, this method will raise an exception if it cannot find a match.
# Raise ActiveRecord::RecordNotFound exception if 'Moby' hasn't signed up yet! User.find_by_name!('Moby')
-
Lead Contributor: Josh Susser
5.5. Associations Respect Private/Protected Scope
Active Record association proxies now respect the scope of methods on the proxied object. Previously (given User has_one :account) @user.account.private_method would call the private method on the associated Account object. That fails in Rails 2.2; if you need this functionality, you should use @user.account.send(:private_method) (or make the method public instead of private or protected). Please note that if you're overriding method_missing, you should also override respond_to to match the behavior in order for associations to function normally.
-
Lead Contributor: Adam Milligan
-
More information:
5.6. Other ActiveRecord Changes
-
rake db:migrate:redo now accepts an optional VERSION to target that specific migration to redo
-
Set config.active_record.timestamped_migrations = false to have migrations with numeric prefix instead of UTC timestamp.
-
Counter cache columns (for associations declared with :counter_cache ⇒ true) do not need to be initialized to zero any longer.
-
ActiveRecord::Base.human_name for an internationalization-aware humane translation of model names
6. Action Controller
On the controller side, there are a couple of changes that will help tidy up your routes.
6.1. Shallow Route Nesting
Shallow route nesting provides a solution to the well-known difficulty of using deeply-nested resources. With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with - but you can supply more information.
map.resources :publishers, :shallow => true do |publisher| publisher.resources :magazines do |magazine| magazine.resources :photos end end
This will enable recognition of (among others) these routes:
/publishers/1 ==> publisher_path(1) /publishers/1/magazines ==> publisher_magazines_path(1) /magazines/2 ==> magazine_path(2) /magazines/2/photos ==> magazines_photos_path(2) /photos/3 ==> photo_path(3)
-
Lead Contributor: S. Brent Faulkner
-
More information:
6.2. Method Arrays for Member or Collection Routes
You can now supply an array of methods for new member or collection routes. This removes the annoyance of having to define a route as accepting any verb as soon as you need it to handle more than one. With Rails 2.2, this is a legitimate route declaration:
map.resources :photos, :collection => { :search => [:get, :post] }
-
Lead Contributor: Brennan Dunn
Action Controller now offers good support for HTTP conditional GET requests, as well as some other additions.
6.3. Other Action Controller Changes
-
You can now easily show a custom error page for exceptions raised while routing a request.
-
The HTTP Accept header is disabled by default now. You should prefer the use of formatted URLs (such as /customers/1.xml) to indicate the format that you want. If you need the Accept headers, you can turn them back on with config.action_controller.user_accept_header = true.
-
Benchmarking numbers are now reported in milliseconds rather than tiny fractions of seconds
-
Rails now supports HTTP-only cookies (and uses them for sessions), which help mitigate some cross-site scripting risks in newer browsers.
7. Action View
-
javascript_include_tag and stylesheet_link_tag support a new :recursive option to be used along with :all, so that you can load an entire tree of files with a single line of code.
-
The included Prototype javascript library has been upgraded to version <IP_ADDRESS>.
-
RJS#page.reload to reload the browser's current location via javascript
-
The atom_feed helper now takes an :instruct option to let you insert XML processing instructions.
8. Action Mailer
Action Mailer now supports mailer layouts. You can make your HTML emails as pretty as your in-browser views by supplying an appropriately-named layout - for example, the CustomerMailer class expects to use layouts/customer_mailer.html.erb.
-
More information:
9. Active Support
Active Support now offers built-in memoization for Rails applications, the each_with_object method, prefix support on delegates, and various other new utility methods.
9.1. Memoization
Memoization is a pattern of initializing a method once and then stashing its value away for repeat use. You've probably used this pattern in your own applications:
def full_name @full_name ||= "#{first_name} #{last_name}" end
Memoization lets you handle this task in a declarative fashion:
extend ActiveSupport::Memoizable def full_name "#{first_name} #{last_name}" end memoize :full_name
Other features of memoization include unmemoize, unmemoize_all, and memoize_all to turn memoization on or off.
-
Lead Contributor: Josh Peek
-
More information:
9.2. each_with_object
The each_with_object method provides an alternative to inject, using a method backported from Ruby 1.9. It iterates over a collection, passing the current element and the memo into the block.
%w(foo bar).each_with_object({}) { |str, hsh| hsh[str] = str.upcase } #=> {'foo' => 'FOO', 'bar' => 'BAR'}
Lead Contributor: Adam Keys
9.3. Delegates With Prefixes
If you delegate behavior from one class to another, you can now specify a prefix that will be used to identify the delegated methods. For example:
class Vendor < ActiveRecord::Base has_one :account delegate :email, :password, :to => :account, :prefix => true end
This will produce delegated methods vendor#account_email and vendor#account_password. You can also specify a custom prefix:
class Vendor < ActiveRecord::Base has_one :account delegate :email, :password, :to => :account, :prefix => :owner end
This will produce delegated methods vendor#owner_email and vendor#owner_password.
Lead Contributor: Daniel Schierbeck
9.4. Other Active Support Changes
-
Extensive updates to ActiveSupport::Multibyte, including Ruby 1.9 compatibility fixes.
-
The addition of ActiveSupport::Rescuable allows any class to mix in the rescue_from syntax.
-
past?, today? and future? for Date and Time classes to facilitate date/time comparisons.
-
Array#second through Array#tenth as aliases for Array#[1] through Array#[9]
-
Enumerable#many? to encapsulate collection.size > 1
-
Inflector#parameterize produces a URL-ready version of its input, for use in to_param.
-
Time#advance recognizes fractional days and weeks, so you can do 1.7.weeks.ago, 1.5.hours.since, and so on.
-
The included TzInfo library has been upgraded to version 0.3.11.
10. Railties
In Railties (the core code of Rails itself) the biggest changes are in the config.gems mechanism.
10.1. config.gems
To avoid deployment issues and make Rails applications more self-contained, it's possible to place copies of all of the gems that your Rails application requires in /vendor/gems. This capability first appeared in Rails 2.1, but it's much more flexible and robust in Rails 2.2, handling complicated dependencies between gems. Gem management in Rails includes these commands:
-
config.gem gem_name in your config/environment.rb file
-
rake gems to list all configured gems, as well as whether they (and their dependencies) are installed or frozen
-
rake gems:install to install missing gems to the computer
-
rake gems:unpack to place a copy of the required gems into /vendor/gems
-
rake gems:unpack:dependencies to get copies of the required gems and their dependencies into /vendor/gems
-
rake gems:build to build any missing native extensions
-
rake gems:refresh_specs to bring vendored gems created with Rails 2.1 into alignment with the Rails 2.2 way of storing them
You can unpack or install a single gem by specifying GEM=gem_name on the command line.
-
Lead Contributor: Matt Jones
-
More information:
10.2. Other Railties Changes
-
If you're a fan of the Thin web server, you'll be happy to know that script/server now supports Thin directly.
-
script/plugin install <plugin> -r <revision> now works with git-based as well as svn-based plugins.
-
script/console now supports a —debugger option
-
Instructions for setting up a continuous integration server to build Rails itself are included in the Rails source
-
rake notes:custom ANNOTATION=MYFLAG lets you list out custom annotations.
-
Wrapped Rails.env in StringQuestioneer so you can do Rails.env.development?
-
script/generate works without deprecation warnings when RubyGems 1.3.0 is present
11. Deprecated
A few pieces of older code are deprecated in this release:
-
Rails::SecretKeyGenerator has been replaced by ActiveSupport::SecureRandom
-
render_component is deprecated. There's a render_components plugin available if you need this functionality.
-
Implicit local assignments when rendering partials has been deprecated.
def partial_with_implicit_local_assignment @customer = Customer.new("Marcel") render :partial => "customer" end
Previously the above code made available a local variable called customer inside the partial customer. You should explicitly pass all the variables via :locals hash now.
-
country_select has been removed. See the deprecation page for more information and a plugin replacement.
-
ActiveRecord::Base.allow_concurrency no longer has any effect.
-
ActiveRecord::Errors.default_error_messages has been deprecated in favor of I18n.translate(activerecord.errors.messages)
-
The %s and %d interpolation syntax for internationalization is deprecated.
-
String#chars has been deprecated in favor of String#mb_chars.
-
Durations of fractional months or fractional years are deprecated. Use Ruby's core Date and Time class arithmetic instead.
12. Credits
Release notes compiled by Mike Gunderloy


transformChildNodesIntoView(): void
Takes the child nodes of an existing element that has been converted into a ViewSlot and makes those nodes into a View within the slot.
transformChildNodesIntoView(): void
Takes the child nodes of an existing element that has been converted into a ViewSlot and makes those nodes into a View within the slot.


If you see this html if because you browser can't redirect, well anyway this is the url to redirect. if you want to know more about me visit my personal website.


Welcome to My Website
What are your hours?
We are open 24/7.
What are your hours?
We are open 24/7.
What are your hours?
We are open 24/7.
What are your hours?
We are open 24/7.
What are your hours?
We are open 24/7.


JavaScript is a high-level, dynamic, untyped, and interpreted
programming language. It has been standardized in the ECMAScript
language specification. Alongside HTML and CSS, it is one of the three
core technologies of World Wide Web content production; the majority of
websites employ it and it is supported by all modern Web browsers
without plug-ins. JavaScript is prototype-based with first-class
functions, making it a multi-paradigm language, supporting
object-oriented, imperative, and functional programming styles. It has
an API for working with text, arrays, dates and regular expressions, but
does not include any I/O, such as networking, storage, or graphics
facilities, relying for these upon the host environment in which it is
embedded.
Despite some naming, syntactic, and standard library similarities,
JavaScript and Java are otherwise unrelated and have very different
semantics. The syntax of JavaScript is actually derived from C, while
the semantics and design are influenced by the Self and Scheme
programming languages.
JavaScript is also used in environments that are not Web-based, such as
PDF documents, site-specific browsers, and desktop widgets. Newer and
faster JavaScript virtual machines (VMs) and platforms built upon them
have also increased the popularity of JavaScript for server-side Web
applications. On the client side, JavaScript has been traditionally
implemented as an interpreted language, but more recent browsers perform
just-in-time compilation. It is also used in game development, the
creation of desktop and mobile applications, and server-side network
programming with runtime environments such as Node.js
jQuery is a cross-platform JavaScript library designed to simplify
the client-side scripting of HTML. jQuery is the most popular JavaScript
library in use today, with installation on 65% of the top 10 million
highest-trafficked sites on the Web. jQuery is free, open-source
software licensed under the MIT License.
jQuery's syntax is designed to make it easier to navigate a document,
select DOM elements, create animations, handle events, and develop Ajax
applications. jQuery also provides capabilities for developers to create
plug-ins on top of the JavaScript library. This enables developers to
create abstractions for low-level interaction and animation, advanced
effects and high-level, theme-able widgets. The modular approach to the
jQuery library allows the creation of powerful dynamic web pages and Web
applications.
The set of jQuery core features—DOM element selections, traversal and
manipulation—enabled by its selector engine (named "Sizzle" from v1.3),
created a new "programming style", fusing algorithms and DOM data
structures. This style influenced the architecture of other JavaScript
frameworks like YUI v3 and Dojo, later stimulating the creation of the
standard Selectors API.
Microsoft and Nokia bundle jQuery on their platforms. Microsoft includes
it with Visual Studio for use within Microsoft's ASP.NET AJAX and
ASP.NET MVC frameworks while Nokia has integrated it into the Web
Run-Time widget development platform. jQuery has also been used in
MediaWiki since version 1.16.
Cascading Style Sheets (CSS) is a style sheet language used for
describing the presentation of a document written in a markup language.
Although most often used to set the visual style of web pages and user
interfaces written in HTML and XHTML, the language can be applied to any
XML document, including plain XML, SVG and XUL, and is applicable to
rendering in speech, or on other media. Along with HTML and JavaScript,
CSS is a cornerstone technology used by most websites to create visually
engaging webpages, user interfaces for web applications, and user
interfaces for many mobile applications.
CSS is designed primarily to enable the separation of document content
from document presentation, including aspects such as the layout,
colors, and fonts. This separation can improve content accessibility,
provide more flexibility and control in the specification of
presentation characteristics, enable multiple HTML pages to share
formatting by specifying the relevant CSS in a separate .css file, and
reduce complexity and repetition in the structural content.
This separation of formatting and content makes it possible to present
the same markup page in different styles for different rendering
methods, such as on-screen, in print, by voice (when read out by a
speech-based browser or screen reader) and on Braille-based, tactile
devices. It can also be used to display the web page differently
depending on the screen size or device on which it is being viewed.
Readers can also specify a different style sheet, such as a CSS file
stored on their own computer, to override the one the author has
specified.
Changes to the graphic design of a document (or hundreds of documents)
can be applied quickly and easily, by editing a few lines in the CSS
file they use, rather than by changing markup in the documents.
The CSS specification describes a priority scheme to determine which
style rules apply if more than one rule matches against a particular
element. In this so-called cascade, priorities (or weights) are
calculated and assigned to rules, so that the results are predictable.
The CSS specifications are maintained by the World Wide Web Consortium
(W3C). Internet media type (MIME type) text/css is registered for use
with CSS by RFC 2318 (March 1998). The W3C operates a free CSS
validation service for CSS documents.


--- layout: post title: A weekend well spent... with Instagram... tags: - Bangalore status: publish type: post published: true meta: _edit_last: '2' _aioseop_keywords: Little Italy Bangalore, Death By Chocolate, Decathalon bangalore, Online Zovi shopping, People Bangalore, MAC Face and Body foundation, MAC 217 brush _yoast_wpseo_linkdex: '0' _yoast_wpseo_focuskw: '' _thumbnail_id: '5145' _yoast_wpseo_title: '' _yoast_wpseo_metadesc: '' _yoast_wpseo_metakeywords: '' _yoast_wpseo_meta-robots-noindex: '0' _yoast_wpseo_meta-robots-nofollow: '0' _yoast_wpseo_meta-robots-adv: none _yoast_wpseo_sitemap-include: ! '-' _yoast_wpseo_sitemap-prio: ! '-' _yoast_wpseo_canonical: '' _yoast_wpseo_redirect: '' --- This weekend started with me completing 5 years in the most beautiful relationship ever, sometimes I feel times just flies. I started my week with Talaash which is a great movie, unless some silly person decides to spoil your movie with the story. Sharing my lovely weekend in bits through Instagram...
A perfect Italian Lunch at Little Italy, Bangalore
The notoriously famous Death By Chocolate, Bangalore
My Lovely precious.....
Just could not stop clicking some ketchup sachet, loved the quotes,
We went to the near Decathalon store and got ourselves new Squash rackets and Table Tenis kits..
and promised to spend some more time together playing everyday(His Idea.. I just went along :))
Some Random shopping from Zovi and People Bangalore
And my last bit of indulgence at MAC, I picked up the famous face and body foundation in N2, and
MAC 217 blending brush..
Weekend is still on.. :)
How is your weekend going ?... any shopping.. any books ?


You may find yourself in a situation where more than one hostname
resolves to Squid's IP address. For example, both
sv.us.ircache.net and sv.cache.nlanr.net resolve to <IP_ADDRESS>.
If you have neighbors, they may send requests for certain
Squid-specific internal URLs, as in the case of Cache Digests. These
URLs might contain either hostname. You must use this directive to
tell Squid that it is known by names other than its
visible_hostname. |
Syntax
|
hostname_aliases hostname ...
| |
Default
|
No default
| |
Example
|
hostname_aliases this.host.name that.host.name
| |
Related
|
visible_hostname,
unique_hostname
|
|


I was born and raised in northern Illinois, but my ethnic roots trace back to Luxembourg and Poland. I owe my love of learning to my parents. Both of them truly valued education and taught me to strive to be the best version of myself. Both of my parents always encouraged new learning and trying new things, even if it was uncomfortable.
My passion is learning about new gadgets, especially technology. I am also a "numbers" person, with a love of logic, analytics, and problem solving. When I saw that web analytics allowed insight into a user's actions on a web-site, I was intrigued. That is what started me on the path of website development and user experience.


All fields are required
An error occurred when saving the comment
The title is required.
Your name is required.
The content is required.


Now send a request with our data.
req = urllib.request.Request(
url = api_url+'/users/'+username+'/login',
data = data)
response = urllib.request.urlopen(req)
print(response.read().decode('UTF-8'))
You should see a response ArchivesSpace in the shell.
What does the response suggest?


These types and enumerations describe the format of data sent to and from a Myo device using Bluetooth Low Energy.
More...
|
| enum | myohw_services {
ControlService = 0x0001,
MyoInfoCharacteristic = 0x0101,
FirmwareVersionCharacteristic = 0x0201,
CommandCharacteristic = 0x0401,
ImuDataService = 0x0002,
IMUDataCharacteristic = 0x0402,
MotionEventCharacteristic = 0x0a02,
ClassifierService = 0x0003,
ClassifierEventCharacteristic = 0x0103,
EmgDataService = 0x0005,
EmgData0Characteristic = 0x0105,
EmgData1Characteristic = 0x0205,
EmgData2Characteristic = 0x0305,
EmgData3Characteristic = 0x0405
} |
| |
| enum | myohw_standard_services { BatteryService = 0x180f,
BatteryLevelCharacteristic = 0x2a19,
DeviceName = 0x2a00
} |
| |
| enum | myohw_pose_t {
myohw_pose_rest = 0x0000,
myohw_pose_fist = 0x0001,
myohw_pose_wave_in = 0x0002,
myohw_pose_wave_out = 0x0003,
myohw_pose_fingers_spread = 0x0004,
myohw_pose_double_tap = 0x0005,
myohw_pose_unknown = 0xffff
} |
| | Supported poses. More...
|
| |
| enum | myohw_sku_t { myohw_sku_unknown = 0,
myohw_sku_black_myo = 1,
myohw_sku_white_myo = 2
} |
| |
| enum | myohw_hardware_rev_t { myohw_hardware_rev_unknown = 0,
myohw_hardware_rev_revc = 1,
myohw_hardware_rev_revd = 2,
myohw_num_hardware_revs
} |
| | Known Myo hardware revisions. More...
|
| |
| enum | myohw_motion_event_type_t { myohw_motion_event_tap = 0x00
} |
| | Types of motion events. More...
|
| |
| enum | myohw_classifier_event_type_t {
myohw_classifier_event_arm_synced = 0x01,
myohw_classifier_event_arm_unsynced = 0x02,
myohw_classifier_event_pose = 0x03,
myohw_classifier_event_unlocked = 0x04,
myohw_classifier_event_locked = 0x05,
myohw_classifier_event_sync_failed = 0x06
} |
| | Types of classifier events. More...
|
| |
| enum | myohw_arm_t { myohw_arm_right = 0x01,
myohw_arm_left = 0x02,
myohw_arm_unknown = 0xff
} |
| | Enumeration identifying a right arm or left arm. More...
|
| |
| enum | myohw_x_direction_t { myohw_x_direction_toward_wrist = 0x01,
myohw_x_direction_toward_elbow = 0x02,
myohw_x_direction_unknown = 0xff
} |
| | Possible directions for Myo's +x axis relative to a user's arm. More...
|
| |
| enum | myohw_sync_result_t { myohw_sync_failed_too_hard = 0x01
} |
| | Possible outcomes when the user attempts a sync gesture. More...
|
| |
These types and enumerations describe the format of data sent to and from a Myo device using Bluetooth Low Energy.
All values are big-endian.
| #define MYO_SERVICE_BASE_UUID |
Value:{ \
0x42, 0x48, 0x12, 0x4a, \
0x7f, 0x2c, 0x48, 0x47, \
0xb9, 0xde, 0x04, 0xa9, \
0x00, 0x00, 0x06, 0xd5 \
}
The following enum lists the 16bit short UUIDs of Myo services and characteristics.
To construct a full 128bit UUID, replace the two 0x00 hex bytes of MYO_SERVICE_BASE_UUID with a short UUID from myohw_standard_services. The byte sequence of MYO_SERVICE_BASE_UUID is in network order. Keep this in mind when doing the replacement. For example, the full service UUID for GCControlService would be d5060001-a904-deb9-4748-2c7f4a124842.
| #define MYOHW_ACCELEROMETER_SCALE 2048.0f |
| #define MYOHW_DEFAULT_IMU_SAMPLE_RATE 50 |
Default IMU sample rate in Hz.
| #define MYOHW_EMG_DEFAULT_STREAMING_RATE 200 |
The rate that EMG events are streamed over Bluetooth.
| #define MYOHW_FIRMWARE_VERSION_MAJOR 1 |
| #define MYOHW_FIRMWARE_VERSION_MINOR 2 |
| #define MYOHW_GYROSCOPE_SCALE 16.0f |
| #define MYOHW_ORIENTATION_SCALE 16384.0f |
Classifier event data received in a myohw_att_handle_classifier_event attribute.
Raw EMG data received in a myohw_att_handle_emg_data_# attribute.
Value layout for myohw_att_handle_emg_data_#.
Various parameters that may affect the behaviour of this Myo armband.
The Myo library reads this attribute when a connection is established. Value layout for the myohw_att_handle_fw_info attribute.
Version information for the Myo firmware.
Value layout for the myohw_att_handle_fw_version attribute. Minor version is incremented for changes in this interface. Patch version is incremented for firmware changes that do not introduce changes in this interface.
Motion event data received in a myohw_att_handle_motion_event attribute.
Enumeration identifying a right arm or left arm.
| Enumerator |
|---|
| myohw_arm_right |
|
| myohw_arm_left |
|
| myohw_arm_unknown |
|
Types of classifier events.
| Enumerator |
|---|
| myohw_classifier_event_arm_synced |
|
| myohw_classifier_event_arm_unsynced |
|
| myohw_classifier_event_pose |
|
| myohw_classifier_event_unlocked |
|
| myohw_classifier_event_locked |
|
| myohw_classifier_event_sync_failed |
|
Known Myo hardware revisions.
| Enumerator |
|---|
| myohw_hardware_rev_unknown |
Unknown hardware revision.
|
| myohw_hardware_rev_revc |
Myo Alpha (REV-C) hardware.
|
| myohw_hardware_rev_revd |
Myo (REV-D) hardware.
|
| myohw_num_hardware_revs |
Number of hardware revisions known; not a valid hardware revision.
|
Types of motion events.
| Enumerator |
|---|
| myohw_motion_event_tap |
|
Supported poses.
| Enumerator |
|---|
| myohw_pose_rest |
|
| myohw_pose_fist |
|
| myohw_pose_wave_in |
|
| myohw_pose_wave_out |
|
| myohw_pose_fingers_spread |
|
| myohw_pose_double_tap |
|
| myohw_pose_unknown |
|
| Enumerator |
|---|
| ControlService |
Myo info service.
|
| MyoInfoCharacteristic |
Serial number for this Myo and various parameters which are specific to this firmware.
Read-only attribute. See myohw_fw_info_t.
|
| FirmwareVersionCharacteristic |
Current firmware version.
Read-only characteristic. See myohw_fw_version_t.
|
| CommandCharacteristic |
Issue commands to the Myo.
Write-only characteristic. See myohw_command_t.
|
| ImuDataService |
IMU service.
|
| IMUDataCharacteristic |
See myohw_imu_data_t. Notify-only characteristic.
|
| MotionEventCharacteristic |
Motion event data. Indicate-only characteristic.
|
| ClassifierService |
Classifier event service.
|
| ClassifierEventCharacteristic |
Classifier event data. Indicate-only characteristic. See myohw_pose_t.
|
| EmgDataService |
Raw EMG data service.
|
| EmgData0Characteristic |
Raw EMG data. Notify-only characteristic.
|
| EmgData1Characteristic |
Raw EMG data. Notify-only characteristic.
|
| EmgData2Characteristic |
Raw EMG data. Notify-only characteristic.
|
| EmgData3Characteristic |
Raw EMG data. Notify-only characteristic.
|
| Enumerator |
|---|
| myohw_sku_unknown |
Unknown SKU (default value for old firmwares)
|
| myohw_sku_black_myo |
Black Myo.
|
| myohw_sku_white_myo |
White Myo.
|
| Enumerator |
|---|
| BatteryService |
Battery service.
|
| BatteryLevelCharacteristic |
Current battery level information. Read/notify characteristic.
|
| DeviceName |
Device name data. Read/write characteristic.
|
Possible outcomes when the user attempts a sync gesture.
| Enumerator |
|---|
| myohw_sync_failed_too_hard |
Sync gesture was performed too hard.
|
Possible directions for Myo's +x axis relative to a user's arm.
| Enumerator |
|---|
| myohw_x_direction_toward_wrist |
|
| myohw_x_direction_toward_elbow |
|
| myohw_x_direction_unknown |
|


---
layout: default
title: Teams
---
{% for post in site.teams %}
{% if post.archive %}
{% elsif post.title != 'Teams' %}
{% if post.img %}
{% endif %}
{{post.title}}
{{post.description}}
{% endif %}
{% endfor %}
Some teams who have historically contributed to Digital Humanities at Columbia University have transformed or have ceased operations. Below is an incomplete list.
{% for post in site.teams %}
{% if post.archive %}
- {{post.title}}
{% endif %}
{% endfor %}


Constructor new AbstractRepeater(options?: any): AbstractRepeater Parameters options?: any Methods addView insertView matcher moveView removeAllViews removeView removeViews updateBindings view viewCount views


Paste in OCSP in as PEM or as a HTTP/S URL:
http://ocsp.example.com/MHgwdjBPME0wSzAJBgUrDgMCGgUABBSgcg6ganxiAlTyqPWd0nuk87cvpAQU3O7mV06lao%2BJW%2Fldxmx0OymFvMUCEhEhli1dITJOX7nae39pajyPyaIjMCEwHwYJKwYBBQUHMAECBBIEEKmqq4Vv1%2FhAVwe0Fmukt7Y%3D
Decode
Requests List:
Hash Algorithm
Issuer Name Hash
Issuer Key Hash
Subject Serial
Single Request Extensions
Request Extensions:


Provides a simple interface to AUDENC1 (XDM 0.9) based algorithms. Typical example below (AAC, no error checking): More...
Typedefs | |
| typedef struct Aenc1_Object * | Aenc1_Handle |
| Handle through which to reference an Audio Encode algorithm. | |
Functions | |
| Aenc1_Handle | Aenc1_create (Engine_Handle hEngine, Char *codecName, AUDENC1_Params *params, AUDENC1_DynamicParams *dynParams) |
| Creates an Audio Encode (XDM 0.9) algorithm instance. | |
| Int | Aenc1_process (Aenc1_Handle hAe, Buffer_Handle hInBuf, Buffer_Handle hOutBuf) |
| Sends XDM_FLUSH command to codec to notify it is the last frame which must be padded with zeros. after this call Aenc1_process to encode last frame. | |
| Int | Aenc1_delete (Aenc1_Handle hAe) |
| Deletes an Audio Encode algorithm instance. | |
| AUDENC1_Handle | Aenc1_getVisaHandle (Aenc1_Handle hAe) |
| Get the AUDENC1 handle from the Aenc1 module instance. | |
| Int32 | Aenc1_getInBufSize (Aenc1_Handle hAe) |
| Get the input buffer size required by the codec. | |
| Int32 | Aenc1_getOutBufSize (Aenc1_Handle hAe) |
| Get the output buffer size required by the codec. | |
Variables | |
| const AUDENC1_Params | Aenc1_Params_DEFAULT |
| Default XDM params for an Audio Encode algorithm. | |
| const AUDENC1_DynamicParams | Aenc1_DynamicParams_DEFAULT |
| Default XDM dynamic params for an Audio Encode algorithm. |
Provides a simple interface to AUDENC1 (XDM 0.9) based algorithms. Typical example below (AAC, no error checking):
#include <xdc/std.h> #include <ti/sdo/ce/Engine.h> #include <ti/sdo/ce/CERuntime.h> #include <ti/sdo/dmai/Dmai.h> #include <ti/sdo/dmai/Buffer.h> #include <ti/sdo/dmai/ce/Aenc1.h> Aenc1_Handle hAe; Buffer_Handle hOutBuf; Engine_Handle hEngine; AUDENC1_Params params = Aenc1_Params_DEFAULT; AUDENC1_DynamicParams dynParams = Aenc1_DynamicParams_DEFAULT; Buffer_Attrs bAttrs = Buffer_Attrs_DEFAULT; CERuntime_init(); Dmai_init(); hEngine = Engine_open("myengine", NULL, NULL); hAe = Aenc1_create(hEngine, "aacenc", ¶ms, &dynParams); hOutBuf = Buffer_create(Aenc1_getOutBufSize(hAe), &bAttrs); hInBuf = Buffer_create(Aenc1_getInBufSize(hAe), &bAttrs); // Fill hInBuf with raw samples Aenc1_process(hAe, hInBuf, hOutBuf); // encoded data now available in hOutBuf. Buffer_delete(hOutBuf); Buffer_delete(hInBuf); Aenc1_delete(hAe); Engine_close(hEngine);
| typedef struct Aenc1_Object* Aenc1_Handle |
Handle through which to reference an Audio Encode algorithm.
| Aenc1_Handle Aenc1_create | ( | Engine_Handle | hEngine, | |
| Char * | codecName, | |||
| AUDENC1_Params * | params, | |||
| AUDENC1_DynamicParams * | dynParams | |||
| ) |
Creates an Audio Encode (XDM 0.9) algorithm instance.
| [in] | hEngine | An opened engine containing the algorithm to create. |
| [in] | codecName | The name of the algorithm to open. Corresponds to the string name given in the .cfg file. |
| [in] | params | XDM parameters to use while creating the codec. |
| [in] | dynParams | XDM dynamic parameters to use while creating the codec. |
| Handle | for use in subsequent operations (see Aenc1_Handle). | |
| NULL | for failure. |
| Int Aenc1_process | ( | Aenc1_Handle | hAe, | |
| Buffer_Handle | hInBuf, | |||
| Buffer_Handle | hOutBuf | |||
| ) |
Sends XDM_FLUSH command to codec to notify it is the last frame which must be padded with zeros. after this call Aenc1_process to encode last frame.
| [in] | hAe | The Aenc1_Handle of the encoder to flush. |
| [in] | hInBuf | The Buffer_Handle for the buffer containing the raw data. |
| [in] | hOutBuf | The Buffer_Handle for the buffer to fill with decoded data. |
| Dmai_EOK | for success. | |
| Negative value | for failure, see Dmai.h. |
| Int Aenc1_delete | ( | Aenc1_Handle | hAe | ) |
Deletes an Audio Encode algorithm instance.
| [in] | hAe | The Aenc1_Handle to delete. |
| Dmai_EOK | for success. | |
| Negative value | for failure, see Dmai.h. |
| AUDENC1_Handle Aenc1_getVisaHandle | ( | Aenc1_Handle | hAe | ) |
Get the AUDENC1 handle from the Aenc1 module instance.
| [in] | hAe | The Aenc1_Handle for which to get the AUDENC1 handle. |
| Handle | to the audio encode algorithm, see the XDM documentation for AUDENC1. |
| Int32 Aenc1_getInBufSize | ( | Aenc1_Handle | hAe | ) |
Get the input buffer size required by the codec.
| [in] | hAe | The Aenc1_Handle for which to get the buffer size. |
| Size | in bytes of the input buffer required. |
| Int32 Aenc1_getOutBufSize | ( | Aenc1_Handle | hAe | ) |
Get the output buffer size required by the codec.
| [in] | hAe | The Aenc1_Handle for which to get the buffer size. |
| Size | in bytes of the output buffer required. |
| const AUDENC1_Params Aenc1_Params_DEFAULT |
Default XDM params for an Audio Encode algorithm.
size = sizeof(AUDENC1_Params),
sampleRate = 48000,
bitRate = 288000,
channelMode = IAUDIO_2_0,
dataEndianness = XDM_LE_16,
encMode = IAUDIO_CBR,
inputFormat = IAUDIO_INTERLEAVED,
inputBitsPerSample = 16,
maxBitRate = 192000,
dualMonoMode = IAUDIO_DUALMONO_LR,
crcFlag = XDAS_FALSE,
ancFlag = XDAS_FALSE,
lfeFlag = XDAS_FALSE
| const AUDENC1_DynamicParams Aenc1_DynamicParams_DEFAULT |
Default XDM dynamic params for an Audio Encode algorithm.
size = sizeof(AUDENC1_DynamicParams),
bitRate = 128000,
sampleRate = 48000,
channelMode = IAUDIO_2_0,
lfeFlag = XDAS_FALSE,
dualMonoMode = IAUDIO_DUALMONO_LR,
inputBitsPerSample = 16


{% if player.is_satisfied %}
Congratulations, you completed this task successfully. If this task is chosen for payment,
you will receive a bonus payment of {{total_payoff}} points
{% else %}
Unfortunately, you failed to complete this task successfully. You were required to assign
the numbers 1–6 to all the flavours. You may have not assigned a number to a flavour or
you may have assigned the same number to two different flavours. If this task is chosen for
payment, you will receive no bonus.
{% endif %}


Ideas
You have an idea.
The idea doesn’t do anything, it’s just sitting there buzzing around your head.
Sometimes you speak out the idea. It becomes noise. Then if there’s someone around you and hear the idea they might like it and now they can use it, or just ignore it.
If the idea is not written down, it might be forgotten. If the idea is repeated out loud may shape into other ideas.
But ideas never turn into anything else if they are not put in practice.
I had an idea 10 years ago. Never did anything with it. Recently someone asked me:
“Hey, do you have a spare idea you’re not using?”
And suddenly I felt like using it again. I shared it. I created something with it (a drawing), now that idea is a drawing, until I turn it into something else.


Referencing causes a great number of mistakes in APA formatting (see also our recent analysis of manuscripts submitted to JEPS). This is perhaps not surprising, given the amount of details a writer has to observe when enlisting a single item in the references list. Should the titles be capitalised throughout or not? What is in italics what is not? Where do commas and full stops go? Why is there a standardised way of reporting references in the first place?
Perhaps the key to avoiding mistakes done in this area is to understand the importance (and, paradoxically the ease) of following the APA style.
To begin with, referencing is there to show which sources you rely on when building the theory for your research. Most importantly, not referencing equals plagiarism, it’s presenting someone else’s ideas as your own. The purpose of referencing then is to guide the reader to the source, but not only—the reader should also have enough information to evaluate the quality of the source. This is why also inaccurate referencing won’t do the trick when, say, the reliability of the source is at stake. Also, not mentioning the volume number or the pages will prolong the search process should someone want to look the source up.
Moreover, accurate referencing, making sure all the details are in order, increases the fluency of reading the references. Try sorting out references in another field where APA style is not used, say history. Understanding the sources there takes considerably longer than with the accustomed format designed by the American Psychological Association.
Still, ensuring all the details are right is not at all as difficult as it might seem from reading the APA manual. There are several references management programs which do all the referencing in just 3 clicks: one to download the citation from internet and two to insert it to the appointed place in your text, while it’ll also show up in the references list in the end of the document. JEPS Bulletin will soon publish an overview of the references management programs you could consider using. Until then, some simple tips to follow for the two most common sources: books and journal articles.
When formatting reference’s list pay attention to:
- Authors’ last name should be followed by a comma, their initial(s) and another comma. Should there be more than one author, the last one should be separated by an ampersand (&) from the penultimate one. The last author’s initials should not end with a comma. This is how it should look like (bold is added):
- Milgram, S. (1974). Obedience to authority: An experimental view. London: Harper & Row
- McCrae, R.R., & Costa, P.T. (1987). Validation of the five-factor model of personality across instruments and observers. Journal of Personality and Social Psychology, 52(1), 81–90. doi:10.1037/0022-35<IP_ADDRESS>
- Watson, J. D., & Crick, F. H. C. (1953). A Structure for deoxyribose nucleic acid. Nature, 171, 737-738
- Year of publication is presented in brackets after the authors, followed by a full stop (bold added):
- Watson, J. D., & Crick, F. H. C. (1953). A Structure for deoxyribose nucleic acid. Nature, 171, 737-738
- The tile of the article is not capitalised throughout, only the first word is. If there is a full stop, a colon, question mark or an exclamation mark, the first word after the punctuation also starts with capitalisation (bold added).
- Milgram, S. (1974). Obedience to authority: An experimental view. London: Harper & Row
- McCrae, R.R., & Costa, P.T. (1987). Validation of the five-factor model of personality across instruments and observers. Journal of Personality and Social Psychology, 52(1), 81–90. doi:10.1037/0022-35<IP_ADDRESS>
- Watson, J. D., & Crick, F. H. C. (1953). A structure for deoxyribose nucleic acid. Nature, 171, 737-738
- For books, the publishing location and publisher should also be shown, in that order, separated by a colon (bold added):
- Milgram, S. (1974). Obedience to authority: An experimental view. London: Harper & Row
- For articles in journals, the name of the journal should be presented in italics followed by the volume number separated by a comma and still in italic, followed by the issue number in brackets with no space in between, in regular font (bold added):
- McCrae, R.R., & Costa, P.T. (1987). Validation of the five-factor model of personality across instruments and observers. Journal of Personality and Social Psychology, 52(1), 81–90. doi:10.1037/0022-35<IP_ADDRESS>
- Watson, J. D., & Crick, F. H. C. (1953). A structure for deoxyribose nucleic acid. Nature, 171, 737-738
- Page numbers are presented after the journal name, volume and issue (bold added):
- Watson, J. D., & Crick, F. H. C. (1953). A structure for deoxyribose nucleic acid. Nature, 171, 737-738
- DOI, the digital object identifier should be shown for the articles found online (bold added):
- McCrae, R.R., & Costa, P.T. (1987). Validation of the five-factor model of personality across instruments and observers. Journal of Personality and Social Psychology, 52(1), 81–90. doi:10.1037/0022-35<IP_ADDRESS>


Loading
Logout
You wanna log in?
Log in
with Password
with Google
with Facebook
Login
It's a brand new world
Forget me
on this device


Troubleshooting
If you ever run into problems installing or using Jekyll, here are a few tips that might be of help. If the problem you’re experiencing isn’t covered below, please check out our other help resources as well.
- Installation Problems
- Problems running Jekyll
- Base-URL Problems
- Configuration problems
- Markup Problems
- Production Problems
Installation Problems
If you encounter errors during gem installation, you may need to install the header files for compiling extension modules for Ruby 2.x This can be done on Ubuntu or Debian by running:
sudo apt-get install ruby2.3-dev
On Red Hat, CentOS, and Fedora systems you can do this by running:
sudo yum install ruby-devel
If you installed the above - specifically on Fedora 23 - but the extensions would still not compile, you are probably running a Fedora image that misses the redhat-rpm-config
package. To solve this, simply run:
sudo dnf install redhat-rpm-config
On Arch Linux you need to run:
sudo pacman -S ruby-ffi
On Ubuntu if you get stuck after bundle exec jekyll serve
and see error
messages like Could not locate Gemfile
or .bundle/ directory
, it’s likely
because all requirements have not been fully met. Recent stock Ubuntu
distributions require the installation of both the ruby
and ruby-all-dev
packages:
sudo apt-get install ruby ruby-all-dev
On NearlyFreeSpeech you need to run the following commands before installing Jekyll:
export GEM_HOME=/home/private/gems
export GEM_PATH=/home/private/gems:/usr/local/lib/ruby/gems/1.8/
export PATH=$PATH:/home/private/gems/bin
export RB_USER_INSTALL='true'
To install RubyGems on Gentoo:
sudo emerge -av dev-ruby/rubygems
On Windows, you may need to install RubyInstaller DevKit.
On Android (with Termux) you can install all requirements by running:
apt update && apt install libffi-dev clang ruby-dev make
On macOS, you may need to update RubyGems (using sudo
only if necessary):
gem update --system
If you still have issues, you can download and install new Command Line
Tools (such as gcc
) using the following command:
xcode-select --install
which may allow you to install native gems using this command (again, using
sudo
only if necessary):
gem install jekyll
Note that upgrading macOS does not automatically upgrade Xcode itself (that can be done separately via the App Store), and having an out-of-date Xcode.app can interfere with the command line tools downloaded above. If you run into this issue, upgrade Xcode and install the upgraded Command Line Tools.
Running Jekyll as Non-Superuser (no sudo!)
On most flavors of Linux, macOS, and Bash on Ubuntu on Windows, it is
possible to run Jekyll as a non-superuser and without having to install
gems to system-wide locations by adding the following lines to the end
of your .bashrc
file:
# Ruby exports
export GEM_HOME=$HOME/gems
export PATH=$HOME/gems/bin:$PATH
This tells gem
to place its gems within the user’s home folder,
not in a system-wide location, and adds the local jekyll
command to the
user’s PATH
ahead of any system-wide paths.
This is also useful for many shared webhosting services, where user accounts
have only limited privileges. Adding these exports to .bashrc
before running
gem install jekyll bundler
allows a complete non-sudo
install of Jekyll.
To activate the new exports, either close and restart Bash, logout and
log back into your shell account, or run . .bashrc
in the
currently-running shell.
If you see the following error when running the jekyll new
command,
you can solve it by using the above-described procedure:
jekyll new test
Running bundle install in /home/user/test...
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.
Password:
Once this is done, the jekyll new
command should work properly for
your user account.
Jekyll & Mac OS X 10.11
With the introduction of System Integrity Protection, several directories
that were previously writable are now considered system locations and are no
longer available. Given these changes, there are a couple of simple ways to get
up and running. One option is to change the location where the gem will be
installed (again, using sudo
only if necessary):
gem install -n /usr/local/bin jekyll
Alternatively, Homebrew can be installed and used to set up Ruby. This can be done as follows:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Once Homebrew is installed, the second step is easy:
brew install ruby
Advanced users (with more complex needs) may find it helpful to choose one of a number of Ruby version managers (RVM, rbenv, chruby, etc.) in which to install Jekyll.
If you elect to use one of the above methods to install Ruby, it might be
necessary to modify your $PATH
variable using the following command:
export PATH=/usr/local/bin:$PATH
GUI apps can modify the $PATH
as follows:
launchctl setenv PATH "/usr/local/bin:$PATH"
Either of these approaches are useful because /usr/local
is considered a
“safe” location on systems which have SIP enabled, they avoid potential
conflicts with the version of Ruby included by Apple, and it keeps Jekyll and
its dependencies in a sandboxed environment. This also has the added
benefit of not requiring sudo
when you want to add or remove a gem.
Could not find a JavaScript runtime. (ExecJS::RuntimeUnavailable)
This error can occur during the installation of jekyll-coffeescript
when
you don’t have a proper JavaScript runtime. To solve this, either install
execjs
and therubyracer
gems, or install nodejs
. Check out
issue #2327 for more info.
Problems running Jekyll
On Debian or Ubuntu, you may need to add /var/lib/gems/1.8/bin/
to your path
in order to have the jekyll
executable be available in your Terminal.
Base-URL Problems
If you are using base-url option like:
jekyll serve --baseurl '/blog'
… then make sure that you access the site at:
http://localhost:4000/blog/index.html
It won’t work to just access:
http://localhost:4000/blog
Configuration problems
The order of precedence for conflicting configuration settings is as follows:
- Command-line flags
- Configuration file settings
- Defaults
That is: defaults are overridden by options specified in _config.yml
,
and flags specified at the command-line will override all other settings
specified elsewhere.
Note: From v3.3.0 onward, Jekyll does not process node_modules
and certain subdirectories within vendor
, by default. But, by having an exclude:
array defined explicitly in the config file overrides this default setting, which results in some users to encounter an error in building the site, with the following error message:
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>':
Document 'vendor/bundle/gems/jekyll-3.4.3/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb'
does not have a valid date in the YAML front matter.
Simply adding vendor/bundle
to the exclude:
list will solve this problem but will lead to having other sub-directories under /vendor/
(and also /node_modules/
, if present) be processed to the destination folder _site
.
The proper solution is to incorporate the default setting for exclude:
rather than override it completely:
For versions upto v3.4.3
, the exclude:
setting must look like following:
exclude:
- Gemfile
- Gemfile.lock
- node_modules
- vendor/bundle/
- vendor/cache/
- vendor/gems/
- vendor/ruby/
- any_additional_item # any user-specific listing goes at the end
From v3.5
onward, Gemfile
and Gemfile.lock
are also excluded by default. So, in most cases there is no need to define another exclude:
array in the config file. So an existing definition can either be modified as above, or removed completely, or simply commented out to enable easy edits in future.
Markup Problems
The various markup engines that Jekyll uses may have some issues. This page will document them to help others who may run into the same problems.
Liquid
Liquid version 2.0 seems to break the use of {{
in templates.
Unlike previous versions, using {{
in 2.0 triggers the following error:
'{{' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError)
Excerpts
Since v1.0.0, Jekyll has had automatically-generated post excerpts. Since
v1.1.0, Jekyll also passes these excerpts through Liquid, which can cause
strange errors where references don’t exist or a tag hasn’t been closed. If you
run into these errors, try setting excerpt_separator: ""
in your
_config.yml
, or set it to some nonsense string.
Production Problems
If you run into an issue that a static file can’t be found in your
production environment during build since v3.2.0 you should set your
environment to production
.
The issue is caused by trying to copy a non-existing symlink.
Please report issues you encounter!
If you come across a bug, please create an issue on GitHub describing the problem and any work-arounds you find so we can document it here for others.


{% extends "layout.html" %} {% block pageTitle %} {{ serviceName }} {% endblock %} {% block beforeContent %} {% include "includes/phase-banner.html" %} {% endblock %} {% block content %}
Coronavirus (COVID-19) support is available to employers and the self-employed, including sole traders and limited company directors. You may be eligible for loans, tax relief and cash grants, whether your business is open or closed.
Use this business support finder to see what support is available for you and your business.
{{ govukButton({ text: "Start now", href: actions.start, isStartButton: true, classes: "govuk-!-margin-top-5" }) }}


I'm Alice, a 25 years old Front-end developer based in Brighton, UK.
This portfolio represents mainly the projects I am working on while studying a Front-End Developer Nanodegree at Udacity.
I am learning to master the skills required to become an awesome Front-End Web Developer, and start building beautiful, responsive websites optimized for mobile and desktop performance.


This following section discusses possible problems with data transfer features, which allows you to add drag and drop (DnD) and cut, copy and paste (CCP) operations to the application.
It is difficult to use a debugger to troubleshoot DnD features, because during the drag-and-drop operation all input is grabbed. Therefore, if you place a breakpoint during DnD, you might need to restart your X server. Try to use remote debugging instead.
Two simple methods can be used to troubleshoot most issues with DnD:
Printing all DataFlavor
instances
Printing received data
An alternative to remote debugging is the System.err.println()
function, which prints output without delay.
This section describes some issues that frequently arise with data transfer operations in AWT and suggests troubleshooting solutions.
Issue 1 - Pasting a huge amount of data from the clipboard takes too much time.
Using the Clipboard.getContents()
function for a paste operation sometimes causes the application to hang for a while, especially if a rich application provides the data to paste.
The Clipboard.getContents()
function fetches clipboard data in all available flavors (for example, some text and image flavors), and this can be expensive and unnecessary.
Solution: Use the Clipboard.getData()
method to get only specific data from the clipboard. If data in only one or a few flavors are needed, use one of the following Clipboard
methods instead of getContents()
:
DataFlavor[] getAvailableDataFlavors()
boolean isDataFlavorAvailable(DataFlavor flavor)
Object getData(DataFlavor flavor)
Issue 2 - When a Java application uses Transferable.getTransferData()
for DnD operations, the drag seems to take a long time.
In order to initialize transferred data only if it is needed, initialization code was put in Transferable.getTransferData()
.
Transferable
data is expensive to generate, and during a DnD operation Transferable.getTransferData()
is invoked more than once, causing a slowdown.
Solution: Cache the Transferable
data so that it is generated only once.
Issue 3 - Files cannot be transferred between a Java application and the GNOME/KDE desktop and file browser.
On Windows and some window managers, transferred file lists can be represented as DataFlavor.javaFileListFlavor
data flavor. But not all window managers represent lists of files in this format. For example, the GNOME window manager represents a file list as a list of URIs.
Workaround: To get files, request data of type String
, and then translate the string to a list of files according to text/uri-list format described in RFC 2483. To enable dropping files from a Java application to GNOME/KDE desktop and file browser, export data in the text/uri-list format. For a code example, see the Work Around section from the RFE.
Solution: Move a window with an image rendered on it as the mouse cursor moves during a DnD operation. See the code example in the Work Around section from the RFE.
Issue 4 - An image is passed to one of the startDrag()
methods of DragGestureEvent
or DragSource
, but the image is not displayed during the subsequent DnD operation.
Issue 5 - There is no way to transfer an array using DnD.
The DataFlavor
class has no constructor which handles arrays. The mime type for array contains characters which should be escaped. The code in Example 10-7 throws an IllegalArgumentException
.
Example 10-7 Code for IllegalArgumentException
new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType + "; class=" + (new String[0]).getClass().getName())
Solution: Quote the value of the representation class parameter, as shown in Example 10-8, where the quotation marks are escaped:
Example 10-8 Code for Representation Class Parameter
new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType + "; class=" + "\"" + (new String[0]).getClass().getName() + "\"")
For more information, see the this bug report.
Issue 6 - There are problems using AWT DnD support with Swing components.
Various problems can arise, for example, odd events are fired during a DnD operation, multiple items cannot be dragged and dropped, an InvalidDnDOperationException
is thrown.
Solution: Use Swing's DnD support with Swing components. Although the Swing DnD implementation is based on the AWT DnD implementation, you cannot mix Swing and AWT DnD. For more information, see the DnD section of the Swing Tutorial and Java Swing documentation.
Issue 7 - There is no way to change the state of the source to depend on the target.
In order to change the state of the source to depend on the target, you need to have references to the source and target components in the same area of code, but this is not currently implemented in the DnD API.
Workaround: One workaround is to add flags to the transferable object that allow you to determine the context of the event.
For the transfer of data within one Java VM, the following workaround is proposed:
Implement your target component as DragSourceListener
.
In DragGestureRecognizer.dragGestureRecognized()
add the target at drag source listener, as shown in Example 10-9.
Now you can get the target and the source in the dragEnter()
, dragOver()
, dropActionChanged()
, and dragDropEnd()
methods of DragSourceListener()
.
Issue 8 - Transferring of objects in an application takes a long time.
The transferring of a big bundle of data or the creation of transferred objects takes too long. The user must wait a long time for the data transfer to complete.
This expensive operation makes transferring too long because you must wait until Transferable.getTransferData()
finishes.
Solution: This solution is valid only for transferring data within one Java VM. Create or get expensive resources before the drag operation. For example, obtain file content when you create transferable, so that Transferable.getTransferData()
will not be too long.


My Work
BlocFlix
BlocFlix is a Netflix replica for finding the best movies and watching them online.
Blocipedia
Build a production quality SaaS app that allows users to create their own wikis.
Blocitoff
Build a self-destructing to-do list application.


Subtotal: {{po.subtotal | currency}}
Tax: {{po.tax | percent}}
Tax Amount: {{po.taxAmount | currency}}
Total: {{po.total | currency}}


hello sandeep kumar patel this is the server page
fill the from and submitted.
First name:
Last name:


Plain of Tears [ar30], plain, in Mandoria, peasants: 142
Last updated Turn #137
Plain of Tears [ar30], plain, in Mandoria, peasants: 142
------------------------------------------------------------------------
14: Band of thieves [ew0d], bandits, number: 80, went west.
26: Pack of wolves [hc0k], wolves, number: 6, arrived from the west.
28: Pack of wolves [hc0k], wolves, number: 6, went south.
30: The population grows by one peasant.
Routes leaving Plain of Tears:
North, plain, to Plain of Tears [aq30], 7 days
Garrison [jn5u], garrison, uncontrolled, with four peasants
East, plain, to Plain of Tears [ar31], 7 days
Garrison [cn8t], garrison, uncontrolled, with five peasants
South, plain, to Plain of Tears [as30], 7 days
West, plain, to Plain of Tears [ar29], 7 days
Seen here:
Pack of wolves [hc0k], wolves, number: 6


里面来自：2011年九度互动社区IT名企招聘上机考试热身赛
题目1326：Waiting in Line
- 题目描述：
- Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:
- The space inside the yellow line in front of each window is enough to contain a line with M customers. Hence when all the N lines are full, all the customers after (and including) the (NM+1)st one will have to wait in a line behind the yellow line.
- Each customer will choose the shortest line to wait in when crossing the yellow line. If there are two or more lines with the same length, the customer will always choose the window with the smallest number.
- Customer[i] will take T[i] minutes to have his/her transaction processed.
- The first N customers are assumed to be served at 8:00am.
Now given the processing time of each customer, you are supposed to tell the exact time at which a customer has his/her business done.
For example, suppose that a bank has 2 windows and each window may have 2 custmers waiting inside the yellow line. There are 5 customers waiting with transactions taking 1, 2, 6, 4 and 3 minutes, respectively. At 08:00 in the morning, customer1 is served at window1 while customer2 is served at window2.  Customer5 will wait behind the yellow line.
At 08:01, customer1 is done and customer5 enters the line in front of window1 since that line seems shorter now. Customer2 will leave at 08:02, customer4 at 08:06, customer3 at 08:07, and finally customer5 at 08:10.
- 输入：
- Each input file contains one test case. Each case starts with a line containing 4 positive integers: N (<=20, number of windows), M (<=10, the maximum capacity of each line inside the yellow line), K (<=1000, number of customers), and Q (<=1000, number of customer queries).
The next line contains K positive integers, which are the processing time of the K customers.
The last line contains Q positive integers, which represent the customers who are asking about the time they can have their transactions done. The customers are numbered from 1 to K.
- 输出：
- For each of the Q customers, print in one line the time at which his/her transaction is finished, in the format HH:MM where HH is in [08, 17] and MM is in [00, 59]. Note that since the bank is closed everyday after 17:00, for those customers who cannot be served before 17:00, you must output “Sorry” instead.
- 样例输入：
-
2 2 7 5 1 2 6 4 3 534 2 3 4 5 6 7
- 样例输出：
-
08:07 08:06 08:10 17:00 Sorry
题目大意：
有K个客户去银行办理业务，黄线内可以排队M个人。黄线外的人会优先选择人数少的队去排。 每个人花费的时间是不一样的。问每个人业务结束的时间。稍微有些繁琐的模拟。即使是17点之前开始办业务，17点之后仍然没有办完就是sorry。
#include <stdio.h> #include <iostream> #include <string> #include <vector> #include <map> #include <queue> #include <algorithm> using namespace std; bool _gDebug; #define _P(a) if (_gDebug) cout << #a":" << a << " " #define _P2(a, b) if (_gDebug) cout << #a":" << a << " "#b":" << b << endl #define _P3(a, b, c) if (_gDebug) {\ cout << #a":" << a << " "#b":" << b << " "#c":" << c << endl;} #define INF 100000 queue<pair<int, int> > wd[30]; int ans[1005]; int N, M, K, Q; int ki; int tt; void insert(int id, int t) { static int i = 0; _P3(i, id, t); wd[i++].push(make_pair(id, t)); if (i == N) i = 0; } int getMin() { int mid = 0; int mt = wd[0].front().second; for (int i = 1; i < N; ++i) { if (wd[i].front().second < mt) { mt = wd[i].front().second; mid = i; } } for (int i = 0; i < N; ++i) { wd[i].front().second -= mt; _P3(i, wd[i].front().first, wd[i].front().second); } tt += mt; ans[wd[mid].front().first] = tt; wd[mid].pop(); return mid; } int main(int argc, char *argv[]) { if (argc > 1) _gDebug = true; cin >> N >> M >> K >> Q; int tmp; for (ki = 0; ki<K && ki<N*M; ++ki) { cin >> tmp; insert(ki, tmp); } while (ki < K) { int mid = getMin(); cin >> tmp; _P3(ki, mid, tmp); wd[mid].push(make_pair(ki, tmp)); ++ki; } _P2(tmp, tt); for (int i = 0; i < N; ++i) { tmp = tt; while (! wd[i].empty()) { tmp += wd[i].front().second; ans[wd[i].front().first] = tmp; wd[i].pop(); } } for (int i = 0; i < Q; ++i) { cin >> tmp; tmp = ans[tmp-1]; if (tmp <= 9*60) { int hh = 8 + tmp/60; int mm = tmp % 60; printf("%02d:%02d\n", hh, mm); } else { printf("Sorry\n"); } } return 0; }
为什么暴力求解方法循环到sqrt(n) 就可以了呢
有没有C++编译的？
有谁知道直接遍历的方法中第8行是什么意思嘛？
很有意思，可惜我很菜啊
使用代码高亮的插件，再修改下css
什么破题，题意好难懂啊
程序员会算法，等于一个古惑仔带了zhi抢啊
simple, however efficient. A lot of instances it is difficult to get that a??perfect balancea?? among usability and appearance. I must say that youa??ve done a exceptional task with this. Also, the blog masses quite fast for me on Web explore.
有谁知道直接遍历的方法中第8行是什么意思嘛？
看见的晚了，只能提交一次唉
整理的很好，多谢
我还有个问题想请教一下，就是感觉对于新手来说，递归理解起来有些困难，不知有没有什么好的方法或者什么好的建议？
swap写成内联函数会不会好一些