Reader Submissions -
New Year's 2014
Written by Mattt Thompson on
As we prepare to increment our NSDateComponents
-year
by 1
, it's time once again
for NSHipster end-of-the-year Reader Submissions!
Last
year, we got some
mind-blowing tips and tricks. With the release of
iOS 7 & Mavericks, and a year's worth of new
developments in the Objective-C ecosystem, there was
a ton of new stuff to write about.
Thanks to Arnaud Coomans, Cédric Luthi, David Grandinetti, Ell Neal, Eric Allam, Erik Kerber, Jim Kubicek, Joachim Bengtsson, Johannes Lund, Josh Avant, João Prado Maia, Justin R. Miller, Kamil Pyć, Matthew Teece, Maximilian Tagher, Nigel Timothy Barber, Nolan O'Brien, Pitiphong Phongpattranont, Steve Moser, Thomas Visser, Vadim Shpakovski, & @jurre for contributing their great tips.
GCC Code Block Evaluation C Extension
Let's make this official: NSHipster's Objective-C trend of 2013 is code block evaluation assignment. Recommended by both Jim Kubicek and Maximilian Tagher (citing this blog post by Dominik Wagner), this trick does wonders to make code cleaner, safer, and more concise.
Behind the magic is a GCC C extension, which causes a code block to return a value if enclosed within brackets and parentheses.
Watch, as it cuts through this view controller code like butter!
self.searchBar = ({
UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:({
CGRect frame = self.tableView.frame;
frame.size.height = 50.0f;
frame;
})];
searchBar.delegate = self;
searchBar;
});
This not only segregates configuration details into
initialization, but the additional scope allows
generic variable names like frame
,
button
, and view
to be
reused in subsequent initializations. No more
loginButtonFrame = ... / signupButtonFrame =
...
!
If code craftsmanship is important to you, strongly consider making this standard practice in your work. It may look a bit weird at first, but this will very likely become common convention by the end of 2014.
Default Values with GNU-style Ternary ?:
The ternary operator, ?
, is shorthand
for if () {...} else {...}
. However,
because of how difficult it can be to understand
statements with ternary operators at a glance, they
are generally dispreferred by veteran coders.
Nonetheless, Maximilian Tagher
offers a lesser-known (yet much-loved by those
in-the-know) use of the ternary operator:
?:
, which acts as a convenient way to
specify a fallback value to return if the left-hand
side is nil
.
NSLog(@"%@", @"a" ?: @"b"); // @"a"
NSLog(@"%@", nil ?: @"b"); // @"b"
This is especially convenient for providing default behavior when a property may not be set:
dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
// ...
});
The main downside of this approach is that default
Xcode project warning settings will raise a warning.
You can get around this by wrapping the relevant code
block in #pragma
declarations, but the
added LOC nullifies much of the brevity that this
approach provides:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu"
self.name = name ?: @"Unknown";
#pragma clang diagnostic pop
@import
Vadim
Shpakovski reminds us of one of the more obscure
additions to LLVM 5.0, the @import
keyword. No more are the days of Xcode ▹
Project ▹ TARGETS ▹ General ▹ Linked Frameworks and
Libraries ▹ +
. With @import
, the
Xcode will automatically link MapKit
,
CoreData
, or any other referenced
framework as necessary. Even Prefix.pch
benefits, sporting a svelte new physique:
@import UIKit;
@import Foundation;
@import CoreGraphics;
Customizing MKMapView Tiles
Justin R. Miller, of MapBox fame, brings to our attention what is perhaps the most important feature in iOS 7 mapping: custom tile overlays:
Relatively little-known feature of iOS 7: you can turn off Apple's own maps now with
MKTileOverlay
,MKTileOverlayRenderer
, andcanReplaceMapContent
, unlike you could before with Apple or (pre-iOS 6) Google. And check out MBXMapKit if you'd like to do it in one line of code.
Thoughtbot's Blog Post on MapKit Performance
Speaking of iOS maps, João Prado Maia cites an amazing blog post by thoughtbot, "How To Efficiently Display Large Amounts of Data on iOS Maps" by Theodore Calmes. Consider it a must-read if you plan to do any significant iCartography in 2014.
NSAttributedString + HTML in iOS 7
Shifting gears a little bit, Eric Allam
remarks that NSAttributedString
can do
HTML now in iOS 7 with the new
NSHTMLTextDocumentType
document type
attribute. Combine with MMMarkdown
for ridiculously easy
Markdown rendering in a UITextView
.
Launch Arguments & User Defaults
Offering another tip, Vadim Shpakovski
calls our attention to the relationship between
launch arguments and NSUserDefaults
:
The command line argument -TestFeatureEnabled
YES
can be checked in code with
[[NSUserDefaults standardUserDefaults]
boolForKey:@"TestFeatureEnabled"]
. This is
useful for debugging development builds.
Woes of a Missing UIViewAnimationCurve
Value
Thomas Visser bemoans his pick for least awesome Objective-C development in 2013:
In iOS7, the animation of the keyboard show/hide changed. Its duration and, most notably, its curve is different from previous iOS versions. As before, if you want to animate something with the keyboard, you can listen to
UIKeyboardWillShowNotification
/UIKeyboardWillHideNotification
and use the values from theuserInfo
dictionary to coordinate your animations with the keyboard. TheuserInfo
dictionary contains the keyboard's begin frame, end frame, animation curve and animation duration.However, in iOS 7, the animation curve is an undefined value, meaning that it is not one of the 4 defined values of
UIViewAnimationCurve
. Instead, its value is7
. This is a problem if you want to use the same curve in your own animation, because such a curve is not defined. The work-around, as discussed on the Apple forums, is to manually translate theUIViewAnimationCurve
to aUIViewAnimationOptions
value. From the definition ofUIViewAnimationOptions
, we learn that this translation is done by shifting the curve value 16 times to the left:option = curve << 16
. This works great, but shouldn't be necessary. I hope Apple will add this mysterious 5th curve to the definitions in a future iOS update.
Injecting Analytics on Outgoing Links
David
Grandinetti has a tip for apps that want to track
outgoing links from within an app: override
AppDelegate -openURL:
:
-(BOOL)openURL:(NSURL *)url{
if ([[url scheme] hasPrefix:@"http"]) {
[[GAI sharedInstance].defaultTracker sendView:[url absoluteString]];
}
return [super openURL:url];
}
In this example, this information is being sent to Google Analytics, but one could easily adapt this approach for any analytics provider.
Reviving the Look-and-Feel of iOS 6 in Your App with One Weird Trick (UI Designers hate it!)
Still resisting the aesthetics of this year's iOS makeover? Kamil Pyć shows us how to act as if iOS 7 never happened:
[[NSUserDefaults standardUserDefaults] setObject:@YES forKey:@"UIUseLegacyUI"]
And, of course, following up from a previous tip, since
NSUserDefaults
is tied to launch arguments, this can also be specified on launch. Keep this tucked in the back of your mind—this could make for a simple yet effective April Fool's joke.
Detecting Category Method Collisions
Categories are great, but suffer from that same original sin of Objective-C: lack of name-spacing. Duplicate method declarations in categories interact in undefined ways, and may lead to difficult-to-debug behavior.
Fortunately, Cédric Luthi shows us how to tell if any category methods are getting up in one another's business:
Set the
OBJC_PRINT_REPLACED_METHODS
environment variable toYES
in order to automatically log all methods that are smashed by categories.
A .plist of Emoji, Grouped by Category
In an encore submission, Cédric brings us a .plist file of Emoji grouped by category (mirrored from CloudApp to Gist in order to be more searchable). 😄👍
Quickly Determining the Type of Image Data
Here's a simple function from Nolan O'Brien that can be used to determine the type of image data based on the first couple bytes of the header:
static inline NSPUIImageType NSPUIImageTypeFromData(NSData *imageData) {
if (imageData.length > 4) {
const unsigned char * bytes = [imageData bytes];
if (bytes[0] == 0xff &&
bytes[1] == 0xd8 &&
bytes[2] == 0xff)
{
return NSPUIImageType_JPEG;
}
if (bytes[0] == 0x89 &&
bytes[1] == 0x50 &&
bytes[2] == 0x4e &&
bytes[3] == 0x47)
{
return NSPUIImageType_PNG;
}
}
return NSPUIImageType_Unknown;
}
Print KVO Context
Once again, showing off his unmatched knowledge of Objective-C internals, Cédric shares this extremely useful tip for debugging Key-Value Observing.
Print which context is passed to
observeValueForKeyPath:ofObject:change:context:
in lldb.Say you have declared a context like this:
static const void *MyFooContext = &MyFooContext;
...and you want to to know what context it is when you are inside
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context
You can do this:
(lldb) image lookup -a `context`
Address: MyApp[0x00026258] (MyApp.__DATA.__data + 4)
Summary: MyFooContext
Creating a KeyPath from Selectors
On the subject of Key-Value Coding, Pitiphong Phongpattranont offers this useful function that builds a keypath from a variable list of selectors:
inline NSString * PTPKeyPathForSelectors(SEL selector, ...) {
if (!selector) {
return nil;
}
NSMutableArray *selectors = [NSMutableArray array];
va_list args;
va_start(args, selector);
SEL arg = selector;
do {
[selectors addObject:NSStringFromSelector(arg)];
} while((arg = va_arg(args, SEL)));
va_end(args);
return [selectors<EMAIL_ADDRESS>}
NSString *keyPath = PTPKeyPathForSelectors(@selector(data), @selector(name), nil);
// => @"data.name"
Nomad CLI Utilities
And finally, Matthew Teece gives a shout-out to Nomad, a world-class collection of command-line utilities—specifically, Houston, which can send and manage push notifications from the command line, or within your Ruby application.
$ apn push "<token>" -c /path/to/cert.pem -m "Hello!"
Thus concludes this year's reader submissions. Thanks again to everyone for your submissions!
And thanks to you, dear reader, for sticking with NSHipster for another 52 weeks. Between the WWDC session and the book, 2013 has been a bellwether year for NSHipster. Thank you for your support and enthusiasm for the site—it really does mean the world to me.
We have a ton of great stuff planned for 2014, so keep your fixies primed and your artisanal espresso hot for another season of great iOS and Mac OS X knowledge.


|
UMI3D Unity SDK
2.5.b.221125
A UMI3D sdk implementation using Unity
|
Configuration of the server. More...
Static Public Member Functions | |
| static ConfigServer | ReadXml (string path) |
| Read config server file. More... | |
| static void | WriteXml (ConfigServer conf, string path) |
Public Attributes | |
| string | nameParam = "" |
| Set the name of the environment. More... | |
| string | ipParam = "" |
| Set the public IP address of the server. More... | |
| string | resourcesDefaultUrlParam = "" |
| Set the resources' default URL. More... | |
| float | tokenLifeParam = -1 |
| Set the token life span. More... | |
| ushort | httpPortParam = 0 |
| Set the http port. More... | |
| ushort | udpportParam = 0 |
| Set the websocket port. More... | |
| string | masterIpParam = "" |
| Set the public IP address of the master server. More... | |
| ushort | masterPortParam = 0 |
| Set the port of the master server. More... | |
| string | natIpParam = "" |
| Set the public IP address of the NAT server. More... | |
| ushort | natPortParam = 0 |
| Set the port of the NAT server. More... | |
| int | playersParam = 0 |
| Set the max number of player. More... | |
| string | sessionIdParam = "" |
| Set the id of the session. More... | |
| string | sessionCommentParam = "" |
| Set the comment of the session. More... | |
| string | iconUrlParam = "" |
| Set the icon URL of the server. More... | |
| string | loggingScopeParam = "" |
| Set the log scope. More... | |
| string | loggingLevelParam = "" |
| Set the log level. More... | |
| string | loginfoOutputPathParam = "" |
| Set the loginfo file output path. More... | |
| float | loginfoFrequencyParam = -1f |
| Set the loginfo frequency. More... | |
| string | logOutputPathParam = "" |
| Set the log file output path. More... | |
Configuration of the server.
|
static |
Read config server file.
| path | must be a valid path. |
|
static |
| ushort umi3d.edk.collaboration.ConfigServer.httpPortParam = 0 |
Set the http port.
| string umi3d.edk.collaboration.ConfigServer.iconUrlParam = "" |
Set the icon URL of the server.
| string umi3d.edk.collaboration.ConfigServer.ipParam = "" |
Set the public IP address of the server.
| string umi3d.edk.collaboration.ConfigServer.loggingLevelParam = "" |
Set the log level.
| string umi3d.edk.collaboration.ConfigServer.loggingScopeParam = "" |
Set the log scope.
| float umi3d.edk.collaboration.ConfigServer.loginfoFrequencyParam = -1f |
Set the loginfo frequency.
| string umi3d.edk.collaboration.ConfigServer.loginfoOutputPathParam = "" |
Set the loginfo file output path.
| string umi3d.edk.collaboration.ConfigServer.logOutputPathParam = "" |
Set the log file output path.
| string umi3d.edk.collaboration.ConfigServer.masterIpParam = "" |
Set the public IP address of the master server.
| ushort umi3d.edk.collaboration.ConfigServer.masterPortParam = 0 |
Set the port of the master server.
| string umi3d.edk.collaboration.ConfigServer.nameParam = "" |
Set the name of the environment.
| string umi3d.edk.collaboration.ConfigServer.natIpParam = "" |
Set the public IP address of the NAT server.
| ushort umi3d.edk.collaboration.ConfigServer.natPortParam = 0 |
Set the port of the NAT server.
| int umi3d.edk.collaboration.ConfigServer.playersParam = 0 |
Set the max number of player.
| string umi3d.edk.collaboration.ConfigServer.resourcesDefaultUrlParam = "" |
Set the resources' default URL.
| string umi3d.edk.collaboration.ConfigServer.sessionCommentParam = "" |
Set the comment of the session.
| string umi3d.edk.collaboration.ConfigServer.sessionIdParam = "" |
Set the id of the session.
| float umi3d.edk.collaboration.ConfigServer.tokenLifeParam = -1 |
Set the token life span.
| ushort umi3d.edk.collaboration.ConfigServer.udpportParam = 0 |
Set the websocket port.


{% seo %}
Please Note: Nu works on Windows 10 and does not currently have Windows 7/8.1 support.
Download the current released .zip
-file from the
release page
and extract it, for example, to:
C:\Program Files
And then add the folder of nu
to your PATH
.
Once we have done that, we can run Nu using the nu
command:
> nu
C:\Users\user>
If you use Scoop on Windows, you can install the binary by running
> scoop install nu
For instructions on how to build Nu locally please look over here.
Packages are available in the following repos:
If you use Homebrew on Linux, you can install the binary by running
> brew install nushell
For instructions on how to build Nu locally please look over here.
You can download Nu pre-built from the release page.
If you use Homebrew on macOS, you can install the binary by running
> brew install nushell
For instructions on how to build Nu locally please look over here.
You can find us here:


Across: 1. Dealer's question to pub worker? (6) 4. Cures one during voyage (6) 9. Fiery saint chops up mole! (4) 10. US fuel supplier may be talking shop (3 7) 11. Force in thinner digit (6) 12. Near riot at the front! (8) 13. Cannot be described - or sworn about? (9) 15. Stand up to duly elected federal yeomanry initially (4) 16. Case involves north atlantic ocean (4) 17. Firm varies set arrangement (9) 21. Model with ruptured diaphragm rejected hospital (8) 22. Close embrace? (6) 24. Roman coins Raoul distributed (10) 25. Rent out to flyer (4) 26. Croats make up the cast (6) 27.  (6) Down: 1. Tablet I take on back seat (7) 2. Underwear found in bath on Good Friday (5) 3. Country song about broken leg (7) 5. Otter gets in a spin! (6) 6. Incarceration? No - take out for burial! (9) 7. 'E may be reticent about record of environmental study (7) 8. Thisbe's mental institution? (13) 14. Story-teller drinks first (9) 16. Penny and I take out a loan for instrument (7) 18. Wrapped up investigation into death (7) 19. Boys go out east to find governor (7) 20. I will get in usual support (6) 23. I have torn the first part (5)


WebApp SignUp Page
Email Address
Please enter an Email address
Password
Please enter an Password
SignUp
WebApp SignIn Page
Email Address
Please enter an Email address
Password
Please enter an Password
SignIn


You can use the $ sign to select elements from the DOM! It will feel a lot like selecting using querySelectorAll().
For example:


Information in
accordance with § 5 German Broadcast Media Act (TMG):
This website
is run by:
Localinit UG (haftungsbeschränkt)
represented by
Moritz Hüper
Bürgerstr. 8
50667 Cologne
Germany
<EMAIL_ADDRESS>Rbytr - the software - used to run this website
is open source and licenced under the following MIT license:
Copyright (c) 2016 Moritz Hüper, Localinit UG
(haftungsbeschränkt)
Permission is hereby granted, free of
charge, to any person obtaining a copy of this software and
associated documentation files (the 'Software'), to deal in the
Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Except as contained in this notice, the name of the
copyright owners shall not be used in advertising or otherwise to
promote the sale of this Software without prior written
authorization from the copyright owners.
Exemption from Liability:
Liability for Content
The contents of the 'web pages' and the
newsletter are prepared with the upmost care. The provider accepts
no responsibility for the accuracy, completeness or timeliness of
the content. The use of the content of the 'web pages' is at the
user's own risk. Contributions mentioned by name reflect the opinion
of the author and not necessarily the opinion of the provider. As a
service provider we are responsible according to § 7 paragraph 1 of
TMG for our own contents on these pages under the general law.
According to §§ 8 to 10 TMG, we are not obligated as a service
provider to monitor transmitted or stored information, or to
investigate circumstances that suggest an illegal activity.
Obligations to remove or block the use of information remain, in
accordance with legal regulations, unaffected. Any liability in this
respect can be assumed only from the moment that knowledge of the
specific breach of law is obtained. In the event that the
corresponding violations become known, we shall remove these
contents immediately.
Liability for Links
Our offer contains links
to external websites operated by third parties, on whose contents we
have no influence. Therefore, we cannot assume liability for these
contents. Instead, it is the relevant supplier or operator of the
linked web pages who is responsible for the content of these pages.
The linked pages were inspected for possible legal infringements at
the time the link was established. At the time of linking, no
unlawful contents were detectable. Permanent monitoring of the
content of the linked pages is infeasible without any specific
indication of an infringement of rights. In the event that
corresponding violations become known, we shall remove the
corresponding links immediately.
Copyright The contents on these
websites, as prepared and displayed by its operator, are subject to
German copyright law. Their duplication, processing, distribution,
or any form of commercialization beyond the scope of the copyright
law requires the written consent of the respective author or
creator. Copies and downloads are allowed solely for private and
non-commercial purposes. Insofar as this page's contents were not
created by its operator, third-party copyrights will be respected
and observed. Should you still have reason to believe that a
copyright violation has occurred despite the precautionary measures
taken, we kindly ask you to notify us. In the event that the
corresponding violations become known, we shall remove this content
immediately.
Data and Privacy Protection/Data Privacy
Generally, the
use of our website is possible without the need to provide personal
data. When you are asked to provide personal data (e.g., name,
address or e-mail address), this is, as far as possible, optional
for you. We do not pass this information to third parties without
your explicit agreement. Please note that the transmission of data
via the Internet (e.g., e-mail communication) can be insecure. A
complete protection against access through third parties is not
possible. The use of published contact information within the
disclosure to transmit unwanted advertising or other marketing
material shall be expressly excluded. The provider of these pages
explicitly reserve the right to take legal action in case of
receiving unwanted advertising, e.g., via junk mail.
Data Privacy
Protection When Using Google Analytics
This web page uses Google
Anylytics, a website statistics service provided by Google Inc.
based in Mountain View, USA ("Google"). Google Analytics uses
'cookies', text files stored on your computer which allow an
analysis of your use of the website. The information about your use
of this web page generated by the cookies, will be passed on to and
stored by Google on a server in the United States. Google provides
IP anonymization (so-called IP masking) and this is activated on
this website. Google will therfore shorten your IP address within
member states of the European Union and other member states of the
European Economic Area (EEA). Only on rare occasions, the entire IP
address will be transmitted to and then abbreviated by a US Google
server. On behalf of the this web pages operator, Google will use
the information in order to evaluate your use of the site, and to
compile reports on website activities. Moreover, information
concerning usage of the web pages and internet use will be gathered
to offer further services to this pages' operator. The IP address
transmitted will not be linked to any other Google data. By setting
your browser accordingly, you may block the storage of cookies.
Furthermore, you can deny collection of the cookie-related data and
any information related to your use of this website (including your
IP address) to be processed by Google, by downloading and installing
the appropriate browser plug-ins: https://www.eff.org/privacybadger,
https://adblockplus.org


Galanize Delivery
Order Delivery
Menu
Royal with Cheese
$8.99
ADD TO ORDER
Arugula Pie
$11.99
ADD TO ORDER
Smoked Swine
$14.99
ADD TO ORDER
Ice Cream Bisuit
$7.99
ADD TO ORDER
Order
Item
Price
SubTotal
Tax
Total
account_circle
Name
phone
Phone Number
business
Address
Place Order
We have your Order
Here is your Order
Proceed with Payment
Confirm your order
Confirm and Pay
Swipe and make Payment


This sample initializes the tree from a JSON request.
jquery.dynatree.js project home Link to this page Example Browser View source code


Basic Crud App with users and employees
Features
simple crud api
users can login and signup
employees can login and see admin dashboard
admin can create/delete employees
Pages
login
signup
employee login
admin dashboard
dashboard
api
adminAPI


This projects replicates some of the UI components in Java Swing. It serves as a playground to improve skills in HTML, CSS and JS.


If you'd like to have an indicator updated using a specific resolution of data; e.g. 30-period, 15-minute EMA; then you should ideally use the helper methods which come with the indicators. Most indicators handle setting up these resolution periods for you. See Indicators for more information.
You may have a custom indicator which doesn't have this helper. In this case you should register your indicator with the $[RegisterIndicator] function which will automatically create a consolidator and pipe the data into your Indicator class.
In very rare cases you may want to update your indicator manually. You can do this by passing each data point into your indicator.Update()
method from your consolidator DataConsolidated
event handler.


This is a project skeleton for Angular.js single-page user interface applications. Simply fork the repo to get started.
Learn more about LEANSTACKS by going to leanstacks.com.
Get coding tips and tricks from LEANSTACKS pros on YouTube.


{% extends 'base.html' %} {% block body_title %}
For more information, see freedomofkeima/MoeFlow and freedomofkeima/transfer-learning-anime at Github.
List of 100 supported characters can be accessed here.
Note: This operation will be very slow (around 15 seconds) if there are a lot of characters in a single image!
{% endblock %} {% block body %}| Character | Prediction (Top-3) | Confidence |
|---|---|---|
| {% endif %} | {{ prediction.tag.value }} |
|


Trusom1843.github.io
Datalogic is a world-class producer of bar code readers, mobile computers, sensors, vision and laser marking systems for Retail, Manufacturing, Transportation Logistics and Healthcare industries. Handbuch zur Primärprobenentnahme - klinikum.uni-muenchen.de. Welcome to TAP! Find out our cheap flights, delicious meals and many benefits for flying
Datalogic Global Technology Leader in the Automatic. Zebra builds enterprise-level data capture and automatic identification solutions that provide businesses with operational visibility.
The New York and Brooklyn Bridge was opened for use on May 24, 1883. Thousands of people attended the opening ceremony, and many ships were present in the East Bay for the occasion. Search in Woodway catalogs and technical brochures on MedicalExpo and find the information you need in 1 click.
FlyTAP - Official Site TAP Air Portugal. Search the world s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you re looking. Woodway ST PPS 43 Med Handbücher. Original facade of St. Mark s Basilica Plan diagram, showing different phases of construction The first St Mark s was a building next to the Doge s Palace , ordered by the doge in 828, when Venetian merchants stole the supposed relics of Mark the Evangelist from Alexandria , and completed by 832; from the same century dates the first St Mark s Campanile (bell tower). Best Note Taking App Organize Your Notes with Evernote. Zebra Technologies Enterprise Visibility Data Capture.
Evernote is the app that keeps your notes organized. Memos are synced so they’re accessible anywhere, and searchable so you always find what you need. Learn. St Mark s Basilica - Wikipedia. All Woodway catalogues and technical brochures KLINIKUM DER UNIVERSITÄT MÜNCHEN Seite 3 von 44 Handbuch zur Primärprobenentnahme VA-PÄ 2 Dokumenten ID:ANVDMCMHR44J-695-303 7 Beeinflussung der Untersuchungsergebnisse _____.


[§658F-1] Short title. This chapter may be cited as the Uniform Foreign-Country Money Judgments Recognition Act. [L 2009, c 34, pt of §1]


λ encoding
Warning
The following is just a quick first draft. The code shown here might be completely out of date and not work as written. As of version 0.0.17, the console example shown below did work.
Suppose we want to run a program that has a custom encoding;
in this case, we use λ
to represent Python’s lambda
keyword:
# coding: lambda-encoding
square = λ x: x**2
assert square(3) == 9
print("Using lambda-encoding: λ") # λ is not converted inside strings
if __name__ == '__main__':
print("The square of 5 is", square(5))
Before we can do this, we need to make Python aware of the existence of our custom encoding. This can be done by having the following program:
# usercustomize.py
from ideas.examples import lambda_codec # noqa
print(" --> usercustomize.py was executed")
By setting PYTHONPATH
to a directory where a program named
usercustomize.py
is found, any such program is automatically run before
the main script.
As we can see, when we run it, the source transformation is done correctly.
TESTS:\lambda_encoding
$ set PYTHONPATH=%CD%
TESTS:\lambda_encoding
$ python short_program.py
--> usercustomize.py was executed
Using lambda-encoding: λ
The square of 5 is 25
We can also use the ideas console and have our special encoding be used.:
>>> from ideas.examples import lambda_codec
>>> from ideas import console
>>> console.start()
Configuration values for the console:
transform_source from ideas.examples.lambda_codec
--------------------------------------------------
Ideas Console version 0.0.17. [Python version: 3.7.3]
~>> sq = λ x: x*x
~>> sq(3)
9
lambda_codec.py
This codec replaces any Python identifier (token) represented by the single Greek letter ‘λ’ by the corresponding string ‘lambda’ which is the Python keyword.
The source is assumed to be actually encoded in utf-8.
lambda_encoding.py
This codec replaces any Python identifier (token) represented by the single Greek letter ‘λ’ by the corresponding string ‘lambda’ which is the Python keyword.
The source is assumed to be actually encoded in utf-8.


---
comments: false
date: 2010-05-24
layout: post
permalink: /2010/05/control-right-next-word-in-python.html
tags:
- apple
- python
- readline
title: control-right next-word in python interpreter and readline on a mac
---
It's bothered me for a long time that the python interpreter ignores my .inputrc and prints ;5D;5C when I do control-left and control-right on my mac (both OSX 10.5 Leopard and 10.6 Snow Leopard). It works fine everywhere else and I finally found the simple solution:
sudo easy_install readline
You'll also need the following lines in ~/.inputrc but you likely have those anwyay.
"\e[1;5D": backward-word
"\e[1;5C": forward-word
my .inputrc has a bunch of junk in it that I can't even remember why it was added here are some other gems from it:
set completion-ignore-case on
set bell-style visible
set mark-symlinked-directories on
set bind-tty-special-chars off


A1 India Marketing
Welcome to A1 India Marketing.

Full Name
Occupation
Email
Password
Repeat Password
I am already a member


| pyears {survival} | R Documentation |
This function computes the person-years of follow-up time contributed by a cohort of subjects, stratified into subgroups. It also computes the number of subjects who contribute to each cell of the output table, and optionally the number of events and/or expected number of events in each cell.
pyears(formula, data, weights, subset, na.action, rmap, ratetable, scale=365.25, expect=c('event', 'pyears'), model=FALSE, x=FALSE, y=FALSE, data.frame=FALSE)
formula |
a formula object.
The response variable will be a vector of follow-up times
for each subject, or a |
data |
a data frame in which to interpret the variables named in
the |
weights |
case weights. |
subset |
expression saying that only a subset of the rows of the data should be used in the fit. |
na.action |
a missing-data filter function, applied to the model.frame, after any
|
rmap |
an optional list that maps data set names to the ratetable names. See the details section below. |
ratetable |
a table of event rates, such as |
scale |
a scaling for the results. As most rate tables are in units/day, the default value of 365.25 causes the output to be reported in years. |
expect |
should the output table include the expected number of events, or the expected number of person-years of observation. This is only valid with a rate table. |
data.frame |
return a data frame rather than a set of arrays. |
model, x, y |
If any of these is true, then the model frame, the model matrix, and/or the vector of response times will be returned as components of the final result. |
Because pyears
may have several time variables, it is necessary that all
of them be in the same units. For instance, in the call
py <- pyears(futime ~ rx, rmap=list(age=age, sex=sex, year=entry.dt), ratetable=survexp.us)
the natural unit of the ratetable is hazard per day, it is important that
futime
,
age
and entry.dt
all be in days.
Given the wide range of possible inputs,
it is difficult for the routine to do sanity checks of this aspect.
The ratetable being used may have different variable names than the user's
data set, this is dealt with by the rmap
argument.
The rate table for the above calculation was survexp.us
, a call to
summary{survexp.us}
reveals that it expects to have variables
age
= age in days, sex
, and year
= the date of study
entry, we create them in the rmap
line. The sex variable is not
mapped, therefore the code assumes that it exists in mydata
in the
correct format. (Note: for factors such as sex, the program will match on
any unique abbreviation, ignoring case.)
A special function tcut
is needed to specify time-dependent cutpoints.
For instance, assume that age is in years, and that the desired final
arrays have as one of their margins the age groups 0-2, 2-10, 10-25, and 25+.
A subject who enters the study at age 4 and remains under observation for
10 years will contribute follow-up time to both the 2-10 and 10-25
subsets. If cut(age, c(0,2,10,25,100))
were used in the formula, the
subject would be classified according to his starting age only.
The tcut
function has the same arguments as cut
,
but produces a different output object which allows the pyears
function
to correctly track the subject.
The results of pyears
are normally used as input to further calculations.
The print
routine, therefore, is designed to give only a summary of the
table.
a list with components:
pyears |
an array containing the person-years of exposure. (Or other units, depending on the rate table and the scale). The dimension and dimnames of the array correspond to the variables on the right hand side of the model equation. |
n |
an array containing the number of subjects who contribute time to each cell
of the |
event |
an array containing the observed number of events. This will be present only
if the response variable is a |
expected |
an array containing the expected number of events (or person years if
|
data |
if the |
offtable |
the number of person-years of exposure in the cohort that was not part of
any cell in the |
tcut |
whether the call included any time-dependent cutpoints. |
summary |
a summary of the rate-table matching. This is also useful as an error check. |
call |
an image of the call to the function. |
observations |
the number of observations in the input data set, after any missings were removed. |
na.action |
the |
# Look at progression rates jointly by calendar date and age # temp.yr <- tcut(mgus$dxyr, 55:92, labels=as.character(55:91)) temp.age <- tcut(mgus$age, 34:101, labels=as.character(34:100)) ptime <- ifelse(is.na(mgus$pctime), mgus$futime, mgus$pctime) pstat <- ifelse(is.na(mgus$pctime), 0, 1) pfit <- pyears(Surv(ptime/365.25, pstat) ~ temp.yr + temp.age + sex, mgus, data.frame=TRUE) # Turn the factor back into numerics for regression tdata <- pfit$data tdata$age <- as.numeric(as.character(tdata$temp.age)) tdata$year<- as.numeric(as.character(tdata$temp.yr)) fit1 <- glm(event ~ year + age+ sex +offset(log(pyears)), data=tdata, family=poisson) ## Not run: # fit a gam model gfit.m <- gam(y ~ s(age) + s(year) + offset(log(time)), family = poisson, data = tdata) ## End(Not run) # Example #2 Create the hearta data frame: hearta <- by(heart, heart$id, function(x)x[x$stop == max(x$stop),]) hearta <- do.call("rbind", hearta) # Produce pyears table of death rates on the surgical arm # The first is by age at randomization, the second by current age fit1 <- pyears(Surv(stop/365.25, event) ~ cut(age + 48, c(0,50,60,70,100)) + surgery, data = hearta, scale = 1) fit2 <- pyears(Surv(stop/365.25, event) ~ tcut(age + 48, c(0,50,60,70,100)) + surgery, data = hearta, scale = 1) fit1$event/fit1$pyears #death rates on the surgery and non-surg arm fit2$event/fit2$pyears #death rates on the surgery and non-surg arm


Estás haciendo cambios para GitHub.
Eduardo Williams Torio - A01338778.


Are you sure you want to delete this Entry?
This action cannot be undone.
Delete Cancel| Status: Encrypted |
This action may make all past entries unaccessible if you loose the current salt.
Random Salt CancelFeisty Pass is a password management app that automatically encrypts its entries by using feistel networks and another password.
Feisty Pass is meant to offer some protect for sensitive information that you need to have available.
It is not fool-proof security/encryption, but it should be enough for daily use.
Getting Started
You can edit an entry even if it is encrypted. But if it is encrypted, you can only see and edit the title and description.
Entries support markup in their description and in the encrypted section.
Password Box: This is a box meant to hold passwords, for a bit of added protection.
| Form Input | Entry Display |
|---|---|
From the List screen,
make sure the "Sortable" checkbox at the end of the screen, then drag and drop the entries into place.
If the checkbox is not shown on the screen, taping the screen should make it appear.
On the specific entry's display page, press the "Encrypt" button. The entry should now be encrypted
Note: This button only appears on Decrypted entries, and is replaced with the "Decrypt" button on Encrypted entries.
On the specific entry's display page, press the "Decrypt" Button and enter the correct password.
If the password is incorrect, the page remains unchanged. If the password is correct, the encrypted section is decrypted
Note: This button only appears on Encrypted entries, and is replaced with the "Encrypt" button on decrypted entries.
You can also change the salt you're using to decrypt the entry with by clicking "salt" and changing the line that appears below.
Deleting Individual Entries:
To delete a specific entry, starting from the List screen, Click on the entry you want to delete.
In the Entry's display screen, press the "Delete" button at the bottom of the screen.
Press the "Delete" button in the resulting Popup dialog to confirm deletion.
Deleting All Entries:
Go to the Options page at the top right corner of the screen.
The last option in the options page is "Delete All Entries", press it and press "Delete" on the resulting popup.
On the Options page, press the "Save to File" button.
This will save a file to "Feisty/feistypass.txt" on your device.
It is hoped that a file dialog that lets you navigate and choose where to save this file can be implemented some day.
On the Options page, press the "Load from File" button.
This will load a file from "Feisty/feistypass.txt" on your device.
It is hoped that a file dialog that lets you navigate and choose what file to load can be implemented some day.
Warning: This will erase all existing entries and replace them with the ones from the file.
In Cryptography, a salt is random data that is used with a one-way function* on a password.
By using this random data with a one-way function,
it helps protect passwords from common types of attack such as "dictionary attacks" and pre-computed "rainbow table" attacks.
To change this app's salt,
go to the Options page and edit the line of text with the "Salt" label to the top left of it.
Changes are automatically saved and applied.
You can also use the "Generate Random Salt" button to generate a new random salt.
Warning: changing the salt will make any entry created with the previous salt
harder to decrypt, requiring you to enter the old salt along with the password.
This can be fixed by "changing" the password while the new salt is set, even if you're setting the password to it's current value.
* A one way function is something that takes input, and will produce an output based on that input,
but which there is no function that can change that output back into the input.
This Option controls whether the entry is encrypted upon editing it and before displaying it again,
or keeps decrypted entries decrypted once an edit is saved.
If Encrypt on Edit is checked, then a decrypted entry will be encrypted when edits to it are saved.
If Encrypt on Edit is not checked, then a decrypted entry will remain decrypted when edits to it are saved.
This Option controls whether the entry is encrypted upon creating it and before displaying it again,
or keeps new entries decrypted once created.
If Encrypt on New is checked, then a new entry will be encrypted when created and displayed for the first time.
If Encrypt on New is not checked, then a new entry will remain decrypted when created and displayed for the first time.
This Option effects entry creation.
If Generate Random Password is checked,
then the form for creating a new entry will contain a randomly generated password in the secret section.
If Generate Random Password is not checked, then the form for creating a new entry will be entirely blank.
Randomly generated passwords consist of numbers, capital and lower case letters, and the following two symbols: -_
It is hoped password generation for this app can be improved in the future, but I have no idea of how to proceed on that.
Cryptography is a collection of techniques for securely communicating with others despite the presence of observers. To Encrypt is to take a message and change it in such a way that it can no longer be read, but can still be decrypted. To Decrypt is to transform an encrypted message into a readable message.
A bad password is one that is easy to guess or find out. Attackers try to guess passwords in a variety of ways, including trying common words and commonly used passwords. For these and other reasons, never use a password that is any of the following:
A Feistel Network is a key element of many encryption schemes, including Feisty Pass's. The steps a Feistel Network performs are as follows:
This app was Created by Ouroboros Productions of OuroborosProductions.org
and licensed under the MIT license.
Software used as part of this app includes the following:
Copyright (c) 2015 OuroborosProductions.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


src/app/_services/app.config.ts
Class to load the configuration of the frontend.
Properties |
|
Methods |
|
Accessors |
constructor(http: HttpClient, toastr: ToastrService)
|
|||||||||
|
Defined in src/app/_services/app.config.ts:30
|
|||||||||
|
Parameters :
|
| Static clear |
clear()
|
|
Defined in src/app/_services/app.config.ts:74
|
|
Removes values from the config object which should not be stored.
Returns :
void
|
| Private findWorkingHost | |||||||||||||||
findWorkingHost(hostlist: Array
|
|||||||||||||||
|
Defined in src/app/_services/app.config.ts:110
|
|||||||||||||||
|
Tries to find a working host from hostlist.
Parameters :
Returns :
void
|
| Public load |
load()
|
|
Defined in src/app/_services/app.config.ts:144
|
|
Loads the config from the backend and stores it in the settings object
Returns :
any
a Promise that is resolved as soon as the config is loaded |
| Private Static removePrivateValues | ||||||||||||
removePrivateValues(obj: any, level: number)
|
||||||||||||
|
Defined in src/app/_services/app.config.ts:53
|
||||||||||||
|
Removes all elements that start with a underscore "_".
Parameters :
Returns :
void
|
| Public storeSettings |
storeSettings()
|
|
Defined in src/app/_services/app.config.ts:91
|
|
Stores the appconfig file on the backend server.
Returns :
void
|
| Private fallbackConfPath |
Type : string
|
Default value : "assets/config/config.json"
|
|
Defined in src/app/_services/app.config.ts:30
|
|
Fallback to the local config file. If no backend is found, this config will be used to make sure the frontend can boot |
| Private hostspath |
Type : string
|
Default value : "assets/config/hosts.json"
|
|
Defined in src/app/_services/app.config.ts:24
|
|
Path to the hosts.json file. Contains different IP-Adresses on which the client should look for the backend server |
| Public http |
Type : HttpClient
|
|
Defined in src/app/_services/app.config.ts:38
|
| Static settings |
Type : IAppConfig
|
|
Defined in src/app/_services/app.config.ts:18
|
|
Contains the Configuration of the app. |
| apiUrl |
getapiUrl()
|
|
Defined in src/app/_services/app.config.ts:43
|
|
Return the url leading to the API path. <
Returns :
string
|
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { IAppConfig } from '../_models/app-config.model';
import { ToastrService } from 'ngx-toastr';
import { timeout, catchError } from 'rxjs/operators';
import { throwError } from 'rxjs';
/**
* Class to load the configuration of the frontend.
*/
@Injectable()
export class AppConfig {
/**
* Contains the Configuration of the app.
*/
public static settings: IAppConfig;
/**
* Path to the hosts.json file. Contains different IP-Adresses on which the client should look for the backend server

* Since a host connecting to the RPI will run the same script we need to be able to use different IP's for the backend then just localhost
*/
private hostspath: string = "assets/config/hosts.json";
// private apiPath: string = "http://localhost:8080/api";
/**
* Fallback to the local config file. If no backend is found, this config will be used to make sure the frontend can boot
*/
private fallbackConfPath: string = "assets/config/config.json";
// /**
// * The host for the backend.

// * Value gets set
// */
// private host: string;
constructor(public http: HttpClient, private toastr: ToastrService) { }
/**
* Return the url leading to the API path. <
*/
static get apiUrl(): string {
let deploymentInfo = AppConfig.settings.deployment;
return deploymentInfo.protocol + "://" + deploymentInfo.host + ":" + deploymentInfo.apiPort + deploymentInfo.apiLink;
}
/**
* Removes all elements that start with a underscore "_".

* @param {any} obj the object whose properties should be removed
* @param {number} level how deep we should go to remove properties
*/
private static removePrivateValues(obj: any, level: number) {
if (level == 0)
return;
for (let key in obj) {
// console.log("key:" + key)
// console.log(key)
if (key.startsWith("_")) {
delete obj.key;
console.log("deleted" + key)
continue;
}
AppConfig.removePrivateValues(obj[key], level - 1);
}
}
/**
* Removes values from the config object which should not be stored.

* e.g. private values, values that got generated from chart.js etc.
*/
public static clear() {
console.log("clear")
for (let chart of AppConfig.settings.charts) {
for (let dataset of chart.datasets) {
// we do not want to store old data
delete dataset.chartDataset.data;
delete dataset.chartDataset._meta;
}
}
AppConfig.removePrivateValues(AppConfig.settings, 15);
}
/**
* Stores the appconfig file on the backend server.

* shows a notification if the operation was successful
*/
public storeSettings(): void {
this.http.post(AppConfig.apiUrl + "/storeconfig", AppConfig.settings, { responseType: 'text' })
.subscribe(
(val) => {
console.log("POST call successful value returned in body",
val);
this.toastr.success('Settings stored successfully');
},
response => {
console.log(response)
this.toastr.error(response, "Could not store Settings");
});
}
/**
* Tries to find a working host from hostlist.

* If found the resolve function we be called and the function terminates.

* Otherwise the errorCallback will be called if no host is found.
*/
private findWorkingHost(hostlist: Array<string>, position:number, resolve : () => void, errorCallback : () => void) {
if (position >= hostlist.length) {
// No host was found.
errorCallback();
return;
}
let path = "http://" + hostlist[position] + ":8080/api/loadconfig";
console.log("trying to find working host on : " + path)
this.http.get<any>(path)
// check if server answers during 3s
.pipe(timeout(3000),
catchError((e, c) => {return throwError(e) }))
.subscribe(data => {
// host found. -> load settings and set host.
AppConfig.settings = <IAppConfig>data;
AppConfig.settings.deployment.host = hostlist[position];
// Call resolve function
resolve();
}, err => {
// Try next host
this.findWorkingHost(hostlist, ++position, resolve, errorCallback);
console.log(' error which is ->', err);
});
}
/**
* Loads the config from the backend and stores it in the settings object

* @return a Promise that is resolved as soon as the config is loaded
*/
public load() {
return new Promise<void>((resolve, reject) => {
// load host.json file
this.http.get(this.hostspath).toPromise().then(
(response: any) => {
console.log(response)
// check hosts one for one, trying to find a working one.
this.findWorkingHost(response.hosts, 0, resolve,
// error callback
() => {
// could not find a host.-> try to use local config instead
console.log("Could not laod config fromhosts going to fallback mode. Trying to load file from: " + this.fallbackConfPath);
this.http.get(this.fallbackConfPath).toPromise().then((response: IAppConfig) => {
// Get fallback config
AppConfig.settings = <IAppConfig>response;
resolve();
}).catch((response: any) => {
// Error could not load fallback config -> reject
reject(`Could not load file '${this.fallbackConfPath}': ${JSON.stringify(response)}`);
});
});
}
).catch((response: any) => {
reject(`Could not load file '${this.fallbackConfPath}': ${JSON.stringify(response)}`);
});
});
};
}